anigram-mcp 0.1.1 → 0.3.0

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.
Files changed (3) hide show
  1. package/README.md +32 -24
  2. package/dist/anigram-mcp.mjs +12708 -2964
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,18 +10,31 @@ draw them.
10
10
 
11
11
  ## Tools
12
12
 
13
- | Tool | What it does |
14
- | ---------------- | ---------------------------------------------------------------------------------------------------- |
15
- | `anigram_guide` | The scene format, every part that has a drawing, the signal functions. Read first. |
16
- | `list_scenes` | The built-in sheets. |
17
- | `get_scene` | A built-in sheet as JSON — the best example to copy. |
18
- | `validate_scene` | Errors (won't load) and warnings (will run, probably not what you meant). |
19
- | `write_scene` | Validate and save a `.json` scene file. |
20
- | `edit_scene` | Add, move, update or remove parts and links in place. |
21
- | `check_scene` | Is it done? Validate, run the day, and check every line of the scene's `expect` list. |
22
- | `simulate_scene` | Run a day headless: an hour-by-hour table, every alert, unmet demand. Knobs and switches can be set. |
23
- | `render_scene` | The sheet at any hour, every flow labelled: a PNG the assistant can look at (default) or an SVG. |
24
- | `share_link` | A URL that opens the scene live in the browser. The scene travels in the link; nothing is uploaded. |
13
+ | Tool | What it does |
14
+ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | `anigram_guide` | The scene format, every part that has a drawing, the signal functions. Read first. |
16
+ | `list_scenes` | The built-in sheets. |
17
+ | `get_scene` | A built-in sheet as JSON — the best example to copy. |
18
+ | `new_scene` | A working starter for a practice (pictorial, P&ID, single-line, PFD, fluid power) and that practice's house rules. Optionally saves it. |
19
+ | `validate_scene` | Errors (won't load) and warnings (will run, probably not what you meant). |
20
+ | `write_scene` | Validate and save a `.json` scene file. |
21
+ | `edit_scene` | Add, move, update or remove parts and links in place. |
22
+ | `check_scene` | Is it done? Validate, run the day, and check every line of the scene's `expect` list. |
23
+ | `check_drawing` | For a P&ID, single-line, PFD or fluid-power circuit: what an engineer would mark up (tags in the practice's scheme, numbered lines, closed control loops, protected feeders, a filled title block), each with its fix. Advisory; `strict` fails on any finding. |
24
+ | `lint_layout` | Does the sheet read cleanly? Crossing or overlapping lines, a line through a part, slanted runs, labels on top of things or off the sheet. |
25
+ | `auto_layout` | Lay the sheet out by its flow: single-lines top to bottom, fluid-power circuits bottom to top, everything else left to right, instruments above what they serve. Rewrites only the geometry. |
26
+ | `export_dexpi` | A P&ID as DEXPI 1.3 Proteus XML: equipment and nozzles, numbered lines with their valves, off-page connectors, instrument loops. |
27
+ | `import_dexpi` | Open a DEXPI 1.3 P&ID from plant design software as a living P&ID: equipment, lines with their valves, instrument loops; behaviours guessed and noted. |
28
+ | `import_sfiles` | Open an SFILES 2.0 flowsheet string as a living PFD, laid out by its flow. |
29
+ | `export_sfiles` | A scene's process streams as an SFILES 2.0 string. |
30
+ | `simulate_scene` | Run a day headless: an hour-by-hour table, every alert, unmet demand. Knobs and switches can be set. |
31
+ | `render_scene` | The sheet at any hour, every flow labelled: a PNG the assistant can look at (default), an SVG, or a one-page PDF on A4–A1 paper. |
32
+ | `share_link` | A URL that opens the scene live in the browser, or in the editor with `view: "editor"`. The scene travels in the link; nothing is uploaded. |
33
+
34
+ Prompts `draw-pid`, `draw-single-line`, `draw-pfd`, `draw-fluid-power` and `draw-sheet` take a
35
+ one-line brief and hand the assistant the practice's conventions and the way
36
+ to work: start from `new_scene`, keep `check_scene` and `check_drawing` green,
37
+ look at the render.
25
38
 
26
39
  Every tool except `anigram_guide` declares an output schema and returns its
27
40
  result as structured content too, so a client can read fields instead of
@@ -29,18 +42,12 @@ parsing text.
29
42
 
30
43
  ## Install
31
44
 
32
- Once it is on npm, `npx -y anigram-mcp` is all a client needs (see
33
- [RELEASING.md](../RELEASING.md)). Until then, from a checkout:
34
-
35
- ```sh
36
- git clone https://github.com/light-vp/Anigram anigram
37
- cd anigram && npm ci && npm run build:mcp
38
- ```
45
+ It is [`anigram-mcp` on npm](https://www.npmjs.com/package/anigram-mcp).
39
46
 
40
47
  **Claude Code**
41
48
 
42
49
  ```sh
43
- claude mcp add anigram -- node /path/to/anigram/mcp/dist/anigram-mcp.mjs
50
+ claude mcp add anigram -- npx -y anigram-mcp
44
51
  ```
45
52
 
46
53
  **Claude Desktop, Cursor and others** (`mcpServers` in the client's config):
@@ -48,14 +55,15 @@ claude mcp add anigram -- node /path/to/anigram/mcp/dist/anigram-mcp.mjs
48
55
  ```json
49
56
  {
50
57
  "mcpServers": {
51
- "anigram": {
52
- "command": "node",
53
- "args": ["/path/to/anigram/mcp/dist/anigram-mcp.mjs"]
54
- }
58
+ "anigram": { "command": "npx", "args": ["-y", "anigram-mcp"] }
55
59
  }
56
60
  }
57
61
  ```
58
62
 
63
+ To run it from a checkout instead, `npm ci && npm run build:mcp` and point
64
+ the client at `node /path/to/anigram/mcp/dist/anigram-mcp.mjs`. The same
65
+ setup, with every tool, is on the [docs page](https://anigram.vaibhav.co.uk/?docs#mcp).
66
+
59
67
  The built file is self-contained: React, the solver and the MCP SDK are
60
68
  bundled in, so it runs anywhere Node 20+ does. Beside it sit the PNG
61
69
  renderer ([resvg](https://github.com/linebender/resvg) as wasm, no browser or