@powerhousedao/reactor-mcp 6.2.3-dev.77 → 6.2.3-dev.79

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.
@@ -1,8 +1,27 @@
1
1
  import { ToolCallback } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { IReactorClient, ISyncManager } from "@powerhousedao/reactor";
3
- import { Action, AuthSubject, DocumentModelModule } from "@powerhousedao/shared/document-model";
3
+ import { Action, AuthSubject, DocumentModelGlobalState, DocumentModelModule } from "@powerhousedao/shared/document-model";
4
+ import { CodegenStatusRegistry } from "@powerhousedao/shared/processors";
4
5
  import { ZodRawShape, z } from "zod";
5
6
  import { CallToolResult, Prompt, Resource, ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
7
+ //#region src/tools/compact-schema.d.ts
8
+ type CompactDocumentModelSchema = {
9
+ id: string;
10
+ name: string;
11
+ version: number;
12
+ /** One entry per operation: what `addActions` takes as `type`, `scope` and `input`. */
13
+ actions: {
14
+ type: string;
15
+ scope: string;
16
+ /** The input's GraphQL definition, or `null` for an action without input. */
17
+ input: string | null;
18
+ }[];
19
+ /** Definitions of the enums and types the inputs reference from the state schemas. */
20
+ types?: Record<string, string>;
21
+ };
22
+ /** The parts of a document model's latest specification that writing actions needs. */
23
+ declare function compactDocumentModelSchema(model: DocumentModelGlobalState): CompactDocumentModelSchema;
24
+ //#endregion
6
25
  //#region src/tools/types.d.ts
7
26
  type ExtractCallbackFromTool<T extends ToolSchema> = T extends {
8
27
  inputSchema: infer S;
@@ -35,6 +54,8 @@ type ReactorMcpProviderOptions = {
35
54
  * client's signer, which only a single-user local reactor should rely on.
36
55
  */
37
56
  subject?: AuthSubject;
57
+ /** Vetra's codegen status; the process's registry by default. */
58
+ codegenStatus?: CodegenStatusRegistry;
38
59
  };
39
60
  declare const createDocumentTool: {
40
61
  readonly name: "createDocument";
@@ -53,10 +74,10 @@ declare const createDocumentTool: {
53
74
  };
54
75
  declare const getDocumentTool: {
55
76
  readonly name: "getDocument";
56
- readonly description: "Retrieve a document by its ID, passed as `id` (or `documentId`, as the other document tools name it)";
77
+ readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
57
78
  readonly inputSchema: {
58
- readonly id: z.ZodOptional<z.ZodString>;
59
79
  readonly documentId: z.ZodOptional<z.ZodString>;
80
+ readonly id: z.ZodOptional<z.ZodString>;
60
81
  };
61
82
  readonly outputSchema: {
62
83
  readonly document: z.ZodUnknown;
@@ -64,9 +85,11 @@ declare const getDocumentTool: {
64
85
  };
65
86
  declare const getDocumentsTool: {
66
87
  readonly name: "getDocuments";
67
- readonly description: "List documents in a drive";
88
+ readonly description: "List documents in a drive, passed as `documentId`";
68
89
  readonly inputSchema: {
69
- readonly parentId: z.ZodString;
90
+ readonly documentId: z.ZodOptional<z.ZodString>;
91
+ readonly driveId: z.ZodOptional<z.ZodString>;
92
+ readonly parentId: z.ZodOptional<z.ZodString>;
70
93
  };
71
94
  readonly outputSchema: {
72
95
  readonly documentIds: z.ZodArray<z.ZodString>;
@@ -74,9 +97,10 @@ declare const getDocumentsTool: {
74
97
  };
75
98
  declare const deleteDocumentTool: {
76
99
  readonly name: "deleteDocument";
77
- readonly description: "Delete a document";
100
+ readonly description: "Delete a document, passed as `documentId`";
78
101
  readonly inputSchema: {
79
- readonly documentId: z.ZodString;
102
+ readonly documentId: z.ZodOptional<z.ZodString>;
103
+ readonly id: z.ZodOptional<z.ZodString>;
80
104
  };
81
105
  readonly outputSchema: {
82
106
  readonly success: z.ZodBoolean;
@@ -84,9 +108,10 @@ declare const deleteDocumentTool: {
84
108
  };
85
109
  declare const addActionsTool: {
86
110
  readonly name: "addActions";
87
- readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP.";
111
+ readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP. Returns one result per action, in input order; `success` is false when any result carries an `error`. An action its reducer rejected is stored as an operation that changes nothing, and the rest of the batch still applies. When a policy denies an action, the whole batch is refused: the denied action's error has kind `denied` and the others `not-applied`.";
88
112
  readonly inputSchema: {
89
- readonly documentId: z.ZodString;
113
+ readonly documentId: z.ZodOptional<z.ZodString>;
114
+ readonly id: z.ZodOptional<z.ZodString>;
90
115
  readonly actions: z.ZodArray<z.ZodObject<{
91
116
  type: z.ZodString;
92
117
  input: z.ZodUnknown;
@@ -96,6 +121,58 @@ declare const addActionsTool: {
96
121
  };
97
122
  readonly outputSchema: {
98
123
  readonly success: z.ZodBoolean;
124
+ readonly results: z.ZodArray<z.ZodObject<{
125
+ index: z.ZodNumber;
126
+ type: z.ZodString;
127
+ scope: z.ZodString;
128
+ operationIndex: z.ZodOptional<z.ZodNumber>;
129
+ error: z.ZodOptional<z.ZodObject<{
130
+ kind: z.ZodEnum<{
131
+ denied: "denied";
132
+ "not-applied": "not-applied";
133
+ "reducer-error": "reducer-error";
134
+ }>;
135
+ message: z.ZodString;
136
+ name: z.ZodOptional<z.ZodString>;
137
+ code: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>>;
139
+ }, z.core.$strip>>;
140
+ readonly codegen: z.ZodOptional<z.ZodString>;
141
+ };
142
+ };
143
+ declare const getCodegenStatusTool: {
144
+ readonly name: "getCodegenStatus";
145
+ readonly description: "Vetra's code generation for its documents (document models, editors, apps, processors, subgraphs and the package): each one's state, why it failed or was skipped, and the files it wrote. Vetra regenerates a document's code a few seconds after it changes; call this after addActions on such a document, with `waitSeconds` to wait until it settles, before reading or editing the generated code. `loadFailures` lists the project modules Vetra could not load, e.g. generated code that throws on import.";
146
+ readonly inputSchema: {
147
+ readonly documentId: z.ZodOptional<z.ZodString>;
148
+ readonly waitSeconds: z.ZodOptional<z.ZodNumber>;
149
+ };
150
+ readonly outputSchema: {
151
+ readonly active: z.ZodBoolean;
152
+ readonly settled: z.ZodBoolean;
153
+ readonly documents: z.ZodArray<z.ZodObject<{
154
+ documentId: z.ZodString;
155
+ documentType: z.ZodString;
156
+ name: z.ZodOptional<z.ZodString>;
157
+ state: z.ZodEnum<{
158
+ done: "done";
159
+ failed: "failed";
160
+ queued: "queued";
161
+ running: "running";
162
+ skipped: "skipped";
163
+ "waiting-for-install": "waiting-for-install";
164
+ }>;
165
+ message: z.ZodOptional<z.ZodString>;
166
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
167
+ updatedAt: z.ZodString;
168
+ }, z.core.$strip>>;
169
+ readonly loadFailures: z.ZodArray<z.ZodObject<{
170
+ package: z.ZodString;
171
+ kind: z.ZodString;
172
+ message: z.ZodString;
173
+ updatedAt: z.ZodString;
174
+ }, z.core.$strip>>;
175
+ readonly message: z.ZodOptional<z.ZodString>;
99
176
  };
100
177
  };
101
178
  declare const getDrivesTool: {
@@ -108,19 +185,24 @@ declare const getDrivesTool: {
108
185
  };
109
186
  declare const addDriveTool: {
110
187
  readonly name: "addDrive";
111
- readonly description: "Create a new drive";
188
+ readonly description: "Create a new drive. Pass `name` and, optionally, `icon` and `preferredEditor` at the top level. The older `driveInput` object is still accepted.";
112
189
  readonly inputSchema: {
113
- readonly driveInput: z.ZodObject<{
114
- global: z.ZodObject<{
190
+ readonly name: z.ZodOptional<z.ZodString>;
191
+ readonly icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ readonly preferredEditor: z.ZodOptional<z.ZodString>;
193
+ readonly driveInput: z.ZodOptional<z.ZodObject<{
194
+ name: z.ZodOptional<z.ZodString>;
195
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ global: z.ZodOptional<z.ZodObject<{
115
197
  name: z.ZodString;
116
198
  icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
- }, z.core.$strip>;
199
+ }, z.core.$strip>>;
118
200
  preferredEditor: z.ZodOptional<z.ZodString>;
119
201
  local: z.ZodOptional<z.ZodObject<{
120
202
  availableOffline: z.ZodOptional<z.ZodBoolean>;
121
203
  sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
204
  }, z.core.$strip>>;
123
- }, z.core.$strip>;
205
+ }, z.core.$strip>>;
124
206
  };
125
207
  readonly outputSchema: {
126
208
  readonly driveId: z.ZodString;
@@ -128,9 +210,11 @@ declare const addDriveTool: {
128
210
  };
129
211
  declare const getDriveTool: {
130
212
  readonly name: "getDrive";
131
- readonly description: "Get a specific drive";
213
+ readonly description: "Get a specific drive, passed as `documentId`";
132
214
  readonly inputSchema: {
133
- readonly driveId: z.ZodString;
215
+ readonly documentId: z.ZodOptional<z.ZodString>;
216
+ readonly driveId: z.ZodOptional<z.ZodString>;
217
+ readonly id: z.ZodOptional<z.ZodString>;
134
218
  readonly options: z.ZodOptional<z.ZodObject<{
135
219
  revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
136
220
  checkHashes: z.ZodOptional<z.ZodBoolean>;
@@ -142,9 +226,11 @@ declare const getDriveTool: {
142
226
  };
143
227
  declare const deleteDriveTool: {
144
228
  readonly name: "deleteDrive";
145
- readonly description: "Delete a drive";
229
+ readonly description: "Delete a drive, passed as `documentId`";
146
230
  readonly inputSchema: {
147
- readonly driveId: z.ZodString;
231
+ readonly documentId: z.ZodOptional<z.ZodString>;
232
+ readonly driveId: z.ZodOptional<z.ZodString>;
233
+ readonly id: z.ZodOptional<z.ZodString>;
148
234
  };
149
235
  readonly outputSchema: {
150
236
  readonly success: z.ZodBoolean;
@@ -173,9 +259,10 @@ declare const addRemoteDriveTool: {
173
259
  };
174
260
  declare const getDocumentModelSchemaTool: {
175
261
  readonly name: "getDocumentModelSchema";
176
- readonly description: "Get the schema of a document model";
262
+ readonly description: "Get the schema of a document model. Pass `compact: true` before addActions: it returns only each action's type, scope and GraphQL input definition, and the enums and types those inputs use. Omit it for the full model, with state schemas, descriptions, errors and examples.";
177
263
  readonly inputSchema: {
178
264
  readonly type: z.ZodString;
265
+ readonly compact: z.ZodOptional<z.ZodBoolean>;
179
266
  };
180
267
  readonly outputSchema: {
181
268
  readonly schema: z.ZodUnknown;
@@ -201,10 +288,10 @@ type ToolRecord<T extends readonly ToolSchema[]> = { [K in T[number]["name"]]: T
201
288
  }>>; };
202
289
  declare const _allTools: readonly [{
203
290
  readonly name: "getDocument";
204
- readonly description: "Retrieve a document by its ID, passed as `id` (or `documentId`, as the other document tools name it)";
291
+ readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
205
292
  readonly inputSchema: {
206
- readonly id: z.ZodOptional<z.ZodString>;
207
293
  readonly documentId: z.ZodOptional<z.ZodString>;
294
+ readonly id: z.ZodOptional<z.ZodString>;
208
295
  };
209
296
  readonly outputSchema: {
210
297
  readonly document: z.ZodUnknown;
@@ -225,27 +312,31 @@ declare const _allTools: readonly [{
225
312
  };
226
313
  }, {
227
314
  readonly name: "getDocuments";
228
- readonly description: "List documents in a drive";
315
+ readonly description: "List documents in a drive, passed as `documentId`";
229
316
  readonly inputSchema: {
230
- readonly parentId: z.ZodString;
317
+ readonly documentId: z.ZodOptional<z.ZodString>;
318
+ readonly driveId: z.ZodOptional<z.ZodString>;
319
+ readonly parentId: z.ZodOptional<z.ZodString>;
231
320
  };
232
321
  readonly outputSchema: {
233
322
  readonly documentIds: z.ZodArray<z.ZodString>;
234
323
  };
235
324
  }, {
236
325
  readonly name: "deleteDocument";
237
- readonly description: "Delete a document";
326
+ readonly description: "Delete a document, passed as `documentId`";
238
327
  readonly inputSchema: {
239
- readonly documentId: z.ZodString;
328
+ readonly documentId: z.ZodOptional<z.ZodString>;
329
+ readonly id: z.ZodOptional<z.ZodString>;
240
330
  };
241
331
  readonly outputSchema: {
242
332
  readonly success: z.ZodBoolean;
243
333
  };
244
334
  }, {
245
335
  readonly name: "addActions";
246
- readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP.";
336
+ readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP. Returns one result per action, in input order; `success` is false when any result carries an `error`. An action its reducer rejected is stored as an operation that changes nothing, and the rest of the batch still applies. When a policy denies an action, the whole batch is refused: the denied action's error has kind `denied` and the others `not-applied`.";
247
337
  readonly inputSchema: {
248
- readonly documentId: z.ZodString;
338
+ readonly documentId: z.ZodOptional<z.ZodString>;
339
+ readonly id: z.ZodOptional<z.ZodString>;
249
340
  readonly actions: z.ZodArray<z.ZodObject<{
250
341
  type: z.ZodString;
251
342
  input: z.ZodUnknown;
@@ -255,6 +346,23 @@ declare const _allTools: readonly [{
255
346
  };
256
347
  readonly outputSchema: {
257
348
  readonly success: z.ZodBoolean;
349
+ readonly results: z.ZodArray<z.ZodObject<{
350
+ index: z.ZodNumber;
351
+ type: z.ZodString;
352
+ scope: z.ZodString;
353
+ operationIndex: z.ZodOptional<z.ZodNumber>;
354
+ error: z.ZodOptional<z.ZodObject<{
355
+ kind: z.ZodEnum<{
356
+ denied: "denied";
357
+ "not-applied": "not-applied";
358
+ "reducer-error": "reducer-error";
359
+ }>;
360
+ message: z.ZodString;
361
+ name: z.ZodOptional<z.ZodString>;
362
+ code: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>>;
364
+ }, z.core.$strip>>;
365
+ readonly codegen: z.ZodOptional<z.ZodString>;
258
366
  };
259
367
  }, {
260
368
  readonly name: "getDrives";
@@ -265,28 +373,35 @@ declare const _allTools: readonly [{
265
373
  };
266
374
  }, {
267
375
  readonly name: "addDrive";
268
- readonly description: "Create a new drive";
376
+ readonly description: "Create a new drive. Pass `name` and, optionally, `icon` and `preferredEditor` at the top level. The older `driveInput` object is still accepted.";
269
377
  readonly inputSchema: {
270
- readonly driveInput: z.ZodObject<{
271
- global: z.ZodObject<{
378
+ readonly name: z.ZodOptional<z.ZodString>;
379
+ readonly icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ readonly preferredEditor: z.ZodOptional<z.ZodString>;
381
+ readonly driveInput: z.ZodOptional<z.ZodObject<{
382
+ name: z.ZodOptional<z.ZodString>;
383
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
+ global: z.ZodOptional<z.ZodObject<{
272
385
  name: z.ZodString;
273
386
  icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
- }, z.core.$strip>;
387
+ }, z.core.$strip>>;
275
388
  preferredEditor: z.ZodOptional<z.ZodString>;
276
389
  local: z.ZodOptional<z.ZodObject<{
277
390
  availableOffline: z.ZodOptional<z.ZodBoolean>;
278
391
  sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
392
  }, z.core.$strip>>;
280
- }, z.core.$strip>;
393
+ }, z.core.$strip>>;
281
394
  };
282
395
  readonly outputSchema: {
283
396
  readonly driveId: z.ZodString;
284
397
  };
285
398
  }, {
286
399
  readonly name: "getDrive";
287
- readonly description: "Get a specific drive";
400
+ readonly description: "Get a specific drive, passed as `documentId`";
288
401
  readonly inputSchema: {
289
- readonly driveId: z.ZodString;
402
+ readonly documentId: z.ZodOptional<z.ZodString>;
403
+ readonly driveId: z.ZodOptional<z.ZodString>;
404
+ readonly id: z.ZodOptional<z.ZodString>;
290
405
  readonly options: z.ZodOptional<z.ZodObject<{
291
406
  revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
292
407
  checkHashes: z.ZodOptional<z.ZodBoolean>;
@@ -297,9 +412,11 @@ declare const _allTools: readonly [{
297
412
  };
298
413
  }, {
299
414
  readonly name: "deleteDrive";
300
- readonly description: "Delete a drive";
415
+ readonly description: "Delete a drive, passed as `documentId`";
301
416
  readonly inputSchema: {
302
- readonly driveId: z.ZodString;
417
+ readonly documentId: z.ZodOptional<z.ZodString>;
418
+ readonly driveId: z.ZodOptional<z.ZodString>;
419
+ readonly id: z.ZodOptional<z.ZodString>;
303
420
  };
304
421
  readonly outputSchema: {
305
422
  readonly success: z.ZodBoolean;
@@ -326,9 +443,10 @@ declare const _allTools: readonly [{
326
443
  };
327
444
  }, {
328
445
  readonly name: "getDocumentModelSchema";
329
- readonly description: "Get the schema of a document model";
446
+ readonly description: "Get the schema of a document model. Pass `compact: true` before addActions: it returns only each action's type, scope and GraphQL input definition, and the enums and types those inputs use. Omit it for the full model, with state schemas, descriptions, errors and examples.";
330
447
  readonly inputSchema: {
331
448
  readonly type: z.ZodString;
449
+ readonly compact: z.ZodOptional<z.ZodBoolean>;
332
450
  };
333
451
  readonly outputSchema: {
334
452
  readonly schema: z.ZodUnknown;
@@ -347,24 +465,58 @@ declare const _allTools: readonly [{
347
465
  authorWebsite: z.ZodString;
348
466
  }, z.core.$strip>>;
349
467
  };
468
+ }, {
469
+ readonly name: "getCodegenStatus";
470
+ readonly description: "Vetra's code generation for its documents (document models, editors, apps, processors, subgraphs and the package): each one's state, why it failed or was skipped, and the files it wrote. Vetra regenerates a document's code a few seconds after it changes; call this after addActions on such a document, with `waitSeconds` to wait until it settles, before reading or editing the generated code. `loadFailures` lists the project modules Vetra could not load, e.g. generated code that throws on import.";
471
+ readonly inputSchema: {
472
+ readonly documentId: z.ZodOptional<z.ZodString>;
473
+ readonly waitSeconds: z.ZodOptional<z.ZodNumber>;
474
+ };
475
+ readonly outputSchema: {
476
+ readonly active: z.ZodBoolean;
477
+ readonly settled: z.ZodBoolean;
478
+ readonly documents: z.ZodArray<z.ZodObject<{
479
+ documentId: z.ZodString;
480
+ documentType: z.ZodString;
481
+ name: z.ZodOptional<z.ZodString>;
482
+ state: z.ZodEnum<{
483
+ done: "done";
484
+ failed: "failed";
485
+ queued: "queued";
486
+ running: "running";
487
+ skipped: "skipped";
488
+ "waiting-for-install": "waiting-for-install";
489
+ }>;
490
+ message: z.ZodOptional<z.ZodString>;
491
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
492
+ updatedAt: z.ZodString;
493
+ }, z.core.$strip>>;
494
+ readonly loadFailures: z.ZodArray<z.ZodObject<{
495
+ package: z.ZodString;
496
+ kind: z.ZodString;
497
+ message: z.ZodString;
498
+ updatedAt: z.ZodString;
499
+ }, z.core.$strip>>;
500
+ readonly message: z.ZodOptional<z.ZodString>;
501
+ };
350
502
  }];
351
503
  type ReactorMcpTools = ToolRecord<typeof _allTools>;
352
504
  declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): Promise<{
353
505
  readonly tools: {
354
506
  readonly getDocument: {
355
507
  readonly name: "getDocument";
356
- readonly description: "Retrieve a document by its ID, passed as `id` (or `documentId`, as the other document tools name it)";
508
+ readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
357
509
  readonly inputSchema: {
358
- readonly id: z.ZodOptional<z.ZodString>;
359
510
  readonly documentId: z.ZodOptional<z.ZodString>;
511
+ readonly id: z.ZodOptional<z.ZodString>;
360
512
  };
361
513
  readonly outputSchema: {
362
514
  readonly document: z.ZodUnknown;
363
515
  };
364
516
  } & {
365
517
  callback: (args: {
366
- id?: string | undefined;
367
518
  documentId?: string | undefined;
519
+ id?: string | undefined;
368
520
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
369
521
  };
370
522
  readonly createDocument: {
@@ -391,37 +543,44 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
391
543
  };
392
544
  readonly getDocuments: {
393
545
  readonly name: "getDocuments";
394
- readonly description: "List documents in a drive";
546
+ readonly description: "List documents in a drive, passed as `documentId`";
395
547
  readonly inputSchema: {
396
- readonly parentId: z.ZodString;
548
+ readonly documentId: z.ZodOptional<z.ZodString>;
549
+ readonly driveId: z.ZodOptional<z.ZodString>;
550
+ readonly parentId: z.ZodOptional<z.ZodString>;
397
551
  };
398
552
  readonly outputSchema: {
399
553
  readonly documentIds: z.ZodArray<z.ZodString>;
400
554
  };
401
555
  } & {
402
556
  callback: (args: {
403
- parentId: string;
557
+ documentId?: string | undefined;
558
+ driveId?: string | undefined;
559
+ parentId?: string | undefined;
404
560
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
405
561
  };
406
562
  readonly deleteDocument: {
407
563
  readonly name: "deleteDocument";
408
- readonly description: "Delete a document";
564
+ readonly description: "Delete a document, passed as `documentId`";
409
565
  readonly inputSchema: {
410
- readonly documentId: z.ZodString;
566
+ readonly documentId: z.ZodOptional<z.ZodString>;
567
+ readonly id: z.ZodOptional<z.ZodString>;
411
568
  };
412
569
  readonly outputSchema: {
413
570
  readonly success: z.ZodBoolean;
414
571
  };
415
572
  } & {
416
573
  callback: (args: {
417
- documentId: string;
574
+ documentId?: string | undefined;
575
+ id?: string | undefined;
418
576
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
419
577
  };
420
578
  readonly addActions: {
421
579
  readonly name: "addActions";
422
- readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP.";
580
+ readonly description: "Adds actions to a document. Prefer adding multiples actions at once to reduce the number of steps. Besides the document model's operations, accepts the base actions SET_NAME (scope global, input: the name), SET_PREFERRED_EDITOR (scope header, input: { preferredEditor }), UNDO and REDO (input: { count }) and NOOP. Returns one result per action, in input order; `success` is false when any result carries an `error`. An action its reducer rejected is stored as an operation that changes nothing, and the rest of the batch still applies. When a policy denies an action, the whole batch is refused: the denied action's error has kind `denied` and the others `not-applied`.";
423
581
  readonly inputSchema: {
424
- readonly documentId: z.ZodString;
582
+ readonly documentId: z.ZodOptional<z.ZodString>;
583
+ readonly id: z.ZodOptional<z.ZodString>;
425
584
  readonly actions: z.ZodArray<z.ZodObject<{
426
585
  type: z.ZodString;
427
586
  input: z.ZodUnknown;
@@ -431,10 +590,28 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
431
590
  };
432
591
  readonly outputSchema: {
433
592
  readonly success: z.ZodBoolean;
593
+ readonly results: z.ZodArray<z.ZodObject<{
594
+ index: z.ZodNumber;
595
+ type: z.ZodString;
596
+ scope: z.ZodString;
597
+ operationIndex: z.ZodOptional<z.ZodNumber>;
598
+ error: z.ZodOptional<z.ZodObject<{
599
+ kind: z.ZodEnum<{
600
+ denied: "denied";
601
+ "not-applied": "not-applied";
602
+ "reducer-error": "reducer-error";
603
+ }>;
604
+ message: z.ZodString;
605
+ name: z.ZodOptional<z.ZodString>;
606
+ code: z.ZodOptional<z.ZodString>;
607
+ }, z.core.$strip>>;
608
+ }, z.core.$strip>>;
609
+ readonly codegen: z.ZodOptional<z.ZodString>;
434
610
  };
435
611
  } & {
436
612
  callback: (args: {
437
- documentId: string;
613
+ documentId?: string | undefined;
614
+ id?: string | undefined;
438
615
  actions: {
439
616
  type: string;
440
617
  input: unknown;
@@ -455,43 +632,55 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
455
632
  };
456
633
  readonly addDrive: {
457
634
  readonly name: "addDrive";
458
- readonly description: "Create a new drive";
635
+ readonly description: "Create a new drive. Pass `name` and, optionally, `icon` and `preferredEditor` at the top level. The older `driveInput` object is still accepted.";
459
636
  readonly inputSchema: {
460
- readonly driveInput: z.ZodObject<{
461
- global: z.ZodObject<{
637
+ readonly name: z.ZodOptional<z.ZodString>;
638
+ readonly icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
639
+ readonly preferredEditor: z.ZodOptional<z.ZodString>;
640
+ readonly driveInput: z.ZodOptional<z.ZodObject<{
641
+ name: z.ZodOptional<z.ZodString>;
642
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
643
+ global: z.ZodOptional<z.ZodObject<{
462
644
  name: z.ZodString;
463
645
  icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
464
- }, z.core.$strip>;
646
+ }, z.core.$strip>>;
465
647
  preferredEditor: z.ZodOptional<z.ZodString>;
466
648
  local: z.ZodOptional<z.ZodObject<{
467
649
  availableOffline: z.ZodOptional<z.ZodBoolean>;
468
650
  sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
469
651
  }, z.core.$strip>>;
470
- }, z.core.$strip>;
652
+ }, z.core.$strip>>;
471
653
  };
472
654
  readonly outputSchema: {
473
655
  readonly driveId: z.ZodString;
474
656
  };
475
657
  } & {
476
658
  callback: (args: {
477
- driveInput: {
478
- global: {
659
+ name?: string | undefined;
660
+ icon?: string | null | undefined;
661
+ preferredEditor?: string | undefined;
662
+ driveInput?: {
663
+ name?: string | undefined;
664
+ icon?: string | null | undefined;
665
+ global?: {
479
666
  name: string;
480
667
  icon?: string | null | undefined;
481
- };
668
+ } | undefined;
482
669
  preferredEditor?: string | undefined;
483
670
  local?: {
484
671
  availableOffline?: boolean | undefined;
485
672
  sharingType?: string | null | undefined;
486
673
  } | undefined;
487
- };
674
+ } | undefined;
488
675
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
489
676
  };
490
677
  readonly getDrive: {
491
678
  readonly name: "getDrive";
492
- readonly description: "Get a specific drive";
679
+ readonly description: "Get a specific drive, passed as `documentId`";
493
680
  readonly inputSchema: {
494
- readonly driveId: z.ZodString;
681
+ readonly documentId: z.ZodOptional<z.ZodString>;
682
+ readonly driveId: z.ZodOptional<z.ZodString>;
683
+ readonly id: z.ZodOptional<z.ZodString>;
495
684
  readonly options: z.ZodOptional<z.ZodObject<{
496
685
  revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
497
686
  checkHashes: z.ZodOptional<z.ZodBoolean>;
@@ -502,7 +691,9 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
502
691
  };
503
692
  } & {
504
693
  callback: (args: {
505
- driveId: string;
694
+ documentId?: string | undefined;
695
+ driveId?: string | undefined;
696
+ id?: string | undefined;
506
697
  options?: {
507
698
  revisions?: Record<string, number> | undefined;
508
699
  checkHashes?: boolean | undefined;
@@ -511,16 +702,20 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
511
702
  };
512
703
  readonly deleteDrive: {
513
704
  readonly name: "deleteDrive";
514
- readonly description: "Delete a drive";
705
+ readonly description: "Delete a drive, passed as `documentId`";
515
706
  readonly inputSchema: {
516
- readonly driveId: z.ZodString;
707
+ readonly documentId: z.ZodOptional<z.ZodString>;
708
+ readonly driveId: z.ZodOptional<z.ZodString>;
709
+ readonly id: z.ZodOptional<z.ZodString>;
517
710
  };
518
711
  readonly outputSchema: {
519
712
  readonly success: z.ZodBoolean;
520
713
  };
521
714
  } & {
522
715
  callback: (args: {
523
- driveId: string;
716
+ documentId?: string | undefined;
717
+ driveId?: string | undefined;
718
+ id?: string | undefined;
524
719
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
525
720
  };
526
721
  readonly addRemoteDrive: {
@@ -576,11 +771,52 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
576
771
  } & {
577
772
  callback: (args: Record<string, never>) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
578
773
  };
774
+ readonly getCodegenStatus: {
775
+ readonly name: "getCodegenStatus";
776
+ readonly description: "Vetra's code generation for its documents (document models, editors, apps, processors, subgraphs and the package): each one's state, why it failed or was skipped, and the files it wrote. Vetra regenerates a document's code a few seconds after it changes; call this after addActions on such a document, with `waitSeconds` to wait until it settles, before reading or editing the generated code. `loadFailures` lists the project modules Vetra could not load, e.g. generated code that throws on import.";
777
+ readonly inputSchema: {
778
+ readonly documentId: z.ZodOptional<z.ZodString>;
779
+ readonly waitSeconds: z.ZodOptional<z.ZodNumber>;
780
+ };
781
+ readonly outputSchema: {
782
+ readonly active: z.ZodBoolean;
783
+ readonly settled: z.ZodBoolean;
784
+ readonly documents: z.ZodArray<z.ZodObject<{
785
+ documentId: z.ZodString;
786
+ documentType: z.ZodString;
787
+ name: z.ZodOptional<z.ZodString>;
788
+ state: z.ZodEnum<{
789
+ done: "done";
790
+ failed: "failed";
791
+ queued: "queued";
792
+ running: "running";
793
+ skipped: "skipped";
794
+ "waiting-for-install": "waiting-for-install";
795
+ }>;
796
+ message: z.ZodOptional<z.ZodString>;
797
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
798
+ updatedAt: z.ZodString;
799
+ }, z.core.$strip>>;
800
+ readonly loadFailures: z.ZodArray<z.ZodObject<{
801
+ package: z.ZodString;
802
+ kind: z.ZodString;
803
+ message: z.ZodString;
804
+ updatedAt: z.ZodString;
805
+ }, z.core.$strip>>;
806
+ readonly message: z.ZodOptional<z.ZodString>;
807
+ };
808
+ } & {
809
+ callback: (args: {
810
+ documentId?: string | undefined;
811
+ waitSeconds?: number | undefined;
812
+ }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
813
+ };
579
814
  readonly getDocumentModelSchema: {
580
815
  readonly name: "getDocumentModelSchema";
581
- readonly description: "Get the schema of a document model";
816
+ readonly description: "Get the schema of a document model. Pass `compact: true` before addActions: it returns only each action's type, scope and GraphQL input definition, and the enums and types those inputs use. Omit it for the full model, with state schemas, descriptions, errors and examples.";
582
817
  readonly inputSchema: {
583
818
  readonly type: z.ZodString;
819
+ readonly compact: z.ZodOptional<z.ZodBoolean>;
584
820
  };
585
821
  readonly outputSchema: {
586
822
  readonly schema: z.ZodUnknown;
@@ -588,6 +824,7 @@ declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): P
588
824
  } & {
589
825
  callback: (args: {
590
826
  type: string;
827
+ compact?: boolean | undefined;
591
828
  }) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
592
829
  };
593
830
  };
@@ -623,6 +860,6 @@ declare function createBaseAction(type: string, input: unknown, scope: string):
623
860
  errors: string[];
624
861
  } | null;
625
862
  //#endregion
626
- export { ToolSchema as C, ResolveZodSchema as S, getDocumentsTool as _, ReactorMcpProviderOptions as a, ExtractCallbackFromTool as b, addDriveTool as c, createReactorMcpProvider as d, deleteDocumentTool as f, getDocumentTool as g, getDocumentModelsTool as h, validateDocumentModelAction as i, addRemoteDriveTool as l, getDocumentModelSchemaTool as m, createBaseAction as n, ReactorMcpTools as o, deleteDriveTool as p, toolWithCallback as r, addActionsTool as s, InvalidToolOutputError as t, createDocumentTool as u, getDriveTool as v, ToolWithCallback as w, IMcpProvider as x, getDrivesTool as y };
863
+ export { ResolveZodSchema as C, compactDocumentModelSchema as D, CompactDocumentModelSchema as E, IMcpProvider as S, ToolWithCallback as T, getDocumentTool as _, ReactorMcpProviderOptions as a, getDrivesTool as b, addDriveTool as c, createReactorMcpProvider as d, deleteDocumentTool as f, getDocumentModelsTool as g, getDocumentModelSchemaTool as h, validateDocumentModelAction as i, addRemoteDriveTool as l, getCodegenStatusTool as m, createBaseAction as n, ReactorMcpTools as o, deleteDriveTool as p, toolWithCallback as r, addActionsTool as s, InvalidToolOutputError as t, createDocumentTool as u, getDocumentsTool as v, ToolSchema as w, ExtractCallbackFromTool as x, getDriveTool as y };
627
864
  export {};
628
- //# sourceMappingURL=index-BX9XmJWL.d.mts.map
865
+ //# sourceMappingURL=index-D9YfSE7M.d.mts.map