@remogram/mcp 0.1.0-beta.5 → 0.1.0-beta.8
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/package.json +2 -2
- package/register-tools.mjs +37 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remogram/mcp",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "Remogram MCP server delegating to CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
33
|
-
"@remogram/cli": "0.1.0-beta.
|
|
33
|
+
"@remogram/cli": "0.1.0-beta.8",
|
|
34
34
|
"zod": "^3.25.76"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/register-tools.mjs
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { normalizeAllowedPaths } from '@remogram/core';
|
|
2
3
|
import { runRemogramCli, packetToMcpContent } from './run-cli.mjs';
|
|
3
4
|
|
|
5
|
+
/** @internal Build CLI argv for merge_plan MCP tool (exported for transport tests). */
|
|
6
|
+
export function mergePlanMcpCliArgs(input) {
|
|
7
|
+
const a = ['merge', 'plan', '--number', String(input.number)];
|
|
8
|
+
for (const glob of normalizeAllowedPaths(input.allowed_paths ?? []) ?? []) {
|
|
9
|
+
a.push('--allowed-path', glob);
|
|
10
|
+
}
|
|
11
|
+
return a;
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
export function registerTools(server) {
|
|
5
15
|
const tools = [
|
|
6
16
|
{
|
|
@@ -134,13 +144,7 @@ export function registerTools(server) {
|
|
|
134
144
|
number: z.number().int().positive(),
|
|
135
145
|
allowed_paths: z.array(z.string()).optional(),
|
|
136
146
|
}),
|
|
137
|
-
args:
|
|
138
|
-
const a = ['merge', 'plan', '--number', String(input.number)];
|
|
139
|
-
for (const glob of input.allowed_paths ?? []) {
|
|
140
|
-
a.push('--allowed-path', glob);
|
|
141
|
-
}
|
|
142
|
-
return a;
|
|
143
|
-
},
|
|
147
|
+
args: mergePlanMcpCliArgs,
|
|
144
148
|
},
|
|
145
149
|
{
|
|
146
150
|
name: 'whoami',
|
|
@@ -182,6 +186,32 @@ export function registerTools(server) {
|
|
|
182
186
|
}),
|
|
183
187
|
args: (input) => ['forge', 'changes', '--since', input.since],
|
|
184
188
|
},
|
|
189
|
+
{
|
|
190
|
+
name: 'merge_execute',
|
|
191
|
+
description: 'Execute a forge merge for an open change request after SHA-bound preflight.',
|
|
192
|
+
inputSchema: z.object({
|
|
193
|
+
number: z.number().int().positive(),
|
|
194
|
+
expected_base_sha: z.string().describe('Expected base SHA (40 hex chars)'),
|
|
195
|
+
expected_head_sha: z.string().describe('Expected head SHA (40 hex chars)'),
|
|
196
|
+
method: z.enum(['merge']).optional().describe('Merge method (v1: merge only)'),
|
|
197
|
+
}),
|
|
198
|
+
args: (input) => {
|
|
199
|
+
const a = [
|
|
200
|
+
'merge',
|
|
201
|
+
'execute',
|
|
202
|
+
'--number',
|
|
203
|
+
String(input.number),
|
|
204
|
+
'--expected-base-sha',
|
|
205
|
+
input.expected_base_sha,
|
|
206
|
+
'--expected-head-sha',
|
|
207
|
+
input.expected_head_sha,
|
|
208
|
+
];
|
|
209
|
+
if (input.method) a.push('--method', input.method);
|
|
210
|
+
return a;
|
|
211
|
+
},
|
|
212
|
+
readOnlyHint: false,
|
|
213
|
+
destructiveHint: true,
|
|
214
|
+
},
|
|
185
215
|
{
|
|
186
216
|
name: 'sync_plan',
|
|
187
217
|
description: 'Local vs remote sync facts and divergent-remote blockers.',
|