agentfootprint 9.78.0 → 9.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/CLAUDE.md +1 -2
  3. package/dist/artifacts/recordingArtifact.js +5 -1
  4. package/dist/artifacts/recordingArtifact.js.map +1 -1
  5. package/dist/core/runbook/index.js +4 -1
  6. package/dist/core/runbook/index.js.map +1 -1
  7. package/dist/core/runbook/recording.js +178 -0
  8. package/dist/core/runbook/recording.js.map +1 -0
  9. package/dist/core/runbook/runbookAsTool.js +79 -5
  10. package/dist/core/runbook/runbookAsTool.js.map +1 -1
  11. package/dist/core/runbook/verdicts.js +24 -2
  12. package/dist/core/runbook/verdicts.js.map +1 -1
  13. package/dist/esm/artifacts/recordingArtifact.d.ts +9 -0
  14. package/dist/esm/artifacts/recordingArtifact.js +5 -1
  15. package/dist/esm/artifacts/recordingArtifact.js.map +1 -1
  16. package/dist/esm/core/runbook/index.d.ts +3 -2
  17. package/dist/esm/core/runbook/index.js +2 -1
  18. package/dist/esm/core/runbook/index.js.map +1 -1
  19. package/dist/esm/core/runbook/recording.d.ts +123 -0
  20. package/dist/esm/core/runbook/recording.js +172 -0
  21. package/dist/esm/core/runbook/recording.js.map +1 -0
  22. package/dist/esm/core/runbook/runbookAsTool.d.ts +12 -1
  23. package/dist/esm/core/runbook/runbookAsTool.js +80 -6
  24. package/dist/esm/core/runbook/runbookAsTool.js.map +1 -1
  25. package/dist/esm/core/runbook/types.d.ts +119 -2
  26. package/dist/esm/core/runbook/verdicts.d.ts +18 -1
  27. package/dist/esm/core/runbook/verdicts.js +23 -1
  28. package/dist/esm/core/runbook/verdicts.js.map +1 -1
  29. package/dist/esm/index.d.ts +1 -1
  30. package/dist/esm/index.js +6 -1
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/index.js +9 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/types/artifacts/recordingArtifact.d.ts +9 -0
  35. package/dist/types/artifacts/recordingArtifact.d.ts.map +1 -1
  36. package/dist/types/core/runbook/index.d.ts +3 -2
  37. package/dist/types/core/runbook/index.d.ts.map +1 -1
  38. package/dist/types/core/runbook/recording.d.ts +124 -0
  39. package/dist/types/core/runbook/recording.d.ts.map +1 -0
  40. package/dist/types/core/runbook/runbookAsTool.d.ts +12 -1
  41. package/dist/types/core/runbook/runbookAsTool.d.ts.map +1 -1
  42. package/dist/types/core/runbook/types.d.ts +119 -2
  43. package/dist/types/core/runbook/types.d.ts.map +1 -1
  44. package/dist/types/core/runbook/verdicts.d.ts +18 -1
  45. package/dist/types/core/runbook/verdicts.d.ts.map +1 -1
  46. package/dist/types/index.d.ts +1 -1
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,147 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [9.80.0] - 2026-08-30
11
+
12
+ ### Added
13
+
14
+ - **`presentation` on `runbookAsTool` — a rowset's surface is a fact about the
15
+ CLIENT, and the caller is the only one who knows it.** Seen in production: a
16
+ triage answer opened with a wall of pipe-delimited rows — the entire verdict
17
+ table retyped into the prose — while those same rows were already on screen
18
+ beside it, ticketed as a dataset with a table view and a chart view. The host
19
+ had a standing rule against exactly that. The library was overruling it.
20
+
21
+ The instruction was ours. Every verdict projection shipped `table`
22
+ pre-rendered with `VERDICT_RENDER_NOTE`: *"table is PRE-RENDERED over the
23
+ same rows as `verdicts` — output it VERBATIM."* That note is RIGHT wherever
24
+ the model's words are the rows' only surface — a chat client, a log line, an
25
+ email — because the alternative there is retyping, and a retyped identifier
26
+ that looks right and matches nothing is the failure the note exists to stop.
27
+ It is WRONG in a client that draws the rowset itself: the retype buys
28
+ nothing, runs the same transcription risk, and lands a second, subtly
29
+ different copy of the table beside the real one.
30
+
31
+ Nothing in a chart, a `resultKind` or a rule set says whether a human will
32
+ read these rows in prose or in a grid — the bridge cannot know which client
33
+ it is in. So the caller says, in one word:
34
+
35
+ ```ts
36
+ runbookAsTool({ /* … */ presentation: 'panel' }); // default: 'prose'
37
+ ```
38
+
39
+ - **`'prose'` (the default)** — today's envelope, key for key: `table`
40
+ pre-rendered over the shown rows, `render_note` = `VERDICT_RENDER_NOTE`.
41
+ Every existing consumer is byte-identical, pinned by a test that asserts
42
+ the whole `result` key list in order.
43
+ - **`'panel'`** — the host renders the rowset, so the envelope omits `table`
44
+ ENTIRELY (the key, not an empty string), and `render_note` becomes the new
45
+ exported `PANEL_RENDER_NOTE`, which states the opposite law: the rows are
46
+ already on the reader's screen; do not reproduce them in prose in any form
47
+ — not as a table, not as bullets, not as one sentence per row; when a
48
+ finding names a row, quote the evidence sentence that row carries VERBATIM,
49
+ and cite only the values the finding rests on, copied byte-for-byte.
50
+
51
+ `verdicts`, `rows_shown`, `rows_total`, `rows_complete` and
52
+ `verdict_meanings` are identical across both modes for the same run — the
53
+ dial names who RENDERS the rows, never which rows there are. `table` stays
54
+ RESERVED in both modes, so a chart's `report` cannot put a table back into a
55
+ panel answer: the mode's promise outranks the freed name. An unknown value
56
+ THROWS at definition instead of falling back to `'prose'` — a mis-spelled
57
+ dial that silently keeps working is a dial you cannot trust to have been set.
58
+
59
+ **The ceiling, stated:** this changes what the envelope SHIPS, never what the
60
+ model does with it. A note is an instruction, not an enforcement —
61
+ `presentation: 'panel'` takes away the table the model was told to output; it
62
+ cannot stop a model that decides to retype rows anyway. And it is silent
63
+ about every other part of the answer: coverage, provenance, rule version and
64
+ the walk are untouched in both modes.
65
+
66
+ New exports beside `VERDICT_RENDER_NOTE`: **`PANEL_RENDER_NOTE`** and the
67
+ **`RunbookPresentation`** (`'prose' | 'panel'`) type. Worked example:
68
+ `examples/features/68-runbook-as-tool.ts` now registers the same procedure
69
+ twice, one dial apart, and prints both surfaces. Docs: "Who renders the
70
+ rowset" in `docs-next/content/docs/build/runbook-as-tool.mdx`.
71
+
72
+ ## [9.79.0] - 2026-08-30
73
+
74
+ ### Added
75
+
76
+ - **`walk: { recording }` — file the runbook's inner chart as a recording, so
77
+ the walk can actually be DRAWN.** A consumer wired the flow components of
78
+ the lens family to a runbook's answer and could not mount anything, and they
79
+ were right not to try. `runbookAsTool` files its walk as
80
+ `recording/chart-walk`, whose payload is a **row projection** — 129 rows of
81
+ `{step, type, depth, stage, stage_id, runtime_stage_id, subflow, text}`. A
82
+ step graph cannot be inferred from sentences about steps; a consumer handed
83
+ those rows can only correctly REFUSE to guess at the edges. The one piece
84
+ that makes a walk drawable is `structure`, the chart's build-time graph —
85
+ which a finished run does not leave behind and no snapshot carries.
86
+
87
+ Everything needed was already in the file, a few lines apart: the bridge
88
+ builds a fresh inner executor and ATTACHES RECORDERS (the run was recorded,
89
+ it simply was not filed), `recordingPutInput` was already the mint for the
90
+ agent's own run, `mintWalk` was already the guarded side effect that files
91
+ and never fails the answer, and `WalkDescriptor` was already where the spine
92
+ states what it filed. This connects them.
93
+
94
+ Declare `walk: { recording: true }` (or `{ label, maxBytes }`) and the inner
95
+ chart's own **`{ snapshot, events, structure }`** — the `recordRun` contract
96
+ exactly, the shape `observeRecording()` mounts — is filed under the existing
97
+ kind `recording/run`, and its ref rides the SAME spine descriptor as
98
+ `result.walk.recording_ref` beside `recording_kind`, `recording_bytes` and
99
+ `recording_note`. The wire ops that already redeem the walk redeem this with
100
+ **zero new operations**.
101
+
102
+ **OPT-IN, and that is the honest default.** A walk carries *sentences about*
103
+ what happened and no payload from it — values are off by construction
104
+ (`narrative({ includeValues: false })`). A recording is the run: shared
105
+ state, the whole commit log, every attached recorder's data — **whatever the
106
+ chart wrote**. Filing one is a materially bigger promise, so it is declared,
107
+ never begun on an operator's behalf. Unset, nothing extra runs — no second
108
+ snapshot, no bytes measured, no store call — and the envelope is
109
+ byte-identical to 9.78.0, pinned by a test that asserts no `recording_*` key
110
+ exists at all. A reader who never asked for a recording does not even get a
111
+ sentence explaining its absence.
112
+
113
+ **Redaction means the same for both artifacts.** The recording's snapshot is
114
+ read from the REDACTED MIRROR (`getSnapshot({ redact: true })`), never the
115
+ raw working memory — so the `redact` policy that scrubs the walk scrubs the
116
+ recording by the same rule at the same moment, and a redacted key travels as
117
+ `REDACTED` rather than vanishing (a reader sees that a value existed and was
118
+ scrubbed). With no policy configured the flag is a documented no-op.
119
+
120
+ **Size has a declared failure mode, and it is a refusal.** Over
121
+ `walk.recording.maxBytes` (default `DEFAULT_RECORDING_MAX_BYTES` =
122
+ 5,000,000 — a walk is tens of KB, this package's own measured `recordRun`
123
+ bundle was 2.76 MB, a fleet sweep is unbounded) the recording is **not filed
124
+ and not truncated**, and `recording_note` names what it measured, the
125
+ ceiling it broke, and the option that raises it. The asymmetry with the
126
+ walk's row cap is the point: walk rows are independently meaningful so a
127
+ projection of them is still true, but `{ snapshot, events, structure }` is
128
+ one bundle — half a commit log under a whole chart draws a picture nobody
129
+ can check.
130
+
131
+ **The absence is always SPOKEN.** No store, an over-size refusal, an
132
+ unserializable snapshot, a store that threw — each costs the REF and lands a
133
+ named reason in `recording_note`, following `mintWalk`'s own law. A missing
134
+ ref with no sentence would leave a reader guessing, which is the one thing
135
+ the spine exists to prevent.
136
+
137
+ **`events` is empty by construction, and says so.** It is the typed
138
+ *agentfootprint* stream, fired by an agent turn; what ran here is a
139
+ footprintjs chart on its own executor, which fires none. All three keys are
140
+ present (that is what a viewer reads), the empty array is the honest count,
141
+ and the note states it so nobody reads it as a dropped stream — the walk's
142
+ own story rides `snapshot`, where the narrative recorder's data already
143
+ lives.
144
+
145
+ - **`recordingPutInput` accepts `toolCallId`** — stamped on `origin.toolCallId`
146
+ the way `chartWalkPutInput` already did. A walk and the recording it projects
147
+ are two views of ONE tool call, so they carry the same join key, and either
148
+ joins back to the call the model made. Absent for an agent's own run
149
+ recording, which is a whole turn and belongs to no single call.
150
+
10
151
  ## [9.78.0] - 2026-08-30
11
152
 
12
153
  ### Added
package/CLAUDE.md CHANGED
@@ -17,8 +17,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
17
17
 
18
18
  | If you are about to build… | It is | Where | Since |
19
19
  |---|---|---|---|
20
- | turning a written operational procedure (a runbook, a triage playbook) into ONE agent tool whose every answer is EVIDENCE — coverage folded up from the inner tools it calls, rule name+version, verdict rows with GENERATED meanings, and the recorded walk as an artifact ticket, never bytes | `runbookAsTool` — dials: `procedure` (factory, invoked per call with `ctx.tools`) + `resultKind` (`'verdict/*'` arms the rowset projection; anything else ships spine + the chart's `report`) + `rules {name, version}` (default absent ⇒ `rule_version: 'undeclared'`) + `verdicts {decider, maxRows}` (default 50) + `walk {cap}` (default 500; over-cap ⇒ control-flow projection, declared) + `composedOf` (drift-checked at agent BUILD) + kept `recorders`/`keepRecord`/`keepRecordLimit`/`redact`; reserved state keys `verdicts`/`coverage`/`report` (the `report` bag lands BESIDE the spine, never over it — a report field spelling `af_coverage`/`af_provenance`/`rule_version`/`walk`/`report_note` or a live projection key is discarded and NAMED in `result.report_note`; precedence is explicit in `report.ts`, never spread order); inner `absent()` passes through VERBATIM unless the call said `allowAbsent`; walk kind `recording/chart-walk` + `walk_segment` discriminant | `src/core/runbook/` | 9.76.0 |
21
- | calling ANOTHER registered tool from inside a tool's `execute` — composition over the agent's own dispatch map instead of importing the module and building a second query stack | `agentToolDispatch` + `ctx.tools` (ToolDispatch has/call) — sees static and skill-carried tools, NEVER ToolProvider-delivered ones (no build-time list, the 9.72.0 caveat); inner calls get the outer facts with hasArtifacts false and a derived toolCallId, `needs` resolved fail-closed non-interactively, `checkIn` and `wants` tools refused by name, no nested dispatch; declare ingredients via `composedOf` (and `gates` for a pausing procedure) — both travel MCP `_meta` | `src/core/agent/toolDispatch.ts` | 9.76.0 |
20
+ | turning a written operational procedure (a runbook, a triage playbook) into ONE agent tool whose every answer is EVIDENCE — coverage folded up from the inner tools it calls, rule name+version, verdict rows with GENERATED meanings, and the recorded walk as an artifact ticket, never bytes | `runbookAsTool` — dials: `procedure` (factory, invoked per call with `ctx.tools`) + `resultKind` (`'verdict/*'` arms the rowset projection; anything else ships spine + the chart's `report`) + `rules {name, version}` (default absent ⇒ `rule_version: 'undeclared'`) + `verdicts {decider, maxRows}` (default 50) + `presentation` (`'prose'` default = ship `table` + `VERDICT_RENDER_NOTE` "output it VERBATIM"; `'panel'` = the HOST renders the rowset, so NO `table` key at all + `PANEL_RENDER_NOTE` "the rows are already on the reader's screen — do not reproduce them"; the rowset half is byte-identical across modes, `table` stays RESERVED in both, an unknown value THROWS at definition) + `walk {cap, recording}` (cap default 500; over-cap ⇒ control-flow projection, declared · `recording: true` or `{label, maxBytes}`, default OFF — ALSO files the inner chart's own `{snapshot, events, structure}` under `recording/run` and puts its ref on the spine as `walk.recording_ref`, because the ROW projection cannot be drawn; snapshot read from the REDACTED mirror so one `redact` means the same for both; over `maxBytes` (`DEFAULT_RECORDING_MAX_BYTES` = 5,000,000) it is REFUSED not truncated; every absence — no store / over size / unserializable / store threw — is STATED in `walk.recording_note`, and the four `recording_*` fields are absent entirely when the dial is off) + `composedOf` (drift-checked at agent BUILD) + kept `recorders`/`keepRecord`/`keepRecordLimit`/`redact`; reserved state keys `verdicts`/`coverage`/`report` (the `report` bag lands BESIDE the spine, never over it — a report field spelling `af_coverage`/`af_provenance`/`rule_version`/`walk`/`report_note` or a live projection key is discarded and NAMED in `result.report_note`; precedence is explicit in `report.ts`, never spread order); inner `absent()` passes through VERBATIM unless the call said `allowAbsent`; walk kind `recording/chart-walk` + `walk_segment` discriminant | `src/core/runbook/` | 9.76.0, recording 9.79.0 |
22
21
  | a tool returning numbers WITH the caveats that make them honest — interval/aggregation grain, is-it-a-counter, when the world was measured, which ground was NOT covered — as typed data the model reads compactly and the record keeps whole | `semantic()` + `tools.semantics_declared` (model sees `semanticsForModel` projection; `coverage` field absorbed by the coverage()/absent() channel) | `src/lib/semantics/` | 9.53.0 |
23
22
  | a build gate that refuses a triage/inventory tool that forgot its caveats, by tool name and field name | `checkSemantics` + `defineTool({ resultClass })` (`'triage'`/`'inventory'`, the closed set) + bin `agentfootprint-check-semantics` | `src/lib/semantics/check.ts` | 9.53.0 |
24
23
  | an agent that runs out of `maxIterations` mid-task handing back a HALF-SENTENCE as its answer — and nothing saying the budget ran out | `wrapUpAtMaxIterations` (default ON) + `WRAP_UP_INSTRUCTION` + `agent.budget_exhausted` + `stoppedEarly.wrappedUp` | `src/core/agent/stages/wrapUp.ts` | 9.56.0 |
@@ -84,12 +84,16 @@ function recordingPutInput(recording, facts = {}) {
84
84
  if (text === '') {
85
85
  throw new UnserializableRecordingError('it serializes to nothing');
86
86
  }
87
+ const origin = {
88
+ ...(facts.runId !== undefined && { runId: facts.runId }),
89
+ ...(facts.toolCallId !== undefined && { toolCallId: facts.toolCallId }),
90
+ };
87
91
  return {
88
92
  kind: exports.RECORDING_ARTIFACT_KIND,
89
93
  mediaType: exports.RECORDING_MEDIA_TYPE,
90
94
  data: text,
91
95
  label: facts.label ?? (facts.runId !== undefined ? `run ${facts.runId}` : 'run recording'),
92
- ...(facts.runId !== undefined && { origin: { runId: facts.runId } }),
96
+ ...(Object.keys(origin).length > 0 && { origin }),
93
97
  };
94
98
  }
95
99
  exports.recordingPutInput = recordingPutInput;
@@ -1 +1 @@
1
- {"version":3,"file":"recordingArtifact.js","sourceRoot":"","sources":["../../src/artifacts/recordingArtifact.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;;AAIH;oEACoE;AACvD,QAAA,uBAAuB,GAAG,eAAe,CAAC;AAEvD;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,iDAAiD;AACpC,QAAA,oBAAoB,GAAG,kBAAkB,CAAC;AAoBvD;;;;;GAKG;AACH,MAAa,4BAA6B,SAAQ,KAAK;IAC5C,IAAI,GAAG,8BAAuC,CAAC;IAExD,YAAY,MAAc;QACxB,KAAK,CACH,0DAA0D,MAAM,mBAAmB;YACjF,kFAAkF;YAClF,oFAAoF;YACpF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AACJ,CAAC;AAxBD,8CAwBC"}
@@ -4,7 +4,7 @@
4
4
  * tool with the mandatory honesty spine. See README.md in this folder.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.projectWalk = exports.DEFAULT_WALK_CAP = exports.verdictRowsOf = exports.VERDICT_RENDER_NOTE = exports.renderVerdictTable = exports.DEFAULT_MAX_ROWS = exports.DECLINED_VERDICT = exports.RunbookAbsenceSignal = exports.recordingDispatch = exports.probeDispatch = exports.absenceSignalOf = exports.runbookAsTool = void 0;
7
+ exports.DEFAULT_RECORDING_MAX_BYTES = exports.projectWalk = exports.DEFAULT_WALK_CAP = exports.verdictRowsOf = exports.VERDICT_RENDER_NOTE = exports.renderVerdictTable = exports.PANEL_RENDER_NOTE = exports.DEFAULT_MAX_ROWS = exports.DECLINED_VERDICT = exports.RunbookAbsenceSignal = exports.recordingDispatch = exports.probeDispatch = exports.absenceSignalOf = exports.runbookAsTool = void 0;
8
8
  var runbookAsTool_js_1 = require("./runbookAsTool.js");
9
9
  Object.defineProperty(exports, "runbookAsTool", { enumerable: true, get: function () { return runbookAsTool_js_1.runbookAsTool; } });
10
10
  var dispatch_js_1 = require("./dispatch.js");
@@ -15,10 +15,13 @@ Object.defineProperty(exports, "RunbookAbsenceSignal", { enumerable: true, get:
15
15
  var verdicts_js_1 = require("./verdicts.js");
16
16
  Object.defineProperty(exports, "DECLINED_VERDICT", { enumerable: true, get: function () { return verdicts_js_1.DECLINED_VERDICT; } });
17
17
  Object.defineProperty(exports, "DEFAULT_MAX_ROWS", { enumerable: true, get: function () { return verdicts_js_1.DEFAULT_MAX_ROWS; } });
18
+ Object.defineProperty(exports, "PANEL_RENDER_NOTE", { enumerable: true, get: function () { return verdicts_js_1.PANEL_RENDER_NOTE; } });
18
19
  Object.defineProperty(exports, "renderVerdictTable", { enumerable: true, get: function () { return verdicts_js_1.renderVerdictTable; } });
19
20
  Object.defineProperty(exports, "VERDICT_RENDER_NOTE", { enumerable: true, get: function () { return verdicts_js_1.VERDICT_RENDER_NOTE; } });
20
21
  Object.defineProperty(exports, "verdictRowsOf", { enumerable: true, get: function () { return verdicts_js_1.verdictRowsOf; } });
21
22
  var walk_js_1 = require("./walk.js");
22
23
  Object.defineProperty(exports, "DEFAULT_WALK_CAP", { enumerable: true, get: function () { return walk_js_1.DEFAULT_WALK_CAP; } });
23
24
  Object.defineProperty(exports, "projectWalk", { enumerable: true, get: function () { return walk_js_1.projectWalk; } });
25
+ var recording_js_1 = require("./recording.js");
26
+ Object.defineProperty(exports, "DEFAULT_RECORDING_MAX_BYTES", { enumerable: true, get: function () { return recording_js_1.DEFAULT_RECORDING_MAX_BYTES; } });
24
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/runbook/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,6CAOuB;AANrB,8GAAA,eAAe,OAAA;AACf,4GAAA,aAAa,OAAA;AACb,gHAAA,iBAAiB,OAAA;AACjB,mHAAA,oBAAoB,OAAA;AAItB,6CAMuB;AALrB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,iHAAA,kBAAkB,OAAA;AAClB,kHAAA,mBAAmB,OAAA;AACnB,4GAAA,aAAa,OAAA;AAEf,qCAA4F;AAAnF,2GAAA,gBAAgB,OAAA;AAAE,sGAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/runbook/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,6CAOuB;AANrB,8GAAA,eAAe,OAAA;AACf,4GAAA,aAAa,OAAA;AACb,gHAAA,iBAAiB,OAAA;AACjB,mHAAA,oBAAoB,OAAA;AAItB,6CAOuB;AANrB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,gHAAA,iBAAiB,OAAA;AACjB,iHAAA,kBAAkB,OAAA;AAClB,kHAAA,mBAAmB,OAAA;AACnB,4GAAA,aAAa,OAAA;AAEf,qCAA4F;AAAnF,2GAAA,gBAAgB,OAAA;AAAE,sGAAA,WAAW,OAAA;AACtC,+CAA6D;AAApD,2HAAA,2BAA2B,OAAA"}
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ /**
3
+ * runbook/recording — the inner chart's own recording, filed beside the walk.
4
+ *
5
+ * Pattern: one pure assembler (`chartRecordingOf`) + one guarded side effect
6
+ * (`mintChartRecording`, which files the artifact and NEVER fails the
7
+ * answer) — `walk.ts`'s shape, deliberately, because it is the same
8
+ * law about a different payload.
9
+ * Role: core/runbook. Opt-in via `walk: { recording }`.
10
+ * Emits: nothing (the artifact capability emits its own `artifacts.*`).
11
+ *
12
+ * WHY THIS EXISTS AT ALL
13
+ * ──────────────────────
14
+ * The walk is a ROW PROJECTION — eight declared columns per execution step,
15
+ * values off by construction. It is the right thing to hand a model and the
16
+ * wrong thing to hand a renderer: a step graph cannot be inferred from
17
+ * sentences about steps, and a consumer that tried would be guessing at edges.
18
+ * The one piece that makes a walk drawable is `structure`, the chart's
19
+ * build-time graph, which a finished run does not leave behind and no snapshot
20
+ * carries. That is the whole gap this closes, and it closes it with the shape
21
+ * the viewer side has consumed since 8.x: `{ snapshot, events, structure }`.
22
+ *
23
+ * THREE LAWS, and each one is a refusal somewhere
24
+ * ───────────────────────────────────────────────
25
+ * REDACTED AT THE SOURCE. The snapshot comes from `getSnapshot({ redact:
26
+ * true })` — the parallel redacted mirror — never the raw working memory.
27
+ * Whatever `redact` means for the walk means the same here, because it is
28
+ * the same policy read at the same moment; with no policy configured the
29
+ * flag is a documented no-op and costs nothing.
30
+ * REFUSED, NEVER TRUNCATED. Over the byte ceiling the mint does not happen
31
+ * and the descriptor says so with both numbers. A walk can be projected
32
+ * because its rows are independently meaningful; a recording is one
33
+ * bundle, and half of one draws a picture nobody can check.
34
+ * THE ABSENCE IS SPOKEN. No store, an over-size refusal, an unserializable
35
+ * snapshot, a store that 500s — every one of them costs the REF and
36
+ * returns a `recording_note` naming the reason. A failed mint has never
37
+ * been allowed to cost the answer, and this is not the feature that
38
+ * changes that.
39
+ *
40
+ * `events` IS EMPTY, BY CONSTRUCTION AND ON PURPOSE
41
+ * ────────────────────────────────────────────────
42
+ * `events` is the typed *agentfootprint* stream, and it is fired by an Agent
43
+ * turn. What ran here is a footprintjs chart on its own executor: it fires no
44
+ * agentfootprint events, so there are none to record and an empty array is the
45
+ * honest count rather than a shortfall. The three keys are all present, which
46
+ * is what `observeRecording()` reads; the walk's own story rides `snapshot`,
47
+ * where the narrative recorder's data already lives. The note says this out
48
+ * loud so nobody reads the empty array as a dropped stream.
49
+ */
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.mintChartRecording = exports.chartRecordingOf = exports.resolveRecordingPolicy = exports.DEFAULT_RECORDING_MAX_BYTES = void 0;
52
+ const recordingArtifact_js_1 = require("../../artifacts/recordingArtifact.js");
53
+ const payload_js_1 = require("../../artifacts/payload.js");
54
+ /**
55
+ * The default size ceiling for a filed chart recording — 5,000,000 bytes.
56
+ *
57
+ * Chosen against measured sizes rather than taste. A walk of a real triage run
58
+ * is tens of kilobytes; this package's own field measurement of a full
59
+ * `recordRun` bundle (one retrieval turn, vectors included) was 2.76 MB. Five
60
+ * million bytes clears the realistic runbook by more than an order of
61
+ * magnitude and still refuses the pathological one — a fleet sweep whose
62
+ * commit log carries a row per subject per stage — BEFORE it lands in somebody
63
+ * else's store under a retention budget they sized for tickets.
64
+ *
65
+ * It is a declared number, not a magic one: it is named on the option, printed
66
+ * in the refusal, and raised by whoever decides the whole bundle is worth it.
67
+ */
68
+ exports.DEFAULT_RECORDING_MAX_BYTES = 5_000_000;
69
+ /**
70
+ * Normalize `walk: { recording }` into a policy, or `undefined` for OFF.
71
+ *
72
+ * `undefined` and `false` are both off, and off means off: the caller must not
73
+ * take a second snapshot, measure anything, or touch the store.
74
+ */
75
+ function resolveRecordingPolicy(recording) {
76
+ if (recording === undefined || recording === false)
77
+ return undefined;
78
+ if (recording === true)
79
+ return { maxBytes: exports.DEFAULT_RECORDING_MAX_BYTES };
80
+ return {
81
+ maxBytes: recording.maxBytes ?? exports.DEFAULT_RECORDING_MAX_BYTES,
82
+ ...(recording.label !== undefined && { label: recording.label }),
83
+ };
84
+ }
85
+ exports.resolveRecordingPolicy = resolveRecordingPolicy;
86
+ /**
87
+ * Assemble the `{ snapshot, events, structure }` bundle for one inner chart
88
+ * run. Pure — no store, no clock, no events.
89
+ *
90
+ * @param redactedSnapshot the run snapshot read from the REDACTED mirror
91
+ * (`executor.getSnapshot({ redact: true })`). Taking the raw one here would
92
+ * file whatever the chart wrote under a policy that was supposed to scrub
93
+ * it, which is the one mistake this whole module is arranged to prevent.
94
+ * @param structure the chart's `buildTimeStructure` — the only route to a
95
+ * drawable graph, and the reason this bundle beats the row projection.
96
+ */
97
+ function chartRecordingOf(redactedSnapshot, structure) {
98
+ return { snapshot: redactedSnapshot, events: [], structure };
99
+ }
100
+ exports.chartRecordingOf = chartRecordingOf;
101
+ /** The standing sentence: what a FILED recording contains that the walk's row
102
+ * projection does not. This is the sentence that justifies the opt-in. */
103
+ const RECORDING_NOTE = "The inner chart's own recording — `{ snapshot, events, structure }`, the shape a viewer " +
104
+ 'mounts — so this walk can be drawn as the flowchart it actually ran. It carries what the ' +
105
+ 'row projection cannot: the chart STRUCTURE (the only route to a drawable graph; a finished ' +
106
+ "run does not leave it behind), the run's shared state, its whole commit log, and every " +
107
+ "attached recorder's data — that is, whatever the chart WROTE, scrubbed by this call's " +
108
+ '`redact` policy and by nothing else. `events` is empty by construction: a chart run is not ' +
109
+ 'an agent turn and fires no agentfootprint events, so there are none to record.';
110
+ /**
111
+ * File the inner chart's recording and describe what happened.
112
+ *
113
+ * Called ONLY when `walk: { recording }` asked for one, and it never throws:
114
+ * every failure lands in `recording_note` and the answer travels unchanged.
115
+ */
116
+ async function mintChartRecording(ctx, recording, facts) {
117
+ if (!ctx.hasArtifacts) {
118
+ return {
119
+ recording_note: RECORDING_NOTE +
120
+ ' No artifact store is attached to this run, so the recording was assembled but not ' +
121
+ 'filed — attach one with `Agent.create({ ..., artifacts })` to get a ref here.',
122
+ };
123
+ }
124
+ // Serialize FIRST, then measure, then put: the mint is where an
125
+ // unserializable snapshot must fail (the `recordingPutInput` law), and the
126
+ // ceiling is judged on the bytes that would actually be stored rather than
127
+ // on a guess about them.
128
+ let input;
129
+ try {
130
+ input = (0, recordingArtifact_js_1.recordingPutInput)(recording, {
131
+ toolCallId: facts.toolCallId,
132
+ ...(facts.runId !== undefined && { runId: facts.runId }),
133
+ ...(facts.policy.label !== undefined
134
+ ? { label: facts.policy.label }
135
+ : { label: `${facts.toolName} recording` }),
136
+ });
137
+ }
138
+ catch (err) {
139
+ return {
140
+ recording_note: RECORDING_NOTE +
141
+ ` This one could not be serialized (${err instanceof Error ? err.message : String(err)}), ` +
142
+ 'so it was not filed — a recording JSON cannot carry could not cross any wire either. ' +
143
+ 'The failure cost the ref, never the answer.',
144
+ };
145
+ }
146
+ const bytes = (0, payload_js_1.measureArtifactBytes)(input.data);
147
+ if (bytes > facts.policy.maxBytes) {
148
+ return {
149
+ recording_bytes: bytes,
150
+ recording_note: RECORDING_NOTE +
151
+ ` This one measured ${bytes} bytes, over the declared \`walk.recording.maxBytes\` ` +
152
+ `ceiling of ${facts.policy.maxBytes}, so it was NOT filed. It is refused rather than ` +
153
+ 'truncated on purpose: the walk can be projected because its rows are independently ' +
154
+ 'meaningful, but a recording is one bundle — half a commit log under a whole chart ' +
155
+ 'draws a picture nobody can check. Raise `walk.recording.maxBytes` if the whole thing ' +
156
+ 'is what you need. The walk above is unaffected.',
157
+ };
158
+ }
159
+ try {
160
+ const meta = await ctx.artifacts.put(input);
161
+ return {
162
+ recording_ref: meta.ref,
163
+ recording_kind: recordingArtifact_js_1.RECORDING_ARTIFACT_KIND,
164
+ recording_bytes: meta.bytes,
165
+ recording_note: RECORDING_NOTE,
166
+ };
167
+ }
168
+ catch (err) {
169
+ return {
170
+ recording_bytes: bytes,
171
+ recording_note: RECORDING_NOTE +
172
+ ` This one could not be filed (${err instanceof Error ? err.message : String(err)}) — ` +
173
+ 'the mint failure cost the ref, never the answer.',
174
+ };
175
+ }
176
+ }
177
+ exports.mintChartRecording = mintChartRecording;
178
+ //# sourceMappingURL=recording.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording.js","sourceRoot":"","sources":["../../../src/core/runbook/recording.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;;;AAGH,+EAAkG;AAClG,2DAAkE;AAGlE;;;;;;;;;;;;;GAaG;AACU,QAAA,2BAA2B,GAAG,SAAS,CAAC;AAkCrD;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,SAAwF;IAExF,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IACrE,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,EAAE,QAAQ,EAAE,mCAA2B,EAAE,CAAC;IACzE,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,mCAA2B;QAC3D,GAAG,CAAC,SAAS,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;KACjE,CAAC;AACJ,CAAC;AATD,wDASC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,gBAAgB,CAAC,gBAAyB,EAAE,SAAkB;IAC5E,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;AAC/D,CAAC;AAFD,4CAEC;AAED;2EAC2E;AAC3E,MAAM,cAAc,GAClB,0FAA0F;IAC1F,2FAA2F;IAC3F,6FAA6F;IAC7F,yFAAyF;IACzF,w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gBACd,sBAAsB,KAAK,wDAAwD;gBACnF,cAAc,KAAK,CAAC,MAAM,CAAC,QAAQ,mDAAmD;gBACtF,qFAAqF;gBACrF,oFAAoF;gBACpF,uFAAuF;gBACvF,iDAAiD;SACpD,CAAC;IACJ,CAAC;IAED,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,OAAO;YACL,aAAa,EAAE,IAAI,CAAC,GAAG;YACvB,cAAc,EAAE,8CAAuB;YACvC,eAAe,EAAE,IAAI,CAAC,KAAK;YAC3B,cAAc,EAAE,cAAc;SAC/B,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,eAAe,EAAE,KAAK;YACtB,cAAc,EACZ,cAAc;gBACd,iCAAiC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM;gBACvF,kDAAkD;SACrD,CAAC;IACJ,CAAC;AACH,CAAC;AAvED,gDAuEC"}
@@ -20,7 +20,11 @@
20
20
  * - `result.walk` — the recorded walk's descriptor. The walk itself
21
21
  * ships as an artifact ticket (kind `recording/chart-walk`), never as
22
22
  * bytes; when it does not fit, the CONTROL FLOW survives and the
23
- * projection is declared.
23
+ * projection is declared. Opt into `walk: { recording: true }` and the
24
+ * inner chart's own `{ snapshot, events, structure }` is filed beside
25
+ * it (kind `recording/run`) and its ref rides the SAME descriptor as
26
+ * `walk.recording_ref` — the row projection cannot be drawn, and this
27
+ * is what makes the walk mountable as the flowchart it ran.
24
28
  *
25
29
  * THE OPTIONAL PROJECTION (selected by `resultKind: 'verdict/*'`):
26
30
  * verdict rows off the chart's `verdicts` state key, capped with
@@ -28,6 +32,13 @@
28
32
  * `verdict_meanings` GENERATED from the decider's declared branches +
29
33
  * the rule labels this run's decide() evidence carried.
30
34
  *
35
+ * WHO RENDERS THE ROWSET (`presentation`, default `'prose'`): the bridge
36
+ * cannot see which client it is in, so the caller says. Under `'prose'`
37
+ * the model's words are the rowset's only surface — the table ships
38
+ * pre-rendered and is output verbatim. Under `'panel'` the host draws
39
+ * the rowset itself — no table ships, and the note says not to
40
+ * reproduce rows the reader is already looking at.
41
+ *
31
42
  * THREE OUTCOMES, honestly: a clean envelope; an inner ABSENCE passed
32
43
  * through verbatim (the framework still reads it as an absence); and
33
44
  * DECLINED rows counted into the ledger as not-checked ground.
@@ -88,6 +99,7 @@ const innerRunRecords_js_1 = require("../../lib/trace-toolpack/innerRunRecords.j
88
99
  const tools_js_1 = require("../tools.js");
89
100
  const coverage_js_1 = require("./coverage.js");
90
101
  const dispatch_js_1 = require("./dispatch.js");
102
+ const recording_js_1 = require("./recording.js");
91
103
  const report_js_1 = require("./report.js");
92
104
  const verdicts_js_1 = require("./verdicts.js");
93
105
  const walk_js_1 = require("./walk.js");
@@ -95,6 +107,17 @@ const walk_js_1 = require("./walk.js");
95
107
  * the rowset projection; every other kind ships the spine plus the chart's
96
108
  * own `report`. */
97
109
  const VERDICT_KIND_PREFIX = 'verdict/';
110
+ /** The presentations, as the dial spells them. */
111
+ const PRESENTATIONS = ['prose', 'panel'];
112
+ /**
113
+ * The projection's RESERVED VOCABULARY: the keys this run assembled, plus
114
+ * `table` — which `presentation: 'panel'` deliberately omits so that no table
115
+ * reaches the model at all. A `report` field spelling the freed name would put
116
+ * one straight back, so the mode's promise outranks the vacancy.
117
+ */
118
+ function reservedProjectionNames(projection) {
119
+ return projection === undefined ? [] : [...Object.keys(projection), 'table'];
120
+ }
98
121
  function bagOf(value) {
99
122
  return value !== null && typeof value === 'object' && !Array.isArray(value)
100
123
  ? value
@@ -152,10 +175,32 @@ function runbookAsTool(opts) {
152
175
  `${String(maxRows)}.`);
153
176
  }
154
177
  }
178
+ if (opts.presentation !== undefined && !PRESENTATIONS.includes(opts.presentation)) {
179
+ throw new Error(`${label}: \`presentation\` names WHO renders the rowset — 'prose' (the default: the ` +
180
+ `model's prose is the rowset's only surface, so the pre-rendered table ships and is ` +
181
+ `output verbatim) or 'panel' (the host draws the rowset, so no table ships). Got ` +
182
+ `${JSON.stringify(opts.presentation)}.`);
183
+ }
155
184
  const cap = opts.walk?.cap;
156
185
  if (cap !== undefined && (!Number.isInteger(cap) || cap < 1)) {
157
186
  throw new Error(`${label}: \`walk.cap\` must be a whole number of rows, at least 1 — got ${String(cap)}.`);
158
187
  }
188
+ const recordingOpt = opts.walk?.recording;
189
+ if (recordingOpt !== undefined &&
190
+ typeof recordingOpt !== 'boolean' &&
191
+ (recordingOpt === null || typeof recordingOpt !== 'object' || Array.isArray(recordingOpt))) {
192
+ throw new Error(`${label}: \`walk.recording\` must be \`true\` (file the inner chart's recording with ` +
193
+ `the defaults), \`false\`/absent (do not file one), or an options bag ` +
194
+ `\`{ label?, maxBytes? }\` — got ${JSON.stringify(recordingOpt)}.`);
195
+ }
196
+ if (typeof recordingOpt === 'object' && recordingOpt !== null) {
197
+ const maxBytes = recordingOpt.maxBytes;
198
+ if (maxBytes !== undefined && (!Number.isInteger(maxBytes) || maxBytes < 1)) {
199
+ throw new Error(`${label}: \`walk.recording.maxBytes\` must be a whole number of bytes, at least 1 — ` +
200
+ `got ${String(maxBytes)}. It is the declared ceiling a recording is REFUSED over, ` +
201
+ `never truncated to.`);
202
+ }
203
+ }
159
204
  if (opts.keepRecordLimit !== undefined) {
160
205
  if (opts.keepRecord !== true) {
161
206
  throw new Error(`${label}: \`keepRecordLimit\` caps records that are never kept — add ` +
@@ -184,8 +229,14 @@ function runbookAsTool(opts) {
184
229
  }
185
230
  const inputSchema = opts.inputSchema ?? liftInputSchema(probeChart);
186
231
  const isVerdictKind = opts.resultKind?.startsWith(VERDICT_KIND_PREFIX) === true;
232
+ const rendersItsOwnRows = opts.presentation === 'panel';
187
233
  const maxRows = opts.verdicts?.maxRows ?? verdicts_js_1.DEFAULT_MAX_ROWS;
188
234
  const walkCap = opts.walk?.cap ?? walk_js_1.DEFAULT_WALK_CAP;
235
+ // Resolved ONCE at definition. `undefined` is the whole off-switch: every
236
+ // line the recording feature adds sits behind this being defined, so an
237
+ // undeclared runbook takes no second snapshot, measures no bytes, and makes
238
+ // no store call — its envelope is byte-identical to 9.78.0.
239
+ const recordingPolicy = (0, recording_js_1.resolveRecordingPolicy)(recordingOpt);
189
240
  const store = opts.keepRecord === true
190
241
  ? (0, innerRunRecords_js_1.innerRunStore)(opts.keepRecordLimit ?? innerRunRecords_js_1.DEFAULT_INNER_RUN_LIMIT)
191
242
  : undefined;
@@ -293,12 +344,29 @@ function runbookAsTool(opts) {
293
344
  // ── The walk ────────────────────────────────────────────────────────
294
345
  const entries = walkRecorder.getEntries();
295
346
  const projected = (0, walk_js_1.projectWalk)(entries, walkCap);
296
- const walk = await (0, walk_js_1.mintWalk)(ctx, projected, {
347
+ const walkOnly = await (0, walk_js_1.mintWalk)(ctx, projected, {
297
348
  toolName: opts.name,
298
349
  toolCallId: ctx.toolCallId,
299
350
  ...(ctx.runId !== undefined && { runId: ctx.runId }),
300
351
  stepsExecuted: walkRecorder.stepCount,
301
352
  });
353
+ // ── The recording, beside the walk (opt-in) ─────────────────────────
354
+ // The row projection cannot be drawn — `structure` is the only route to
355
+ // a drawable graph and no snapshot carries it. The snapshot here is the
356
+ // REDACTED mirror, not `raw`: the same `redact` policy that scrubs the
357
+ // walk must scrub this by the same rule, and `raw` is the live working
358
+ // memory. With no policy configured the flag is a documented no-op.
359
+ const walk = recordingPolicy === undefined
360
+ ? walkOnly
361
+ : {
362
+ ...walkOnly,
363
+ ...(await (0, recording_js_1.mintChartRecording)(ctx, (0, recording_js_1.chartRecordingOf)(executor.getSnapshot({ redact: true }), chart.buildTimeStructure), {
364
+ toolName: opts.name,
365
+ toolCallId: ctx.toolCallId,
366
+ ...(ctx.runId !== undefined && { runId: ctx.runId }),
367
+ policy: recordingPolicy,
368
+ })),
369
+ };
302
370
  // ── The projection (verdict kinds only) ─────────────────────────────
303
371
  let rows;
304
372
  let shown;
@@ -341,20 +409,26 @@ function runbookAsTool(opts) {
341
409
  rule_version: opts.rules?.version ?? 'undeclared',
342
410
  walk,
343
411
  };
412
+ // The rowset half is the same in both presentations — the dial names who
413
+ // RENDERS the rows, never which rows there are. Only the surface differs:
414
+ // prose gets the pre-rendered table plus "output it verbatim"; a panel
415
+ // host gets no table and the opposite law, because the rows it would
416
+ // retype are already on the reader's screen.
344
417
  const projection = shown !== undefined && rows !== undefined
345
418
  ? {
346
419
  verdicts: shown,
347
420
  rows_shown: shown.length,
348
421
  rows_total: rows.length,
349
422
  rows_complete: shown.length === rows.length,
350
- table: (0, verdicts_js_1.renderVerdictTable)(shown),
351
- render_note: verdicts_js_1.VERDICT_RENDER_NOTE,
423
+ ...(rendersItsOwnRows
424
+ ? { render_note: verdicts_js_1.PANEL_RENDER_NOTE }
425
+ : { table: (0, verdicts_js_1.renderVerdictTable)(shown), render_note: verdicts_js_1.VERDICT_RENDER_NOTE }),
352
426
  ...(meanings !== undefined && { verdict_meanings: meanings }),
353
427
  }
354
428
  : undefined;
355
429
  const report = (0, report_js_1.admitReport)(bagOf(state.report) ?? {}, [
356
430
  ...Object.keys(spine),
357
- ...Object.keys(projection ?? {}),
431
+ ...reservedProjectionNames(projection),
358
432
  ]);
359
433
  const envelope = {
360
434
  af_coverage: ledger,
@@ -1 +1 @@
1
- {"version":3,"file":"runbookAsTool.js","sourceRoot":"","sources":["../../../src/core/runbook/runbookAsTool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;;;AAEH,6CAAkF;AAClF,6CAAuD;AAEvD,oFAOqD;AACrD,0CAA+E;AAC/E,+CAKuB;AACvB,+CAAkF;AAClF,2CAA+E;AAE/E,+CASuB;AACvB,uCAA6F;AAE7F;;oBAEoB;AACpB,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAEvC,S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