@remogram/mcp 0.1.0-beta.4 → 0.1.0-beta.6
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 +79 -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.6",
|
|
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.6",
|
|
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
|
{
|
|
@@ -72,6 +82,34 @@ export function registerTools(server) {
|
|
|
72
82
|
readOnlyHint: false,
|
|
73
83
|
destructiveHint: true,
|
|
74
84
|
},
|
|
85
|
+
{
|
|
86
|
+
name: 'status_set',
|
|
87
|
+
description: 'Set a commit status (check context) on the configured forge.',
|
|
88
|
+
inputSchema: z.object({
|
|
89
|
+
sha: z.string().describe('40-character commit SHA'),
|
|
90
|
+
context: z.string().describe('Status context name'),
|
|
91
|
+
state: z.enum(['pending', 'success', 'failure', 'error']).describe('Status state'),
|
|
92
|
+
target_url: z.string().optional().describe('Optional target URL for the status'),
|
|
93
|
+
description: z.string().optional().describe('Optional status description'),
|
|
94
|
+
}),
|
|
95
|
+
args: (input) => {
|
|
96
|
+
const a = [
|
|
97
|
+
'status',
|
|
98
|
+
'set',
|
|
99
|
+
'--sha',
|
|
100
|
+
input.sha,
|
|
101
|
+
'--context',
|
|
102
|
+
input.context,
|
|
103
|
+
'--state',
|
|
104
|
+
input.state,
|
|
105
|
+
];
|
|
106
|
+
if (input.target_url) a.push('--target-url', input.target_url);
|
|
107
|
+
if (input.description) a.push('--description', input.description);
|
|
108
|
+
return a;
|
|
109
|
+
},
|
|
110
|
+
readOnlyHint: false,
|
|
111
|
+
destructiveHint: true,
|
|
112
|
+
},
|
|
75
113
|
{
|
|
76
114
|
name: 'pr_status',
|
|
77
115
|
description: 'PR metadata and mergeability facts.',
|
|
@@ -106,13 +144,47 @@ export function registerTools(server) {
|
|
|
106
144
|
number: z.number().int().positive(),
|
|
107
145
|
allowed_paths: z.array(z.string()).optional(),
|
|
108
146
|
}),
|
|
109
|
-
args:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
147
|
+
args: mergePlanMcpCliArgs,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'whoami',
|
|
151
|
+
description: 'Authenticated forge identity facts (login, can_write, token scope/expiry signals).',
|
|
152
|
+
inputSchema: z.object({}),
|
|
153
|
+
args: ['whoami'],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'branch_protection',
|
|
157
|
+
description:
|
|
158
|
+
'Branch protection policy facts: required status contexts, protected rules, approvals signal.',
|
|
159
|
+
inputSchema: z.object({
|
|
160
|
+
branch_ref: z.string(),
|
|
161
|
+
}),
|
|
162
|
+
args: (input) => ['branch', 'protection', '--branch-ref', input.branch_ref],
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'cr_files',
|
|
166
|
+
description: 'Changed file paths for a change request (bounded, truncation-aware).',
|
|
167
|
+
inputSchema: z.object({
|
|
168
|
+
number: z.number().int().positive(),
|
|
169
|
+
}),
|
|
170
|
+
args: (input) => ['cr', 'files', '--number', String(input.number)],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'cr_comments',
|
|
174
|
+
description: 'Review comments for a change request (sanitized bodies, truncation-aware).',
|
|
175
|
+
inputSchema: z.object({
|
|
176
|
+
number: z.number().int().positive(),
|
|
177
|
+
}),
|
|
178
|
+
args: (input) => ['cr', 'comments', '--number', String(input.number)],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'forge_changes',
|
|
182
|
+
description:
|
|
183
|
+
'Forge activity events since an observed_at boundary (PR lifecycle, head SHA moves, check conclusions).',
|
|
184
|
+
inputSchema: z.object({
|
|
185
|
+
since: z.string().describe('ISO-8601 observed_at boundary'),
|
|
186
|
+
}),
|
|
187
|
+
args: (input) => ['forge', 'changes', '--since', input.since],
|
|
116
188
|
},
|
|
117
189
|
{
|
|
118
190
|
name: 'sync_plan',
|