@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
|
@@ -55,17 +55,17 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
55
55
|
iid: workItem.iid,
|
|
56
56
|
title: workItem.title,
|
|
57
57
|
state: workItem.state,
|
|
58
|
-
workItemType: typeof workItem.workItemType ===
|
|
58
|
+
workItemType: typeof workItem.workItemType === 'string'
|
|
59
59
|
? workItem.workItemType
|
|
60
|
-
: workItem.workItemType?.name ||
|
|
60
|
+
: workItem.workItemType?.name || 'Unknown',
|
|
61
61
|
webUrl: workItem.webUrl,
|
|
62
62
|
createdAt: workItem.createdAt,
|
|
63
63
|
updatedAt: workItem.updatedAt,
|
|
64
64
|
};
|
|
65
|
-
if (workItem.description && typeof workItem.description ===
|
|
65
|
+
if (workItem.description && typeof workItem.description === 'string') {
|
|
66
66
|
simplified.description =
|
|
67
67
|
workItem.description.length > 200
|
|
68
|
-
? workItem.description.substring(0, 200) +
|
|
68
|
+
? workItem.description.substring(0, 200) + '...'
|
|
69
69
|
: workItem.description;
|
|
70
70
|
}
|
|
71
71
|
if (workItem.widgets && Array.isArray(workItem.widgets)) {
|
|
@@ -73,11 +73,11 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
73
73
|
for (const widget of workItem.widgets) {
|
|
74
74
|
const flexWidget = widget;
|
|
75
75
|
switch (flexWidget.type) {
|
|
76
|
-
case
|
|
76
|
+
case 'ASSIGNEES':
|
|
77
77
|
if (flexWidget.assignees?.nodes && flexWidget.assignees.nodes.length > 0) {
|
|
78
78
|
essentialWidgets.push({
|
|
79
|
-
type:
|
|
80
|
-
assignees: flexWidget.assignees.nodes.map(assignee => ({
|
|
79
|
+
type: 'ASSIGNEES',
|
|
80
|
+
assignees: flexWidget.assignees.nodes.map((assignee) => ({
|
|
81
81
|
id: assignee.id,
|
|
82
82
|
username: assignee.username,
|
|
83
83
|
name: assignee.name,
|
|
@@ -85,11 +85,11 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
break;
|
|
88
|
-
case
|
|
88
|
+
case 'LABELS':
|
|
89
89
|
if (flexWidget.labels?.nodes && flexWidget.labels.nodes.length > 0) {
|
|
90
90
|
essentialWidgets.push({
|
|
91
|
-
type:
|
|
92
|
-
labels: flexWidget.labels.nodes.map(label => ({
|
|
91
|
+
type: 'LABELS',
|
|
92
|
+
labels: flexWidget.labels.nodes.map((label) => ({
|
|
93
93
|
id: label.id,
|
|
94
94
|
title: label.title,
|
|
95
95
|
color: label.color,
|
|
@@ -97,10 +97,10 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
break;
|
|
100
|
-
case
|
|
100
|
+
case 'MILESTONE':
|
|
101
101
|
if (flexWidget.milestone) {
|
|
102
102
|
essentialWidgets.push({
|
|
103
|
-
type:
|
|
103
|
+
type: 'MILESTONE',
|
|
104
104
|
milestone: {
|
|
105
105
|
id: flexWidget.milestone.id,
|
|
106
106
|
title: flexWidget.milestone.title,
|
|
@@ -109,10 +109,10 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
break;
|
|
112
|
-
case
|
|
112
|
+
case 'HIERARCHY':
|
|
113
113
|
if (flexWidget.parent || flexWidget.hasChildren) {
|
|
114
114
|
essentialWidgets.push({
|
|
115
|
-
type:
|
|
115
|
+
type: 'HIERARCHY',
|
|
116
116
|
parent: flexWidget.parent
|
|
117
117
|
? {
|
|
118
118
|
id: flexWidget.parent.id,
|
|
@@ -125,28 +125,28 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
break;
|
|
128
|
-
case
|
|
128
|
+
case 'TIME_TRACKING':
|
|
129
129
|
if (flexWidget.timeEstimate !== undefined || flexWidget.totalTimeSpent !== undefined) {
|
|
130
130
|
essentialWidgets.push({
|
|
131
|
-
type:
|
|
131
|
+
type: 'TIME_TRACKING',
|
|
132
132
|
timeEstimate: flexWidget.timeEstimate,
|
|
133
133
|
totalTimeSpent: flexWidget.totalTimeSpent,
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
break;
|
|
137
|
-
case
|
|
137
|
+
case 'VERIFICATION_STATUS':
|
|
138
138
|
if (flexWidget.verificationStatus) {
|
|
139
139
|
essentialWidgets.push({
|
|
140
|
-
type:
|
|
140
|
+
type: 'VERIFICATION_STATUS',
|
|
141
141
|
verificationStatus: flexWidget.verificationStatus,
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
break;
|
|
145
|
-
case
|
|
145
|
+
case 'TEST_REPORTS':
|
|
146
146
|
if (flexWidget.testReports?.nodes && flexWidget.testReports.nodes.length > 0) {
|
|
147
147
|
essentialWidgets.push({
|
|
148
|
-
type:
|
|
149
|
-
testReports: flexWidget.testReports.nodes.map(report => ({
|
|
148
|
+
type: 'TEST_REPORTS',
|
|
149
|
+
testReports: flexWidget.testReports.nodes.map((report) => ({
|
|
150
150
|
id: report.id,
|
|
151
151
|
state: report.state,
|
|
152
152
|
createdAt: report.createdAt,
|
|
@@ -165,19 +165,19 @@ const simplifyWorkItem = (workItem, simple) => {
|
|
|
165
165
|
};
|
|
166
166
|
exports.workitemsToolRegistry = new Map([
|
|
167
167
|
[
|
|
168
|
-
|
|
168
|
+
'browse_work_items',
|
|
169
169
|
{
|
|
170
|
-
name:
|
|
171
|
-
description:
|
|
170
|
+
name: 'browse_work_items',
|
|
171
|
+
description: 'Find and inspect issues, epics, tasks, and other work items. Actions: list (groups return epics, projects return issues/tasks, filter by type/state/labels), get (by numeric ID or namespace+iid from URL path). Related: manage_work_item to create/update/delete.',
|
|
172
172
|
inputSchema: z.toJSONSchema(schema_readonly_1.BrowseWorkItemsSchema),
|
|
173
|
-
gate: { envVar:
|
|
173
|
+
gate: { envVar: 'USE_WORKITEMS', defaultValue: true },
|
|
174
174
|
handler: async (args) => {
|
|
175
175
|
const input = schema_readonly_1.BrowseWorkItemsSchema.parse(args);
|
|
176
|
-
if ((0, config_1.isActionDenied)(
|
|
176
|
+
if ((0, config_1.isActionDenied)('browse_work_items', input.action)) {
|
|
177
177
|
throw new Error(`Action '${input.action}' is not allowed for browse_work_items tool`);
|
|
178
178
|
}
|
|
179
179
|
switch (input.action) {
|
|
180
|
-
case
|
|
180
|
+
case 'list': {
|
|
181
181
|
const { namespace, types, state, first, after, simple } = input;
|
|
182
182
|
const namespacePath = namespace;
|
|
183
183
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
@@ -208,7 +208,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
208
208
|
endCursor: pageInfo.endCursor ?? null,
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
case
|
|
211
|
+
case 'get': {
|
|
212
212
|
const { namespace, iid, id } = input;
|
|
213
213
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
214
214
|
const client = connectionManager.getClient();
|
|
@@ -223,7 +223,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
223
223
|
return (0, idConversion_1.cleanWorkItemResponse)(response.namespace.workItem);
|
|
224
224
|
}
|
|
225
225
|
else if (id !== undefined) {
|
|
226
|
-
const workItemGid = (0, idConversion_1.toGid)(id,
|
|
226
|
+
const workItemGid = (0, idConversion_1.toGid)(id, 'WorkItem');
|
|
227
227
|
const response = await client.request(workItems_1.GET_WORK_ITEM, { id: workItemGid });
|
|
228
228
|
if (!response.workItem) {
|
|
229
229
|
throw new Error(`Work item with ID "${id}" not found`);
|
|
@@ -241,19 +241,19 @@ exports.workitemsToolRegistry = new Map([
|
|
|
241
241
|
},
|
|
242
242
|
],
|
|
243
243
|
[
|
|
244
|
-
|
|
244
|
+
'manage_work_item',
|
|
245
245
|
{
|
|
246
|
-
name:
|
|
247
|
-
description:
|
|
246
|
+
name: 'manage_work_item',
|
|
247
|
+
description: 'Create, update, delete, or link work items (issues, epics, tasks). Actions: create (epics need GROUP namespace, issues/tasks need PROJECT), update (widgets: dates, time tracking, weight, iterations, health, progress, hierarchy), delete (permanent), delete_timelog (remove a time tracking entry by its global ID), add_link/remove_link (BLOCKS/BLOCKED_BY/RELATED). Related: browse_work_items for discovery.',
|
|
248
248
|
inputSchema: z.toJSONSchema(schema_1.ManageWorkItemSchema),
|
|
249
|
-
gate: { envVar:
|
|
249
|
+
gate: { envVar: 'USE_WORKITEMS', defaultValue: true },
|
|
250
250
|
handler: async (args) => {
|
|
251
251
|
const input = schema_1.ManageWorkItemSchema.parse(args);
|
|
252
|
-
if ((0, config_1.isActionDenied)(
|
|
252
|
+
if ((0, config_1.isActionDenied)('manage_work_item', input.action)) {
|
|
253
253
|
throw new Error(`Action '${input.action}' is not allowed for manage_work_item tool`);
|
|
254
254
|
}
|
|
255
255
|
switch (input.action) {
|
|
256
|
-
case
|
|
256
|
+
case 'create': {
|
|
257
257
|
const { namespace, title, workItemType, description, assigneeIds, labelIds, milestoneId, startDate, dueDate, parentId, childrenIds, timeEstimate, isFixed, weight, iterationId, progressCurrentValue, healthStatus, color, } = input;
|
|
258
258
|
const namespacePath = namespace;
|
|
259
259
|
const workItemTitle = title;
|
|
@@ -281,15 +281,15 @@ exports.workitemsToolRegistry = new Map([
|
|
|
281
281
|
}
|
|
282
282
|
const validationFailure = WidgetAvailability_1.WidgetAvailability.validateWidgetParams(widgetParams);
|
|
283
283
|
if (validationFailure) {
|
|
284
|
-
throw new error_handler_1.StructuredToolError((0, error_handler_1.createVersionRestrictedError)(
|
|
284
|
+
throw new error_handler_1.StructuredToolError((0, error_handler_1.createVersionRestrictedError)('manage_work_item', 'create', validationFailure.widget, validationFailure.parameter, validationFailure.requiredVersion, validationFailure.detectedVersion, (0, error_handler_1.normalizeTier)(validationFailure.requiredTier), (0, error_handler_1.normalizeTier)(validationFailure.currentTier)));
|
|
285
285
|
}
|
|
286
286
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
287
287
|
const client = connectionManager.getClient();
|
|
288
288
|
const workItemTypes = await (0, workItemTypes_1.getWorkItemTypes)(namespacePath);
|
|
289
|
-
const workItemTypeObj = workItemTypes.find((t) => t.name.toUpperCase().replace(/\s+/g,
|
|
290
|
-
workItemTypeName.toUpperCase().replace(/\s+/g,
|
|
289
|
+
const workItemTypeObj = workItemTypes.find((t) => t.name.toUpperCase().replace(/\s+/g, '_') ===
|
|
290
|
+
workItemTypeName.toUpperCase().replace(/\s+/g, '_'));
|
|
291
291
|
if (!workItemTypeObj) {
|
|
292
|
-
throw new Error(`Work item type "${workItemTypeName}" not found in namespace "${namespacePath}". Available types: ${workItemTypes.map(t => t.name).join(
|
|
292
|
+
throw new Error(`Work item type "${workItemTypeName}" not found in namespace "${namespacePath}". Available types: ${workItemTypes.map((t) => t.name).join(', ')}`);
|
|
293
293
|
}
|
|
294
294
|
const createInput = {
|
|
295
295
|
namespacePath,
|
|
@@ -300,13 +300,13 @@ exports.workitemsToolRegistry = new Map([
|
|
|
300
300
|
createInput.description = description;
|
|
301
301
|
}
|
|
302
302
|
if (assigneeIds !== undefined && assigneeIds.length > 0) {
|
|
303
|
-
createInput.assigneesWidget = { assigneeIds: (0, idConversion_1.toGids)(assigneeIds,
|
|
303
|
+
createInput.assigneesWidget = { assigneeIds: (0, idConversion_1.toGids)(assigneeIds, 'User') };
|
|
304
304
|
}
|
|
305
305
|
if (labelIds !== undefined && labelIds.length > 0) {
|
|
306
|
-
createInput.labelsWidget = { labelIds: (0, idConversion_1.toGids)(labelIds,
|
|
306
|
+
createInput.labelsWidget = { labelIds: (0, idConversion_1.toGids)(labelIds, 'Label') };
|
|
307
307
|
}
|
|
308
308
|
if (milestoneId !== undefined) {
|
|
309
|
-
createInput.milestoneWidget = { milestoneId: (0, idConversion_1.toGid)(milestoneId,
|
|
309
|
+
createInput.milestoneWidget = { milestoneId: (0, idConversion_1.toGid)(milestoneId, 'Milestone') };
|
|
310
310
|
}
|
|
311
311
|
if (startDate !== undefined || dueDate !== undefined || isFixed !== undefined) {
|
|
312
312
|
createInput.startAndDueDateWidget = {};
|
|
@@ -320,10 +320,10 @@ exports.workitemsToolRegistry = new Map([
|
|
|
320
320
|
if (parentId !== undefined || (childrenIds !== undefined && childrenIds.length > 0)) {
|
|
321
321
|
createInput.hierarchyWidget = {};
|
|
322
322
|
if (parentId !== undefined) {
|
|
323
|
-
createInput.hierarchyWidget.parentId = (0, idConversion_1.toGid)(parentId,
|
|
323
|
+
createInput.hierarchyWidget.parentId = (0, idConversion_1.toGid)(parentId, 'WorkItem');
|
|
324
324
|
}
|
|
325
325
|
if (childrenIds !== undefined && childrenIds.length > 0) {
|
|
326
|
-
createInput.hierarchyWidget.childrenIds = (0, idConversion_1.toGids)(childrenIds,
|
|
326
|
+
createInput.hierarchyWidget.childrenIds = (0, idConversion_1.toGids)(childrenIds, 'WorkItem');
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
if (weight !== undefined) {
|
|
@@ -331,7 +331,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
331
331
|
}
|
|
332
332
|
if (iterationId !== undefined) {
|
|
333
333
|
createInput.iterationWidget = {
|
|
334
|
-
iterationId: (0, idConversion_1.toGid)(iterationId,
|
|
334
|
+
iterationId: (0, idConversion_1.toGid)(iterationId, 'Iteration'),
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
if (healthStatus !== undefined) {
|
|
@@ -348,10 +348,10 @@ exports.workitemsToolRegistry = new Map([
|
|
|
348
348
|
});
|
|
349
349
|
if (response.workItemCreate?.errors?.length &&
|
|
350
350
|
response.workItemCreate.errors.length > 0) {
|
|
351
|
-
throw new Error(`GitLab GraphQL errors: ${response.workItemCreate.errors.join(
|
|
351
|
+
throw new Error(`GitLab GraphQL errors: ${response.workItemCreate.errors.join(', ')}`);
|
|
352
352
|
}
|
|
353
353
|
if (!response.workItemCreate?.workItem) {
|
|
354
|
-
throw new Error(
|
|
354
|
+
throw new Error('Work item creation failed - no work item returned');
|
|
355
355
|
}
|
|
356
356
|
const createdWorkItem = response.workItemCreate.workItem;
|
|
357
357
|
if (timeEstimate !== undefined) {
|
|
@@ -369,11 +369,11 @@ exports.workitemsToolRegistry = new Map([
|
|
|
369
369
|
return {
|
|
370
370
|
...cleanedResult,
|
|
371
371
|
_warning: {
|
|
372
|
-
message:
|
|
372
|
+
message: 'Work item created successfully, but some properties could not be applied',
|
|
373
373
|
failedProperties: {
|
|
374
374
|
timeEstimate: {
|
|
375
375
|
requestedValue: timeEstimate,
|
|
376
|
-
error: updateResponse.workItemUpdate.errors.join(
|
|
376
|
+
error: updateResponse.workItemUpdate.errors.join(', '),
|
|
377
377
|
},
|
|
378
378
|
},
|
|
379
379
|
},
|
|
@@ -386,11 +386,11 @@ exports.workitemsToolRegistry = new Map([
|
|
|
386
386
|
return {
|
|
387
387
|
...cleanedResult,
|
|
388
388
|
_warning: {
|
|
389
|
-
message:
|
|
389
|
+
message: 'Work item created successfully, but some properties could not be applied',
|
|
390
390
|
failedProperties: {
|
|
391
391
|
timeEstimate: {
|
|
392
392
|
requestedValue: timeEstimate,
|
|
393
|
-
error:
|
|
393
|
+
error: 'Time estimate update returned no work item',
|
|
394
394
|
},
|
|
395
395
|
},
|
|
396
396
|
},
|
|
@@ -401,13 +401,13 @@ exports.workitemsToolRegistry = new Map([
|
|
|
401
401
|
return {
|
|
402
402
|
...cleanedResult,
|
|
403
403
|
_warning: {
|
|
404
|
-
message:
|
|
404
|
+
message: 'Work item created successfully, but some properties could not be applied',
|
|
405
405
|
failedProperties: {
|
|
406
406
|
timeEstimate: {
|
|
407
407
|
requestedValue: timeEstimate,
|
|
408
408
|
error: updateError instanceof Error
|
|
409
409
|
? updateError.message
|
|
410
|
-
:
|
|
410
|
+
: 'Unknown error applying time estimate',
|
|
411
411
|
},
|
|
412
412
|
},
|
|
413
413
|
},
|
|
@@ -416,16 +416,16 @@ exports.workitemsToolRegistry = new Map([
|
|
|
416
416
|
}
|
|
417
417
|
return (0, idConversion_1.cleanWorkItemResponse)(createdWorkItem);
|
|
418
418
|
}
|
|
419
|
-
case
|
|
419
|
+
case 'update': {
|
|
420
420
|
const { id, title, description, state, assigneeIds, labelIds, addLabelIds, removeLabelIds, milestoneId, startDate, dueDate, parentId, childrenIds, timeEstimate, timeSpent, timeSpentAt, timeSpentSummary, isFixed, weight, iterationId, progressCurrentValue, healthStatus, color, verificationStatus, linkType, targetId, } = input;
|
|
421
421
|
const workItemId = id;
|
|
422
422
|
if ((linkType !== undefined) !== (targetId !== undefined)) {
|
|
423
|
-
throw new Error(
|
|
423
|
+
throw new Error('Both linkType and targetId must be provided together to create a linked item relationship');
|
|
424
424
|
}
|
|
425
425
|
if (labelIds !== undefined &&
|
|
426
426
|
(addLabelIds !== undefined || removeLabelIds !== undefined)) {
|
|
427
|
-
throw new Error(
|
|
428
|
-
|
|
427
|
+
throw new Error('labelIds (replace all) cannot be used together with addLabelIds or removeLabelIds. ' +
|
|
428
|
+
'Use labelIds to set exact labels, or use addLabelIds/removeLabelIds for incremental changes.');
|
|
429
429
|
}
|
|
430
430
|
const widgetParams = {
|
|
431
431
|
description,
|
|
@@ -452,11 +452,11 @@ exports.workitemsToolRegistry = new Map([
|
|
|
452
452
|
};
|
|
453
453
|
const validationFailure = WidgetAvailability_1.WidgetAvailability.validateWidgetParams(widgetParams);
|
|
454
454
|
if (validationFailure) {
|
|
455
|
-
throw new error_handler_1.StructuredToolError((0, error_handler_1.createVersionRestrictedError)(
|
|
455
|
+
throw new error_handler_1.StructuredToolError((0, error_handler_1.createVersionRestrictedError)('manage_work_item', 'update', validationFailure.widget, validationFailure.parameter, validationFailure.requiredVersion, validationFailure.detectedVersion, (0, error_handler_1.normalizeTier)(validationFailure.requiredTier), (0, error_handler_1.normalizeTier)(validationFailure.currentTier)));
|
|
456
456
|
}
|
|
457
457
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
458
458
|
const client = connectionManager.getClient();
|
|
459
|
-
const workItemGid = (0, idConversion_1.toGid)(workItemId,
|
|
459
|
+
const workItemGid = (0, idConversion_1.toGid)(workItemId, 'WorkItem');
|
|
460
460
|
const updateInput = { id: workItemGid };
|
|
461
461
|
if (title !== undefined)
|
|
462
462
|
updateInput.title = title;
|
|
@@ -466,16 +466,16 @@ exports.workitemsToolRegistry = new Map([
|
|
|
466
466
|
updateInput.descriptionWidget = { description };
|
|
467
467
|
}
|
|
468
468
|
if (assigneeIds !== undefined) {
|
|
469
|
-
updateInput.assigneesWidget = { assigneeIds: (0, idConversion_1.toGids)(assigneeIds,
|
|
469
|
+
updateInput.assigneesWidget = { assigneeIds: (0, idConversion_1.toGids)(assigneeIds, 'User') };
|
|
470
470
|
}
|
|
471
471
|
if (labelIds !== undefined) {
|
|
472
472
|
const currentWorkItem = await client.request(workItems_1.GET_WORK_ITEM, { id: workItemGid });
|
|
473
473
|
const currentLabels = (currentWorkItem.workItem?.widgets || [])
|
|
474
|
-
.find(w => w.type ===
|
|
475
|
-
?.labels?.nodes?.map(l => l.id) ?? [];
|
|
476
|
-
const newLabelGids = (0, idConversion_1.toGids)(labelIds,
|
|
477
|
-
const labelsToRemove = currentLabels.filter(id => !newLabelGids.includes(id));
|
|
478
|
-
const labelsToAdd = newLabelGids.filter(id => !currentLabels.includes(id));
|
|
474
|
+
.find((w) => w.type === 'LABELS')
|
|
475
|
+
?.labels?.nodes?.map((l) => l.id) ?? [];
|
|
476
|
+
const newLabelGids = (0, idConversion_1.toGids)(labelIds, 'Label');
|
|
477
|
+
const labelsToRemove = currentLabels.filter((id) => !newLabelGids.includes(id));
|
|
478
|
+
const labelsToAdd = newLabelGids.filter((id) => !currentLabels.includes(id));
|
|
479
479
|
if (labelsToRemove.length > 0 || labelsToAdd.length > 0) {
|
|
480
480
|
updateInput.labelsWidget = {};
|
|
481
481
|
if (labelsToRemove.length > 0) {
|
|
@@ -489,22 +489,22 @@ exports.workitemsToolRegistry = new Map([
|
|
|
489
489
|
else if (addLabelIds !== undefined || removeLabelIds !== undefined) {
|
|
490
490
|
updateInput.labelsWidget = {};
|
|
491
491
|
if (addLabelIds !== undefined && addLabelIds.length > 0) {
|
|
492
|
-
updateInput.labelsWidget.addLabelIds = (0, idConversion_1.toGids)(addLabelIds,
|
|
492
|
+
updateInput.labelsWidget.addLabelIds = (0, idConversion_1.toGids)(addLabelIds, 'Label');
|
|
493
493
|
}
|
|
494
494
|
if (removeLabelIds !== undefined && removeLabelIds.length > 0) {
|
|
495
|
-
updateInput.labelsWidget.removeLabelIds = (0, idConversion_1.toGids)(removeLabelIds,
|
|
495
|
+
updateInput.labelsWidget.removeLabelIds = (0, idConversion_1.toGids)(removeLabelIds, 'Label');
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
if (updateInput.labelsWidget?.addLabelIds && updateInput.labelsWidget?.removeLabelIds) {
|
|
499
499
|
const addSet = new Set(updateInput.labelsWidget.addLabelIds);
|
|
500
500
|
const removeSet = new Set(updateInput.labelsWidget.removeLabelIds);
|
|
501
|
-
const intersection = [...addSet].filter(id => removeSet.has(id));
|
|
501
|
+
const intersection = [...addSet].filter((id) => removeSet.has(id));
|
|
502
502
|
if (intersection.length > 0) {
|
|
503
|
-
throw new Error(`Invalid label operation: cannot add and remove the same labels simultaneously: ${intersection.join(
|
|
503
|
+
throw new Error(`Invalid label operation: cannot add and remove the same labels simultaneously: ${intersection.join(', ')}`);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
if (milestoneId !== undefined) {
|
|
507
|
-
updateInput.milestoneWidget = { milestoneId: (0, idConversion_1.toGid)(milestoneId,
|
|
507
|
+
updateInput.milestoneWidget = { milestoneId: (0, idConversion_1.toGid)(milestoneId, 'Milestone') };
|
|
508
508
|
}
|
|
509
509
|
if (startDate !== undefined || dueDate !== undefined || isFixed !== undefined) {
|
|
510
510
|
updateInput.startAndDueDateWidget = {};
|
|
@@ -519,15 +519,15 @@ exports.workitemsToolRegistry = new Map([
|
|
|
519
519
|
updateInput.hierarchyWidget = {};
|
|
520
520
|
if (parentId !== undefined) {
|
|
521
521
|
updateInput.hierarchyWidget.parentId =
|
|
522
|
-
parentId === null ? null : (0, idConversion_1.toGid)(parentId,
|
|
522
|
+
parentId === null ? null : (0, idConversion_1.toGid)(parentId, 'WorkItem');
|
|
523
523
|
}
|
|
524
524
|
if (childrenIds !== undefined && childrenIds.length > 0) {
|
|
525
|
-
updateInput.hierarchyWidget.childrenIds = (0, idConversion_1.toGids)(childrenIds,
|
|
525
|
+
updateInput.hierarchyWidget.childrenIds = (0, idConversion_1.toGids)(childrenIds, 'WorkItem');
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
if ((timeSpentAt !== undefined || timeSpentSummary !== undefined) &&
|
|
529
529
|
timeSpent === undefined) {
|
|
530
|
-
throw new Error(
|
|
530
|
+
throw new Error('timeSpentAt and timeSpentSummary require timeSpent to be specified (they are timelog entry properties)');
|
|
531
531
|
}
|
|
532
532
|
if (timeEstimate !== undefined || timeSpent !== undefined) {
|
|
533
533
|
updateInput.timeTrackingWidget = {};
|
|
@@ -547,7 +547,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
547
547
|
}
|
|
548
548
|
if (iterationId !== undefined) {
|
|
549
549
|
updateInput.iterationWidget = {
|
|
550
|
-
iterationId: iterationId === null ? null : (0, idConversion_1.toGid)(iterationId,
|
|
550
|
+
iterationId: iterationId === null ? null : (0, idConversion_1.toGid)(iterationId, 'Iteration'),
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
if (healthStatus !== undefined) {
|
|
@@ -565,10 +565,10 @@ exports.workitemsToolRegistry = new Map([
|
|
|
565
565
|
const response = await client.request(workItems_1.UPDATE_WORK_ITEM, { input: updateInput });
|
|
566
566
|
if (response.workItemUpdate?.errors?.length &&
|
|
567
567
|
response.workItemUpdate.errors.length > 0) {
|
|
568
|
-
throw new Error(`GitLab GraphQL errors: ${response.workItemUpdate.errors.join(
|
|
568
|
+
throw new Error(`GitLab GraphQL errors: ${response.workItemUpdate.errors.join(', ')}`);
|
|
569
569
|
}
|
|
570
570
|
if (!response.workItemUpdate?.workItem) {
|
|
571
|
-
throw new Error(
|
|
571
|
+
throw new Error('Work item update failed - no work item returned');
|
|
572
572
|
}
|
|
573
573
|
const updatedWorkItem = response.workItemUpdate.workItem;
|
|
574
574
|
if (linkType !== undefined && targetId !== undefined) {
|
|
@@ -576,7 +576,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
576
576
|
const linkResponse = await client.request(workItems_1.WORK_ITEM_ADD_LINKED_ITEMS, {
|
|
577
577
|
input: {
|
|
578
578
|
id: workItemGid,
|
|
579
|
-
workItemsIds: [(0, idConversion_1.toGid)(targetId,
|
|
579
|
+
workItemsIds: [(0, idConversion_1.toGid)(targetId, 'WorkItem')],
|
|
580
580
|
linkType,
|
|
581
581
|
},
|
|
582
582
|
});
|
|
@@ -586,12 +586,12 @@ exports.workitemsToolRegistry = new Map([
|
|
|
586
586
|
return {
|
|
587
587
|
...cleanedResult,
|
|
588
588
|
_warning: {
|
|
589
|
-
message:
|
|
589
|
+
message: 'Work item updated successfully, but linked item could not be added',
|
|
590
590
|
failedProperties: {
|
|
591
591
|
linkedItem: {
|
|
592
592
|
targetId,
|
|
593
593
|
linkType,
|
|
594
|
-
error: linkResponse.workItemAddLinkedItems.errors.join(
|
|
594
|
+
error: linkResponse.workItemAddLinkedItems.errors.join(', '),
|
|
595
595
|
},
|
|
596
596
|
},
|
|
597
597
|
},
|
|
@@ -604,12 +604,12 @@ exports.workitemsToolRegistry = new Map([
|
|
|
604
604
|
return {
|
|
605
605
|
...cleanedResult,
|
|
606
606
|
_warning: {
|
|
607
|
-
message:
|
|
607
|
+
message: 'Work item updated successfully, but linked item could not be added',
|
|
608
608
|
failedProperties: {
|
|
609
609
|
linkedItem: {
|
|
610
610
|
targetId,
|
|
611
611
|
linkType,
|
|
612
|
-
error:
|
|
612
|
+
error: 'Add linked item returned no work item',
|
|
613
613
|
},
|
|
614
614
|
},
|
|
615
615
|
},
|
|
@@ -620,14 +620,14 @@ exports.workitemsToolRegistry = new Map([
|
|
|
620
620
|
return {
|
|
621
621
|
...cleanedResult,
|
|
622
622
|
_warning: {
|
|
623
|
-
message:
|
|
623
|
+
message: 'Work item updated successfully, but linked item could not be added',
|
|
624
624
|
failedProperties: {
|
|
625
625
|
linkedItem: {
|
|
626
626
|
targetId,
|
|
627
627
|
linkType,
|
|
628
628
|
error: linkError instanceof Error
|
|
629
629
|
? linkError.message
|
|
630
|
-
:
|
|
630
|
+
: 'Unknown error adding linked item',
|
|
631
631
|
},
|
|
632
632
|
},
|
|
633
633
|
},
|
|
@@ -636,69 +636,69 @@ exports.workitemsToolRegistry = new Map([
|
|
|
636
636
|
}
|
|
637
637
|
return (0, idConversion_1.cleanWorkItemResponse)(updatedWorkItem);
|
|
638
638
|
}
|
|
639
|
-
case
|
|
639
|
+
case 'delete': {
|
|
640
640
|
const workItemId = input.id;
|
|
641
641
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
642
642
|
const client = connectionManager.getClient();
|
|
643
|
-
const workItemGid = (0, idConversion_1.toGid)(workItemId,
|
|
643
|
+
const workItemGid = (0, idConversion_1.toGid)(workItemId, 'WorkItem');
|
|
644
644
|
const response = await client.request(workItems_1.DELETE_WORK_ITEM, { id: workItemGid });
|
|
645
645
|
if (response.workItemDelete?.errors?.length &&
|
|
646
646
|
response.workItemDelete.errors.length > 0) {
|
|
647
|
-
throw new Error(`GitLab GraphQL errors: ${response.workItemDelete.errors.join(
|
|
647
|
+
throw new Error(`GitLab GraphQL errors: ${response.workItemDelete.errors.join(', ')}`);
|
|
648
648
|
}
|
|
649
649
|
return { deleted: true };
|
|
650
650
|
}
|
|
651
|
-
case
|
|
651
|
+
case 'delete_timelog': {
|
|
652
652
|
const { timelogId } = input;
|
|
653
653
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
654
654
|
const client = connectionManager.getClient();
|
|
655
|
-
const timelogGid = (0, idConversion_1.toGid)(timelogId,
|
|
655
|
+
const timelogGid = (0, idConversion_1.toGid)(timelogId, 'Timelog');
|
|
656
656
|
const response = await client.request(workItems_1.TIMELOG_DELETE, { id: timelogGid });
|
|
657
657
|
if (response.timelogDelete?.errors?.length &&
|
|
658
658
|
response.timelogDelete.errors.length > 0) {
|
|
659
|
-
throw new Error(`GitLab GraphQL errors: ${response.timelogDelete.errors.join(
|
|
659
|
+
throw new Error(`GitLab GraphQL errors: ${response.timelogDelete.errors.join(', ')}`);
|
|
660
660
|
}
|
|
661
661
|
return {
|
|
662
662
|
deleted: true,
|
|
663
663
|
timelog: response.timelogDelete?.timelog ?? null,
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
case
|
|
666
|
+
case 'add_link': {
|
|
667
667
|
const { id, targetId, linkType } = input;
|
|
668
668
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
669
669
|
const client = connectionManager.getClient();
|
|
670
670
|
const response = await client.request(workItems_1.WORK_ITEM_ADD_LINKED_ITEMS, {
|
|
671
671
|
input: {
|
|
672
|
-
id: (0, idConversion_1.toGid)(id,
|
|
673
|
-
workItemsIds: [(0, idConversion_1.toGid)(targetId,
|
|
672
|
+
id: (0, idConversion_1.toGid)(id, 'WorkItem'),
|
|
673
|
+
workItemsIds: [(0, idConversion_1.toGid)(targetId, 'WorkItem')],
|
|
674
674
|
linkType,
|
|
675
675
|
},
|
|
676
676
|
});
|
|
677
677
|
if (response.workItemAddLinkedItems?.errors?.length &&
|
|
678
678
|
response.workItemAddLinkedItems.errors.length > 0) {
|
|
679
|
-
throw new Error(`GitLab GraphQL errors: ${response.workItemAddLinkedItems.errors.join(
|
|
679
|
+
throw new Error(`GitLab GraphQL errors: ${response.workItemAddLinkedItems.errors.join(', ')}`);
|
|
680
680
|
}
|
|
681
681
|
if (!response.workItemAddLinkedItems?.workItem) {
|
|
682
|
-
throw new Error(
|
|
682
|
+
throw new Error('Add linked item failed - no work item returned');
|
|
683
683
|
}
|
|
684
684
|
return (0, idConversion_1.cleanWorkItemResponse)(response.workItemAddLinkedItems.workItem);
|
|
685
685
|
}
|
|
686
|
-
case
|
|
686
|
+
case 'remove_link': {
|
|
687
687
|
const { id, targetId } = input;
|
|
688
688
|
const connectionManager = ConnectionManager_1.ConnectionManager.getInstance();
|
|
689
689
|
const client = connectionManager.getClient();
|
|
690
690
|
const response = await client.request(workItems_1.WORK_ITEM_REMOVE_LINKED_ITEMS, {
|
|
691
691
|
input: {
|
|
692
|
-
id: (0, idConversion_1.toGid)(id,
|
|
693
|
-
workItemsIds: [(0, idConversion_1.toGid)(targetId,
|
|
692
|
+
id: (0, idConversion_1.toGid)(id, 'WorkItem'),
|
|
693
|
+
workItemsIds: [(0, idConversion_1.toGid)(targetId, 'WorkItem')],
|
|
694
694
|
},
|
|
695
695
|
});
|
|
696
696
|
if (response.workItemRemoveLinkedItems?.errors?.length &&
|
|
697
697
|
response.workItemRemoveLinkedItems.errors.length > 0) {
|
|
698
|
-
throw new Error(`GitLab GraphQL errors: ${response.workItemRemoveLinkedItems.errors.join(
|
|
698
|
+
throw new Error(`GitLab GraphQL errors: ${response.workItemRemoveLinkedItems.errors.join(', ')}`);
|
|
699
699
|
}
|
|
700
700
|
if (!response.workItemRemoveLinkedItems?.workItem) {
|
|
701
|
-
throw new Error(
|
|
701
|
+
throw new Error('Remove linked item failed - no work item returned');
|
|
702
702
|
}
|
|
703
703
|
return (0, idConversion_1.cleanWorkItemResponse)(response.workItemRemoveLinkedItems.workItem);
|
|
704
704
|
}
|
|
@@ -710,7 +710,7 @@ exports.workitemsToolRegistry = new Map([
|
|
|
710
710
|
],
|
|
711
711
|
]);
|
|
712
712
|
function getWorkitemsReadOnlyToolNames() {
|
|
713
|
-
return [
|
|
713
|
+
return ['browse_work_items'];
|
|
714
714
|
}
|
|
715
715
|
function getWorkitemsToolDefinitions() {
|
|
716
716
|
return Array.from(exports.workitemsToolRegistry.values());
|
|
@@ -718,7 +718,7 @@ function getWorkitemsToolDefinitions() {
|
|
|
718
718
|
function getFilteredWorkitemsTools(readOnlyMode = false) {
|
|
719
719
|
if (readOnlyMode) {
|
|
720
720
|
const readOnlyNames = getWorkitemsReadOnlyToolNames();
|
|
721
|
-
return Array.from(exports.workitemsToolRegistry.values()).filter(tool => readOnlyNames.includes(tool.name));
|
|
721
|
+
return Array.from(exports.workitemsToolRegistry.values()).filter((tool) => readOnlyNames.includes(tool.name));
|
|
722
722
|
}
|
|
723
723
|
return getWorkitemsToolDefinitions();
|
|
724
724
|
}
|