@powerhousedao/reactor-mcp 6.2.3-dev.79 → 6.2.3-dev.80
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/dist/admin-tools-B-ZmrfuR.d.mts +131 -0
- package/dist/admin-tools-B-ZmrfuR.d.mts.map +1 -0
- package/dist/admin-tools.d.mts +3 -0
- package/dist/admin-tools.mjs +192 -0
- package/dist/admin-tools.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +44 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/dist/server-aC2pHzQO.mjs +329 -0
- package/dist/server-aC2pHzQO.mjs.map +1 -0
- package/dist/tools/index.d.mts +761 -2
- package/dist/tools/index.d.mts.map +1 -0
- package/dist/tools/index.mjs +1555 -2
- package/dist/tools/index.mjs.map +1 -0
- package/package.json +11 -6
- package/dist/index-D9YfSE7M.d.mts +0 -865
- package/dist/index-D9YfSE7M.d.mts.map +0 -1
- package/dist/reactor-Cku02YAV.mjs +0 -743
- package/dist/reactor-Cku02YAV.mjs.map +0 -1
- package/dist/server-CPSr7how.mjs +0 -61
- package/dist/server-CPSr7how.mjs.map +0 -1
|
@@ -1,865 +0,0 @@
|
|
|
1
|
-
import { ToolCallback } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { IReactorClient, ISyncManager } from "@powerhousedao/reactor";
|
|
3
|
-
import { Action, AuthSubject, DocumentModelGlobalState, DocumentModelModule } from "@powerhousedao/shared/document-model";
|
|
4
|
-
import { CodegenStatusRegistry } from "@powerhousedao/shared/processors";
|
|
5
|
-
import { ZodRawShape, z } from "zod";
|
|
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
|
|
25
|
-
//#region src/tools/types.d.ts
|
|
26
|
-
type ExtractCallbackFromTool<T extends ToolSchema> = T extends {
|
|
27
|
-
inputSchema: infer S;
|
|
28
|
-
} ? ToolCallback<S extends ZodRawShape ? S : undefined> : ToolCallback;
|
|
29
|
-
type ToolWithCallback<T extends ToolSchema = ToolSchema> = T & {
|
|
30
|
-
callback: ExtractCallbackFromTool<T>;
|
|
31
|
-
};
|
|
32
|
-
type ToolSchema<InputArgs extends ZodRawShape = ZodRawShape, OutputArgs extends ZodRawShape = ZodRawShape> = {
|
|
33
|
-
name: string;
|
|
34
|
-
title?: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
inputSchema?: InputArgs;
|
|
37
|
-
outputSchema?: OutputArgs;
|
|
38
|
-
annotations?: ToolAnnotations;
|
|
39
|
-
};
|
|
40
|
-
type ResolveZodSchema<T> = T extends z.ZodRawShape ? z.infer<z.ZodObject<T>> : T;
|
|
41
|
-
interface IMcpProvider<T extends ToolWithCallback = ToolWithCallback, R extends Resource = Resource, P extends Prompt = Prompt> {
|
|
42
|
-
tools: Record<T["name"], ToolWithCallback<T>>;
|
|
43
|
-
resources: Record<R["name"], R>;
|
|
44
|
-
prompts: Record<P["name"], P>;
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/tools/reactor.d.ts
|
|
48
|
-
type ReactorMcpProviderOptions = {
|
|
49
|
-
client: IReactorClient;
|
|
50
|
-
syncManager?: ISyncManager;
|
|
51
|
-
/**
|
|
52
|
-
* Who the tools read as. A server shared by many callers must set it, an
|
|
53
|
-
* anonymous one to an empty subject. Omitted, reads fall back to the
|
|
54
|
-
* client's signer, which only a single-user local reactor should rely on.
|
|
55
|
-
*/
|
|
56
|
-
subject?: AuthSubject;
|
|
57
|
-
/** Vetra's codegen status; the process's registry by default. */
|
|
58
|
-
codegenStatus?: CodegenStatusRegistry;
|
|
59
|
-
};
|
|
60
|
-
declare const createDocumentTool: {
|
|
61
|
-
readonly name: "createDocument";
|
|
62
|
-
readonly description: `Create a new document.
|
|
63
|
-
Unless the user specifies otherwise, and a drive named "vetra" is available, add the document to that drive by providing the drive's ID in the "driveId" parameter.
|
|
64
|
-
When "driveId" is provided, the document is created and added to the drive atomically — no separate "addActions" call with "ADD_FILE" is needed.`;
|
|
65
|
-
readonly inputSchema: {
|
|
66
|
-
readonly documentType: z.ZodString;
|
|
67
|
-
readonly name: z.ZodOptional<z.ZodString>;
|
|
68
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
69
|
-
readonly parentFolder: z.ZodOptional<z.ZodString>;
|
|
70
|
-
};
|
|
71
|
-
readonly outputSchema: {
|
|
72
|
-
readonly documentId: z.ZodString;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
declare const getDocumentTool: {
|
|
76
|
-
readonly name: "getDocument";
|
|
77
|
-
readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
|
|
78
|
-
readonly inputSchema: {
|
|
79
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
80
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
81
|
-
};
|
|
82
|
-
readonly outputSchema: {
|
|
83
|
-
readonly document: z.ZodUnknown;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
declare const getDocumentsTool: {
|
|
87
|
-
readonly name: "getDocuments";
|
|
88
|
-
readonly description: "List documents in a drive, passed as `documentId`";
|
|
89
|
-
readonly inputSchema: {
|
|
90
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
91
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
92
|
-
readonly parentId: z.ZodOptional<z.ZodString>;
|
|
93
|
-
};
|
|
94
|
-
readonly outputSchema: {
|
|
95
|
-
readonly documentIds: z.ZodArray<z.ZodString>;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
declare const deleteDocumentTool: {
|
|
99
|
-
readonly name: "deleteDocument";
|
|
100
|
-
readonly description: "Delete a document, passed as `documentId`";
|
|
101
|
-
readonly inputSchema: {
|
|
102
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
103
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
104
|
-
};
|
|
105
|
-
readonly outputSchema: {
|
|
106
|
-
readonly success: z.ZodBoolean;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
declare const addActionsTool: {
|
|
110
|
-
readonly name: "addActions";
|
|
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`.";
|
|
112
|
-
readonly inputSchema: {
|
|
113
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
114
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
115
|
-
readonly actions: z.ZodArray<z.ZodObject<{
|
|
116
|
-
type: z.ZodString;
|
|
117
|
-
input: z.ZodUnknown;
|
|
118
|
-
scope: z.ZodString;
|
|
119
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
|
-
}, z.core.$strict>>;
|
|
121
|
-
};
|
|
122
|
-
readonly outputSchema: {
|
|
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>;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
declare const getDrivesTool: {
|
|
179
|
-
readonly name: "getDrives";
|
|
180
|
-
readonly description: "List all drives";
|
|
181
|
-
readonly inputSchema: {};
|
|
182
|
-
readonly outputSchema: {
|
|
183
|
-
readonly driveIds: z.ZodArray<z.ZodString>;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
declare const addDriveTool: {
|
|
187
|
-
readonly name: "addDrive";
|
|
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.";
|
|
189
|
-
readonly inputSchema: {
|
|
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<{
|
|
197
|
-
name: z.ZodString;
|
|
198
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
199
|
-
}, z.core.$strip>>;
|
|
200
|
-
preferredEditor: z.ZodOptional<z.ZodString>;
|
|
201
|
-
local: z.ZodOptional<z.ZodObject<{
|
|
202
|
-
availableOffline: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
204
|
-
}, z.core.$strip>>;
|
|
205
|
-
}, z.core.$strip>>;
|
|
206
|
-
};
|
|
207
|
-
readonly outputSchema: {
|
|
208
|
-
readonly driveId: z.ZodString;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
declare const getDriveTool: {
|
|
212
|
-
readonly name: "getDrive";
|
|
213
|
-
readonly description: "Get a specific drive, passed as `documentId`";
|
|
214
|
-
readonly inputSchema: {
|
|
215
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
216
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
217
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
218
|
-
readonly options: z.ZodOptional<z.ZodObject<{
|
|
219
|
-
revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
220
|
-
checkHashes: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
-
}, z.core.$strip>>;
|
|
222
|
-
};
|
|
223
|
-
readonly outputSchema: {
|
|
224
|
-
readonly drive: z.ZodUnknown;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
declare const deleteDriveTool: {
|
|
228
|
-
readonly name: "deleteDrive";
|
|
229
|
-
readonly description: "Delete a drive, passed as `documentId`";
|
|
230
|
-
readonly inputSchema: {
|
|
231
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
232
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
233
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
234
|
-
};
|
|
235
|
-
readonly outputSchema: {
|
|
236
|
-
readonly success: z.ZodBoolean;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
declare const addRemoteDriveTool: {
|
|
240
|
-
readonly name: "addRemoteDrive";
|
|
241
|
-
readonly description: "Connect to a remote drive";
|
|
242
|
-
readonly inputSchema: {
|
|
243
|
-
readonly url: z.ZodString;
|
|
244
|
-
readonly options: z.ZodObject<{
|
|
245
|
-
availableOffline: z.ZodBoolean;
|
|
246
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
|
-
pullFilter: z.ZodOptional<z.ZodObject<{
|
|
248
|
-
branch: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
249
|
-
documentId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
250
|
-
documentType: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
251
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
252
|
-
}, z.core.$strip>>;
|
|
253
|
-
pullInterval: z.ZodOptional<z.ZodNumber>;
|
|
254
|
-
}, z.core.$strip>;
|
|
255
|
-
};
|
|
256
|
-
readonly outputSchema: {
|
|
257
|
-
readonly driveId: z.ZodString;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
declare const getDocumentModelSchemaTool: {
|
|
261
|
-
readonly name: "getDocumentModelSchema";
|
|
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.";
|
|
263
|
-
readonly inputSchema: {
|
|
264
|
-
readonly type: z.ZodString;
|
|
265
|
-
readonly compact: z.ZodOptional<z.ZodBoolean>;
|
|
266
|
-
};
|
|
267
|
-
readonly outputSchema: {
|
|
268
|
-
readonly schema: z.ZodUnknown;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
declare const getDocumentModelsTool: {
|
|
272
|
-
readonly name: "getDocumentModels";
|
|
273
|
-
readonly description: "Get the list of document models";
|
|
274
|
-
readonly inputSchema: {};
|
|
275
|
-
readonly outputSchema: {
|
|
276
|
-
readonly documentModels: z.ZodArray<z.ZodObject<{
|
|
277
|
-
name: z.ZodString;
|
|
278
|
-
type: z.ZodString;
|
|
279
|
-
description: z.ZodString;
|
|
280
|
-
extension: z.ZodString;
|
|
281
|
-
authorName: z.ZodString;
|
|
282
|
-
authorWebsite: z.ZodString;
|
|
283
|
-
}, z.core.$strip>>;
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
type ToolRecord<T extends readonly ToolSchema[]> = { [K in T[number]["name"]]: ToolWithCallback<Extract<T[number], {
|
|
287
|
-
name: K;
|
|
288
|
-
}>>; };
|
|
289
|
-
declare const _allTools: readonly [{
|
|
290
|
-
readonly name: "getDocument";
|
|
291
|
-
readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
|
|
292
|
-
readonly inputSchema: {
|
|
293
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
294
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
295
|
-
};
|
|
296
|
-
readonly outputSchema: {
|
|
297
|
-
readonly document: z.ZodUnknown;
|
|
298
|
-
};
|
|
299
|
-
}, {
|
|
300
|
-
readonly name: "createDocument";
|
|
301
|
-
readonly description: `Create a new document.
|
|
302
|
-
Unless the user specifies otherwise, and a drive named "vetra" is available, add the document to that drive by providing the drive's ID in the "driveId" parameter.
|
|
303
|
-
When "driveId" is provided, the document is created and added to the drive atomically — no separate "addActions" call with "ADD_FILE" is needed.`;
|
|
304
|
-
readonly inputSchema: {
|
|
305
|
-
readonly documentType: z.ZodString;
|
|
306
|
-
readonly name: z.ZodOptional<z.ZodString>;
|
|
307
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
308
|
-
readonly parentFolder: z.ZodOptional<z.ZodString>;
|
|
309
|
-
};
|
|
310
|
-
readonly outputSchema: {
|
|
311
|
-
readonly documentId: z.ZodString;
|
|
312
|
-
};
|
|
313
|
-
}, {
|
|
314
|
-
readonly name: "getDocuments";
|
|
315
|
-
readonly description: "List documents in a drive, passed as `documentId`";
|
|
316
|
-
readonly inputSchema: {
|
|
317
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
318
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
319
|
-
readonly parentId: z.ZodOptional<z.ZodString>;
|
|
320
|
-
};
|
|
321
|
-
readonly outputSchema: {
|
|
322
|
-
readonly documentIds: z.ZodArray<z.ZodString>;
|
|
323
|
-
};
|
|
324
|
-
}, {
|
|
325
|
-
readonly name: "deleteDocument";
|
|
326
|
-
readonly description: "Delete a document, passed as `documentId`";
|
|
327
|
-
readonly inputSchema: {
|
|
328
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
329
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
330
|
-
};
|
|
331
|
-
readonly outputSchema: {
|
|
332
|
-
readonly success: z.ZodBoolean;
|
|
333
|
-
};
|
|
334
|
-
}, {
|
|
335
|
-
readonly name: "addActions";
|
|
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`.";
|
|
337
|
-
readonly inputSchema: {
|
|
338
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
339
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
340
|
-
readonly actions: z.ZodArray<z.ZodObject<{
|
|
341
|
-
type: z.ZodString;
|
|
342
|
-
input: z.ZodUnknown;
|
|
343
|
-
scope: z.ZodString;
|
|
344
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
345
|
-
}, z.core.$strict>>;
|
|
346
|
-
};
|
|
347
|
-
readonly outputSchema: {
|
|
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>;
|
|
366
|
-
};
|
|
367
|
-
}, {
|
|
368
|
-
readonly name: "getDrives";
|
|
369
|
-
readonly description: "List all drives";
|
|
370
|
-
readonly inputSchema: {};
|
|
371
|
-
readonly outputSchema: {
|
|
372
|
-
readonly driveIds: z.ZodArray<z.ZodString>;
|
|
373
|
-
};
|
|
374
|
-
}, {
|
|
375
|
-
readonly name: "addDrive";
|
|
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.";
|
|
377
|
-
readonly inputSchema: {
|
|
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<{
|
|
385
|
-
name: z.ZodString;
|
|
386
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
-
}, z.core.$strip>>;
|
|
388
|
-
preferredEditor: z.ZodOptional<z.ZodString>;
|
|
389
|
-
local: z.ZodOptional<z.ZodObject<{
|
|
390
|
-
availableOffline: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
-
}, z.core.$strip>>;
|
|
393
|
-
}, z.core.$strip>>;
|
|
394
|
-
};
|
|
395
|
-
readonly outputSchema: {
|
|
396
|
-
readonly driveId: z.ZodString;
|
|
397
|
-
};
|
|
398
|
-
}, {
|
|
399
|
-
readonly name: "getDrive";
|
|
400
|
-
readonly description: "Get a specific drive, passed as `documentId`";
|
|
401
|
-
readonly inputSchema: {
|
|
402
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
403
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
404
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
405
|
-
readonly options: z.ZodOptional<z.ZodObject<{
|
|
406
|
-
revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
407
|
-
checkHashes: z.ZodOptional<z.ZodBoolean>;
|
|
408
|
-
}, z.core.$strip>>;
|
|
409
|
-
};
|
|
410
|
-
readonly outputSchema: {
|
|
411
|
-
readonly drive: z.ZodUnknown;
|
|
412
|
-
};
|
|
413
|
-
}, {
|
|
414
|
-
readonly name: "deleteDrive";
|
|
415
|
-
readonly description: "Delete a drive, passed as `documentId`";
|
|
416
|
-
readonly inputSchema: {
|
|
417
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
418
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
419
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
420
|
-
};
|
|
421
|
-
readonly outputSchema: {
|
|
422
|
-
readonly success: z.ZodBoolean;
|
|
423
|
-
};
|
|
424
|
-
}, {
|
|
425
|
-
readonly name: "addRemoteDrive";
|
|
426
|
-
readonly description: "Connect to a remote drive";
|
|
427
|
-
readonly inputSchema: {
|
|
428
|
-
readonly url: z.ZodString;
|
|
429
|
-
readonly options: z.ZodObject<{
|
|
430
|
-
availableOffline: z.ZodBoolean;
|
|
431
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
-
pullFilter: z.ZodOptional<z.ZodObject<{
|
|
433
|
-
branch: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
434
|
-
documentId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
435
|
-
documentType: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
436
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
437
|
-
}, z.core.$strip>>;
|
|
438
|
-
pullInterval: z.ZodOptional<z.ZodNumber>;
|
|
439
|
-
}, z.core.$strip>;
|
|
440
|
-
};
|
|
441
|
-
readonly outputSchema: {
|
|
442
|
-
readonly driveId: z.ZodString;
|
|
443
|
-
};
|
|
444
|
-
}, {
|
|
445
|
-
readonly name: "getDocumentModelSchema";
|
|
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.";
|
|
447
|
-
readonly inputSchema: {
|
|
448
|
-
readonly type: z.ZodString;
|
|
449
|
-
readonly compact: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
-
};
|
|
451
|
-
readonly outputSchema: {
|
|
452
|
-
readonly schema: z.ZodUnknown;
|
|
453
|
-
};
|
|
454
|
-
}, {
|
|
455
|
-
readonly name: "getDocumentModels";
|
|
456
|
-
readonly description: "Get the list of document models";
|
|
457
|
-
readonly inputSchema: {};
|
|
458
|
-
readonly outputSchema: {
|
|
459
|
-
readonly documentModels: z.ZodArray<z.ZodObject<{
|
|
460
|
-
name: z.ZodString;
|
|
461
|
-
type: z.ZodString;
|
|
462
|
-
description: z.ZodString;
|
|
463
|
-
extension: z.ZodString;
|
|
464
|
-
authorName: z.ZodString;
|
|
465
|
-
authorWebsite: z.ZodString;
|
|
466
|
-
}, z.core.$strip>>;
|
|
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
|
-
};
|
|
502
|
-
}];
|
|
503
|
-
type ReactorMcpTools = ToolRecord<typeof _allTools>;
|
|
504
|
-
declare function createReactorMcpProvider(options: ReactorMcpProviderOptions): Promise<{
|
|
505
|
-
readonly tools: {
|
|
506
|
-
readonly getDocument: {
|
|
507
|
-
readonly name: "getDocument";
|
|
508
|
-
readonly description: "Retrieve a document or drive by its ID, passed as `documentId`";
|
|
509
|
-
readonly inputSchema: {
|
|
510
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
511
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
512
|
-
};
|
|
513
|
-
readonly outputSchema: {
|
|
514
|
-
readonly document: z.ZodUnknown;
|
|
515
|
-
};
|
|
516
|
-
} & {
|
|
517
|
-
callback: (args: {
|
|
518
|
-
documentId?: string | undefined;
|
|
519
|
-
id?: string | undefined;
|
|
520
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
521
|
-
};
|
|
522
|
-
readonly createDocument: {
|
|
523
|
-
readonly name: "createDocument";
|
|
524
|
-
readonly description: `Create a new document.
|
|
525
|
-
Unless the user specifies otherwise, and a drive named "vetra" is available, add the document to that drive by providing the drive's ID in the "driveId" parameter.
|
|
526
|
-
When "driveId" is provided, the document is created and added to the drive atomically — no separate "addActions" call with "ADD_FILE" is needed.`;
|
|
527
|
-
readonly inputSchema: {
|
|
528
|
-
readonly documentType: z.ZodString;
|
|
529
|
-
readonly name: z.ZodOptional<z.ZodString>;
|
|
530
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
531
|
-
readonly parentFolder: z.ZodOptional<z.ZodString>;
|
|
532
|
-
};
|
|
533
|
-
readonly outputSchema: {
|
|
534
|
-
readonly documentId: z.ZodString;
|
|
535
|
-
};
|
|
536
|
-
} & {
|
|
537
|
-
callback: (args: {
|
|
538
|
-
documentType: string;
|
|
539
|
-
name?: string | undefined;
|
|
540
|
-
driveId?: string | undefined;
|
|
541
|
-
parentFolder?: string | undefined;
|
|
542
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
543
|
-
};
|
|
544
|
-
readonly getDocuments: {
|
|
545
|
-
readonly name: "getDocuments";
|
|
546
|
-
readonly description: "List documents in a drive, passed as `documentId`";
|
|
547
|
-
readonly inputSchema: {
|
|
548
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
549
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
550
|
-
readonly parentId: z.ZodOptional<z.ZodString>;
|
|
551
|
-
};
|
|
552
|
-
readonly outputSchema: {
|
|
553
|
-
readonly documentIds: z.ZodArray<z.ZodString>;
|
|
554
|
-
};
|
|
555
|
-
} & {
|
|
556
|
-
callback: (args: {
|
|
557
|
-
documentId?: string | undefined;
|
|
558
|
-
driveId?: string | undefined;
|
|
559
|
-
parentId?: string | undefined;
|
|
560
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
561
|
-
};
|
|
562
|
-
readonly deleteDocument: {
|
|
563
|
-
readonly name: "deleteDocument";
|
|
564
|
-
readonly description: "Delete a document, passed as `documentId`";
|
|
565
|
-
readonly inputSchema: {
|
|
566
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
567
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
568
|
-
};
|
|
569
|
-
readonly outputSchema: {
|
|
570
|
-
readonly success: z.ZodBoolean;
|
|
571
|
-
};
|
|
572
|
-
} & {
|
|
573
|
-
callback: (args: {
|
|
574
|
-
documentId?: string | undefined;
|
|
575
|
-
id?: string | undefined;
|
|
576
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
577
|
-
};
|
|
578
|
-
readonly addActions: {
|
|
579
|
-
readonly name: "addActions";
|
|
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`.";
|
|
581
|
-
readonly inputSchema: {
|
|
582
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
583
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
584
|
-
readonly actions: z.ZodArray<z.ZodObject<{
|
|
585
|
-
type: z.ZodString;
|
|
586
|
-
input: z.ZodUnknown;
|
|
587
|
-
scope: z.ZodString;
|
|
588
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
589
|
-
}, z.core.$strict>>;
|
|
590
|
-
};
|
|
591
|
-
readonly outputSchema: {
|
|
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>;
|
|
610
|
-
};
|
|
611
|
-
} & {
|
|
612
|
-
callback: (args: {
|
|
613
|
-
documentId?: string | undefined;
|
|
614
|
-
id?: string | undefined;
|
|
615
|
-
actions: {
|
|
616
|
-
type: string;
|
|
617
|
-
input: unknown;
|
|
618
|
-
scope: string;
|
|
619
|
-
context?: Record<string, unknown> | undefined;
|
|
620
|
-
}[];
|
|
621
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
622
|
-
};
|
|
623
|
-
readonly getDrives: {
|
|
624
|
-
readonly name: "getDrives";
|
|
625
|
-
readonly description: "List all drives";
|
|
626
|
-
readonly inputSchema: {};
|
|
627
|
-
readonly outputSchema: {
|
|
628
|
-
readonly driveIds: z.ZodArray<z.ZodString>;
|
|
629
|
-
};
|
|
630
|
-
} & {
|
|
631
|
-
callback: (args: Record<string, never>) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
632
|
-
};
|
|
633
|
-
readonly addDrive: {
|
|
634
|
-
readonly name: "addDrive";
|
|
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.";
|
|
636
|
-
readonly inputSchema: {
|
|
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<{
|
|
644
|
-
name: z.ZodString;
|
|
645
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
646
|
-
}, z.core.$strip>>;
|
|
647
|
-
preferredEditor: z.ZodOptional<z.ZodString>;
|
|
648
|
-
local: z.ZodOptional<z.ZodObject<{
|
|
649
|
-
availableOffline: z.ZodOptional<z.ZodBoolean>;
|
|
650
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
651
|
-
}, z.core.$strip>>;
|
|
652
|
-
}, z.core.$strip>>;
|
|
653
|
-
};
|
|
654
|
-
readonly outputSchema: {
|
|
655
|
-
readonly driveId: z.ZodString;
|
|
656
|
-
};
|
|
657
|
-
} & {
|
|
658
|
-
callback: (args: {
|
|
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?: {
|
|
666
|
-
name: string;
|
|
667
|
-
icon?: string | null | undefined;
|
|
668
|
-
} | undefined;
|
|
669
|
-
preferredEditor?: string | undefined;
|
|
670
|
-
local?: {
|
|
671
|
-
availableOffline?: boolean | undefined;
|
|
672
|
-
sharingType?: string | null | undefined;
|
|
673
|
-
} | undefined;
|
|
674
|
-
} | undefined;
|
|
675
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
676
|
-
};
|
|
677
|
-
readonly getDrive: {
|
|
678
|
-
readonly name: "getDrive";
|
|
679
|
-
readonly description: "Get a specific drive, passed as `documentId`";
|
|
680
|
-
readonly inputSchema: {
|
|
681
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
682
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
683
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
684
|
-
readonly options: z.ZodOptional<z.ZodObject<{
|
|
685
|
-
revisions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
686
|
-
checkHashes: z.ZodOptional<z.ZodBoolean>;
|
|
687
|
-
}, z.core.$strip>>;
|
|
688
|
-
};
|
|
689
|
-
readonly outputSchema: {
|
|
690
|
-
readonly drive: z.ZodUnknown;
|
|
691
|
-
};
|
|
692
|
-
} & {
|
|
693
|
-
callback: (args: {
|
|
694
|
-
documentId?: string | undefined;
|
|
695
|
-
driveId?: string | undefined;
|
|
696
|
-
id?: string | undefined;
|
|
697
|
-
options?: {
|
|
698
|
-
revisions?: Record<string, number> | undefined;
|
|
699
|
-
checkHashes?: boolean | undefined;
|
|
700
|
-
} | undefined;
|
|
701
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
702
|
-
};
|
|
703
|
-
readonly deleteDrive: {
|
|
704
|
-
readonly name: "deleteDrive";
|
|
705
|
-
readonly description: "Delete a drive, passed as `documentId`";
|
|
706
|
-
readonly inputSchema: {
|
|
707
|
-
readonly documentId: z.ZodOptional<z.ZodString>;
|
|
708
|
-
readonly driveId: z.ZodOptional<z.ZodString>;
|
|
709
|
-
readonly id: z.ZodOptional<z.ZodString>;
|
|
710
|
-
};
|
|
711
|
-
readonly outputSchema: {
|
|
712
|
-
readonly success: z.ZodBoolean;
|
|
713
|
-
};
|
|
714
|
-
} & {
|
|
715
|
-
callback: (args: {
|
|
716
|
-
documentId?: string | undefined;
|
|
717
|
-
driveId?: string | undefined;
|
|
718
|
-
id?: string | undefined;
|
|
719
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
720
|
-
};
|
|
721
|
-
readonly addRemoteDrive: {
|
|
722
|
-
readonly name: "addRemoteDrive";
|
|
723
|
-
readonly description: "Connect to a remote drive";
|
|
724
|
-
readonly inputSchema: {
|
|
725
|
-
readonly url: z.ZodString;
|
|
726
|
-
readonly options: z.ZodObject<{
|
|
727
|
-
availableOffline: z.ZodBoolean;
|
|
728
|
-
sharingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
729
|
-
pullFilter: z.ZodOptional<z.ZodObject<{
|
|
730
|
-
branch: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
731
|
-
documentId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
732
|
-
documentType: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
733
|
-
scope: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
734
|
-
}, z.core.$strip>>;
|
|
735
|
-
pullInterval: z.ZodOptional<z.ZodNumber>;
|
|
736
|
-
}, z.core.$strip>;
|
|
737
|
-
};
|
|
738
|
-
readonly outputSchema: {
|
|
739
|
-
readonly driveId: z.ZodString;
|
|
740
|
-
};
|
|
741
|
-
} & {
|
|
742
|
-
callback: (args: {
|
|
743
|
-
url: string;
|
|
744
|
-
options: {
|
|
745
|
-
availableOffline: boolean;
|
|
746
|
-
sharingType?: string | null | undefined;
|
|
747
|
-
pullFilter?: {
|
|
748
|
-
branch?: string[] | null | undefined;
|
|
749
|
-
documentId?: string[] | null | undefined;
|
|
750
|
-
documentType?: string[] | null | undefined;
|
|
751
|
-
scope?: string[] | null | undefined;
|
|
752
|
-
} | undefined;
|
|
753
|
-
pullInterval?: number | undefined;
|
|
754
|
-
};
|
|
755
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
756
|
-
};
|
|
757
|
-
readonly getDocumentModels: {
|
|
758
|
-
readonly name: "getDocumentModels";
|
|
759
|
-
readonly description: "Get the list of document models";
|
|
760
|
-
readonly inputSchema: {};
|
|
761
|
-
readonly outputSchema: {
|
|
762
|
-
readonly documentModels: z.ZodArray<z.ZodObject<{
|
|
763
|
-
name: z.ZodString;
|
|
764
|
-
type: z.ZodString;
|
|
765
|
-
description: z.ZodString;
|
|
766
|
-
extension: z.ZodString;
|
|
767
|
-
authorName: z.ZodString;
|
|
768
|
-
authorWebsite: z.ZodString;
|
|
769
|
-
}, z.core.$strip>>;
|
|
770
|
-
};
|
|
771
|
-
} & {
|
|
772
|
-
callback: (args: Record<string, never>) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
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
|
-
};
|
|
814
|
-
readonly getDocumentModelSchema: {
|
|
815
|
-
readonly name: "getDocumentModelSchema";
|
|
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.";
|
|
817
|
-
readonly inputSchema: {
|
|
818
|
-
readonly type: z.ZodString;
|
|
819
|
-
readonly compact: z.ZodOptional<z.ZodBoolean>;
|
|
820
|
-
};
|
|
821
|
-
readonly outputSchema: {
|
|
822
|
-
readonly schema: z.ZodUnknown;
|
|
823
|
-
};
|
|
824
|
-
} & {
|
|
825
|
-
callback: (args: {
|
|
826
|
-
type: string;
|
|
827
|
-
compact?: boolean | undefined;
|
|
828
|
-
}) => Promise<import("@modelcontextprotocol/sdk/types").CallToolResult>;
|
|
829
|
-
};
|
|
830
|
-
};
|
|
831
|
-
readonly resources: {};
|
|
832
|
-
readonly prompts: {};
|
|
833
|
-
}>;
|
|
834
|
-
//#endregion
|
|
835
|
-
//#region src/tools/utils.d.ts
|
|
836
|
-
declare class InvalidToolOutputError extends Error {
|
|
837
|
-
constructor(zodError: z.ZodError);
|
|
838
|
-
}
|
|
839
|
-
/**
|
|
840
|
-
* Creates a tool with a callback function that handles the tool execution,
|
|
841
|
-
* ensuring the output is valid and errors are handled and returned correctly.
|
|
842
|
-
* @param tool The tool schema to wrap.
|
|
843
|
-
* @param toolCallback The callback function to execute when the tool is called.
|
|
844
|
-
* @returns A CallToolResult with structuredContent if OutputSchema is defined or content if undefined. If the
|
|
845
|
-
* callback throws an error, the result will have isError set to true and the error message in the content.
|
|
846
|
-
*/
|
|
847
|
-
declare function toolWithCallback<T extends ToolSchema>(tool: T, toolCallback: (args: ResolveZodSchema<T["inputSchema"]>) => ResolveZodSchema<T["outputSchema"]> | Promise<ResolveZodSchema<T["outputSchema"]>>): T & {
|
|
848
|
-
callback: (args: ResolveZodSchema<T["inputSchema"]>) => Promise<CallToolResult>;
|
|
849
|
-
};
|
|
850
|
-
declare function validateDocumentModelAction(documentModelModule: DocumentModelModule, action: Action): {
|
|
851
|
-
isValid: boolean;
|
|
852
|
-
errors: string[];
|
|
853
|
-
};
|
|
854
|
-
/**
|
|
855
|
-
* Builds a document-model base action (SET_NAME, SET_PREFERRED_EDITOR, UNDO,
|
|
856
|
-
* REDO, NOOP) with its action creator. Returns `null` for any other type.
|
|
857
|
-
*/
|
|
858
|
-
declare function createBaseAction(type: string, input: unknown, scope: string): {
|
|
859
|
-
action: Action | null;
|
|
860
|
-
errors: string[];
|
|
861
|
-
} | null;
|
|
862
|
-
//#endregion
|
|
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 };
|
|
864
|
-
export {};
|
|
865
|
-
//# sourceMappingURL=index-D9YfSE7M.d.mts.map
|