agentic-mermaid 0.4.1 → 0.5.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/AGENT_NATIVE.md +94 -627
- package/CHANGELOG.md +651 -0
- package/Instructions_for_agents.md +44 -23
- package/LICENSES/Khroma-MIT.txt +21 -0
- package/LICENSES/Mermaid-MIT.txt +21 -0
- package/LICENSES/es-toolkit-MIT.txt +21 -0
- package/LICENSES/pele-MIT.txt +40 -0
- package/LICENSES/zenuml-core-MIT.txt +21 -0
- package/README.md +93 -50
- package/SECURITY.md +28 -12
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/assets/hero.png +0 -0
- package/dist/agent-core.d.ts +478 -210
- package/dist/agent-core.js +1 -396
- package/dist/agent.d.ts +17 -8
- package/dist/agent.js +1 -408
- package/dist/agentic-mermaid-mcp.js +1 -11
- package/dist/am.js +1 -34562
- package/dist/browser-lazy/chunks/agentic-producer-core-CC6OOLDW.js +1 -0
- package/dist/browser-lazy/chunks/architecture-QUFVKYJR.js +13 -0
- package/dist/browser-lazy/chunks/block-6J3Q63BO.js +11 -0
- package/dist/browser-lazy/chunks/builtin-backends-7SOZZHPF.js +12 -0
- package/dist/browser-lazy/chunks/c4-SQVBZAKJ.js +10 -0
- package/dist/browser-lazy/chunks/chunk-2GPK4VFF.js +5 -0
- package/dist/browser-lazy/chunks/chunk-2I4UPL7Q.js +3 -0
- package/dist/browser-lazy/chunks/chunk-2SH76OTH.js +1 -0
- package/dist/browser-lazy/chunks/chunk-2UIA2IME.js +3 -0
- package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5B2Z7575.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5FQ534HP.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5UVGUSD6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5X6MJX3H.js +1 -0
- package/dist/browser-lazy/chunks/chunk-AMJLVPUB.js +4 -0
- package/dist/browser-lazy/chunks/chunk-BU5LHXNJ.js +3 -0
- package/dist/browser-lazy/chunks/chunk-BY2CPG6B.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CN7WTBWB.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CQE4HQEW.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CSFUKSU6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-DF6765YX.js +17 -0
- package/dist/browser-lazy/chunks/chunk-E2WMJZNM.js +1 -0
- package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +6 -0
- package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +1 -0
- package/dist/browser-lazy/chunks/chunk-HLWUNUCM.js +1 -0
- package/dist/browser-lazy/chunks/chunk-ICC7HBJX.js +1 -0
- package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +20 -0
- package/dist/browser-lazy/chunks/chunk-J7FFAFQF.js +1 -0
- package/dist/browser-lazy/chunks/chunk-LH7HUDKW.js +1 -0
- package/dist/browser-lazy/chunks/chunk-N5ELX7LR.js +2 -0
- package/dist/browser-lazy/chunks/chunk-NMQQMRIR.js +1 -0
- package/dist/browser-lazy/chunks/chunk-NO7ZIVRU.js +1 -0
- package/dist/browser-lazy/chunks/chunk-OZ443IVJ.js +16 -0
- package/dist/browser-lazy/chunks/chunk-PQGPS2YV.js +7 -0
- package/dist/browser-lazy/chunks/chunk-QA6GJQ4X.js +1 -0
- package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +1 -0
- package/dist/browser-lazy/chunks/chunk-SZELX2EJ.js +1 -0
- package/dist/browser-lazy/chunks/chunk-TYZOZXUJ.js +22 -0
- package/dist/browser-lazy/chunks/chunk-UL6NDWLL.js +1 -0
- package/dist/browser-lazy/chunks/chunk-VQYYGAXP.js +1 -0
- package/dist/browser-lazy/chunks/chunk-VWVZGQE2.js +1 -0
- package/dist/browser-lazy/chunks/chunk-X2UYKWKM.js +4 -0
- package/dist/browser-lazy/chunks/chunk-YCEICNM6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +20 -0
- package/dist/browser-lazy/chunks/class-5QA4SCTS.js +13 -0
- package/dist/browser-lazy/chunks/decode-63UIZGD2.js +1 -0
- package/dist/browser-lazy/chunks/elk.bundled-L4CADV5W.js +24 -0
- package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +11 -0
- package/dist/browser-lazy/chunks/eventmodeling-2BPLHWRN.js +19 -0
- package/dist/browser-lazy/chunks/flowchart-NEIMZTB5.js +4 -0
- package/dist/browser-lazy/chunks/forest-implementation-AEP24AIP.js +1 -0
- package/dist/browser-lazy/chunks/gantt-RDPIFYAF.js +11 -0
- package/dist/browser-lazy/chunks/gitgraph-N4Y5RYB7.js +9 -0
- package/dist/browser-lazy/chunks/ishikawa-LD3YBDJN.js +6 -0
- package/dist/browser-lazy/chunks/journey-6YQR5DJX.js +16 -0
- package/dist/browser-lazy/chunks/kanban-PLMJ7NBW.js +20 -0
- package/dist/browser-lazy/chunks/mermaid-yaml-runtime-QVYX4EWK.js +136 -0
- package/dist/browser-lazy/chunks/mindmap-K2UBFO3Y.js +12 -0
- package/dist/browser-lazy/chunks/packet-CUW4QY6Y.js +7 -0
- package/dist/browser-lazy/chunks/pie-7F7UUCG3.js +15 -0
- package/dist/browser-lazy/chunks/quadrant-TOONO2WC.js +10 -0
- package/dist/browser-lazy/chunks/radar-J6JVWVAX.js +16 -0
- package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +3 -0
- package/dist/browser-lazy/chunks/requirement-CMAKDJPO.js +19 -0
- package/dist/browser-lazy/chunks/sankey-AWXQEP3F.js +13 -0
- package/dist/browser-lazy/chunks/sequence-Q2RJRB4L.js +5 -0
- package/dist/browser-lazy/chunks/state-WRBFQEDX.js +4 -0
- package/dist/browser-lazy/chunks/timeline-D2KILFXM.js +6 -0
- package/dist/browser-lazy/chunks/treemap-N3VYX5D4.js +6 -0
- package/dist/browser-lazy/chunks/xychart-G73OGK66.js +16 -0
- package/dist/browser-lazy/chunks/zenuml-H4BXNYXR.js +16 -0
- package/dist/browser-lazy/index.d.ts +544 -275
- package/dist/browser-lazy/index.js +1 -1
- package/dist/browser.global.js +802 -565
- package/dist/chunk-3LGLPG33.js +2 -0
- package/dist/chunk-7CRDX2QR.js +2 -0
- package/dist/chunk-7PPW2BMO.js +2 -0
- package/dist/chunk-DQDKA5ND.js +2 -0
- package/dist/chunk-EHCMJUMD.js +52 -0
- package/dist/chunk-GVCHLSHH.js +4 -0
- package/dist/chunk-H3NCS2XZ.js +19 -0
- package/dist/chunk-JZOJ4YGS.js +201 -0
- package/dist/chunk-MKE7GNYU.js +146 -0
- package/dist/chunk-NKNFOREZ.js +2 -0
- package/dist/chunk-O7H2UX5K.js +2 -0
- package/dist/chunk-OMY6NRQD.js +58 -0
- package/dist/chunk-UA234O4M.js +4 -0
- package/dist/chunk-VUFVLGTH.js +2 -0
- package/dist/chunk-XU5LPD2D.js +2 -0
- package/dist/cli-YGGTJZH7.js +226 -0
- package/dist/elk-constructor.js +2 -0
- package/dist/elk-constructor.node.js +11 -0
- package/dist/index-EeXqJXr5.d.ts +1223 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -334
- package/dist/jsonl-RPJY6YWO.js +2 -0
- package/dist/mcp-cli-63DYXTVD.js +2 -0
- package/dist/{index-BGA_-6LV.d.ts → paint-certification-6rwQjIv_.d.ts} +5283 -6173
- package/dist/server-5NEOHOFS.js +524 -0
- package/dist/svg-styles-BdnoM7AT.d.ts +724 -0
- package/dist/svg-styles.d.ts +1 -0
- package/dist/svg-styles.js +2 -0
- package/dist/svg.d.ts +13 -0
- package/dist/svg.js +2 -0
- package/dist/types-BcS52Mjt.d.ts +1360 -0
- package/dist/zenuml/chunks/appearance-UOQ5KA6O.js +1 -0
- package/dist/zenuml/chunks/builtin-backends-KDKE7YHO.js +12 -0
- package/dist/zenuml/chunks/chunk-42DXZ5C6.js +4 -0
- package/dist/zenuml/chunks/chunk-7TVYPTDW.js +1 -0
- package/dist/zenuml/chunks/chunk-EVPSMEKN.js +1 -0
- package/dist/zenuml/chunks/chunk-OXQWRSBM.js +20 -0
- package/dist/zenuml/chunks/chunk-QWX77U7G.js +2 -0
- package/dist/zenuml/chunks/chunk-RLJEI7YN.js +29 -0
- package/dist/zenuml/chunks/chunk-RZ6XK5CD.js +29 -0
- package/dist/zenuml/chunks/decode-BWERFDGK.js +1 -0
- package/dist/zenuml/chunks/mermaid-yaml-runtime-KZVU74WU.js +136 -0
- package/dist/zenuml/chunks/render-core-V5RQ737O.js +3 -0
- package/dist/zenuml/chunks/zenuml-EA2ZFRUX.js +20 -0
- package/dist/zenuml-frame.global.js +3626 -0
- package/dist/zenuml.d.ts +83 -0
- package/dist/zenuml.js +1 -0
- package/docs/MCP-DIRECTORY-LISTINGS.md +5 -1
- package/docs/README.md +59 -103
- package/docs/agent-api-cookbook.md +26 -16
- package/docs/agent-mutation-policy.md +86 -15
- package/docs/agent-workflow-examples.md +1 -1
- package/docs/api-advanced.md +385 -0
- package/docs/api.md +320 -366
- package/docs/ascii.md +40 -4
- package/docs/browser.md +46 -7
- package/docs/choosing-a-diagram.md +148 -0
- package/docs/code-mode-impact.md +1 -0
- package/docs/comparison.md +244 -28
- package/docs/computational-aesthetics-prototype-plan.md +10 -10
- package/docs/config.md +60 -2
- package/docs/custom-fonts.md +78 -21
- package/docs/diagram-families.md +160 -10
- package/docs/eventmodeling-and-zenuml.md +165 -0
- package/docs/features.md +21 -19
- package/docs/fork-differences.md +105 -32
- package/docs/getting-started.md +56 -51
- package/docs/layout-certification.md +126 -0
- package/docs/mcp-code-mode-rationale.md +20 -12
- package/docs/mcp-http-transport.md +14 -8
- package/docs/quality.md +145 -15
- package/docs/react.md +76 -31
- package/docs/style-authoring.md +23 -11
- package/docs/svg-semantic-contract.md +104 -4
- package/docs/testing-strategy.md +684 -126
- package/docs/theming.md +27 -8
- package/examples/styles/readme-hero.md +25 -0
- package/examples/styles/readme-hero.mmd +13 -0
- package/examples/styles/readme-hero.style.json +7 -0
- package/package.json +114 -57
- package/server.json +2 -2
- package/skills/agentic-mermaid-diagram-workflow/SKILL.md +26 -8
- package/skills/agentic-mermaid-diagram-workflow/references/cli.md +13 -3
- package/skills/agentic-mermaid-diagram-workflow/references/code-mode.md +2 -1
- package/skills/agentic-mermaid-diagram-workflow/references/flowchart.md +9 -6
- package/skills/agentic-mermaid-diagram-workflow/references/hosted-mcp.md +1 -0
- package/skills/agentic-mermaid-diagram-workflow/references/sequence.md +4 -3
- package/skills/agentic-mermaid-diagram-workflow/references/timeline.md +7 -6
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/agentflow.md +574 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/architecture.md +10 -2
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/c4.md +18 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/classDiagram.md +123 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/cynefin.md +6 -1
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/entityRelationshipDiagram.md +129 -9
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/eventmodeling.md +22 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/flowchart.md +188 -60
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/gitgraph.md +13 -7
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/mindmap.md +110 -1
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/packet.md +38 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/requirementDiagram.md +115 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/sequenceDiagram.md +101 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/stateDiagram.md +87 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/swimlanes.md +105 -2
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/timeline.md +12 -6
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/usecase.md +953 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/venn.md +77 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/xyChart.md +1 -1
- package/dist/browser-lazy/chunks/architecture-KTHE2HX3.js +0 -31
- package/dist/browser-lazy/chunks/chunk-2XCPFAD5.js +0 -46
- package/dist/browser-lazy/chunks/chunk-3H4F7RBT.js +0 -1
- package/dist/browser-lazy/chunks/chunk-4EVLW2NJ.js +0 -1
- package/dist/browser-lazy/chunks/chunk-5Q4S74UO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-6OAPWSDO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-A7L4WWVW.js +0 -143
- package/dist/browser-lazy/chunks/chunk-C7FJO2I3.js +0 -4
- package/dist/browser-lazy/chunks/chunk-D3XXDKIO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-DXA5WL7H.js +0 -4
- package/dist/browser-lazy/chunks/chunk-EPFMQPXX.js +0 -1
- package/dist/browser-lazy/chunks/chunk-FFOHLPDA.js +0 -2
- package/dist/browser-lazy/chunks/chunk-FLD63DXE.js +0 -2
- package/dist/browser-lazy/chunks/chunk-G6OLSHRG.js +0 -7
- package/dist/browser-lazy/chunks/chunk-GRXCKTHX.js +0 -0
- package/dist/browser-lazy/chunks/chunk-I6VE56S7.js +0 -1
- package/dist/browser-lazy/chunks/chunk-KJVNXJ5Y.js +0 -1
- package/dist/browser-lazy/chunks/chunk-L227EPFP.js +0 -11
- package/dist/browser-lazy/chunks/chunk-LNIHDJSF.js +0 -1
- package/dist/browser-lazy/chunks/chunk-M6BT2HIP.js +0 -1
- package/dist/browser-lazy/chunks/chunk-NZRUMODH.js +0 -1
- package/dist/browser-lazy/chunks/chunk-OFRMKQA6.js +0 -1
- package/dist/browser-lazy/chunks/chunk-P7HMSKHJ.js +0 -1
- package/dist/browser-lazy/chunks/chunk-PXKL3O6H.js +0 -1
- package/dist/browser-lazy/chunks/chunk-PZEWZT35.js +0 -1
- package/dist/browser-lazy/chunks/chunk-STQRDZ67.js +0 -1
- package/dist/browser-lazy/chunks/chunk-SUFMSWTX.js +0 -1
- package/dist/browser-lazy/chunks/chunk-T7IJ6V4B.js +0 -3
- package/dist/browser-lazy/chunks/chunk-UAEZO5VL.js +0 -1
- package/dist/browser-lazy/chunks/chunk-WEUWIFG3.js +0 -1
- package/dist/browser-lazy/chunks/chunk-X64T74C5.js +0 -24
- package/dist/browser-lazy/chunks/class-F7R6TJ73.js +0 -9
- package/dist/browser-lazy/chunks/er-BDK7CM5L.js +0 -9
- package/dist/browser-lazy/chunks/flowchart-KFU6XV7S.js +0 -4
- package/dist/browser-lazy/chunks/gantt-I64VVDSP.js +0 -28
- package/dist/browser-lazy/chunks/gitgraph-EDUVJ5IJ.js +0 -8
- package/dist/browser-lazy/chunks/journey-TLO2RNM3.js +0 -40
- package/dist/browser-lazy/chunks/mindmap-OJCNDYPM.js +0 -9
- package/dist/browser-lazy/chunks/pie-HVG6XO7K.js +0 -19
- package/dist/browser-lazy/chunks/quadrant-U6S2L4MJ.js +0 -24
- package/dist/browser-lazy/chunks/radar-ZDLOBTVG.js +0 -32
- package/dist/browser-lazy/chunks/render-core-Y2DFNMQG.js +0 -12
- package/dist/browser-lazy/chunks/sequence-Z4WFS3VB.js +0 -12
- package/dist/browser-lazy/chunks/state-2HV2YGN3.js +0 -4
- package/dist/browser-lazy/chunks/timeline-XM4UFPOC.js +0 -20
- package/dist/browser-lazy/chunks/xychart-7JDHWTQY.js +0 -36
- package/dist/chunk-GGXCNCNA.js +0 -4118
- package/dist/chunk-IVD4NXNE.js +0 -615
- package/dist/chunk-JDMRPUAG.js +0 -37
- package/dist/chunk-JWAAW3FH.js +0 -149
- package/dist/chunk-LCGBT32P.js +0 -62036
- package/dist/chunk-RWMZRUIC.js +0 -4715
- package/dist/mcp-cli-4MLKC3ZH.js +0 -17
- package/docs/mutation-testing.md +0 -285
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import{b as v}from"./chunk-XU5LPD2D.js";import{A as g,H as b,K as y,L as w,O as N}from"./chunk-O7H2UX5K.js";var x={"agent-instructions":{},ascii:{},certificates:{},help:{},json:{},jsonl:{},watch:{},open:{},force:{},"canonical-wrapper":{},"preserve-source":{},"system-fonts":{},suppress:{arg:"CODES"},"label-cap":{arg:"N"},op:{arg:"JSON"},style:{arg:"NAMES|file"},seed:{arg:"N"},options:{arg:"JSON|file"},"graph-layout":{arg:"elk|agentic"},"graph-layout-fallback":{arg:"none|elk"},ops:{arg:"JSON|file"},output:{arg:"FILE"},format:{arg:"fmt"},security:{arg:"mode"},dir:{arg:"DIR"},"font-dirs":{arg:"DIRS"},"gantt-today":{arg:"DATE"},"target-width":{arg:"CELLS"},scale:{arg:"N"},bg:{arg:"COLOR"},"fit-width":{arg:"PX"},"fit-height":{arg:"PX"},"min-label-px":{arg:"PX"},o:{arg:"FILE"}};var c=x;var p=new Set(Object.keys(c).filter(n=>!c[n].arg));function m(n,e){if(!p.has(e))throw new Error(`--${e} is not a boolean flag`);return Boolean(n.flags[e])}function C(n,e){if(!(e in c)||p.has(e))throw new Error(`--${e} is not a value flag`);const s=n.flags[e];return typeof s==="string"?s:void 0}var T=Object.freeze({scale:Object.freeze(["scale"]),background:Object.freeze(["bg"]),fitTo:Object.freeze(["fit-width","fit-height"]),minLabelPx:Object.freeze(["min-label-px"]),fontDirs:Object.freeze(["font-dirs"]),loadSystemFonts:Object.freeze(["system-fonts"]),onWarning:Object.freeze([])});var L=Object.freeze(Object.values(T).flat());var O={render:["help","json","certificates","watch","style","seed","options","graph-layout","graph-layout-fallback","output","format","security","gantt-today","target-width",...L,"o"],verify:["help","json","suppress","label-cap","style"],parse:["help","json"],serialize:["help"],mutate:["help","json","op","ops","preserve-source"],preview:["help","json","output","open","security"],format:["help","canonical-wrapper"],describe:["help","json","format"],capabilities:["help","json"],styles:["help","json"],"llms-txt":["help"],"init-agent":["help","json","dir","force"],batch:["help","jsonl"],"render-markdown":["help","ascii"]};var S=Object.freeze({render:{min:0,max:Number.POSITIVE_INFINITY},verify:{min:0,max:1},parse:{min:0,max:1},serialize:{min:0,max:0},mutate:{min:0,max:1},preview:{min:0,max:1},format:{min:0,max:1},describe:{min:0,max:1},capabilities:{min:0,max:0},styles:{min:0,max:0},"llms-txt":{min:0,max:0},"init-agent":{min:0,max:0},batch:{min:0,max:0},"render-markdown":{min:0,max:1}});function R(n){const e={positional:[],flags:{},errors:[]};const s=(t,i)=>{if(Object.prototype.hasOwnProperty.call(e.flags,t)){e.errors.push(`Flag --${t} may be supplied only once.`);return}e.flags[t]=i};let r=0;while(r<n.length){const t=n[r];if(t==="--"){for(const i of n.slice(r+1)){if(!e.command)e.command=i;else e.positional.push(i)}break}if(t.startsWith("--")){const i=t.indexOf("=");const o=t.slice(2,i===-1?void 0:i);if(i!==-1){if(p.has(o))e.errors.push(`Flag --${o} does not accept a value.`);s(o,t.slice(i+1))}else{const l=n[r+1];if(p.has(o)||l===void 0||l.startsWith("--"))s(o,true);else{s(o,l);r++}}}else if(!e.command)e.command=t;else e.positional.push(t);r++}return e}var f=`Usage: am <command> [options] [file|-]
|
|
2
|
+
|
|
3
|
+
Commands:
|
|
4
|
+
render <file|-> Render through a registered output adapter
|
|
5
|
+
verify <file|-> Verify; emits structured JSON warnings
|
|
6
|
+
parse <file|-> Parse; emits ValidDiagram JSON
|
|
7
|
+
serialize Read ValidDiagram JSON from stdin; emit canonical source
|
|
8
|
+
mutate <file|-> --op '<JSON>' Apply MutationOp(s); verify + emit source
|
|
9
|
+
preview <file|-> Write standalone HTML preview; optionally --open
|
|
10
|
+
format <file|-> Idempotent reformat
|
|
11
|
+
describe <file|-> Prose summary or AX-tree JSON
|
|
12
|
+
capabilities Emit JSON describing families + warning codes + mutation ops
|
|
13
|
+
batch Read JSONL ops from stdin; emit one JSON envelope per line
|
|
14
|
+
render-markdown <file> Render fenced mermaid blocks in Markdown (SVG or --ascii)
|
|
15
|
+
styles List registered styles (looks + themes); see also render --style
|
|
16
|
+
llms-txt Emit the agent discovery digest
|
|
17
|
+
init-agent Write a repo-local agent drop-in (AGENTS section, skill, MCP config)
|
|
18
|
+
|
|
19
|
+
Flags:
|
|
20
|
+
--json Structured JSON output
|
|
21
|
+
--ascii For render-markdown: ASCII instead of SVG
|
|
22
|
+
--op <JSON> For mutate: one MutationOp
|
|
23
|
+
--ops <JSON|file> For mutate: JSON array of MutationOps
|
|
24
|
+
--preserve-source For mutate: edit supported source ranges without regenerating opaque syntax
|
|
25
|
+
--output <FILE> Write render/preview output to FILE instead of stdout
|
|
26
|
+
--open For preview: open generated HTML in browser
|
|
27
|
+
--force For init-agent: refresh generated skill/MCP files
|
|
28
|
+
--style <NAMES|file> Style stack \u2014 comma-separated names and/or .json spec files
|
|
29
|
+
--options <JSON|file> Shared advanced render options across output adapters
|
|
30
|
+
--seed <N> Re-roll ink wobble of styled looks (never layout)
|
|
31
|
+
--font-dirs <DIRS> For render png: extra font directories, comma-separated (CJK/emoji coverage)
|
|
32
|
+
--system-fonts For render png: also load OS fonts (coverage warnings then skipped)
|
|
33
|
+
--suppress <CODES> For verify: comma-separated WarningCodes to suppress
|
|
34
|
+
--label-cap <N> For verify: LABEL_OVERFLOW char cap (default 40)
|
|
35
|
+
--certificates For render --format layout: include route/family certificates
|
|
36
|
+
--gantt-today <DATE> For render: draw the gantt today marker at DATE (rendering never reads the wall clock)
|
|
37
|
+
--target-width <CELLS> Hard terminal-cell bound for ASCII/Unicode output
|
|
38
|
+
--agent-instructions Print the canonical agent-use guide
|
|
39
|
+
--help Show this message (or per-command help: am <cmd> --help)
|
|
40
|
+
|
|
41
|
+
Exit codes:
|
|
42
|
+
0 ok
|
|
43
|
+
2 arg / parse error (bad flag, missing file, malformed JSON)
|
|
44
|
+
3 verify reported errors (severity 'error')
|
|
45
|
+
4 uncaught internal failure, or verify errors that are all INTERNAL_ERROR
|
|
46
|
+
`;function A(n){const e=Object.keys(g).filter(r=>g[r]===n);const s=[];for(const r of e){const t=s.at(-1);if(t!==void 0&&t.length+r.length+2<=100)s[s.length-1]=`${t}, ${r}`;else s.push(r)}return s.join(",\n")}var _={render:`am render <file|-> [--format ${y.join("|")}] [--json]
|
|
47
|
+
Render a diagram. Default is ${w.toUpperCase()}.
|
|
48
|
+
${N()}
|
|
49
|
+
--certificates With --format layout, include route/family certificates
|
|
50
|
+
--style <S> Style stack: comma-separated names and/or .json spec files,
|
|
51
|
+
merged left \u2192 right (e.g. --style hand-drawn,dracula or
|
|
52
|
+
--style ./brand.json). Applies to graphical and terminal
|
|
53
|
+
projection. See: am styles
|
|
54
|
+
--options <JSON|file> Shared advanced RenderOptions object; convenience
|
|
55
|
+
flags override its fields
|
|
56
|
+
--graph-layout <elk|agentic> Graph geometry producer (default: elk)
|
|
57
|
+
--graph-layout-fallback <none|elk> Explicit Agentic fallback (default: none)
|
|
58
|
+
--seed <N> Re-roll ink wobble of styled looks; never moves layout
|
|
59
|
+
--font-dirs <DIRS> PNG only: extra font directories (comma-separated) for
|
|
60
|
+
scripts the bundled Inter/DejaVu fonts don't cover (CJK,
|
|
61
|
+
emoji); uncovered characters warn on stderr
|
|
62
|
+
--system-fonts PNG only: also load OS-installed fonts (trades cross-machine
|
|
63
|
+
determinism for coverage; skips coverage warnings)
|
|
64
|
+
--security strict Enforce the strict SVG output-security policy
|
|
65
|
+
--gantt-today <DATE> Gantt only: draw the today marker at DATE (in the
|
|
66
|
+
diagram's dateFormat or ISO YYYY-MM-DD); rendering never
|
|
67
|
+
reads the wall clock, so without this the marker is absent
|
|
68
|
+
--target-width <CELLS> ASCII/Unicode only: hard output bound in display cells;
|
|
69
|
+
impossible geometry fails with ASCII_TARGET_WIDTH_IMPOSSIBLE
|
|
70
|
+
--scale <N> PNG only: output scale multiplier (default ${b})
|
|
71
|
+
--bg <COLOR> PNG only: override the diagram background (white fallback)
|
|
72
|
+
--fit-width <PX> PNG only: fit output to this pixel width
|
|
73
|
+
--fit-height <PX> PNG only: fit output to this pixel height (mutually exclusive with --fit-width)
|
|
74
|
+
--min-label-px <PX> PNG only: warn below this effective text size
|
|
75
|
+
(provisional default 9; 0 disables)
|
|
76
|
+
--watch Re-render one input file on change (non-PNG only)
|
|
77
|
+
Multiple inputs emit a JSON results array for non-PNG formats.
|
|
78
|
+
With --json, textual forms wrap output as {"<format>": "..."}.`,styles:`am styles [--json]
|
|
79
|
+
List every registered style. A style is a partial description of how diagrams
|
|
80
|
+
look; a colors-only style is a palette, a full look sets stroke/fill/typography
|
|
81
|
+
too. Stack them with render --style (e.g. --style hand-drawn,dracula) and
|
|
82
|
+
re-roll ink with --seed. Custom styles are JSON records (docs/style-authoring.md);
|
|
83
|
+
pass a .json file path anywhere a name is accepted.
|
|
84
|
+
With --json: [{ name, canonicalId, kind: look|palette, isDefault, backend, intent?, blurb }].`,verify:`am verify <file|-> [--suppress A,B] [--label-cap N] [--style NAMES|file]
|
|
85
|
+
Always emits JSON: {ok, warnings[], layout}.
|
|
86
|
+
--style <S> Resolve the same named/file-backed Style used by render so
|
|
87
|
+
inspect-only Brand constraints evaluate the styled Scene.
|
|
88
|
+
Error codes flip ok=false:
|
|
89
|
+
${A("error")}.
|
|
90
|
+
RENDER_FAILED: the strict render parser, layout, or theme colors reject the source
|
|
91
|
+
or its configuration; origin says which.
|
|
92
|
+
INTERNAL_ERROR: an Agentic Mermaid defect, not the source; defaultRender says
|
|
93
|
+
whether an ordinary render still produces output. Report it with the source.
|
|
94
|
+
BRAND_CONSTRAINT_ERROR: only when a Style constraint explicitly selects action=error.
|
|
95
|
+
Warning codes:
|
|
96
|
+
${A("warning")}.
|
|
97
|
+
LABEL_OVERFLOW counts characters against --label-cap.
|
|
98
|
+
Brand constraints inspect without repainting or relayout; other Tier-3 lint is advisory.
|
|
99
|
+
Exit 0 if ok, 3 if verify reports severity='error', 4 if every such error is INTERNAL_ERROR.`,parse:`am parse <file|->
|
|
100
|
+
Emits ValidDiagram JSON (Maps serialized to objects). Exit 2 on parse error.
|
|
101
|
+
Pipe to 'am serialize' to round-trip.`,serialize:`am serialize (reads ValidDiagram JSON on stdin)
|
|
102
|
+
Emits canonical Mermaid source. Accepts the JSON shape that 'am parse' emits;
|
|
103
|
+
rebuilds the diagram via synthesizeFromGraph without re-parsing source.`,mutate:`am mutate <file|-> (--op '<JSON>' | --ops '<JSON array|file.json>') [--preserve-source] [--json]
|
|
104
|
+
Applies one or more MutationOps, verifies the final diagram, then emits source.
|
|
105
|
+
Registered families with mutationOps have typed mutation; discover the live roster,
|
|
106
|
+
narrowers, and op names with 'am capabilities --json'. Opaque-fallback diagrams
|
|
107
|
+
(unmodeled syntax) return a structured UNSUPPORTED_FAMILY error (exit 2). Verify failures
|
|
108
|
+
exit 3 (4 when every error is INTERNAL_ERROR) and omit source. An INTERNAL_ERROR the
|
|
109
|
+
source already had does not block the edit.
|
|
110
|
+
${v}`,preview:`am preview <file|-> [--output preview.html] [--open] [--json] [--security strict]
|
|
111
|
+
Writes a standalone HTML preview containing strict-mode rendered SVG. Without
|
|
112
|
+
--output, emits HTML to stdout unless --open is set, in which case a temp HTML
|
|
113
|
+
file is written and opened. With --json, emits {ok,path,opened,bytes} for file output.`,format:`am format <file|-> [--canonical-wrapper]
|
|
114
|
+
Parse then re-serialize. Idempotent. The leading source wrapper (frontmatter,
|
|
115
|
+
%%{init}%% directives, comments before the header) is preserved byte-verbatim
|
|
116
|
+
by default; --canonical-wrapper instead synthesizes Mermaid's documented shape
|
|
117
|
+
(title/displayMode top-level, everything else under config:, directives folded).`,describe:`am describe <file|-> [--format text|json|facts] [--json]
|
|
118
|
+
Summarize a Mermaid diagram. Text format emits prose by default; --json wraps
|
|
119
|
+
it as {ok,text}. --format json emits the structured AX tree
|
|
120
|
+
{kind,nodes,edges,entryPoints,sinks}; with --json it wraps as {ok,tree}.
|
|
121
|
+
--format facts emits deterministic semantic fact lines; with --json it wraps as {ok,facts}.`,capabilities:`am capabilities [--json]
|
|
122
|
+
Emits a single JSON object describing the SDK's capability surface:
|
|
123
|
+
{ sdkVersion, families: [{ id, hasMutate, hasExtractLabels, mutationOps, editPolicy, example }],
|
|
124
|
+
warningCodes: [{ code, tier, severity, origins }],
|
|
125
|
+
outputFormats: ${JSON.stringify(y)} }
|
|
126
|
+
editPolicy is "structured-when-narrowed" or "source-level-only". Use this to
|
|
127
|
+
introspect what the CLI can do without running every command.`,batch:`am batch [--jsonl] (reads JSONL from stdin; --jsonl names that mode)
|
|
128
|
+
Each line: { op: "render"|"verify"|"parse"|"serialize"|"mutate", source: string,
|
|
129
|
+
options?: {}, mutation?: MutationOp, mutations?: MutationOp[] }. Emits one JSON
|
|
130
|
+
envelope per nonblank line, in order, without waiting for EOF:
|
|
131
|
+
{ ok, op, data?, error? }. Malformed JSON or unknown ops surface as ok:false;
|
|
132
|
+
the batch continues and exits 0 even if lines errored. Input/output failures
|
|
133
|
+
exit nonzero. Slow output consumers apply backpressure.`,"render-markdown":`am render-markdown <file.md> [--ascii]
|
|
134
|
+
Render fenced \`\`\`mermaid blocks. Bad diagrams yield ok:false entries and do
|
|
135
|
+
not abort the rest of the Markdown file.`,"llms-txt":`am llms-txt
|
|
136
|
+
Emit the committed agent-discovery digest generated from current capabilities.`,"init-agent":`am init-agent [--dir <path>] [--force] [--json]
|
|
137
|
+
Write a repo-local, agent-agnostic drop-in so coding agents discover the
|
|
138
|
+
parse \u2192 narrow \u2192 mutate \u2192 verify \u2192 serialize contract automatically. Creates
|
|
139
|
+
without clobbering by default:
|
|
140
|
+
- AGENTS.md marked section pointing agents at the workflow + hosted docs
|
|
141
|
+
- skills/agentic-mermaid-diagram-workflow/SKILL.md generic skill bundle
|
|
142
|
+
- .mcp.json sample agentic-mermaid MCP server config
|
|
143
|
+
--dir defaults to the current directory. --force overwrites skill/MCP files;
|
|
144
|
+
the AGENTS.md section is always appended only once, guarded by a marker.`};var h=0;var E=2;var G=3;var U=4;var k="# Agentic Mermaid \u2014 agent-use guide\n\nThis is the canonical agent-use guide. The same content is emitted by `am --agent-instructions`. A doc-sync test asserts the two are byte-identical.\n\n## When to use Agentic Mermaid\n\nUse Agentic Mermaid when an agent needs to create, edit, verify, describe, or render Mermaid diagrams through deterministic library, CLI, or MCP calls. It is strongest when the workflow needs typed edits, semantic fact read-back, CI-safe verification, or reproducible SVG, PNG, ASCII, and Unicode output.\n\nDo not use the hosted MCP for private diagrams; use the local library, CLI, or self-hosted MCP so source stays in your environment. Use another tool when the artifact is not Mermaid source or requires freeform canvas editing that Mermaid cannot express.\n\n## Quick start\n\n<!-- BEGIN GENERATED: family-narrowing -->\nNarrowing selects a structured, typed family with an as* helper. It does not select one element or freeze layout coordinates.\n<!-- END GENERATED: family-narrowing -->\n\nUse the [library vocabulary](https://agentic-mermaid.dev/docs/api/#vocabulary)\nfor family, Scene part and resolved primitive. Keep source objects distinct\nfrom drawing parts.\n\n<!-- complete: hosted-mcp-tools -->\nChoose the narrowest channel. <!-- BEGIN GENERATED: agent-workflow -->New diagrams: author Mermaid source directly, then parse \u2192 verify \u2192 render or return it. `buildMermaid(kind, ops)` / `createMermaid(kind)` build a diagram from typed ops when you are generating one programmatically (for example, from data). Existing structured diagrams: parse \u2192 narrow \u2192 mutate \u2192 verify \u2192 serialize.<!-- END GENERATED: agent-workflow --> Local MCP exposes `mutate` and `build` for atomic JSON edit batches; use `execute` or the library for custom logic. CLI is best for one-shot verify/render/preview. Code Mode exposes `mermaid.*`; library users import the same names from `agentic-mermaid/agent` \u2014 including `describeOps(family)` and `opSignatures(family)`, which return each op's exact fields, required-ness, inlined enum values, and constraint/default notes (e.g. journey score `finite number 1..5`, flowchart shape `default: rectangle`) so you can look up an unfamiliar op instead of guessing; use `describeMermaidFacts` / `checkMermaid` when you need semantic read-back such as `edge Processing -> [*] : done`, `member Duck +quack()`, or `task Docs start after core`. A hosted MCP at `agentic-mermaid.dev/mcp` (stateless Streamable HTTP JSON-RPC) exposes `execute` (Code Mode), `describe_sdk` (one family's mutation schema on demand), `render_svg`, `render_ascii`, `render_png`, `verify`, `describe`, and the declarative `mutate` (edit a `source`) and `build` (author from a `family`) \u2014 which apply a JSON op list and return `{ok,family,source,verify}`, prescriptive `{ok:false,\u2026,error}` on a bad op; prefer them for structured edits and reserve `execute` for logic the ops do not express \u2014 all with 64KB input caps; the call shape is a plain POST (stateless, no initialize handshake): `POST /mcp` with `content-type: application/json` and body `{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"verify\",\"arguments\":{\"source\":\"flowchart TD\\n A --> B\"}}}`. Prefer the local library, CLI, or a self-hosted MCP and reach for the hosted endpoint only when you cannot install. Agentic Mermaid outputs ASCII, PNG, and SVG; Unicode text and JSON layout are also available. Flowchart authoring facts: quote any label carrying punctuation (`id[\"HTTPS /api/sessions*\"]`); `\\n` inside a quoted label is a line break and canonicalizes to `<br>` on serialize; `subgraph id[\"Title\"] \u2026 end` groups nodes; labeled and dotted edges are `A -- \"label\" --> B`, `A -.-> B`, and `A -. \"label\" .-> B`. For every other family, read that family's exact header, edge, and relationship syntax from its `example` in `am capabilities --json` (`capabilities.json` `families[].example`) rather than assuming flowchart syntax \u2014 e.g. class inheritance `Base <|-- Derived`, ER cardinality `A ||--o{ B : label`, architecture edges `api:R --> L:db`.\n\n```ts\nconst source = 'flowchart TD\\n API --> DB'\nconst d0 = mermaid.parseRegisteredMermaid(source)\nif (!d0.ok) throw new Error('parse')\n\nconst flow = mermaid.asFlowchart(d0.value)\nif (!flow) return { phase: 'narrow', family: d0.value.kind }\n\nconst d1 = mermaid.mutate(flow, { kind: 'add_node', id: 'Cache', label: 'Cache' })\nif (!d1.ok) throw new Error('mutate')\n\nconst verify = mermaid.verifyMermaid(d1.value)\nif (!verify.ok) return { phase: 'verify', warnings: verify.warnings }\n\nreturn { source: mermaid.serializeMermaid(d1.value) }\n```\n\nA new diagram is authored as source, parsed, and verified \u2014 no mutation ceremony:\n\n```ts\nconst source = 'flowchart LR\\n API --> DB'\nconst parsed = mermaid.parseRegisteredMermaid(source)\nif (!parsed.ok) return { phase: 'parse', errors: parsed.error }\n\nconst check = mermaid.verifyMermaid(parsed.value)\nif (!check.ok) return { phase: 'verify', warnings: check.warnings }\n\nreturn { source }\n```\n\nBefore mutating an existing diagram, use the matching narrower advertised by `am capabilities --json` or `describe_sdk` (for example, `asFlowchart` or `asState`). State diagrams own a dedicated body: `asState` narrows them \u2014 including concurrency regions, notes, `<<fork>>`/`<<join>>`/`<<choice>>`, history pseudostates, and class/inline paint \u2014 and state-shaped ops (`add_state`, `add_transition`, `make_composite`, `add_note`, `set_state_class`, \u2026) apply; `asFlowchart` returns null on a state diagram. Sequence diagrams are segment-preserving: `alt`/`opt`/`loop`/`par` fragments are typed, their messages appear in describe/facts/verify, and fragment/branch/message mutation ops can author and edit them. Other constructs such as `Note`/`box`/`critical`/`activate`/`autonumber`/`title` ride along verbatim; top-level `remove_message`/`set_message_text` indexes remain separate from fragment messages. Only an un-segmentable sequence (e.g. an unbalanced `end`) falls back to opaque. Gantt charts are segment-preserving too: title/section/task ops stay live while calendar directives (`dateFormat`, `excludes`, \u2026), `click` lines, and comments ride along verbatim; gantt rendering never reads the wall clock \u2014 pass `ganttToday` to draw the today marker \u2014 and the opt-in `gantt.dependencyArrows`/`gantt.criticalPath` render options overlay dependency arrows and critical-path emphasis without any new Mermaid syntax. In Code Mode, SDK-returned diagrams are read-only; structured edits must go through `mermaid.mutate`. Opaque-fallback bodies (any unmodeled syntax) round-trip losslessly as source-level bodies but do not expose structured mutation; return an unsupported-family result unless the task explicitly asks for source-level editing, then re-parse and verify before returning.\n\nFor an explicitly requested source-level edit of an opaque Class or Flowchart,\nuse `mermaid.mutatePreservingSource(diagram, op)` (library: the same export).\nSupported operations are Class `add_member`/`remove_member` and Flowchart\n`set_label`/`rename_node`; removal requires an unambiguous whole member line,\nand renames refuse unsupported class/style/click/href dependencies or colliding\ngroup identities. Save `value.source` exactly after inspecting\n`verifyMermaid(value.diagram)`. The diagram stays opaque and its portability\nwarning remains; portable Mermaid export is not promised. Atomic batches use\n`applyOps({ source, ops, mode: 'source-preserving' })`, or MCP `mutate` with\n`mode: 'source-preserving'`. The editor adapter exposes programmatic\n`applyOps(source, ops, 'source-preserving')` through its worker. Unsupported or\nambiguous ownership refuses without emitting partial edited source; builders\ndo not accept this mode.\n\n## The verify-before-commit rule\n\nRun `verifyMermaid` at every commit point \u2014 anywhere the result would be saved, sent, or shown. For new diagrams, verify the authored source. For existing diagrams, verify after mutation and before serializing. You may batch several `mutate` calls between verifications, but never serialize a `ValidDiagram` whose `verify` result you have not inspected. `verify.ok` means no unsuppressed error was detected, including measured content occlusion; it is not a visual-quality or semantic-correctness score. For task-critical meaning, inspect `describeMermaidFacts(d)` or call `checkMermaid(d, requiredFacts)` before returning.\n\n## Tier 1 vs Tier 2 vs Tier 3 warnings\n\nTier 1 (structural, reliable, universal): <!-- BEGIN GENERATED: warning-summaries:structural -->`EMPTY_DIAGRAM`, `EDGE_MISANCHORED`, `OFF_CANVAS`, `GROUP_BREACH`, `UNKNOWN_SHAPE`, `LABEL_OVERFLOW`, `UNRESOLVABLE_SCHEDULE`, `RENDER_FAILED`, `INTERNAL_ERROR`. `LABEL_OVERFLOW` means a label's longest displayed line is over the char cap \u2014 `<br>`/`\\n` split lines, XML entities decode to one char, formatting tags strip (families that draw text literally count them); default cap 40, raise via `labelCharCap` / `am verify --label-cap N` when long labels are intentional instead of truncating the user's text. `UNRESOLVABLE_SCHEDULE` means a gantt parses but its schedule cannot resolve, so render would fail; `reason` names the `GANTT_*` error. `RENDER_FAILED` means the parser, the strict render parser, layout, or theme colors reject the source or its configuration (any family; `origin` says which), so rendering would fail; `reason` carries the renderer error \u2014 a clean verify proves the diagram actually renders. `INTERNAL_ERROR` means Agentic Mermaid hit an internal defect, not caused by the source; `defaultRender` is `succeeds-unchecked` when an ordinary render still produces output that the failed consistency checks cannot vouch for, or `fails` when rendering throws \u2014 do not rewrite the diagram to work around it; report it with the source.<!-- END GENERATED: warning-summaries:structural --> Applies to every family. Never suppress Tier 1 errors.\n\nTier 2 (geometric): <!-- BEGIN GENERATED: warning-summaries:geometric -->`NODE_OVERLAP`, `CONTENT_OCCLUDED`, `LAYOUT_LIMIT_EXCEEDED`, `ROUTE_SELF_CROSS`, `ROUTE_HITCH`, `ROUTE_UNEXPLAINED_BEND`, `ROUTE_LABEL_ON_SHARED_TRUNK`, `ROUTE_SELF_LOOP_OCCUPANCY`, `ROUTE_CONTAINER_MISANCHOR`, `ROUTE_SHAPE_MISANCHOR`, `ROUTE_STALE_AFTER_NODE_MOVE`.<!-- END GENERATED: warning-summaries:geometric --> `CONTENT_OCCLUDED` fails verification when measured paint hides content. `LAYOUT_LIMIT_EXCEEDED` reports an unmet budget while retaining content. The `ROUTE_*` codes are route-contract tripwires (docs/design/system/route-contracts.md \u2014 the layout pipeline upholds these itself, so they fire only on pipeline regressions). Route tripwires fire for flowchart/state. `NODE_OVERLAP` also checks class, ER, journey, timeline and sequence boxes, and class/ER add boundary-anchor checks (`ROUTE_SHAPE_MISANCHOR`). Other geometric concerns surface via perceptual metrics (`measureQuality(layoutMermaid(d))`). See `docs/quality.md`. Gate on error severity; use the remaining geometric warnings to assess layout quality.\n\nTier 3 (lint and inspect-only policy): <!-- BEGIN GENERATED: warning-summaries:lint -->`DUPLICATE_EDGE`, `UNREACHABLE_NODE`, `DECISION_BRANCH_UNLABELED`, `FLOW_IMBALANCE`, `COMMENT_DROPPED`, `UNSUPPORTED_SYNTAX`, `CONTENT_DROPPED_ON_ROUNDTRIP`, `EVENT_SOURCE_TYPE`, `INEFFECTIVE_CONFIG`, `LOW_CONTRAST`, `LABELS_HIDDEN`, `SCALE_RANGE_EXCLUDES_ZERO`, `BAR_RANGE_EXCLUDES_ZERO`, `VALUES_OUTSIDE_RANGE`, `BRAND_CONSTRAINT_WARNING`, `BRAND_CONSTRAINT_ERROR`. `DECISION_BRANCH_UNLABELED` means a multi-exit decision diamond has an unlabeled branch. `FLOW_IMBALANCE` means a sankey intermediate node receives a different total than it emits \u2014 conservation across stages is the domain's defining property, so the warning names the node, its inflow, its outflow, and the unaccounted amount (which otherwise renders silently as node height); balance the flows or add an explicit remainder link. `COMMENT_DROPPED` means a payload carries known comment loss; current serializers retain detected comments, but cannot recover text already omitted from an older payload. `UNSUPPORTED_SYNTAX` means either a Mermaid construct (for example flowchart edge IDs, edge metadata, click/href, or markdown strings) is preserved losslessly as source but is not fully modeled by local structured mutation/render semantics, or `syntax: \"empty_layout\"` means the source carries content but the local layout produced a 0x0 canvas with no nodes, edges, or groups. Inspect the warning message and `verify.layout` before accepting the artifact. `CONTENT_DROPPED_ON_ROUNDTRIP` means the structured node/edge/group tally changed across a parse \u2192 serialize \u2192 re-parse cycle \u2014 canonical serialization is silently dropping or duplicating content even though the bytes may re-parse; treat it as a faithfulness bug to report. `EVENT_SOURCE_TYPE` means inspect the named Event Modeling source and target frame types; rendering preserves the authored connection. `INEFFECTIVE_CONFIG` means a Mermaid config field has no effect on this family's output \u2014 it was accepted for compatibility but is not wired, is unknown to the family, or has an invalid value (the warning names the field). `LOW_CONTRAST` means a concrete authored paint remains authoritative but misses a measurable contrast threshold against the final resolved opaque background; the warning reports both colors, the measured ratio, and the minimum without repainting. Transparent output is not measured because its host backdrop is unknown. `LABELS_HIDDEN` means a chart left out text the source asked for because it did not fit: for an XY chart, `target: \"x-axis\"` lists the category names the axis does not draw (thinned or dropped) and `target: \"data-labels\"` lists the bars whose value label has no room (shorten the names, flip the chart with `set_orientation {horizontal: true}`, or widen the value range); for a quadrant chart, `target: \"point-labels\"` lists the points whose label collides with labels placed first (spread the points, shorten the names, or enlarge the chart). `BAR_RANGE_EXCLUDES_ZERO` means an XY chart with bar series has an authored y-axis range that excludes zero, so bars start at the reported `baseline` and their lengths are not proportional to their values; include zero with `set_y_axis`, or draw the series as a line. `VALUES_OUTSIDE_RANGE` means an XY chart series has values outside the authored y-axis range: a bar stops at the edge of the range, so its length understates the value, and a line point is drawn past the plot; the warning names the `series` and its `values` outside the `range`. Widen the range with `set_y_axis`, or remove it.<!-- END GENERATED: warning-summaries:lint --> Advisory lint never flips `verify.ok`; a caller-authored Brand constraint with `action: \"error\"` emits `BRAND_CONSTRAINT_ERROR` and does. Brand constraints inspect final contrast, accent area, or monochrome role paint without repainting or relayout.\n\n## CLI verbs\n\n<!-- complete: cli-verbs -->\n`am capabilities --json` \u2014 JSON envelope listing families, `families[].editPolicy`, `families[].mutationOps`, warning codes, output formats (<!-- BEGIN GENERATED: render-formats -->`svg`, `ascii`, `unicode`, `png`, `layout`<!-- END GENERATED: render-formats -->). Schema-stable; use it to self-discover.\n`am batch --jsonl` \u2014 JSONL stdin \u2192 JSONL stdout for render/verify/parse/serialize/mutate. Mutation requests opt into bounded source edits with `preserveSource: true`. Malformed lines surface error but don't abort the stream.\n`am render <file\u2026> --format svg|ascii|unicode|layout [--security strict] [--style <names|file.json>] [--seed N]` \u2014 layout emits the JSON layout shape; --security strict = no external-fetch refs; `--style` takes a stack (comma-separated names and/or .json spec files, merged left \u2192 right, e.g. `--style hand-drawn,dracula`) and applies to graphical and terminal projection; `--seed` re-rolls styled ink. Multiple files \u2192 results array for non-PNG formats. `--watch` is single-file/non-PNG only. PNG uses `--format png --output file.png` for one input and does not support watch/multi-input; `--fit-width`/`--fit-height` constrain raster size and `--min-label-px` emits `BELOW_READABLE_SIZE` when measurable configured text falls below the selected effective-pixel floor (provisional default 9; `0` disables).\n`am preview <file|-> [--output out.html] [--open] [--json] [--security strict]` \u2014 standalone strict-mode HTML preview for human inspection.\n`am mutate <file|-> (--op '<JSON>'|--ops '<JSON array|file>') [--preserve-source] [--json]` \u2014 apply mutation(s), run verify, emit source only if verify succeeds, or if its only errors are `INTERNAL_ERROR` defects the input already had (same reason and `defaultRender`; `verify` then still reports them). `--preserve-source` opts into the bounded opaque Class/Flowchart edits above. JSON success includes `{ok,source,verify}` and `mode: 'source-preserving'` when selected; verify failure exits 3 (4 when every error is `INTERNAL_ERROR`) and omits source.\n`am verify <file|-> [--json] [--label-cap N] [--suppress CODES] [--style <names|file.json>]` \u2014 full tiered verify; `--style` evaluates inspect-only Brand constraints against the same styled Scene used by render; exit 3 only on error-severity findings. `am parse` (ValidDiagram JSON), `am serialize` (ValidDiagram JSON on stdin \u2192 canonical source), and `am format` (idempotent reformat) round out the loop.\n`am describe <file|-> [--format text|json|facts]` \u2014 prose summary, structured AX tree (`{kind,nodes,edges,entryPoints,sinks}`, #7349), or semantic fact lines. Library: `describeMermaid(d, {format})`, `describeMermaidFacts(d)`, `checkMermaid(d, facts)`.\n`am styles [--json]` \u2014 list registered styles: the default, full looks, and palette-only themes, with backends and blurbs.\n`am llms-txt` \u2014 agent-discovery digest (llms.txt convention).\n`am init-agent [--dir .] [--force]` \u2014 writes a non-clobbering AGENTS.md section, root skills/ bundle, and .mcp.json sample into a consumer repo.\n`am render-markdown <file.md> [--ascii]` \u2014 render each Mermaid fenced block; skips invalid diagrams, never aborts the file. JSON: `{blocks:[{index,ok,output|error}]}`.\nExit codes: `0` ok, `2` arg/parse/mutation error, `3` verify-failed, `4` internal (including a verify whose errors are all `INTERNAL_ERROR`). Parse and verify-failure errors carry `error.details` arrays, not stringified blobs.\n\nLibrary extras: `renderMermaidPNG(src,{fitTo,background,minLabelPx,onWarning,style,seed,fontDirs})` returns PNG bytes and reports bounded raster warnings through `onWarning`; `BELOW_READABLE_SIZE` is evidence of configured-text shrinkage, not a general readability verdict. `renderMermaidASCIIWithMeta(src)` \u2192 `{ascii,regions,actions,warnings,routeParity}` for TUI click-mapping; `describeMermaidFacts(d)` / `checkMermaid(d, facts)` expose deterministic semantic facts; `analyzeMermaid(d)` / `analyzeMermaidSource(source)` returns non-rendering feedback/action/Gantt analysis; `asciiToMermaid(ascii)` reverses flowchart ASCII (best-effort, lossy); `verifyNoExternalRefs(svg)` asserts no external fetch; `renderMermaidSVG(src,{idPrefix})` namespaces def ids for multi-diagram pages. See SECURITY.md.\n\n## Styles\n\nEvery library render call accepts `style`: a registered Look or Palette discovered through `am styles --json`, an inline spec (a plain JSON record of palette/font/stroke/fill/backdrop fields, all optional), or a stack merged left \u2192 right (`{ style: ['hand-drawn', 'dracula'] }`). `seed` re-rolls the ink wobble of styled looks and never moves layout, so `(source, style, seed)` reproduces an image exactly. Custom styles are data, not code: check untrusted records with `validateStyleSpec(json)` (returns problems; `[]` = usable) and register reusable ones with a canonical identity such as `registerStyle({ name: 'look:acme', ... })` \u2014 importable from `agentic-mermaid` and `agentic-mermaid/agent`. `style: 'crisp'` (or unset) selects the canonical default renderer. Styles apply uniformly to built-in families and to extensions that advertise native Scene/style support. The authoring guide and quality rubric live in docs/style-authoring.md. SVG declares any font; PNG bundles the faces the built-in looks use and uses Inter with DejaVu per-glyph fallback for unbundled families (supply extras via `fontDirs`).\n\n## Anti-patterns\n\n- Regenerating an existing parsed diagram instead of mutating it. Defeats round-trip; produces noise.\n- Verifying only after a long risky edit chain. Loses precision about which op broke it.\n- Serializing before reading `verify.ok` / `verify.warnings` / `verify.layout`.\n- Concatenating source to edit an existing structured diagram when a typed `mutate` op exists. (Authoring a new diagram as source is the default path, not an anti-pattern.)\n- Calling `mutate` on an opaque-fallback body; the structured-family narrower returns null for unmodeled syntax, so edit its preserved source instead.\n";function H(n){const e=R(n);const s=m(e,"json");const r=a=>{if(s)process.stdout.write(JSON.stringify({ok:false,error:{code:"ARG",message:a}})+"\n");process.stderr.write(`${a}
|
|
145
|
+
`);return E};if(e.errors.length>0)return{exitCode:r(e.errors.join(" "))};if(m(e,"agent-instructions")){process.stdout.write(k);return{exitCode:h}}if(m(e,"help")&&!e.command){process.stdout.write(f);return{exitCode:h}}if(!e.command){process.stdout.write(f);return{exitCode:E}}if(m(e,"help")){process.stdout.write((_[e.command]??f)+"\n");return{exitCode:h}}const t=Object.keys(e.flags).filter(a=>!(a in c));if(t.length>0){const a=`Unknown flag${t.length>1?"s":""}: ${t.map(u=>`--${u}`).join(", ")}. Run \`am --help\` or \`am ${e.command} --help\` for the flag list.`;return{exitCode:r(a)}}const i=Object.entries(e.flags).filter(([a,u])=>c[a]?.arg&&(typeof u!=="string"||u.length===0)).map(([a])=>a);if(i.length>0){return{exitCode:r(`Flag${i.length>1?"s":""} ${i.map(a=>`--${a}`).join(", ")} require${i.length===1?"s":""} a value.`)}}const o=new Set(O[e.command]??["help"]);const l=Object.keys(e.flags).filter(a=>!o.has(a));if(l.length>0){return{exitCode:r(`Flag${l.length>1?"s":""} ${l.map(a=>`--${a}`).join(", ")} ${l.length>1?"are":"is"} not valid for am ${e.command}.`)}}const d=S[e.command];if(d&&(e.positional.length<d.min||e.positional.length>d.max)){return{exitCode:r(`am ${e.command} accepts ${d.max===0?"no positional arguments":`at most ${d.max} positional input${d.max===1?"":"s"}`}; received ${e.positional.length}.`)}}return{args:e,json:s}}export{c as a,p as b,m as c,C as d,T as e,L as f,O as g,S as h,R as i,f as j,_ as k,h as l,E as m,G as n,U as o,H as p};
|
|
146
|
+
//# sourceMappingURL=chunk-MKE7GNYU.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as R}from"./chunk-GVCHLSHH.js";import{O as P,T as I,c as v,e as M}from"./chunk-7CRDX2QR.js";import{Va as x,ra as h,ta as b}from"./chunk-JZOJ4YGS.js";import{ph as w}from"./chunk-EHCMJUMD.js";import{Wa as y,Za as u}from"./chunk-OMY6NRQD.js";import{z as s}from"./chunk-O7H2UX5K.js";function C(e){const n={};for(const t of w){if(e[t]!==void 0)n[t]=e[t]}return n}function l(e){if(e.kind==="node")return`node:${e.id}`;if(e.kind==="edge")return`edge:${e.id}`;if(e.kind==="label")return`label:${e.id}`;return`group:${e.id}`}function E(e){return e==="subgraph"?"cluster":e}function N(e,n){const t=e.parentId!==void 0&&e.parentKind!==void 0?l({id:e.parentId,kind:e.parentKind}):void 0;return{id:l(e),kind:E(e.kind),elementId:e.id,...t!==void 0&&n.has(t)?{parentId:t}:{},bounds:{x:s(e.canvasColStart),y:s(e.canvasRow),w:s(Math.max(1,e.canvasColEnd-e.canvasColStart)),h:s(Math.max(1,e.rowSpan??1))},...e.ownedCellSpans?{cellSpans:e.ownedCellSpans}:{},...e.occludedCellSpans?{occludedCellSpans:e.occludedCellSpans}:{},...e.sourceLine!==void 0?{sourceLine:e.sourceLine}:{}}}function g(e,n,t,o,f=new Set){const a=new Map(o.map(r=>[r.id,r]));const c=t.map(r=>{const p=r.regionId?a.get(r.regionId):void 0;return{...r,surface:e,disposition:e==="svg"&&p&&r.href!==void 0&&f.has(`${r.target}\0${r.href}`)?"embedded-inert":"sidecar-only",...p?{region:p}:{}}});const i=new Set(c.flatMap(r=>r.region?[r.region.id]:[]));return{version:1,format:e,coordinateSpace:n,regions:o.filter(r=>i.has(r.id)),actions:c}}function $(e){const n=new Set;for(const t of y(e)){const o=u(t,"data-href");const f=[u(t,"data-task"),u(t,"data-id")];if(o!==void 0){for(const i of f)if(i!==void 0)n.add(`${i}\0${o}`)}const a=u(t,"data-links");const c=f.find(i=>i!==void 0);if(a===void 0||c===void 0)continue;try{const i=JSON.parse(a);if(!i||typeof i!=="object"||Array.isArray(i))continue;for(const r of Object.values(i)){if(typeof r==="string")n.add(`${c}\0${r}`)}}catch{}}return n}function F(e,n,t){return e.map(o=>({...o,bounds:{x:s(o.bounds.x*n),y:s(o.bounds.y*t),w:s(o.bounds.w*n),h:s(o.bounds.h*t)}}))}function B(e,n){const t=b(e).source;if(n.format==="ascii"||n.format==="unicode"){const d=M(e,{...n.options??{},useAscii:n.format==="ascii"});const S=d.warnings.find(m=>m.code==="ASCII_RENDER_FAILED");if(S)throw new Error(S.message);const O=new Set(d.regions.map(l));const D=d.regions.map(m=>N(m,O));return{format:n.format,output:d.ascii,actionSurface:g(n.format,"cell",d.actions,D),warnings:d.warnings}}const o=n.options??{};const f=C(o);const a=h(t);if(!a.ok)throw new Error(a.error.map(d=>d.message).join("; "));const c=typeof e==="string"?a.value:e;const i=I(c,{...f,regions:true});const r=v(a.value);if(n.format==="svg"){const d=P(e,o);return{format:"svg",output:d,actionSurface:g("svg","pixel",r,i.regions??[],$(d))}}const p=R(e,o);const A=x(p);const k=F(i.regions??[],i.bounds.w>0?A.width/i.bounds.w:1,i.bounds.h>0?A.height/i.bounds.h:1);return{format:"png",output:p,actionSurface:g("png","pixel",r,k)}}export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NKNFOREZ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l,g as r}from"./chunk-3LGLPG33.js";function k(e){return{ok:true,value:e}}function D(e){return{ok:false,error:e}}function f(e){return e.body.kind==="packet"?e:null}function S(e){return e.body.kind==="kanban"?e:null}function O(e){return e.body.kind==="requirement"?e:null}function I(e){return e.body.kind==="treemap"?e:null}function C(e){return e.body.kind==="ishikawa"?e:null}function N(e){return e.body.kind==="block"?e:null}function T(e){return e.body.kind==="flowchart"?e:null}function A(e){return e.body.kind==="state"?e:null}function v(e){return e.body.kind==="sequence"?e:null}function h(e){return e.body.kind==="timeline"?e:null}function M(e){return e.body.kind==="class"?e:null}function L(e){return e.body.kind==="er"?e:null}function B(e){return e.body.kind==="journey"?e:null}function P(e){return e.body.kind==="architecture"?e:null}function V(e){return e.body.kind==="xychart"?e:null}function U(e){return e.body.kind==="pie"?e:null}function F(e){return e.body.kind==="quadrant"?e:null}function G(e){return e.body.kind==="radar"?e:null}function w(e){return e.body.kind==="c4"?e:null}function H(e){return e.body.kind==="sankey"?e:null}function q(e){return e.body.kind==="gantt"?e:null}function W(e){return e.body.kind==="mindmap"?e:null}function K(e){return e.body.kind==="gitgraph"?e:null}function j(e){if(!Number.isFinite(e))throw new RangeError(`expected a finite number, got ${String(e)}`);return e}var X={EMPTY_DIAGRAM:"error",UNRESOLVABLE_SCHEDULE:"error",RENDER_FAILED:"error",INTERNAL_ERROR:"error",[r.error.code]:r.error.severity,EDGE_MISANCHORED:"error",OFF_CANVAS:"error",GROUP_BREACH:"error",UNKNOWN_SHAPE:"warning",LABEL_OVERFLOW:"warning",NODE_OVERLAP:"warning",CONTENT_OCCLUDED:"error",LAYOUT_LIMIT_EXCEEDED:"warning",ROUTE_SELF_CROSS:"warning",ROUTE_HITCH:"warning",ROUTE_UNEXPLAINED_BEND:"warning",ROUTE_LABEL_ON_SHARED_TRUNK:"warning",ROUTE_SELF_LOOP_OCCUPANCY:"warning",ROUTE_CONTAINER_MISANCHOR:"warning",ROUTE_SHAPE_MISANCHOR:"warning",ROUTE_STALE_AFTER_NODE_MOVE:"warning",DUPLICATE_EDGE:"warning",UNREACHABLE_NODE:"warning",DECISION_BRANCH_UNLABELED:"warning",FLOW_IMBALANCE:"warning",COMMENT_DROPPED:"warning",UNSUPPORTED_SYNTAX:"warning",CONTENT_DROPPED_ON_ROUNDTRIP:"warning",EVENT_SOURCE_TYPE:"warning",INEFFECTIVE_CONFIG:"warning",LOW_CONTRAST:"warning",LABELS_HIDDEN:"warning",SCALE_RANGE_EXCLUDES_ZERO:"warning",BAR_RANGE_EXCLUDES_ZERO:"warning",VALUES_OUTSIDE_RANGE:"warning",[r.warn.code]:r.warn.severity};var Y={EMPTY_DIAGRAM:"structural",UNRESOLVABLE_SCHEDULE:"structural",RENDER_FAILED:"structural",INTERNAL_ERROR:"structural",[r.error.code]:r.error.tier,EDGE_MISANCHORED:"structural",OFF_CANVAS:"structural",GROUP_BREACH:"structural",UNKNOWN_SHAPE:"structural",LABEL_OVERFLOW:"structural",NODE_OVERLAP:"geometric",CONTENT_OCCLUDED:"geometric",LAYOUT_LIMIT_EXCEEDED:"geometric",ROUTE_SELF_CROSS:"geometric",ROUTE_HITCH:"geometric",ROUTE_UNEXPLAINED_BEND:"geometric",ROUTE_LABEL_ON_SHARED_TRUNK:"geometric",ROUTE_SELF_LOOP_OCCUPANCY:"geometric",ROUTE_CONTAINER_MISANCHOR:"geometric",ROUTE_SHAPE_MISANCHOR:"geometric",ROUTE_STALE_AFTER_NODE_MOVE:"geometric",DUPLICATE_EDGE:"lint",UNREACHABLE_NODE:"lint",DECISION_BRANCH_UNLABELED:"lint",FLOW_IMBALANCE:"lint",COMMENT_DROPPED:"lint",UNSUPPORTED_SYNTAX:"lint",CONTENT_DROPPED_ON_ROUNDTRIP:"lint",EVENT_SOURCE_TYPE:"lint",INEFFECTIVE_CONFIG:"lint",LOW_CONTRAST:"lint",LABELS_HIDDEN:"lint",SCALE_RANGE_EXCLUDES_ZERO:"lint",BAR_RANGE_EXCLUDES_ZERO:"lint",VALUES_OUTSIDE_RANGE:"lint",[r.warn.code]:r.warn.tier};var z=40;function Z(e){return e.body.kind==="eventmodeling"?e:null}function J(e){return e.body.kind==="zenuml"?e:null}var c=4;var a=1;var $=2;var m=2;var i=`render-contract@${m}`;function u(){return{svg:{availability:"public",security:"enforced",color:"srgb",terminal:"not-applicable",transports:{library:{availability:"direct",entrypoint:"renderMermaidSVG",evidence:["src/index.ts"]},cli:{availability:"direct",entrypoint:"am render",selector:"--format svg",evidence:["src/cli/index.ts"],format:"svg",order:0,help:"SVG markup",default:true},codeMode:{availability:"direct",entrypoint:"mermaid.renderMermaidSVGWithReceipt",evidence:["src/mcp/facade.ts","src/mcp/sdk-decl.ts"],method:"renderMermaidSVGWithReceipt",optionsType:"SvgRenderOptions",returnType:"RenderedSvg"},localMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.renderMermaidSVGWithReceipt",evidence:["src/mcp/server.ts","src/mcp/facade.ts"]},hostedMcp:{availability:"direct",entrypoint:"render_svg",evidence:["src/mcp/hosted-server.ts"]},editor:{availability:"direct",entrypoint:"diagram preview / Save SVG",selector:"renderMermaidSVGWithReceipt",evidence:["editor/js/rendering.js","editor/js/export.js"]},website:{availability:"direct",entrypoint:"website build-time renderMermaidSVG",selector:"embedded examples and diagram assets",evidence:["website/build.ts"]}},evidence:["output-security@2",i]},png:{availability:"public",security:"enforced",color:"srgb",terminal:"not-applicable",transports:{library:{availability:"direct",entrypoint:"renderMermaidPNG / createMermaidBrowserPNGRenderer",selector:"native Node/Bun or injected browser rasterizer",evidence:["src/agent/png.ts","src/browser-png.ts","src/index.ts"]},cli:{availability:"direct",entrypoint:"am render",selector:"--format png",evidence:["src/cli/index.ts"],format:"png",order:3,help:"PNG bytes; requires --output <file.png>; no watch/multi-input"},codeMode:{availability:"unavailable",entrypoint:"none",reason:"PNG rasterization is a host tool, not a sandbox SDK method",evidence:["src/mcp/sdk-decl.ts","src/mcp/facade.ts"]},localMcp:{availability:"direct",entrypoint:"render_png",evidence:["src/mcp/server.ts"]},hostedMcp:{availability:"direct",entrypoint:"render_png",evidence:["src/mcp/hosted-server.ts"]},editor:{availability:"direct",entrypoint:"Save PNG / Copy PNG",selector:"renderMermaidPNGInBrowserWithReceipt",evidence:["editor/js/export.js","src/browser-png.ts"]},website:{availability:"unavailable",entrypoint:"none",reason:"The site build copies curated PNG assets but exposes no PNG render adapter",evidence:["website/build.ts"]}},evidence:["output-security@2","output-color-profile@1",`png-output-policy@${c}`,i]},ascii:{availability:"public",security:"enforced",color:"terminal-projected",terminal:"projected",transports:{library:{availability:"direct",entrypoint:"renderMermaidASCII",selector:"useAscii: true",evidence:["src/ascii/index.ts"]},cli:{availability:"direct",entrypoint:"am render",selector:"--format ascii",evidence:["src/cli/index.ts"],format:"ascii",order:1,help:"7-bit ASCII art"},codeMode:{availability:"direct",entrypoint:"mermaid.renderMermaidASCIIWithReceipt",selector:"useAscii: true",evidence:["src/mcp/facade.ts","src/mcp/sdk-decl.ts"],method:"renderMermaidASCIIWithReceipt",optionsType:"AsciiRenderOptions",returnType:"RenderedAscii"},localMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.renderMermaidASCIIWithReceipt({ useAscii: true })",evidence:["src/mcp/server.ts","src/mcp/facade.ts"]},hostedMcp:{availability:"direct",entrypoint:"render_ascii",selector:"useAscii: true",evidence:["src/mcp/hosted-server.ts"]},editor:{availability:"direct",entrypoint:"ASCII canvas tab",selector:"renderMermaidASCII({ useAscii: true })",evidence:["editor/js/rendering.js","editor/html/right-panel.html"]},website:{availability:"unavailable",entrypoint:"none",reason:"The site build emits one Unicode diagram asset but no 7-bit ASCII output",evidence:["website/build.ts"]}},evidence:["terminal-style@1",`terminal-output-policy@${a}`,"terminal-control-sanitization",i]},unicode:{availability:"public",security:"enforced",color:"terminal-projected",terminal:"projected",transports:{library:{availability:"direct",entrypoint:"renderMermaidASCII",selector:"useAscii: false (default)",evidence:["src/ascii/index.ts"]},cli:{availability:"direct",entrypoint:"am render",selector:"--format unicode",evidence:["src/cli/index.ts"],format:"unicode",order:2,help:"Unicode box-drawing text"},codeMode:{availability:"direct",entrypoint:"mermaid.renderMermaidASCIIWithReceipt",selector:"useAscii: false (default)",evidence:["src/mcp/facade.ts","src/mcp/sdk-decl.ts"],method:"renderMermaidASCIIWithReceipt",optionsType:"AsciiRenderOptions",returnType:"RenderedAscii"},localMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.renderMermaidASCIIWithReceipt({ useAscii: false })",evidence:["src/mcp/server.ts","src/mcp/facade.ts"]},hostedMcp:{availability:"direct",entrypoint:"render_ascii",selector:"useAscii: false (default)",evidence:["src/mcp/hosted-server.ts"]},editor:{availability:"direct",entrypoint:"Unicode canvas tab",selector:"renderMermaidASCII({ useAscii: false })",evidence:["editor/js/rendering.js","editor/html/right-panel.html"]},website:{availability:"direct",entrypoint:"website build-time renderMermaidASCII",selector:"diagrams/workflow.txt; useAscii: false",evidence:["website/build.ts"]}},evidence:["terminal-style@1",`terminal-output-policy@${a}`,"terminal-control-sanitization",i]},html:{availability:"public",security:"enforced",color:"terminal-projected",terminal:"projected",transports:{library:{availability:"projected",entrypoint:"renderMermaidASCII",selector:"colorMode: 'html'",evidence:["src/ascii/index.ts"]},cli:{availability:"unavailable",entrypoint:"none",reason:"HTML text is not a standalone CLI format",evidence:["src/cli/index.ts"]},codeMode:{availability:"projected",entrypoint:"mermaid.renderMermaidASCIIWithReceipt",selector:"colorMode: 'html' (terminal projection; not a standalone CLI format)",evidence:["src/mcp/facade.ts","src/mcp/sdk-decl.ts"],method:"renderMermaidASCIIWithReceipt",optionsType:"AsciiRenderOptions",returnType:"RenderedAscii"},localMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.renderMermaidASCIIWithReceipt({ colorMode: 'html' })",evidence:["src/mcp/server.ts","src/mcp/facade.ts"]},hostedMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.renderMermaidASCIIWithReceipt({ colorMode: 'html' })",evidence:["src/mcp/hosted-server.ts","src/mcp/facade.ts"]},editor:{availability:"unavailable",entrypoint:"none",reason:"The editor exposes diagram, Unicode and ASCII canvas tabs only",evidence:["editor/js/buttons.js","editor/html/right-panel.html"]},website:{availability:"unavailable",entrypoint:"none",reason:"The site does not emit terminal-HTML diagram artifacts",evidence:["website/build.ts"]}},evidence:["terminal-style@1",`terminal-output-policy@${a}`,"terminal-control-sanitization","html-text-escaping",i]},layout:{availability:"public",security:"not-applicable",color:"not-applicable",terminal:"not-applicable",transports:{library:{availability:"direct",entrypoint:"layoutMermaid",evidence:["src/agent/core.ts"]},cli:{availability:"direct",entrypoint:"am render",selector:"--format layout",evidence:["src/cli/index.ts"],format:"layout",order:4,help:"Layout JSON (nodes, edges, groups, bounds)"},codeMode:{availability:"direct",entrypoint:"mermaid.layoutMermaidWithReceipt",evidence:["src/mcp/facade.ts","src/mcp/sdk-decl.ts"],method:"layoutMermaidWithReceipt",optionsType:"LayoutRenderOptions",returnType:"RenderedLayoutArtifact"},localMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.layoutMermaidWithReceipt",evidence:["src/mcp/server.ts","src/mcp/facade.ts"]},hostedMcp:{availability:"indirect",entrypoint:"execute",selector:"mermaid.layoutMermaidWithReceipt",evidence:["src/mcp/hosted-server.ts","src/mcp/facade.ts"]},editor:{availability:"indirect",entrypoint:"verification panel",selector:"verifyMermaid(source).layout (consumed, not exported)",evidence:["editor/js/rendering.js"]},website:{availability:"unavailable",entrypoint:"none",reason:"Website verification consumes layout internally but publishes no layout artifact",evidence:["website/build.ts"]}},evidence:["positioned-artifact@1",i]}}}var g=u();function n(e){return Object.freeze({...e,evidence:Object.freeze([...e.evidence])})}var ne=Object.freeze(["library","cli","codeMode","localMcp","hostedMcp","editor","website"]);function y(){return Object.freeze(l.map(e=>{const t=g[e];return Object.freeze({id:e,...t,transports:Object.freeze({library:n(t.transports.library),cli:n(t.transports.cli),codeMode:n(t.transports.codeMode),localMcp:n(t.transports.localMcp),hostedMcp:n(t.transports.hostedMcp),editor:n(t.transports.editor),website:n(t.transports.website)}),evidence:Object.freeze([...t.evidence])})}))}var b=y();function _(){return Object.freeze(b.filter(e=>e.transports.cli.availability==="direct").sort((e,t)=>e.transports.cli.order-t.transports.cli.order))}var o=_();function E(){return Object.freeze(o.map(e=>e.transports.cli.format))}var p=E();function x(){const e=o.filter(t=>t.transports.cli.default);if(e.length!==1)throw new Error("Render output contract must declare exactly one default CLI format");return e[0].transports.cli.format}var ie=x();function ae(e){return p.includes(e)}function oe(e){return o.find(t=>t.transports.cli.format===e)}function se(e=" "){const t=Math.max(...p.map(s=>s.length));return o.map(s=>{const d=s.transports.cli;return`${e}--format ${d.format.padEnd(t)} ${d.help}`}).join("\n")}export{k as a,D as b,f as c,S as d,O as e,I as f,C as g,N as h,T as i,A as j,v as k,h as l,M as m,L as n,B as o,P as p,V as q,U as r,F as s,G as t,w as u,H as v,q as w,W as x,K as y,j as z,X as A,Y as B,z as C,Z as D,J as E,c as F,a as G,$ as H,m as I,b as J,p as K,ie as L,ae as M,oe as N,se as O};
|
|
2
|
+
//# sourceMappingURL=chunk-O7H2UX5K.js.map
|