@remogram/mcp 0.1.0-beta.6 → 0.1.0-beta.9

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/register-tools.mjs +75 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remogram/mcp",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.9",
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.6",
33
+ "@remogram/cli": "0.1.0-beta.9",
34
34
  "zod": "^3.25.76"
35
35
  }
36
36
  }
@@ -16,8 +16,13 @@ export function registerTools(server) {
16
16
  {
17
17
  name: 'doctor',
18
18
  description: 'Read-only provider readiness diagnostics for config, remote trust, auth, capabilities, and checks.',
19
- inputSchema: z.object({}),
20
- args: ['doctor'],
19
+ inputSchema: z.object({
20
+ live: z
21
+ .boolean()
22
+ .optional()
23
+ .describe('When true, perform a bounded live forge API reachability probe'),
24
+ }),
25
+ args: (input) => (input.live ? ['doctor', '--live'] : ['doctor']),
21
26
  },
22
27
  {
23
28
  name: 'provider_capabilities',
@@ -56,12 +61,14 @@ export function registerTools(server) {
56
61
  .enum(['number_asc', 'number_desc', 'recent_update', 'recent_created'])
57
62
  .optional()
58
63
  .describe('Open-list slice sort preset (default number_asc)'),
64
+ cursor: z.string().optional().describe('Opaque cursor from prior cr_inventory next_cursor'),
59
65
  }),
60
66
  args: (input) => {
61
67
  const a = ['cr', 'inventory'];
62
68
  if (input.slice_ref) a.push('--slice-ref', input.slice_ref);
63
69
  if (input.limit != null) a.push('--limit', String(input.limit));
64
70
  if (input.sort) a.push('--sort', input.sort);
71
+ if (input.cursor) a.push('--cursor', input.cursor);
65
72
  return a;
66
73
  },
67
74
  },
@@ -73,10 +80,15 @@ export function registerTools(server) {
73
80
  base: z.string().describe('Base branch ref'),
74
81
  title: z.string().describe('Change request title'),
75
82
  body: z.string().optional().describe('Optional change request body'),
83
+ idempotency_key: z
84
+ .string()
85
+ .optional()
86
+ .describe('Optional agent idempotency key for retry-safe writes'),
76
87
  }),
77
88
  args: (input) => {
78
89
  const a = ['cr', 'open', '--head', input.head, '--base', input.base, '--title', input.title];
79
90
  if (input.body) a.push('--body', input.body);
91
+ if (input.idempotency_key) a.push('--idempotency-key', input.idempotency_key);
80
92
  return a;
81
93
  },
82
94
  readOnlyHint: false,
@@ -91,6 +103,10 @@ export function registerTools(server) {
91
103
  state: z.enum(['pending', 'success', 'failure', 'error']).describe('Status state'),
92
104
  target_url: z.string().optional().describe('Optional target URL for the status'),
93
105
  description: z.string().optional().describe('Optional status description'),
106
+ idempotency_key: z
107
+ .string()
108
+ .optional()
109
+ .describe('Optional agent idempotency key for retry-safe writes'),
94
110
  }),
95
111
  args: (input) => {
96
112
  const a = [
@@ -105,6 +121,27 @@ export function registerTools(server) {
105
121
  ];
106
122
  if (input.target_url) a.push('--target-url', input.target_url);
107
123
  if (input.description) a.push('--description', input.description);
124
+ if (input.idempotency_key) a.push('--idempotency-key', input.idempotency_key);
125
+ return a;
126
+ },
127
+ readOnlyHint: false,
128
+ destructiveHint: true,
129
+ },
130
+ {
131
+ name: 'issue_open',
132
+ description: 'Open a forge issue on the configured repository (Gitea v1).',
133
+ inputSchema: z.object({
134
+ title: z.string().describe('Issue title'),
135
+ body: z.string().optional().describe('Optional issue body'),
136
+ idempotency_key: z
137
+ .string()
138
+ .optional()
139
+ .describe('Optional agent idempotency key for retry-safe writes'),
140
+ }),
141
+ args: (input) => {
142
+ const a = ['issue', 'open', '--title', input.title];
143
+ if (input.body) a.push('--body', input.body);
144
+ if (input.idempotency_key) a.push('--idempotency-key', input.idempotency_key);
108
145
  return a;
109
146
  },
110
147
  readOnlyHint: false,
@@ -182,9 +219,43 @@ export function registerTools(server) {
182
219
  description:
183
220
  'Forge activity events since an observed_at boundary (PR lifecycle, head SHA moves, check conclusions).',
184
221
  inputSchema: z.object({
185
- since: z.string().describe('ISO-8601 observed_at boundary'),
222
+ since: z.string().optional().describe('ISO-8601 observed_at boundary (required on first page)'),
223
+ cursor: z.string().optional().describe('Opaque cursor from prior forge_changes next_cursor'),
224
+ limit: z.number().int().positive().optional().describe('Events per page (default 64)'),
186
225
  }),
187
- args: (input) => ['forge', 'changes', '--since', input.since],
226
+ args: (input) => {
227
+ const a = ['forge', 'changes'];
228
+ if (input.since) a.push('--since', input.since);
229
+ if (input.cursor) a.push('--cursor', input.cursor);
230
+ if (input.limit != null) a.push('--limit', String(input.limit));
231
+ return a;
232
+ },
233
+ },
234
+ {
235
+ name: 'merge_execute',
236
+ description: 'Execute a forge merge for an open change request after SHA-bound preflight.',
237
+ inputSchema: z.object({
238
+ number: z.number().int().positive(),
239
+ expected_base_sha: z.string().describe('Expected base SHA (40 hex chars)'),
240
+ expected_head_sha: z.string().describe('Expected head SHA (40 hex chars)'),
241
+ method: z.enum(['merge']).optional().describe('Merge method (v1: merge only)'),
242
+ }),
243
+ args: (input) => {
244
+ const a = [
245
+ 'merge',
246
+ 'execute',
247
+ '--number',
248
+ String(input.number),
249
+ '--expected-base-sha',
250
+ input.expected_base_sha,
251
+ '--expected-head-sha',
252
+ input.expected_head_sha,
253
+ ];
254
+ if (input.method) a.push('--method', input.method);
255
+ return a;
256
+ },
257
+ readOnlyHint: false,
258
+ destructiveHint: true,
188
259
  },
189
260
  {
190
261
  name: 'sync_plan',