@openfairygui/mcp 0.3.0 → 0.4.0
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/README.md +5 -1
- package/dist/index.cjs +26 -2
- package/dist/index.d.cts +45 -231
- package/dist/index.d.mts +46 -232
- package/dist/index.mjs +2 -2
- package/dist/{stdio-48jCJzS3.mjs → stdio-9ka7bvOr.mjs} +259 -238
- package/dist/{stdio-9ewjcCag.cjs → stdio-B0OU-oZC.cjs} +285 -241
- package/dist/stdio.cjs +1 -1
- package/dist/stdio.mjs +1 -1
- package/package.json +7 -4
- package/src/contract-schema.ts +29 -0
- package/src/index.ts +6 -1
- package/src/prompt-definitions.ts +5 -0
- package/src/resource-definitions.ts +59 -0
- package/src/server.ts +27 -8
- package/src/stdio.ts +6 -1
- package/src/tool-definitions.ts +49 -243
- package/src/tool-handler.ts +53 -128
- package/src/tool-metadata.ts +157 -0
package/README.md
CHANGED
|
@@ -13,7 +13,9 @@ It maps the backend P2 runtime surface into MCP tools:
|
|
|
13
13
|
- `openProjectSession`
|
|
14
14
|
- `getSession`
|
|
15
15
|
- `getProjectOutline`
|
|
16
|
+
- `queryEntity`
|
|
16
17
|
- `validateSession`
|
|
18
|
+
- `preflightTransaction`
|
|
17
19
|
- `applyTransaction`
|
|
18
20
|
- `saveSession`
|
|
19
21
|
- `materializeSession`
|
|
@@ -25,13 +27,15 @@ It maps the backend P2 runtime surface into MCP tools:
|
|
|
25
27
|
- `getCacheSnapshot`
|
|
26
28
|
- `refreshCache`
|
|
27
29
|
|
|
28
|
-
Each tool exposes a
|
|
30
|
+
Each tool exposes a method-specific output schema for `structuredContent.backendResult`, preserving the backend envelope shape:
|
|
29
31
|
|
|
30
32
|
- `ok`
|
|
31
33
|
- `data?`
|
|
32
34
|
- `error?`
|
|
33
35
|
- `meta?`
|
|
34
36
|
|
|
37
|
+
The factory advertises the fixed 18-method Backend catalog. Input/output schemas come from the canonical installed contract; discovery uses self-contained draft-07 `definitions`/`$ref` to reuse repeated structures without loosening the 41-operation union, call validators or input budgets. Installed operation documentation remains available through `openfairygui://contracts/operations` and `openfairygui://docs/index`.
|
|
38
|
+
|
|
35
39
|
P1 also registers MCP-native ergonomics around the same backend surface:
|
|
36
40
|
|
|
37
41
|
- read-only resources for identity snapshots:
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_stdio = require("./stdio-
|
|
2
|
+
const require_stdio = require("./stdio-B0OU-oZC.cjs");
|
|
3
|
+
let _openfairygui_backend_docs = require("@openfairygui/backend/docs");
|
|
3
4
|
exports.OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = require_stdio.OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI;
|
|
4
5
|
exports.OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = require_stdio.OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS;
|
|
5
6
|
exports.OPENFAIRYGUI_BACKEND_PROMPT_NAMES = require_stdio.OPENFAIRYGUI_BACKEND_PROMPT_NAMES;
|
|
6
7
|
exports.OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES = require_stdio.OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES;
|
|
7
8
|
exports.OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS = require_stdio.OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS;
|
|
8
9
|
exports.OPENFAIRYGUI_BACKEND_TOOL_NAMES = require_stdio.OPENFAIRYGUI_BACKEND_TOOL_NAMES;
|
|
9
|
-
exports.OPENFAIRYGUI_BACKEND_TOOL_OUTPUT_SCHEMA = require_stdio.OPENFAIRYGUI_BACKEND_TOOL_OUTPUT_SCHEMA;
|
|
10
10
|
exports.OPENFAIRYGUI_BACKEND_TOOL_PREFIX = require_stdio.OPENFAIRYGUI_BACKEND_TOOL_PREFIX;
|
|
11
|
+
Object.defineProperty(exports, "OPENFAIRYGUI_OPERATION_CATALOG_URI", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return _openfairygui_backend_docs.OPENFAIRYGUI_OPERATION_CATALOG_URI;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return _openfairygui_backend_docs.OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
11
23
|
exports.callOpenFairyGuiBackendTool = require_stdio.callOpenFairyGuiBackendTool;
|
|
12
24
|
exports.connectOpenFairyGuiMcpStdio = require_stdio.connectOpenFairyGuiMcpStdio;
|
|
13
25
|
exports.createOpenFairyGuiMcpServer = require_stdio.createOpenFairyGuiMcpServer;
|
|
26
|
+
Object.defineProperty(exports, "getOpenFairyGuiOperationCatalog", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function() {
|
|
29
|
+
return _openfairygui_backend_docs.getOpenFairyGuiOperationCatalog;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "getOpenFairyGuiOperationSchema", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return _openfairygui_backend_docs.getOpenFairyGuiOperationSchema;
|
|
36
|
+
}
|
|
37
|
+
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
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-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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;
|
|
19
14
|
annotations: {
|
|
20
15
|
readOnlyHint?: boolean;
|
|
21
16
|
destructiveHint?: boolean;
|
|
@@ -23,28 +18,11 @@ interface OpenFairyGuiBackendToolDefinition {
|
|
|
23
18
|
openWorldHint?: boolean;
|
|
24
19
|
};
|
|
25
20
|
}
|
|
26
|
-
declare const
|
|
27
|
-
backendResult: z.ZodObject<{
|
|
28
|
-
ok: z.ZodBoolean;
|
|
29
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
30
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
31
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
32
|
-
}, z.core.$loose>;
|
|
33
|
-
}, z.core.$strip>;
|
|
34
|
-
declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
21
|
+
declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
35
22
|
readonly name: "openfairygui_backend_get_capabilities";
|
|
36
23
|
readonly backendMethod: "getCapabilities";
|
|
37
24
|
readonly title: "Get Backend Capabilities";
|
|
38
25
|
readonly description: "Return the OpenFairyGUI backend capability, version, and service-plane snapshot.";
|
|
39
|
-
readonly inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
40
|
-
readonly outputSchema: z.ZodObject<{
|
|
41
|
-
backendResult: z.ZodObject<{
|
|
42
|
-
ok: z.ZodBoolean;
|
|
43
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
44
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
45
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
46
|
-
}, z.core.$loose>;
|
|
47
|
-
}, z.core.$strip>;
|
|
48
26
|
readonly annotations: {
|
|
49
27
|
readonly readOnlyHint: true;
|
|
50
28
|
readonly idempotentHint: true;
|
|
@@ -55,17 +33,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
55
33
|
readonly backendMethod: "openSession";
|
|
56
34
|
readonly title: "Open Backend Session";
|
|
57
35
|
readonly description: "Open a FairyGUI project through BackendRuntime and acquire its backend-local session lock.";
|
|
58
|
-
readonly inputSchema: z.ZodObject<{
|
|
59
|
-
projectPath: z.ZodString;
|
|
60
|
-
}, z.core.$strip>;
|
|
61
|
-
readonly outputSchema: z.ZodObject<{
|
|
62
|
-
backendResult: z.ZodObject<{
|
|
63
|
-
ok: z.ZodBoolean;
|
|
64
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
66
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
67
|
-
}, z.core.$loose>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
36
|
readonly annotations: {
|
|
70
37
|
readonly readOnlyHint: false;
|
|
71
38
|
readonly idempotentHint: false;
|
|
@@ -76,20 +43,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
76
43
|
readonly backendMethod: "openProjectSession";
|
|
77
44
|
readonly title: "Open Project Session";
|
|
78
45
|
readonly description: "Open a browser-safe backend session from an already loaded UAM project without filesystem access.";
|
|
79
|
-
readonly inputSchema: z.ZodObject<{
|
|
80
|
-
project: z.ZodUnknown;
|
|
81
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
82
|
-
canonicalProjectPath: z.ZodOptional<z.ZodString>;
|
|
83
|
-
canonicalPathKey: z.ZodOptional<z.ZodString>;
|
|
84
|
-
}, z.core.$strip>;
|
|
85
|
-
readonly outputSchema: z.ZodObject<{
|
|
86
|
-
backendResult: z.ZodObject<{
|
|
87
|
-
ok: z.ZodBoolean;
|
|
88
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
89
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
90
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
91
|
-
}, z.core.$loose>;
|
|
92
|
-
}, z.core.$strip>;
|
|
93
46
|
readonly annotations: {
|
|
94
47
|
readonly readOnlyHint: false;
|
|
95
48
|
readonly idempotentHint: false;
|
|
@@ -100,17 +53,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
100
53
|
readonly backendMethod: "getSession";
|
|
101
54
|
readonly title: "Get Backend Session";
|
|
102
55
|
readonly description: "Return a backend session snapshot by session id.";
|
|
103
|
-
readonly inputSchema: z.ZodObject<{
|
|
104
|
-
sessionId: z.ZodString;
|
|
105
|
-
}, z.core.$strip>;
|
|
106
|
-
readonly outputSchema: z.ZodObject<{
|
|
107
|
-
backendResult: z.ZodObject<{
|
|
108
|
-
ok: z.ZodBoolean;
|
|
109
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
110
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
111
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
112
|
-
}, z.core.$loose>;
|
|
113
|
-
}, z.core.$strip>;
|
|
114
56
|
readonly annotations: {
|
|
115
57
|
readonly readOnlyHint: true;
|
|
116
58
|
readonly idempotentHint: true;
|
|
@@ -121,17 +63,16 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
121
63
|
readonly backendMethod: "getProjectOutline";
|
|
122
64
|
readonly title: "Get Project Outline";
|
|
123
65
|
readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads.";
|
|
124
|
-
readonly
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, z.core.$strip>;
|
|
66
|
+
readonly annotations: {
|
|
67
|
+
readonly readOnlyHint: true;
|
|
68
|
+
readonly idempotentHint: true;
|
|
69
|
+
readonly openWorldHint: false;
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "openfairygui_backend_query_entity";
|
|
73
|
+
readonly backendMethod: "queryEntity";
|
|
74
|
+
readonly title: "Query Entity Properties";
|
|
75
|
+
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.";
|
|
135
76
|
readonly annotations: {
|
|
136
77
|
readonly readOnlyHint: true;
|
|
137
78
|
readonly idempotentHint: true;
|
|
@@ -142,17 +83,16 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
142
83
|
readonly backendMethod: "validateSession";
|
|
143
84
|
readonly title: "Validate Project Session";
|
|
144
85
|
readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files.";
|
|
145
|
-
readonly
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}, z.core.$strip>;
|
|
86
|
+
readonly annotations: {
|
|
87
|
+
readonly readOnlyHint: true;
|
|
88
|
+
readonly idempotentHint: true;
|
|
89
|
+
readonly openWorldHint: false;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "openfairygui_backend_preflight_transaction";
|
|
93
|
+
readonly backendMethod: "preflightTransaction";
|
|
94
|
+
readonly title: "Preview UAM Transaction";
|
|
95
|
+
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.";
|
|
156
96
|
readonly annotations: {
|
|
157
97
|
readonly readOnlyHint: true;
|
|
158
98
|
readonly idempotentHint: true;
|
|
@@ -162,20 +102,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
162
102
|
readonly name: "openfairygui_backend_apply_transaction";
|
|
163
103
|
readonly backendMethod: "applyTransaction";
|
|
164
104
|
readonly title: "Apply UAM Transaction";
|
|
165
|
-
readonly description: "Apply a
|
|
166
|
-
readonly inputSchema: z.ZodObject<{
|
|
167
|
-
sessionId: z.ZodString;
|
|
168
|
-
expectedRevision: z.ZodNumber;
|
|
169
|
-
operations: z.ZodArray<z.ZodUnknown>;
|
|
170
|
-
}, z.core.$strip>;
|
|
171
|
-
readonly outputSchema: z.ZodObject<{
|
|
172
|
-
backendResult: z.ZodObject<{
|
|
173
|
-
ok: z.ZodBoolean;
|
|
174
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
175
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
176
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
177
|
-
}, z.core.$loose>;
|
|
178
|
-
}, z.core.$strip>;
|
|
105
|
+
readonly description: "Apply a bounded, revision-checked UAM operation batch using the Core transaction discriminants.";
|
|
179
106
|
readonly annotations: {
|
|
180
107
|
readonly readOnlyHint: false;
|
|
181
108
|
readonly destructiveHint: true;
|
|
@@ -186,22 +113,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
186
113
|
readonly name: "openfairygui_backend_save_session";
|
|
187
114
|
readonly backendMethod: "saveSession";
|
|
188
115
|
readonly title: "Save Backend Session";
|
|
189
|
-
readonly description: "Write the current backend session
|
|
190
|
-
readonly inputSchema: z.ZodObject<{
|
|
191
|
-
sessionId: z.ZodString;
|
|
192
|
-
expectedRevision: z.ZodOptional<z.ZodNumber>;
|
|
193
|
-
targetPath: z.ZodOptional<z.ZodString>;
|
|
194
|
-
force: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
-
mode: z.ZodOptional<z.ZodLiteral<"materializeCleanSession">>;
|
|
196
|
-
}, z.core.$strip>;
|
|
197
|
-
readonly outputSchema: z.ZodObject<{
|
|
198
|
-
backendResult: z.ZodObject<{
|
|
199
|
-
ok: z.ZodBoolean;
|
|
200
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
201
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
202
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
203
|
-
}, z.core.$loose>;
|
|
204
|
-
}, z.core.$strip>;
|
|
116
|
+
readonly description: "Write the current backend session through its coordinated save path; Node uses an atomic staged directory swap.";
|
|
205
117
|
readonly annotations: {
|
|
206
118
|
readonly readOnlyHint: false;
|
|
207
119
|
readonly destructiveHint: true;
|
|
@@ -213,20 +125,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
213
125
|
readonly backendMethod: "materializeSession";
|
|
214
126
|
readonly title: "Materialize Backend Session";
|
|
215
127
|
readonly description: "Force materialize the current backend session project through the configured project storage without requiring a dirty edit revision.";
|
|
216
|
-
readonly inputSchema: z.ZodObject<{
|
|
217
|
-
sessionId: z.ZodString;
|
|
218
|
-
expectedRevision: z.ZodOptional<z.ZodNumber>;
|
|
219
|
-
mode: z.ZodOptional<z.ZodLiteral<"fullProject">>;
|
|
220
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
221
|
-
}, z.core.$strip>;
|
|
222
|
-
readonly outputSchema: z.ZodObject<{
|
|
223
|
-
backendResult: z.ZodObject<{
|
|
224
|
-
ok: z.ZodBoolean;
|
|
225
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
226
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
227
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
228
|
-
}, z.core.$loose>;
|
|
229
|
-
}, z.core.$strip>;
|
|
230
128
|
readonly annotations: {
|
|
231
129
|
readonly readOnlyHint: false;
|
|
232
130
|
readonly destructiveHint: true;
|
|
@@ -238,17 +136,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
238
136
|
readonly backendMethod: "closeSession";
|
|
239
137
|
readonly title: "Close Backend Session";
|
|
240
138
|
readonly description: "Close a backend session and release its backend-local session lock.";
|
|
241
|
-
readonly inputSchema: z.ZodObject<{
|
|
242
|
-
sessionId: z.ZodString;
|
|
243
|
-
}, z.core.$strip>;
|
|
244
|
-
readonly outputSchema: z.ZodObject<{
|
|
245
|
-
backendResult: z.ZodObject<{
|
|
246
|
-
ok: z.ZodBoolean;
|
|
247
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
248
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
249
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
250
|
-
}, z.core.$loose>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
139
|
readonly annotations: {
|
|
253
140
|
readonly readOnlyHint: false;
|
|
254
141
|
readonly idempotentHint: false;
|
|
@@ -259,19 +146,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
259
146
|
readonly backendMethod: "getEvents";
|
|
260
147
|
readonly title: "Get Runtime Events";
|
|
261
148
|
readonly description: "Poll backend runtime events for a session using the backend P2 event cursor contract.";
|
|
262
|
-
readonly inputSchema: z.ZodObject<{
|
|
263
|
-
sessionId: z.ZodString;
|
|
264
|
-
after: z.ZodOptional<z.ZodString>;
|
|
265
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
266
|
-
}, z.core.$strip>;
|
|
267
|
-
readonly outputSchema: z.ZodObject<{
|
|
268
|
-
backendResult: z.ZodObject<{
|
|
269
|
-
ok: z.ZodBoolean;
|
|
270
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
271
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
272
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
273
|
-
}, z.core.$loose>;
|
|
274
|
-
}, z.core.$strip>;
|
|
275
149
|
readonly annotations: {
|
|
276
150
|
readonly readOnlyHint: true;
|
|
277
151
|
readonly idempotentHint: true;
|
|
@@ -282,18 +156,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
282
156
|
readonly backendMethod: "getJob";
|
|
283
157
|
readonly title: "Get Runtime Job";
|
|
284
158
|
readonly description: "Return a backend runtime job snapshot by session and backend-local job id.";
|
|
285
|
-
readonly inputSchema: z.ZodObject<{
|
|
286
|
-
sessionId: z.ZodString;
|
|
287
|
-
jobId: z.ZodString;
|
|
288
|
-
}, z.core.$strip>;
|
|
289
|
-
readonly outputSchema: z.ZodObject<{
|
|
290
|
-
backendResult: z.ZodObject<{
|
|
291
|
-
ok: z.ZodBoolean;
|
|
292
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
293
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
294
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
295
|
-
}, z.core.$loose>;
|
|
296
|
-
}, z.core.$strip>;
|
|
297
159
|
readonly annotations: {
|
|
298
160
|
readonly readOnlyHint: true;
|
|
299
161
|
readonly idempotentHint: true;
|
|
@@ -304,28 +166,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
304
166
|
readonly backendMethod: "listJobs";
|
|
305
167
|
readonly title: "List Runtime Jobs";
|
|
306
168
|
readonly description: "List backend runtime jobs for a session with backend P2 status/kind filters.";
|
|
307
|
-
readonly inputSchema: z.ZodObject<{
|
|
308
|
-
sessionId: z.ZodString;
|
|
309
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
310
|
-
queued: "queued";
|
|
311
|
-
running: "running";
|
|
312
|
-
completed: "completed";
|
|
313
|
-
failed: "failed";
|
|
314
|
-
cancelled: "cancelled";
|
|
315
|
-
active: "active";
|
|
316
|
-
terminal: "terminal";
|
|
317
|
-
}>>;
|
|
318
|
-
kind: z.ZodOptional<z.ZodLiteral<"cache.refresh">>;
|
|
319
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
320
|
-
}, z.core.$strip>;
|
|
321
|
-
readonly outputSchema: z.ZodObject<{
|
|
322
|
-
backendResult: z.ZodObject<{
|
|
323
|
-
ok: z.ZodBoolean;
|
|
324
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
325
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
326
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
327
|
-
}, z.core.$loose>;
|
|
328
|
-
}, z.core.$strip>;
|
|
329
169
|
readonly annotations: {
|
|
330
170
|
readonly readOnlyHint: true;
|
|
331
171
|
readonly idempotentHint: true;
|
|
@@ -336,18 +176,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
336
176
|
readonly backendMethod: "cancelJob";
|
|
337
177
|
readonly title: "Cancel Runtime Job";
|
|
338
178
|
readonly description: "Request cooperative cancellation for a backend runtime job.";
|
|
339
|
-
readonly inputSchema: z.ZodObject<{
|
|
340
|
-
sessionId: z.ZodString;
|
|
341
|
-
jobId: z.ZodString;
|
|
342
|
-
}, z.core.$strip>;
|
|
343
|
-
readonly outputSchema: z.ZodObject<{
|
|
344
|
-
backendResult: z.ZodObject<{
|
|
345
|
-
ok: z.ZodBoolean;
|
|
346
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
347
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
348
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
349
|
-
}, z.core.$loose>;
|
|
350
|
-
}, z.core.$strip>;
|
|
351
179
|
readonly annotations: {
|
|
352
180
|
readonly readOnlyHint: false;
|
|
353
181
|
readonly idempotentHint: false;
|
|
@@ -358,17 +186,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
358
186
|
readonly backendMethod: "getCacheSnapshot";
|
|
359
187
|
readonly title: "Get Cache Snapshot";
|
|
360
188
|
readonly description: "Return the backend P2 derived read-only cache snapshot for a session.";
|
|
361
|
-
readonly inputSchema: z.ZodObject<{
|
|
362
|
-
sessionId: z.ZodString;
|
|
363
|
-
}, z.core.$strip>;
|
|
364
|
-
readonly outputSchema: z.ZodObject<{
|
|
365
|
-
backendResult: z.ZodObject<{
|
|
366
|
-
ok: z.ZodBoolean;
|
|
367
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
368
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
369
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
370
|
-
}, z.core.$loose>;
|
|
371
|
-
}, z.core.$strip>;
|
|
372
189
|
readonly annotations: {
|
|
373
190
|
readonly readOnlyHint: true;
|
|
374
191
|
readonly idempotentHint: true;
|
|
@@ -379,22 +196,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
379
196
|
readonly backendMethod: "refreshCache";
|
|
380
197
|
readonly title: "Refresh Cache";
|
|
381
198
|
readonly description: "Create a backend P2 cache.refresh job for the session cache snapshot.";
|
|
382
|
-
readonly inputSchema: z.ZodObject<{
|
|
383
|
-
sessionId: z.ZodString;
|
|
384
|
-
reason: z.ZodOptional<z.ZodEnum<{
|
|
385
|
-
manual: "manual";
|
|
386
|
-
session_open: "session_open";
|
|
387
|
-
after_save: "after_save";
|
|
388
|
-
}>>;
|
|
389
|
-
}, z.core.$strip>;
|
|
390
|
-
readonly outputSchema: z.ZodObject<{
|
|
391
|
-
backendResult: z.ZodObject<{
|
|
392
|
-
ok: z.ZodBoolean;
|
|
393
|
-
data: z.ZodOptional<z.ZodUnknown>;
|
|
394
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
395
|
-
meta: z.ZodOptional<z.ZodUnknown>;
|
|
396
|
-
}, z.core.$loose>;
|
|
397
|
-
}, z.core.$strip>;
|
|
398
199
|
readonly annotations: {
|
|
399
200
|
readonly readOnlyHint: false;
|
|
400
201
|
readonly idempotentHint: false;
|
|
@@ -402,13 +203,26 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly [{
|
|
|
402
203
|
};
|
|
403
204
|
}];
|
|
404
205
|
//#endregion
|
|
206
|
+
//#region src/tool-definitions.d.ts
|
|
207
|
+
declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
|
|
208
|
+
type OpenFairyGuiBackendToolName = typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA[number]['name'];
|
|
209
|
+
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_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")[];
|
|
210
|
+
interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
|
|
211
|
+
name: OpenFairyGuiBackendToolName;
|
|
212
|
+
inputSchema: z.ZodObject;
|
|
213
|
+
outputSchema: z.ZodObject;
|
|
214
|
+
}
|
|
215
|
+
declare const OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS: readonly OpenFairyGuiBackendToolDefinition[];
|
|
216
|
+
//#endregion
|
|
405
217
|
//#region src/tool-handler.d.ts
|
|
406
|
-
type OpenFairyGuiBackendRuntime = Pick<BackendRuntime,
|
|
218
|
+
type OpenFairyGuiBackendRuntime = Pick<BackendRuntime, BackendMethodName$1>;
|
|
407
219
|
declare function callOpenFairyGuiBackendTool(runtime: OpenFairyGuiBackendRuntime, name: OpenFairyGuiBackendToolName, input: Record<string, unknown>): Promise<CallToolResult>;
|
|
408
220
|
//#endregion
|
|
409
221
|
//#region src/server.d.ts
|
|
410
222
|
interface CreateOpenFairyGuiMcpServerOptions {
|
|
411
223
|
runtime?: OpenFairyGuiBackendRuntime;
|
|
224
|
+
/** Filesystem roots exposed by the default Node backend runtime. Defaults to process.cwd(). */
|
|
225
|
+
allowedProjectRoots?: readonly string[];
|
|
412
226
|
name?: string;
|
|
413
227
|
version?: string;
|
|
414
228
|
}
|
|
@@ -451,6 +265,6 @@ declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
|
|
|
451
265
|
//#endregion
|
|
452
266
|
//#region src/resource-definitions.d.ts
|
|
453
267
|
declare const OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = "openfairygui://backend/capabilities";
|
|
454
|
-
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}"];
|
|
268
|
+
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}"];
|
|
455
269
|
//#endregion
|
|
456
|
-
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,
|
|
270
|
+
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 };
|