Commit 1ae98c8
authored
feat(availability): extend tier matrix with per-parameter gating (#150)
* feat(availability): extend tier matrix with per-parameter gating (#136)
Add parameter-level tier restrictions to the schema filtering pipeline.
Parameters above the user's GitLab tier are stripped from JSON Schema
before exposure to agents, preventing confusing API errors.
- Add parameterRequirements map to ToolAvailability (manage_work_item: weight, iterationId, healthStatus)
- Add getRestrictedParameters() method checking tier and version
- Add stripTierRestrictedParameters() utility in schema-utils for both flat and discriminated union schemas
- Integrate parameter stripping in registry-manager buildToolLookupCache pipeline
* refactor(availability): add ParameterRequirement alias and improve debug log
- Add ParameterRequirement type alias for semantic clarity (vs ActionRequirement)
- Include version in restricted parameters debug log since parameters
can be restricted by version, not just tier
* test(availability): add parameter stripping edge case tests
- Add RegistryManager test for schema property removal integration
- Add schema-utils tests: no properties, no required array,
discriminated union with missing properties branch
* fix(availability): log raw version string and clean up test registry
- Use human-readable version string (e.g. "17.0.0") in debug log
instead of parsed numeric value (1700)
- Wrap parameter stripping test in try/finally to clean up shared
registry after test completes
* docs: Prompt Library and advanced site features (Phase 2) (#143)
* docs: add Prompt Library, guides, llms.txt, and use-case tool pages (#125)
- Prompt Library with 16 pages of ready-to-use prompts organized by
workflow (quick-start, code-review, CI/CD, project-management)
and by role (developer, devops, team-lead, PM)
- 4 step-by-step guides: code review, CI notifications, multi-GitLab
setup, team onboarding
- llms.txt for machine-readable documentation summary
- Tool pages reorganized by use-case: code-review, ci-cd,
project-management, repository
- VitePress nav/sidebar updated with Prompts and Guides sections
- Homepage updated with Prompt Library action button
* docs: add Automate Releases guide and tool comparison tables
- Add 5th guide: automate-releases.md (end-to-end release workflow)
- Add tool comparison table by role (Developer/DevOps/Lead/PM)
- Add Query vs Command comparison table for CQRS tools
- Update sidebar and guides index with new guide
* fix(docs): correct tool schemas in prompt library and guides
- Rename list_webhooks/list_integrations to browse_webhooks/browse_integrations
- Remove per_page from non-paginated actions (get, job, logs, content, compare)
- Remove ref from manage_pipeline retry/cancel (only needed for create)
- Fix manage_ref params: delete_branch uses branch only, protect_branch uses name,
create_tag uses tag_name+ref
- Use limit instead of per_page for job logs
- Update manage_webhook actions (remove 'read'), manage_integration (remove 'get')
* fix(docs): correct tool action params and restore CLI nav
- browse_webhooks: use action "list" instead of empty string
- browse_integrations: add required action "list" field
- create_branch: remove action field from standalone tool usage
- manage_ref protect_branch: use name param, remove branch/ref
- manage_ref create_tag: remove invalid branch param
- browse_milestones: use "issues" action for milestone filtering
- Restore CLI nav link in config.mts
- Rename "Related Guides" section to "Related" where mixed
* fix(docs): add CLI sidebar section for /cli/ pages
* fix(docs): remove invalid params from tool examples
- list_group_iterations: remove action field (flat schema, no action)
- browse_work_items get: remove state/first/simple (list-only params)
- manage_merge_request approve/merge/update/get_approval_state: remove
source_branch (not accepted by these actions)
- manage_work_item update: remove namespace/workItemType (only id accepted)
* fix(docs): correct publish_all, webhook, and integration examples
- manage_draft_notes publish_all: remove invalid note field
- manage_webhook description: replace CRUD with actual actions
- manage_integration description: remove get (moved to browse_integrations)
- setup-ci-notifications: use browse_integrations for get action
* fix(docs): clarify tool references and descriptions
- project-management: add missing list_project_members tool to table
- repository: reorder create_branch as convenience alias of manage_ref
- debug-failure: add tool name comments to distinguish manage_pipeline
from manage_pipeline_job
- multi-gitlab-setup: fix reset description (restores full context,
not just scope)
* fix(docs): use jsonc lang tag, correct API URL and tool schemas
- Switch fenced blocks with // annotations to jsonc language
- GITLAB_API_URL: use base URL without /api/v4 suffix
- manage_ref: add update_branch_protection and unprotect_tag actions
- create_branch: standalone tool, not alias
- project-management: label browse_members example explicitly
* fix(docs): add missing access levels and use conventional commits
- Access level tables: add 0=No access and 5=Minimal
- Suggestion examples: use conventional commit format in commit_message
* fix(docs): add missing draft action and use conventional commit format
* fix(availability): optimize instance info lookup and refresh cache after init
- Accept optional pre-fetched instanceInfo in getRestrictedParameters()
to avoid redundant ConnectionManager calls per tool in cache build loop
- Pre-fetch instance info once at the start of buildToolLookupCache()
- Refresh registry cache after successful ConnectionManager initialization
so tier-restricted parameters are stripped even if RegistryManager was
constructed before connection was available
- Invalidate toolDefinitionsCache in refreshCache() for consistency
* fix(availability): guard parameter stripping when connection unavailable
- Skip getRestrictedParameters call when instanceInfo is undefined
to avoid repeated throw/catch in ConnectionManager.getInstanceInfo()
- Use invalidateCaches() in refreshCache() to clear all derived caches
(toolNamesCache, readOnlyToolsCache) consistently
- Add ConnectionManager mock to RegistryManager and ToolDescriptionOverrides
tests so buildToolLookupCache can pre-fetch instance info
* test(availability): cover cachedInstanceInfo branch and uninitialized guard
- Add tests for getRestrictedParameters with cachedInstanceInfo parameter
(tier check, version check, bypassing ConnectionManager)
- Add RegistryManager test verifying parameter stripping is skipped
when ConnectionManager is not initialized
* fix(schema-utils): always filter required array in stripFromProperties
- Restructure stripFromProperties to handle required filtering
independently from properties deletion
- Add mockClear() in RegistryManager test to prevent stale call history
- Add test case for schema with required but no properties object1 parent 1e34a93 commit 1ae98c8
File tree
8 files changed
+621
-3
lines changed- src
- services
- utils
- tests/unit
- services
- utils
8 files changed
+621
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
272 | 284 | | |
273 | 285 | | |
274 | 286 | | |
| |||
301 | 313 | | |
302 | 314 | | |
303 | 315 | | |
304 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
305 | 325 | | |
306 | 326 | | |
307 | 327 | | |
| |||
356 | 376 | | |
357 | 377 | | |
358 | 378 | | |
359 | | - | |
| 379 | + | |
360 | 380 | | |
361 | 381 | | |
362 | | - | |
| 382 | + | |
363 | 383 | | |
364 | 384 | | |
365 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
726 | 733 | | |
727 | 734 | | |
728 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
729 | 810 | | |
730 | 811 | | |
731 | 812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
434 | 491 | | |
435 | 492 | | |
436 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
| |||
322 | 331 | | |
323 | 332 | | |
324 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
325 | 442 | | |
326 | 443 | | |
327 | 444 | | |
| |||
0 commit comments