@beehexa/hexasync-template-model 2608.21.4 → 2610.3.1

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 (39) hide show
  1. package/dist/canonicalGraph.d.ts +153 -0
  2. package/dist/canonicalGraph.d.ts.map +1 -0
  3. package/dist/canonicalGraph.js +321 -0
  4. package/dist/canonicalGraph.js.map +1 -0
  5. package/dist/collapseRule.d.ts +125 -0
  6. package/dist/collapseRule.d.ts.map +1 -0
  7. package/dist/collapseRule.js +87 -0
  8. package/dist/collapseRule.js.map +1 -0
  9. package/dist/flowRender.d.ts +364 -18
  10. package/dist/flowRender.d.ts.map +1 -1
  11. package/dist/flowRender.js +956 -123
  12. package/dist/flowRender.js.map +1 -1
  13. package/dist/index.d.ts +8 -3
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +10 -3
  16. package/dist/index.js.map +1 -1
  17. package/dist/nodeAddress.d.ts +81 -0
  18. package/dist/nodeAddress.d.ts.map +1 -1
  19. package/dist/nodeAddress.js +70 -0
  20. package/dist/nodeAddress.js.map +1 -1
  21. package/dist/occurrenceExpansion.d.ts +50 -0
  22. package/dist/occurrenceExpansion.d.ts.map +1 -0
  23. package/dist/occurrenceExpansion.js +230 -0
  24. package/dist/occurrenceExpansion.js.map +1 -0
  25. package/dist/stepGlyph.d.ts +242 -29
  26. package/dist/stepGlyph.d.ts.map +1 -1
  27. package/dist/stepGlyph.js +403 -104
  28. package/dist/stepGlyph.js.map +1 -1
  29. package/dist/workerStepVocabularyAudit.d.ts +19 -0
  30. package/dist/workerStepVocabularyAudit.d.ts.map +1 -0
  31. package/dist/workerStepVocabularyAudit.js +134 -0
  32. package/dist/workerStepVocabularyAudit.js.map +1 -0
  33. package/dist/workflowMigration.d.ts +60 -0
  34. package/dist/workflowMigration.d.ts.map +1 -0
  35. package/dist/workflowMigration.js +75 -0
  36. package/dist/workflowMigration.js.map +1 -0
  37. package/manifests/collapse-rule.json +43 -0
  38. package/manifests/worker-step-roster.json +164 -0
  39. package/package.json +6 -2
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The loop-collapse retention rule, vendored from core.api — Story 8.9, AD-32(b).
3
+ *
4
+ * ### Why this file is a COPY and not an implementation
5
+ *
6
+ * `ExecutionEvidenceAccumulator` in core.api decides which occurrences of a step survive a run and which fold into a
7
+ * range. The canvas has to draw the same reading, or the inspector and the diagram describe two different runs. AD-32(b)
8
+ * says neither owner may decide that rule alone, and AD-28 bars a CI job spanning the two repositories — so the rule is
9
+ * published there as `hexasync.steps/Manifests/collapse-rule-manifest.json`, byte-copied here to
10
+ * `manifests/collapse-rule.json`, and pinned on both sides:
11
+ *
12
+ * | change | what fails |
13
+ * | --- | --- |
14
+ * | the accumulator's retention behaviour | `CollapseRuleManifestAtddTests` in core.api — it runs the accumulator and reads the numbers back out |
15
+ * | the constants below | `story89LoopCollapse.atdd.spec.ts` — it reads the vendored manifest off disk and compares |
16
+ * | the vendored manifest goes stale | the same spec, from the other direction |
17
+ *
18
+ * This is Story 7.2's `worker-step-roster.json` pattern, deliberately unchanged.
19
+ *
20
+ * ### Why the constants are NAMED here and not read at runtime
21
+ *
22
+ * `template-model` runs in a webview and in a browser bundle, so it cannot read a file, and a JSON import would put a
23
+ * bundler-specific assertion in a published library's entry point. The numbers are therefore declared as constants and
24
+ * the vendored JSON is the thing a TEST compares them against — which is also the only place a comparison is useful,
25
+ * because a mismatch is a build-time defect, never a runtime condition a caller can handle.
26
+ *
27
+ * ⚠️ The accumulator has **no named threshold constants at all** — `StepState` encodes retention structurally with a
28
+ * first-success flag plus a two-slot slide, so "the fourth success" is emergent behaviour rather than a number anyone
29
+ * typed there. That is exactly why these constants must be pinned to the manifest instead of "kept in sync by reading
30
+ * the C#": there is nothing in the C# to read.
31
+ */
32
+ /** The evidence envelope schema these thresholds describe. */
33
+ export const COLLAPSE_RULE_SCHEMA_VERSION = 2;
34
+ /** The first success of a step key always stays full. */
35
+ export const RETAINED_FIRST_SUCCESSES = 1;
36
+ /** The trailing successes that stay full — the accumulator's two-slot slide. */
37
+ export const RETAINED_LATEST_SUCCESSES = 2;
38
+ /**
39
+ * The step-local success ordinal on which compaction FIRST fires.
40
+ *
41
+ * Not an independent number: the first success plus the latest two are already full, so the next success is the first
42
+ * one that can push an older body into a range. Stated as a constant because a renderer sizing a fixture needs it, and
43
+ * derived from the two above so it cannot drift from them.
44
+ */
45
+ export const FIRST_COMPACTED_SUCCESS_ORDINAL = RETAINED_FIRST_SUCCESSES + RETAINED_LATEST_SUCCESSES + 1;
46
+ /** Every failure stays full. A failure never folds into a range, whatever its neighbours did. */
47
+ export const FAILURES_RETAINED = true;
48
+ /**
49
+ * How the six fields below are compared — ordinal (case-sensitive), with two nulls counting as equal.
50
+ *
51
+ * Mirrored from the manifest rather than left as prose, because a comparison rule the manifest publishes and neither
52
+ * side pins is a rule the accumulator can stop following with every test on both sides still green.
53
+ */
54
+ export const RANGE_IDENTITY_COMPARISON = 'ordinal';
55
+ export const RANGE_IDENTITY_NULLS_EQUAL = true;
56
+ /**
57
+ * What "adjacent" means when a range is extended rather than opened: the occurrence's global index is exactly one past
58
+ * the range's last, and its step-local occurrence is exactly one past the range's last.
59
+ */
60
+ export const ADJACENCY_GLOBAL_INDEX_GAP = 1;
61
+ export const ADJACENCY_STEP_LOCAL_OCCURRENCE_GAP = 1;
62
+ /** A range id is minted once and does NOT change as the range extends — which is why an entry carries it. */
63
+ export const RANGE_ID_STABLE_ON_EXTENSION = true;
64
+ /**
65
+ * The six fields a range compares to decide whether an occurrence extends it, in the tuple's declared order.
66
+ *
67
+ * Case-sensitive (ordinal) with nulls equal, which is what `HasSameRoute` does. The renderer never compares these
68
+ * itself — the producer does, in core.api — but the list is what a fixture and a review have to agree on, and a plan
69
+ * whose ranges were folded on five fields is a different reading of the run.
70
+ */
71
+ export const RANGE_IDENTITY_FIELDS = [
72
+ 'stepKey',
73
+ 'providerId',
74
+ 'connectionId',
75
+ 'flow',
76
+ 'nextTarget',
77
+ 'outcomeClass',
78
+ ];
79
+ /** The two `orderedTimeline` kinds, in the manifest's order. There is no third. */
80
+ export const TIMELINE_KINDS = ['occurrence', 'range'];
81
+ /** How the accumulator mints a range id, and never re-mints it once the range extends. */
82
+ export const RANGE_ID_FORMAT = 'range-{firstGlobalIndex}';
83
+ /** Does this entry describe a folded run rather than one retained occurrence? Narrows, so `rangeId` is reachable. */
84
+ export function isCollapsedRange(entry) {
85
+ return entry.kind === 'range';
86
+ }
87
+ //# sourceMappingURL=collapseRule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapseRule.js","sourceRoot":"","sources":["../src/collapseRule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C,yDAAyD;AACzD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C,gFAAgF;AAChF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAC1C,wBAAwB,GAAG,yBAAyB,GAAG,CAAC,CAAC;AAE3D,iGAAiG;AACjG,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AACnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAErD,6GAA6G;AAC7G,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS;IACT,YAAY;IACZ,cAAc;IACd,MAAM;IACN,YAAY;IACZ,cAAc;CACN,CAAC;AAEX,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,OAAO,CAAU,CAAC;AAE/D,0FAA0F;AAC1F,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAsD1D,qHAAqH;AACrH,MAAM,UAAU,gBAAgB,CAAC,KAAsB;IACrD,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC;AAChC,CAAC"}
@@ -1,10 +1,26 @@
1
+ import type { OccurrencePlan } from './collapseRule.js';
2
+ import { type NodeLabelAnatomy } from './stepGlyph.js';
1
3
  /** A node as a renderer needs to see it — neither flow package's shape, deliberately. */
2
4
  export interface RenderNode {
3
5
  /** The AD-33 canonical address. Projected to a mermaid id here, never by the caller. */
4
6
  readonly address: string;
5
7
  /** What the box says. */
6
8
  readonly label: string;
7
- /** Draw it as a decision diamond. */
9
+ /** Composer-owned structure. Its presence, not `label` byte shape, enables Mermaid markdown. */
10
+ readonly labelAnatomy?: NodeLabelAnatomy;
11
+ /**
12
+ * Label for the loose host fidelity. When absent, both fidelities intentionally use `label`.
13
+ *
14
+ * The emitter selects between the two; hosts never rewrite a generated definition.
15
+ */
16
+ readonly looseLabel?: string;
17
+ /** Loose-fidelity composer structure. Falls back with `looseLabel` when absent. */
18
+ readonly looseLabelAnatomy?: NodeLabelAnatomy;
19
+ /** Authoritative worker runtime type. Shape classification never parses the label or icon family. */
20
+ readonly type?: string;
21
+ /** Child-family DOM hook used by loose hosts. Unknown or absent families use the neutral class. */
22
+ readonly iconFamily?: string;
23
+ /** Draw it as a branch/condition. */
8
24
  readonly decides?: boolean;
9
25
  /** Draw it as a stadium — a terminal, an unresolved target. */
10
26
  readonly terminal?: boolean;
@@ -21,28 +37,268 @@ export interface RenderGroup {
21
37
  readonly nodes: readonly RenderNode[];
22
38
  }
23
39
  export type FlowDirection = 'TD' | 'LR';
40
+ export type RenderFidelity = 'strict' | 'loose';
41
+ export type NodeTreatment = 'flow-start' | 'flow-end' | 'process' | 'branch' | 'subroutine' | 'delay' | 'exception' | 'unimplemented';
42
+ /** The complete, ordered shape vocabulary. No renderer path may invent another treatment. */
43
+ export declare const APPROVED_NODE_TREATMENTS: readonly ["flow-start", "flow-end", "process", "branch", "subroutine", "delay", "exception", "unimplemented"];
44
+ /**
45
+ * The hard boundary between deterministic definition generation and host DOM decoration.
46
+ *
47
+ * Exported as data so adapters and contract tests can share one inventory instead of describing the boundary in
48
+ * prose that drifts. Stage 3 may make generated nodes operable; every visible or structural byte belongs here.
49
+ */
50
+ export declare const FLOW_RENDER_STAGE_OWNERSHIP: {
51
+ readonly generate: readonly ['shape', 'nodeId', 'labelText', 'accTitle', 'accDescr', 'iconClass', 'nodeStyle', 'edge', 'linkStyle', 'edgeColor', 'edgeDash', 'direction', 'repeatBadge', 'errorMarker'];
52
+ readonly decorate: readonly ['interaction'];
53
+ };
54
+ /**
55
+ * The nine runtime executors whose authoritative Epic 7 evidence records `NotImplementedException`.
56
+ *
57
+ * This is an explicit roster subset, never a name or family regex. `WorkerStepType` keeps every member tied to the
58
+ * vendored 51-row manifest vocabulary. Begin and End remain in the subset but terminal treatment takes precedence.
59
+ */
60
+ export declare const UNIMPLEMENTED_WORKER_STEP_TYPES: readonly ["Begin", "Composite", "cURL", "End", "GraphQL", "Liquid", "OData", "QueryDSL", "Restful"];
61
+ /** Classify treatment from model facts only; labels and icon families are deliberately irrelevant. */
62
+ export declare function classifyNodeTreatment(node: Pick<RenderNode, 'type' | 'decides' | 'terminal'>): NodeTreatment;
63
+ /**
64
+ * A run's reading of the drawing — ONE vocabulary, keyed by node address (AD-22, Story 10.4).
65
+ *
66
+ * Story 10.4 retired the two-state lists (`traversed`, `errored`, `colors`, and Story 8.7's `notTaken`) that stood
67
+ * beside this map: two overlay vocabularies reaching one emitter meant edges were styled from one and nodes from the
68
+ * other. Every reading those lists drew is now a `nodes` entry — see `RenderNodeOverlay` for the mapping.
69
+ */
24
70
  export interface RenderOverlay {
25
- /** Addresses a run walked through. */
26
- readonly traversed?: readonly string[];
27
- /** Addresses a run failed at. */
28
- readonly errored?: readonly string[];
29
71
  /**
30
- * Supplied by the caller, not chosen here.
72
+ * The TYPED per-node overlay (AD-22), keyed by node address — never by step key.
73
+ *
74
+ * Each entry resolves ONE way, through `resolveNodeState`:
75
+ * - WITH a `state`: the state's treatment, exactly as Story 8.8 draws it. Colour overrides are honoured; width,
76
+ * marker and dash follow the state; `roles.opacity` only retunes a state that is already dimmed.
77
+ * - WITHOUT a `state` but with a valid `roles.stroke`: a ROLES-ONLY entry, which draws exactly its roles (see
78
+ * `RenderNodeOverlayRoles`). This is how a producer that knows which roles to draw, but can prove no state, says so.
79
+ * - Any other stateless entry draws no node style. Its `repeat` badge is still drawn.
80
+ *
81
+ * **Authority comes from a `state`.** When at least one CALLER entry that names a drawn address carries a `state`
82
+ * (any value — an unknown one reads as `indeterminate`), the typed reading is chart-wide: every drawn node draws a
83
+ * style, defaulting to `indeterminate`, kind styles are suppressed, and `accDescr` states every node's reading. A
84
+ * chart where some nodes carry a run reading and others carry none would leave a reader unable to tell "not reached"
85
+ * from "not described". Roles-only entries and badge-only entries make no state claim, so they never take the chart:
86
+ * a node without an entry keeps its kind style, and a roles-only node never ALSO gets its kind style.
87
+ *
88
+ * **Edges are derived from these entries** — there is no edge field. Per drawn, deduped edge:
89
+ * 1. its target is DECLINED (`branchNotTaken`, or a stateless entry with `roles.dash`) — dashed in `notTakenStroke`;
90
+ * 2. both ends are REACHED (`ranOk`/`ranFailed`, or a drawn roles-only entry) — the stroke of the end drawn at
91
+ * `emphasis`, target first, else the target's stroke;
92
+ * 3. otherwise the neutral `edge` role.
31
93
  *
32
- * dashboard's live values come from its theme; the extension's webview themes its own. A renderer that hardcoded a
33
- * colour would be wrong in one of light or dark — which is exactly why the extension delegates to a stylesheet.
94
+ * An address no group drew is ignored in silence.
95
+ *
96
+ * ⚠ **`RenderOptions.nodeColors` does NOT reach the state pass.** `nodeColors` names the base and kind roles; the
97
+ * five state readings are a separate closed set, and `STATE_ROLES` carries DESIGN.md's light palette only. A host on
98
+ * a dark theme overrides state colours through `roles`, resolved to literal hex at its own boundary.
34
99
  */
35
- readonly colors?: {
36
- readonly traversed?: string;
37
- readonly errored?: string;
38
- };
100
+ readonly nodes?: Readonly<Record<string, RenderNodeOverlay>>;
101
+ }
102
+ export interface RenderNodeColors {
103
+ /** Opaque node fill. Hexagons accept only the six-digit form. */
104
+ readonly fill: string;
105
+ /** Solid border for an unimplemented kind when no run state owns the stroke. */
106
+ readonly nodeBorder: string;
107
+ /** Solid border for an exception kind when no run state owns the stroke. */
108
+ readonly failStroke: string;
109
+ /** Every edge the run neither walked nor declined. */
110
+ readonly edge: string;
111
+ /** The edge entering a branch the run declined — the canvas's only dashed line. */
112
+ readonly notTakenStroke: string;
113
+ /** Edge-label glyphs. */
114
+ readonly edgeLabelText: string;
115
+ /** The opaque plate an edge label sits on, so the line does not strike through the text. */
116
+ readonly edgeLabelBg: string;
117
+ }
118
+ /** Deterministic approved light palette; valid host-resolved values may override these roles. */
119
+ export declare const APPROVED_NODE_COLORS: {
120
+ readonly fill: '#ffffff';
121
+ readonly nodeBorder: '#64748b';
122
+ readonly failStroke: '#b91c1c';
123
+ readonly edge: '#64748b';
124
+ readonly notTakenStroke: '#475569';
125
+ readonly edgeLabelText: '#334155';
126
+ readonly edgeLabelBg: '#ffffff';
127
+ };
128
+ /**
129
+ * The declared line-work roles (DESIGN.md `strokes:`). Blueprint carries state in the LINE, so weight and pattern
130
+ * are roles, not values a render path picks.
131
+ *
132
+ * They live here as data because FR59 forbids a width or dash-array literal inside an emitter function: a width literal
133
+ * typed into one of three emit sites is exactly how the shipped emitter ended up with three copies of one decision.
134
+ */
135
+ export declare const STROKE_ROLES: {
136
+ /** Every node outline and every edge. */
137
+ readonly hairline: '1px';
138
+ /** The failed node's outline, and nothing else on the canvas. */
139
+ readonly emphasis: '2px';
140
+ /** Dash array for the branch-not-taken stroke. RUN STATE ONLY. */
141
+ readonly dash: '6 3';
142
+ };
143
+ export type StrokeRole = keyof typeof STROKE_ROLES;
144
+ /**
145
+ * The run-state vocabulary: FOUR states plus ONE drawn reading, never five states.
146
+ *
147
+ * `indeterminate` is deliberately a member of the same union — it is what the emitter draws for a node whose state
148
+ * cannot be determined — but the spine's State convention (`ARCHITECTURE-SPINE.md` line 237) counts it separately,
149
+ * and `story88RunStates.atdd.spec.ts` asserts that shape so nobody grows a fifth state by adding a row here.
150
+ */
151
+ export type RunState = 'ranOk' | 'ranFailed' | 'neverReached' | 'branchNotTaken' | 'indeterminate';
152
+ /** The four states DESIGN.md's state table draws as rows; `indeterminate` is the fifth reading, not a fifth state. */
153
+ export declare const RUN_STATES: readonly ["ranOk", "ranFailed", "neverReached", "branchNotTaken"];
154
+ /** The drawn reading for a node the producer could not place. Counted apart from `RUN_STATES` on purpose. */
155
+ export declare const INDETERMINATE_RUN_STATE: "indeterminate";
156
+ /**
157
+ * The role map one node's entry draws with (AD-22's `roles` map). It means two things, chosen by the entry's `state`.
158
+ *
159
+ * Colours are always literal six-digit hex — the same grammar `overlayColor` enforces for every other overlay colour,
160
+ * since a stroke value also reaches a polygon fill. Widths are declared ROLE NAMES (`hairline`/`emphasis`), never
161
+ * measurements, so a caller cannot invent a third weight.
162
+ *
163
+ * **Beside a `state`**, these are OVERRIDES of that state's treatment. Colours are honoured; `width`, `dash` and
164
+ * `marker` follow the state and are ignored (the failure signals a reader without colour vision has cannot be moved
165
+ * by a caller); `opacity` only retunes a state that is already dimmed. Anything invalid falls back to the state's
166
+ * declared role rather than dropping the statement: a half-drawn state reads as a DIFFERENT state.
167
+ *
168
+ * **Without a `state`**, a valid `stroke` makes the entry ROLES-ONLY, and it draws exactly these roles and nothing
169
+ * else: `stroke` as given; `width`, else `hairline`; `fill`, else the resolved `RenderNodeColors.fill`; `title` as the
170
+ * label colour only if valid; `opacity` only if valid; a dash only if `dash`; the error marker only if `marker`. It
171
+ * claims no state, so it never takes the chart's authority and `accDescr` states no reading for it. An invalid or
172
+ * absent `stroke` draws no node style at all — the node keeps its kind style and its edges stay neutral. A stateless
173
+ * `dash: true` still marks the node DECLINED for its inbound edges, with or without a stroke.
174
+ *
175
+ * Migrating from the retired lists: `traversed` + `colors.traversed` → `{ roles: { stroke, width: 'hairline' } }`;
176
+ * `errored` + `colors.errored` → `{ roles: { stroke, width: 'emphasis' } }`; `notTaken` → `{ roles: { dash: true } }`
177
+ * (or `{ state: 'branchNotTaken' }` for a producer that can prove it).
178
+ */
179
+ export interface RenderNodeOverlayRoles {
180
+ readonly stroke?: string;
181
+ readonly fill?: string;
182
+ /** Label colour. Mermaid paints ONE colour over the whole label — see `resolveNodeState`. */
183
+ readonly title?: string;
184
+ /** Accepted, recorded, and NOT emitted separately. Kept so the caller's role map is complete. */
185
+ readonly description?: string;
186
+ /** Honoured on a roles-only entry; beside a `state` it follows the state. */
187
+ readonly width?: Extract<StrokeRole, 'hairline' | 'emphasis'>;
188
+ /** Honoured on a stateless entry; beside a `state` it follows the state. */
189
+ readonly dash?: boolean;
190
+ /**
191
+ * `'0'`–`'1'` as a decimal string, `'0'` excluded. Beside a `state` it only retunes a state that is ALREADY dimmed
192
+ * (`neverReached`): it cannot dim a state DESIGN.md says is never dimmed, and it cannot undim one.
193
+ */
194
+ readonly opacity?: string;
195
+ /** Honoured on a roles-only entry; beside a `state` it follows the state. */
196
+ readonly marker?: boolean;
39
197
  }
198
+ /** One node's run reading: what the run did to it, how many times, and the roles it draws with. */
199
+ export interface RenderNodeOverlay {
200
+ readonly state?: RunState;
201
+ /**
202
+ * Occurrence count. Absent, `1`, `0`, negative or non-integer draws NO badge — a malformed badge would be a
203
+ * factual claim about the run, and `×0` or `×1.5` is not one the generator can make.
204
+ */
205
+ readonly repeat?: number;
206
+ readonly roles?: RenderNodeOverlayRoles;
207
+ }
208
+ /**
209
+ * The five drawn readings, resolved from DESIGN.md's closed light palette (`colors:` 9-88, `node-*` components
210
+ * 171-195, the state table 389-400).
211
+ *
212
+ * Data, not code, for the same reason as `STROKE_ROLES`: FR59 forbids a colour, width, dash or opacity literal
213
+ * inside an emitter function. `opacity: '0.7'` is the ONLY numeric opacity in DESIGN.md (`node-unreached` line 187)
214
+ * and it exists once, here.
215
+ *
216
+ * Read the columns against the matrix they came from:
217
+ * - **failed** is the only `emphasis`, the only `marker`, and the only non-white fill. All three unconditional.
218
+ * - **never reached** is SOLID with a fully visible border and recedes by muted text + `opacity` on the card.
219
+ * - **branch not taken** is DASHED at full neutral contrast and is NEVER dimmed.
220
+ * - **indeterminate** is the neutral pair and carries nothing else, so it stays clickable and unremarkable.
221
+ */
222
+ export declare const STATE_ROLES: {
223
+ readonly ranOk: {
224
+ readonly stroke: '#c2410c';
225
+ readonly fill: "#ffffff";
226
+ readonly title: '#0f172a';
227
+ readonly description: '#475569';
228
+ readonly width: 'hairline';
229
+ readonly dash: false;
230
+ readonly opacity: undefined;
231
+ readonly marker: false;
232
+ };
233
+ readonly ranFailed: {
234
+ readonly stroke: "#b91c1c";
235
+ readonly fill: '#fee2e2';
236
+ readonly title: '#991b1b';
237
+ readonly description: '#7f1d1d';
238
+ readonly width: 'emphasis';
239
+ readonly dash: false;
240
+ readonly opacity: undefined;
241
+ readonly marker: true;
242
+ };
243
+ readonly neverReached: {
244
+ readonly stroke: '#7c8899';
245
+ readonly fill: '#f8fafc';
246
+ readonly title: '#64748b';
247
+ readonly description: '#64748b';
248
+ readonly width: 'hairline';
249
+ readonly dash: false;
250
+ readonly opacity: '0.7';
251
+ readonly marker: false;
252
+ };
253
+ readonly branchNotTaken: {
254
+ readonly stroke: "#475569";
255
+ readonly fill: "#ffffff";
256
+ readonly title: '#334155';
257
+ readonly description: '#475569';
258
+ readonly width: 'hairline';
259
+ readonly dash: true;
260
+ readonly opacity: undefined;
261
+ readonly marker: false;
262
+ };
263
+ readonly indeterminate: {
264
+ readonly stroke: "#64748b";
265
+ readonly fill: "#ffffff";
266
+ readonly title: '#0f172a';
267
+ readonly description: '#475569';
268
+ readonly width: 'hairline';
269
+ readonly dash: false;
270
+ readonly opacity: undefined;
271
+ readonly marker: false;
272
+ };
273
+ };
274
+ /**
275
+ * The count badge's declared roles (DESIGN.md `count-badge` 218-222, `rounded.full`).
276
+ *
277
+ * Exported as DATA and not emitted as a `style` property, because Mermaid 12 has no way to paint a plate behind one
278
+ * span of a node label: the badge reaches the definition as label TEXT (`×997`) in the node's single label colour.
279
+ * A host that draws its own legend or inspector chip reads the plate roles from here, so the two surfaces cannot
280
+ * disagree about what a badge looks like. Emitting it as label text is what AD-23 requires anyway — run-state
281
+ * content is stage 1's, and `securityLevel: 'strict'` routes a label through DOMPurify.
282
+ */
283
+ export declare const REPEAT_BADGE_ROLES: {
284
+ readonly background: '#ffffff';
285
+ readonly foreground: '#9a3412';
286
+ readonly border: '#c2410c';
287
+ readonly borderWidth: "1px";
288
+ readonly radius: '9999px';
289
+ };
40
290
  export interface RenderOptions {
291
+ /**
292
+ * Label fidelity is a generator input. Mermaid `securityLevel` remains a host concern and must not fork emission.
293
+ */
294
+ readonly fidelity?: RenderFidelity;
41
295
  readonly direction?: FlowDirection;
42
296
  /** One chart with a subgraph per group, versus one flat chart. */
43
297
  readonly multiStage?: boolean;
44
298
  /** Run highlighting. An ARGUMENT, never state on the model (AD-29). */
45
299
  readonly overlay?: RenderOverlay;
300
+ /** Valid role-resolved overrides for the deterministic approved node colors. */
301
+ readonly nodeColors?: Partial<RenderNodeColors>;
46
302
  /**
47
303
  * Emitted as `classDef`/`class` rather than a per-element style, for a consumer whose stylesheet owns the colour.
48
304
  * Carries no colour of its own — see rule 3.
@@ -61,24 +317,114 @@ export interface RenderOptions {
61
317
  * pusher steps" is the true sentence.
62
318
  */
63
319
  readonly emptyLabel?: string;
320
+ /**
321
+ * What a RUN did to each drawn step, keyed by node address — Story 8.9's occurrence dimension.
322
+ *
323
+ * A TYPED PARAMETER, never an evidence envelope (FR26): the generator does not parse the envelope and cannot be made
324
+ * to. With no plan the expansion is the identity function and these bytes are what they were before Story 8.9
325
+ * existed, which is what FR40 requires of the CLI compose report, the VS Code preview and the report renderer — none
326
+ * of which has a run.
327
+ *
328
+ * The two flow adapters expand ahead of this call, because the expansion has to see their stage edges too; it is
329
+ * honoured here as well so a caller rendering groups directly cannot pass a plan and silently get nothing.
330
+ */
331
+ readonly occurrences?: OccurrencePlan;
332
+ /**
333
+ * The overlay entries an occurrence expansion DERIVED — today, a `repeat` on each collapsed range so it draws `×N`.
334
+ *
335
+ * ⛔ Deliberately NOT part of `overlay.nodes`, and the separation is load-bearing. `overlay.nodes` naming any drawn
336
+ * address makes the TYPED overlay authoritative for every node in the chart (see `RenderOverlay.nodes`), which
337
+ * suppresses kind styling chart-wide and makes `accDescr` state a run reading for every node. Routing a derived
338
+ * badge through it meant that collapsing ONE loop stripped the exception node's red border from an unrelated part of
339
+ * the drawing and told a screen-reader user the run state of every node was unknown. A plan alone must never do that.
340
+ *
341
+ * Produced by `expandOccurrences`; the two flow adapters pass it through because they expand before calling here.
342
+ * A caller's own `overlay.nodes` entry for the same address wins field by field.
343
+ */
344
+ readonly occurrenceOverlay?: Readonly<Record<string, RenderNodeOverlay>>;
345
+ /**
346
+ * The host's `maxTextSize`, in characters. Over it, the definition is REFUSED rather than returned.
347
+ *
348
+ * ⛔ Measured 2026-09-28 (`story89NodeCeiling.atdd.spec.ts`), and the reason this option exists at all: Mermaid's
349
+ * `maxTextSize` default is 50 000 characters, and over it `mermaid.render()` **resolves successfully with an SVG
350
+ * containing ONE node**. `mermaid.parse()` resolves too. So a host that validates with `parse` sees nothing wrong and
351
+ * draws a diagram that is not the workflow — the failure is silent, and the generator is the only place it can be
352
+ * caught, because by the time a host has the string the information that it was truncated is gone.
353
+ *
354
+ * Absent by default: a budget the caller did not state is not a budget the generator may invent, and every existing
355
+ * surface keeps its bytes. `MERMAID_DEFAULT_MAX_TEXT_SIZE` is the value a host using Mermaid's own default passes.
356
+ */
357
+ readonly maxTextSize?: number;
358
+ }
359
+ /**
360
+ * Mermaid's own `maxTextSize` default, measured against 12.0.0 rather than read from a changelog.
361
+ *
362
+ * Exported as data because the number is the whole finding: 305 nodes (49 620 chars) of the measurement fixture draw
363
+ * fully and 310 (50 445 chars) draw one node. The ceiling is therefore a CHARACTER budget and scales with label
364
+ * length — a workflow with long step names hits it sooner, and Story 8.7's `accDescr`, which lists every node, spends
365
+ * part of the same budget.
366
+ */
367
+ export declare const MERMAID_DEFAULT_MAX_TEXT_SIZE = 50000;
368
+ /** A definition's character cost against a budget. */
369
+ export interface DefinitionBudget {
370
+ readonly characters: number;
371
+ readonly budget: number;
372
+ readonly overBudget: boolean;
64
373
  }
65
374
  /**
66
- * A label, safe inside `["…"]`.
375
+ * What a definition costs, for a caller that wants to REPORT rather than to be refused.
67
376
  *
68
- * ⚠️ Escaping lives HERE, and Story 4.2's review is why it is written down: the frontend port moved escaping out of
69
- * the model layer without recording that it had moved, and **4 real labels carry a raw newline**
70
- * (`ShoplinePublicApp.yaml`). A renderer that forgets breaks a real connector's diagram.
377
+ * The same arithmetic `renderMermaid` applies to `maxTextSize`, exported so a host can warn, offer to raise its own
378
+ * `maxTextSize`, or split a chart — all of which are better answers than an exception, and none of which the generator
379
+ * can choose on a caller's behalf.
380
+ */
381
+ export declare function measureDefinitionBudget(definition: string, budget?: number): DefinitionBudget;
382
+ /**
383
+ * The refusal. Carries the numbers, because "too big" without them tells a host nothing it can act on.
71
384
  *
72
- * The `&` replacement comes FIRST, or the entities the later rules produce would themselves be re-escaped.
385
+ * A throw and not a truncated string: the alternative the measurement documents — hand the host the oversized
386
+ * definition and let Mermaid quietly draw one node — is the exact failure this exists to prevent, and a caller that
387
+ * would rather warn than fail has `measureDefinitionBudget` and simply does not pass `maxTextSize`.
73
388
  */
389
+ export declare class DefinitionOverBudgetError extends Error {
390
+ readonly budgetReport: DefinitionBudget;
391
+ constructor(budgetReport: DefinitionBudget);
392
+ }
393
+ /** A public label escaped as plain text; only structural anatomy can enable Mermaid markdown. */
74
394
  export declare function escapeLabel(value: string): string;
75
395
  /**
76
396
  * The diagram.
77
397
  *
78
398
  * Deterministic for a given `(groups, edges, opts)`: every list is emitted in the order given, duplicates are
79
399
  * collapsed by first appearance, and nothing consults the clock or the environment.
400
+ *
401
+ * The font each host must pin (AD-32(a)): this generator emits no font. A host picks one font string and passes
402
+ * it to mermaid as both `fontFamily` and `themeVariables.fontFamily` (mermaid copies the former into the latter
403
+ * only when the latter is unset), and makes the canvas container's CSS `font-family` resolve to that same string,
404
+ * so the boxes mermaid measures match the text the host paints. Write the string in CSS-canonical form (unquoted
405
+ * family names) so the resolved CSS value is byte-equal to what mermaid received. Known hosts:
406
+ * - dashboard-v2 flow canvas: `Inter, -apple-system, system-ui, sans-serif` (`typography.fontFamily.sans`), set
407
+ * on both mermaid keys and on the render container.
408
+ * - VS Code webview (`src/webview/flowDiagram.ts`): `var(--vscode-font-family)`, which is also the preview body
409
+ * CSS (`previewHtml.ts`).
410
+ * - Report page (`hexasync-template-report-render` `renderHtml.ts`): not pinned yet — it passes no font, so mermaid
411
+ * uses its default while the body paints `-apple-system, Segoe UI, …`.
80
412
  */
81
- export declare function renderMermaid(groups: readonly RenderGroup[], edges: readonly RenderEdge[], opts?: RenderOptions): string;
413
+ export declare function renderMermaid(authoredGroups: readonly RenderGroup[], authoredEdges: readonly RenderEdge[], opts?: RenderOptions): string;
414
+ /** The definition, plus what the expansion learned about it that a host cannot recover from a string. */
415
+ export interface RenderedFlow {
416
+ readonly definition: string;
417
+ /**
418
+ * The addresses of the collapsed-range nodes the definition drew, in drawing order.
419
+ *
420
+ * It has to LEAVE this function or it is not usable: a range is not a step, it has no YAML behind it, and
421
+ * `MermaidDiagramViewer` stamps `role="button"` on everything in `clickableNodeIds` (FR75, UX-DR57). A host that had
422
+ * to re-run the expansion to learn the set would be deriving the drawing twice and could disagree with itself.
423
+ */
424
+ readonly collapsedRanges: readonly string[];
425
+ }
426
+ /** `renderMermaid`, for a caller that also needs the occurrence facts the drawing carries. */
427
+ export declare function renderMermaidWithOccurrences(authoredGroups: readonly RenderGroup[], authoredEdges: readonly RenderEdge[], opts?: RenderOptions): RenderedFlow;
82
428
  /**
83
429
  * A titled section with a fenced diagram, and nothing else (rule 3).
84
430
  *
@@ -1 +1 @@
1
- {"version":3,"file":"flowRender.d.ts","sourceRoot":"","sources":["../src/flowRender.ts"],"names":[],"mappings":"AA2CA,yFAAyF;AACzF,MAAM,WAAW,UAAU;IACzB,wFAAwF;IACxF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CACvC;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,iCAAiC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MA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