@padua/cli 2.0.25 → 2.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 +12 -3
- package/dist/mcp/code-mode/executor.d.ts +32 -0
- package/dist/mcp/code-mode/executor.d.ts.map +1 -0
- package/dist/mcp/code-mode/executor.js +173 -0
- package/dist/mcp/code-mode/executor.js.map +1 -0
- package/dist/mcp/code-mode/index.d.ts +12 -0
- package/dist/mcp/code-mode/index.d.ts.map +1 -0
- package/dist/mcp/code-mode/index.js +11 -0
- package/dist/mcp/code-mode/index.js.map +1 -0
- package/dist/mcp/code-mode/interface-generator.d.ts +38 -0
- package/dist/mcp/code-mode/interface-generator.d.ts.map +1 -0
- package/dist/mcp/code-mode/interface-generator.js +159 -0
- package/dist/mcp/code-mode/interface-generator.js.map +1 -0
- package/dist/mcp/code-mode/provider.d.ts +24 -0
- package/dist/mcp/code-mode/provider.d.ts.map +1 -0
- package/dist/mcp/code-mode/provider.js +93 -0
- package/dist/mcp/code-mode/provider.js.map +1 -0
- package/dist/mcp/code-mode/search.d.ts +32 -0
- package/dist/mcp/code-mode/search.d.ts.map +1 -0
- package/dist/mcp/code-mode/search.js +47 -0
- package/dist/mcp/code-mode/search.js.map +1 -0
- package/dist/mcp/code-mode/tool-registry.d.ts +44 -0
- package/dist/mcp/code-mode/tool-registry.d.ts.map +1 -0
- package/dist/mcp/code-mode/tool-registry.js +196 -0
- package/dist/mcp/code-mode/tool-registry.js.map +1 -0
- package/dist/mcp/code-mode/types.d.ts +41 -0
- package/dist/mcp/code-mode/types.d.ts.map +1 -0
- package/dist/mcp/code-mode/types.js +8 -0
- package/dist/mcp/code-mode/types.js.map +1 -0
- package/dist/mcp/daemon/entry.js +8 -1
- package/dist/mcp/daemon/entry.js.map +1 -1
- package/dist/mcp/providers/atlassian/tools/confluence.d.ts.map +1 -1
- package/dist/mcp/providers/atlassian/tools/confluence.js +17 -9
- package/dist/mcp/providers/atlassian/tools/confluence.js.map +1 -1
- package/dist/mcp/providers/atlassian/tools/jira.d.ts.map +1 -1
- package/dist/mcp/providers/atlassian/tools/jira.js +33 -14
- package/dist/mcp/providers/atlassian/tools/jira.js.map +1 -1
- package/dist/mcp/providers/gitlab/tools/issues.d.ts.map +1 -1
- package/dist/mcp/providers/gitlab/tools/issues.js +9 -5
- package/dist/mcp/providers/gitlab/tools/issues.js.map +1 -1
- package/dist/mcp/providers/gitlab/tools/merge-requests.js +31 -14
- package/dist/mcp/providers/gitlab/tools/merge-requests.js.map +1 -1
- package/dist/mcp/providers/gitlab/tools/pipelines.d.ts.map +1 -1
- package/dist/mcp/providers/gitlab/tools/pipelines.js +9 -5
- package/dist/mcp/providers/gitlab/tools/pipelines.js.map +1 -1
- package/dist/mcp/providers/gitlab/tools/repository.d.ts.map +1 -1
- package/dist/mcp/providers/gitlab/tools/repository.js +122 -96
- package/dist/mcp/providers/gitlab/tools/repository.js.map +1 -1
- package/dist/mcp/providers/tool-helpers.d.ts +33 -8
- package/dist/mcp/providers/tool-helpers.d.ts.map +1 -1
- package/dist/mcp/providers/tool-helpers.js +58 -4
- package/dist/mcp/providers/tool-helpers.js.map +1 -1
- package/package.json +3 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - list_pipelines, get_pipeline, list_pipeline_jobs, get_job_log, retry_pipeline
|
|
6
6
|
*/
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { toMcpResult, toRawTextResult } from '../../tool-helpers.js';
|
|
8
|
+
import { toMcpResult, toRawTextResult, formatParam } from '../../tool-helpers.js';
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
10
|
// Constants
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
@@ -78,6 +78,7 @@ function registerListPipelines(client, registrar) {
|
|
|
78
78
|
.describe('Filter pipelines by status.'),
|
|
79
79
|
page: pageParam,
|
|
80
80
|
per_page: perPageParam,
|
|
81
|
+
format: formatParam,
|
|
81
82
|
});
|
|
82
83
|
registrar.registerTool('gitlab_list_pipelines', {
|
|
83
84
|
description: 'List pipelines for a GitLab project.',
|
|
@@ -91,13 +92,14 @@ function registerListPipelines(client, registrar) {
|
|
|
91
92
|
per_page: input.per_page?.toString(),
|
|
92
93
|
});
|
|
93
94
|
const resp = await client.get(`/projects/${input.project_id}/pipelines`, params);
|
|
94
|
-
return toMcpResult(resp.body);
|
|
95
|
+
return toMcpResult(resp.body, input.format, true);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
function registerGetPipeline(client, registrar) {
|
|
98
99
|
const schema = z.object({
|
|
99
100
|
project_id: projectId,
|
|
100
101
|
pipeline_id: pipelineId,
|
|
102
|
+
format: formatParam,
|
|
101
103
|
});
|
|
102
104
|
registrar.registerTool('gitlab_get_pipeline', {
|
|
103
105
|
description: 'Get details of a single GitLab pipeline by its ID.',
|
|
@@ -105,7 +107,7 @@ function registerGetPipeline(client, registrar) {
|
|
|
105
107
|
annotations: { readOnlyHint: true },
|
|
106
108
|
}, async (input) => {
|
|
107
109
|
const resp = await client.get(`/projects/${input.project_id}/pipelines/${input.pipeline_id}`);
|
|
108
|
-
return toMcpResult(resp.body);
|
|
110
|
+
return toMcpResult(resp.body, input.format);
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
113
|
function registerListPipelineJobs(client, registrar) {
|
|
@@ -114,6 +116,7 @@ function registerListPipelineJobs(client, registrar) {
|
|
|
114
116
|
pipeline_id: pipelineId,
|
|
115
117
|
page: pageParam,
|
|
116
118
|
per_page: perPageParam,
|
|
119
|
+
format: formatParam,
|
|
117
120
|
});
|
|
118
121
|
registrar.registerTool('gitlab_list_pipeline_jobs', {
|
|
119
122
|
description: 'List jobs for a specific GitLab pipeline.',
|
|
@@ -125,7 +128,7 @@ function registerListPipelineJobs(client, registrar) {
|
|
|
125
128
|
per_page: input.per_page?.toString(),
|
|
126
129
|
});
|
|
127
130
|
const resp = await client.get(`/projects/${input.project_id}/pipelines/${input.pipeline_id}/jobs`, params);
|
|
128
|
-
return toMcpResult(resp.body);
|
|
131
|
+
return toMcpResult(resp.body, input.format, true);
|
|
129
132
|
});
|
|
130
133
|
}
|
|
131
134
|
function registerGetJobLog(client, registrar) {
|
|
@@ -147,6 +150,7 @@ function registerRetryPipeline(client, registrar) {
|
|
|
147
150
|
const schema = z.object({
|
|
148
151
|
project_id: projectId,
|
|
149
152
|
pipeline_id: pipelineId,
|
|
153
|
+
format: formatParam,
|
|
150
154
|
});
|
|
151
155
|
registrar.registerTool('gitlab_retry_pipeline', {
|
|
152
156
|
description: 'Retry all failed jobs in a GitLab pipeline.',
|
|
@@ -154,7 +158,7 @@ function registerRetryPipeline(client, registrar) {
|
|
|
154
158
|
annotations: { destructiveHint: true },
|
|
155
159
|
}, async (input) => {
|
|
156
160
|
const resp = await client.post(`/projects/${input.project_id}/pipelines/${input.pipeline_id}/retry`);
|
|
157
|
-
return toMcpResult(resp.body);
|
|
161
|
+
return toMcpResult(resp.body, input.format);
|
|
158
162
|
});
|
|
159
163
|
}
|
|
160
164
|
// ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelines.js","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/pipelines.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"pipelines.js","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/pipelines.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIlF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG,SAAS,CAAC,CAAC,MAA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,MAAM,CAAC;QACtB,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,UAAU;QACvB,MAAM,EAAE,WAAW;KACpB,CAAC,CAAC;IAEH,SAAS,CAAC,YAAY,CACpB,uBAAuB,EACvB;QACE,WAAW,EAAE,6CAA6C;QAC1D,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;KACvC,EACD,KAAK,EAAE,KAA6B,EAAsB,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAC5B,aAAa,KAAK,CAAC,UAAU,cAAc,KAAK,CAAC,WAAW,QAAQ,CACrE,CAAC;QACF,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,MAAM,UAAU,qBAAqB,CAAC,MAAoB,EAAE,SAAwB;IAClF,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzC,mBAAmB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5C,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrC,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/repository.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/repository.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA6FpD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,aAAa,GACvB,IAAI,CA4MN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { GitLabProjectIdSchema, FilePathSchema, SearchQuerySchema, PageSchema, PerPageSchema, BranchNameSchema, } from '../../../server/validation.js';
|
|
3
|
-
import { toMcpResult } from '../../tool-helpers.js';
|
|
3
|
+
import { toMcpResult, formatParam } from '../../tool-helpers.js';
|
|
4
4
|
function buildQueryParams(raw) {
|
|
5
5
|
const params = {};
|
|
6
6
|
for (const [key, val] of Object.entries(raw)) {
|
|
@@ -9,180 +9,206 @@ function buildQueryParams(raw) {
|
|
|
9
9
|
}
|
|
10
10
|
return params;
|
|
11
11
|
}
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Schemas
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
const listProjectsSchema = z.object({
|
|
16
|
+
search: z.string().optional().describe('Filter projects by name'),
|
|
17
|
+
page: PageSchema.optional().describe('Page number'),
|
|
18
|
+
per_page: PerPageSchema.optional().describe('Results per page'),
|
|
19
|
+
format: formatParam,
|
|
20
|
+
});
|
|
21
|
+
const getProjectSchema = z.object({
|
|
22
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
23
|
+
format: formatParam,
|
|
24
|
+
});
|
|
25
|
+
const getFileSchema = z.object({
|
|
26
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
27
|
+
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
28
|
+
ref: z.string().optional().describe('Branch name, tag, or commit SHA to read from'),
|
|
29
|
+
format: formatParam,
|
|
30
|
+
});
|
|
31
|
+
const createFileSchema = z.object({
|
|
32
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
33
|
+
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
34
|
+
branch: BranchNameSchema.describe('Branch to commit the change to'),
|
|
35
|
+
content: z.string().describe('The new file content'),
|
|
36
|
+
commit_message: z.string().min(1).describe('Commit message for the change'),
|
|
37
|
+
format: formatParam,
|
|
38
|
+
});
|
|
39
|
+
const updateFileSchema = z.object({
|
|
40
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
41
|
+
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
42
|
+
branch: BranchNameSchema.describe('Branch to commit the change to'),
|
|
43
|
+
content: z.string().describe('The updated file content'),
|
|
44
|
+
commit_message: z.string().min(1).describe('Commit message for the change'),
|
|
45
|
+
format: formatParam,
|
|
46
|
+
});
|
|
47
|
+
const listBranchesSchema = z.object({
|
|
48
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
49
|
+
search: z.string().optional().describe('Filter branches by name'),
|
|
50
|
+
format: formatParam,
|
|
51
|
+
});
|
|
52
|
+
const getBranchSchema = z.object({
|
|
53
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
54
|
+
branch: BranchNameSchema.describe('The branch name'),
|
|
55
|
+
format: formatParam,
|
|
56
|
+
});
|
|
57
|
+
const searchCodeSchema = z.object({
|
|
58
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
59
|
+
search: SearchQuerySchema.describe('Search query string'),
|
|
60
|
+
ref: z.string().optional().describe('Branch or tag to search within'),
|
|
61
|
+
format: formatParam,
|
|
62
|
+
});
|
|
63
|
+
const getRepositoryTreeSchema = z.object({
|
|
64
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
65
|
+
path: z.string().optional().describe('Subdirectory path inside the repository'),
|
|
66
|
+
ref: z.string().optional().describe('Branch name, tag, or commit SHA'),
|
|
67
|
+
recursive: z.boolean().optional().describe('If true, list tree recursively'),
|
|
68
|
+
page: PageSchema.optional().describe('Page number for pagination'),
|
|
69
|
+
per_page: PerPageSchema.optional().describe('Number of results per page'),
|
|
70
|
+
format: formatParam,
|
|
71
|
+
});
|
|
72
|
+
const getCloneUrlsSchema = z.object({
|
|
73
|
+
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
74
|
+
format: formatParam,
|
|
75
|
+
});
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// Tool registrations
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
12
79
|
export function registerRepositoryTools(client, registrar) {
|
|
13
80
|
// -------------------------------------------------------------------------
|
|
14
81
|
// 1. gitlab_list_projects
|
|
15
82
|
// -------------------------------------------------------------------------
|
|
16
83
|
registrar.registerTool('gitlab_list_projects', {
|
|
17
84
|
description: 'List GitLab projects accessible to the authenticated user',
|
|
18
|
-
inputSchema:
|
|
19
|
-
search: z.string().optional().describe('Filter projects by name'),
|
|
20
|
-
page: PageSchema.optional().describe('Page number'),
|
|
21
|
-
per_page: PerPageSchema.optional().describe('Results per page'),
|
|
22
|
-
}),
|
|
85
|
+
inputSchema: listProjectsSchema,
|
|
23
86
|
annotations: { readOnlyHint: true },
|
|
24
|
-
}, async (
|
|
87
|
+
}, async (args) => {
|
|
25
88
|
const queryParams = buildQueryParams({
|
|
26
|
-
search:
|
|
27
|
-
page:
|
|
28
|
-
per_page:
|
|
89
|
+
search: args.search,
|
|
90
|
+
page: args.page,
|
|
91
|
+
per_page: args.per_page,
|
|
29
92
|
});
|
|
30
93
|
const response = await client.get('/projects', queryParams);
|
|
31
|
-
return toMcpResult(response.body);
|
|
94
|
+
return toMcpResult(response.body, args.format, true);
|
|
32
95
|
});
|
|
33
96
|
// -------------------------------------------------------------------------
|
|
34
97
|
// 2. gitlab_get_project
|
|
35
98
|
// -------------------------------------------------------------------------
|
|
36
99
|
registrar.registerTool('gitlab_get_project', {
|
|
37
100
|
description: 'Get details of a specific GitLab project by ID',
|
|
38
|
-
inputSchema:
|
|
39
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
40
|
-
}),
|
|
101
|
+
inputSchema: getProjectSchema,
|
|
41
102
|
annotations: { readOnlyHint: true },
|
|
42
|
-
}, async (
|
|
43
|
-
const response = await client.get(`/projects/${
|
|
44
|
-
return toMcpResult(response.body);
|
|
103
|
+
}, async (args) => {
|
|
104
|
+
const response = await client.get(`/projects/${args.project_id}`);
|
|
105
|
+
return toMcpResult(response.body, args.format);
|
|
45
106
|
});
|
|
46
107
|
// -------------------------------------------------------------------------
|
|
47
108
|
// 3. gitlab_get_file
|
|
48
109
|
// -------------------------------------------------------------------------
|
|
49
110
|
registrar.registerTool('gitlab_get_file', {
|
|
50
111
|
description: 'Get the contents of a file from a GitLab repository',
|
|
51
|
-
inputSchema:
|
|
52
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
53
|
-
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
54
|
-
ref: z.string().optional().describe('Branch name, tag, or commit SHA to read from'),
|
|
55
|
-
}),
|
|
112
|
+
inputSchema: getFileSchema,
|
|
56
113
|
annotations: { readOnlyHint: true },
|
|
57
|
-
}, async (
|
|
58
|
-
const encodedPath = encodeURIComponent(
|
|
59
|
-
const queryParams = buildQueryParams({ ref:
|
|
60
|
-
const response = await client.get(`/projects/${
|
|
61
|
-
return toMcpResult(response.body);
|
|
114
|
+
}, async (args) => {
|
|
115
|
+
const encodedPath = encodeURIComponent(args.file_path);
|
|
116
|
+
const queryParams = buildQueryParams({ ref: args.ref });
|
|
117
|
+
const response = await client.get(`/projects/${args.project_id}/repository/files/${encodedPath}`, queryParams);
|
|
118
|
+
return toMcpResult(response.body, args.format);
|
|
62
119
|
});
|
|
63
120
|
// -------------------------------------------------------------------------
|
|
64
121
|
// 4. gitlab_create_file
|
|
65
122
|
// -------------------------------------------------------------------------
|
|
66
123
|
registrar.registerTool('gitlab_create_file', {
|
|
67
124
|
description: 'Create a new file in a GitLab repository',
|
|
68
|
-
inputSchema:
|
|
69
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
70
|
-
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
71
|
-
branch: BranchNameSchema.describe('Branch to commit the change to'),
|
|
72
|
-
content: z.string().describe('The new file content'),
|
|
73
|
-
commit_message: z.string().min(1).describe('Commit message for the change'),
|
|
74
|
-
}),
|
|
125
|
+
inputSchema: createFileSchema,
|
|
75
126
|
annotations: { destructiveHint: true },
|
|
76
|
-
}, async (
|
|
77
|
-
const encodedPath = encodeURIComponent(
|
|
78
|
-
const response = await client.post(`/projects/${
|
|
79
|
-
return toMcpResult(response.body);
|
|
127
|
+
}, async (args) => {
|
|
128
|
+
const encodedPath = encodeURIComponent(args.file_path);
|
|
129
|
+
const response = await client.post(`/projects/${args.project_id}/repository/files/${encodedPath}`, { branch: args.branch, content: args.content, commit_message: args.commit_message });
|
|
130
|
+
return toMcpResult(response.body, args.format);
|
|
80
131
|
});
|
|
81
132
|
// -------------------------------------------------------------------------
|
|
82
133
|
// 5. gitlab_update_file
|
|
83
134
|
// -------------------------------------------------------------------------
|
|
84
135
|
registrar.registerTool('gitlab_update_file', {
|
|
85
136
|
description: 'Update an existing file in a GitLab repository',
|
|
86
|
-
inputSchema:
|
|
87
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
88
|
-
file_path: FilePathSchema.describe('Path to the file in the repository'),
|
|
89
|
-
branch: BranchNameSchema.describe('Branch to commit the change to'),
|
|
90
|
-
content: z.string().describe('The updated file content'),
|
|
91
|
-
commit_message: z.string().min(1).describe('Commit message for the change'),
|
|
92
|
-
}),
|
|
137
|
+
inputSchema: updateFileSchema,
|
|
93
138
|
annotations: { destructiveHint: true },
|
|
94
|
-
}, async (
|
|
95
|
-
const encodedPath = encodeURIComponent(
|
|
96
|
-
const response = await client.put(`/projects/${
|
|
97
|
-
return toMcpResult(response.body);
|
|
139
|
+
}, async (args) => {
|
|
140
|
+
const encodedPath = encodeURIComponent(args.file_path);
|
|
141
|
+
const response = await client.put(`/projects/${args.project_id}/repository/files/${encodedPath}`, { branch: args.branch, content: args.content, commit_message: args.commit_message });
|
|
142
|
+
return toMcpResult(response.body, args.format);
|
|
98
143
|
});
|
|
99
144
|
// -------------------------------------------------------------------------
|
|
100
145
|
// 6. gitlab_list_branches
|
|
101
146
|
// -------------------------------------------------------------------------
|
|
102
147
|
registrar.registerTool('gitlab_list_branches', {
|
|
103
148
|
description: 'List branches in a GitLab project repository',
|
|
104
|
-
inputSchema:
|
|
105
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
106
|
-
search: z.string().optional().describe('Filter branches by name'),
|
|
107
|
-
}),
|
|
149
|
+
inputSchema: listBranchesSchema,
|
|
108
150
|
annotations: { readOnlyHint: true },
|
|
109
|
-
}, async (
|
|
110
|
-
const queryParams = buildQueryParams({ search:
|
|
111
|
-
const response = await client.get(`/projects/${
|
|
112
|
-
return toMcpResult(response.body);
|
|
151
|
+
}, async (args) => {
|
|
152
|
+
const queryParams = buildQueryParams({ search: args.search });
|
|
153
|
+
const response = await client.get(`/projects/${args.project_id}/repository/branches`, queryParams);
|
|
154
|
+
return toMcpResult(response.body, args.format, true);
|
|
113
155
|
});
|
|
114
156
|
// -------------------------------------------------------------------------
|
|
115
157
|
// 7. gitlab_get_branch
|
|
116
158
|
// -------------------------------------------------------------------------
|
|
117
159
|
registrar.registerTool('gitlab_get_branch', {
|
|
118
160
|
description: 'Get details of a specific branch in a GitLab project',
|
|
119
|
-
inputSchema:
|
|
120
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
121
|
-
branch: BranchNameSchema.describe('The branch name'),
|
|
122
|
-
}),
|
|
161
|
+
inputSchema: getBranchSchema,
|
|
123
162
|
annotations: { readOnlyHint: true },
|
|
124
|
-
}, async (
|
|
125
|
-
const response = await client.get(`/projects/${
|
|
126
|
-
return toMcpResult(response.body);
|
|
163
|
+
}, async (args) => {
|
|
164
|
+
const response = await client.get(`/projects/${args.project_id}/repository/branches/${args.branch}`);
|
|
165
|
+
return toMcpResult(response.body, args.format);
|
|
127
166
|
});
|
|
128
167
|
// -------------------------------------------------------------------------
|
|
129
168
|
// 8. gitlab_search_code
|
|
130
169
|
// -------------------------------------------------------------------------
|
|
131
170
|
registrar.registerTool('gitlab_search_code', {
|
|
132
171
|
description: 'Search code (blobs) within a GitLab project',
|
|
133
|
-
inputSchema:
|
|
134
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
135
|
-
search: SearchQuerySchema.describe('Search query string'),
|
|
136
|
-
ref: z.string().optional().describe('Branch or tag to search within'),
|
|
137
|
-
}),
|
|
172
|
+
inputSchema: searchCodeSchema,
|
|
138
173
|
annotations: { readOnlyHint: true },
|
|
139
|
-
}, async (
|
|
174
|
+
}, async (args) => {
|
|
140
175
|
const queryParams = buildQueryParams({
|
|
141
176
|
scope: 'blobs',
|
|
142
|
-
search:
|
|
143
|
-
ref:
|
|
177
|
+
search: args.search,
|
|
178
|
+
ref: args.ref,
|
|
144
179
|
});
|
|
145
|
-
const response = await client.get(`/projects/${
|
|
146
|
-
return toMcpResult(response.body);
|
|
180
|
+
const response = await client.get(`/projects/${args.project_id}/search`, queryParams);
|
|
181
|
+
return toMcpResult(response.body, args.format);
|
|
147
182
|
});
|
|
148
183
|
// -------------------------------------------------------------------------
|
|
149
184
|
// 9. gitlab_get_repository_tree
|
|
150
185
|
// -------------------------------------------------------------------------
|
|
151
186
|
registrar.registerTool('gitlab_get_repository_tree', {
|
|
152
187
|
description: 'List the repository tree (files and directories) for a GitLab project',
|
|
153
|
-
inputSchema:
|
|
154
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
155
|
-
path: z.string().optional().describe('Subdirectory path inside the repository'),
|
|
156
|
-
ref: z.string().optional().describe('Branch name, tag, or commit SHA'),
|
|
157
|
-
recursive: z.boolean().optional().describe('If true, list tree recursively'),
|
|
158
|
-
page: PageSchema.optional().describe('Page number for pagination'),
|
|
159
|
-
per_page: PerPageSchema.optional().describe('Number of results per page'),
|
|
160
|
-
}),
|
|
188
|
+
inputSchema: getRepositoryTreeSchema,
|
|
161
189
|
annotations: { readOnlyHint: true },
|
|
162
|
-
}, async (
|
|
190
|
+
}, async (args) => {
|
|
163
191
|
const queryParams = buildQueryParams({
|
|
164
|
-
path:
|
|
165
|
-
ref:
|
|
166
|
-
recursive:
|
|
167
|
-
page:
|
|
168
|
-
per_page:
|
|
192
|
+
path: args.path,
|
|
193
|
+
ref: args.ref,
|
|
194
|
+
recursive: args.recursive,
|
|
195
|
+
page: args.page,
|
|
196
|
+
per_page: args.per_page,
|
|
169
197
|
});
|
|
170
|
-
const response = await client.get(`/projects/${
|
|
171
|
-
return toMcpResult(response.body);
|
|
198
|
+
const response = await client.get(`/projects/${args.project_id}/repository/tree`, queryParams);
|
|
199
|
+
return toMcpResult(response.body, args.format);
|
|
172
200
|
});
|
|
173
201
|
// -------------------------------------------------------------------------
|
|
174
202
|
// 10. gitlab_get_clone_urls
|
|
175
203
|
// -------------------------------------------------------------------------
|
|
176
204
|
registrar.registerTool('gitlab_get_clone_urls', {
|
|
177
205
|
description: 'Get HTTP and SSH clone URLs for a GitLab project',
|
|
178
|
-
inputSchema:
|
|
179
|
-
project_id: GitLabProjectIdSchema.describe('The numeric ID of the GitLab project'),
|
|
180
|
-
}),
|
|
206
|
+
inputSchema: getCloneUrlsSchema,
|
|
181
207
|
annotations: { readOnlyHint: true },
|
|
182
|
-
}, async (
|
|
183
|
-
const response = await client.get(`/projects/${
|
|
208
|
+
}, async (args) => {
|
|
209
|
+
const response = await client.get(`/projects/${args.project_id}`);
|
|
184
210
|
const { http_url_to_repo, ssh_url_to_repo } = response.body;
|
|
185
|
-
return toMcpResult({ http_url_to_repo, ssh_url_to_repo });
|
|
211
|
+
return toMcpResult({ http_url_to_repo, ssh_url_to_repo }, args.format);
|
|
186
212
|
});
|
|
187
213
|
}
|
|
188
214
|
//# sourceMappingURL=repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../../src/mcp/providers/gitlab/tools/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMjE,SAAS,gBAAgB,CACvB,GAA0D;IAE1D,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7C,IAAI,GAAG,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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,YAAY,EAAE,IAAI,EAAE;KACpC,EACD,KAAK,EAAE,IAAwC,EAAsB,EAAE;QACrE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAI9B,aAAa,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACnC,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC5D,OAAO,WAAW,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
/** Shared helpers for MCP tool result formatting. */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare
|
|
1
|
+
/** Shared helpers for MCP tool result formatting with TOON support. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { EncodeReplacer } from '@toon-format/toon';
|
|
4
|
+
/**
|
|
5
|
+
* Shared format parameter for all MCP tools.
|
|
6
|
+
* 'toon' is the default, token-efficient format; 'json' is the explicit fallback.
|
|
7
|
+
*/
|
|
8
|
+
export declare const formatParam: z.ZodOptional<z.ZodEnum<["toon", "json"]>>;
|
|
9
|
+
/**
|
|
10
|
+
* Response format: 'toon' (default, token-efficient) or 'json' (explicit fallback).
|
|
11
|
+
*/
|
|
12
|
+
export type ResponseFormat = 'toon' | 'json';
|
|
13
|
+
/**
|
|
14
|
+
* TOON-compatible replacer that strips sensitive/low-value Atlassian metadata fields.
|
|
15
|
+
* Called for every key-value pair during encoding. Return undefined to omit the field.
|
|
16
|
+
*/
|
|
17
|
+
export declare const sensitiveFieldReplacer: EncodeReplacer;
|
|
18
|
+
type McpContent = {
|
|
9
19
|
content: Array<{
|
|
10
20
|
type: string;
|
|
11
21
|
text: string;
|
|
12
22
|
}>;
|
|
13
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Encode data for an MCP tool response.
|
|
26
|
+
*
|
|
27
|
+
* @param data - The response data to encode.
|
|
28
|
+
* @param format - 'toon' (default) or 'json'. TOON is compact and token-efficient.
|
|
29
|
+
* @param useStreaming - When true, use encodeLines() (streaming TOON) instead of encode().
|
|
30
|
+
* Recommended for arrays of 20+ items. Ignored when format is 'json'.
|
|
31
|
+
*/
|
|
32
|
+
export declare function toMcpResult(data: unknown, format?: ResponseFormat, useStreaming?: boolean): McpContent;
|
|
33
|
+
/**
|
|
34
|
+
* Return raw text content for tools that produce pre-formatted text (e.g., job logs).
|
|
35
|
+
* The text is returned unchanged — no encoding or filtering is applied.
|
|
36
|
+
*/
|
|
37
|
+
export declare function toRawTextResult(text: string): McpContent;
|
|
38
|
+
export {};
|
|
14
39
|
//# sourceMappingURL=tool-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp/providers/tool-helpers.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp/providers/tool-helpers.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,4CAA+G,CAAC;AAExI;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAK7C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAGpC,CAAC;AAEF,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAMrE;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,cAAuB,EAC/B,YAAY,UAAQ,GACnB,UAAU,CASZ;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAExD"}
|
|
@@ -1,8 +1,62 @@
|
|
|
1
|
-
/** Shared helpers for MCP tool result formatting. */
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/** Shared helpers for MCP tool result formatting with TOON support. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { encode, encodeLines } from '@toon-format/toon';
|
|
4
|
+
/**
|
|
5
|
+
* Shared format parameter for all MCP tools.
|
|
6
|
+
* 'toon' is the default, token-efficient format; 'json' is the explicit fallback.
|
|
7
|
+
*/
|
|
8
|
+
export const formatParam = z.enum(['toon', 'json']).optional().describe("Response format: 'toon' (default, token-efficient) or 'json'");
|
|
9
|
+
/** Fields stripped from all tool responses (low-value or sensitive metadata). */
|
|
10
|
+
const SENSITIVE_FIELDS = new Set(['avatarUrls', 'self', 'iconUrl', 'expand']);
|
|
11
|
+
/**
|
|
12
|
+
* TOON-compatible replacer that strips sensitive/low-value Atlassian metadata fields.
|
|
13
|
+
* Called for every key-value pair during encoding. Return undefined to omit the field.
|
|
14
|
+
*/
|
|
15
|
+
export const sensitiveFieldReplacer = (key, value) => {
|
|
16
|
+
if (key !== '' && SENSITIVE_FIELDS.has(key))
|
|
17
|
+
return undefined;
|
|
18
|
+
return value;
|
|
19
|
+
};
|
|
20
|
+
function toText(text) {
|
|
21
|
+
return { content: [{ type: 'text', text }] };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Encode data for an MCP tool response.
|
|
25
|
+
*
|
|
26
|
+
* @param data - The response data to encode.
|
|
27
|
+
* @param format - 'toon' (default) or 'json'. TOON is compact and token-efficient.
|
|
28
|
+
* @param useStreaming - When true, use encodeLines() (streaming TOON) instead of encode().
|
|
29
|
+
* Recommended for arrays of 20+ items. Ignored when format is 'json'.
|
|
30
|
+
*/
|
|
31
|
+
export function toMcpResult(data, format = 'toon', useStreaming = false) {
|
|
32
|
+
if (format === 'json') {
|
|
33
|
+
return toText(JSON.stringify(applyReplacer(data)));
|
|
34
|
+
}
|
|
35
|
+
if (useStreaming) {
|
|
36
|
+
const lines = encodeLines(data, { replacer: sensitiveFieldReplacer });
|
|
37
|
+
return toText(Array.from(lines).join('\n'));
|
|
38
|
+
}
|
|
39
|
+
return toText(encode(data, { replacer: sensitiveFieldReplacer }));
|
|
4
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Return raw text content for tools that produce pre-formatted text (e.g., job logs).
|
|
43
|
+
* The text is returned unchanged — no encoding or filtering is applied.
|
|
44
|
+
*/
|
|
5
45
|
export function toRawTextResult(text) {
|
|
6
|
-
return
|
|
46
|
+
return toText(text);
|
|
47
|
+
}
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// Helpers
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
/**
|
|
52
|
+
* Apply the sensitive-field replacer to a plain JS value for JSON serialization.
|
|
53
|
+
* Mirrors the TOON replacer logic using JSON.stringify's replacer parameter.
|
|
54
|
+
*/
|
|
55
|
+
function applyReplacer(data) {
|
|
56
|
+
return JSON.parse(JSON.stringify(data, (key, value) => {
|
|
57
|
+
if (key !== '' && SENSITIVE_FIELDS.has(key))
|
|
58
|
+
return undefined;
|
|
59
|
+
return value;
|
|
60
|
+
}));
|
|
7
61
|
}
|
|
8
62
|
//# sourceMappingURL=tool-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../../src/mcp/providers/tool-helpers.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../../src/mcp/providers/tool-helpers.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,E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,IAAI,EAAE,EAAE,QAAQ,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,aAAa,CAAC,IAAa;IAClC,OAAO,IAAI,CAAC,KAAK,CACf,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,EAAE,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,SAAS,CAAC;QAC9D,OAAO,KAAgB,CAAC;IAC1B,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@padua/cli",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Unified AWS infrastructure management CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
40
|
+
"@toon-format/toon": "^2.1.0",
|
|
40
41
|
"better-sqlite3": "^12.6.2",
|
|
41
42
|
"chalk": "^4.1.2",
|
|
42
43
|
"commander": "^12.1.0",
|
|
43
44
|
"inquirer": "^9.3.8",
|
|
45
|
+
"isolated-vm": "^6.1.2",
|
|
44
46
|
"zod": "^3.25.0"
|
|
45
47
|
},
|
|
46
48
|
"overrides": {
|