@openfairygui/mcp 0.7.0 → 0.8.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 CHANGED
@@ -14,6 +14,7 @@ It maps the backend runtime surface into MCP tools:
14
14
  - `getSession`
15
15
  - `getProjectOutline`
16
16
  - `queryEntity`
17
+ - `queryDisplayNodes`
17
18
  - `readSessionState`
18
19
  - `readResourceBytes`
19
20
  - `validateSession`
@@ -138,7 +139,7 @@ When running from a workspace checkout before publishing, point the command at t
138
139
  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
 
140
141
  <!-- product-facts:start -->
141
- Package: `0.7.0` · Backend contract: `3.0.0` · Capability schema: `15`
142
+ Package: `0.8.0` · Backend contract: `3.0.0` · Capability schema: `16`
142
143
 
143
- Operations: 41 · Backend methods: 17 · CLI commands: 16 · Diagnostic codes: 104
144
+ Operations: 41 · Backend methods: 18 · CLI commands: 16 · Diagnostic codes: 104
144
145
  <!-- product-facts:end -->
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stdio = require("./stdio-y0kkRAoR.cjs");
2
+ const require_stdio = require("./stdio-CrD80jE4.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
@@ -81,6 +81,16 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
81
81
  readonly idempotentHint: true;
82
82
  readonly openWorldHint: false;
83
83
  };
84
+ }, {
85
+ readonly name: "openfairygui_backend_query_display_nodes";
86
+ readonly backendMethod: "queryDisplayNodes";
87
+ readonly title: "Query Display Nodes in Component";
88
+ readonly description: "Filter display nodes within one component by modeled properties (kind, name, nameContains, text, textContains, title, titleContains, group, resourceId, url, visible, locked, touchable, hasGears, hasRelations) with an explicit limit (default 50, max 200) and response byte budget. Returns matching displayNode IDs, displayList indices, and key summary properties at the current revision; mutations still require exact displayNodeId selectors.";
89
+ readonly annotations: {
90
+ readonly readOnlyHint: true;
91
+ readonly idempotentHint: true;
92
+ readonly openWorldHint: false;
93
+ };
84
94
  }, {
85
95
  readonly name: "openfairygui_backend_read_session_state";
86
96
  readonly backendMethod: "readSessionState";
@@ -203,7 +213,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
203
213
  //#region src/tool-definitions.d.ts
204
214
  declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
205
215
  type OpenFairyGuiBackendToolName = (typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA)[number]['name'];
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")[];
216
+ 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_query_display_nodes" | "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")[];
207
217
  interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
208
218
  name: OpenFairyGuiBackendToolName;
209
219
  inputSchema: z.ZodObject;
package/dist/index.d.mts CHANGED
@@ -81,6 +81,16 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
81
81
  readonly idempotentHint: true;
82
82
  readonly openWorldHint: false;
83
83
  };
84
+ }, {
85
+ readonly name: "openfairygui_backend_query_display_nodes";
86
+ readonly backendMethod: "queryDisplayNodes";
87
+ readonly title: "Query Display Nodes in Component";
88
+ readonly description: "Filter display nodes within one component by modeled properties (kind, name, nameContains, text, textContains, title, titleContains, group, resourceId, url, visible, locked, touchable, hasGears, hasRelations) with an explicit limit (default 50, max 200) and response byte budget. Returns matching displayNode IDs, displayList indices, and key summary properties at the current revision; mutations still require exact displayNodeId selectors.";
89
+ readonly annotations: {
90
+ readonly readOnlyHint: true;
91
+ readonly idempotentHint: true;
92
+ readonly openWorldHint: false;
93
+ };
84
94
  }, {
85
95
  readonly name: "openfairygui_backend_read_session_state";
86
96
  readonly backendMethod: "readSessionState";
@@ -203,7 +213,7 @@ declare const OPENFAIRYGUI_BACKEND_TOOL_METADATA: readonly [{
203
213
  //#region src/tool-definitions.d.ts
204
214
  declare const OPENFAIRYGUI_BACKEND_TOOL_PREFIX = "openfairygui_backend_";
205
215
  type OpenFairyGuiBackendToolName = (typeof OPENFAIRYGUI_BACKEND_TOOL_METADATA)[number]['name'];
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")[];
216
+ 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_query_display_nodes" | "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")[];
207
217
  interface OpenFairyGuiBackendToolDefinition extends BackendToolMetadata {
208
218
  name: OpenFairyGuiBackendToolName;
209
219
  inputSchema: z.ZodObject;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
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";
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-DjTzMGeP.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 };
@@ -172,6 +172,17 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
172
172
  openWorldHint: false
173
173
  }
174
174
  },
175
+ {
176
+ name: "openfairygui_backend_query_display_nodes",
177
+ backendMethod: "queryDisplayNodes",
178
+ title: "Query Display Nodes in Component",
179
+ description: "Filter display nodes within one component by modeled properties (kind, name, nameContains, text, textContains, title, titleContains, group, resourceId, url, visible, locked, touchable, hasGears, hasRelations) with an explicit limit (default 50, max 200) and response byte budget. Returns matching displayNode IDs, displayList indices, and key summary properties at the current revision; mutations still require exact displayNodeId selectors.",
180
+ annotations: {
181
+ readOnlyHint: true,
182
+ idempotentHint: true,
183
+ openWorldHint: false
184
+ }
185
+ },
175
186
  {
176
187
  name: "openfairygui_backend_read_session_state",
177
188
  backendMethod: "readSessionState",
@@ -414,7 +425,7 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
414
425
  description: "Guide a client through backend-owned revision checks without inventing operation grammar.",
415
426
  text: [
416
427
  "Use openfairygui_backend_get_session to read the current revision before mutation.",
417
- "Use openfairygui_backend_get_project_outline for identities, then openfairygui_backend_query_entity for current properties at the returned revision.",
428
+ "Use openfairygui_backend_get_project_outline for identities, openfairygui_backend_query_display_nodes to filter candidate display nodes within a component by modeled properties, and openfairygui_backend_query_entity for full current properties at the returned revision.",
418
429
  "For settings edits, query target {kind:\"project\"} or {kind:\"package\",selector:{packageId}}; copy entity.properties.settings, change the requested fields, and submit the complete settings to updateProjectSettings or updatePackageSettings.",
419
430
  "Read openfairygui://contracts/operations and openfairygui://contracts/operations/{kind} for the current operation names and exact JSON parameters.",
420
431
  "Call openfairygui_backend_preflight_transaction with the queried revision and planned operations to execute and discard an isolated preview; inspect the backend diagnostics.",
@@ -681,7 +692,7 @@ async function callOpenFairyGuiBackendTool(runtime, name, input, policy) {
681
692
  //#region src/server.ts
682
693
  const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
683
694
  function getInjectedPackageVersion() {
684
- const version = "0.7.0";
695
+ const version = "0.8.0";
685
696
  return typeof version === "string" && true ? version : null;
686
697
  }
687
698
  function readPackageVersion() {
@@ -697,7 +708,7 @@ const PACKAGE_VERSION = readPackageVersion();
697
708
  const DEFAULT_INSTRUCTIONS = [
698
709
  "Read openfairygui_docs_read with id index, then workflow and the needed operation/method documents.",
699
710
  "Open a project directory or .fairy file within the configured allowed roots.",
700
- "Read the project outline, then query exact entity IDs and their current revision.",
711
+ "Read the project outline, use openfairygui_backend_query_display_nodes to filter candidate nodes within a component by property when needed, and query exact entity IDs and their current revision.",
701
712
  "Preflight the operation batch with expectedRevision before applying it.",
702
713
  "Apply at that same revision; on stale_write re-query and reconsider, never retry blindly.",
703
714
  "Validate the edited session, save with its current revision, and close the session when finished."
@@ -149,6 +149,17 @@ const OPENFAIRYGUI_BACKEND_TOOL_METADATA = [
149
149
  openWorldHint: false
150
150
  }
151
151
  },
152
+ {
153
+ name: "openfairygui_backend_query_display_nodes",
154
+ backendMethod: "queryDisplayNodes",
155
+ title: "Query Display Nodes in Component",
156
+ description: "Filter display nodes within one component by modeled properties (kind, name, nameContains, text, textContains, title, titleContains, group, resourceId, url, visible, locked, touchable, hasGears, hasRelations) with an explicit limit (default 50, max 200) and response byte budget. Returns matching displayNode IDs, displayList indices, and key summary properties at the current revision; mutations still require exact displayNodeId selectors.",
157
+ annotations: {
158
+ readOnlyHint: true,
159
+ idempotentHint: true,
160
+ openWorldHint: false
161
+ }
162
+ },
152
163
  {
153
164
  name: "openfairygui_backend_read_session_state",
154
165
  backendMethod: "readSessionState",
@@ -391,7 +402,7 @@ const OPENFAIRYGUI_BACKEND_PROMPT_DEFINITIONS = [
391
402
  description: "Guide a client through backend-owned revision checks without inventing operation grammar.",
392
403
  text: [
393
404
  "Use openfairygui_backend_get_session to read the current revision before mutation.",
394
- "Use openfairygui_backend_get_project_outline for identities, then openfairygui_backend_query_entity for current properties at the returned revision.",
405
+ "Use openfairygui_backend_get_project_outline for identities, openfairygui_backend_query_display_nodes to filter candidate display nodes within a component by modeled properties, and openfairygui_backend_query_entity for full current properties at the returned revision.",
395
406
  "For settings edits, query target {kind:\"project\"} or {kind:\"package\",selector:{packageId}}; copy entity.properties.settings, change the requested fields, and submit the complete settings to updateProjectSettings or updatePackageSettings.",
396
407
  "Read openfairygui://contracts/operations and openfairygui://contracts/operations/{kind} for the current operation names and exact JSON parameters.",
397
408
  "Call openfairygui_backend_preflight_transaction with the queried revision and planned operations to execute and discard an isolated preview; inspect the backend diagnostics.",
@@ -658,7 +669,7 @@ async function callOpenFairyGuiBackendTool(runtime, name, input, policy) {
658
669
  //#region src/server.ts
659
670
  const require = createRequire(import.meta.url);
660
671
  function getInjectedPackageVersion() {
661
- const version = "0.7.0";
672
+ const version = "0.8.0";
662
673
  return typeof version === "string" && true ? version : null;
663
674
  }
664
675
  function readPackageVersion() {
@@ -674,7 +685,7 @@ const PACKAGE_VERSION = readPackageVersion();
674
685
  const DEFAULT_INSTRUCTIONS = [
675
686
  "Read openfairygui_docs_read with id index, then workflow and the needed operation/method documents.",
676
687
  "Open a project directory or .fairy file within the configured allowed roots.",
677
- "Read the project outline, then query exact entity IDs and their current revision.",
688
+ "Read the project outline, use openfairygui_backend_query_display_nodes to filter candidate nodes within a component by property when needed, and query exact entity IDs and their current revision.",
678
689
  "Preflight the operation batch with expectedRevision before applying it.",
679
690
  "Apply at that same revision; on stale_write re-query and reconsider, never retry blindly.",
680
691
  "Validate the edited session, save with its current revision, and close the session when finished."
package/dist/stdio.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stdio = require("./stdio-y0kkRAoR.cjs");
2
+ const require_stdio = require("./stdio-CrD80jE4.cjs");
3
3
  exports.connectOpenFairyGuiMcpStdio = require_stdio.connectOpenFairyGuiMcpStdio;
package/dist/stdio.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as connectOpenFairyGuiMcpStdio } from "./stdio-Dtt0AQOx.mjs";
1
+ import { t as connectOpenFairyGuiMcpStdio } from "./stdio-DjTzMGeP.mjs";
2
2
  export { connectOpenFairyGuiMcpStdio };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfairygui/mcp",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "FairyGUI Headless Authoring SDK - MCP server adapter for the backend runtime.",
5
5
  "author": "OpenFairyGUI Contributors",
6
6
  "license": "MIT",
@@ -60,30 +60,15 @@
60
60
  "dependencies": {
61
61
  "@modelcontextprotocol/sdk": "^1.29.0",
62
62
  "zod": "^4.3.6",
63
- "@openfairygui/backend": "0.7.0"
63
+ "@openfairygui/backend": "0.8.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "ava": "^7.0.0",
67
- "tsx": "^4.0.0",
68
- "@openfairygui/core": "0.7.0",
67
+ "@openfairygui/core": "0.8.0",
69
68
  "@openfairygui/test-utils": "0.3.0"
70
69
  },
71
- "ava": {
72
- "extensions": {
73
- "ts": "module"
74
- },
75
- "nodeArguments": [
76
- "--import",
77
- "tsx/esm"
78
- ],
79
- "files": [
80
- "test/**/*.test.ts"
81
- ],
82
- "workerThreads": false
83
- },
84
70
  "scripts": {
85
- "build": "tsdown src/index.ts src/stdio.ts --format esm,cjs --platform node --external node:fs --external node:path --external node:fs/promises",
86
- "build:watch": "tsdown src/index.ts src/stdio.ts --watch --format esm,cjs --platform node",
87
- "test": "ava test/**/*.test.ts"
71
+ "build": "tsdown",
72
+ "build:watch": "tsdown --watch"
88
73
  }
89
74
  }