@openfairygui/mcp 0.3.1 → 0.5.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,11 @@ It maps the backend P2 runtime surface into MCP tools:
13
13
  - `openProjectSession`
14
14
  - `getSession`
15
15
  - `getProjectOutline`
16
+ - `queryEntity`
17
+ - `readSessionState`
18
+ - `readResourceBytes`
16
19
  - `validateSession`
20
+ - `preflightTransaction`
17
21
  - `applyTransaction`
18
22
  - `saveSession`
19
23
  - `materializeSession`
@@ -25,13 +29,15 @@ It maps the backend P2 runtime surface into MCP tools:
25
29
  - `getCacheSnapshot`
26
30
  - `refreshCache`
27
31
 
28
- Each tool exposes a shared output schema for `structuredContent.backendResult`, preserving the backend envelope shape:
32
+ Each tool exposes a method-specific output schema for `structuredContent.backendResult`, preserving the backend envelope shape:
29
33
 
30
34
  - `ok`
31
35
  - `data?`
32
36
  - `error?`
33
37
  - `meta?`
34
38
 
39
+ The factory advertises the fixed 20-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`.
40
+
35
41
  P1 also registers MCP-native ergonomics around the same backend surface:
36
42
 
37
43
  - read-only resources for identity snapshots:
@@ -45,6 +51,8 @@ P1 also registers MCP-native ergonomics around the same backend surface:
45
51
  Resources return `application/json` text containing the unchanged backend result envelope. Parameterized polling remains tool-based: `getEvents` and `listJobs` are not exposed as resource URI query grammars.
46
52
  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.
47
53
 
54
+ `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
+
48
56
  It does **not** redefine transaction selectors, transaction operations, path policy, session semantics, job semantics, cache semantics, or backend error envelopes. Those remain owned by `@openfairygui/backend`, `@openfairygui/functions`, and `@openfairygui/core`.
49
57
 
50
58
  It also does **not** activate artifact publish/restore jobs, subscriptions, persistent jobs, 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.
package/dist/index.cjs CHANGED
@@ -1,13 +1,37 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stdio = require("./stdio-N6Yxacus.cjs");
2
+ const require_stdio = require("./stdio-CB98zdOf.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
+ });