agentfootprint 9.78.0 → 9.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/CLAUDE.md +1 -1
- package/dist/artifacts/recordingArtifact.js +5 -1
- package/dist/artifacts/recordingArtifact.js.map +1 -1
- package/dist/core/runbook/index.js +3 -1
- package/dist/core/runbook/index.js.map +1 -1
- package/dist/core/runbook/recording.js +178 -0
- package/dist/core/runbook/recording.js.map +1 -0
- package/dist/core/runbook/runbookAsTool.js +45 -2
- package/dist/core/runbook/runbookAsTool.js.map +1 -1
- package/dist/esm/artifacts/recordingArtifact.d.ts +9 -0
- package/dist/esm/artifacts/recordingArtifact.js +5 -1
- package/dist/esm/artifacts/recordingArtifact.js.map +1 -1
- package/dist/esm/core/runbook/index.d.ts +2 -1
- package/dist/esm/core/runbook/index.js +1 -0
- package/dist/esm/core/runbook/index.js.map +1 -1
- package/dist/esm/core/runbook/recording.d.ts +123 -0
- package/dist/esm/core/runbook/recording.js +172 -0
- package/dist/esm/core/runbook/recording.js.map +1 -0
- package/dist/esm/core/runbook/runbookAsTool.d.ts +5 -1
- package/dist/esm/core/runbook/runbookAsTool.js +45 -2
- package/dist/esm/core/runbook/runbookAsTool.js.map +1 -1
- package/dist/esm/core/runbook/types.d.ts +88 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/types/artifacts/recordingArtifact.d.ts +9 -0
- package/dist/types/artifacts/recordingArtifact.d.ts.map +1 -1
- package/dist/types/core/runbook/index.d.ts +2 -1
- package/dist/types/core/runbook/index.d.ts.map +1 -1
- package/dist/types/core/runbook/recording.d.ts +124 -0
- package/dist/types/core/runbook/recording.d.ts.map +1 -0
- package/dist/types/core/runbook/runbookAsTool.d.ts +5 -1
- package/dist/types/core/runbook/runbookAsTool.d.ts.map +1 -1
- package/dist/types/core/runbook/types.d.ts +88 -0
- package/dist/types/core/runbook/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,85 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [9.79.0] - 2026-08-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`walk: { recording }` — file the runbook's inner chart as a recording, so
|
|
15
|
+
the walk can actually be DRAWN.** A consumer wired the flow components of
|
|
16
|
+
the lens family to a runbook's answer and could not mount anything, and they
|
|
17
|
+
were right not to try. `runbookAsTool` files its walk as
|
|
18
|
+
`recording/chart-walk`, whose payload is a **row projection** — 129 rows of
|
|
19
|
+
`{step, type, depth, stage, stage_id, runtime_stage_id, subflow, text}`. A
|
|
20
|
+
step graph cannot be inferred from sentences about steps; a consumer handed
|
|
21
|
+
those rows can only correctly REFUSE to guess at the edges. The one piece
|
|
22
|
+
that makes a walk drawable is `structure`, the chart's build-time graph —
|
|
23
|
+
which a finished run does not leave behind and no snapshot carries.
|
|
24
|
+
|
|
25
|
+
Everything needed was already in the file, a few lines apart: the bridge
|
|
26
|
+
builds a fresh inner executor and ATTACHES RECORDERS (the run was recorded,
|
|
27
|
+
it simply was not filed), `recordingPutInput` was already the mint for the
|
|
28
|
+
agent's own run, `mintWalk` was already the guarded side effect that files
|
|
29
|
+
and never fails the answer, and `WalkDescriptor` was already where the spine
|
|
30
|
+
states what it filed. This connects them.
|
|
31
|
+
|
|
32
|
+
Declare `walk: { recording: true }` (or `{ label, maxBytes }`) and the inner
|
|
33
|
+
chart's own **`{ snapshot, events, structure }`** — the `recordRun` contract
|
|
34
|
+
exactly, the shape `observeRecording()` mounts — is filed under the existing
|
|
35
|
+
kind `recording/run`, and its ref rides the SAME spine descriptor as
|
|
36
|
+
`result.walk.recording_ref` beside `recording_kind`, `recording_bytes` and
|
|
37
|
+
`recording_note`. The wire ops that already redeem the walk redeem this with
|
|
38
|
+
**zero new operations**.
|
|
39
|
+
|
|
40
|
+
**OPT-IN, and that is the honest default.** A walk carries *sentences about*
|
|
41
|
+
what happened and no payload from it — values are off by construction
|
|
42
|
+
(`narrative({ includeValues: false })`). A recording is the run: shared
|
|
43
|
+
state, the whole commit log, every attached recorder's data — **whatever the
|
|
44
|
+
chart wrote**. Filing one is a materially bigger promise, so it is declared,
|
|
45
|
+
never begun on an operator's behalf. Unset, nothing extra runs — no second
|
|
46
|
+
snapshot, no bytes measured, no store call — and the envelope is
|
|
47
|
+
byte-identical to 9.78.0, pinned by a test that asserts no `recording_*` key
|
|
48
|
+
exists at all. A reader who never asked for a recording does not even get a
|
|
49
|
+
sentence explaining its absence.
|
|
50
|
+
|
|
51
|
+
**Redaction means the same for both artifacts.** The recording's snapshot is
|
|
52
|
+
read from the REDACTED MIRROR (`getSnapshot({ redact: true })`), never the
|
|
53
|
+
raw working memory — so the `redact` policy that scrubs the walk scrubs the
|
|
54
|
+
recording by the same rule at the same moment, and a redacted key travels as
|
|
55
|
+
`REDACTED` rather than vanishing (a reader sees that a value existed and was
|
|
56
|
+
scrubbed). With no policy configured the flag is a documented no-op.
|
|
57
|
+
|
|
58
|
+
**Size has a declared failure mode, and it is a refusal.** Over
|
|
59
|
+
`walk.recording.maxBytes` (default `DEFAULT_RECORDING_MAX_BYTES` =
|
|
60
|
+
5,000,000 — a walk is tens of KB, this package's own measured `recordRun`
|
|
61
|
+
bundle was 2.76 MB, a fleet sweep is unbounded) the recording is **not filed
|
|
62
|
+
and not truncated**, and `recording_note` names what it measured, the
|
|
63
|
+
ceiling it broke, and the option that raises it. The asymmetry with the
|
|
64
|
+
walk's row cap is the point: walk rows are independently meaningful so a
|
|
65
|
+
projection of them is still true, but `{ snapshot, events, structure }` is
|
|
66
|
+
one bundle — half a commit log under a whole chart draws a picture nobody
|
|
67
|
+
can check.
|
|
68
|
+
|
|
69
|
+
**The absence is always SPOKEN.** No store, an over-size refusal, an
|
|
70
|
+
unserializable snapshot, a store that threw — each costs the REF and lands a
|
|
71
|
+
named reason in `recording_note`, following `mintWalk`'s own law. A missing
|
|
72
|
+
ref with no sentence would leave a reader guessing, which is the one thing
|
|
73
|
+
the spine exists to prevent.
|
|
74
|
+
|
|
75
|
+
**`events` is empty by construction, and says so.** It is the typed
|
|
76
|
+
*agentfootprint* stream, fired by an agent turn; what ran here is a
|
|
77
|
+
footprintjs chart on its own executor, which fires none. All three keys are
|
|
78
|
+
present (that is what a viewer reads), the empty array is the honest count,
|
|
79
|
+
and the note states it so nobody reads it as a dropped stream — the walk's
|
|
80
|
+
own story rides `snapshot`, where the narrative recorder's data already
|
|
81
|
+
lives.
|
|
82
|
+
|
|
83
|
+
- **`recordingPutInput` accepts `toolCallId`** — stamped on `origin.toolCallId`
|
|
84
|
+
the way `chartWalkPutInput` already did. A walk and the recording it projects
|
|
85
|
+
are two views of ONE tool call, so they carry the same join key, and either
|
|
86
|
+
joins back to the call the model made. Absent for an agent's own run
|
|
87
|
+
recording, which is a whole turn and belongs to no single call.
|
|
88
|
+
|
|
10
89
|
## [9.78.0] - 2026-08-30
|
|
11
90
|
|
|
12
91
|
### Added
|
package/CLAUDE.md
CHANGED
|
@@ -17,7 +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 |
|
|
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, 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 |
|
|
21
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 |
|
|
22
22
|
| 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
23
|
| 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 |
|
|
@@ -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
|
-
...(
|
|
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;
|
|
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;AA6BvD;;;;;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,kFAAkF,CACrF,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;IAC7C,CAAC;CACF;AAZD,oEAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAC/B,SAAkB,EAClB,QAA4B,EAAE;IAE9B,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACzC,CAAC;IA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AC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3F,CAAC;IACD,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QAChB,MAAM,IAAI,4BAA4B,CAAC,0BAA0B,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,MAAM,GAAG;QACb,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QACxD,GAAG,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;KACxE,CAAC;IACF,OAAO;QACL,IAAI,EAAE,gCAAwB;QAC9B,SAAS,EAAE,4BAAoB;QAC/B,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;QAC9F,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;KAClD,CAAC;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.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");
|
|
@@ -21,4 +21,6 @@ Object.defineProperty(exports, "verdictRowsOf", { enumerable: true, get: functio
|
|
|
21
21
|
var walk_js_1 = require("./walk.js");
|
|
22
22
|
Object.defineProperty(exports, "DEFAULT_WALK_CAP", { enumerable: true, get: function () { return walk_js_1.DEFAULT_WALK_CAP; } });
|
|
23
23
|
Object.defineProperty(exports, "projectWalk", { enumerable: true, get: function () { return walk_js_1.projectWalk; } });
|
|
24
|
+
var recording_js_1 = require("./recording.js");
|
|
25
|
+
Object.defineProperty(exports, "DEFAULT_RECORDING_MAX_BYTES", { enumerable: true, get: function () { return recording_js_1.DEFAULT_RECORDING_MAX_BYTES; } });
|
|
24
26
|
//# 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,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;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,KAA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L,cAAc,EACZ,cAAc;gBACd,sCACE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CACjD,KAAK;gBACL,uFAAuF;gBACvF,6CAA6C;SAChD,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,iCAAoB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClC,OAAO;YACL,eAAe,EAAE,KAAK;YACtB,cAAc,EACZ,cAAc;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
|
|
@@ -88,6 +92,7 @@ const innerRunRecords_js_1 = require("../../lib/trace-toolpack/innerRunRecords.j
|
|
|
88
92
|
const tools_js_1 = require("../tools.js");
|
|
89
93
|
const coverage_js_1 = require("./coverage.js");
|
|
90
94
|
const dispatch_js_1 = require("./dispatch.js");
|
|
95
|
+
const recording_js_1 = require("./recording.js");
|
|
91
96
|
const report_js_1 = require("./report.js");
|
|
92
97
|
const verdicts_js_1 = require("./verdicts.js");
|
|
93
98
|
const walk_js_1 = require("./walk.js");
|
|
@@ -156,6 +161,22 @@ function runbookAsTool(opts) {
|
|
|
156
161
|
if (cap !== undefined && (!Number.isInteger(cap) || cap < 1)) {
|
|
157
162
|
throw new Error(`${label}: \`walk.cap\` must be a whole number of rows, at least 1 — got ${String(cap)}.`);
|
|
158
163
|
}
|
|
164
|
+
const recordingOpt = opts.walk?.recording;
|
|
165
|
+
if (recordingOpt !== undefined &&
|
|
166
|
+
typeof recordingOpt !== 'boolean' &&
|
|
167
|
+
(recordingOpt === null || typeof recordingOpt !== 'object' || Array.isArray(recordingOpt))) {
|
|
168
|
+
throw new Error(`${label}: \`walk.recording\` must be \`true\` (file the inner chart's recording with ` +
|
|
169
|
+
`the defaults), \`false\`/absent (do not file one), or an options bag ` +
|
|
170
|
+
`\`{ label?, maxBytes? }\` — got ${JSON.stringify(recordingOpt)}.`);
|
|
171
|
+
}
|
|
172
|
+
if (typeof recordingOpt === 'object' && recordingOpt !== null) {
|
|
173
|
+
const maxBytes = recordingOpt.maxBytes;
|
|
174
|
+
if (maxBytes !== undefined && (!Number.isInteger(maxBytes) || maxBytes < 1)) {
|
|
175
|
+
throw new Error(`${label}: \`walk.recording.maxBytes\` must be a whole number of bytes, at least 1 — ` +
|
|
176
|
+
`got ${String(maxBytes)}. It is the declared ceiling a recording is REFUSED over, ` +
|
|
177
|
+
`never truncated to.`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
159
180
|
if (opts.keepRecordLimit !== undefined) {
|
|
160
181
|
if (opts.keepRecord !== true) {
|
|
161
182
|
throw new Error(`${label}: \`keepRecordLimit\` caps records that are never kept — add ` +
|
|
@@ -186,6 +207,11 @@ function runbookAsTool(opts) {
|
|
|
186
207
|
const isVerdictKind = opts.resultKind?.startsWith(VERDICT_KIND_PREFIX) === true;
|
|
187
208
|
const maxRows = opts.verdicts?.maxRows ?? verdicts_js_1.DEFAULT_MAX_ROWS;
|
|
188
209
|
const walkCap = opts.walk?.cap ?? walk_js_1.DEFAULT_WALK_CAP;
|
|
210
|
+
// Resolved ONCE at definition. `undefined` is the whole off-switch: every
|
|
211
|
+
// line the recording feature adds sits behind this being defined, so an
|
|
212
|
+
// undeclared runbook takes no second snapshot, measures no bytes, and makes
|
|
213
|
+
// no store call — its envelope is byte-identical to 9.78.0.
|
|
214
|
+
const recordingPolicy = (0, recording_js_1.resolveRecordingPolicy)(recordingOpt);
|
|
189
215
|
const store = opts.keepRecord === true
|
|
190
216
|
? (0, innerRunRecords_js_1.innerRunStore)(opts.keepRecordLimit ?? innerRunRecords_js_1.DEFAULT_INNER_RUN_LIMIT)
|
|
191
217
|
: undefined;
|
|
@@ -293,12 +319,29 @@ function runbookAsTool(opts) {
|
|
|
293
319
|
// ── The walk ────────────────────────────────────────────────────────
|
|
294
320
|
const entries = walkRecorder.getEntries();
|
|
295
321
|
const projected = (0, walk_js_1.projectWalk)(entries, walkCap);
|
|
296
|
-
const
|
|
322
|
+
const walkOnly = await (0, walk_js_1.mintWalk)(ctx, projected, {
|
|
297
323
|
toolName: opts.name,
|
|
298
324
|
toolCallId: ctx.toolCallId,
|
|
299
325
|
...(ctx.runId !== undefined && { runId: ctx.runId }),
|
|
300
326
|
stepsExecuted: walkRecorder.stepCount,
|
|
301
327
|
});
|
|
328
|
+
// ── The recording, beside the walk (opt-in) ─────────────────────────
|
|
329
|
+
// The row projection cannot be drawn — `structure` is the only route to
|
|
330
|
+
// a drawable graph and no snapshot carries it. The snapshot here is the
|
|
331
|
+
// REDACTED mirror, not `raw`: the same `redact` policy that scrubs the
|
|
332
|
+
// walk must scrub this by the same rule, and `raw` is the live working
|
|
333
|
+
// memory. With no policy configured the flag is a documented no-op.
|
|
334
|
+
const walk = recordingPolicy === undefined
|
|
335
|
+
? walkOnly
|
|
336
|
+
: {
|
|
337
|
+
...walkOnly,
|
|
338
|
+
...(await (0, recording_js_1.mintChartRecording)(ctx, (0, recording_js_1.chartRecordingOf)(executor.getSnapshot({ redact: true }), chart.buildTimeStructure), {
|
|
339
|
+
toolName: opts.name,
|
|
340
|
+
toolCallId: ctx.toolCallId,
|
|
341
|
+
...(ctx.runId !== undefined && { runId: ctx.runId }),
|
|
342
|
+
policy: recordingPolicy,
|
|
343
|
+
})),
|
|
344
|
+
};
|
|
302
345
|
// ── The projection (verdict kinds only) ─────────────────────────────
|
|
303
346
|
let rows;
|
|
304
347
|
let shown;
|
|
@@ -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,+CASu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AI,EAAE,CAAC;aACjC,CAAC,CAAC;YACH,MAAM,QAAQ,GAAoB;gBAChC,WAAW,EAAE,MAAM;gBACnB,MAAM,EAAE;oBACN,aAAa,EAAE,KAAK,CAAC,aAAa;oBAClC,YAAY,EAAE,KAAK,CAAC,YAAY;oBAChC,GAAG,MAAM,CAAC,MAAM;oBAChB,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;oBACrB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI;wBAC/B,CAAC,2BAAe,CAAC,EAAE,IAAA,8BAAkB,EAAC,MAAM,CAAC,OAAO,CAAC;qBACtD,CAAC;oBACF,IAAI,EAAE,KAAK,CAAC,IAAI;iBACjB;aACF,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;IAEH,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,YAAY,GAA0B,EAAE,GAAG,IAAI,EAAE,CAAC,sCAAiB,CAAC,EAAE,KAAK,EAAE,CAAC;IACpF,OAAO,YAAY,CAAC;AACtB,CAAC;AAxVD,sCAwVC"}
|
|
@@ -50,6 +50,15 @@ export interface RecordingMintFacts {
|
|
|
50
50
|
/** The run this recording is OF — stamped on `origin.runId`, which is the
|
|
51
51
|
* join back to the trace. */
|
|
52
52
|
readonly runId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The tool call this recording is OF, when a TOOL minted it (9.79.0) —
|
|
55
|
+
* stamped on `origin.toolCallId`, the join back to the call that produced
|
|
56
|
+
* it. Absent for an agent's own run recording, which is a whole turn and
|
|
57
|
+
* belongs to no single call. The `chartWalkPutInput` law, verbatim: a walk
|
|
58
|
+
* and the recording it projects are two views of ONE call, so they carry
|
|
59
|
+
* the same join key or a consumer cannot pair them.
|
|
60
|
+
*/
|
|
61
|
+
readonly toolCallId?: string;
|
|
53
62
|
/**
|
|
54
63
|
* The operator's label, when they set one.
|
|
55
64
|
*
|
|
@@ -80,12 +80,16 @@ export function recordingPutInput(recording, facts = {}) {
|
|
|
80
80
|
if (text === '') {
|
|
81
81
|
throw new UnserializableRecordingError('it serializes to nothing');
|
|
82
82
|
}
|
|
83
|
+
const origin = {
|
|
84
|
+
...(facts.runId !== undefined && { runId: facts.runId }),
|
|
85
|
+
...(facts.toolCallId !== undefined && { toolCallId: facts.toolCallId }),
|
|
86
|
+
};
|
|
83
87
|
return {
|
|
84
88
|
kind: RECORDING_ARTIFACT_KIND,
|
|
85
89
|
mediaType: RECORDING_MEDIA_TYPE,
|
|
86
90
|
data: text,
|
|
87
91
|
label: facts.label ?? (facts.runId !== undefined ? `run ${facts.runId}` : 'run recording'),
|
|
88
|
-
...(
|
|
92
|
+
...(Object.keys(origin).length > 0 && { origin }),
|
|
89
93
|
};
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordingArtifact.js","sourceRoot":"","sources":["../../../src/artifacts/recordingArtifact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH;oEACoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"recordingArtifact.js","sourceRoot":"","sources":["../../../src/artifacts/recordingArtifact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH;oEACoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAA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AAM,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -6,4 +6,5 @@ export { runbookAsTool } from './runbookAsTool.js';
|
|
|
6
6
|
export { absenceSignalOf, probeDispatch, recordingDispatch, RunbookAbsenceSignal, type InnerCallRecord, type RecordedDispatch, } from './dispatch.js';
|
|
7
7
|
export { DECLINED_VERDICT, DEFAULT_MAX_ROWS, renderVerdictTable, VERDICT_RENDER_NOTE, verdictRowsOf, } from './verdicts.js';
|
|
8
8
|
export { DEFAULT_WALK_CAP, projectWalk, type ProjectedWalk, type WalkRow } from './walk.js';
|
|
9
|
-
export
|
|
9
|
+
export { DEFAULT_RECORDING_MAX_BYTES } from './recording.js';
|
|
10
|
+
export type { RunbookAsToolOptions, RunbookEnvelope, RunbookProcedure, RunbookRecordingOptions, RunbookRules, RunbookVerdictsOptions, RunbookWalkOptions, VerdictRow, WalkDescriptor, } from './types.js';
|
|
@@ -6,4 +6,5 @@ export { runbookAsTool } from './runbookAsTool.js';
|
|
|
6
6
|
export { absenceSignalOf, probeDispatch, recordingDispatch, RunbookAbsenceSignal, } from './dispatch.js';
|
|
7
7
|
export { DECLINED_VERDICT, DEFAULT_MAX_ROWS, renderVerdictTable, VERDICT_RENDER_NOTE, verdictRowsOf, } from './verdicts.js';
|
|
8
8
|
export { DEFAULT_WALK_CAP, projectWalk } from './walk.js';
|
|
9
|
+
export { DEFAULT_RECORDING_MAX_BYTES } from './recording.js';
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/runbook/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAoC,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/runbook/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAoC,MAAM,WAAW,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC"}
|