@statelyai/mcp 0.8.1 → 0.8.3
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 +18 -8
- package/dist/index.cjs +186 -32
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +186 -32
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,8 +76,8 @@ Complete Stately sign-in when the client connects.
|
|
|
76
76
|
<!-- shared machine input schemas from src/server.ts -->
|
|
77
77
|
|
|
78
78
|
Most tools accept a machine config object or a source document. Conversion
|
|
79
|
-
|
|
80
|
-
Mermaid.
|
|
79
|
+
accepts XState, SCXML, XGraph, Mermaid, and D2 sources; target formats exclude
|
|
80
|
+
Mermaid. Validation also supports JSON and YAML.
|
|
81
81
|
|
|
82
82
|
## `validate_machine`
|
|
83
83
|
|
|
@@ -111,8 +111,9 @@ createMachine({
|
|
|
111
111
|
|
|
112
112
|
<!-- convert_machine registration from src/server.ts and convert response contract -->
|
|
113
113
|
|
|
114
|
-
Converts
|
|
115
|
-
the target `format`, converted `content`, and any
|
|
114
|
+
Converts XState, SCXML, XGraph, Mermaid, or D2 input to XState, SCXML, XGraph,
|
|
115
|
+
or D2. The response contains the target `format`, converted `content`, and any
|
|
116
|
+
`warnings`.
|
|
116
117
|
|
|
117
118
|
<details>
|
|
118
119
|
<summary>Summary: convert XState to SCXML</summary>
|
|
@@ -317,11 +318,20 @@ createMachine({
|
|
|
317
318
|
MCP Apps hosts render an interactive, read-only graph with hierarchy drill-in,
|
|
318
319
|
breadcrumbs, selection utilities, pan/zoom, and viewport keyboard shortcuts.
|
|
319
320
|
Pass XState source text (the default for strings), a JSON machine config, SCXML,
|
|
320
|
-
XGraph, or D2; the server converts it to canonical XGraph
|
|
321
|
+
XGraph, Mermaid, or D2; the server converts it once to canonical XGraph before
|
|
322
|
+
rendering the app and PNG fallbacks.
|
|
321
323
|
Other image-capable clients receive one PNG fallback per parent node. Structured
|
|
322
|
-
content
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
content uses a required `schemaVersion: "1.0"` envelope. Its `interactive` and
|
|
325
|
+
`pngFallback` fields independently discriminate `ready` from `unavailable`, so
|
|
326
|
+
PNG rendering may succeed when the persisted interactive graph is unavailable.
|
|
327
|
+
The graph is capped at 500,000 UTF-8 bytes by default and PNG metadata at 100
|
|
328
|
+
entries; image bytes remain native MCP content blocks. Use `parentNodeIds` to
|
|
329
|
+
limit PNG fallback levels; omit it to render every parent with direct children.
|
|
330
|
+
|
|
331
|
+
The App reads only this declared structured output. The stable resource URI is
|
|
332
|
+
retained: newer bundles decode V1 and the earlier unversioned `graph` /
|
|
333
|
+
`graphError` shape. Saved results created before graph fields were declared
|
|
334
|
+
cannot be reconstructed and deliberately ask the user to run the tool again.
|
|
325
335
|
|
|
326
336
|
Each returned image uses the MCP `ImageContent` shape:
|
|
327
337
|
|