@miadi/stateloom-mcp 0.2.2 → 0.2.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/dist/server.js +19 -1
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -36,6 +36,7 @@ import { z } from "zod";
|
|
|
36
36
|
import { execFileSync, spawn } from "child_process";
|
|
37
37
|
import { writeFileSync, readFileSync, mkdtempSync, rmSync, existsSync, statSync, realpathSync, } from "fs";
|
|
38
38
|
import { basename, dirname, join, resolve } from "path";
|
|
39
|
+
import { fileURLToPath } from "node:url";
|
|
39
40
|
import { tmpdir } from "os";
|
|
40
41
|
import { createBridgeClient } from "@miadi/stateloom-client";
|
|
41
42
|
import { envAlias } from "@miadi/stateloom-protocol";
|
|
@@ -598,10 +599,27 @@ function glyph(direction) {
|
|
|
598
599
|
* Every tool closes over module-level state (PROJECT_FILE, the bridge client),
|
|
599
600
|
* so instances are interchangeable — building one is registration, not state.
|
|
600
601
|
*/
|
|
602
|
+
/**
|
|
603
|
+
* The version a client sees in `serverInfo`, read from the manifest that npm
|
|
604
|
+
* actually shipped rather than typed in beside it. The literal here said 0.2.0
|
|
605
|
+
* while the package on the registry was 0.2.2 — two releases during which every
|
|
606
|
+
* agent that asked this server who it was got a confident wrong answer, and no
|
|
607
|
+
* test could catch it because the two numbers had no relationship to compare.
|
|
608
|
+
* Reading the manifest gives them one.
|
|
609
|
+
*/
|
|
610
|
+
const PACKAGE_VERSION = (() => {
|
|
611
|
+
try {
|
|
612
|
+
const manifest = resolve(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
613
|
+
return String(JSON.parse(readFileSync(manifest, "utf8")).version);
|
|
614
|
+
}
|
|
615
|
+
catch {
|
|
616
|
+
return "0.0.0-unknown";
|
|
617
|
+
}
|
|
618
|
+
})();
|
|
601
619
|
function buildServer() {
|
|
602
620
|
const server = new McpServer({
|
|
603
621
|
name: "stateloom-mcp",
|
|
604
|
-
version:
|
|
622
|
+
version: PACKAGE_VERSION,
|
|
605
623
|
});
|
|
606
624
|
// Tools
|
|
607
625
|
server.tool("create_state_machine", "Create a new state machine definition with namespace and name", { namespace: z.string(), name: z.string(), asynchronous: z.boolean().optional() }, async ({ namespace, name, asynchronous }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/stateloom-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
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.
|
|
42
|
-
"@miadi/stateloom-client": "^0.1.
|
|
43
|
-
"@miadi/stateloom-protocol": "^0.1.
|
|
41
|
+
"@miadi/stateloom-cli": "^0.1.3",
|
|
42
|
+
"@miadi/stateloom-client": "^0.1.2",
|
|
43
|
+
"@miadi/stateloom-protocol": "^0.1.5",
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
45
45
|
"zod": "^4.3.6"
|
|
46
46
|
},
|