@openfairygui/mcp 0.3.1 → 0.5.0-alpha.1

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/index.d.cts CHANGED
@@ -1,21 +1,18 @@
1
1
  import { connectOpenFairyGuiMcpStdio } from "./stdio.cjs";
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
4
- import { BackendRuntime } from "@openfairygui/backend";
4
+ import { BackendMethodName, BackendMethodName as BackendMethodName$1, BackendRuntime } from "@openfairygui/backend";
5
5
  import { z } from "zod";
6
+ import { OPENFAIRYGUI_OPERATION_CATALOG_URI, OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema } from "@openfairygui/backend/docs";
6
7
 
7
- //#region src/tool-definitions.d.ts
8
- declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
9
- declare const OPENFAIRYGUI_BACKEND_TOOL_NAMES: readonly ["openfairygui_backend_get_capabilities", "openfairygui_backend_open_session", "openfairygui_backend_open_project_session", "openfairygui_backend_get_session", "openfairygui_backend_get_project_outline", "openfairygui_backend_validate_session", "openfairygui_backend_apply_transaction", "openfairygui_backend_save_session", "openfairygui_backend_materialize_session", "openfairygui_backend_close_session", "openfairygui_backend_get_events", "openfairygui_backend_get_job", "openfairygui_backend_list_jobs", "openfairygui_backend_cancel_job", "openfairygui_backend_get_cache_snapshot", "openfairygui_backend_refresh_cache"];
10
- type OpenFairyGuiBackendToolName = typeof OPENFAIRYGUI_BACKEND_TOOL_NAMES[number];
11
- type BackendMethodName = 'getCapabilities' | 'openSession' | 'openProjectSession' | 'getSession' | 'getProjectOutline' | 'validateSession' | 'applyTransaction' | 'saveSession' | 'materializeSession' | 'closeSession' | 'getEvents' | 'getJob' | 'listJobs' | 'cancelJob' | 'getCacheSnapshot' | 'refreshCache';
12
- interface OpenFairyGuiBackendToolDefinition {
13
- name: OpenFairyGuiBackendToolName;
14
- backendMethod: BackendMethodName;
8
+ //#region src/tool-metadata.d.ts
9
+ interface BackendToolMetadata {
10
+ name: `openfairygui_backend_${string}`;
11
+ backendMethod: BackendMethodName$1;
15
12
  title: string;
16
13
  description: string;
17
- inputSchema: z.ZodObject;
18
- outputSchema: z.ZodObject;
14
+ /** Bound the complete CallToolResult JSON; bounded reads use compact text JSON. */
15
+ maxResponseBytes?: number;
19
16
  annotations: {
20
17
  readOnlyHint?: boolean;
21
18
  destructiveHint?: boolean;
@@ -23,42 +20,11 @@ interface OpenFairyGuiBackendToolDefinition {
23
20
  openWorldHint?: boolean;
24
21
  };
25
22
  }
26
- declare const OPENFAIRYGUI_BACKEND_TOOL_OUTPUT_SCHEMA: z.ZodObject<{
27
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
28
- ok: z.ZodLiteral<true>;
29
- data: z.ZodJSONSchema;
30
- meta: z.ZodJSONSchema;
31
- }, z.core.$strip>, z.ZodObject<{
32
- ok: z.ZodLiteral<false>;
33
- error: z.ZodObject<{
34
- code: z.ZodString;
35
- message: z.ZodString;
36
- }, z.core.$loose>;
37
- meta: z.ZodJSONSchema;
38
- session: z.ZodOptional<z.ZodJSONSchema>;
39
- }, z.core.$strip>], "ok">;
40
- }, z.core.$strip>;
41
- declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
23
+ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
42
24
  readonly name: "openfairygui_backend_get_capabilities";
43
25
  readonly backendMethod: "getCapabilities";
44
26
  readonly title: "Get Backend Capabilities";
45
27
  readonly description: "Return the OpenFairyGUI backend capability, version, and service-plane snapshot.";
46
- readonly inputSchema: z.ZodObject<{}, z.core.$strip>;
47
- readonly outputSchema: z.ZodObject<{
48
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
49
- ok: z.ZodLiteral<true>;
50
- data: z.ZodJSONSchema;
51
- meta: z.ZodJSONSchema;
52
- }, z.core.$strip>, z.ZodObject<{
53
- ok: z.ZodLiteral<false>;
54
- error: z.ZodObject<{
55
- code: z.ZodString;
56
- message: z.ZodString;
57
- }, z.core.$loose>;
58
- meta: z.ZodJSONSchema;
59
- session: z.ZodOptional<z.ZodJSONSchema>;
60
- }, z.core.$strip>], "ok">;
61
- }, z.core.$strip>;
62
28
  readonly annotations: {
63
29
  readonly readOnlyHint: true;
64
30
  readonly idempotentHint: true;
@@ -69,24 +35,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
69
35
  readonly backendMethod: "openSession";
70
36
  readonly title: "Open Backend Session";
71
37
  readonly description: "Open a FairyGUI project through BackendRuntime and acquire its backend-local session lock.";
72
- readonly inputSchema: z.ZodObject<{
73
- projectPath: z.ZodString;
74
- }, z.core.$strip>;
75
- readonly outputSchema: z.ZodObject<{
76
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
77
- ok: z.ZodLiteral<true>;
78
- data: z.ZodJSONSchema;
79
- meta: z.ZodJSONSchema;
80
- }, z.core.$strip>, z.ZodObject<{
81
- ok: z.ZodLiteral<false>;
82
- error: z.ZodObject<{
83
- code: z.ZodString;
84
- message: z.ZodString;
85
- }, z.core.$loose>;
86
- meta: z.ZodJSONSchema;
87
- session: z.ZodOptional<z.ZodJSONSchema>;
88
- }, z.core.$strip>], "ok">;
89
- }, z.core.$strip>;
90
38
  readonly annotations: {
91
39
  readonly readOnlyHint: false;
92
40
  readonly idempotentHint: false;
@@ -97,43 +45,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
97
45
  readonly backendMethod: "openProjectSession";
98
46
  readonly title: "Open Project Session";
99
47
  readonly description: "Open a browser-safe backend session from an already loaded UAM project without filesystem access.";
100
- readonly inputSchema: z.ZodObject<{
101
- project: z.ZodObject<{
102
- projectId: z.ZodString;
103
- projectType: z.ZodNumber;
104
- version: z.ZodString;
105
- branches: z.ZodArray<z.ZodString>;
106
- settings: z.ZodJSONSchema;
107
- packages: z.ZodArray<z.ZodObject<{
108
- id: z.ZodString;
109
- name: z.ZodString;
110
- compressPNG: z.ZodNullable<z.ZodBoolean>;
111
- jpegQuality: z.ZodNullable<z.ZodNumber>;
112
- publish: z.ZodNullable<z.ZodJSONSchema>;
113
- branchNames: z.ZodArray<z.ZodString>;
114
- folders: z.ZodArray<z.ZodJSONSchema>;
115
- resources: z.ZodArray<z.ZodJSONSchema>;
116
- }, z.core.$strip>>;
117
- }, z.core.$strip>;
118
- sessionId: z.ZodOptional<z.ZodString>;
119
- canonicalProjectPath: z.ZodOptional<z.ZodString>;
120
- canonicalPathKey: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strip>;
122
- readonly outputSchema: z.ZodObject<{
123
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
124
- ok: z.ZodLiteral<true>;
125
- data: z.ZodJSONSchema;
126
- meta: z.ZodJSONSchema;
127
- }, z.core.$strip>, z.ZodObject<{
128
- ok: z.ZodLiteral<false>;
129
- error: z.ZodObject<{
130
- code: z.ZodString;
131
- message: z.ZodString;
132
- }, z.core.$loose>;
133
- meta: z.ZodJSONSchema;
134
- session: z.ZodOptional<z.ZodJSONSchema>;
135
- }, z.core.$strip>], "ok">;
136
- }, z.core.$strip>;
137
48
  readonly annotations: {
138
49
  readonly readOnlyHint: false;
139
50
  readonly idempotentHint: false;
@@ -144,24 +55,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
144
55
  readonly backendMethod: "getSession";
145
56
  readonly title: "Get Backend Session";
146
57
  readonly description: "Return a backend session snapshot by session id.";
147
- readonly inputSchema: z.ZodObject<{
148
- sessionId: z.ZodString;
149
- }, z.core.$strip>;
150
- readonly outputSchema: z.ZodObject<{
151
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
152
- ok: z.ZodLiteral<true>;
153
- data: z.ZodJSONSchema;
154
- meta: z.ZodJSONSchema;
155
- }, z.core.$strip>, z.ZodObject<{
156
- ok: z.ZodLiteral<false>;
157
- error: z.ZodObject<{
158
- code: z.ZodString;
159
- message: z.ZodString;
160
- }, z.core.$loose>;
161
- meta: z.ZodJSONSchema;
162
- session: z.ZodOptional<z.ZodJSONSchema>;
163
- }, z.core.$strip>], "ok">;
164
- }, z.core.$strip>;
165
58
  readonly annotations: {
166
59
  readonly readOnlyHint: true;
167
60
  readonly idempotentHint: true;
@@ -172,24 +65,38 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
172
65
  readonly backendMethod: "getProjectOutline";
173
66
  readonly title: "Get Project Outline";
174
67
  readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads.";
175
- readonly inputSchema: z.ZodObject<{
176
- sessionId: z.ZodString;
177
- }, z.core.$strip>;
178
- readonly outputSchema: z.ZodObject<{
179
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
180
- ok: z.ZodLiteral<true>;
181
- data: z.ZodJSONSchema;
182
- meta: z.ZodJSONSchema;
183
- }, z.core.$strip>, z.ZodObject<{
184
- ok: z.ZodLiteral<false>;
185
- error: z.ZodObject<{
186
- code: z.ZodString;
187
- message: z.ZodString;
188
- }, z.core.$loose>;
189
- meta: z.ZodJSONSchema;
190
- session: z.ZodOptional<z.ZodJSONSchema>;
191
- }, z.core.$strip>], "ok">;
192
- }, z.core.$strip>;
68
+ readonly annotations: {
69
+ readonly readOnlyHint: true;
70
+ readonly idempotentHint: true;
71
+ readonly openWorldHint: false;
72
+ };
73
+ }, {
74
+ readonly name: "openfairygui_backend_query_entity";
75
+ readonly backendMethod: "queryEntity";
76
+ readonly title: "Query Entity Properties";
77
+ readonly description: "Read revision-bound project/package settings, resource, component-property, display-node, controller (including pages/actions), or transition (including items) snapshots. Project queries use only kind; other queries use formal selectors. Settings snapshots include the complete settings payload for updateProjectSettings/updatePackageSettings. No source bytes; fixed projection with explicit response limits.";
78
+ readonly annotations: {
79
+ readonly readOnlyHint: true;
80
+ readonly idempotentHint: true;
81
+ readonly openWorldHint: false;
82
+ };
83
+ }, {
84
+ readonly name: "openfairygui_backend_read_session_state";
85
+ readonly backendMethod: "readSessionState";
86
+ readonly title: "Read Session State";
87
+ readonly description: "Read a detached copy of the currently committed public UAM model without primary asset sourceBytes, with revision, dirty state and source-read diagnostics. Optional expectedRevision rejects stale reads. Does not hydrate, write, reserve history or guarantee downstream usability. Complete tool response is limited to 16 MiB.";
88
+ readonly maxResponseBytes: 16777216;
89
+ readonly annotations: {
90
+ readonly readOnlyHint: true;
91
+ readonly idempotentHint: true;
92
+ readonly openWorldHint: false;
93
+ };
94
+ }, {
95
+ readonly name: "openfairygui_backend_read_resource_bytes";
96
+ readonly backendMethod: "readResourceBytes";
97
+ readonly title: "Read Resource Bytes";
98
+ readonly description: "Read a detached copy of one asset resource primary sourceBytes already held in the session, using exact packageId/resourceId and the required model edit revision. No filesystem hydration or auxiliary-file discovery. Stale reads require restarting the model/bytes read. Complete tool response is limited to 16 MiB.";
99
+ readonly maxResponseBytes: 16777216;
193
100
  readonly annotations: {
194
101
  readonly readOnlyHint: true;
195
102
  readonly idempotentHint: true;
@@ -200,24 +107,16 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
200
107
  readonly backendMethod: "validateSession";
201
108
  readonly title: "Validate Project Session";
202
109
  readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files.";
203
- readonly inputSchema: z.ZodObject<{
204
- sessionId: z.ZodString;
205
- }, z.core.$strip>;
206
- readonly outputSchema: z.ZodObject<{
207
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
208
- ok: z.ZodLiteral<true>;
209
- data: z.ZodJSONSchema;
210
- meta: z.ZodJSONSchema;
211
- }, z.core.$strip>, z.ZodObject<{
212
- ok: z.ZodLiteral<false>;
213
- error: z.ZodObject<{
214
- code: z.ZodString;
215
- message: z.ZodString;
216
- }, z.core.$loose>;
217
- meta: z.ZodJSONSchema;
218
- session: z.ZodOptional<z.ZodJSONSchema>;
219
- }, z.core.$strip>], "ok">;
220
- }, z.core.$strip>;
110
+ readonly annotations: {
111
+ readonly readOnlyHint: true;
112
+ readonly idempotentHint: true;
113
+ readonly openWorldHint: false;
114
+ };
115
+ }, {
116
+ readonly name: "openfairygui_backend_preflight_transaction";
117
+ readonly backendMethod: "preflightTransaction";
118
+ readonly title: "Preview UAM Transaction";
119
+ readonly description: "Execute a revision-checked operation batch on an isolated project snapshot and discard the result. Returns the base revision and Core diagnostics; does not write, reserve a revision, or guarantee a later apply/save.";
221
120
  readonly annotations: {
222
121
  readonly readOnlyHint: true;
223
122
  readonly idempotentHint: true;
@@ -228,302 +127,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
228
127
  readonly backendMethod: "applyTransaction";
229
128
  readonly title: "Apply UAM Transaction";
230
129
  readonly description: "Apply a bounded, revision-checked UAM operation batch using the Core transaction discriminants.";
231
- readonly inputSchema: z.ZodObject<{
232
- sessionId: z.ZodString;
233
- expectedRevision: z.ZodNumber;
234
- operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
235
- kind: z.ZodLiteral<"updateProjectSettings">;
236
- settings: z.ZodJSONSchema;
237
- opId: z.ZodOptional<z.ZodString>;
238
- }, z.core.$strip>, z.ZodObject<{
239
- kind: z.ZodLiteral<"updatePackageSettings">;
240
- selector: z.ZodObject<{
241
- packageId: z.ZodString;
242
- }, z.core.$strip>;
243
- settings: z.ZodJSONSchema;
244
- opId: z.ZodOptional<z.ZodString>;
245
- }, z.core.$strip>, z.ZodObject<{
246
- kind: z.ZodLiteral<"renameResource">;
247
- selector: z.ZodObject<{
248
- packageId: z.ZodString;
249
- resourceId: z.ZodString;
250
- }, z.core.$strip>;
251
- newName: z.ZodString;
252
- opId: z.ZodOptional<z.ZodString>;
253
- }, z.core.$strip>, z.ZodObject<{
254
- kind: z.ZodLiteral<"moveResource">;
255
- selector: z.ZodObject<{
256
- packageId: z.ZodString;
257
- resourceId: z.ZodString;
258
- }, z.core.$strip>;
259
- toPath: z.ZodString;
260
- opId: z.ZodOptional<z.ZodString>;
261
- }, z.core.$strip>, z.ZodObject<{
262
- kind: z.ZodLiteral<"setResourceFavorite">;
263
- selector: z.ZodObject<{
264
- packageId: z.ZodString;
265
- resourceId: z.ZodString;
266
- }, z.core.$strip>;
267
- favorite: z.ZodBoolean;
268
- opId: z.ZodOptional<z.ZodString>;
269
- }, z.core.$strip>, z.ZodObject<{
270
- kind: z.ZodLiteral<"setResourceFolderFavorite">;
271
- selector: z.ZodObject<{
272
- packageId: z.ZodString;
273
- branch: z.ZodOptional<z.ZodString>;
274
- path: z.ZodString;
275
- }, z.core.$strip>;
276
- favorite: z.ZodBoolean;
277
- opId: z.ZodOptional<z.ZodString>;
278
- }, z.core.$strip>, z.ZodObject<{
279
- kind: z.ZodLiteral<"setResourceFolderAtlas">;
280
- selector: z.ZodObject<{
281
- packageId: z.ZodString;
282
- branch: z.ZodOptional<z.ZodString>;
283
- path: z.ZodString;
284
- }, z.core.$strip>;
285
- atlas: z.ZodString;
286
- opId: z.ZodOptional<z.ZodString>;
287
- }, z.core.$strip>, z.ZodObject<{
288
- kind: z.ZodLiteral<"setResourceExported">;
289
- selector: z.ZodObject<{
290
- packageId: z.ZodString;
291
- resourceId: z.ZodString;
292
- }, z.core.$strip>;
293
- exported: z.ZodBoolean;
294
- opId: z.ZodOptional<z.ZodString>;
295
- }, z.core.$strip>, z.ZodObject<{
296
- kind: z.ZodLiteral<"addResourceFolder">;
297
- selector: z.ZodObject<{
298
- packageId: z.ZodString;
299
- }, z.core.$strip>;
300
- path: z.ZodString;
301
- branch: z.ZodOptional<z.ZodString>;
302
- favorite: z.ZodOptional<z.ZodBoolean>;
303
- atlas: z.ZodOptional<z.ZodString>;
304
- opId: z.ZodOptional<z.ZodString>;
305
- }, z.core.$strip>, z.ZodObject<{
306
- kind: z.ZodLiteral<"renameResourceFolder">;
307
- selector: z.ZodObject<{
308
- packageId: z.ZodString;
309
- branch: z.ZodOptional<z.ZodString>;
310
- path: z.ZodString;
311
- }, z.core.$strip>;
312
- newName: z.ZodString;
313
- opId: z.ZodOptional<z.ZodString>;
314
- }, z.core.$strip>, z.ZodObject<{
315
- kind: z.ZodLiteral<"moveResourceFolder">;
316
- selector: z.ZodObject<{
317
- packageId: z.ZodString;
318
- branch: z.ZodOptional<z.ZodString>;
319
- path: z.ZodString;
320
- }, z.core.$strip>;
321
- toPath: z.ZodString;
322
- opId: z.ZodOptional<z.ZodString>;
323
- }, z.core.$strip>, z.ZodObject<{
324
- kind: z.ZodLiteral<"removeResourceFolder">;
325
- selector: z.ZodObject<{
326
- packageId: z.ZodString;
327
- branch: z.ZodOptional<z.ZodString>;
328
- path: z.ZodString;
329
- }, z.core.$strip>;
330
- opId: z.ZodOptional<z.ZodString>;
331
- }, z.core.$strip>, z.ZodObject<{
332
- kind: z.ZodLiteral<"setImageResourceProps">;
333
- selector: z.ZodObject<{
334
- packageId: z.ZodString;
335
- resourceId: z.ZodString;
336
- }, z.core.$strip>;
337
- props: z.ZodJSONSchema;
338
- opId: z.ZodOptional<z.ZodString>;
339
- }, z.core.$strip>, z.ZodObject<{
340
- kind: z.ZodLiteral<"addResource">;
341
- selector: z.ZodObject<{
342
- packageId: z.ZodString;
343
- }, z.core.$strip>;
344
- resource: z.ZodJSONSchema;
345
- atIndex: z.ZodOptional<z.ZodNumber>;
346
- opId: z.ZodOptional<z.ZodString>;
347
- }, z.core.$strip>, z.ZodObject<{
348
- kind: z.ZodLiteral<"addBranch">;
349
- branch: z.ZodString;
350
- opId: z.ZodOptional<z.ZodString>;
351
- }, z.core.$strip>, z.ZodObject<{
352
- kind: z.ZodLiteral<"renameBranch">;
353
- selector: z.ZodObject<{
354
- branch: z.ZodString;
355
- }, z.core.$strip>;
356
- newName: z.ZodString;
357
- opId: z.ZodOptional<z.ZodString>;
358
- }, z.core.$strip>, z.ZodObject<{
359
- kind: z.ZodLiteral<"removeBranch">;
360
- selector: z.ZodObject<{
361
- branch: z.ZodString;
362
- }, z.core.$strip>;
363
- opId: z.ZodOptional<z.ZodString>;
364
- }, z.core.$strip>, z.ZodObject<{
365
- kind: z.ZodLiteral<"addPackage">;
366
- package: z.ZodJSONSchema;
367
- atIndex: z.ZodNumber;
368
- opId: z.ZodOptional<z.ZodString>;
369
- }, z.core.$strip>, z.ZodObject<{
370
- kind: z.ZodLiteral<"renamePackage">;
371
- selector: z.ZodObject<{
372
- packageId: z.ZodString;
373
- }, z.core.$strip>;
374
- newName: z.ZodString;
375
- opId: z.ZodOptional<z.ZodString>;
376
- }, z.core.$strip>, z.ZodObject<{
377
- kind: z.ZodLiteral<"removePackage">;
378
- selector: z.ZodObject<{
379
- packageId: z.ZodString;
380
- }, z.core.$strip>;
381
- opId: z.ZodOptional<z.ZodString>;
382
- }, z.core.$strip>, z.ZodObject<{
383
- kind: z.ZodLiteral<"addComponent">;
384
- selector: z.ZodObject<{
385
- packageId: z.ZodString;
386
- }, z.core.$strip>;
387
- component: z.ZodJSONSchema;
388
- atIndex: z.ZodNumber;
389
- opId: z.ZodOptional<z.ZodString>;
390
- }, z.core.$strip>, z.ZodObject<{
391
- kind: z.ZodLiteral<"removeComponent">;
392
- selector: z.ZodObject<{
393
- packageId: z.ZodString;
394
- componentResourceId: z.ZodString;
395
- }, z.core.$strip>;
396
- opId: z.ZodOptional<z.ZodString>;
397
- }, z.core.$strip>, z.ZodObject<{
398
- kind: z.ZodLiteral<"moveComponent">;
399
- selector: z.ZodObject<{
400
- packageId: z.ZodString;
401
- componentResourceId: z.ZodString;
402
- }, z.core.$strip>;
403
- toPackageId: z.ZodString;
404
- toIndex: z.ZodNumber;
405
- opId: z.ZodOptional<z.ZodString>;
406
- }, z.core.$strip>, z.ZodObject<{
407
- kind: z.ZodLiteral<"replaceResourceBytes">;
408
- selector: z.ZodObject<{
409
- packageId: z.ZodString;
410
- resourceId: z.ZodString;
411
- }, z.core.$strip>;
412
- sourceBytes: z.ZodArray<z.ZodNumber>;
413
- opId: z.ZodOptional<z.ZodString>;
414
- }, z.core.$strip>, z.ZodObject<{
415
- kind: z.ZodLiteral<"removeResource">;
416
- selector: z.ZodObject<{
417
- packageId: z.ZodString;
418
- resourceId: z.ZodString;
419
- }, z.core.$strip>;
420
- opId: z.ZodOptional<z.ZodString>;
421
- }, z.core.$strip>, z.ZodObject<{
422
- kind: z.ZodLiteral<"setDisplayNodeProps">;
423
- selector: z.ZodObject<{
424
- packageId: z.ZodString;
425
- componentResourceId: z.ZodString;
426
- displayNodeId: z.ZodString;
427
- }, z.core.$strip>;
428
- props: z.ZodJSONSchema;
429
- opId: z.ZodOptional<z.ZodString>;
430
- }, z.core.$strip>, z.ZodObject<{
431
- kind: z.ZodLiteral<"setComponentProps">;
432
- selector: z.ZodObject<{
433
- packageId: z.ZodString;
434
- componentResourceId: z.ZodString;
435
- }, z.core.$strip>;
436
- props: z.ZodJSONSchema;
437
- opId: z.ZodOptional<z.ZodString>;
438
- }, z.core.$strip>, z.ZodObject<{
439
- kind: z.ZodLiteral<"attachDisplayNode">;
440
- selector: z.ZodObject<{
441
- packageId: z.ZodString;
442
- componentResourceId: z.ZodString;
443
- }, z.core.$strip>;
444
- atIndex: z.ZodNumber;
445
- node: z.ZodJSONSchema;
446
- opId: z.ZodOptional<z.ZodString>;
447
- }, z.core.$strip>, z.ZodObject<{
448
- kind: z.ZodLiteral<"detachDisplayNode">;
449
- selector: z.ZodObject<{
450
- packageId: z.ZodString;
451
- componentResourceId: z.ZodString;
452
- displayNodeId: z.ZodString;
453
- }, z.core.$strip>;
454
- opId: z.ZodOptional<z.ZodString>;
455
- }, z.core.$strip>, ...(z.ZodObject<{
456
- kind: z.ZodLiteral<"addController" | "updateController">;
457
- selector: z.ZodObject<{
458
- packageId: z.ZodString;
459
- componentResourceId: z.ZodString;
460
- controllerName: z.ZodString;
461
- }, z.core.$strip>;
462
- controller: z.ZodJSONSchema;
463
- opId: z.ZodOptional<z.ZodString>;
464
- }, z.core.$strip> | z.ZodObject<{
465
- kind: z.ZodLiteral<"removeController">;
466
- selector: z.ZodObject<{
467
- packageId: z.ZodString;
468
- componentResourceId: z.ZodString;
469
- controllerName: z.ZodString;
470
- }, z.core.$strip>;
471
- opId: z.ZodOptional<z.ZodString>;
472
- }, z.core.$strip> | z.ZodObject<{
473
- kind: z.ZodLiteral<"addTransition" | "updateTransition">;
474
- selector: z.ZodObject<{
475
- packageId: z.ZodString;
476
- componentResourceId: z.ZodString;
477
- transitionName: z.ZodString;
478
- }, z.core.$strip>;
479
- transition: z.ZodJSONSchema;
480
- opId: z.ZodOptional<z.ZodString>;
481
- }, z.core.$strip> | z.ZodObject<{
482
- kind: z.ZodLiteral<"removeTransition">;
483
- selector: z.ZodObject<{
484
- packageId: z.ZodString;
485
- componentResourceId: z.ZodString;
486
- transitionName: z.ZodString;
487
- }, z.core.$strip>;
488
- opId: z.ZodOptional<z.ZodString>;
489
- }, z.core.$strip> | z.ZodObject<{
490
- kind: z.ZodLiteral<"addLookGear" | "updateLookGear" | "addGear" | "updateGear">;
491
- selector: z.ZodObject<{
492
- packageId: z.ZodString;
493
- componentResourceId: z.ZodString;
494
- displayNodeId: z.ZodString;
495
- kind: z.ZodString;
496
- controllerName: z.ZodString;
497
- }, z.core.$strip>;
498
- gear: z.ZodJSONSchema;
499
- opId: z.ZodOptional<z.ZodString>;
500
- }, z.core.$strip> | z.ZodObject<{
501
- kind: z.ZodLiteral<"removeLookGear" | "removeGear">;
502
- selector: z.ZodObject<{
503
- packageId: z.ZodString;
504
- componentResourceId: z.ZodString;
505
- displayNodeId: z.ZodString;
506
- kind: z.ZodString;
507
- controllerName: z.ZodString;
508
- }, z.core.$strip>;
509
- opId: z.ZodOptional<z.ZodString>;
510
- }, z.core.$strip>)[]], "kind">>;
511
- }, z.core.$strip>;
512
- readonly outputSchema: z.ZodObject<{
513
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
514
- ok: z.ZodLiteral<true>;
515
- data: z.ZodJSONSchema;
516
- meta: z.ZodJSONSchema;
517
- }, z.core.$strip>, z.ZodObject<{
518
- ok: z.ZodLiteral<false>;
519
- error: z.ZodObject<{
520
- code: z.ZodString;
521
- message: z.ZodString;
522
- }, z.core.$loose>;
523
- meta: z.ZodJSONSchema;
524
- session: z.ZodOptional<z.ZodJSONSchema>;
525
- }, z.core.$strip>], "ok">;
526
- }, z.core.$strip>;
527
130
  readonly annotations: {
528
131
  readonly readOnlyHint: false;
529
132
  readonly destructiveHint: true;
@@ -535,28 +138,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
535
138
  readonly backendMethod: "saveSession";
536
139
  readonly title: "Save Backend Session";
537
140
  readonly description: "Write the current backend session through its coordinated save path; Node uses an atomic staged directory swap.";
538
- readonly inputSchema: z.ZodObject<{
539
- sessionId: z.ZodString;
540
- expectedRevision: z.ZodOptional<z.ZodNumber>;
541
- targetPath: z.ZodOptional<z.ZodString>;
542
- force: z.ZodOptional<z.ZodBoolean>;
543
- mode: z.ZodOptional<z.ZodLiteral<"materializeCleanSession">>;
544
- }, z.core.$strip>;
545
- readonly outputSchema: z.ZodObject<{
546
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
547
- ok: z.ZodLiteral<true>;
548
- data: z.ZodJSONSchema;
549
- meta: z.ZodJSONSchema;
550
- }, z.core.$strip>, z.ZodObject<{
551
- ok: z.ZodLiteral<false>;
552
- error: z.ZodObject<{
553
- code: z.ZodString;
554
- message: z.ZodString;
555
- }, z.core.$loose>;
556
- meta: z.ZodJSONSchema;
557
- session: z.ZodOptional<z.ZodJSONSchema>;
558
- }, z.core.$strip>], "ok">;
559
- }, z.core.$strip>;
560
141
  readonly annotations: {
561
142
  readonly readOnlyHint: false;
562
143
  readonly destructiveHint: true;
@@ -568,27 +149,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
568
149
  readonly backendMethod: "materializeSession";
569
150
  readonly title: "Materialize Backend Session";
570
151
  readonly description: "Force materialize the current backend session project through the configured project storage without requiring a dirty edit revision.";
571
- readonly inputSchema: z.ZodObject<{
572
- sessionId: z.ZodString;
573
- expectedRevision: z.ZodOptional<z.ZodNumber>;
574
- mode: z.ZodOptional<z.ZodLiteral<"fullProject">>;
575
- reason: z.ZodOptional<z.ZodString>;
576
- }, z.core.$strip>;
577
- readonly outputSchema: z.ZodObject<{
578
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
579
- ok: z.ZodLiteral<true>;
580
- data: z.ZodJSONSchema;
581
- meta: z.ZodJSONSchema;
582
- }, z.core.$strip>, z.ZodObject<{
583
- ok: z.ZodLiteral<false>;
584
- error: z.ZodObject<{
585
- code: z.ZodString;
586
- message: z.ZodString;
587
- }, z.core.$loose>;
588
- meta: z.ZodJSONSchema;
589
- session: z.ZodOptional<z.ZodJSONSchema>;
590
- }, z.core.$strip>], "ok">;
591
- }, z.core.$strip>;
592
152
  readonly annotations: {
593
153
  readonly readOnlyHint: false;
594
154
  readonly destructiveHint: true;
@@ -600,24 +160,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
600
160
  readonly backendMethod: "closeSession";
601
161
  readonly title: "Close Backend Session";
602
162
  readonly description: "Close a backend session and release its backend-local session lock.";
603
- readonly inputSchema: z.ZodObject<{
604
- sessionId: z.ZodString;
605
- }, z.core.$strip>;
606
- readonly outputSchema: z.ZodObject<{
607
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
608
- ok: z.ZodLiteral<true>;
609
- data: z.ZodJSONSchema;
610
- meta: z.ZodJSONSchema;
611
- }, z.core.$strip>, z.ZodObject<{
612
- ok: z.ZodLiteral<false>;
613
- error: z.ZodObject<{
614
- code: z.ZodString;
615
- message: z.ZodString;
616
- }, z.core.$loose>;
617
- meta: z.ZodJSONSchema;
618
- session: z.ZodOptional<z.ZodJSONSchema>;
619
- }, z.core.$strip>], "ok">;
620
- }, z.core.$strip>;
621
163
  readonly annotations: {
622
164
  readonly readOnlyHint: false;
623
165
  readonly idempotentHint: false;
@@ -628,26 +170,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
628
170
  readonly backendMethod: "getEvents";
629
171
  readonly title: "Get Runtime Events";
630
172
  readonly description: "Poll backend runtime events for a session using the backend P2 event cursor contract.";
631
- readonly inputSchema: z.ZodObject<{
632
- sessionId: z.ZodString;
633
- after: z.ZodOptional<z.ZodString>;
634
- limit: z.ZodOptional<z.ZodNumber>;
635
- }, z.core.$strip>;
636
- readonly outputSchema: z.ZodObject<{
637
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
638
- ok: z.ZodLiteral<true>;
639
- data: z.ZodJSONSchema;
640
- meta: z.ZodJSONSchema;
641
- }, z.core.$strip>, z.ZodObject<{
642
- ok: z.ZodLiteral<false>;
643
- error: z.ZodObject<{
644
- code: z.ZodString;
645
- message: z.ZodString;
646
- }, z.core.$loose>;
647
- meta: z.ZodJSONSchema;
648
- session: z.ZodOptional<z.ZodJSONSchema>;
649
- }, z.core.$strip>], "ok">;
650
- }, z.core.$strip>;
651
173
  readonly annotations: {
652
174
  readonly readOnlyHint: true;
653
175
  readonly idempotentHint: true;
@@ -658,25 +180,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
658
180
  readonly backendMethod: "getJob";
659
181
  readonly title: "Get Runtime Job";
660
182
  readonly description: "Return a backend runtime job snapshot by session and backend-local job id.";
661
- readonly inputSchema: z.ZodObject<{
662
- sessionId: z.ZodString;
663
- jobId: z.ZodString;
664
- }, z.core.$strip>;
665
- readonly outputSchema: z.ZodObject<{
666
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
667
- ok: z.ZodLiteral<true>;
668
- data: z.ZodJSONSchema;
669
- meta: z.ZodJSONSchema;
670
- }, z.core.$strip>, z.ZodObject<{
671
- ok: z.ZodLiteral<false>;
672
- error: z.ZodObject<{
673
- code: z.ZodString;
674
- message: z.ZodString;
675
- }, z.core.$loose>;
676
- meta: z.ZodJSONSchema;
677
- session: z.ZodOptional<z.ZodJSONSchema>;
678
- }, z.core.$strip>], "ok">;
679
- }, z.core.$strip>;
680
183
  readonly annotations: {
681
184
  readonly readOnlyHint: true;
682
185
  readonly idempotentHint: true;
@@ -687,35 +190,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
687
190
  readonly backendMethod: "listJobs";
688
191
  readonly title: "List Runtime Jobs";
689
192
  readonly description: "List backend runtime jobs for a session with backend P2 status/kind filters.";
690
- readonly inputSchema: z.ZodObject<{
691
- sessionId: z.ZodString;
692
- status: z.ZodOptional<z.ZodEnum<{
693
- queued: "queued";
694
- running: "running";
695
- completed: "completed";
696
- failed: "failed";
697
- cancelled: "cancelled";
698
- active: "active";
699
- terminal: "terminal";
700
- }>>;
701
- kind: z.ZodOptional<z.ZodLiteral<"cache.refresh">>;
702
- limit: z.ZodOptional<z.ZodNumber>;
703
- }, z.core.$strip>;
704
- readonly outputSchema: z.ZodObject<{
705
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
706
- ok: z.ZodLiteral<true>;
707
- data: z.ZodJSONSchema;
708
- meta: z.ZodJSONSchema;
709
- }, z.core.$strip>, z.ZodObject<{
710
- ok: z.ZodLiteral<false>;
711
- error: z.ZodObject<{
712
- code: z.ZodString;
713
- message: z.ZodString;
714
- }, z.core.$loose>;
715
- meta: z.ZodJSONSchema;
716
- session: z.ZodOptional<z.ZodJSONSchema>;
717
- }, z.core.$strip>], "ok">;
718
- }, z.core.$strip>;
719
193
  readonly annotations: {
720
194
  readonly readOnlyHint: true;
721
195
  readonly idempotentHint: true;
@@ -726,25 +200,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
726
200
  readonly backendMethod: "cancelJob";
727
201
  readonly title: "Cancel Runtime Job";
728
202
  readonly description: "Request cooperative cancellation for a backend runtime job.";
729
- readonly inputSchema: z.ZodObject<{
730
- sessionId: z.ZodString;
731
- jobId: z.ZodString;
732
- }, z.core.$strip>;
733
- readonly outputSchema: z.ZodObject<{
734
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
735
- ok: z.ZodLiteral<true>;
736
- data: z.ZodJSONSchema;
737
- meta: z.ZodJSONSchema;
738
- }, z.core.$strip>, z.ZodObject<{
739
- ok: z.ZodLiteral<false>;
740
- error: z.ZodObject<{
741
- code: z.ZodString;
742
- message: z.ZodString;
743
- }, z.core.$loose>;
744
- meta: z.ZodJSONSchema;
745
- session: z.ZodOptional<z.ZodJSONSchema>;
746
- }, z.core.$strip>], "ok">;
747
- }, z.core.$strip>;
748
203
  readonly annotations: {
749
204
  readonly readOnlyHint: false;
750
205
  readonly idempotentHint: false;
@@ -755,24 +210,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
755
210
  readonly backendMethod: "getCacheSnapshot";
756
211
  readonly title: "Get Cache Snapshot";
757
212
  readonly description: "Return the backend P2 derived read-only cache snapshot for a session.";
758
- readonly inputSchema: z.ZodObject<{
759
- sessionId: z.ZodString;
760
- }, z.core.$strip>;
761
- readonly outputSchema: z.ZodObject<{
762
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
763
- ok: z.ZodLiteral<true>;
764
- data: z.ZodJSONSchema;
765
- meta: z.ZodJSONSchema;
766
- }, z.core.$strip>, z.ZodObject<{
767
- ok: z.ZodLiteral<false>;
768
- error: z.ZodObject<{
769
- code: z.ZodString;
770
- message: z.ZodString;
771
- }, z.core.$loose>;
772
- meta: z.ZodJSONSchema;
773
- session: z.ZodOptional<z.ZodJSONSchema>;
774
- }, z.core.$strip>], "ok">;
775
- }, z.core.$strip>;
776
213
  readonly annotations: {
777
214
  readonly readOnlyHint: true;
778
215
  readonly idempotentHint: true;
@@ -783,29 +220,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
783
220
  readonly backendMethod: "refreshCache";
784
221
  readonly title: "Refresh Cache";
785
222
  readonly description: "Create a backend P2 cache.refresh job for the session cache snapshot.";
786
- readonly inputSchema: z.ZodObject<{
787
- sessionId: z.ZodString;
788
- reason: z.ZodOptional<z.ZodEnum<{
789
- manual: "manual";
790
- session_open: "session_open";
791
- after_save: "after_save";
792
- }>>;
793
- }, z.core.$strip>;
794
- readonly outputSchema: z.ZodObject<{
795
- backendResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
796
- ok: z.ZodLiteral<true>;
797
- data: z.ZodJSONSchema;
798
- meta: z.ZodJSONSchema;
799
- }, z.core.$strip>, z.ZodObject<{
800
- ok: z.ZodLiteral<false>;
801
- error: z.ZodObject<{
802
- code: z.ZodString;
803
- message: z.ZodString;
804
- }, z.core.$loose>;
805
- meta: z.ZodJSONSchema;
806
- session: z.ZodOptional<z.ZodJSONSchema>;
807
- }, z.core.$strip>], "ok">;
808
- }, z.core.$strip>;
809
223
  readonly annotations: {
810
224
  readonly readOnlyHint: false;
811
225
  readonly idempotentHint: false;
@@ -813,8 +227,19 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
813
227
  };
814
228
  }];
815
229
  //#endregion
230
+ //#region src/tool-definitions.d.ts
231
+ declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
232
+ type OpenFairyGuiBackendToolName = typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA[number]['name'];
233
+ declare const OPENFAIRYGUI_BACKEND_TOOL_NAMES: ("openfairygui_backend_get_capabilities" | "openfairygui_backend_open_session" | "openfairygui_backend_open_project_session" | "openfairygui_backend_get_session" | "openfairygui_backend_get_project_outline" | "openfairygui_backend_query_entity" | "openfairygui_backend_read_session_state" | "openfairygui_backend_read_resource_bytes" | "openfairygui_backend_validate_session" | "openfairygui_backend_preflight_transaction" | "openfairygui_backend_apply_transaction" | "openfairygui_backend_save_session" | "openfairygui_backend_materialize_session" | "openfairygui_backend_close_session" | "openfairygui_backend_get_events" | "openfairygui_backend_get_job" | "openfairygui_backend_list_jobs" | "openfairygui_backend_cancel_job" | "openfairygui_backend_get_cache_snapshot" | "openfairygui_backend_refresh_cache")[];
234
+ interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
235
+ name: OpenFairyGuiBackendToolName;
236
+ inputSchema: z.ZodObject;
237
+ outputSchema: z.ZodObject;
238
+ }
239
+ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly OpenFairyGuiBackendToolDefinition[];
240
+ //#endregion
816
241
  //#region src/tool-handler.d.ts
817
- type OpenFairyGuiBackendRuntime = Pick<BackendRuntime, 'getCapabilities' | 'openSession' | 'openProjectSession' | 'getSession' | 'getProjectOutline' | 'validateSession' | 'applyTransaction' | 'saveSession' | 'materializeSession' | 'closeSession' | 'getEvents' | 'getJob' | 'listJobs' | 'cancelJob' | 'getCacheSnapshot' | 'refreshCache'>;
242
+ type OpenFairyGuiBackendRuntime = Pick<BackendRuntime, BackendMethodName$1>;
818
243
  declare function callOpenFairyGuiBackendTool(runtime: OpenFairyGuiBackendRuntime, name: OpenFairyGuiBackendToolName, input: Record<string, unknown>): Promise<CallToolResult>;
819
244
  //#endregion
820
245
  //#region src/server.d.ts
@@ -864,6 +289,6 @@ declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
864
289
  //#endregion
865
290
  //#region src/resource-definitions.d.ts
866
291
  declare const OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = "openfairygui://backend/capabilities";
867
- declare const OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES: readonly ["openfairygui://backend/session/{sessionId}", "openfairygui://backend/session/{sessionId}/outline", "openfairygui://backend/cache/{sessionId}", "openfairygui://backend/job/{sessionId}/{jobId}"];
292
+ declare const OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES: readonly ["openfairygui://docs/methods/{method}", "openfairygui://docs/cli/{command}", "openfairygui://docs/diagnostics/{code}", "openfairygui://contracts/operations/{kind}", "openfairygui://backend/session/{sessionId}", "openfairygui://backend/session/{sessionId}/outline", "openfairygui://backend/cache/{sessionId}", "openfairygui://backend/job/{sessionId}/{jobId}"];
868
293
  //#endregion
869
- export { type BackendMethodName, type CreateOpenFairyGuiMcpServerOptions, OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI, OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS, OPENFAIRYGUI_BACKEND_PROMPT_NAMES, OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES, OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS, OPENFAIRYGUI_BACKEND_TOOL_NAMES, OPENFAIRYGUI_BACKEND_TOOL_OUTPUT_SCHEMA, OPENFAIRYGUI_BACKEND_TOOL_PREFIX, type OpenFairyGuiBackendPromptName, type OpenFairyGuiBackendRuntime, type OpenFairyGuiBackendToolDefinition, type OpenFairyGuiBackendToolName, callOpenFairyGuiBackendTool, connectOpenFairyGuiMcpStdio, createOpenFairyGuiMcpServer };
294
+ export { type BackendMethodName, type CreateOpenFairyGuiMcpServerOptions, OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI, OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS, OPENFAIRYGUI_BACKEND_PROMPT_NAMES, OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES, OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS, OPENFAIRYGUI_BACKEND_TOOL_NAMES, OPENFAIRYGUI_BACKEND_TOOL_PREFIX, OPENFAIRYGUI_OPERATION_CATALOG_URI, OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE, type OpenFairyGuiBackendPromptName, type OpenFairyGuiBackendRuntime, type OpenFairyGuiBackendToolDefinition, type OpenFairyGuiBackendToolName, callOpenFairyGuiBackendTool, connectOpenFairyGuiMcpStdio, createOpenFairyGuiMcpServer, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema };