@structured-world/gitlab-mcp 12.1.0 → 13.1.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 +21 -4
- package/README.md.in +18 -1
- package/dist/src/cli/plugin/build.d.ts +4 -1
- package/dist/src/cli/plugin/build.js +53 -10
- package/dist/src/cli/plugin/build.js.map +1 -1
- package/dist/src/cli/plugin/runtime.d.ts +1 -0
- package/dist/src/cli/plugin/runtime.js +79 -0
- package/dist/src/cli/plugin/runtime.js.map +1 -0
- package/dist/src/cli-utils.d.ts +0 -2
- package/dist/src/cli-utils.js +1 -5
- package/dist/src/cli-utils.js.map +1 -1
- package/dist/src/configuration/operator-ownership.js +1 -1
- package/dist/src/configuration/operator-ownership.js.map +1 -1
- package/dist/src/entities/workitems/registry.js +4 -1
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/entities/workitems/reorder.d.ts +3 -0
- package/dist/src/entities/workitems/reorder.js +115 -0
- package/dist/src/entities/workitems/reorder.js.map +1 -0
- package/dist/src/entities/workitems/schema.d.ts +13 -0
- package/dist/src/entities/workitems/schema.js +31 -0
- package/dist/src/entities/workitems/schema.js.map +1 -1
- package/dist/src/main.js +0 -4
- package/dist/src/main.js.map +1 -1
- package/dist/src/middleware/mcp-auth-routes.d.ts +2 -1
- package/dist/src/middleware/mcp-auth-routes.js +12 -0
- package/dist/src/middleware/mcp-auth-routes.js.map +1 -1
- package/dist/src/middleware/oauth-auth.d.ts +2 -2
- package/dist/src/middleware/oauth-auth.js +38 -34
- package/dist/src/middleware/oauth-auth.js.map +1 -1
- package/dist/src/middleware/rate-limiter.js +8 -4
- package/dist/src/middleware/rate-limiter.js.map +1 -1
- package/dist/src/plugin/authorization.d.ts +46 -0
- package/dist/src/plugin/authorization.js +235 -0
- package/dist/src/plugin/authorization.js.map +1 -0
- package/dist/src/plugin/connection-store.d.ts +59 -0
- package/dist/src/plugin/connection-store.js +171 -0
- package/dist/src/plugin/connection-store.js.map +1 -0
- package/dist/src/plugin/connections.d.ts +48 -0
- package/dist/src/plugin/connections.js +469 -0
- package/dist/src/plugin/connections.js.map +1 -0
- package/dist/src/plugin/core.d.ts +1 -0
- package/dist/src/plugin/core.js +11 -0
- package/dist/src/plugin/core.js.map +1 -0
- package/dist/src/plugin/main.d.ts +2 -0
- package/dist/src/plugin/main.js +38 -0
- package/dist/src/plugin/main.js.map +1 -0
- package/dist/src/plugin/panel.d.ts +12 -0
- package/dist/src/plugin/panel.js +38 -0
- package/dist/src/plugin/panel.js.map +1 -0
- package/dist/src/plugin/refresh-guard.d.ts +9 -0
- package/dist/src/plugin/refresh-guard.js +59 -0
- package/dist/src/plugin/refresh-guard.js.map +1 -0
- package/dist/src/plugin/server.d.ts +4 -0
- package/dist/src/plugin/server.js +280 -0
- package/dist/src/plugin/server.js.map +1 -0
- package/dist/src/server.d.ts +1 -0
- package/dist/src/server.js +15 -3
- package/dist/src/server.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -3
- package/skills/gitlab-setup/SKILL.md +7 -0
- package/dist/src/cli/plugin/command.d.ts +0 -4
- package/dist/src/cli/plugin/command.js +0 -89
- package/dist/src/cli/plugin/command.js.map +0 -1
- package/dist/src/cli/plugin/index.d.ts +0 -5
- package/dist/src/cli/plugin/index.js +0 -15
- package/dist/src/cli/plugin/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@structured-world/gitlab-mcp",
|
|
3
3
|
"mcpName": "io.github.structured-world/gitlab-mcp",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.1.0",
|
|
5
5
|
"description": "Advanced GitLab MCP server",
|
|
6
6
|
"mcp": {
|
|
7
7
|
"name": "GitLab MCP Server",
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"name": "manage_work_item",
|
|
310
|
-
"description": "Create, update, delete, or link work items (issues, epics, tasks).",
|
|
310
|
+
"description": "Create, update, delete, reorder, or link work items (issues, epics, tasks).",
|
|
311
311
|
"category": "Planning",
|
|
312
312
|
"tier": "free",
|
|
313
313
|
"readOnly": false
|
|
@@ -545,7 +545,10 @@
|
|
|
545
545
|
"role": "original author"
|
|
546
546
|
}
|
|
547
547
|
],
|
|
548
|
-
"bin":
|
|
548
|
+
"bin": {
|
|
549
|
+
"gitlab-mcp": "./dist/src/main.js",
|
|
550
|
+
"gitlab-mcp-plugin": "./dist/src/plugin/main.js"
|
|
551
|
+
},
|
|
549
552
|
"exports": {
|
|
550
553
|
"./storage-contract": {
|
|
551
554
|
"types": "./dist/src/contracts/storage.d.ts",
|
|
@@ -593,6 +596,7 @@
|
|
|
593
596
|
"test:env-gating": "node tests/scripts/test-env-gating.js",
|
|
594
597
|
"evaluate:skills": "node scripts/evaluate-skills.mjs",
|
|
595
598
|
"qualify:antigravity": "yarn build && node scripts/qualify-antigravity.mjs",
|
|
599
|
+
"qualify:codex-plugin": "yarn build && node scripts/qualify-codex-plugin.mjs",
|
|
596
600
|
"test:help": "printf '# Test Scripts\\n yarn test - Unit tests only (fast, safe default)\\n yarn test <pattern> - Unit tests matching pattern\\n yarn test:cov - Unit test coverage\\n yarn test:integration - Integration tests (needs .env.test)\\n yarn test:all - Full suite (unit + integration)\\n yarn test:env-gating - Test environment gating\\n'",
|
|
597
601
|
"cleanup:test-groups": "node scripts/cleanup-test-groups.js",
|
|
598
602
|
"cleanup:test-groups:dry-run": "node scripts/cleanup-test-groups.js --dry-run",
|
|
@@ -646,6 +650,7 @@
|
|
|
646
650
|
"@typescript-eslint/eslint-plugin": "^8.72.0",
|
|
647
651
|
"@typescript-eslint/parser": "^8.72.0",
|
|
648
652
|
"auto-changelog": "^2.7.0",
|
|
653
|
+
"c8": "12.0.0",
|
|
649
654
|
"cross-env": "^10.1.0",
|
|
650
655
|
"dotenv": "^18.0.9",
|
|
651
656
|
"eslint": "^10.13.0",
|
|
@@ -7,6 +7,13 @@ description: Diagnose a GitLab MCP connection, selected account, token permissio
|
|
|
7
7
|
|
|
8
8
|
Use the installed GitLab MCP tools; their prefix depends on the host and connection name. Discover the available catalog rather than assuming a fixed prefix. Keep the user's selected account and namespace. Do not request tokens, passwords, cookies, or client secrets in conversation.
|
|
9
9
|
|
|
10
|
+
If the catalog exposes `gitlab_plugin_open_connection`, use it for initial setup,
|
|
11
|
+
reconnect or a requested connection change. Its private panel accepts either a GitLab
|
|
12
|
+
address for local core execution or an existing HTTP MCP endpoint. Wait for a verified
|
|
13
|
+
identity and refresh discovery before using backend tools. Never pass credentials
|
|
14
|
+
through chat or call the app-only connection mutation tool on the user's behalf.
|
|
15
|
+
The backend's settings and authorization remain authoritative after connecting.
|
|
16
|
+
|
|
10
17
|
1. Call `manage_context` with `{"action":"show"}` to identify the host, read-only mode, preset and namespace scope. This works while GitLab is disconnected.
|
|
11
18
|
2. Call `manage_context` with `{"action":"whoami"}` when available to inspect the connected identity, token permissions, expiry, instance version/tier and warnings. Report only what the response proves. An unavailable diagnostic is not proof of an invalid credential.
|
|
12
19
|
3. Explain the concrete cause: connection failure, insufficient permission, read-only policy, disabled feature, denied action, or unsupported instance capability. Distinguish these from an empty successful query.
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { PluginBuildOptions } from './build';
|
|
2
|
-
export declare const PLUGIN_USAGE = "Usage: gitlab-mcp plugin build --endpoint <url> [options]\n\nBuilds the GitLab MCP plugin package for an MCP endpoint you operate.\n\nOptions:\n --endpoint <url> MCP endpoint, e.g. https://mcp.example.com/mcp (required)\n --out <dir> Output directory (default: ./gitlab-mcp-plugin)\n --public Apply directory submission rules: a public HTTPS host and\n the privacy and terms links are required\n --privacy-url <url> Privacy policy of the endpoint operator\n --terms-url <url> Terms of service of the endpoint operator\n";
|
|
3
|
-
export declare function parsePluginArgs(args: string[]): PluginBuildOptions;
|
|
4
|
-
export declare function runPluginCommand(args: string[], out?: (line: string) => void, err?: (line: string) => void): number;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLUGIN_USAGE = void 0;
|
|
4
|
-
exports.parsePluginArgs = parsePluginArgs;
|
|
5
|
-
exports.runPluginCommand = runPluginCommand;
|
|
6
|
-
const node_path_1 = require("node:path");
|
|
7
|
-
const build_1 = require("./build");
|
|
8
|
-
const listing_1 = require("./listing");
|
|
9
|
-
const validate_1 = require("./validate");
|
|
10
|
-
exports.PLUGIN_USAGE = `Usage: gitlab-mcp plugin build --endpoint <url> [options]
|
|
11
|
-
|
|
12
|
-
Builds the GitLab MCP plugin package for an MCP endpoint you operate.
|
|
13
|
-
|
|
14
|
-
Options:
|
|
15
|
-
--endpoint <url> MCP endpoint, e.g. https://mcp.example.com/mcp (required)
|
|
16
|
-
--out <dir> Output directory (default: ./gitlab-mcp-plugin)
|
|
17
|
-
--public Apply directory submission rules: a public HTTPS host and
|
|
18
|
-
the privacy and terms links are required
|
|
19
|
-
--privacy-url <url> Privacy policy of the endpoint operator
|
|
20
|
-
--terms-url <url> Terms of service of the endpoint operator
|
|
21
|
-
`;
|
|
22
|
-
function parsePluginArgs(args) {
|
|
23
|
-
if (args[0] !== 'build')
|
|
24
|
-
throw new Error(exports.PLUGIN_USAGE);
|
|
25
|
-
const options = {
|
|
26
|
-
flavor: 'private',
|
|
27
|
-
outDir: (0, node_path_1.resolve)('gitlab-mcp-plugin'),
|
|
28
|
-
};
|
|
29
|
-
const valueOf = (i, flag) => {
|
|
30
|
-
const value = args[i + 1];
|
|
31
|
-
if (value === undefined || value.startsWith('--'))
|
|
32
|
-
throw new Error(`${flag} needs a value`);
|
|
33
|
-
return value;
|
|
34
|
-
};
|
|
35
|
-
for (let i = 1; i < args.length; i++) {
|
|
36
|
-
const arg = args[i];
|
|
37
|
-
switch (arg) {
|
|
38
|
-
case '--endpoint':
|
|
39
|
-
options.endpoint = valueOf(i++, arg);
|
|
40
|
-
break;
|
|
41
|
-
case '--out':
|
|
42
|
-
options.outDir = (0, node_path_1.resolve)(valueOf(i++, arg));
|
|
43
|
-
break;
|
|
44
|
-
case '--privacy-url':
|
|
45
|
-
options.privacyPolicyUrl = valueOf(i++, arg);
|
|
46
|
-
break;
|
|
47
|
-
case '--terms-url':
|
|
48
|
-
options.termsOfServiceUrl = valueOf(i++, arg);
|
|
49
|
-
break;
|
|
50
|
-
case '--public':
|
|
51
|
-
options.flavor = 'public';
|
|
52
|
-
break;
|
|
53
|
-
default:
|
|
54
|
-
throw new Error(`Unknown option ${arg}\n\n${exports.PLUGIN_USAGE}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (!options.endpoint)
|
|
58
|
-
throw new Error(`--endpoint is required\n\n${exports.PLUGIN_USAGE}`);
|
|
59
|
-
return options;
|
|
60
|
-
}
|
|
61
|
-
function runPluginCommand(args, out = console.log, err = console.error) {
|
|
62
|
-
let options;
|
|
63
|
-
try {
|
|
64
|
-
options = parsePluginArgs(args);
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
err(error.message);
|
|
68
|
-
return 2;
|
|
69
|
-
}
|
|
70
|
-
try {
|
|
71
|
-
const result = (0, build_1.buildPlugin)(options);
|
|
72
|
-
out(`Built gitlab-mcp plugin ${result.version} for ${options.endpoint}`);
|
|
73
|
-
out(` Plugin folder: ${result.pluginDir}`);
|
|
74
|
-
out(` Marketplace: ${result.marketplacePath}`);
|
|
75
|
-
out(` ZIP: ${result.zipPath}`);
|
|
76
|
-
out(` SHA-256: ${result.sha256}`);
|
|
77
|
-
out('');
|
|
78
|
-
out(options.flavor === 'public'
|
|
79
|
-
? 'Upload the ZIP in the OpenAI platform dashboard to submit it to the Plugins Directory.'
|
|
80
|
-
: `Add the marketplace with: codex plugin marketplace add "${options.outDir}"\n` +
|
|
81
|
-
`then install ${listing_1.LISTING.displayName} from the Plugins Directory.`);
|
|
82
|
-
return 0;
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
err(error instanceof validate_1.PluginValidationError ? error.message : `Error: ${error.message}`);
|
|
86
|
-
return 1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/cli/plugin/command.ts"],"names":[],"mappings":";;;AAuBA,0CAmCC;AAGD,4CAiCC;AA1FD,yCAAoC;AACpC,mCAA0D;AAC1D,uCAAoC;AACpC,yCAAmD;AAEtC,QAAA,YAAY,GAAG;;;;;;;;;;;CAW3B,CAAC;AAGF,SAAgB,eAAe,CAAC,IAAc;IAC5C,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAY,CAAC,CAAC;IACvD,MAAM,OAAO,GAA2E;QACtF,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,IAAA,mBAAO,EAAC,mBAAmB,CAAC;KACrC,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,IAAY,EAAU,EAAE;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,gBAAgB,CAAC,CAAC;QAC5F,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,QAAQ,GAAG,EAAE,CAAC;YACZ,KAAK,YAAY;gBACf,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;gBACrC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GAAG,CAAC,oBAAoB,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;QAClD,GAAG,CAAC,oBAAoB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,GAAG,CAAC,oBAAoB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,GAAG,CAAC,EAAE,CAAC,CAAC;QACR,GAAG,CACD,OAAO,CAAC,MAAM,KAAK,QAAQ;YACzB,CAAC,CAAC,wFAAwF;YAC1F,CAAC,CAAC,2DAA2D,OAAO,CAAC,MAAM,KAAK;gBAC5E,gBAAgB,iBAAO,CAAC,WAAW,8BAA8B,CACxE,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CACD,KAAK,YAAY,gCAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAW,KAAe,CAAC,OAAO,EAAE,CAC9F,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { buildPlugin, findPackageRoot } from './build';
|
|
2
|
-
export type { PluginBuildOptions, PluginBuildResult } from './build';
|
|
3
|
-
export { parsePluginArgs, runPluginCommand, PLUGIN_USAGE } from './command';
|
|
4
|
-
export { validateEndpoint, validatePackage, PluginValidationError } from './validate';
|
|
5
|
-
export type { PluginFlavor } from './validate';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PluginValidationError = exports.validatePackage = exports.validateEndpoint = exports.PLUGIN_USAGE = exports.runPluginCommand = exports.parsePluginArgs = exports.findPackageRoot = exports.buildPlugin = void 0;
|
|
4
|
-
var build_1 = require("./build");
|
|
5
|
-
Object.defineProperty(exports, "buildPlugin", { enumerable: true, get: function () { return build_1.buildPlugin; } });
|
|
6
|
-
Object.defineProperty(exports, "findPackageRoot", { enumerable: true, get: function () { return build_1.findPackageRoot; } });
|
|
7
|
-
var command_1 = require("./command");
|
|
8
|
-
Object.defineProperty(exports, "parsePluginArgs", { enumerable: true, get: function () { return command_1.parsePluginArgs; } });
|
|
9
|
-
Object.defineProperty(exports, "runPluginCommand", { enumerable: true, get: function () { return command_1.runPluginCommand; } });
|
|
10
|
-
Object.defineProperty(exports, "PLUGIN_USAGE", { enumerable: true, get: function () { return command_1.PLUGIN_USAGE; } });
|
|
11
|
-
var validate_1 = require("./validate");
|
|
12
|
-
Object.defineProperty(exports, "validateEndpoint", { enumerable: true, get: function () { return validate_1.validateEndpoint; } });
|
|
13
|
-
Object.defineProperty(exports, "validatePackage", { enumerable: true, get: function () { return validate_1.validatePackage; } });
|
|
14
|
-
Object.defineProperty(exports, "PluginValidationError", { enumerable: true, get: function () { return validate_1.PluginValidationError; } });
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/plugin/index.ts"],"names":[],"mappings":";;;AAAA,iCAAuD;AAA9C,oGAAA,WAAW,OAAA;AAAE,wGAAA,eAAe,OAAA;AAErC,qCAA4E;AAAnE,0GAAA,eAAe,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAAE,uGAAA,YAAY,OAAA;AACxD,uCAAsF;AAA7E,4GAAA,gBAAgB,OAAA;AAAE,2GAAA,eAAe,OAAA;AAAE,iHAAA,qBAAqB,OAAA"}
|