@openfairygui/mcp 0.6.2 → 0.7.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 +12 -4
- package/bin/ofgui-mcp.cjs +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +18 -9
- package/dist/index.d.mts +19 -10
- package/dist/index.mjs +1 -1
- package/dist/{stdio-Cv_scwwv.mjs → stdio-Dtt0AQOx.mjs} +389 -239
- package/dist/{stdio-yS2X7Ohn.cjs → stdio-y0kkRAoR.cjs} +389 -239
- package/dist/stdio.cjs +1 -1
- package/dist/stdio.mjs +1 -1
- package/package.json +8 -8
- package/src/contract-schema.ts +0 -39
- package/src/index.ts +0 -35
- package/src/prompt-definitions.ts +0 -122
- package/src/resource-definitions.ts +0 -141
- package/src/server.ts +0 -94
- package/src/stdio.ts +0 -20
- package/src/tool-definitions.ts +0 -64
- package/src/tool-handler.ts +0 -107
- package/src/tool-metadata.ts +0 -160
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ MCP server adapter for OpenFairyGUI backend runtime services.
|
|
|
6
6
|
|
|
7
7
|
`@openfairygui/mcp` is a thin Model Context Protocol adapter over `@openfairygui/backend`.
|
|
8
8
|
|
|
9
|
-
It maps the backend
|
|
9
|
+
It maps the backend runtime surface into MCP tools:
|
|
10
10
|
|
|
11
11
|
- `getCapabilities`
|
|
12
12
|
- `openSession`
|
|
@@ -33,9 +33,9 @@ Each tool exposes a method-specific output schema for `structuredContent.backend
|
|
|
33
33
|
- `error?`
|
|
34
34
|
- `meta?`
|
|
35
35
|
|
|
36
|
-
The factory registers the
|
|
36
|
+
The factory registers the generated Backend catalog. The SDK owns dynamic discovery and dispatch, including Host tools added through `server.registerTool()`. Input/output schemas come from the canonical installed contract; discovery uses self-contained draft-07 `definitions`/`$ref` to reuse repeated structures without loosening the generated operation union, call validators or input budgets. Installed operation documentation remains available through `openfairygui://contracts/operations` and `openfairygui://docs/index`.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
The server also registers MCP-native ergonomics around the same backend surface:
|
|
39
39
|
|
|
40
40
|
- read-only resources for identity snapshots:
|
|
41
41
|
- `openfairygui://backend/capabilities`
|
|
@@ -73,7 +73,7 @@ ofgui-mcp
|
|
|
73
73
|
|
|
74
74
|
Pass `instructions` to the factory to publish Host guidance in the SDK initialize handshake.
|
|
75
75
|
|
|
76
|
-
Use `toolPolicies` to gate selected tools before Backend executes. Each policy declares a synchronous Zod `failureSchema` and a `beforeCall` callback. The callback receives a detached copy of the validated wire input and may be async. Returning `undefined` invokes the original Backend method once with the original input; returning a declared `ok: false` envelope stops the call and produces
|
|
76
|
+
Use `toolPolicies` to gate selected tools before Backend executes. Each policy declares a synchronous Zod `failureSchema` and a `beforeCall` callback. The callback receives a detached copy of the validated wire input and may be async. Returning `undefined` invokes the original Backend method once with the original input; returning a declared `ok: false` envelope stops the call and produces a bounded text diagnostic summary and the complete `structuredContent.backendResult` with `isError: true`.
|
|
77
77
|
|
|
78
78
|
```ts
|
|
79
79
|
import { createOpenFairyGuiMcpServer, type OpenFairyGuiMcpToolPolicy } from '@openfairygui/mcp';
|
|
@@ -134,3 +134,11 @@ When running from a workspace checkout before publishing, point the command at t
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
```
|
|
137
|
+
|
|
138
|
+
The default handshake explains docs → outline → query → preflight → apply → validate → save → close. `openfairygui_docs_read` exposes installed documentation to tool-only clients. Backend binary output fields use base64 strings in `structuredContent.backendResult`; successful text content is a short pointer; failed calls include bounded primary and nested diagnostic codes plus the error message for text-only error clients. Inputs retain generated byte-array fields. `createOpenFairyGuiMcpServer({ publish })` explicitly adds `openfairygui_host_publish`; the injected host owns authorization, output confinement and plugin policy. Default stdio does not enable publishing.
|
|
139
|
+
|
|
140
|
+
<!-- product-facts:start -->
|
|
141
|
+
Package: `0.7.0` · Backend contract: `3.0.0` · Capability schema: `15`
|
|
142
|
+
|
|
143
|
+
Operations: 41 · Backend methods: 17 · CLI commands: 16 · Diagnostic codes: 104
|
|
144
|
+
<!-- product-facts:end -->
|
package/bin/ofgui-mcp.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const { pathToFileURL } = require('url');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { pathToFileURL } = require('node:url');
|
|
6
6
|
|
|
7
7
|
const entry = path.resolve(__dirname, '../dist/stdio.mjs');
|
|
8
8
|
|
|
9
9
|
import(pathToFileURL(entry).href)
|
|
10
10
|
.then((module) => module.connectOpenFairyGuiMcpStdio())
|
|
11
11
|
.catch((error) => {
|
|
12
|
-
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
12
|
+
console.error(error instanceof Error ? (error.stack ?? error.message) : String(error));
|
|
13
13
|
process.exitCode = 1;
|
|
14
14
|
});
|
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-y0kkRAoR.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
|
@@ -34,7 +34,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
34
34
|
readonly name: "openfairygui_backend_open_session";
|
|
35
35
|
readonly backendMethod: "openSession";
|
|
36
36
|
readonly title: "Open Backend Session";
|
|
37
|
-
readonly description: "Open a
|
|
37
|
+
readonly description: "Open a project directory or .fairy file within allowed roots (stdio: OPENFAIRYGUI_ALLOWED_PROJECT_ROOTS). Acquire a session lock; close the session when finished.";
|
|
38
38
|
readonly annotations: {
|
|
39
39
|
readonly readOnlyHint: false;
|
|
40
40
|
readonly idempotentHint: false;
|
|
@@ -64,7 +64,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
64
64
|
readonly name: "openfairygui_backend_get_project_outline";
|
|
65
65
|
readonly backendMethod: "getProjectOutline";
|
|
66
66
|
readonly title: "Get Project Outline";
|
|
67
|
-
readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads.";
|
|
67
|
+
readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads. Complete tool response is limited to 16 MiB.";
|
|
68
|
+
readonly maxResponseBytes: 16777216;
|
|
68
69
|
readonly annotations: {
|
|
69
70
|
readonly readOnlyHint: true;
|
|
70
71
|
readonly idempotentHint: true;
|
|
@@ -106,7 +107,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
106
107
|
readonly name: "openfairygui_backend_validate_session";
|
|
107
108
|
readonly backendMethod: "validateSession";
|
|
108
109
|
readonly title: "Validate Project Session";
|
|
109
|
-
readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files.";
|
|
110
|
+
readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files. Complete tool response is limited to 16 MiB.";
|
|
111
|
+
readonly maxResponseBytes: 16777216;
|
|
110
112
|
readonly annotations: {
|
|
111
113
|
readonly readOnlyHint: true;
|
|
112
114
|
readonly idempotentHint: true;
|
|
@@ -116,7 +118,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
116
118
|
readonly name: "openfairygui_backend_preflight_transaction";
|
|
117
119
|
readonly backendMethod: "preflightTransaction";
|
|
118
120
|
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.";
|
|
121
|
+
readonly description: "Execute a revision-checked operation batch on an isolated project snapshot and discard the result. Each operations[] item is one object whose \"kind\" field selects its fields, e.g. {\"kind\":\"renameResource\",\"selector\":{\"packageId\":\"<packageId>\",\"resourceId\":\"<resourceId>\"},\"newName\":\"Panel\"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Returns the base revision and Core diagnostics; does not write, reserve a revision, or guarantee a later apply/save.";
|
|
120
122
|
readonly annotations: {
|
|
121
123
|
readonly readOnlyHint: true;
|
|
122
124
|
readonly idempotentHint: true;
|
|
@@ -126,7 +128,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
126
128
|
readonly name: "openfairygui_backend_apply_transaction";
|
|
127
129
|
readonly backendMethod: "applyTransaction";
|
|
128
130
|
readonly title: "Apply UAM Transaction";
|
|
129
|
-
readonly description: "Apply a bounded, revision-checked UAM operation batch
|
|
131
|
+
readonly description: "Apply a bounded, revision-checked UAM operation batch. Each operations[] item is one object whose \"kind\" field selects its fields, e.g. {\"kind\":\"renameResource\",\"selector\":{\"packageId\":\"<packageId>\",\"resourceId\":\"<resourceId>\"},\"newName\":\"Panel\"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Check a batch first with openfairygui_backend_preflight_transaction. On stale_write, re-query and reconsider the batch; do not retry blindly. Validate and save afterward.";
|
|
130
132
|
readonly annotations: {
|
|
131
133
|
readonly readOnlyHint: false;
|
|
132
134
|
readonly destructiveHint: true;
|
|
@@ -137,7 +139,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
137
139
|
readonly name: "openfairygui_backend_save_session";
|
|
138
140
|
readonly backendMethod: "saveSession";
|
|
139
141
|
readonly title: "Save Backend Session";
|
|
140
|
-
readonly description: "Write the current backend session through its coordinated save path; Node
|
|
142
|
+
readonly description: "Write the current backend session through its coordinated save path; Node stages project-owned files and reports rollback or retained-backup diagnostics.";
|
|
141
143
|
readonly annotations: {
|
|
142
144
|
readonly readOnlyHint: false;
|
|
143
145
|
readonly destructiveHint: true;
|
|
@@ -169,7 +171,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
169
171
|
readonly name: "openfairygui_backend_get_events";
|
|
170
172
|
readonly backendMethod: "getEvents";
|
|
171
173
|
readonly title: "Get Runtime Events";
|
|
172
|
-
readonly description: "Poll backend runtime events for a session using the backend
|
|
174
|
+
readonly description: "Poll backend runtime events for a session using the backend event cursor contract. Complete tool response is limited to 16 MiB.";
|
|
175
|
+
readonly maxResponseBytes: 16777216;
|
|
173
176
|
readonly annotations: {
|
|
174
177
|
readonly readOnlyHint: true;
|
|
175
178
|
readonly idempotentHint: true;
|
|
@@ -199,7 +202,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
199
202
|
//#endregion
|
|
200
203
|
//#region src/tool-definitions.d.ts
|
|
201
204
|
declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
|
|
202
|
-
type OpenFairyGuiBackendToolName = typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA[number]['name'];
|
|
205
|
+
type OpenFairyGuiBackendToolName = (typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA)[number]['name'];
|
|
203
206
|
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")[];
|
|
204
207
|
interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
|
|
205
208
|
name: OpenFairyGuiBackendToolName;
|
|
@@ -227,6 +230,12 @@ declare function callOpenFairyGuiBackendTool(runtime: OpenFairyGuiBackendRuntime
|
|
|
227
230
|
//#endregion
|
|
228
231
|
//#region src/server.d.ts
|
|
229
232
|
interface CreateOpenFairyGuiMcpServerOptions {
|
|
233
|
+
/** Explicit host-owned publishing authority. Absent by default; host validates paths, permissions and plugin policy. */
|
|
234
|
+
publish?: (input: {
|
|
235
|
+
projectPath: string;
|
|
236
|
+
outputDirectory: string;
|
|
237
|
+
packageNames?: string[];
|
|
238
|
+
}) => Promise<CallToolResult>;
|
|
230
239
|
runtime?: OpenFairyGuiBackendRuntime;
|
|
231
240
|
/** Filesystem roots exposed by the default Node backend runtime. Defaults to process.cwd(). */
|
|
232
241
|
allowedProjectRoots?: readonly string[];
|
|
@@ -241,7 +250,7 @@ declare function createOpenFairyGuiMcpServer(options?: CreateOpenFairyGuiMcpServ
|
|
|
241
250
|
//#endregion
|
|
242
251
|
//#region src/prompt-definitions.d.ts
|
|
243
252
|
declare const OPENFAIRYGUI_BACKEND_PROMPT_NAMES: readonly ["openfairygui_inspect_capabilities", "openfairygui_open_and_inspect_session", "openfairygui_inspect_project_outline", "openfairygui_plan_revision_checked_transaction", "openfairygui_save_session", "openfairygui_poll_runtime_state"];
|
|
244
|
-
type OpenFairyGuiBackendPromptName = typeof OPENFAIRYGUI_BACKEND_PROMPT_NAMES[number];
|
|
253
|
+
type OpenFairyGuiBackendPromptName = (typeof OPENFAIRYGUI_BACKEND_PROMPT_NAMES)[number];
|
|
245
254
|
declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
|
|
246
255
|
readonly name: "openfairygui_inspect_capabilities";
|
|
247
256
|
readonly title: "Inspect OpenFairyGUI Backend Capabilities";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { connectOpenFairyGuiMcpStdio } from "./stdio.mjs";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { BackendMethodName, BackendMethodName as BackendMethodName$1, BackendRuntime } from "@openfairygui/backend";
|
|
5
4
|
import { OPENFAIRYGUI_OPERATION_CATALOG_URI, OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE, getOpenFairyGuiOperationCatalog, getOpenFairyGuiOperationSchema } from "@openfairygui/backend/docs";
|
|
5
|
+
import { BackendMethodName, BackendMethodName as BackendMethodName$1, BackendRuntime } from "@openfairygui/backend";
|
|
6
6
|
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
7
7
|
|
|
8
8
|
//#region src/tool-metadata.d.ts
|
|
@@ -34,7 +34,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
34
34
|
readonly name: "openfairygui_backend_open_session";
|
|
35
35
|
readonly backendMethod: "openSession";
|
|
36
36
|
readonly title: "Open Backend Session";
|
|
37
|
-
readonly description: "Open a
|
|
37
|
+
readonly description: "Open a project directory or .fairy file within allowed roots (stdio: OPENFAIRYGUI_ALLOWED_PROJECT_ROOTS). Acquire a session lock; close the session when finished.";
|
|
38
38
|
readonly annotations: {
|
|
39
39
|
readonly readOnlyHint: false;
|
|
40
40
|
readonly idempotentHint: false;
|
|
@@ -64,7 +64,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
64
64
|
readonly name: "openfairygui_backend_get_project_outline";
|
|
65
65
|
readonly backendMethod: "getProjectOutline";
|
|
66
66
|
readonly title: "Get Project Outline";
|
|
67
|
-
readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads.";
|
|
67
|
+
readonly description: "Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads. Complete tool response is limited to 16 MiB.";
|
|
68
|
+
readonly maxResponseBytes: 16777216;
|
|
68
69
|
readonly annotations: {
|
|
69
70
|
readonly readOnlyHint: true;
|
|
70
71
|
readonly idempotentHint: true;
|
|
@@ -106,7 +107,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
106
107
|
readonly name: "openfairygui_backend_validate_session";
|
|
107
108
|
readonly backendMethod: "validateSession";
|
|
108
109
|
readonly title: "Validate Project Session";
|
|
109
|
-
readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files.";
|
|
110
|
+
readonly description: "Validate the current session project structure, references, paths, and available source bytes without writing files. Complete tool response is limited to 16 MiB.";
|
|
111
|
+
readonly maxResponseBytes: 16777216;
|
|
110
112
|
readonly annotations: {
|
|
111
113
|
readonly readOnlyHint: true;
|
|
112
114
|
readonly idempotentHint: true;
|
|
@@ -116,7 +118,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
116
118
|
readonly name: "openfairygui_backend_preflight_transaction";
|
|
117
119
|
readonly backendMethod: "preflightTransaction";
|
|
118
120
|
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.";
|
|
121
|
+
readonly description: "Execute a revision-checked operation batch on an isolated project snapshot and discard the result. Each operations[] item is one object whose \"kind\" field selects its fields, e.g. {\"kind\":\"renameResource\",\"selector\":{\"packageId\":\"<packageId>\",\"resourceId\":\"<resourceId>\"},\"newName\":\"Panel\"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Returns the base revision and Core diagnostics; does not write, reserve a revision, or guarantee a later apply/save.";
|
|
120
122
|
readonly annotations: {
|
|
121
123
|
readonly readOnlyHint: true;
|
|
122
124
|
readonly idempotentHint: true;
|
|
@@ -126,7 +128,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
126
128
|
readonly name: "openfairygui_backend_apply_transaction";
|
|
127
129
|
readonly backendMethod: "applyTransaction";
|
|
128
130
|
readonly title: "Apply UAM Transaction";
|
|
129
|
-
readonly description: "Apply a bounded, revision-checked UAM operation batch
|
|
131
|
+
readonly description: "Apply a bounded, revision-checked UAM operation batch. Each operations[] item is one object whose \"kind\" field selects its fields, e.g. {\"kind\":\"renameResource\",\"selector\":{\"packageId\":\"<packageId>\",\"resourceId\":\"<resourceId>\"},\"newName\":\"Panel\"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Check a batch first with openfairygui_backend_preflight_transaction. On stale_write, re-query and reconsider the batch; do not retry blindly. Validate and save afterward.";
|
|
130
132
|
readonly annotations: {
|
|
131
133
|
readonly readOnlyHint: false;
|
|
132
134
|
readonly destructiveHint: true;
|
|
@@ -137,7 +139,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
137
139
|
readonly name: "openfairygui_backend_save_session";
|
|
138
140
|
readonly backendMethod: "saveSession";
|
|
139
141
|
readonly title: "Save Backend Session";
|
|
140
|
-
readonly description: "Write the current backend session through its coordinated save path; Node
|
|
142
|
+
readonly description: "Write the current backend session through its coordinated save path; Node stages project-owned files and reports rollback or retained-backup diagnostics.";
|
|
141
143
|
readonly annotations: {
|
|
142
144
|
readonly readOnlyHint: false;
|
|
143
145
|
readonly destructiveHint: true;
|
|
@@ -169,7 +171,8 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
169
171
|
readonly name: "openfairygui_backend_get_events";
|
|
170
172
|
readonly backendMethod: "getEvents";
|
|
171
173
|
readonly title: "Get Runtime Events";
|
|
172
|
-
readonly description: "Poll backend runtime events for a session using the backend
|
|
174
|
+
readonly description: "Poll backend runtime events for a session using the backend event cursor contract. Complete tool response is limited to 16 MiB.";
|
|
175
|
+
readonly maxResponseBytes: 16777216;
|
|
173
176
|
readonly annotations: {
|
|
174
177
|
readonly readOnlyHint: true;
|
|
175
178
|
readonly idempotentHint: true;
|
|
@@ -199,7 +202,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
|
|
|
199
202
|
//#endregion
|
|
200
203
|
//#region src/tool-definitions.d.ts
|
|
201
204
|
declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
|
|
202
|
-
type OpenFairyGuiBackendToolName = typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA[number]['name'];
|
|
205
|
+
type OpenFairyGuiBackendToolName = (typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA)[number]['name'];
|
|
203
206
|
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")[];
|
|
204
207
|
interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
|
|
205
208
|
name: OpenFairyGuiBackendToolName;
|
|
@@ -227,6 +230,12 @@ declare function callOpenFairyGuiBackendTool(runtime: OpenFairyGuiBackendRuntime
|
|
|
227
230
|
//#endregion
|
|
228
231
|
//#region src/server.d.ts
|
|
229
232
|
interface CreateOpenFairyGuiMcpServerOptions {
|
|
233
|
+
/** Explicit host-owned publishing authority. Absent by default; host validates paths, permissions and plugin policy. */
|
|
234
|
+
publish?: (input: {
|
|
235
|
+
projectPath: string;
|
|
236
|
+
outputDirectory: string;
|
|
237
|
+
packageNames?: string[];
|
|
238
|
+
}) => Promise<CallToolResult>;
|
|
230
239
|
runtime?: OpenFairyGuiBackendRuntime;
|
|
231
240
|
/** Filesystem roots exposed by the default Node backend runtime. Defaults to process.cwd(). */
|
|
232
241
|
allowedProjectRoots?: readonly string[];
|
|
@@ -241,7 +250,7 @@ declare function createOpenFairyGuiMcpServer(options?: CreateOpenFairyGuiMcpServ
|
|
|
241
250
|
//#endregion
|
|
242
251
|
//#region src/prompt-definitions.d.ts
|
|
243
252
|
declare const OPENFAIRYGUI_BACKEND_PROMPT_NAMES: readonly ["openfairygui_inspect_capabilities", "openfairygui_open_and_inspect_session", "openfairygui_inspect_project_outline", "openfairygui_plan_revision_checked_transaction", "openfairygui_save_session", "openfairygui_poll_runtime_state"];
|
|
244
|
-
type OpenFairyGuiBackendPromptName = typeof OPENFAIRYGUI_BACKEND_PROMPT_NAMES[number];
|
|
253
|
+
type OpenFairyGuiBackendPromptName = (typeof OPENFAIRYGUI_BACKEND_PROMPT_NAMES)[number];
|
|
245
254
|
declare const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS: readonly [{
|
|
246
255
|
readonly name: "openfairygui_inspect_capabilities";
|
|
247
256
|
readonly title: "Inspect OpenFairyGUI Backend Capabilities";
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as OPENFAIRYGUI_BACKEND_RESOURCE_TEMPLATES, c as OPENFAIRYGUI_BACKEND_TOOL_DEFINITIONS, d as OPENFAIRYGUI_OPERATION_CATALOG_URI, f as OPENFAIRYGUI_OPERATION_SCHEMA_TEMPLATE, i as OPENFAIRYGUI_BACKEND_CAPABILITIES_RESOURCE_URI, l as OPENFAIRYGUI_BACKEND_TOOL_NAMES, m as getOpenFairyGuiOperationSchema, n as createOpenFairyGuiMcpServer, o as OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS, p as getOpenFairyGuiOperationCatalog, r as callOpenFairyGuiBackendTool, s as OPENFAIRYGUI_BACKEND_PROMPT_NAMES, t as connectOpenFairyGuiMcpStdio, u as OPENFAIRYGUI_BACKEND_TOOL_PREFIX } from "./stdio-Dtt0AQOx.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 };
|