@openfairygui/mcp 0.5.0 → 0.6.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/README.md +5 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -34
- package/dist/index.d.mts +4 -34
- package/dist/index.mjs +1 -1
- package/dist/{stdio-CNx84KWi.cjs → stdio-B7MgcaE7.cjs} +7 -50
- package/dist/{stdio-CnISo7SK.mjs → stdio-DyxngFMM.mjs} +7 -50
- package/dist/stdio.cjs +1 -1
- package/dist/stdio.mjs +1 -1
- package/package.json +4 -4
- package/src/prompt-definitions.ts +4 -5
- package/src/resource-definitions.ts +0 -14
- package/src/tool-metadata.ts +1 -22
package/README.md
CHANGED
|
@@ -23,9 +23,6 @@ It maps the backend P2 runtime surface into MCP tools:
|
|
|
23
23
|
- `materializeSession`
|
|
24
24
|
- `closeSession`
|
|
25
25
|
- `getEvents`
|
|
26
|
-
- `getJob`
|
|
27
|
-
- `listJobs`
|
|
28
|
-
- `cancelJob`
|
|
29
26
|
- `getCacheSnapshot`
|
|
30
27
|
- `refreshCache`
|
|
31
28
|
|
|
@@ -45,17 +42,18 @@ P1 also registers MCP-native ergonomics around the same backend surface:
|
|
|
45
42
|
- `openfairygui://backend/session/{sessionId}`
|
|
46
43
|
- `openfairygui://backend/session/{sessionId}/outline`
|
|
47
44
|
- `openfairygui://backend/cache/{sessionId}`
|
|
48
|
-
- `openfairygui://backend/job/{sessionId}/{jobId}`
|
|
49
45
|
- prompts for capability inspection, session open/inspect, project-outline inspection, revision-checked transactions, save, and runtime polling
|
|
50
46
|
|
|
51
|
-
Resources return `application/json` text containing the unchanged backend result envelope. Parameterized polling
|
|
47
|
+
Resources return `application/json` text containing the unchanged backend result envelope. Parameterized event polling uses `getEvents`, without a resource URI query grammar.
|
|
52
48
|
The project outline is revision-bound and exposes package, resource, folder, display-node, controller-page, and transition identities for transaction planning. It intentionally omits source bytes and full property payloads. `validateSession` returns the backend-owned read-only project validation report; the MCP adapter does not reinterpret its diagnostics.
|
|
53
49
|
|
|
54
50
|
`readSessionState` returns a detached public UAM model without primary asset bytes, plus the current edit revision and source-read diagnostics. `readResourceBytes` reads one already-loaded primary asset with a required matching revision. Neither reads storage or changes the session. Both tools enforce their native response limits and a separate 16 MiB complete MCP response limit; see the installed method schemas and [workflow](../backend/docs/workflow.md).
|
|
55
51
|
|
|
56
|
-
It does **not** redefine transaction selectors, transaction operations, path policy, session semantics,
|
|
52
|
+
It does **not** redefine transaction selectors, transaction operations, path policy, session semantics, cache semantics, or backend error envelopes. Those remain owned by `@openfairygui/backend`, `@openfairygui/functions`, and `@openfairygui/core`.
|
|
57
53
|
|
|
58
|
-
It also does **not** activate artifact publish/restore
|
|
54
|
+
It also does **not** activate artifact publish/restore execution, subscriptions, or cache-as-source-of-truth behavior. MCP roots may be useful client context, but this package does not enforce roots or duplicate backend path canonicalization; backend path policy remains authoritative.
|
|
55
|
+
|
|
56
|
+
`refreshCache` returns the refreshed cache snapshot in its response; clients do not poll a background task.
|
|
59
57
|
|
|
60
58
|
## Usage
|
|
61
59
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_stdio = require("./stdio-
|
|
2
|
+
const require_stdio = require("./stdio-B7MgcaE7.cjs");
|
|
3
3
|
let _openfairygui_backend_docs = require("@openfairygui/backend/docs");
|
|
4
4
|
exports.OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = require_stdio.OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI;
|
|
5
5
|
exports.OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = require_stdio.OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS;
|
package/dist/index.d.cts
CHANGED
|
@@ -175,36 +175,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
175
175
|
readonly idempotentHint: true;
|
|
176
176
|
readonly openWorldHint: false;
|
|
177
177
|
};
|
|
178
|
-
}, {
|
|
179
|
-
readonly name: "openfairygui_backend_get_job";
|
|
180
|
-
readonly backendMethod: "getJob";
|
|
181
|
-
readonly title: "Get Runtime Job";
|
|
182
|
-
readonly description: "Return a backend runtime job snapshot by session and backend-local job id.";
|
|
183
|
-
readonly annotations: {
|
|
184
|
-
readonly readOnlyHint: true;
|
|
185
|
-
readonly idempotentHint: true;
|
|
186
|
-
readonly openWorldHint: false;
|
|
187
|
-
};
|
|
188
|
-
}, {
|
|
189
|
-
readonly name: "openfairygui_backend_list_jobs";
|
|
190
|
-
readonly backendMethod: "listJobs";
|
|
191
|
-
readonly title: "List Runtime Jobs";
|
|
192
|
-
readonly description: "List backend runtime jobs for a session with backend P2 status/kind filters.";
|
|
193
|
-
readonly annotations: {
|
|
194
|
-
readonly readOnlyHint: true;
|
|
195
|
-
readonly idempotentHint: true;
|
|
196
|
-
readonly openWorldHint: false;
|
|
197
|
-
};
|
|
198
|
-
}, {
|
|
199
|
-
readonly name: "openfairygui_backend_cancel_job";
|
|
200
|
-
readonly backendMethod: "cancelJob";
|
|
201
|
-
readonly title: "Cancel Runtime Job";
|
|
202
|
-
readonly description: "Request cooperative cancellation for a backend runtime job.";
|
|
203
|
-
readonly annotations: {
|
|
204
|
-
readonly readOnlyHint: false;
|
|
205
|
-
readonly idempotentHint: false;
|
|
206
|
-
readonly openWorldHint: false;
|
|
207
|
-
};
|
|
208
178
|
}, {
|
|
209
179
|
readonly name: "openfairygui_backend_get_cache_snapshot";
|
|
210
180
|
readonly backendMethod: "getCacheSnapshot";
|
|
@@ -219,7 +189,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
219
189
|
readonly name: "openfairygui_backend_refresh_cache";
|
|
220
190
|
readonly backendMethod: "refreshCache";
|
|
221
191
|
readonly title: "Refresh Cache";
|
|
222
|
-
readonly description: "
|
|
192
|
+
readonly description: "Synchronously refresh the derived session cache and return its revision-bound snapshot.";
|
|
223
193
|
readonly annotations: {
|
|
224
194
|
readonly readOnlyHint: false;
|
|
225
195
|
readonly idempotentHint: false;
|
|
@@ -230,7 +200,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
230
200
|
//#region src/tool-definitions.d.ts
|
|
231
201
|
declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
|
|
232
202
|
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" | "
|
|
203
|
+
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_cache_snapshot" | "openfairygui_backend_refresh_cache")[];
|
|
234
204
|
interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
|
|
235
205
|
name: OpenFairyGuiBackendToolName;
|
|
236
206
|
inputSchema: z.ZodObject;
|
|
@@ -300,12 +270,12 @@ declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
|
|
|
300
270
|
}, {
|
|
301
271
|
readonly name: "openfairygui_poll_runtime_state";
|
|
302
272
|
readonly title: "Poll OpenFairyGUI Runtime State";
|
|
303
|
-
readonly description: "Guide a client through event
|
|
273
|
+
readonly description: "Guide a client through event polling and synchronous cache snapshots.";
|
|
304
274
|
readonly text: string;
|
|
305
275
|
}];
|
|
306
276
|
//#endregion
|
|
307
277
|
//#region src/resource-definitions.d.ts
|
|
308
278
|
declare const OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = "openfairygui://backend/capabilities";
|
|
309
|
-
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}"
|
|
279
|
+
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}"];
|
|
310
280
|
//#endregion
|
|
311
281
|
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, type OpenFairyGuiMcpToolPolicy, callOpenFairyGuiBackendTool, connectOpenFairyGuiMcpStdio, createOpenFairyGuiMcpServer, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema };
|
package/dist/index.d.mts
CHANGED
|
@@ -175,36 +175,6 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
175
175
|
readonly idempotentHint: true;
|
|
176
176
|
readonly openWorldHint: false;
|
|
177
177
|
};
|
|
178
|
-
}, {
|
|
179
|
-
readonly name: "openfairygui_backend_get_job";
|
|
180
|
-
readonly backendMethod: "getJob";
|
|
181
|
-
readonly title: "Get Runtime Job";
|
|
182
|
-
readonly description: "Return a backend runtime job snapshot by session and backend-local job id.";
|
|
183
|
-
readonly annotations: {
|
|
184
|
-
readonly readOnlyHint: true;
|
|
185
|
-
readonly idempotentHint: true;
|
|
186
|
-
readonly openWorldHint: false;
|
|
187
|
-
};
|
|
188
|
-
}, {
|
|
189
|
-
readonly name: "openfairygui_backend_list_jobs";
|
|
190
|
-
readonly backendMethod: "listJobs";
|
|
191
|
-
readonly title: "List Runtime Jobs";
|
|
192
|
-
readonly description: "List backend runtime jobs for a session with backend P2 status/kind filters.";
|
|
193
|
-
readonly annotations: {
|
|
194
|
-
readonly readOnlyHint: true;
|
|
195
|
-
readonly idempotentHint: true;
|
|
196
|
-
readonly openWorldHint: false;
|
|
197
|
-
};
|
|
198
|
-
}, {
|
|
199
|
-
readonly name: "openfairygui_backend_cancel_job";
|
|
200
|
-
readonly backendMethod: "cancelJob";
|
|
201
|
-
readonly title: "Cancel Runtime Job";
|
|
202
|
-
readonly description: "Request cooperative cancellation for a backend runtime job.";
|
|
203
|
-
readonly annotations: {
|
|
204
|
-
readonly readOnlyHint: false;
|
|
205
|
-
readonly idempotentHint: false;
|
|
206
|
-
readonly openWorldHint: false;
|
|
207
|
-
};
|
|
208
178
|
}, {
|
|
209
179
|
readonly name: "openfairygui_backend_get_cache_snapshot";
|
|
210
180
|
readonly backendMethod: "getCacheSnapshot";
|
|
@@ -219,7 +189,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
219
189
|
readonly name: "openfairygui_backend_refresh_cache";
|
|
220
190
|
readonly backendMethod: "refreshCache";
|
|
221
191
|
readonly title: "Refresh Cache";
|
|
222
|
-
readonly description: "
|
|
192
|
+
readonly description: "Synchronously refresh the derived session cache and return its revision-bound snapshot.";
|
|
223
193
|
readonly annotations: {
|
|
224
194
|
readonly readOnlyHint: false;
|
|
225
195
|
readonly idempotentHint: false;
|
|
@@ -230,7 +200,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
230
200
|
//#region src/tool-definitions.d.ts
|
|
231
201
|
declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
|
|
232
202
|
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" | "
|
|
203
|
+
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_cache_snapshot" | "openfairygui_backend_refresh_cache")[];
|
|
234
204
|
interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
|
|
235
205
|
name: OpenFairyGuiBackendToolName;
|
|
236
206
|
inputSchema: z.ZodObject;
|
|
@@ -300,12 +270,12 @@ declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
|
|
|
300
270
|
}, {
|
|
301
271
|
readonly name: "openfairygui_poll_runtime_state";
|
|
302
272
|
readonly title: "Poll OpenFairyGUI Runtime State";
|
|
303
|
-
readonly description: "Guide a client through event
|
|
273
|
+
readonly description: "Guide a client through event polling and synchronous cache snapshots.";
|
|
304
274
|
readonly text: string;
|
|
305
275
|
}];
|
|
306
276
|
//#endregion
|
|
307
277
|
//#region src/resource-definitions.d.ts
|
|
308
278
|
declare const OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI = "openfairygui://backend/capabilities";
|
|
309
|
-
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}"
|
|
279
|
+
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}"];
|
|
310
280
|
//#endregion
|
|
311
281
|
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, type OpenFairyGuiMcpToolPolicy, callOpenFairyGuiBackendTool, connectOpenFairyGuiMcpStdio, createOpenFairyGuiMcpServer, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OPENFAIRYGUI_BACKEND_TOOL_NAMES, c as OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES, d as getOpenFairyGuiOperationCatalog, f as getOpenFairyGuiOperationSchema, i as OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS, l as OPENFAIRYGUI_OPERATION_CATALOG_URI, m as OPENFAIRYGUI_BACKEND_PROMPT_NAMES, n as createOpenFairyGuiMcpServer, o as OPENFAIRYGUI_BACKEND_TOOL_PREFIX, p as OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS, r as callOpenFairyGuiBackendTool, s as OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI, t as connectOpenFairyGuiMcpStdio, u as OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE } from "./stdio-
|
|
1
|
+
import { a as OPENFAIRYGUI_BACKEND_TOOL_NAMES, c as OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES, d as getOpenFairyGuiOperationCatalog, f as getOpenFairyGuiOperationSchema, i as OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS, l as OPENFAIRYGUI_OPERATION_CATALOG_URI, m as OPENFAIRYGUI_BACKEND_PROMPT_NAMES, n as createOpenFairyGuiMcpServer, o as OPENFAIRYGUI_BACKEND_TOOL_PREFIX, p as OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS, r as callOpenFairyGuiBackendTool, s as OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI, t as connectOpenFairyGuiMcpStdio, u as OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE } from "./stdio-DyxngFMM.mjs";
|
|
2
2
|
export { 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, callOpenFairyGuiBackendTool, connectOpenFairyGuiMcpStdio, createOpenFairyGuiMcpServer, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema };
|
|
@@ -47,7 +47,7 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
47
47
|
text: [
|
|
48
48
|
"Use openfairygui_backend_get_capabilities first.",
|
|
49
49
|
"Read contractVersion, capabilitySchemaVersion, capability planes, methods, and runtime non-goals from the backend envelope.",
|
|
50
|
-
"Do not infer artifact publish/restore, subscriptions,
|
|
50
|
+
"Do not infer artifact publish/restore, subscriptions, or cache source-of-truth support when the backend marks them unsupported."
|
|
51
51
|
].join("\n")
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -100,12 +100,11 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
100
100
|
{
|
|
101
101
|
name: "openfairygui_poll_runtime_state",
|
|
102
102
|
title: "Poll OpenFairyGUI Runtime State",
|
|
103
|
-
description: "Guide a client through event
|
|
103
|
+
description: "Guide a client through event polling and synchronous cache snapshots.",
|
|
104
104
|
text: [
|
|
105
105
|
"Use openfairygui_backend_get_events for polling events with the backend cursor contract.",
|
|
106
|
-
"Use
|
|
107
|
-
"
|
|
108
|
-
"Subscriptions, persistent jobs, artifact jobs, and cache-as-source-of-truth behavior are not supported by backend P2."
|
|
106
|
+
"Use openfairygui_backend_get_cache_snapshot for derived read-only cache state; openfairygui_backend_refresh_cache returns the refreshed snapshot synchronously.",
|
|
107
|
+
"Subscriptions and cache-as-source-of-truth behavior are not supported by the backend."
|
|
109
108
|
].join("\n")
|
|
110
109
|
}
|
|
111
110
|
];
|
|
@@ -182,8 +181,7 @@ const OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES = [
|
|
|
182
181
|
_openfairygui_backend_docs.OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE,
|
|
183
182
|
"openfairygui://backend/session/{sessionId}",
|
|
184
183
|
"openfairygui://backend/session/{sessionId}/outline",
|
|
185
|
-
"openfairygui://backend/cache/{sessionId}"
|
|
186
|
-
"openfairygui://backend/job/{sessionId}/{jobId}"
|
|
184
|
+
"openfairygui://backend/cache/{sessionId}"
|
|
187
185
|
];
|
|
188
186
|
function registerOpenFairyGuiBackendResources(server, runtime) {
|
|
189
187
|
server.registerResource("openfairygui_docs_index", _openfairygui_backend_docs.OPENFAIRYGUI_DOCS_INDEX_URI, {
|
|
@@ -259,14 +257,6 @@ function registerOpenFairyGuiBackendResources(server, runtime) {
|
|
|
259
257
|
description: "Read a derived backend cache envelope by backend-local session id.",
|
|
260
258
|
mimeType: JSON_MIME_TYPE
|
|
261
259
|
}, (uri, variables) => jsonResource(uri, runtime.getCacheSnapshot({ sessionId: firstVariable(variables.sessionId) })));
|
|
262
|
-
server.registerResource("openfairygui_backend_job", new _modelcontextprotocol_sdk_server_mcp_js.ResourceTemplate("openfairygui://backend/job/{sessionId}/{jobId}", { list: void 0 }), {
|
|
263
|
-
title: "OpenFairyGUI Backend Job Snapshot",
|
|
264
|
-
description: "Read a backend runtime job envelope by session id and job id.",
|
|
265
|
-
mimeType: JSON_MIME_TYPE
|
|
266
|
-
}, (uri, variables) => jsonResource(uri, runtime.getJob({
|
|
267
|
-
sessionId: firstVariable(variables.sessionId),
|
|
268
|
-
jobId: firstVariable(variables.jobId)
|
|
269
|
-
})));
|
|
270
260
|
}
|
|
271
261
|
//#endregion
|
|
272
262
|
//#region src/tool-metadata.ts
|
|
@@ -441,39 +431,6 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
441
431
|
openWorldHint: false
|
|
442
432
|
}
|
|
443
433
|
},
|
|
444
|
-
{
|
|
445
|
-
name: "openfairygui_backend_get_job",
|
|
446
|
-
backendMethod: "getJob",
|
|
447
|
-
title: "Get Runtime Job",
|
|
448
|
-
description: "Return a backend runtime job snapshot by session and backend-local job id.",
|
|
449
|
-
annotations: {
|
|
450
|
-
readOnlyHint: true,
|
|
451
|
-
idempotentHint: true,
|
|
452
|
-
openWorldHint: false
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
name: "openfairygui_backend_list_jobs",
|
|
457
|
-
backendMethod: "listJobs",
|
|
458
|
-
title: "List Runtime Jobs",
|
|
459
|
-
description: "List backend runtime jobs for a session with backend P2 status/kind filters.",
|
|
460
|
-
annotations: {
|
|
461
|
-
readOnlyHint: true,
|
|
462
|
-
idempotentHint: true,
|
|
463
|
-
openWorldHint: false
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
name: "openfairygui_backend_cancel_job",
|
|
468
|
-
backendMethod: "cancelJob",
|
|
469
|
-
title: "Cancel Runtime Job",
|
|
470
|
-
description: "Request cooperative cancellation for a backend runtime job.",
|
|
471
|
-
annotations: {
|
|
472
|
-
readOnlyHint: false,
|
|
473
|
-
idempotentHint: false,
|
|
474
|
-
openWorldHint: false
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
434
|
{
|
|
478
435
|
name: "openfairygui_backend_get_cache_snapshot",
|
|
479
436
|
backendMethod: "getCacheSnapshot",
|
|
@@ -489,7 +446,7 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
489
446
|
name: "openfairygui_backend_refresh_cache",
|
|
490
447
|
backendMethod: "refreshCache",
|
|
491
448
|
title: "Refresh Cache",
|
|
492
|
-
description: "
|
|
449
|
+
description: "Synchronously refresh the derived session cache and return its revision-bound snapshot.",
|
|
493
450
|
annotations: {
|
|
494
451
|
readOnlyHint: false,
|
|
495
452
|
idempotentHint: false,
|
|
@@ -629,7 +586,7 @@ async function callOpenFairyGuiBackendTool(runtime, name, input, policy) {
|
|
|
629
586
|
//#region src/server.ts
|
|
630
587
|
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
631
588
|
function getInjectedPackageVersion() {
|
|
632
|
-
const version = "0.
|
|
589
|
+
const version = "0.6.1";
|
|
633
590
|
return typeof version === "string" && true ? version : null;
|
|
634
591
|
}
|
|
635
592
|
function readPackageVersion() {
|
|
@@ -24,7 +24,7 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
24
24
|
text: [
|
|
25
25
|
"Use openfairygui_backend_get_capabilities first.",
|
|
26
26
|
"Read contractVersion, capabilitySchemaVersion, capability planes, methods, and runtime non-goals from the backend envelope.",
|
|
27
|
-
"Do not infer artifact publish/restore, subscriptions,
|
|
27
|
+
"Do not infer artifact publish/restore, subscriptions, or cache source-of-truth support when the backend marks them unsupported."
|
|
28
28
|
].join("\n")
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -77,12 +77,11 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
77
77
|
{
|
|
78
78
|
name: "openfairygui_poll_runtime_state",
|
|
79
79
|
title: "Poll OpenFairyGUI Runtime State",
|
|
80
|
-
description: "Guide a client through event
|
|
80
|
+
description: "Guide a client through event polling and synchronous cache snapshots.",
|
|
81
81
|
text: [
|
|
82
82
|
"Use openfairygui_backend_get_events for polling events with the backend cursor contract.",
|
|
83
|
-
"Use
|
|
84
|
-
"
|
|
85
|
-
"Subscriptions, persistent jobs, artifact jobs, and cache-as-source-of-truth behavior are not supported by backend P2."
|
|
83
|
+
"Use openfairygui_backend_get_cache_snapshot for derived read-only cache state; openfairygui_backend_refresh_cache returns the refreshed snapshot synchronously.",
|
|
84
|
+
"Subscriptions and cache-as-source-of-truth behavior are not supported by the backend."
|
|
86
85
|
].join("\n")
|
|
87
86
|
}
|
|
88
87
|
];
|
|
@@ -159,8 +158,7 @@ const OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES = [
|
|
|
159
158
|
OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE,
|
|
160
159
|
"openfairygui://backend/session/{sessionId}",
|
|
161
160
|
"openfairygui://backend/session/{sessionId}/outline",
|
|
162
|
-
"openfairygui://backend/cache/{sessionId}"
|
|
163
|
-
"openfairygui://backend/job/{sessionId}/{jobId}"
|
|
161
|
+
"openfairygui://backend/cache/{sessionId}"
|
|
164
162
|
];
|
|
165
163
|
function registerOpenFairyGuiBackendResources(server, runtime) {
|
|
166
164
|
server.registerResource("openfairygui_docs_index", OPENFAIRYGUI_DOCS_INDEX_URI, {
|
|
@@ -236,14 +234,6 @@ function registerOpenFairyGuiBackendResources(server, runtime) {
|
|
|
236
234
|
description: "Read a derived backend cache envelope by backend-local session id.",
|
|
237
235
|
mimeType: JSON_MIME_TYPE
|
|
238
236
|
}, (uri, variables) => jsonResource(uri, runtime.getCacheSnapshot({ sessionId: firstVariable(variables.sessionId) })));
|
|
239
|
-
server.registerResource("openfairygui_backend_job", new ResourceTemplate("openfairygui://backend/job/{sessionId}/{jobId}", { list: void 0 }), {
|
|
240
|
-
title: "OpenFairyGUI Backend Job Snapshot",
|
|
241
|
-
description: "Read a backend runtime job envelope by session id and job id.",
|
|
242
|
-
mimeType: JSON_MIME_TYPE
|
|
243
|
-
}, (uri, variables) => jsonResource(uri, runtime.getJob({
|
|
244
|
-
sessionId: firstVariable(variables.sessionId),
|
|
245
|
-
jobId: firstVariable(variables.jobId)
|
|
246
|
-
})));
|
|
247
237
|
}
|
|
248
238
|
//#endregion
|
|
249
239
|
//#region src/tool-metadata.ts
|
|
@@ -418,39 +408,6 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
418
408
|
openWorldHint: false
|
|
419
409
|
}
|
|
420
410
|
},
|
|
421
|
-
{
|
|
422
|
-
name: "openfairygui_backend_get_job",
|
|
423
|
-
backendMethod: "getJob",
|
|
424
|
-
title: "Get Runtime Job",
|
|
425
|
-
description: "Return a backend runtime job snapshot by session and backend-local job id.",
|
|
426
|
-
annotations: {
|
|
427
|
-
readOnlyHint: true,
|
|
428
|
-
idempotentHint: true,
|
|
429
|
-
openWorldHint: false
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
name: "openfairygui_backend_list_jobs",
|
|
434
|
-
backendMethod: "listJobs",
|
|
435
|
-
title: "List Runtime Jobs",
|
|
436
|
-
description: "List backend runtime jobs for a session with backend P2 status/kind filters.",
|
|
437
|
-
annotations: {
|
|
438
|
-
readOnlyHint: true,
|
|
439
|
-
idempotentHint: true,
|
|
440
|
-
openWorldHint: false
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
name: "openfairygui_backend_cancel_job",
|
|
445
|
-
backendMethod: "cancelJob",
|
|
446
|
-
title: "Cancel Runtime Job",
|
|
447
|
-
description: "Request cooperative cancellation for a backend runtime job.",
|
|
448
|
-
annotations: {
|
|
449
|
-
readOnlyHint: false,
|
|
450
|
-
idempotentHint: false,
|
|
451
|
-
openWorldHint: false
|
|
452
|
-
}
|
|
453
|
-
},
|
|
454
411
|
{
|
|
455
412
|
name: "openfairygui_backend_get_cache_snapshot",
|
|
456
413
|
backendMethod: "getCacheSnapshot",
|
|
@@ -466,7 +423,7 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
466
423
|
name: "openfairygui_backend_refresh_cache",
|
|
467
424
|
backendMethod: "refreshCache",
|
|
468
425
|
title: "Refresh Cache",
|
|
469
|
-
description: "
|
|
426
|
+
description: "Synchronously refresh the derived session cache and return its revision-bound snapshot.",
|
|
470
427
|
annotations: {
|
|
471
428
|
readOnlyHint: false,
|
|
472
429
|
idempotentHint: false,
|
|
@@ -606,7 +563,7 @@ async function callOpenFairyGuiBackendTool(runtime, name, input, policy) {
|
|
|
606
563
|
//#region src/server.ts
|
|
607
564
|
const require = createRequire(import.meta.url);
|
|
608
565
|
function getInjectedPackageVersion() {
|
|
609
|
-
const version = "0.
|
|
566
|
+
const version = "0.6.1";
|
|
610
567
|
return typeof version === "string" && true ? version : null;
|
|
611
568
|
}
|
|
612
569
|
function readPackageVersion() {
|
package/dist/stdio.cjs
CHANGED
package/dist/stdio.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as connectOpenFairyGuiMcpStdio } from "./stdio-
|
|
1
|
+
import { t as connectOpenFairyGuiMcpStdio } from "./stdio-DyxngFMM.mjs";
|
|
2
2
|
export { connectOpenFairyGuiMcpStdio };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfairygui/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "FairyGUI Headless Authoring SDK - MCP server adapter for the backend runtime.",
|
|
5
5
|
"author": "OpenFairyGUI Contributors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
63
63
|
"zod": "^4.3.6",
|
|
64
|
-
"@openfairygui/backend": "0.
|
|
64
|
+
"@openfairygui/backend": "0.6.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"ava": "^7.0.0",
|
|
68
68
|
"tsx": "^4.0.0",
|
|
69
|
-
"@openfairygui/
|
|
70
|
-
"@openfairygui/
|
|
69
|
+
"@openfairygui/test-utils": "0.3.0",
|
|
70
|
+
"@openfairygui/core": "0.6.1"
|
|
71
71
|
},
|
|
72
72
|
"ava": {
|
|
73
73
|
"extensions": {
|
|
@@ -26,7 +26,7 @@ export const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
26
26
|
text: [
|
|
27
27
|
'Use openfairygui_backend_get_capabilities first.',
|
|
28
28
|
'Read contractVersion, capabilitySchemaVersion, capability planes, methods, and runtime non-goals from the backend envelope.',
|
|
29
|
-
'Do not infer artifact publish/restore, subscriptions,
|
|
29
|
+
'Do not infer artifact publish/restore, subscriptions, or cache source-of-truth support when the backend marks them unsupported.',
|
|
30
30
|
].join('\n'),
|
|
31
31
|
},
|
|
32
32
|
{
|
|
@@ -79,12 +79,11 @@ export const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
|
|
|
79
79
|
{
|
|
80
80
|
name: 'openfairygui_poll_runtime_state',
|
|
81
81
|
title: 'Poll OpenFairyGUI Runtime State',
|
|
82
|
-
description: 'Guide a client through event
|
|
82
|
+
description: 'Guide a client through event polling and synchronous cache snapshots.',
|
|
83
83
|
text: [
|
|
84
84
|
'Use openfairygui_backend_get_events for polling events with the backend cursor contract.',
|
|
85
|
-
'Use
|
|
86
|
-
'
|
|
87
|
-
'Subscriptions, persistent jobs, artifact jobs, and cache-as-source-of-truth behavior are not supported by backend P2.',
|
|
85
|
+
'Use openfairygui_backend_get_cache_snapshot for derived read-only cache state; openfairygui_backend_refresh_cache returns the refreshed snapshot synchronously.',
|
|
86
|
+
'Subscriptions and cache-as-source-of-truth behavior are not supported by the backend.',
|
|
88
87
|
].join('\n'),
|
|
89
88
|
},
|
|
90
89
|
] as const satisfies readonly OpenFairyGuiBackendPromptDefinition[];
|
|
@@ -38,7 +38,6 @@ export const OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES = [
|
|
|
38
38
|
'openfairygui://backend/session/{sessionId}',
|
|
39
39
|
'openfairygui://backend/session/{sessionId}/outline',
|
|
40
40
|
'openfairygui://backend/cache/{sessionId}',
|
|
41
|
-
'openfairygui://backend/job/{sessionId}/{jobId}',
|
|
42
41
|
] as const;
|
|
43
42
|
|
|
44
43
|
export function registerOpenFairyGuiBackendResources(server: McpServer, runtime: OpenFairyGuiBackendRuntime): void {
|
|
@@ -139,17 +138,4 @@ export function registerOpenFairyGuiBackendResources(server: McpServer, runtime:
|
|
|
139
138
|
})),
|
|
140
139
|
);
|
|
141
140
|
|
|
142
|
-
server.registerResource(
|
|
143
|
-
'openfairygui_backend_job',
|
|
144
|
-
new ResourceTemplate('openfairygui://backend/job/{sessionId}/{jobId}', { list: undefined }),
|
|
145
|
-
{
|
|
146
|
-
title: 'OpenFairyGUI Backend Job Snapshot',
|
|
147
|
-
description: 'Read a backend runtime job envelope by session id and job id.',
|
|
148
|
-
mimeType: JSON_MIME_TYPE,
|
|
149
|
-
},
|
|
150
|
-
(uri: URL, variables) => jsonResource(uri, runtime.getJob({
|
|
151
|
-
sessionId: firstVariable(variables.sessionId),
|
|
152
|
-
jobId: firstVariable(variables.jobId),
|
|
153
|
-
})),
|
|
154
|
-
);
|
|
155
141
|
}
|
package/src/tool-metadata.ts
CHANGED
|
@@ -143,27 +143,6 @@ export const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
143
143
|
description: 'Poll backend runtime events for a session using the backend P2 event cursor contract.',
|
|
144
144
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
145
145
|
},
|
|
146
|
-
{
|
|
147
|
-
name: 'openfairygui_backend_get_job',
|
|
148
|
-
backendMethod: 'getJob',
|
|
149
|
-
title: 'Get Runtime Job',
|
|
150
|
-
description: 'Return a backend runtime job snapshot by session and backend-local job id.',
|
|
151
|
-
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: 'openfairygui_backend_list_jobs',
|
|
155
|
-
backendMethod: 'listJobs',
|
|
156
|
-
title: 'List Runtime Jobs',
|
|
157
|
-
description: 'List backend runtime jobs for a session with backend P2 status/kind filters.',
|
|
158
|
-
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
name: 'openfairygui_backend_cancel_job',
|
|
162
|
-
backendMethod: 'cancelJob',
|
|
163
|
-
title: 'Cancel Runtime Job',
|
|
164
|
-
description: 'Request cooperative cancellation for a backend runtime job.',
|
|
165
|
-
annotations: { readOnlyHint: false, idempotentHint: false, openWorldHint: false },
|
|
166
|
-
},
|
|
167
146
|
{
|
|
168
147
|
name: 'openfairygui_backend_get_cache_snapshot',
|
|
169
148
|
backendMethod: 'getCacheSnapshot',
|
|
@@ -175,7 +154,7 @@ export const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
|
|
|
175
154
|
name: 'openfairygui_backend_refresh_cache',
|
|
176
155
|
backendMethod: 'refreshCache',
|
|
177
156
|
title: 'Refresh Cache',
|
|
178
|
-
description: '
|
|
157
|
+
description: 'Synchronously refresh the derived session cache and return its revision-bound snapshot.',
|
|
179
158
|
annotations: { readOnlyHint: false, idempotentHint: false, openWorldHint: false },
|
|
180
159
|
},
|
|
181
160
|
] as const satisfies readonly BackendToolMetadata[];
|