@remogram/mcp 0.1.0-beta.2 → 0.1.0-beta.4
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 +54 -2
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.4",
|
|
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.4",
|
|
34
34
|
"zod": "^3.25.76"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/register-tools.mjs
CHANGED
|
@@ -30,6 +30,48 @@ export function registerTools(server) {
|
|
|
30
30
|
}),
|
|
31
31
|
args: (input) => ['refs', 'compare', '--base', input.base, '--head', input.head],
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
name: 'ref_inventory',
|
|
35
|
+
description: 'List repository refs with SHAs, default branch hint, and optional ancestry hints.',
|
|
36
|
+
inputSchema: z.object({}),
|
|
37
|
+
args: ['refs', 'inventory'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'cr_inventory',
|
|
41
|
+
description: 'Aggregate open change requests with checks and merge-plan facts into a semantic-diff slice.',
|
|
42
|
+
inputSchema: z.object({
|
|
43
|
+
slice_ref: z.string().optional().describe('Optional slice ref label for consumers'),
|
|
44
|
+
limit: z.number().int().positive().optional().describe('Max open CR entries (default 3)'),
|
|
45
|
+
sort: z
|
|
46
|
+
.enum(['number_asc', 'number_desc', 'recent_update', 'recent_created'])
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Open-list slice sort preset (default number_asc)'),
|
|
49
|
+
}),
|
|
50
|
+
args: (input) => {
|
|
51
|
+
const a = ['cr', 'inventory'];
|
|
52
|
+
if (input.slice_ref) a.push('--slice-ref', input.slice_ref);
|
|
53
|
+
if (input.limit != null) a.push('--limit', String(input.limit));
|
|
54
|
+
if (input.sort) a.push('--sort', input.sort);
|
|
55
|
+
return a;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'cr_open',
|
|
60
|
+
description: 'Open a change request (pull request) on the configured forge.',
|
|
61
|
+
inputSchema: z.object({
|
|
62
|
+
head: z.string().describe('Head branch ref'),
|
|
63
|
+
base: z.string().describe('Base branch ref'),
|
|
64
|
+
title: z.string().describe('Change request title'),
|
|
65
|
+
body: z.string().optional().describe('Optional change request body'),
|
|
66
|
+
}),
|
|
67
|
+
args: (input) => {
|
|
68
|
+
const a = ['cr', 'open', '--head', input.head, '--base', input.base, '--title', input.title];
|
|
69
|
+
if (input.body) a.push('--body', input.body);
|
|
70
|
+
return a;
|
|
71
|
+
},
|
|
72
|
+
readOnlyHint: false,
|
|
73
|
+
destructiveHint: true,
|
|
74
|
+
},
|
|
33
75
|
{
|
|
34
76
|
name: 'pr_status',
|
|
35
77
|
description: 'PR metadata and mergeability facts.',
|
|
@@ -62,8 +104,15 @@ export function registerTools(server) {
|
|
|
62
104
|
description: 'Merge readiness facts: mergeability, checks, blockers.',
|
|
63
105
|
inputSchema: z.object({
|
|
64
106
|
number: z.number().int().positive(),
|
|
107
|
+
allowed_paths: z.array(z.string()).optional(),
|
|
65
108
|
}),
|
|
66
|
-
args: (input) =>
|
|
109
|
+
args: (input) => {
|
|
110
|
+
const a = ['merge', 'plan', '--number', String(input.number)];
|
|
111
|
+
for (const glob of input.allowed_paths ?? []) {
|
|
112
|
+
a.push('--allowed-path', glob);
|
|
113
|
+
}
|
|
114
|
+
return a;
|
|
115
|
+
},
|
|
67
116
|
},
|
|
68
117
|
{
|
|
69
118
|
name: 'sync_plan',
|
|
@@ -85,7 +134,10 @@ export function registerTools(server) {
|
|
|
85
134
|
{
|
|
86
135
|
description: tool.description,
|
|
87
136
|
inputSchema: tool.inputSchema,
|
|
88
|
-
annotations: {
|
|
137
|
+
annotations: {
|
|
138
|
+
readOnlyHint: tool.readOnlyHint !== false,
|
|
139
|
+
destructiveHint: tool.destructiveHint === true,
|
|
140
|
+
},
|
|
89
141
|
},
|
|
90
142
|
async (input) => {
|
|
91
143
|
const args = typeof tool.args === 'function' ? tool.args(input) : tool.args;
|