agentic-mermaid 0.3.2 → 0.4.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.
- package/CHANGELOG.md +102 -0
- package/dist/agent-core.d.ts +2 -2
- package/dist/agent-core.js +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +4 -4
- package/dist/agentic-mermaid-mcp.js +5 -5
- package/dist/am.js +6 -6
- package/dist/browser-lazy/chunks/{architecture-WMSX5L4P.js → architecture-NUJTDJJ7.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-TBZAU7KC.js → chunk-2W3BS3M3.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-TEH2PRKN.js → chunk-4RLZTVJP.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-W6Q4PHPC.js → chunk-4ZURJQXD.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-32FWKUUV.js → chunk-55F5M5XA.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-QMZ4Y6I7.js → chunk-5QI4P3EJ.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-AOCFMYYH.js → chunk-6LBHOBXT.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-TDGTBGV3.js → chunk-ASPYKC6M.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-EX6TP7QM.js → chunk-DQHK4JCG.js} +2 -2
- package/dist/browser-lazy/chunks/{chunk-RLS545DI.js → chunk-EKHEVTE2.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-QYJMRNS3.js → chunk-HO5GDIPN.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-WN7SFUCZ.js → chunk-N2K2BPQT.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-CCTZFX43.js → chunk-OLQF6DTZ.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-ZZECLXC3.js → chunk-TCPK32QH.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-ANTNEVJC.js → chunk-UO3RFEMI.js} +1 -1
- package/dist/browser-lazy/chunks/{chunk-EBPTM2RP.js → chunk-ZMPTJUXS.js} +1 -1
- package/dist/browser-lazy/chunks/{class-7JRALQIM.js → class-ABIOBAFL.js} +1 -1
- package/dist/browser-lazy/chunks/{er-UDCGHKBX.js → er-CX3NGEC2.js} +1 -1
- package/dist/browser-lazy/chunks/{flowchart-5FP7RRIK.js → flowchart-ML54IJ7F.js} +1 -1
- package/dist/browser-lazy/chunks/{gantt-NTOIC5CW.js → gantt-ZMOMOTF6.js} +1 -1
- package/dist/browser-lazy/chunks/{gitgraph-JYAPXUIJ.js → gitgraph-OBTCRWCA.js} +1 -1
- package/dist/browser-lazy/chunks/{journey-646EFIB6.js → journey-RJBHWLRG.js} +1 -1
- package/dist/browser-lazy/chunks/{mindmap-2SBTQHQO.js → mindmap-YXHLCHOO.js} +1 -1
- package/dist/browser-lazy/chunks/{pie-7FDXZ24K.js → pie-TN2QOLSL.js} +1 -1
- package/dist/browser-lazy/chunks/{quadrant-72UT4XAW.js → quadrant-QE5JZ4H2.js} +1 -1
- package/dist/browser-lazy/chunks/{radar-SU7BO56J.js → radar-ZPV6O27I.js} +1 -1
- package/dist/browser-lazy/chunks/{render-core-Q2JWXDDL.js → render-core-VPMAH3HT.js} +1 -1
- package/dist/browser-lazy/chunks/{sequence-5O5ET264.js → sequence-4AERT525.js} +1 -1
- package/dist/browser-lazy/chunks/{state-IWPLFQ6R.js → state-67TZ7USF.js} +1 -1
- package/dist/browser-lazy/chunks/{timeline-WJWYHH5Y.js → timeline-AHOAT7ZL.js} +1 -1
- package/dist/browser-lazy/chunks/{xychart-HHQVQA5O.js → xychart-YUY3CPT2.js} +1 -1
- package/dist/browser-lazy/index.js +1 -1
- package/dist/browser.global.js +5 -5
- package/dist/{chunk-GX7UT56Q.js → chunk-M3VTTD3Q.js} +2 -2
- package/dist/{chunk-3D4EHVQ4.js → chunk-PG4PTPJL.js} +7 -7
- package/dist/{chunk-R5U67OIW.js → chunk-QWCD67AZ.js} +4 -4
- package/dist/{chunk-IVN6KP3W.js → chunk-SDJYD4OP.js} +2 -2
- package/dist/{chunk-YWKCUBQN.js → chunk-UKLKEZBJ.js} +2 -2
- package/dist/{chunk-NE6JBHSE.js → chunk-WMFFVZ4Q.js} +35 -44
- package/dist/{index-BFg_LoZS.d.ts → index-BoqfBufn.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-cli-YOAFIAVD.js +17 -0
- package/docs/style-authoring.md +1 -1
- package/package.json +12 -1
- package/server.json +2 -2
- package/skills/agentic-mermaid-diagram-workflow/SKILL.md +64 -1
- package/skills/agentic-mermaid-diagram-workflow/references/hosted-mcp.md +110 -0
- package/dist/mcp-cli-XGZP6CMW.js +0 -17
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Hosted MCP
|
|
2
|
+
|
|
3
|
+
Use `https://agentic-mermaid.dev/mcp` through an MCP client. It is a stateless,
|
|
4
|
+
tools-only Streamable HTTP server. Each diagram source or Code Mode program is
|
|
5
|
+
sent to the hosted service. Use the local library, CLI, or stdio MCP instead
|
|
6
|
+
for sensitive data, offline work, inputs over 64 KB, arbitrary local file I/O,
|
|
7
|
+
or file/URL PNG artifacts.
|
|
8
|
+
|
|
9
|
+
## Direct request contract
|
|
10
|
+
|
|
11
|
+
An MCP client selects the tool separately from its arguments. When showing a
|
|
12
|
+
request, name both explicitly:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{"tool":"verify","arguments":{"source":"flowchart TD\n API --> DB"}}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For raw JSON-RPC, the method remains `tools/call`:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"jsonrpc": "2.0",
|
|
23
|
+
"id": 1,
|
|
24
|
+
"method": "tools/call",
|
|
25
|
+
"params": {
|
|
26
|
+
"name": "verify",
|
|
27
|
+
"arguments": { "source": "flowchart TD\n API --> DB" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Do not use `"method":"verify"`, put arguments directly under `params`, or
|
|
33
|
+
show an anonymous argument object without naming the selected tool.
|
|
34
|
+
The envelope's `tool` value is a bare server tool name. Never prefix it with a
|
|
35
|
+
provider or server name and never invent a diagram-specific tool such as
|
|
36
|
+
`update_state_diagram`.
|
|
37
|
+
|
|
38
|
+
If the answer calls for one final fenced JSON request, finish all prose first,
|
|
39
|
+
emit the request in the answer's only fenced block, then stop after its closing
|
|
40
|
+
fence. Never show a fenced request before the explanation, even as an example
|
|
41
|
+
or draft, and never repeat it. As a final preflight, count one fenced block
|
|
42
|
+
total and verify each op name and field against the family schema; a plausible
|
|
43
|
+
synonym is still an invalid call.
|
|
44
|
+
|
|
45
|
+
## Direct tools
|
|
46
|
+
|
|
47
|
+
- `verify({ source })` returns structural `ok`, detected `family`, `summary`,
|
|
48
|
+
`warnings`, and layout counts. Confirm the family as well as `ok`.
|
|
49
|
+
- `describe({ source, format })` uses `text` for prose, `json` for an AX tree,
|
|
50
|
+
and `facts` for compact deterministic semantic fact lines.
|
|
51
|
+
- `render_svg({ source, options? })`, `render_ascii({ source, useAscii?,
|
|
52
|
+
targetWidth?, options? })`, and `render_png({ source, ...portableOptions,
|
|
53
|
+
options? })` handle one-shot output.
|
|
54
|
+
- `mutate({ source, ops })` edits an existing modeled diagram.
|
|
55
|
+
- `build({ family, ops })` creates a new modeled diagram from an empty family.
|
|
56
|
+
- `describe_sdk({ family, detail: 'fields' })` returns exact version-matched op
|
|
57
|
+
names, fields, enums, defaults, and constraints. Use `detail: 'signatures'`
|
|
58
|
+
only for a compact menu.
|
|
59
|
+
- `execute({ code, timeoutMs? })` runs synchronous JavaScript with the injected
|
|
60
|
+
`mermaid.*` global. Reserve it for custom control flow that a direct tool or
|
|
61
|
+
op list cannot express.
|
|
62
|
+
|
|
63
|
+
There is no hosted `capabilities` tool. Use the MCP client's `tools/list` for
|
|
64
|
+
tool discovery and `describe_sdk` for one family's mutation schema.
|
|
65
|
+
|
|
66
|
+
## Declarative edit and recovery
|
|
67
|
+
|
|
68
|
+
Before unfamiliar `mutate` or `build` ops, call:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{"tool":"describe_sdk","arguments":{"family":"class","detail":"fields"}}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Then use exactly the returned `kind` and fields. Ops are ordered,
|
|
75
|
+
all-or-nothing, and use `kind`, never `type`. A successful edit returns
|
|
76
|
+
`{ ok, family, source, verify }`; accept the source only when `ok` and
|
|
77
|
+
`verify.ok` are true, after inspecting `verify.warnings`.
|
|
78
|
+
Op kinds are not portable across families: state diagrams use `add_state` and
|
|
79
|
+
`add_transition`, never the flowchart-only `add_node` or `add_edge` kinds.
|
|
80
|
+
If the answer must identify the commit checks, spell out the exact response
|
|
81
|
+
paths: top-level `ok`, top-level `family`, `verify.ok`, and
|
|
82
|
+
`verify.warnings`. Do not paraphrase away those names.
|
|
83
|
+
|
|
84
|
+
Two common exact-schema patterns are:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{"tool":"mutate","arguments":{"source":"stateDiagram-v2\n [*] --> Idle\n Idle --> Processing: start\n Processing --> Complete: done","ops":[{"kind":"add_state","id":"Failed"},{"kind":"add_transition","from":"Processing","to":"Failed","label":"fail"}]}}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{"tool":"build","arguments":{"family":"class","ops":[{"kind":"add_class","id":"Customer"},{"kind":"add_class","id":"Account"},{"kind":"add_relation","from":"Customer","to":"Account","relKind":"association"}]}}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For `mutate`, copy the original pre-edit source byte-for-byte into `source` and
|
|
95
|
+
put the desired change only in `ops`; do not pre-apply it to the source string.
|
|
96
|
+
For an attached or file-backed source, use a byte-aware read to determine its
|
|
97
|
+
line endings and final-newline state. A terminal LF is part of the source: the
|
|
98
|
+
JSON string must end in `\n` after the final visible line. Terminal output that
|
|
99
|
+
only displays the lines is not sufficient evidence that the file lacks one.
|
|
100
|
+
State `add_state` accepts `id`, optional `label`, `parent`, and `region`—there is
|
|
101
|
+
no `terminal` field. Model a terminal path explicitly with an `add_transition`
|
|
102
|
+
to `[*]` when the requested outcome requires one.
|
|
103
|
+
|
|
104
|
+
For class diagrams the family is `class`, not `classDiagram`; class identity is
|
|
105
|
+
`id`, and an association is `add_relation` with `relKind: "association"`.
|
|
106
|
+
|
|
107
|
+
On failure, read `opIndex` and `error`, refresh that family's field schema with
|
|
108
|
+
`describe_sdk`, and retry only the failed request with corrected documented
|
|
109
|
+
fields. Do not invent an op, switch to source concatenation, or split one
|
|
110
|
+
oversized diagram across hosted calls.
|
package/dist/mcp-cli-XGZP6CMW.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MCP_CLI_HELP,
|
|
3
|
-
MCP_FLAG_SPECS,
|
|
4
|
-
parseMcpCliOptions,
|
|
5
|
-
runMcpCli
|
|
6
|
-
} from "./chunk-NE6JBHSE.js";
|
|
7
|
-
import "./chunk-IVN6KP3W.js";
|
|
8
|
-
import "./chunk-YWKCUBQN.js";
|
|
9
|
-
import "./chunk-GX7UT56Q.js";
|
|
10
|
-
import "./chunk-3D4EHVQ4.js";
|
|
11
|
-
export {
|
|
12
|
-
MCP_CLI_HELP,
|
|
13
|
-
MCP_FLAG_SPECS,
|
|
14
|
-
parseMcpCliOptions,
|
|
15
|
-
runMcpCli
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=mcp-cli-XGZP6CMW.js.map
|