@miadi/stateloom-mcp 0.4.0 → 0.4.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/dist/server.js +5 -2
- package/dist/stage.d.ts +2 -2
- package/dist/stage.js +1 -1
- package/package.json +3 -3
package/dist/server.js
CHANGED
|
@@ -83,8 +83,11 @@ const BRIDGE_TOKEN = envAlias("BRIDGE_TOKEN");
|
|
|
83
83
|
// The canvas address for a document (chart_1785683055671): when the agent
|
|
84
84
|
// re-points the loom, the human gets a link to LOOK at the same document —
|
|
85
85
|
// the `?doc=` parameter is resolved and allowlist-guarded by the web side.
|
|
86
|
+
// With the system that lists it, the link opens the drawing as its member, so
|
|
87
|
+
// the system strip leads back to the map. The canvas looks the system up when
|
|
88
|
+
// the link has none, but only near the drawing; the link names one it would miss.
|
|
86
89
|
const CANVAS_URL = envAlias("CANVAS_URL") ?? `http://127.0.0.1:${envAlias("WEB_PORT") ?? "4598"}`;
|
|
87
|
-
const canvasLink = (path) => `${CANVAS_URL}/?doc=${encodeURIComponent(path)}`;
|
|
90
|
+
const canvasLink = (path, system) => `${CANVAS_URL}/?doc=${encodeURIComponent(path)}${system ? `&system=${encodeURIComponent(system)}` : ""}`;
|
|
88
91
|
// ─── File-backed shared store ────────────────────────────────────────
|
|
89
92
|
// Both web/ and mcp/ resolve the same path from STATELOOM_PROJECT_FILE
|
|
90
93
|
// (legacy twin SMCRAFT_PROJECT_FILE still honored).
|
|
@@ -1254,7 +1257,7 @@ function buildServer() {
|
|
|
1254
1257
|
return { id: name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-"), name, role: "agent" };
|
|
1255
1258
|
},
|
|
1256
1259
|
lastSystem: () => LAST_SYSTEM,
|
|
1257
|
-
canvasUrl: (doc) => canvasLink(doc),
|
|
1260
|
+
canvasUrl: (doc, system) => canvasLink(doc, system),
|
|
1258
1261
|
};
|
|
1259
1262
|
registerStageTools(server, stageHost);
|
|
1260
1263
|
// Notes — the same two tools for either document type.
|
package/dist/stage.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface StageHost {
|
|
|
38
38
|
agent(): MarkAuthor;
|
|
39
39
|
/** The system this server last created, set or checked. */
|
|
40
40
|
lastSystem(): string | undefined;
|
|
41
|
-
/** A canvas link for a drawing, for the person. */
|
|
42
|
-
canvasUrl(doc: string): string;
|
|
41
|
+
/** A canvas link for a drawing, for the person; inside `system` when given. */
|
|
42
|
+
canvasUrl(doc: string, system?: string): string;
|
|
43
43
|
}
|
|
44
44
|
export declare function registerStageTools(server: McpServer, host: StageHost): void;
|
package/dist/stage.js
CHANGED
|
@@ -154,7 +154,7 @@ export function registerStageTools(server, host) {
|
|
|
154
154
|
.filter(Boolean)
|
|
155
155
|
.join(" · ");
|
|
156
156
|
return sent.ok
|
|
157
|
-
? ok(`On stage '${st}': ${what}${missing}. ${sent.text}. The person sees it at ${host.canvasUrl(doc)}.`)
|
|
157
|
+
? ok(`On stage '${st}': ${what}${missing}. ${sent.text}. The person sees it at ${host.canvasUrl(doc, step.system)}.`)
|
|
158
158
|
: fail(`Could not show ${what} on stage '${st}': ${sent.text}.`);
|
|
159
159
|
});
|
|
160
160
|
server.tool("write_tour", "Write a walkthrough as a file (<name>.tour.json, Spec 83): an ordered list of steps — each a drawing, what to light in it, and what to say — that the canvas plays back with its own controls, like slides over the real drawings. Prepare one when the work needs explaining in an order, when the person will review it later, or when an unfinished session hands its design on. Step `doc` paths are given absolute or relative to the active document's folder, and stored relative to the tour file; a step without `doc` stays on the previous step's drawing. Without `path` the tour lands beside the active document. Checked T001–T009; play it with play_tour.", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/stateloom-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "MCP server for miadi-stateloom (formerly smcraft-mcp) — lets LLM agents design state machines through conversation",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"node": ">=20"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@miadi/stateloom-cli": "^0.1.
|
|
41
|
+
"@miadi/stateloom-cli": "^0.1.7",
|
|
42
42
|
"@miadi/stateloom-client": "^0.1.4",
|
|
43
|
-
"@miadi/stateloom-protocol": "^0.1.
|
|
43
|
+
"@miadi/stateloom-protocol": "^0.1.16",
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
45
45
|
"zod": "^4.3.6"
|
|
46
46
|
},
|