@structured-world/gitlab-mcp 13.1.0 → 13.2.0
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 +18 -6
- package/README.md.in +16 -4
- package/dist/src/channel-gateway/forwarding.js +5 -0
- package/dist/src/channel-gateway/forwarding.js.map +1 -1
- package/dist/src/cli/inject-tool-refs.d.ts +6 -18
- package/dist/src/cli/inject-tool-refs.js +8 -71
- package/dist/src/cli/inject-tool-refs.js.map +1 -1
- package/dist/src/cli/install/types.js +23 -3
- package/dist/src/cli/install/types.js.map +1 -1
- package/dist/src/cli/list-tools.js +3 -56
- package/dist/src/cli/list-tools.js.map +1 -1
- package/dist/src/cli/tool-catalog.d.ts +35 -0
- package/dist/src/cli/tool-catalog.js +112 -0
- package/dist/src/cli/tool-catalog.js.map +1 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.js +3 -2
- package/dist/src/config.js.map +1 -1
- package/dist/src/configuration/groups.js +1 -0
- package/dist/src/configuration/groups.js.map +1 -1
- package/dist/src/configuration/namespace-capabilities.d.ts +10 -0
- package/dist/src/configuration/namespace-capabilities.js +105 -0
- package/dist/src/configuration/namespace-capabilities.js.map +1 -0
- package/dist/src/configuration/scoped-execution.js +53 -39
- package/dist/src/configuration/scoped-execution.js.map +1 -1
- package/dist/src/entities/context/whoami.js +2 -1
- package/dist/src/entities/context/whoami.js.map +1 -1
- package/dist/src/entities/duo/access.d.ts +14 -0
- package/dist/src/entities/duo/access.js +70 -0
- package/dist/src/entities/duo/access.js.map +1 -0
- package/dist/src/entities/duo/commands.d.ts +8 -0
- package/dist/src/entities/duo/commands.js +159 -0
- package/dist/src/entities/duo/commands.js.map +1 -0
- package/dist/src/entities/duo/discovery.d.ts +56 -0
- package/dist/src/entities/duo/discovery.js +159 -0
- package/dist/src/entities/duo/discovery.js.map +1 -0
- package/dist/src/entities/duo/legacy-goal-context.d.ts +9 -0
- package/dist/src/entities/duo/legacy-goal-context.js +134 -0
- package/dist/src/entities/duo/legacy-goal-context.js.map +1 -0
- package/dist/src/entities/duo/queries.d.ts +40 -0
- package/dist/src/entities/duo/queries.js +114 -0
- package/dist/src/entities/duo/queries.js.map +1 -0
- package/dist/src/entities/duo/registry.d.ts +3 -0
- package/dist/src/entities/duo/registry.js +70 -0
- package/dist/src/entities/duo/registry.js.map +1 -0
- package/dist/src/entities/duo/schema.d.ts +35 -0
- package/dist/src/entities/duo/schema.js +108 -0
- package/dist/src/entities/duo/schema.js.map +1 -0
- package/dist/src/entities/duo/sessions.d.ts +10 -0
- package/dist/src/entities/duo/sessions.js +205 -0
- package/dist/src/entities/duo/sessions.js.map +1 -0
- package/dist/src/entities/instance-version.d.ts +1 -1
- package/dist/src/entities/pipelines/schema-readonly.d.ts +3 -3
- package/dist/src/entities/workitems/registry.js +6 -2
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/graphql/client.d.ts +1 -1
- package/dist/src/graphql/client.js +5 -2
- package/dist/src/graphql/client.js.map +1 -1
- package/dist/src/handlers.js +41 -6
- package/dist/src/handlers.js.map +1 -1
- package/dist/src/oauth/types.d.ts +1 -2
- package/dist/src/plugin/panel.d.ts +2 -1
- package/dist/src/plugin/panel.js +3 -2
- package/dist/src/plugin/panel.js.map +1 -1
- package/dist/src/plugin/server.js +108 -24
- package/dist/src/plugin/server.js.map +1 -1
- package/dist/src/profiles/applicator.js +1 -0
- package/dist/src/profiles/applicator.js.map +1 -1
- package/dist/src/profiles/builtin/admin.yaml +1 -0
- package/dist/src/profiles/builtin/ci.yaml +1 -0
- package/dist/src/profiles/builtin/code-reviewer.yaml +1 -0
- package/dist/src/profiles/builtin/developer.yaml +1 -0
- package/dist/src/profiles/builtin/devops.yaml +1 -0
- package/dist/src/profiles/builtin/full-access.yaml +1 -0
- package/dist/src/profiles/builtin/gitlab-com.yaml +1 -0
- package/dist/src/profiles/builtin/junior-dev.yaml +1 -0
- package/dist/src/profiles/builtin/pm.yaml +1 -0
- package/dist/src/profiles/builtin/readonly.yaml +1 -0
- package/dist/src/profiles/builtin/security.yaml +1 -0
- package/dist/src/profiles/builtin/senior-dev.yaml +1 -0
- package/dist/src/profiles/builtin/team-lead.yaml +1 -0
- package/dist/src/profiles/types.d.ts +6 -0
- package/dist/src/profiles/types.js +1 -0
- package/dist/src/profiles/types.js.map +1 -1
- package/dist/src/registry-manager.d.ts +8 -2
- package/dist/src/registry-manager.js +88 -56
- package/dist/src/registry-manager.js.map +1 -1
- package/dist/src/services/ConnectionManager.d.ts +7 -3
- package/dist/src/services/ConnectionManager.js +16 -2
- package/dist/src/services/ConnectionManager.js.map +1 -1
- package/dist/src/services/GitLabVersionDetector.d.ts +1 -1
- package/dist/src/services/GitLabVersionDetector.js +2 -2
- package/dist/src/services/GitLabVersionDetector.js.map +1 -1
- package/dist/src/services/InstanceCapabilities.d.ts +3 -2
- package/dist/src/services/InstanceCapabilities.js +11 -7
- package/dist/src/services/InstanceCapabilities.js.map +1 -1
- package/dist/src/services/NamespaceTierDetector.d.ts +3 -4
- package/dist/src/services/NamespaceTierDetector.js +146 -209
- package/dist/src/services/NamespaceTierDetector.js.map +1 -1
- package/dist/src/services/TokenScopeDetector.js +2 -0
- package/dist/src/services/TokenScopeDetector.js.map +1 -1
- package/dist/src/services/WidgetAvailability.d.ts +1 -1
- package/dist/src/services/WidgetAvailability.js +6 -11
- package/dist/src/services/WidgetAvailability.js.map +1 -1
- package/dist/src/services/namespace-tier-context.d.ts +9 -0
- package/dist/src/services/namespace-tier-context.js +19 -0
- package/dist/src/services/namespace-tier-context.js.map +1 -0
- package/dist/src/types.d.ts +2 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/bounded-json.d.ts +6 -0
- package/dist/src/utils/bounded-json.js +39 -0
- package/dist/src/utils/bounded-json.js.map +1 -0
- package/dist/src/utils/error-handler.js +16 -5
- package/dist/src/utils/error-handler.js.map +1 -1
- package/dist/src/utils/gitlab-api.d.ts +2 -0
- package/dist/src/utils/gitlab-api.js +9 -3
- package/dist/src/utils/gitlab-api.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +33 -18
- package/skills/gitlab-duo/SKILL.md +41 -0
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@structured-world/gitlab-mcp) [](https://www.npmjs.com/package/@structured-world/gitlab-mcp) [](https://github.com/structured-world/gitlab-mcp/blob/HEAD/LICENSE) [](https://github.com/structured-world/gitlab-mcp/actions) [](https://codecov.io/gh/structured-world/gitlab-mcp) [](https://gitlab-mcp.sw.foundation/coverage/)
|
|
4
4
|
|
|
5
|
-
Advanced GitLab MCP server:
|
|
5
|
+
Advanced GitLab MCP server: 66 tools across 27 registry groups, including 60 CQRS tools with 241 typed actions and 6 setup helpers. The tool catalog and parameters are filtered to each instance's GitLab version, tier, and token scopes, so the agent sees only what the connected instance actually supports.
|
|
6
6
|
|
|
7
|
-
[](https://gitlab-mcp.sw.foundation/downloads/gitlab-mcp-13.
|
|
7
|
+
[](https://gitlab-mcp.sw.foundation/downloads/gitlab-mcp-13.2.0.mcpb)
|
|
8
8
|
[](https://gitlab-mcp.sw.foundation/guide/installation/codex#install-from-a-release)
|
|
9
9
|
[](vscode:mcp/install?%7B%22name%22%3A%22gitlab-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40structured-world%2Fgitlab-mcp%22%5D%7D)
|
|
10
10
|
[](vscode-insiders:mcp/install?%7B%22name%22%3A%22gitlab-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40structured-world%2Fgitlab-mcp%22%5D%7D)
|
|
@@ -35,8 +35,16 @@ This is a monorepo with two npm packages:
|
|
|
35
35
|
|
|
36
36
|
**Requirements:** Node.js >= 24
|
|
37
37
|
|
|
38
|
+
## GitLab Duo sessions
|
|
39
|
+
|
|
40
|
+
GitLab Duo sessions are also supported: discover agents and flows, inspect
|
|
41
|
+
progress and outputs, and explicitly start or answer asynchronous CI sessions.
|
|
42
|
+
Commands can consume credits and change GitLab. See the
|
|
43
|
+
[Duo session guide](https://gitlab-mcp.sw.foundation/guides/duo-sessions).
|
|
44
|
+
|
|
38
45
|
## Supported clients
|
|
39
46
|
|
|
47
|
+
|
|
40
48
|
| Client | Setup |
|
|
41
49
|
|--------|-------|
|
|
42
50
|
| **Codex (CLI and desktop)** | [Configurable local plugin, local MCP registration or HTTP server](https://gitlab-mcp.sw.foundation/guide/installation/codex) |
|
|
@@ -78,7 +86,7 @@ for all setup guides.
|
|
|
78
86
|
|
|
79
87
|
## Highlights
|
|
80
88
|
|
|
81
|
-
- **
|
|
89
|
+
- **66 tools** across 27 registry groups: projects, merge requests, pipelines, work items, wiki, and more
|
|
82
90
|
- **CQRS architecture** — `browse_*` for queries, `manage_*` for commands
|
|
83
91
|
- **Connection resilience** — Bounded startup, auto-reconnect with exponential backoff, disconnected mode when GitLab is unreachable
|
|
84
92
|
- **Multi-instance support** — Connect to GitLab.com, self-managed, and self-hosted instances with per-instance OAuth and rate limiting; one connection can link several accounts, such as a company GitLab and a personal GitLab.com account, and each chat switches between them
|
|
@@ -93,8 +101,12 @@ for all setup guides.
|
|
|
93
101
|
|
|
94
102
|
GitLab exposes hundreds of API operations. Giving each its own MCP tool floods an
|
|
95
103
|
agent's context; a thin API wrapper pushes that complexity back onto the agent. This
|
|
96
|
-
server takes a third path:
|
|
97
|
-
actions,
|
|
104
|
+
server takes a third path: 60 CQRS tools expose 241 typed
|
|
105
|
+
actions, with 6 additional helpers for account, connection and settings work.
|
|
106
|
+
The complete catalog contains 66 tools across 27 registry groups.
|
|
107
|
+
This total includes core and account/context tools. Settings expose a different
|
|
108
|
+
set of configurable tool groups: core and context tools are always available,
|
|
109
|
+
and CI job tokens and deploy keys share one switch.
|
|
98
110
|
|
|
99
111
|
- `browse_*` tools are read-only queries; `manage_*` tools are writes.
|
|
100
112
|
- Sub-resources fold into actions rather than new tools — `browse_pipelines` covers
|
|
@@ -119,7 +131,7 @@ Full documentation is available at **[gitlab-mcp.sw.foundation](https://gitlab-m
|
|
|
119
131
|
| [Installation](https://gitlab-mcp.sw.foundation/guide/installation/npm) | npm, Docker, VS Code, Codex |
|
|
120
132
|
| [Configuration](https://gitlab-mcp.sw.foundation/guide/configuration) | Environment variables, feature flags |
|
|
121
133
|
| [Multi-Instance](https://gitlab-mcp.sw.foundation/guide/multi-instance) | Connect to multiple GitLab instances |
|
|
122
|
-
| [Tool Reference](https://gitlab-mcp.sw.foundation/tools/) | All
|
|
134
|
+
| [Tool Reference](https://gitlab-mcp.sw.foundation/tools/) | All 66 tools with parameters |
|
|
123
135
|
| [OAuth Setup](https://gitlab-mcp.sw.foundation/security/oauth) | Team authentication with Claude |
|
|
124
136
|
| [TLS/HTTPS](https://gitlab-mcp.sw.foundation/advanced/tls) | Production deployment with SSL |
|
|
125
137
|
| [Customization](https://gitlab-mcp.sw.foundation/advanced/customization) | Tool descriptions, action filtering |
|
package/README.md.in
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@structured-world/gitlab-mcp) [](https://www.npmjs.com/package/@structured-world/gitlab-mcp) [](__REPO_BASE__/LICENSE) [](https://github.com/structured-world/gitlab-mcp/actions) [](https://codecov.io/gh/structured-world/gitlab-mcp) [](https://gitlab-mcp.sw.foundation/coverage/)
|
|
4
4
|
|
|
5
|
-
Advanced GitLab MCP server: __TOOL_COUNT__ CQRS tools
|
|
5
|
+
Advanced GitLab MCP server: __TOOL_COUNT__ tools across __TOOL_GROUP_COUNT__ registry groups, including __CQRS_TOOL_COUNT__ CQRS tools with __ACTION_COUNT__ typed actions and __HELPER_TOOL_COUNT__ setup helpers. The tool catalog and parameters are filtered to each instance's GitLab version, tier, and token scopes, so the agent sees only what the connected instance actually supports.
|
|
6
6
|
|
|
7
7
|
[](https://gitlab-mcp.sw.foundation/downloads/gitlab-mcp-__VERSION__.mcpb)
|
|
8
8
|
[](https://gitlab-mcp.sw.foundation/guide/installation/codex#install-from-a-release)
|
|
@@ -35,8 +35,16 @@ This is a monorepo with two npm packages:
|
|
|
35
35
|
|
|
36
36
|
**Requirements:** Node.js >= 24
|
|
37
37
|
|
|
38
|
+
## GitLab Duo sessions
|
|
39
|
+
|
|
40
|
+
GitLab Duo sessions are also supported: discover agents and flows, inspect
|
|
41
|
+
progress and outputs, and explicitly start or answer asynchronous CI sessions.
|
|
42
|
+
Commands can consume credits and change GitLab. See the
|
|
43
|
+
[Duo session guide](https://gitlab-mcp.sw.foundation/guides/duo-sessions).
|
|
44
|
+
|
|
38
45
|
## Supported clients
|
|
39
46
|
|
|
47
|
+
|
|
40
48
|
| Client | Setup |
|
|
41
49
|
|--------|-------|
|
|
42
50
|
| **Codex (CLI and desktop)** | [Configurable local plugin, local MCP registration or HTTP server](https://gitlab-mcp.sw.foundation/guide/installation/codex) |
|
|
@@ -78,7 +86,7 @@ for all setup guides.
|
|
|
78
86
|
|
|
79
87
|
## Highlights
|
|
80
88
|
|
|
81
|
-
- **__TOOL_COUNT__ tools** across
|
|
89
|
+
- **__TOOL_COUNT__ tools** across __TOOL_GROUP_COUNT__ registry groups: projects, merge requests, pipelines, work items, wiki, and more
|
|
82
90
|
- **CQRS architecture** — `browse_*` for queries, `manage_*` for commands
|
|
83
91
|
- **Connection resilience** — Bounded startup, auto-reconnect with exponential backoff, disconnected mode when GitLab is unreachable
|
|
84
92
|
- **Multi-instance support** — Connect to GitLab.com, self-managed, and self-hosted instances with per-instance OAuth and rate limiting; one connection can link several accounts, such as a company GitLab and a personal GitLab.com account, and each chat switches between them
|
|
@@ -93,8 +101,12 @@ for all setup guides.
|
|
|
93
101
|
|
|
94
102
|
GitLab exposes hundreds of API operations. Giving each its own MCP tool floods an
|
|
95
103
|
agent's context; a thin API wrapper pushes that complexity back onto the agent. This
|
|
96
|
-
server takes a third path:
|
|
97
|
-
actions,
|
|
104
|
+
server takes a third path: __CQRS_TOOL_COUNT__ CQRS tools expose __ACTION_COUNT__ typed
|
|
105
|
+
actions, with __HELPER_TOOL_COUNT__ additional helpers for account, connection and settings work.
|
|
106
|
+
The complete catalog contains __TOOL_COUNT__ tools across __TOOL_GROUP_COUNT__ registry groups.
|
|
107
|
+
This total includes core and account/context tools. Settings expose a different
|
|
108
|
+
set of configurable tool groups: core and context tools are always available,
|
|
109
|
+
and CI job tokens and deploy keys share one switch.
|
|
98
110
|
|
|
99
111
|
- `browse_*` tools are read-only queries; `manage_*` tools are writes.
|
|
100
112
|
- Sub-resources fold into actions rather than new tools — `browse_pipelines` covers
|
|
@@ -17,6 +17,11 @@ async function forwardWithPolicy(policy, name, args) {
|
|
|
17
17
|
return await policy.call(name, args);
|
|
18
18
|
}
|
|
19
19
|
catch (err) {
|
|
20
|
+
if (name === 'manage_duo_session' && err instanceof DownstreamDisconnectedError) {
|
|
21
|
+
err.message =
|
|
22
|
+
'Duo mutation outcome is unknown. Inspect browse_duo_sessions list or get before another command. Do not automatically replay the write.';
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
20
25
|
if (policy.isRead(name) && err instanceof DownstreamDisconnectedError) {
|
|
21
26
|
await policy.waitForConnection();
|
|
22
27
|
return await policy.call(name, args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forwarding.js","sourceRoot":"","sources":["../../../src/channel-gateway/forwarding.ts"],"names":[],"mappings":";;;AA0CA,
|
|
1
|
+
{"version":3,"file":"forwarding.js","sourceRoot":"","sources":["../../../src/channel-gateway/forwarding.ts"],"names":[],"mappings":";;;AA0CA,8CAwBC;AAGD,gCAEC;AAxDD,MAAa,2BAA4B,SAAQ,KAAK;IACpD,YAAY,KAAc;QACxB,KAAK,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;CACF;AAJD,kEAIC;AAuBM,KAAK,UAAU,iBAAiB,CACrC,MAAqB,EACrB,IAAY,EACZ,IAAa;IAGb,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;QAC1B,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;IACnC,CAAC;IACD,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,KAAK,oBAAoB,IAAI,GAAG,YAAY,2BAA2B,EAAE,CAAC;YAChF,GAAG,CAAC,OAAO;gBACT,yIAAyI,CAAC;YAC5I,MAAM,GAAG,CAAC;QACZ,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,YAAY,2BAA2B,EAAE,CAAC;YACtE,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;YACjC,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAGD,SAAgB,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -1,36 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
type?: string;
|
|
4
|
-
properties?: Record<string, JsonSchemaProperty>;
|
|
5
|
-
oneOf?: JsonSchemaProperty[];
|
|
6
|
-
enum?: unknown[];
|
|
7
|
-
const?: unknown;
|
|
8
|
-
description?: string;
|
|
9
|
-
[key: string]: unknown;
|
|
10
|
-
}
|
|
11
|
-
interface ActionInfo {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
2
|
+
import { type JsonSchemaProperty, type ActionInfo } from './tool-catalog.js';
|
|
15
3
|
interface MarkerMatch {
|
|
16
4
|
toolName: string;
|
|
17
5
|
startIdx: number;
|
|
18
6
|
endIdx: number;
|
|
19
7
|
}
|
|
20
|
-
declare function extractActions(schema: JsonSchemaProperty): ActionInfo[];
|
|
21
8
|
declare function generateActionsTable(actions: ActionInfo[]): string;
|
|
22
9
|
declare function findMarkers(content: string): MarkerMatch[];
|
|
23
10
|
declare function processFile(filePath: string, toolSchemas: Map<string, JsonSchemaProperty>, content?: string): boolean;
|
|
24
11
|
interface Placeholders {
|
|
25
12
|
toolCount: number;
|
|
26
|
-
|
|
13
|
+
toolGroupCount: number;
|
|
14
|
+
cqrsToolCount: number;
|
|
15
|
+
helperToolCount: number;
|
|
27
16
|
readonlyToolCount: number;
|
|
28
17
|
actionCount: number;
|
|
29
18
|
version: string;
|
|
30
19
|
}
|
|
31
20
|
declare function replacePlaceholders(filePath: string, placeholders: Placeholders): boolean;
|
|
32
|
-
declare function countEntities(projectRoot: string): number;
|
|
33
21
|
declare function getVersion(projectRoot: string): string;
|
|
34
22
|
export declare function main(): void;
|
|
35
|
-
export {
|
|
36
|
-
export type {
|
|
23
|
+
export { generateActionsTable, findMarkers, processFile, replacePlaceholders, getVersion };
|
|
24
|
+
export type { MarkerMatch, Placeholders };
|
|
@@ -35,62 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.main = main;
|
|
38
|
-
exports.extractActions = extractActions;
|
|
39
38
|
exports.generateActionsTable = generateActionsTable;
|
|
40
39
|
exports.findMarkers = findMarkers;
|
|
41
40
|
exports.processFile = processFile;
|
|
42
41
|
exports.replacePlaceholders = replacePlaceholders;
|
|
43
|
-
exports.countEntities = countEntities;
|
|
44
42
|
exports.getVersion = getVersion;
|
|
45
43
|
const fs = __importStar(require("fs"));
|
|
46
44
|
const path = __importStar(require("path"));
|
|
47
|
-
const
|
|
48
|
-
const ACTION_DESCRIPTIONS = {
|
|
49
|
-
list: 'List items with filtering and pagination',
|
|
50
|
-
get: 'Get a single item by ID',
|
|
51
|
-
create: 'Create a new item',
|
|
52
|
-
update: 'Update an existing item',
|
|
53
|
-
delete: 'Delete an item',
|
|
54
|
-
search: 'Search for items',
|
|
55
|
-
diffs: 'Get file changes/diffs',
|
|
56
|
-
compare: 'Compare two branches or commits',
|
|
57
|
-
merge: 'Merge a merge request',
|
|
58
|
-
approve: 'Approve a merge request',
|
|
59
|
-
unapprove: 'Remove approval from a merge request',
|
|
60
|
-
cancel: 'Cancel a running operation',
|
|
61
|
-
retry: 'Retry a failed operation',
|
|
62
|
-
play: 'Run a manual job',
|
|
63
|
-
publish: 'Publish draft notes',
|
|
64
|
-
resolve: 'Resolve a discussion thread',
|
|
65
|
-
disable: 'Disable the integration',
|
|
66
|
-
test: 'Test a webhook',
|
|
67
|
-
};
|
|
68
|
-
function extractActions(schema) {
|
|
69
|
-
const actions = [];
|
|
70
|
-
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
71
|
-
for (const branch of schema.oneOf) {
|
|
72
|
-
const actionProp = branch.properties?.action;
|
|
73
|
-
const actionName = actionProp?.const;
|
|
74
|
-
if (actionName) {
|
|
75
|
-
const description = actionProp?.description ??
|
|
76
|
-
ACTION_DESCRIPTIONS[actionName] ??
|
|
77
|
-
`Perform ${actionName} operation`;
|
|
78
|
-
actions.push({ name: actionName, description });
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return actions;
|
|
82
|
-
}
|
|
83
|
-
const actionProp = schema.properties?.action;
|
|
84
|
-
if (actionProp?.enum && Array.isArray(actionProp.enum)) {
|
|
85
|
-
for (const actionName of actionProp.enum) {
|
|
86
|
-
if (typeof actionName === 'string') {
|
|
87
|
-
const description = ACTION_DESCRIPTIONS[actionName] ?? `Perform ${actionName} operation`;
|
|
88
|
-
actions.push({ name: actionName, description });
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return actions;
|
|
93
|
-
}
|
|
45
|
+
const tool_catalog_js_1 = require("./tool-catalog.js");
|
|
94
46
|
function generateActionsTable(actions) {
|
|
95
47
|
const lines = [];
|
|
96
48
|
lines.push('| Action | Description |');
|
|
@@ -135,7 +87,7 @@ function processFile(filePath, toolSchemas, content) {
|
|
|
135
87
|
throw new Error(`Unknown tool "${marker.toolName}" in ${filePath}. ` +
|
|
136
88
|
`Available tools: ${Array.from(toolSchemas.keys()).sort().join(', ')}`);
|
|
137
89
|
}
|
|
138
|
-
const actions = extractActions(schema);
|
|
90
|
+
const actions = (0, tool_catalog_js_1.extractActions)(schema);
|
|
139
91
|
if (actions.length === 0) {
|
|
140
92
|
throw new Error(`Tool "${marker.toolName}" has no extractable actions in ${filePath}`);
|
|
141
93
|
}
|
|
@@ -156,7 +108,9 @@ function replacePlaceholders(filePath, placeholders) {
|
|
|
156
108
|
const result = content
|
|
157
109
|
.replace(/__TOOL_COUNT__/g, String(placeholders.toolCount))
|
|
158
110
|
.replace(/__ACTION_COUNT__/g, String(placeholders.actionCount))
|
|
159
|
-
.
|
|
111
|
+
.replaceAll('__TOOL_GROUP_COUNT__', String(placeholders.toolGroupCount))
|
|
112
|
+
.replaceAll('__CQRS_TOOL_COUNT__', String(placeholders.cqrsToolCount))
|
|
113
|
+
.replaceAll('__HELPER_TOOL_COUNT__', String(placeholders.helperToolCount))
|
|
160
114
|
.replace(/__READONLY_TOOL_COUNT__/g, String(placeholders.readonlyToolCount))
|
|
161
115
|
.replace(/__VERSION__/g, placeholders.version);
|
|
162
116
|
if (result !== content) {
|
|
@@ -165,15 +119,6 @@ function replacePlaceholders(filePath, placeholders) {
|
|
|
165
119
|
}
|
|
166
120
|
return false;
|
|
167
121
|
}
|
|
168
|
-
function countEntities(projectRoot) {
|
|
169
|
-
const entitiesDir = path.join(projectRoot, 'src', 'entities');
|
|
170
|
-
if (!fs.existsSync(entitiesDir))
|
|
171
|
-
return 0;
|
|
172
|
-
return fs
|
|
173
|
-
.readdirSync(entitiesDir, { withFileTypes: true })
|
|
174
|
-
.filter((d) => d.isDirectory() && fs.existsSync(path.join(entitiesDir, d.name, 'registry.ts')))
|
|
175
|
-
.length;
|
|
176
|
-
}
|
|
177
122
|
function getVersion(projectRoot) {
|
|
178
123
|
if (process.env.RELEASE_VERSION) {
|
|
179
124
|
return process.env.RELEASE_VERSION;
|
|
@@ -198,23 +143,15 @@ function main() {
|
|
|
198
143
|
console.error(`Error: docs/tools/ directory not found at ${docsToolsDir}`);
|
|
199
144
|
process.exit(1);
|
|
200
145
|
}
|
|
201
|
-
const
|
|
202
|
-
const allTools = registryManager.getAllToolDefinitionsUnfiltered();
|
|
146
|
+
const { tools: allTools, metrics } = (0, tool_catalog_js_1.loadToolCatalog)();
|
|
203
147
|
const toolSchemas = new Map();
|
|
204
148
|
for (const tool of allTools) {
|
|
205
149
|
toolSchemas.set(tool.name, tool.inputSchema);
|
|
206
150
|
}
|
|
207
|
-
const toolCount = allTools.length;
|
|
208
|
-
const entityCount = countEntities(projectRoot);
|
|
209
|
-
const readonlyToolCount = allTools.filter((t) => t.name.startsWith('browse_') || t.name === 'manage_context').length;
|
|
210
|
-
const actionCount = allTools.reduce((sum, t) => sum + extractActions(t.inputSchema).length, 0);
|
|
211
151
|
const version = getVersion(projectRoot);
|
|
212
|
-
console.log(`
|
|
152
|
+
console.log(` ${metrics.description}, ${metrics.readonlyToolCount} available in read-only mode, Version: ${version}`);
|
|
213
153
|
const placeholders = {
|
|
214
|
-
|
|
215
|
-
entityCount,
|
|
216
|
-
readonlyToolCount,
|
|
217
|
-
actionCount,
|
|
154
|
+
...metrics,
|
|
218
155
|
version,
|
|
219
156
|
};
|
|
220
157
|
const docsDir = path.join(projectRoot, 'docs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-tool-refs.js","sourceRoot":"","sources":["../../../src/cli/inject-tool-refs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"inject-tool-ref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pB,KAAK,MAAM,QAAQ,IAAI,OAAO,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACrC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;QAE9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAC7D,IAAI,QAAQ,EAAE,CAAC;gBACb,aAAa,EAAE,CAAC;gBAChB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;gBACrD,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,KAAK,OAAO,CAAC,MAAM,aAAa,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CACT,qBAAqB,WAAW,iBAAiB,OAAO,CAAC,MAAM,aAAa,aAAa,WAAW,CACrG,CAAC;AACJ,CAAC;AAOD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;IACpC,IAAI,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.INSTALLABLE_CLIENTS = exports.CLIENT_METADATA = void 0;
|
|
4
|
+
const ROO_SETTINGS_SUFFIX = 'Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json';
|
|
5
|
+
function rooConfigPath(platform) {
|
|
6
|
+
const appData = process.env.VSCODE_APPDATA;
|
|
7
|
+
if (appData)
|
|
8
|
+
return `${appData}/${ROO_SETTINGS_SUFFIX}`;
|
|
9
|
+
if (platform === 'darwin')
|
|
10
|
+
return `~/Library/Application Support/${ROO_SETTINGS_SUFFIX}`;
|
|
11
|
+
if (platform === 'win32')
|
|
12
|
+
return `%APPDATA%/${ROO_SETTINGS_SUFFIX}`;
|
|
13
|
+
const configHome = process.env.XDG_CONFIG_HOME;
|
|
14
|
+
if (configHome)
|
|
15
|
+
return `${configHome}/${ROO_SETTINGS_SUFFIX}`;
|
|
16
|
+
return `~/.config/${ROO_SETTINGS_SUFFIX}`;
|
|
17
|
+
}
|
|
4
18
|
exports.CLIENT_METADATA = {
|
|
5
19
|
'claude-desktop': {
|
|
6
20
|
name: 'Claude Desktop',
|
|
@@ -67,9 +81,15 @@ exports.CLIENT_METADATA = {
|
|
|
67
81
|
'roo-code': {
|
|
68
82
|
name: 'Roo Code',
|
|
69
83
|
configPaths: {
|
|
70
|
-
darwin
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
get darwin() {
|
|
85
|
+
return rooConfigPath('darwin');
|
|
86
|
+
},
|
|
87
|
+
get win32() {
|
|
88
|
+
return rooConfigPath('win32');
|
|
89
|
+
},
|
|
90
|
+
get linux() {
|
|
91
|
+
return rooConfigPath('linux');
|
|
92
|
+
},
|
|
73
93
|
},
|
|
74
94
|
supportsCliInstall: false,
|
|
75
95
|
detectionMethod: 'config-file',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cli/install/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cli/install/types.ts"],"names":[],"mappings":";;;AA2HA,MAAM,mBAAmB,GACvB,+EAA+E,CAAC;AAElF,SAAS,aAAa,CAAC,QAAsC;IAG3D,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC3C,IAAI,OAAO;QAAE,OAAO,GAAG,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACxD,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,iCAAiC,mBAAmB,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CAAqC;YAC7C,KAAK,EAAE,iDAAiD;YACxD,KAAK,EAAE,qCAAqC;SAC7C;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE;YACX,MAAM,EACJ,+GAA+G;YACjH,KAAK,EACH,2FAA2F;YAC7F,KAAK,EACH,2FAA2F;SAC9F;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,UAAU,EAAE;QACV,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,IAAI,MAAM;gBACR,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;YACjC,CAAC;YACD,IAAI,KAAK;gBACP,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;YACD,IAAI,KAAK;gBACP,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;SACF;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QAEb,WAAW,EAAE;YACX,MAAM,EAAE,sBAAsB;YAC9B,KAAK,EAAE,kCAAkC;YACzC,KAAK,EAAE,sBAAsB;SAC9B;QACD,kBAAkB,EAAE,IAAI;QACxB,UAAU,EAAE,OAAO;QACnB,eAAe,EAAE,aAAa;KAC/B;CACF,CAAC;AAKW,QAAA,mBAAmB,GAAwB;IACtD,gBAAgB;IAChB,aAAa;IACb,QAAQ;IACR,gBAAgB;IAChB,UAAU;IACV,OAAO;IACP,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -38,6 +38,7 @@ exports.main = main;
|
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
40
|
const registry_manager_1 = require("../registry-manager");
|
|
41
|
+
const tool_catalog_1 = require("./tool-catalog");
|
|
41
42
|
const InstanceCapabilities_1 = require("../services/InstanceCapabilities");
|
|
42
43
|
const profiles_1 = require("../profiles");
|
|
43
44
|
function parseArgs() {
|
|
@@ -368,60 +369,6 @@ function groupToolsByEntity(tools) {
|
|
|
368
369
|
}
|
|
369
370
|
return sortedGrouped;
|
|
370
371
|
}
|
|
371
|
-
const ACTION_DESCRIPTIONS = {
|
|
372
|
-
list: 'List items with filtering and pagination',
|
|
373
|
-
get: 'Get a single item by ID',
|
|
374
|
-
create: 'Create a new item',
|
|
375
|
-
update: 'Update an existing item',
|
|
376
|
-
delete: 'Delete an item',
|
|
377
|
-
search: 'Search for items',
|
|
378
|
-
diffs: 'Get file changes/diffs',
|
|
379
|
-
compare: 'Compare two branches or commits',
|
|
380
|
-
merge: 'Merge a merge request',
|
|
381
|
-
approve: 'Approve a merge request',
|
|
382
|
-
unapprove: 'Remove approval from a merge request',
|
|
383
|
-
rebase: 'Rebase a merge request',
|
|
384
|
-
cancel: 'Cancel a running operation',
|
|
385
|
-
retry: 'Retry a failed operation',
|
|
386
|
-
play: 'Run a manual job',
|
|
387
|
-
publish: 'Publish draft notes',
|
|
388
|
-
drafts: 'List draft notes',
|
|
389
|
-
draft: 'Get a single draft note',
|
|
390
|
-
resolve: 'Resolve a discussion thread',
|
|
391
|
-
unresolve: 'Unresolve a discussion thread',
|
|
392
|
-
note: 'Add a note/comment',
|
|
393
|
-
mark_done: 'Mark as done',
|
|
394
|
-
mark_pending: 'Mark as pending',
|
|
395
|
-
disable: 'Disable the integration',
|
|
396
|
-
test: 'Test a webhook',
|
|
397
|
-
read: 'Read item details',
|
|
398
|
-
};
|
|
399
|
-
function extractActions(schema) {
|
|
400
|
-
const actions = [];
|
|
401
|
-
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
402
|
-
for (const branch of schema.oneOf) {
|
|
403
|
-
const actionProp = branch.properties?.action;
|
|
404
|
-
const actionName = actionProp?.const;
|
|
405
|
-
if (actionName) {
|
|
406
|
-
const description = actionProp?.description ??
|
|
407
|
-
ACTION_DESCRIPTIONS[actionName] ??
|
|
408
|
-
`Perform ${actionName} operation`;
|
|
409
|
-
actions.push({ name: actionName, description });
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return actions;
|
|
413
|
-
}
|
|
414
|
-
const actionProp = schema.properties?.action;
|
|
415
|
-
if (actionProp?.enum && Array.isArray(actionProp.enum)) {
|
|
416
|
-
for (const actionName of actionProp.enum) {
|
|
417
|
-
if (typeof actionName === 'string') {
|
|
418
|
-
const description = ACTION_DESCRIPTIONS[actionName] ?? `Perform ${actionName} operation`;
|
|
419
|
-
actions.push({ name: actionName, description });
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
return actions;
|
|
424
|
-
}
|
|
425
372
|
function extractParameters(schema) {
|
|
426
373
|
if (!schema.properties)
|
|
427
374
|
return [];
|
|
@@ -525,7 +472,7 @@ function extractParametersGrouped(schema) {
|
|
|
525
472
|
}
|
|
526
473
|
function generateExample(schema) {
|
|
527
474
|
const example = {};
|
|
528
|
-
const actions = extractActions(schema);
|
|
475
|
+
const actions = (0, tool_catalog_1.extractActions)(schema);
|
|
529
476
|
if (actions.length > 0) {
|
|
530
477
|
example.action = actions[0].name;
|
|
531
478
|
}
|
|
@@ -662,7 +609,7 @@ function generateExportMarkdown(tools, options) {
|
|
|
662
609
|
lines.push('');
|
|
663
610
|
lines.push(tool.description);
|
|
664
611
|
lines.push('');
|
|
665
|
-
const actions = extractActions(tool.inputSchema);
|
|
612
|
+
const actions = (0, tool_catalog_1.extractActions)(tool.inputSchema);
|
|
666
613
|
if (actions.length > 0) {
|
|
667
614
|
lines.push('#### Actions');
|
|
668
615
|
lines.push('');
|