@miadi/stateloom-mcp 0.2.4 → 0.2.5

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/erd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { existsSync, readFileSync, readdirSync, writeFileSync } from "fs";
3
3
  import { dirname, join, resolve } from "path";
4
- import { addAttribute, addEntity, addRelationship, checkLinks, checkStateOf, emptyErd, ERD_CARDINALITIES, isErdDefinition, isErdfPath, removeAttribute, removeEntity, removeRelationship, renderMermaidEr, summarizeErd, validateErd, } from "@miadi/stateloom-protocol";
4
+ import { addAttribute, addEntity, addRelationship, checkLinks, checkStateOf, emptyErd, ERD_CARDINALITIES, isErdDefinition, isErdfPath, removeAttribute, removeEntity, removeRelationship, renderMermaidEr, updateEntity, summarizeErd, validateErd, } from "@miadi/stateloom-protocol";
5
5
  import { stampedOutputPath } from "@miadi/stateloom-cli/render";
6
6
  const ok = (text) => ({ content: [{ type: "text", text }] });
7
7
  const fail = (text) => ({ content: [{ type: "text", text }], isError: true });
@@ -142,7 +142,8 @@ export function registerErdTools(server, host) {
142
142
  host.emitFull(def);
143
143
  return ok(`Created ERD '${name}' in namespace '${namespace}' → ${target}. It is now the active document. Add entities next.`);
144
144
  });
145
- server.tool("add_entity", "Add an entity to the active ERD", { name: z.string(), description: z.string().optional() }, async ({ name, description }) => mutate(host, (def) => addEntity(def, { name, description }), () => `Added entity '${name}'.`));
145
+ server.tool("add_entity", "Add an entity to the active ERD. `weak` marks an entity that exists only through another one (an order line, without its order); Chen notation draws it as a double rectangle.", { name: z.string(), description: z.string().optional(), weak: z.boolean().optional() }, async ({ name, description, weak }) => mutate(host, (def) => addEntity(def, { name, description, weak: weak || undefined }), () => `Added ${weak ? "weak " : ""}entity '${name}'.`));
146
+ server.tool("update_entity", "Change an entity's description or whether it is weak, keeping its attributes and relationships. Omit a field to leave it alone; an empty description or weak:false clears it.", { name: z.string(), description: z.string().optional(), weak: z.boolean().optional() }, async ({ name, description, weak }) => mutate(host, (def) => updateEntity(def, name, { description, weak }), () => `Updated entity '${name}'.`));
146
147
  server.tool("add_attribute", "Add an attribute to an entity of the active ERD. `key` is pk or uk; a foreign key is stated by `references` ('Entity' or 'Entity.attribute'), so one attribute can be both. `stateOf` names the state machine(s) whose current state this attribute stores — the link between the two diagrams.", {
147
148
  entity: z.string(),
148
149
  name: z.string(),
package/dist/server.d.ts CHANGED
@@ -22,7 +22,7 @@
22
22
  * - get_project_file: Report the active document path and bridge status
23
23
  *
24
24
  * ERD tools (Spec 80, ./erd.ts) — the active document's type is its extension:
25
- * - create_erd, add_entity, add_attribute, add_relationship
25
+ * - create_erd, add_entity, update_entity, add_attribute, add_relationship
26
26
  * - remove_entity, remove_attribute, remove_relationship
27
27
  * - validate_erd, check_links
28
28
  * get_definition, load_definition and render_diagram answer for an ERD when
package/dist/server.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * - get_project_file: Report the active document path and bridge status
23
23
  *
24
24
  * ERD tools (Spec 80, ./erd.ts) — the active document's type is its extension:
25
- * - create_erd, add_entity, add_attribute, add_relationship
25
+ * - create_erd, add_entity, update_entity, add_attribute, add_relationship
26
26
  * - remove_entity, remove_attribute, remove_relationship
27
27
  * - validate_erd, check_links
28
28
  * get_definition, load_definition and render_diagram answer for an ERD when
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miadi/stateloom-mcp",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "@miadi/stateloom-cli": "^0.1.3",
42
42
  "@miadi/stateloom-client": "^0.1.2",
43
- "@miadi/stateloom-protocol": "^0.1.6",
43
+ "@miadi/stateloom-protocol": "^0.1.7",
44
44
  "@modelcontextprotocol/sdk": "^1.12.1",
45
45
  "zod": "^4.3.6"
46
46
  },