@structured-world/gitlab-mcp 6.62.1 → 6.62.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/generated/prisma/client.js.map +1 -1
- package/dist/generated/prisma/internal/class.js +2 -2
- package/dist/generated/prisma/internal/class.js.map +1 -1
- package/dist/generated/prisma/internal/prismaNamespace.js +2 -2
- package/dist/src/cli/docker/container-runtime.d.ts +1 -1
- package/dist/src/cli/docker/container-runtime.js +14 -14
- package/dist/src/cli/docker/docker-command.d.ts +1 -1
- package/dist/src/cli/docker/docker-command.js +113 -113
- package/dist/src/cli/docker/docker-command.js.map +1 -1
- package/dist/src/cli/docker/docker-utils.d.ts +3 -3
- package/dist/src/cli/docker/docker-utils.js +74 -74
- package/dist/src/cli/docker/docker-utils.js.map +1 -1
- package/dist/src/cli/docker/index.d.ts +4 -4
- package/dist/src/cli/docker/types.d.ts +3 -3
- package/dist/src/cli/docker/types.js +5 -5
- package/dist/src/cli/init/browser.js +2 -2
- package/dist/src/cli/init/config-generator.d.ts +2 -2
- package/dist/src/cli/init/config-generator.js +22 -22
- package/dist/src/cli/init/connection.d.ts +1 -1
- package/dist/src/cli/init/connection.js +17 -17
- package/dist/src/cli/init/index.d.ts +4 -4
- package/dist/src/cli/init/types.d.ts +3 -3
- package/dist/src/cli/init/types.js +36 -36
- package/dist/src/cli/init/wizard.js +80 -80
- package/dist/src/cli/init/wizard.js.map +1 -1
- package/dist/src/cli/inject-tool-refs.js +47 -47
- package/dist/src/cli/inject-tool-refs.js.map +1 -1
- package/dist/src/cli/install/backup.d.ts +1 -1
- package/dist/src/cli/install/backup.js +3 -3
- package/dist/src/cli/install/detector.d.ts +2 -2
- package/dist/src/cli/install/detector.js +18 -18
- package/dist/src/cli/install/detector.js.map +1 -1
- package/dist/src/cli/install/index.d.ts +5 -5
- package/dist/src/cli/install/install-command.d.ts +2 -2
- package/dist/src/cli/install/install-command.js +68 -68
- package/dist/src/cli/install/install-command.js.map +1 -1
- package/dist/src/cli/install/installers.d.ts +2 -2
- package/dist/src/cli/install/installers.js +55 -55
- package/dist/src/cli/install/installers.js.map +1 -1
- package/dist/src/cli/install/types.d.ts +4 -4
- package/dist/src/cli/install/types.js +48 -48
- package/dist/src/cli/instances/index.d.ts +2 -2
- package/dist/src/cli/instances/instances-command.d.ts +1 -1
- package/dist/src/cli/instances/instances-command.js +65 -65
- package/dist/src/cli/instances/instances-command.js.map +1 -1
- package/dist/src/cli/list-tools.js +396 -396
- package/dist/src/cli/list-tools.js.map +1 -1
- package/dist/src/cli/setup/discovery.d.ts +1 -1
- package/dist/src/cli/setup/discovery.js +10 -10
- package/dist/src/cli/setup/discovery.js.map +1 -1
- package/dist/src/cli/setup/flows/configure-existing.d.ts +1 -1
- package/dist/src/cli/setup/flows/configure-existing.js +57 -57
- package/dist/src/cli/setup/flows/configure-existing.js.map +1 -1
- package/dist/src/cli/setup/flows/local-setup.d.ts +1 -1
- package/dist/src/cli/setup/flows/local-setup.js +51 -51
- package/dist/src/cli/setup/flows/local-setup.js.map +1 -1
- package/dist/src/cli/setup/flows/server-setup.d.ts +1 -1
- package/dist/src/cli/setup/flows/server-setup.js +50 -50
- package/dist/src/cli/setup/flows/server-setup.js.map +1 -1
- package/dist/src/cli/setup/flows/tool-selection.d.ts +1 -1
- package/dist/src/cli/setup/flows/tool-selection.js +94 -94
- package/dist/src/cli/setup/flows/tool-selection.js.map +1 -1
- package/dist/src/cli/setup/index.d.ts +4 -4
- package/dist/src/cli/setup/presets.d.ts +1 -1
- package/dist/src/cli/setup/presets.js +157 -157
- package/dist/src/cli/setup/presets.js.map +1 -1
- package/dist/src/cli/setup/types.d.ts +7 -7
- package/dist/src/cli/setup/wizard.d.ts +1 -1
- package/dist/src/cli/setup/wizard.js +25 -25
- package/dist/src/cli/utils/index.d.ts +1 -1
- package/dist/src/cli/utils/path-utils.js +3 -3
- package/dist/src/cli-utils.d.ts +2 -2
- package/dist/src/cli-utils.js +46 -46
- package/dist/src/config/index.d.ts +4 -4
- package/dist/src/config/instances-loader.d.ts +3 -3
- package/dist/src/config/instances-loader.js +53 -53
- package/dist/src/config/instances-loader.js.map +1 -1
- package/dist/src/config/instances-schema.d.ts +1 -1
- package/dist/src/config/instances-schema.js +33 -33
- package/dist/src/config/instances-schema.js.map +1 -1
- package/dist/src/config.d.ts +4 -4
- package/dist/src/config.js +89 -89
- package/dist/src/config.js.map +1 -1
- package/dist/src/dashboard/handler.d.ts +2 -2
- package/dist/src/dashboard/handler.js +7 -7
- package/dist/src/dashboard/html-template.d.ts +1 -1
- package/dist/src/dashboard/html-template.js +44 -44
- package/dist/src/dashboard/html-template.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +4 -4
- package/dist/src/dashboard/metrics.d.ts +3 -3
- package/dist/src/dashboard/metrics.js +42 -42
- package/dist/src/discovery/auto.d.ts +3 -3
- package/dist/src/discovery/auto.js +28 -28
- package/dist/src/discovery/git-remote.d.ts +2 -2
- package/dist/src/discovery/git-remote.js +18 -18
- package/dist/src/discovery/index.d.ts +3 -3
- package/dist/src/discovery/profile-matcher.d.ts +2 -2
- package/dist/src/discovery/profile-matcher.js +8 -8
- package/dist/src/discovery/profile-matcher.js.map +1 -1
- package/dist/src/entities/context/context-manager.d.ts +3 -3
- package/dist/src/entities/context/context-manager.js +34 -34
- package/dist/src/entities/context/context-manager.js.map +1 -1
- package/dist/src/entities/context/handlers.d.ts +2 -2
- package/dist/src/entities/context/handlers.js +8 -8
- package/dist/src/entities/context/index.d.ts +8 -8
- package/dist/src/entities/context/index.js +1 -1
- package/dist/src/entities/context/registry.d.ts +1 -1
- package/dist/src/entities/context/registry.js +4 -4
- package/dist/src/entities/context/schema.d.ts +1 -1
- package/dist/src/entities/context/schema.js +19 -19
- package/dist/src/entities/context/types.d.ts +9 -9
- package/dist/src/entities/context/whoami.d.ts +1 -1
- package/dist/src/entities/context/whoami.js +31 -31
- package/dist/src/entities/context/whoami.js.map +1 -1
- package/dist/src/entities/core/index.d.ts +5 -5
- package/dist/src/entities/core/index.js +1 -1
- package/dist/src/entities/core/registry.d.ts +1 -1
- package/dist/src/entities/core/registry.js +194 -194
- package/dist/src/entities/core/registry.js.map +1 -1
- package/dist/src/entities/core/schema-readonly.d.ts +1 -1
- package/dist/src/entities/core/schema-readonly.js +117 -117
- package/dist/src/entities/core/schema.d.ts +1 -1
- package/dist/src/entities/core/schema.js +67 -67
- package/dist/src/entities/files/index.d.ts +5 -5
- package/dist/src/entities/files/index.js +1 -1
- package/dist/src/entities/files/registry.d.ts +1 -1
- package/dist/src/entities/files/registry.js +45 -45
- package/dist/src/entities/files/registry.js.map +1 -1
- package/dist/src/entities/files/schema-readonly.d.ts +1 -1
- package/dist/src/entities/files/schema-readonly.js +13 -13
- package/dist/src/entities/files/schema.d.ts +1 -1
- package/dist/src/entities/files/schema.js +29 -29
- package/dist/src/entities/index.d.ts +17 -17
- package/dist/src/entities/integrations/index.d.ts +4 -4
- package/dist/src/entities/integrations/registry.d.ts +1 -1
- package/dist/src/entities/integrations/registry.js +17 -17
- package/dist/src/entities/integrations/registry.js.map +1 -1
- package/dist/src/entities/integrations/schema-readonly.d.ts +1 -1
- package/dist/src/entities/integrations/schema-readonly.js +5 -5
- package/dist/src/entities/integrations/schema.d.ts +1 -1
- package/dist/src/entities/integrations/schema.js +69 -69
- package/dist/src/entities/iterations/index.d.ts +2 -2
- package/dist/src/entities/iterations/registry.d.ts +1 -1
- package/dist/src/entities/iterations/registry.js +13 -13
- package/dist/src/entities/iterations/registry.js.map +1 -1
- package/dist/src/entities/iterations/schema-readonly.d.ts +1 -1
- package/dist/src/entities/iterations/schema-readonly.js +9 -9
- package/dist/src/entities/labels/index.d.ts +5 -5
- package/dist/src/entities/labels/index.js +1 -1
- package/dist/src/entities/labels/registry.d.ts +1 -1
- package/dist/src/entities/labels/registry.js +19 -19
- package/dist/src/entities/labels/registry.js.map +1 -1
- package/dist/src/entities/labels/schema-readonly.d.ts +1 -1
- package/dist/src/entities/labels/schema-readonly.js +8 -8
- package/dist/src/entities/labels/schema.d.ts +1 -1
- package/dist/src/entities/labels/schema.js +11 -11
- package/dist/src/entities/members/index.d.ts +3 -3
- package/dist/src/entities/members/registry.d.ts +1 -1
- package/dist/src/entities/members/registry.js +26 -26
- package/dist/src/entities/members/registry.js.map +1 -1
- package/dist/src/entities/members/schema-readonly.d.ts +1 -1
- package/dist/src/entities/members/schema-readonly.js +32 -32
- package/dist/src/entities/members/schema-readonly.js.map +1 -1
- package/dist/src/entities/members/schema.d.ts +1 -1
- package/dist/src/entities/members/schema.js +28 -28
- package/dist/src/entities/milestones/index.d.ts +5 -5
- package/dist/src/entities/milestones/index.js +1 -1
- package/dist/src/entities/milestones/registry.d.ts +1 -1
- package/dist/src/entities/milestones/registry.js +25 -25
- package/dist/src/entities/milestones/registry.js.map +1 -1
- package/dist/src/entities/milestones/schema-readonly.d.ts +2 -2
- package/dist/src/entities/milestones/schema-readonly.js +15 -15
- package/dist/src/entities/milestones/schema.d.ts +1 -1
- package/dist/src/entities/milestones/schema.js +16 -16
- package/dist/src/entities/milestones/schema.js.map +1 -1
- package/dist/src/entities/mrs/index.d.ts +5 -5
- package/dist/src/entities/mrs/index.js +1 -1
- package/dist/src/entities/mrs/registry.d.ts +1 -1
- package/dist/src/entities/mrs/registry.js +102 -102
- package/dist/src/entities/mrs/registry.js.map +1 -1
- package/dist/src/entities/mrs/schema-readonly.d.ts +1 -1
- package/dist/src/entities/mrs/schema-readonly.js +126 -126
- package/dist/src/entities/mrs/schema-readonly.js.map +1 -1
- package/dist/src/entities/mrs/schema.d.ts +1 -1
- package/dist/src/entities/mrs/schema.js +111 -111
- package/dist/src/entities/mrs/schema.js.map +1 -1
- package/dist/src/entities/pipelines/index.d.ts +5 -5
- package/dist/src/entities/pipelines/index.js +1 -1
- package/dist/src/entities/pipelines/registry.d.ts +1 -1
- package/dist/src/entities/pipelines/registry.js +45 -45
- package/dist/src/entities/pipelines/registry.js.map +1 -1
- package/dist/src/entities/pipelines/schema-readonly.d.ts +1 -1
- package/dist/src/entities/pipelines/schema-readonly.js +73 -73
- package/dist/src/entities/pipelines/schema.d.ts +1 -1
- package/dist/src/entities/pipelines/schema.js +21 -21
- package/dist/src/entities/refs/index.d.ts +3 -3
- package/dist/src/entities/refs/registry.d.ts +1 -1
- package/dist/src/entities/refs/registry.js +31 -31
- package/dist/src/entities/refs/registry.js.map +1 -1
- package/dist/src/entities/refs/schema-readonly.d.ts +1 -1
- package/dist/src/entities/refs/schema-readonly.js +21 -21
- package/dist/src/entities/refs/schema.d.ts +1 -1
- package/dist/src/entities/refs/schema.js +56 -56
- package/dist/src/entities/releases/index.d.ts +3 -3
- package/dist/src/entities/releases/registry.d.ts +1 -1
- package/dist/src/entities/releases/registry.js +21 -21
- package/dist/src/entities/releases/registry.js.map +1 -1
- package/dist/src/entities/releases/schema-readonly.d.ts +1 -1
- package/dist/src/entities/releases/schema-readonly.js +13 -13
- package/dist/src/entities/releases/schema.d.ts +1 -1
- package/dist/src/entities/releases/schema.js +21 -21
- package/dist/src/entities/search/index.d.ts +2 -2
- package/dist/src/entities/search/registry.d.ts +1 -1
- package/dist/src/entities/search/registry.js +13 -13
- package/dist/src/entities/search/schema-readonly.d.ts +1 -1
- package/dist/src/entities/search/schema-readonly.js +23 -23
- package/dist/src/entities/shared.d.ts +1 -1
- package/dist/src/entities/shared.js +5 -5
- package/dist/src/entities/snippets/index.d.ts +5 -5
- package/dist/src/entities/snippets/index.js +1 -1
- package/dist/src/entities/snippets/registry.d.ts +1 -1
- package/dist/src/entities/snippets/registry.js +24 -24
- package/dist/src/entities/snippets/registry.js.map +1 -1
- package/dist/src/entities/snippets/schema-readonly.d.ts +1 -1
- package/dist/src/entities/snippets/schema-readonly.js +11 -11
- package/dist/src/entities/snippets/schema.d.ts +1 -1
- package/dist/src/entities/snippets/schema.js +27 -27
- package/dist/src/entities/snippets/schema.js.map +1 -1
- package/dist/src/entities/utils.d.ts +2 -2
- package/dist/src/entities/utils.js +8 -8
- package/dist/src/entities/utils.js.map +1 -1
- package/dist/src/entities/variables/index.d.ts +5 -5
- package/dist/src/entities/variables/index.js +1 -1
- package/dist/src/entities/variables/registry.d.ts +1 -1
- package/dist/src/entities/variables/registry.js +22 -22
- package/dist/src/entities/variables/registry.js.map +1 -1
- package/dist/src/entities/variables/schema-readonly.d.ts +1 -1
- package/dist/src/entities/variables/schema-readonly.js +6 -6
- package/dist/src/entities/variables/schema.d.ts +1 -1
- package/dist/src/entities/variables/schema.js +21 -21
- package/dist/src/entities/variables/schema.js.map +1 -1
- package/dist/src/entities/webhooks/index.d.ts +4 -4
- package/dist/src/entities/webhooks/registry.d.ts +1 -1
- package/dist/src/entities/webhooks/registry.js +29 -29
- package/dist/src/entities/webhooks/registry.js.map +1 -1
- package/dist/src/entities/webhooks/schema-readonly.d.ts +1 -1
- package/dist/src/entities/webhooks/schema-readonly.js +9 -9
- package/dist/src/entities/webhooks/schema.d.ts +1 -1
- package/dist/src/entities/webhooks/schema.js +59 -59
- package/dist/src/entities/wiki/index.d.ts +5 -5
- package/dist/src/entities/wiki/index.js +1 -1
- package/dist/src/entities/wiki/registry.d.ts +1 -1
- package/dist/src/entities/wiki/registry.js +19 -19
- package/dist/src/entities/wiki/registry.js.map +1 -1
- package/dist/src/entities/wiki/schema-readonly.d.ts +1 -1
- package/dist/src/entities/wiki/schema-readonly.js +6 -6
- package/dist/src/entities/wiki/schema.d.ts +1 -1
- package/dist/src/entities/wiki/schema.js +12 -12
- package/dist/src/entities/workitems/index.d.ts +5 -5
- package/dist/src/entities/workitems/index.js +1 -1
- package/dist/src/entities/workitems/registry.d.ts +1 -1
- package/dist/src/entities/workitems/registry.js +101 -101
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/entities/workitems/schema-readonly.d.ts +1 -1
- package/dist/src/entities/workitems/schema-readonly.js +27 -27
- package/dist/src/entities/workitems/schema-readonly.js.map +1 -1
- package/dist/src/entities/workitems/schema.d.ts +1 -1
- package/dist/src/entities/workitems/schema.js +58 -58
- package/dist/src/graphql/DynamicWorkItemsQuery.d.ts +2 -2
- package/dist/src/graphql/DynamicWorkItemsQuery.js +47 -47
- package/dist/src/graphql/DynamicWorkItemsQuery.js.map +1 -1
- package/dist/src/graphql/client.d.ts +1 -1
- package/dist/src/graphql/client.js +4 -4
- package/dist/src/graphql/client.js.map +1 -1
- package/dist/src/graphql/index.d.ts +2 -2
- package/dist/src/graphql/workItems.d.ts +38 -38
- package/dist/src/graphql/workItems.js +30 -30
- package/dist/src/handlers.d.ts +1 -1
- package/dist/src/handlers.js +55 -55
- package/dist/src/handlers.js.map +1 -1
- package/dist/src/http-client.js +3 -3
- package/dist/src/logger.js +25 -25
- package/dist/src/logging/access-log.d.ts +2 -2
- package/dist/src/logging/access-log.js +25 -25
- package/dist/src/logging/connection-tracker.d.ts +1 -1
- package/dist/src/logging/connection-tracker.js +3 -3
- package/dist/src/logging/index.d.ts +5 -5
- package/dist/src/logging/request-tracker.d.ts +3 -3
- package/dist/src/logging/request-tracker.js +4 -4
- package/dist/src/logging/types.d.ts +3 -3
- package/dist/src/logging/types.js +1 -1
- package/dist/src/main.js +28 -28
- package/dist/src/middleware/index.d.ts +2 -2
- package/dist/src/middleware/oauth-auth.d.ts +1 -1
- package/dist/src/middleware/oauth-auth.js +17 -17
- package/dist/src/middleware/rate-limiter.d.ts +1 -1
- package/dist/src/middleware/rate-limiter.js +32 -32
- package/dist/src/oauth/config.d.ts +1 -1
- package/dist/src/oauth/config.js +18 -18
- package/dist/src/oauth/config.js.map +1 -1
- package/dist/src/oauth/endpoints/authorize.d.ts +1 -1
- package/dist/src/oauth/endpoints/authorize.js +32 -32
- package/dist/src/oauth/endpoints/callback.d.ts +1 -1
- package/dist/src/oauth/endpoints/callback.js +26 -26
- package/dist/src/oauth/endpoints/index.d.ts +5 -5
- package/dist/src/oauth/endpoints/metadata.d.ts +1 -1
- package/dist/src/oauth/endpoints/metadata.js +12 -12
- package/dist/src/oauth/endpoints/register.d.ts +1 -1
- package/dist/src/oauth/endpoints/register.js +9 -9
- package/dist/src/oauth/endpoints/token.d.ts +1 -1
- package/dist/src/oauth/endpoints/token.js +28 -28
- package/dist/src/oauth/gitlab-device-flow.d.ts +2 -2
- package/dist/src/oauth/gitlab-device-flow.js +46 -46
- package/dist/src/oauth/gitlab-device-flow.js.map +1 -1
- package/dist/src/oauth/index.d.ts +10 -10
- package/dist/src/oauth/session-store.d.ts +2 -2
- package/dist/src/oauth/session-store.js +40 -40
- package/dist/src/oauth/session-store.js.map +1 -1
- package/dist/src/oauth/storage/factory.d.ts +2 -2
- package/dist/src/oauth/storage/factory.js +16 -16
- package/dist/src/oauth/storage/file.d.ts +2 -2
- package/dist/src/oauth/storage/file.js +22 -22
- package/dist/src/oauth/storage/file.js.map +1 -1
- package/dist/src/oauth/storage/index.d.ts +5 -5
- package/dist/src/oauth/storage/memory.d.ts +2 -2
- package/dist/src/oauth/storage/memory.js +18 -18
- package/dist/src/oauth/storage/memory.js.map +1 -1
- package/dist/src/oauth/storage/postgresql.d.ts +2 -2
- package/dist/src/oauth/storage/postgresql.js +11 -11
- package/dist/src/oauth/storage/postgresql.js.map +1 -1
- package/dist/src/oauth/storage/types.d.ts +3 -3
- package/dist/src/oauth/token-context.d.ts +1 -1
- package/dist/src/oauth/token-context.js +1 -1
- package/dist/src/oauth/token-utils.d.ts +1 -1
- package/dist/src/oauth/token-utils.js +20 -20
- package/dist/src/oauth/types.d.ts +3 -3
- package/dist/src/profiles/applicator.d.ts +1 -1
- package/dist/src/profiles/applicator.js +48 -48
- package/dist/src/profiles/index.d.ts +5 -5
- package/dist/src/profiles/loader.d.ts +3 -3
- package/dist/src/profiles/loader.js +25 -25
- package/dist/src/profiles/loader.js.map +1 -1
- package/dist/src/profiles/project-loader.d.ts +1 -1
- package/dist/src/profiles/project-loader.js +23 -23
- package/dist/src/profiles/project-loader.js.map +1 -1
- package/dist/src/profiles/scope-enforcer.d.ts +2 -2
- package/dist/src/profiles/scope-enforcer.js +25 -25
- package/dist/src/profiles/scope-enforcer.js.map +1 -1
- package/dist/src/profiles/types.d.ts +2 -2
- package/dist/src/profiles/types.js +50 -48
- package/dist/src/profiles/types.js.map +1 -1
- package/dist/src/registry-manager.d.ts +1 -1
- package/dist/src/registry-manager.js +64 -64
- package/dist/src/registry-manager.js.map +1 -1
- package/dist/src/server.js +136 -136
- package/dist/src/server.js.map +1 -1
- package/dist/src/services/ConnectionManager.d.ts +5 -5
- package/dist/src/services/ConnectionManager.js +45 -45
- package/dist/src/services/ConnectionManager.js.map +1 -1
- package/dist/src/services/GitLabVersionDetector.d.ts +2 -2
- package/dist/src/services/GitLabVersionDetector.js +45 -45
- package/dist/src/services/GitLabVersionDetector.js.map +1 -1
- package/dist/src/services/InstanceConnectionPool.d.ts +2 -2
- package/dist/src/services/InstanceConnectionPool.js +13 -13
- package/dist/src/services/InstanceConnectionPool.js.map +1 -1
- package/dist/src/services/InstanceRateLimiter.js +6 -6
- package/dist/src/services/InstanceRateLimiter.js.map +1 -1
- package/dist/src/services/InstanceRegistry.d.ts +4 -4
- package/dist/src/services/InstanceRegistry.js +23 -23
- package/dist/src/services/InstanceRegistry.js.map +1 -1
- package/dist/src/services/NamespaceTierDetector.d.ts +2 -2
- package/dist/src/services/NamespaceTierDetector.js +30 -30
- package/dist/src/services/NamespaceTierDetector.js.map +1 -1
- package/dist/src/services/SchemaIntrospector.d.ts +1 -1
- package/dist/src/services/SchemaIntrospector.js +42 -42
- package/dist/src/services/SchemaIntrospector.js.map +1 -1
- package/dist/src/services/TokenScopeDetector.d.ts +2 -2
- package/dist/src/services/TokenScopeDetector.js +80 -80
- package/dist/src/services/TokenScopeDetector.js.map +1 -1
- package/dist/src/services/ToolAvailability.d.ts +6 -6
- package/dist/src/services/ToolAvailability.js +122 -122
- package/dist/src/services/ToolAvailability.js.map +1 -1
- package/dist/src/services/WidgetAvailability.d.ts +2 -2
- package/dist/src/services/WidgetAvailability.js +34 -34
- package/dist/src/session-manager.d.ts +3 -2
- package/dist/src/session-manager.js +17 -14
- package/dist/src/session-manager.js.map +1 -1
- package/dist/src/types.js +4 -4
- package/dist/src/utils/description-utils.js +4 -4
- package/dist/src/utils/description-utils.js.map +1 -1
- package/dist/src/utils/error-handler.d.ts +9 -9
- package/dist/src/utils/error-handler.js +187 -187
- package/dist/src/utils/error-handler.js.map +1 -1
- package/dist/src/utils/fetch.js +85 -85
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/gitlab-api.d.ts +1 -1
- package/dist/src/utils/gitlab-api.js +24 -24
- package/dist/src/utils/idConversion.js +47 -47
- package/dist/src/utils/idConversion.js.map +1 -1
- package/dist/src/utils/namespace.d.ts +2 -2
- package/dist/src/utils/namespace.js +15 -15
- package/dist/src/utils/projectIdentifier.js +4 -4
- package/dist/src/utils/request-logger.d.ts +4 -4
- package/dist/src/utils/request-logger.js +5 -5
- package/dist/src/utils/schema-utils.js +24 -24
- package/dist/src/utils/schema-utils.js.map +1 -1
- package/dist/src/utils/smart-user-search.d.ts +1 -1
- package/dist/src/utils/smart-user-search.js +10 -10
- package/dist/src/utils/version.js +1 -1
- package/dist/structured-world-gitlab-mcp-6.62.2.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +18 -21
- package/dist/structured-world-gitlab-mcp-6.62.1.tgz +0 -0
|
@@ -16,224 +16,224 @@ const ConnectionManager_js_1 = require("../services/ConnectionManager.js");
|
|
|
16
16
|
const version_js_1 = require("./version.js");
|
|
17
17
|
const FEATURE_METADATA = {
|
|
18
18
|
workItems: {
|
|
19
|
-
name:
|
|
20
|
-
requiredTier:
|
|
21
|
-
docsUrl:
|
|
19
|
+
name: 'Work Items',
|
|
20
|
+
requiredTier: 'Free',
|
|
21
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/work_items/',
|
|
22
22
|
alternatives: [],
|
|
23
23
|
},
|
|
24
24
|
epics: {
|
|
25
|
-
name:
|
|
26
|
-
requiredTier:
|
|
27
|
-
docsUrl:
|
|
25
|
+
name: 'Epics',
|
|
26
|
+
requiredTier: 'Premium',
|
|
27
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/epics/',
|
|
28
28
|
alternatives: [
|
|
29
29
|
{
|
|
30
|
-
action:
|
|
31
|
-
description:
|
|
32
|
-
available_on:
|
|
30
|
+
action: 'Use issues for tracking',
|
|
31
|
+
description: 'Create issues with labels to organize work instead of epics',
|
|
32
|
+
available_on: 'Free',
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
action:
|
|
36
|
-
description:
|
|
37
|
-
available_on:
|
|
35
|
+
action: 'Use milestones',
|
|
36
|
+
description: 'Group related issues under milestones for release planning',
|
|
37
|
+
available_on: 'Free',
|
|
38
38
|
},
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
iterations: {
|
|
42
|
-
name:
|
|
43
|
-
requiredTier:
|
|
44
|
-
docsUrl:
|
|
42
|
+
name: 'Iterations',
|
|
43
|
+
requiredTier: 'Premium',
|
|
44
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/iterations/',
|
|
45
45
|
alternatives: [
|
|
46
46
|
{
|
|
47
|
-
action:
|
|
48
|
-
description:
|
|
49
|
-
available_on:
|
|
47
|
+
action: 'Use milestones',
|
|
48
|
+
description: 'Use milestones to track time-boxed work periods',
|
|
49
|
+
available_on: 'Free',
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
},
|
|
53
53
|
roadmaps: {
|
|
54
|
-
name:
|
|
55
|
-
requiredTier:
|
|
56
|
-
docsUrl:
|
|
54
|
+
name: 'Roadmaps',
|
|
55
|
+
requiredTier: 'Premium',
|
|
56
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/roadmap/',
|
|
57
57
|
alternatives: [
|
|
58
58
|
{
|
|
59
|
-
action:
|
|
60
|
-
description:
|
|
61
|
-
available_on:
|
|
59
|
+
action: 'Use milestone views',
|
|
60
|
+
description: 'View milestones timeline for basic roadmap functionality',
|
|
61
|
+
available_on: 'Free',
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
64
|
},
|
|
65
65
|
portfolioManagement: {
|
|
66
|
-
name:
|
|
67
|
-
requiredTier:
|
|
68
|
-
docsUrl:
|
|
66
|
+
name: 'Portfolio Management',
|
|
67
|
+
requiredTier: 'Ultimate',
|
|
68
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/planning_hierarchy/',
|
|
69
69
|
alternatives: [
|
|
70
70
|
{
|
|
71
|
-
action:
|
|
72
|
-
description:
|
|
73
|
-
available_on:
|
|
71
|
+
action: 'Use group-level milestones',
|
|
72
|
+
description: 'Track progress across projects using group milestones',
|
|
73
|
+
available_on: 'Free',
|
|
74
74
|
},
|
|
75
75
|
],
|
|
76
76
|
},
|
|
77
77
|
advancedSearch: {
|
|
78
|
-
name:
|
|
79
|
-
requiredTier:
|
|
80
|
-
docsUrl:
|
|
78
|
+
name: 'Advanced Search',
|
|
79
|
+
requiredTier: 'Premium',
|
|
80
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/search/advanced_search.html',
|
|
81
81
|
alternatives: [
|
|
82
82
|
{
|
|
83
|
-
action:
|
|
84
|
-
description:
|
|
85
|
-
available_on:
|
|
83
|
+
action: 'Use basic search',
|
|
84
|
+
description: 'Use standard GitLab search functionality',
|
|
85
|
+
available_on: 'Free',
|
|
86
86
|
},
|
|
87
87
|
],
|
|
88
88
|
},
|
|
89
89
|
codeReview: {
|
|
90
|
-
name:
|
|
91
|
-
requiredTier:
|
|
92
|
-
docsUrl:
|
|
90
|
+
name: 'Code Review Analytics',
|
|
91
|
+
requiredTier: 'Premium',
|
|
92
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/analytics/code_review_analytics.html',
|
|
93
93
|
alternatives: [],
|
|
94
94
|
},
|
|
95
95
|
securityDashboard: {
|
|
96
|
-
name:
|
|
97
|
-
requiredTier:
|
|
98
|
-
docsUrl:
|
|
96
|
+
name: 'Security Dashboard',
|
|
97
|
+
requiredTier: 'Ultimate',
|
|
98
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/application_security/security_dashboard/',
|
|
99
99
|
alternatives: [],
|
|
100
100
|
},
|
|
101
101
|
complianceFramework: {
|
|
102
|
-
name:
|
|
103
|
-
requiredTier:
|
|
104
|
-
docsUrl:
|
|
102
|
+
name: 'Compliance Framework',
|
|
103
|
+
requiredTier: 'Ultimate',
|
|
104
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/settings/compliance_frameworks.html',
|
|
105
105
|
alternatives: [],
|
|
106
106
|
},
|
|
107
107
|
valueStreamAnalytics: {
|
|
108
|
-
name:
|
|
109
|
-
requiredTier:
|
|
110
|
-
docsUrl:
|
|
108
|
+
name: 'Value Stream Analytics',
|
|
109
|
+
requiredTier: 'Premium',
|
|
110
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/value_stream_analytics/',
|
|
111
111
|
alternatives: [],
|
|
112
112
|
},
|
|
113
113
|
customFields: {
|
|
114
|
-
name:
|
|
115
|
-
requiredTier:
|
|
116
|
-
docsUrl:
|
|
114
|
+
name: 'Custom Fields',
|
|
115
|
+
requiredTier: 'Ultimate',
|
|
116
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/working_with_projects.html',
|
|
117
117
|
alternatives: [
|
|
118
118
|
{
|
|
119
|
-
action:
|
|
120
|
-
description:
|
|
121
|
-
available_on:
|
|
119
|
+
action: 'Use labels',
|
|
120
|
+
description: 'Use labels to categorize and tag work items',
|
|
121
|
+
available_on: 'Free',
|
|
122
122
|
},
|
|
123
123
|
],
|
|
124
124
|
},
|
|
125
125
|
okrs: {
|
|
126
|
-
name:
|
|
127
|
-
requiredTier:
|
|
128
|
-
docsUrl:
|
|
126
|
+
name: 'OKRs (Objectives and Key Results)',
|
|
127
|
+
requiredTier: 'Ultimate',
|
|
128
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/okrs/',
|
|
129
129
|
alternatives: [
|
|
130
130
|
{
|
|
131
|
-
action:
|
|
132
|
-
description:
|
|
133
|
-
available_on:
|
|
131
|
+
action: 'Use issues with labels',
|
|
132
|
+
description: 'Track objectives as issues with specific labels',
|
|
133
|
+
available_on: 'Free',
|
|
134
134
|
},
|
|
135
135
|
],
|
|
136
136
|
},
|
|
137
137
|
healthStatus: {
|
|
138
|
-
name:
|
|
139
|
-
requiredTier:
|
|
140
|
-
docsUrl:
|
|
138
|
+
name: 'Health Status',
|
|
139
|
+
requiredTier: 'Ultimate',
|
|
140
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#health-status',
|
|
141
141
|
alternatives: [
|
|
142
142
|
{
|
|
143
|
-
action:
|
|
143
|
+
action: 'Use labels for status',
|
|
144
144
|
description: "Create labels like 'on-track', 'at-risk', 'needs-attention'",
|
|
145
|
-
available_on:
|
|
145
|
+
available_on: 'Free',
|
|
146
146
|
},
|
|
147
147
|
],
|
|
148
148
|
},
|
|
149
149
|
weight: {
|
|
150
|
-
name:
|
|
151
|
-
requiredTier:
|
|
152
|
-
docsUrl:
|
|
150
|
+
name: 'Issue Weight',
|
|
151
|
+
requiredTier: 'Premium',
|
|
152
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/issues/issue_weight.html',
|
|
153
153
|
alternatives: [
|
|
154
154
|
{
|
|
155
|
-
action:
|
|
155
|
+
action: 'Use labels for estimation',
|
|
156
156
|
description: "Create labels like 'size::S', 'size::M', 'size::L' for estimation",
|
|
157
|
-
available_on:
|
|
157
|
+
available_on: 'Free',
|
|
158
158
|
},
|
|
159
159
|
],
|
|
160
160
|
},
|
|
161
161
|
multiLevelEpics: {
|
|
162
|
-
name:
|
|
163
|
-
requiredTier:
|
|
164
|
-
docsUrl:
|
|
162
|
+
name: 'Multi-level Epics',
|
|
163
|
+
requiredTier: 'Ultimate',
|
|
164
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/group/epics/manage_epics.html#multi-level-child-epics',
|
|
165
165
|
alternatives: [
|
|
166
166
|
{
|
|
167
|
-
action:
|
|
168
|
-
description:
|
|
169
|
-
available_on:
|
|
167
|
+
action: 'Use flat epics',
|
|
168
|
+
description: 'Organize work with single-level epics (Premium)',
|
|
169
|
+
available_on: 'Premium',
|
|
170
170
|
},
|
|
171
171
|
],
|
|
172
172
|
},
|
|
173
173
|
serviceDesk: {
|
|
174
|
-
name:
|
|
175
|
-
requiredTier:
|
|
176
|
-
docsUrl:
|
|
174
|
+
name: 'Service Desk',
|
|
175
|
+
requiredTier: 'Premium',
|
|
176
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/service_desk/',
|
|
177
177
|
alternatives: [],
|
|
178
178
|
},
|
|
179
179
|
requirements: {
|
|
180
|
-
name:
|
|
181
|
-
requiredTier:
|
|
182
|
-
docsUrl:
|
|
180
|
+
name: 'Requirements Management',
|
|
181
|
+
requiredTier: 'Ultimate',
|
|
182
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/requirements/',
|
|
183
183
|
alternatives: [
|
|
184
184
|
{
|
|
185
|
-
action:
|
|
186
|
-
description:
|
|
187
|
-
available_on:
|
|
185
|
+
action: 'Use issues',
|
|
186
|
+
description: 'Track requirements as issues with a dedicated label',
|
|
187
|
+
available_on: 'Free',
|
|
188
188
|
},
|
|
189
189
|
],
|
|
190
190
|
},
|
|
191
191
|
qualityManagement: {
|
|
192
|
-
name:
|
|
193
|
-
requiredTier:
|
|
194
|
-
docsUrl:
|
|
192
|
+
name: 'Quality Management',
|
|
193
|
+
requiredTier: 'Ultimate',
|
|
194
|
+
docsUrl: 'https://docs.gitlab.com/ee/ci/testing/',
|
|
195
195
|
alternatives: [],
|
|
196
196
|
},
|
|
197
197
|
timeTracking: {
|
|
198
|
-
name:
|
|
199
|
-
requiredTier:
|
|
200
|
-
docsUrl:
|
|
198
|
+
name: 'Time Tracking',
|
|
199
|
+
requiredTier: 'Premium',
|
|
200
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/time_tracking.html',
|
|
201
201
|
alternatives: [],
|
|
202
202
|
},
|
|
203
203
|
crmContacts: {
|
|
204
|
-
name:
|
|
205
|
-
requiredTier:
|
|
206
|
-
docsUrl:
|
|
204
|
+
name: 'CRM Contacts',
|
|
205
|
+
requiredTier: 'Ultimate',
|
|
206
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/crm/',
|
|
207
207
|
alternatives: [],
|
|
208
208
|
},
|
|
209
209
|
vulnerabilities: {
|
|
210
|
-
name:
|
|
211
|
-
requiredTier:
|
|
212
|
-
docsUrl:
|
|
210
|
+
name: 'Vulnerability Management',
|
|
211
|
+
requiredTier: 'Ultimate',
|
|
212
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/application_security/vulnerabilities/',
|
|
213
213
|
alternatives: [],
|
|
214
214
|
},
|
|
215
215
|
errorTracking: {
|
|
216
|
-
name:
|
|
217
|
-
requiredTier:
|
|
218
|
-
docsUrl:
|
|
216
|
+
name: 'Error Tracking',
|
|
217
|
+
requiredTier: 'Ultimate',
|
|
218
|
+
docsUrl: 'https://docs.gitlab.com/ee/operations/error_tracking.html',
|
|
219
219
|
alternatives: [],
|
|
220
220
|
},
|
|
221
221
|
designManagement: {
|
|
222
|
-
name:
|
|
223
|
-
requiredTier:
|
|
224
|
-
docsUrl:
|
|
222
|
+
name: 'Design Management',
|
|
223
|
+
requiredTier: 'Premium',
|
|
224
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/issues/design_management.html',
|
|
225
225
|
alternatives: [],
|
|
226
226
|
},
|
|
227
227
|
linkedResources: {
|
|
228
|
-
name:
|
|
229
|
-
requiredTier:
|
|
230
|
-
docsUrl:
|
|
228
|
+
name: 'Linked Resources',
|
|
229
|
+
requiredTier: 'Premium',
|
|
230
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/issues/related_issues.html',
|
|
231
231
|
alternatives: [],
|
|
232
232
|
},
|
|
233
233
|
emailParticipants: {
|
|
234
|
-
name:
|
|
235
|
-
requiredTier:
|
|
236
|
-
docsUrl:
|
|
234
|
+
name: 'Email Participants',
|
|
235
|
+
requiredTier: 'Premium',
|
|
236
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#add-an-email-participant',
|
|
237
237
|
alternatives: [],
|
|
238
238
|
},
|
|
239
239
|
};
|
|
@@ -247,31 +247,31 @@ function detectTierRestriction(tool, action, toolArgs) {
|
|
|
247
247
|
}
|
|
248
248
|
const currentTierRaw = connectionManager.getTier();
|
|
249
249
|
const currentTier = normalizeTier(currentTierRaw);
|
|
250
|
-
if (tool ===
|
|
250
|
+
if (tool === 'browse_work_items' || tool === 'manage_work_item') {
|
|
251
251
|
const restriction = checkWorkItemTypeRestriction(connectionManager, toolArgs, currentTier);
|
|
252
252
|
if (restriction)
|
|
253
253
|
return restriction;
|
|
254
254
|
}
|
|
255
|
-
if (tool ===
|
|
256
|
-
if (!connectionManager.isFeatureAvailable(
|
|
257
|
-
return createRestrictionInfo(
|
|
255
|
+
if (tool === 'browse_iterations') {
|
|
256
|
+
if (!connectionManager.isFeatureAvailable('iterations')) {
|
|
257
|
+
return createRestrictionInfo('iterations', currentTier);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
if ((tool ===
|
|
261
|
-
if (!connectionManager.isFeatureAvailable(
|
|
260
|
+
if ((tool === 'browse_webhooks' || tool === 'manage_webhook') && toolArgs?.scope === 'group') {
|
|
261
|
+
if (!connectionManager.isFeatureAvailable('serviceDesk')) {
|
|
262
262
|
return {
|
|
263
|
-
feature:
|
|
264
|
-
name:
|
|
265
|
-
requiredTier:
|
|
263
|
+
feature: 'serviceDesk',
|
|
264
|
+
name: 'Group Webhooks',
|
|
265
|
+
requiredTier: 'Premium',
|
|
266
266
|
currentTier,
|
|
267
267
|
alternatives: [
|
|
268
268
|
{
|
|
269
|
-
action:
|
|
270
|
-
description:
|
|
271
|
-
available_on:
|
|
269
|
+
action: 'Use project-level webhooks',
|
|
270
|
+
description: 'Configure webhooks on individual projects instead',
|
|
271
|
+
available_on: 'Free',
|
|
272
272
|
},
|
|
273
273
|
],
|
|
274
|
-
docsUrl:
|
|
274
|
+
docsUrl: 'https://docs.gitlab.com/ee/user/project/integrations/webhooks.html',
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -281,19 +281,19 @@ function checkWorkItemTypeRestriction(connectionManager, toolArgs, currentTier)
|
|
|
281
281
|
if (!toolArgs)
|
|
282
282
|
return null;
|
|
283
283
|
const types = extractWorkItemTypes(toolArgs);
|
|
284
|
-
if (types.includes(
|
|
285
|
-
if (!connectionManager.isFeatureAvailable(
|
|
286
|
-
return createRestrictionInfo(
|
|
284
|
+
if (types.includes('EPIC')) {
|
|
285
|
+
if (!connectionManager.isFeatureAvailable('epics')) {
|
|
286
|
+
return createRestrictionInfo('epics', currentTier);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
if (types.includes(
|
|
290
|
-
if (!connectionManager.isFeatureAvailable(
|
|
291
|
-
return createRestrictionInfo(
|
|
289
|
+
if (types.includes('OBJECTIVE') || types.includes('KEY_RESULT')) {
|
|
290
|
+
if (!connectionManager.isFeatureAvailable('okrs')) {
|
|
291
|
+
return createRestrictionInfo('okrs', currentTier);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
if (types.includes(
|
|
295
|
-
if (!connectionManager.isFeatureAvailable(
|
|
296
|
-
return createRestrictionInfo(
|
|
294
|
+
if (types.includes('REQUIREMENT')) {
|
|
295
|
+
if (!connectionManager.isFeatureAvailable('requirements')) {
|
|
296
|
+
return createRestrictionInfo('requirements', currentTier);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
return null;
|
|
@@ -301,12 +301,12 @@ function checkWorkItemTypeRestriction(connectionManager, toolArgs, currentTier)
|
|
|
301
301
|
function extractWorkItemTypes(toolArgs) {
|
|
302
302
|
const types = [];
|
|
303
303
|
if (Array.isArray(toolArgs.types)) {
|
|
304
|
-
types.push(...toolArgs.types.map(t => String(t).toUpperCase()));
|
|
304
|
+
types.push(...toolArgs.types.map((t) => String(t).toUpperCase()));
|
|
305
305
|
}
|
|
306
|
-
if (typeof toolArgs.workItemType ===
|
|
306
|
+
if (typeof toolArgs.workItemType === 'string') {
|
|
307
307
|
types.push(toolArgs.workItemType.toUpperCase());
|
|
308
308
|
}
|
|
309
|
-
if (typeof toolArgs.type ===
|
|
309
|
+
if (typeof toolArgs.type === 'string') {
|
|
310
310
|
types.push(toolArgs.type.toUpperCase());
|
|
311
311
|
}
|
|
312
312
|
return types;
|
|
@@ -324,15 +324,15 @@ function createRestrictionInfo(feature, currentTier) {
|
|
|
324
324
|
}
|
|
325
325
|
function normalizeTier(tier) {
|
|
326
326
|
const lower = tier.toLowerCase();
|
|
327
|
-
if (lower ===
|
|
328
|
-
return
|
|
329
|
-
if (lower ===
|
|
330
|
-
return
|
|
331
|
-
return
|
|
327
|
+
if (lower === 'ultimate' || lower === 'gold')
|
|
328
|
+
return 'Ultimate';
|
|
329
|
+
if (lower === 'premium' || lower === 'silver')
|
|
330
|
+
return 'Premium';
|
|
331
|
+
return 'Free';
|
|
332
332
|
}
|
|
333
333
|
function handleGitLabError(error, tool, action, toolArgs) {
|
|
334
334
|
const { status, message, error: errorMsg, error_description } = error;
|
|
335
|
-
const rawMessage = message ?? errorMsg ?? error_description ??
|
|
335
|
+
const rawMessage = message ?? errorMsg ?? error_description ?? 'Unknown error';
|
|
336
336
|
if (status === 403) {
|
|
337
337
|
const tierRestriction = detectTierRestriction(tool, action, toolArgs);
|
|
338
338
|
if (tierRestriction) {
|
|
@@ -345,39 +345,39 @@ function handleGitLabError(error, tool, action, toolArgs) {
|
|
|
345
345
|
}
|
|
346
346
|
if (status === 429) {
|
|
347
347
|
return {
|
|
348
|
-
error_code:
|
|
348
|
+
error_code: 'RATE_LIMITED',
|
|
349
349
|
tool,
|
|
350
350
|
action,
|
|
351
351
|
http_status: status,
|
|
352
|
-
message:
|
|
353
|
-
suggested_fix:
|
|
352
|
+
message: 'Rate limit exceeded. Please wait before retrying.',
|
|
353
|
+
suggested_fix: 'Wait a few minutes and try again, or reduce request frequency',
|
|
354
354
|
gitlab_error: rawMessage,
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
357
|
if (status >= 500) {
|
|
358
358
|
return {
|
|
359
|
-
error_code:
|
|
359
|
+
error_code: 'SERVER_ERROR',
|
|
360
360
|
tool,
|
|
361
361
|
action,
|
|
362
362
|
http_status: status,
|
|
363
|
-
message:
|
|
364
|
-
suggested_fix:
|
|
363
|
+
message: 'GitLab server error. The service may be temporarily unavailable.',
|
|
364
|
+
suggested_fix: 'Wait and retry. If the problem persists, check GitLab status page.',
|
|
365
365
|
gitlab_error: rawMessage,
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
368
|
return {
|
|
369
|
-
error_code:
|
|
369
|
+
error_code: 'API_ERROR',
|
|
370
370
|
tool,
|
|
371
371
|
action,
|
|
372
372
|
http_status: status,
|
|
373
373
|
message: rawMessage,
|
|
374
|
-
suggested_fix:
|
|
374
|
+
suggested_fix: 'Check the GitLab API documentation for this endpoint',
|
|
375
375
|
gitlab_error: rawMessage,
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
function createTierRestrictedError(tool, action, status, restriction) {
|
|
379
379
|
return {
|
|
380
|
-
error_code:
|
|
380
|
+
error_code: 'TIER_RESTRICTED',
|
|
381
381
|
tool,
|
|
382
382
|
action,
|
|
383
383
|
http_status: status,
|
|
@@ -390,16 +390,16 @@ function createTierRestrictedError(tool, action, status, restriction) {
|
|
|
390
390
|
: `Upgrade to GitLab ${restriction.requiredTier} to access this feature`,
|
|
391
391
|
alternatives: restriction.alternatives.length > 0 ? restriction.alternatives : undefined,
|
|
392
392
|
docs_url: restriction.docsUrl,
|
|
393
|
-
upgrade_url:
|
|
393
|
+
upgrade_url: 'https://about.gitlab.com/pricing/',
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
396
|
function createPermissionDeniedError(tool, action, status, rawMessage) {
|
|
397
|
-
const baseSuggestedFix =
|
|
398
|
-
const suggestedFix = rawMessage && rawMessage !==
|
|
397
|
+
const baseSuggestedFix = 'Check your access level for this project/group. Reporter access or higher may be required.';
|
|
398
|
+
const suggestedFix = rawMessage && rawMessage !== 'Unknown error' && !rawMessage.includes('403')
|
|
399
399
|
? `${baseSuggestedFix} GitLab message: ${rawMessage}`
|
|
400
400
|
: baseSuggestedFix;
|
|
401
401
|
return {
|
|
402
|
-
error_code:
|
|
402
|
+
error_code: 'PERMISSION_DENIED',
|
|
403
403
|
tool,
|
|
404
404
|
action,
|
|
405
405
|
http_status: status,
|
|
@@ -407,9 +407,9 @@ function createPermissionDeniedError(tool, action, status, rawMessage) {
|
|
|
407
407
|
suggested_fix: suggestedFix,
|
|
408
408
|
alternatives: [
|
|
409
409
|
{
|
|
410
|
-
action:
|
|
411
|
-
description:
|
|
412
|
-
available_on:
|
|
410
|
+
action: 'Verify your access level',
|
|
411
|
+
description: 'Check your role in the project settings or contact a project maintainer',
|
|
412
|
+
available_on: 'Free',
|
|
413
413
|
},
|
|
414
414
|
],
|
|
415
415
|
};
|
|
@@ -418,23 +418,23 @@ function createNotFoundError(tool, action, status, rawMessage) {
|
|
|
418
418
|
let resourceType;
|
|
419
419
|
let resourceId;
|
|
420
420
|
const lowerMessage = rawMessage.toLowerCase();
|
|
421
|
-
if (lowerMessage.includes(
|
|
422
|
-
resourceType =
|
|
421
|
+
if (lowerMessage.includes('project')) {
|
|
422
|
+
resourceType = 'project';
|
|
423
423
|
}
|
|
424
|
-
else if (lowerMessage.includes(
|
|
425
|
-
resourceType =
|
|
424
|
+
else if (lowerMessage.includes('merge request') || lowerMessage.includes('mr')) {
|
|
425
|
+
resourceType = 'merge_request';
|
|
426
426
|
}
|
|
427
|
-
else if (lowerMessage.includes(
|
|
428
|
-
resourceType =
|
|
427
|
+
else if (lowerMessage.includes('issue')) {
|
|
428
|
+
resourceType = 'issue';
|
|
429
429
|
}
|
|
430
|
-
else if (lowerMessage.includes(
|
|
431
|
-
resourceType =
|
|
430
|
+
else if (lowerMessage.includes('pipeline')) {
|
|
431
|
+
resourceType = 'pipeline';
|
|
432
432
|
}
|
|
433
|
-
else if (lowerMessage.includes(
|
|
434
|
-
resourceType =
|
|
433
|
+
else if (lowerMessage.includes('branch')) {
|
|
434
|
+
resourceType = 'branch';
|
|
435
435
|
}
|
|
436
|
-
else if (lowerMessage.includes(
|
|
437
|
-
resourceType =
|
|
436
|
+
else if (lowerMessage.includes('user')) {
|
|
437
|
+
resourceType = 'user';
|
|
438
438
|
}
|
|
439
439
|
const pathMatch = rawMessage.match(/['"]([a-zA-Z0-9_-]+(?:\/[a-zA-Z0-9_-]+)+)['"]/);
|
|
440
440
|
if (pathMatch) {
|
|
@@ -453,40 +453,40 @@ function createNotFoundError(tool, action, status, rawMessage) {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
return {
|
|
456
|
-
error_code:
|
|
456
|
+
error_code: 'NOT_FOUND',
|
|
457
457
|
tool,
|
|
458
458
|
action,
|
|
459
459
|
http_status: status,
|
|
460
460
|
message: "Resource not found or you don't have access to it",
|
|
461
|
-
suggested_fix:
|
|
461
|
+
suggested_fix: 'Verify the ID/path is correct and you have at least Reporter access to the project',
|
|
462
462
|
resource_type: resourceType,
|
|
463
463
|
resource_id: resourceId,
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
466
|
function createMissingFieldsError(tool, action, missingFields, actionRequiredFields) {
|
|
467
467
|
return {
|
|
468
|
-
error_code:
|
|
468
|
+
error_code: 'MISSING_REQUIRED_FIELD',
|
|
469
469
|
tool,
|
|
470
470
|
action,
|
|
471
|
-
message: `Missing required field(s): ${missingFields.join(
|
|
471
|
+
message: `Missing required field(s): ${missingFields.join(', ')}`,
|
|
472
472
|
missing_fields: missingFields,
|
|
473
|
-
suggested_fix: `Add required fields: ${missingFields.join(
|
|
473
|
+
suggested_fix: `Add required fields: ${missingFields.join(', ')}`,
|
|
474
474
|
action_required_fields: actionRequiredFields,
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
477
|
function createInvalidActionError(tool, action, validActions) {
|
|
478
478
|
return {
|
|
479
|
-
error_code:
|
|
479
|
+
error_code: 'INVALID_ACTION',
|
|
480
480
|
tool,
|
|
481
481
|
action,
|
|
482
|
-
message: `Invalid action '${action}'. Valid actions are: ${validActions.join(
|
|
483
|
-
suggested_fix: `Use one of the valid actions: ${validActions.join(
|
|
482
|
+
message: `Invalid action '${action}'. Valid actions are: ${validActions.join(', ')}`,
|
|
483
|
+
suggested_fix: `Use one of the valid actions: ${validActions.join(', ')}`,
|
|
484
484
|
valid_actions: validActions,
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
function createTypeMismatchError(tool, action, field, expected, received) {
|
|
488
488
|
return {
|
|
489
|
-
error_code:
|
|
489
|
+
error_code: 'TYPE_MISMATCH',
|
|
490
490
|
tool,
|
|
491
491
|
action,
|
|
492
492
|
message: `Type mismatch for field '${field}': expected ${expected}, got ${received}`,
|
|
@@ -496,19 +496,19 @@ function createTypeMismatchError(tool, action, field, expected, received) {
|
|
|
496
496
|
}
|
|
497
497
|
function createValidationError(tool, action, zodMessage) {
|
|
498
498
|
return {
|
|
499
|
-
error_code:
|
|
499
|
+
error_code: 'VALIDATION_ERROR',
|
|
500
500
|
tool,
|
|
501
501
|
action,
|
|
502
502
|
message: zodMessage,
|
|
503
|
-
suggested_fix:
|
|
503
|
+
suggested_fix: 'Check the tool documentation for correct parameter format',
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
506
|
function createTimeoutError(tool, action, timeoutMs, retryable = false) {
|
|
507
507
|
const retryHint = retryable
|
|
508
|
-
?
|
|
509
|
-
:
|
|
508
|
+
? ' This is a read-only operation - you can safely retry.'
|
|
509
|
+
: ' This is a write operation - check if it completed before retrying.';
|
|
510
510
|
return {
|
|
511
|
-
error_code:
|
|
511
|
+
error_code: 'TIMEOUT',
|
|
512
512
|
tool,
|
|
513
513
|
action,
|
|
514
514
|
timeout_ms: timeoutMs,
|
|
@@ -536,7 +536,7 @@ function createVersionRestrictedError(tool, action, widget, parameter, requiredV
|
|
|
536
536
|
suggestedFix = `Upgrade GitLab to version ${requiredVersion} or higher to use the '${parameter}' parameter`;
|
|
537
537
|
}
|
|
538
538
|
return {
|
|
539
|
-
error_code:
|
|
539
|
+
error_code: 'VERSION_RESTRICTED',
|
|
540
540
|
tool,
|
|
541
541
|
action,
|
|
542
542
|
widget,
|
|
@@ -547,7 +547,7 @@ function createVersionRestrictedError(tool, action, widget, parameter, requiredV
|
|
|
547
547
|
current_tier: isTierInsufficient ? currentTier : undefined,
|
|
548
548
|
message,
|
|
549
549
|
suggested_fix: suggestedFix,
|
|
550
|
-
docs_url:
|
|
550
|
+
docs_url: 'https://docs.gitlab.com/ee/user/project/work_items/',
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function parseGitLabApiError(errorMessage) {
|
|
@@ -555,8 +555,8 @@ function parseGitLabApiError(errorMessage) {
|
|
|
555
555
|
if (!match)
|
|
556
556
|
return null;
|
|
557
557
|
const status = parseInt(match[1], 10);
|
|
558
|
-
const statusText = match[2]?.trim() ??
|
|
559
|
-
const details = match[3]?.trim() ??
|
|
558
|
+
const statusText = match[2]?.trim() ?? '';
|
|
559
|
+
const details = match[3]?.trim() ?? '';
|
|
560
560
|
let message;
|
|
561
561
|
if (statusText && details) {
|
|
562
562
|
message = `${status} ${statusText} - ${details}`;
|
|
@@ -580,7 +580,7 @@ class StructuredToolError extends Error {
|
|
|
580
580
|
structuredError;
|
|
581
581
|
constructor(structuredError) {
|
|
582
582
|
super(structuredError.message);
|
|
583
|
-
this.name =
|
|
583
|
+
this.name = 'StructuredToolError';
|
|
584
584
|
this.structuredError = structuredError;
|
|
585
585
|
if (Error.captureStackTrace) {
|
|
586
586
|
Error.captureStackTrace(this, StructuredToolError);
|