agentfootprint 18.3.0 → 19.1.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/CAPABILITIES.md +4 -0
- package/dist/answer-account/facts/calls.js +26 -7
- package/dist/answer-account/facts/calls.js.map +1 -1
- package/dist/core/agent/assessment/gather/stage.js +1 -1
- package/dist/core/agent/assessment/gather/stage.js.map +1 -1
- package/dist/core/agent/assessment/periodRows.js +7 -11
- package/dist/core/agent/assessment/periodRows.js.map +1 -1
- package/dist/core/agent/assessment/reasonClasses.js +28 -1
- package/dist/core/agent/assessment/reasonClasses.js.map +1 -1
- package/dist/core/agent/assessment/resultEvidence.js +8 -5
- package/dist/core/agent/assessment/resultEvidence.js.map +1 -1
- package/dist/core/agent/assessment/results/coverage/declarations.js +28 -0
- package/dist/core/agent/assessment/results/coverage/declarations.js.map +1 -0
- package/dist/core/agent/assessment/results/stage.js +1 -1
- package/dist/core/agent/assessment/results/stage.js.map +1 -1
- package/dist/core/agent/assessment/settledResults.js +4 -2
- package/dist/core/agent/assessment/settledResults.js.map +1 -1
- package/dist/core/agent/assessment/standingAdmission.js +14 -2
- package/dist/core/agent/assessment/standingAdmission.js.map +1 -1
- package/dist/core/agent/emptiness.js +6 -1
- package/dist/core/agent/emptiness.js.map +1 -1
- package/dist/core/agent/recordedCalls/resultDispositions.js +9 -1
- package/dist/core/agent/recordedCalls/resultDispositions.js.map +1 -1
- package/dist/core/agent/recordedCalls/resultRewriteIndex.js +40 -0
- package/dist/core/agent/recordedCalls/resultRewriteIndex.js.map +1 -0
- package/dist/core/agent/recordedCalls.js +3 -1
- package/dist/core/agent/recordedCalls.js.map +1 -1
- package/dist/core/agent/runtime/configuration/configure.js +6 -0
- package/dist/core/agent/runtime/configuration/configure.js.map +1 -1
- package/dist/core/agent/runtime/configuration/values.js.map +1 -1
- package/dist/core/agent/runtime/native/initialize.js +1 -0
- package/dist/core/agent/runtime/native/initialize.js.map +1 -1
- package/dist/esm/answer-account/facts/calls.js +27 -8
- package/dist/esm/answer-account/facts/calls.js.map +1 -1
- package/dist/esm/answer-account/types.d.ts +6 -0
- package/dist/esm/core/agent/assessment/gather/stage.js +1 -1
- package/dist/esm/core/agent/assessment/gather/stage.js.map +1 -1
- package/dist/esm/core/agent/assessment/periodRows.d.ts +1 -3
- package/dist/esm/core/agent/assessment/periodRows.js +4 -9
- package/dist/esm/core/agent/assessment/periodRows.js.map +1 -1
- package/dist/esm/core/agent/assessment/reasonClasses.d.ts +9 -0
- package/dist/esm/core/agent/assessment/reasonClasses.js +25 -0
- package/dist/esm/core/agent/assessment/reasonClasses.js.map +1 -1
- package/dist/esm/core/agent/assessment/resultEvidence.d.ts +1 -0
- package/dist/esm/core/agent/assessment/resultEvidence.js +9 -6
- package/dist/esm/core/agent/assessment/resultEvidence.js.map +1 -1
- package/dist/esm/core/agent/assessment/results/coverage/declarations.d.ts +16 -0
- package/dist/esm/core/agent/assessment/results/coverage/declarations.js +22 -0
- package/dist/esm/core/agent/assessment/results/coverage/declarations.js.map +1 -0
- package/dist/esm/core/agent/assessment/results/stage.js +1 -1
- package/dist/esm/core/agent/assessment/results/stage.js.map +1 -1
- package/dist/esm/core/agent/assessment/settledResults.js +4 -2
- package/dist/esm/core/agent/assessment/settledResults.js.map +1 -1
- package/dist/esm/core/agent/assessment/standingAdmission.d.ts +1 -0
- package/dist/esm/core/agent/assessment/standingAdmission.js +15 -3
- package/dist/esm/core/agent/assessment/standingAdmission.js.map +1 -1
- package/dist/esm/core/agent/emptiness.d.ts +2 -0
- package/dist/esm/core/agent/emptiness.js +4 -0
- package/dist/esm/core/agent/emptiness.js.map +1 -1
- package/dist/esm/core/agent/recordedCalls/resultDispositions.d.ts +2 -0
- package/dist/esm/core/agent/recordedCalls/resultDispositions.js +7 -0
- package/dist/esm/core/agent/recordedCalls/resultDispositions.js.map +1 -1
- package/dist/esm/core/agent/recordedCalls/resultRewriteIndex.d.ts +11 -0
- package/dist/esm/core/agent/recordedCalls/resultRewriteIndex.js +36 -0
- package/dist/esm/core/agent/recordedCalls/resultRewriteIndex.js.map +1 -0
- package/dist/esm/core/agent/recordedCalls.d.ts +1 -0
- package/dist/esm/core/agent/recordedCalls.js +1 -0
- package/dist/esm/core/agent/recordedCalls.js.map +1 -1
- package/dist/esm/core/agent/runtime/configuration/configure.js +6 -0
- package/dist/esm/core/agent/runtime/configuration/configure.js.map +1 -1
- package/dist/esm/core/agent/runtime/configuration/types.d.ts +5 -1
- package/dist/esm/core/agent/runtime/configuration/values.d.ts +1 -0
- package/dist/esm/core/agent/runtime/configuration/values.js.map +1 -1
- package/dist/esm/core/agent/runtime/native/initialize.js +1 -0
- package/dist/esm/core/agent/runtime/native/initialize.js.map +1 -1
- package/dist/esm/core/agent/types/observation.d.ts +34 -1
- package/dist/esm/hosting/durability.d.ts +10 -0
- package/dist/esm/hosting/durability.js +54 -30
- package/dist/esm/hosting/durability.js.map +1 -1
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.d.ts +3 -2
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.js +9 -4
- package/dist/esm/hosting/standingAgent/artifacts/accountParts.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/llm-ledger/build.d.ts +77 -0
- package/dist/esm/llm-ledger/build.js +344 -0
- package/dist/esm/llm-ledger/build.js.map +1 -0
- package/dist/esm/llm-ledger/digest.d.ts +24 -0
- package/dist/esm/llm-ledger/digest.js +22 -0
- package/dist/esm/llm-ledger/digest.js.map +1 -0
- package/dist/esm/llm-ledger/entries.d.ts +37 -0
- package/dist/esm/llm-ledger/entries.js +291 -0
- package/dist/esm/llm-ledger/entries.js.map +1 -0
- package/dist/esm/llm-ledger/fileStore.d.ts +12 -0
- package/dist/esm/llm-ledger/fileStore.js +571 -0
- package/dist/esm/llm-ledger/fileStore.js.map +1 -0
- package/dist/esm/llm-ledger/limits.d.ts +65 -0
- package/dist/esm/llm-ledger/limits.js +64 -0
- package/dist/esm/llm-ledger/limits.js.map +1 -0
- package/dist/esm/llm-ledger/memoryStore.d.ts +3 -0
- package/dist/esm/llm-ledger/memoryStore.js +44 -0
- package/dist/esm/llm-ledger/memoryStore.js.map +1 -0
- package/dist/esm/llm-ledger/session.d.ts +6 -0
- package/dist/esm/llm-ledger/session.js +43 -0
- package/dist/esm/llm-ledger/session.js.map +1 -0
- package/dist/esm/llm-ledger/store.d.ts +97 -0
- package/dist/esm/llm-ledger/store.js +208 -0
- package/dist/esm/llm-ledger/store.js.map +1 -0
- package/dist/esm/llm-ledger/tokens.d.ts +30 -0
- package/dist/esm/llm-ledger/tokens.js +319 -0
- package/dist/esm/llm-ledger/tokens.js.map +1 -0
- package/dist/esm/llm-ledger/types.d.ts +173 -0
- package/dist/esm/llm-ledger/types.js +2 -0
- package/dist/esm/llm-ledger/types.js.map +1 -0
- package/dist/esm/llm-ledger/window.d.ts +40 -0
- package/dist/esm/llm-ledger/window.js +66 -0
- package/dist/esm/llm-ledger/window.js.map +1 -0
- package/dist/esm/observe.d.ts +1 -1
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/recorders/observability/FlowchartRecorder.d.ts +8 -120
- package/dist/esm/recorders/observability/FlowchartRecorder.js +16 -0
- package/dist/esm/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.d.ts +9 -0
- package/dist/esm/recorders/observability/recordingParts/format.d.ts +87 -12
- package/dist/esm/recorders/observability/recordingParts/format.js +136 -17
- package/dist/esm/recorders/observability/recordingParts/format.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/open.d.ts +41 -7
- package/dist/esm/recorders/observability/recordingParts/open.js +32 -6
- package/dist/esm/recorders/observability/recordingParts/open.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/partReader.d.ts +25 -2
- package/dist/esm/recorders/observability/recordingParts/partReader.js +183 -15
- package/dist/esm/recorders/observability/recordingParts/partReader.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/split.d.ts +13 -0
- package/dist/esm/recorders/observability/recordingParts/split.js +135 -26
- package/dist/esm/recorders/observability/recordingParts/split.js.map +1 -1
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.d.ts +124 -0
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.js +389 -0
- package/dist/esm/recorders/observability/recordingParts/subflowPayloads.js.map +1 -0
- package/dist/esm/recorders/observability/stepGraphTypes.d.ts +139 -0
- package/dist/esm/recorders/observability/stepGraphTypes.js +10 -0
- package/dist/esm/recorders/observability/stepGraphTypes.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/resultRewrite.d.ts +3 -0
- package/dist/esm/trace-toolpack/traceToolpack/resultRewrite.js +14 -0
- package/dist/esm/trace-toolpack/traceToolpack/resultRewrite.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.d.ts +6 -5
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js +12 -17
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -1
- package/dist/esm/trace-toolpack/traceToolpack/toolCallOccurrence.d.ts +7 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallOccurrence.js +19 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallOccurrence.js.map +1 -1
- package/dist/hosting/durability.js +54 -30
- package/dist/hosting/durability.js.map +1 -1
- package/dist/hosting/standingAgent/artifacts/accountParts.js +9 -4
- package/dist/hosting/standingAgent/artifacts/accountParts.js.map +1 -1
- package/dist/llm-ledger/build.js +354 -0
- package/dist/llm-ledger/build.js.map +1 -0
- package/dist/llm-ledger/digest.js +28 -0
- package/dist/llm-ledger/digest.js.map +1 -0
- package/dist/llm-ledger/entries.js +308 -0
- package/dist/llm-ledger/entries.js.map +1 -0
- package/dist/llm-ledger/fileStore.js +575 -0
- package/dist/llm-ledger/fileStore.js.map +1 -0
- package/dist/llm-ledger/limits.js +67 -0
- package/dist/llm-ledger/limits.js.map +1 -0
- package/dist/llm-ledger/memoryStore.js +48 -0
- package/dist/llm-ledger/memoryStore.js.map +1 -0
- package/dist/llm-ledger/session.js +49 -0
- package/dist/llm-ledger/session.js.map +1 -0
- package/dist/llm-ledger/store.js +220 -0
- package/dist/llm-ledger/store.js.map +1 -0
- package/dist/llm-ledger/tokens.js +327 -0
- package/dist/llm-ledger/tokens.js.map +1 -0
- package/dist/llm-ledger/types.js +3 -0
- package/dist/llm-ledger/types.js.map +1 -0
- package/dist/llm-ledger/window.js +72 -0
- package/dist/llm-ledger/window.js.map +1 -0
- package/dist/observe.js.map +1 -1
- package/dist/recorders/observability/FlowchartRecorder.js +16 -0
- package/dist/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/recorders/observability/recordingParts/format.js +139 -18
- package/dist/recorders/observability/recordingParts/format.js.map +1 -1
- package/dist/recorders/observability/recordingParts/open.js +30 -4
- package/dist/recorders/observability/recordingParts/open.js.map +1 -1
- package/dist/recorders/observability/recordingParts/partReader.js +182 -14
- package/dist/recorders/observability/recordingParts/partReader.js.map +1 -1
- package/dist/recorders/observability/recordingParts/split.js +134 -25
- package/dist/recorders/observability/recordingParts/split.js.map +1 -1
- package/dist/recorders/observability/recordingParts/subflowPayloads.js +396 -0
- package/dist/recorders/observability/recordingParts/subflowPayloads.js.map +1 -0
- package/dist/recorders/observability/stepGraphTypes.js +11 -0
- package/dist/recorders/observability/stepGraphTypes.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/resultRewrite.js +18 -0
- package/dist/trace-toolpack/traceToolpack/resultRewrite.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/toolCallJournal.js +14 -19
- package/dist/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -1
- package/dist/trace-toolpack/traceToolpack/toolCallOccurrence.js +22 -1
- package/dist/trace-toolpack/traceToolpack/toolCallOccurrence.js.map +1 -1
- package/dist/types/answer-account/facts/calls.d.ts.map +1 -1
- package/dist/types/answer-account/types.d.ts +6 -0
- package/dist/types/answer-account/types.d.ts.map +1 -1
- package/dist/types/core/agent/assessment/periodRows.d.ts +1 -3
- package/dist/types/core/agent/assessment/periodRows.d.ts.map +1 -1
- package/dist/types/core/agent/assessment/reasonClasses.d.ts +9 -0
- package/dist/types/core/agent/assessment/reasonClasses.d.ts.map +1 -1
- package/dist/types/core/agent/assessment/resultEvidence.d.ts +1 -0
- package/dist/types/core/agent/assessment/resultEvidence.d.ts.map +1 -1
- package/dist/types/core/agent/assessment/results/coverage/declarations.d.ts +17 -0
- package/dist/types/core/agent/assessment/results/coverage/declarations.d.ts.map +1 -0
- package/dist/types/core/agent/assessment/settledResults.d.ts.map +1 -1
- package/dist/types/core/agent/assessment/standingAdmission.d.ts +1 -0
- package/dist/types/core/agent/assessment/standingAdmission.d.ts.map +1 -1
- package/dist/types/core/agent/emptiness.d.ts +2 -0
- package/dist/types/core/agent/emptiness.d.ts.map +1 -1
- package/dist/types/core/agent/recordedCalls/resultDispositions.d.ts +2 -0
- package/dist/types/core/agent/recordedCalls/resultDispositions.d.ts.map +1 -1
- package/dist/types/core/agent/recordedCalls/resultRewriteIndex.d.ts +12 -0
- package/dist/types/core/agent/recordedCalls/resultRewriteIndex.d.ts.map +1 -0
- package/dist/types/core/agent/recordedCalls.d.ts +1 -0
- package/dist/types/core/agent/recordedCalls.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/configuration/configure.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/configuration/types.d.ts +5 -1
- package/dist/types/core/agent/runtime/configuration/types.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/configuration/values.d.ts +1 -0
- package/dist/types/core/agent/runtime/configuration/values.d.ts.map +1 -1
- package/dist/types/core/agent/runtime/native/initialize.d.ts.map +1 -1
- package/dist/types/core/agent/types/observation.d.ts +34 -1
- package/dist/types/core/agent/types/observation.d.ts.map +1 -1
- package/dist/types/hosting/durability.d.ts +10 -0
- package/dist/types/hosting/durability.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent/artifacts/accountParts.d.ts +3 -2
- package/dist/types/hosting/standingAgent/artifacts/accountParts.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llm-ledger/build.d.ts +78 -0
- package/dist/types/llm-ledger/build.d.ts.map +1 -0
- package/dist/types/llm-ledger/digest.d.ts +25 -0
- package/dist/types/llm-ledger/digest.d.ts.map +1 -0
- package/dist/types/llm-ledger/entries.d.ts +38 -0
- package/dist/types/llm-ledger/entries.d.ts.map +1 -0
- package/dist/types/llm-ledger/fileStore.d.ts +13 -0
- package/dist/types/llm-ledger/fileStore.d.ts.map +1 -0
- package/dist/types/llm-ledger/limits.d.ts +66 -0
- package/dist/types/llm-ledger/limits.d.ts.map +1 -0
- package/dist/types/llm-ledger/memoryStore.d.ts +4 -0
- package/dist/types/llm-ledger/memoryStore.d.ts.map +1 -0
- package/dist/types/llm-ledger/session.d.ts +7 -0
- package/dist/types/llm-ledger/session.d.ts.map +1 -0
- package/dist/types/llm-ledger/store.d.ts +98 -0
- package/dist/types/llm-ledger/store.d.ts.map +1 -0
- package/dist/types/llm-ledger/tokens.d.ts +31 -0
- package/dist/types/llm-ledger/tokens.d.ts.map +1 -0
- package/dist/types/llm-ledger/types.d.ts +174 -0
- package/dist/types/llm-ledger/types.d.ts.map +1 -0
- package/dist/types/llm-ledger/window.d.ts +41 -0
- package/dist/types/llm-ledger/window.d.ts.map +1 -0
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/recorders/observability/FlowchartRecorder.d.ts +8 -120
- package/dist/types/recorders/observability/FlowchartRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts +9 -0
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/format.d.ts +87 -12
- package/dist/types/recorders/observability/recordingParts/format.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/open.d.ts +41 -7
- package/dist/types/recorders/observability/recordingParts/open.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/partReader.d.ts +25 -2
- package/dist/types/recorders/observability/recordingParts/partReader.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/split.d.ts +13 -0
- package/dist/types/recorders/observability/recordingParts/split.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingParts/subflowPayloads.d.ts +125 -0
- package/dist/types/recorders/observability/recordingParts/subflowPayloads.d.ts.map +1 -0
- package/dist/types/recorders/observability/stepGraphTypes.d.ts +140 -0
- package/dist/types/recorders/observability/stepGraphTypes.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/resultRewrite.d.ts +4 -0
- package/dist/types/trace-toolpack/traceToolpack/resultRewrite.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts +6 -5
- package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts.map +1 -1
- package/dist/types/trace-toolpack/traceToolpack/toolCallOccurrence.d.ts +7 -0
- package/dist/types/trace-toolpack/traceToolpack/toolCallOccurrence.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* llm-ledger/types — the entry shapes and the ledger's closed words.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: declarations only. Every entry kind is one interface over one
|
|
5
|
+
* shared base; `entries.ts` is the one check that a value has one of
|
|
6
|
+
* these shapes, and `build.ts` holds the builders that make them.
|
|
7
|
+
* Role: the closed leaf's vocabulary. Every exported name carries the
|
|
8
|
+
* `Ledger` prefix, because `receipt` already names what the model was
|
|
9
|
+
* handed elsewhere in this package.
|
|
10
|
+
* Emits: N/A.
|
|
11
|
+
*
|
|
12
|
+
* All seq numbers are the entry numbers of ONE session, 1…n, shared by every
|
|
13
|
+
* kind. A reference to another entry (a cite, a claim, `submit`, `note`,
|
|
14
|
+
* `restsOn`) is always to an EARLIER entry.
|
|
15
|
+
*/
|
|
16
|
+
import type { JsonValue } from 'foottrace/canonical-json';
|
|
17
|
+
/** Who wrote an entry. */
|
|
18
|
+
export type LedgerBy = 'host' | 'agent' | 'ledger' | 'person';
|
|
19
|
+
/** Whether the ledger saw it happen (`observed`) or was told (`reported`). */
|
|
20
|
+
export type LedgerHow = 'observed' | 'reported';
|
|
21
|
+
/** The nine entry kinds. */
|
|
22
|
+
export type LedgerKind = 'opened' | 'receipt' | 'supplied' | 'note' | 'withdrawal' | 'submit' | 'check' | 'released' | 'delivered';
|
|
23
|
+
/** What a note says it is. */
|
|
24
|
+
export type LedgerNoteKind = 'claim' | 'ruled-out' | 'question';
|
|
25
|
+
/** Who supplied a value the agent did not read. */
|
|
26
|
+
export type LedgerSupplier = 'person' | 'app' | 'system';
|
|
27
|
+
/** A check's disposition: the same four words as `integrity/disposition/types.ts` · `Disposition`. */
|
|
28
|
+
export type LedgerDisposition = 'checked-pass' | 'checked-fail' | 'not-applicable' | 'unreachable';
|
|
29
|
+
/** A claim's verdict. There is no "contradicted" in this release. */
|
|
30
|
+
export type LedgerVerdict = 'verified' | 'consistent-with-reported' | 'unsupported' | 'open';
|
|
31
|
+
/** Why a rule gave no answer of its own. No message is ever stored beside it. */
|
|
32
|
+
export type LedgerCheckWhy = 'rule-threw' | 'rule-timeout' | 'bad-result';
|
|
33
|
+
/** A person's answer to a withheld report. */
|
|
34
|
+
export type LedgerAnswer = 'release' | 'withhold';
|
|
35
|
+
/**
|
|
36
|
+
* The closed refusal words a call answers with. A refusal never carries a
|
|
37
|
+
* source value. `store-refused` travels with the store's code.
|
|
38
|
+
*/
|
|
39
|
+
export type LedgerRefusal = 'no-session' | 'bad-session' | 'session-exists' | 'bad-input' | 'too-large' | 'unknown-receipt' | 'not-a-receipt' | 'unknown-note' | 'not-a-note' | 'not-a-claim' | 'already-withdrawn' | 'withdrawn-note' | 'bad-window' | 'unknown-rule' | 'rule-not-loaded' | 'ledger-full' | 'busy' | 'store-refused';
|
|
40
|
+
/** `sha256:` and 64 lower-case hex digits. */
|
|
41
|
+
export type LedgerDigest = string;
|
|
42
|
+
/** A half-open time window `[from, to)`, both ends RFC 3339 instants with an offset. */
|
|
43
|
+
export interface LedgerWindow {
|
|
44
|
+
readonly from: string;
|
|
45
|
+
readonly to: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A stored decision record. Its shape is the engine's (`decisionRecord` /
|
|
49
|
+
* `fixedRecord`, not yet released); until then it is admitted as bounded,
|
|
50
|
+
* canonical JSON.
|
|
51
|
+
*/
|
|
52
|
+
export type LedgerDecisionRecord = {
|
|
53
|
+
readonly [key: string]: JsonValue;
|
|
54
|
+
};
|
|
55
|
+
/** What every entry carries. `at` is the host's clock, RFC 3339 UTC. */
|
|
56
|
+
export interface LedgerEntryBase<K extends LedgerKind> {
|
|
57
|
+
readonly v: 1;
|
|
58
|
+
readonly seq: number;
|
|
59
|
+
readonly kind: K;
|
|
60
|
+
readonly by: LedgerBy;
|
|
61
|
+
readonly how: LedgerHow;
|
|
62
|
+
readonly at: string;
|
|
63
|
+
}
|
|
64
|
+
/** The first entry of every session: what it runs. */
|
|
65
|
+
export interface LedgerOpened extends LedgerEntryBase<'opened'> {
|
|
66
|
+
/** The `id@version` list this session runs. */
|
|
67
|
+
readonly rules: readonly string[];
|
|
68
|
+
readonly confirm: boolean;
|
|
69
|
+
readonly askRunsRules: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** What one read was told to have returned — tokens, never the text. */
|
|
72
|
+
export interface LedgerReceipt extends LedgerEntryBase<'receipt'> {
|
|
73
|
+
readonly source: string;
|
|
74
|
+
readonly query?: string;
|
|
75
|
+
readonly window?: LedgerWindow;
|
|
76
|
+
readonly limit?: {
|
|
77
|
+
readonly rows: number;
|
|
78
|
+
readonly hit: boolean;
|
|
79
|
+
};
|
|
80
|
+
/** UTF-8 bytes of the text the host handed in. */
|
|
81
|
+
readonly bytes: number;
|
|
82
|
+
readonly nothingFound: boolean;
|
|
83
|
+
/** Distinct tokens, first-seen order. */
|
|
84
|
+
readonly tokens: readonly string[];
|
|
85
|
+
/** Present only when something was not kept: tokens past the cap, text past the byte cap. */
|
|
86
|
+
readonly cut?: {
|
|
87
|
+
readonly tokensDropped: number;
|
|
88
|
+
readonly bytesUnread: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Present only when the part read holds numbers written with thousands separators
|
|
92
|
+
* (`1,234`): how many. Their values are not tokens, so the receipt is incomplete.
|
|
93
|
+
*/
|
|
94
|
+
readonly groupedNumbers?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Present only when the part read holds pieces next to a backslash that read two ways
|
|
97
|
+
* (`\node1234`: a path's name, or a newline and `ode1234`): how many. Neither is a token.
|
|
98
|
+
*/
|
|
99
|
+
readonly escapedPieces?: number;
|
|
100
|
+
/** How many values the host's redactor masked before recording. */
|
|
101
|
+
readonly hidden?: number;
|
|
102
|
+
readonly ref?: {
|
|
103
|
+
readonly uri: string;
|
|
104
|
+
readonly digest: LedgerDigest;
|
|
105
|
+
};
|
|
106
|
+
readonly externalId?: string;
|
|
107
|
+
}
|
|
108
|
+
/** A value given to the agent by the person, the app or the system: exempt, never support. */
|
|
109
|
+
export interface LedgerSupplied extends LedgerEntryBase<'supplied'> {
|
|
110
|
+
readonly from: LedgerSupplier;
|
|
111
|
+
readonly tokens: readonly string[];
|
|
112
|
+
readonly bytes: number;
|
|
113
|
+
readonly digest: LedgerDigest;
|
|
114
|
+
}
|
|
115
|
+
/** What the agent noted, and which receipts it cites. */
|
|
116
|
+
export interface LedgerNote extends LedgerEntryBase<'note'> {
|
|
117
|
+
readonly noteKind: LedgerNoteKind;
|
|
118
|
+
readonly text: string;
|
|
119
|
+
readonly values?: readonly string[];
|
|
120
|
+
readonly window?: LedgerWindow;
|
|
121
|
+
/** Receipt seqs, sorted, unique. */
|
|
122
|
+
readonly cites: readonly number[];
|
|
123
|
+
}
|
|
124
|
+
/** The agent takes a note back. */
|
|
125
|
+
export interface LedgerWithdrawal extends LedgerEntryBase<'withdrawal'> {
|
|
126
|
+
readonly note: number;
|
|
127
|
+
readonly why: string;
|
|
128
|
+
}
|
|
129
|
+
/** The agent hands in a draft and names the notes it rests on. */
|
|
130
|
+
export interface LedgerSubmit extends LedgerEntryBase<'submit'> {
|
|
131
|
+
readonly claims: readonly number[];
|
|
132
|
+
readonly draftDigest: LedgerDigest;
|
|
133
|
+
readonly draftBytes: number;
|
|
134
|
+
}
|
|
135
|
+
/** One rule's finding on one subject of one submit. */
|
|
136
|
+
export interface LedgerCheck extends LedgerEntryBase<'check'> {
|
|
137
|
+
readonly submit: number;
|
|
138
|
+
readonly subject: {
|
|
139
|
+
readonly note: number;
|
|
140
|
+
} | {
|
|
141
|
+
readonly draft: true;
|
|
142
|
+
};
|
|
143
|
+
/** `id@version`. */
|
|
144
|
+
readonly rule: string;
|
|
145
|
+
readonly disposition: LedgerDisposition;
|
|
146
|
+
readonly verdict?: LedgerVerdict;
|
|
147
|
+
/** Receipt seqs, sorted, unique. */
|
|
148
|
+
readonly restsOn: readonly number[];
|
|
149
|
+
readonly decision?: LedgerDecisionRecord;
|
|
150
|
+
readonly counts: {
|
|
151
|
+
readonly visible: number;
|
|
152
|
+
readonly missing: number;
|
|
153
|
+
readonly supplied: number;
|
|
154
|
+
readonly incomplete: number;
|
|
155
|
+
};
|
|
156
|
+
readonly missing?: readonly string[];
|
|
157
|
+
readonly why?: LedgerCheckWhy;
|
|
158
|
+
}
|
|
159
|
+
/** A person's answer to a submit held for them, through the host. */
|
|
160
|
+
export interface LedgerReleased extends LedgerEntryBase<'released'> {
|
|
161
|
+
readonly submit: number;
|
|
162
|
+
readonly answer: LedgerAnswer;
|
|
163
|
+
readonly why?: 'no-person-channel';
|
|
164
|
+
}
|
|
165
|
+
/** What the host delivered, compared with the last submit's draft. */
|
|
166
|
+
export interface LedgerDelivered extends LedgerEntryBase<'delivered'> {
|
|
167
|
+
readonly digest: LedgerDigest;
|
|
168
|
+
readonly bytes: number;
|
|
169
|
+
readonly submit: number | null;
|
|
170
|
+
readonly matches: boolean;
|
|
171
|
+
}
|
|
172
|
+
/** Any entry. */
|
|
173
|
+
export type LedgerEntry = LedgerOpened | LedgerReceipt | LedgerSupplied | LedgerNote | LedgerWithdrawal | LedgerSubmit | LedgerCheck | LedgerReleased | LedgerDelivered;
|
|
174
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/llm-ledger/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,0BAA0B;AAC1B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEhD,4BAA4B;AAC5B,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,SAAS,GACT,UAAU,GACV,MAAM,GACN,YAAY,GACZ,QAAQ,GACR,OAAO,GACP,UAAU,GACV,WAAW,CAAC;AAEhB,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAEhE,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEzD,sGAAsG;AACtG,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAEnG,qEAAqE;AACrE,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,0BAA0B,GAAG,aAAa,GAAG,MAAM,CAAC;AAE7F,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;AAE1E,8CAA8C;AAC9C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,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C,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;CAC/B;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAe,SAAQ,eAAe,CAAC,UAAU,CAAC;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAgB,SAAQ,eAAe,CAAC,WAAW,CAAC;IACnE,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,iBAAiB;AACjB,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,aAAa,GACb,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* llm-ledger/window — the ledger's one instant validator, and the window built on it.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: a validator, not a second grammar. It accepts a strict SUBSET of
|
|
5
|
+
* what `time/instant.ts` · `instantOf` accepts in its `strict`
|
|
6
|
+
* profile, and gives the same epoch milliseconds for every string it
|
|
7
|
+
* accepts — pinned by `test/llm-ledger/window-differential.test.ts`.
|
|
8
|
+
* It is the one named exception to "no other file parses an
|
|
9
|
+
* instant", because this folder is a closed leaf and cannot import
|
|
10
|
+
* `src/time/`.
|
|
11
|
+
* Role: the closed leaf's time check: a receipt's and a note's `window`,
|
|
12
|
+
* and every entry's `at`.
|
|
13
|
+
* Emits: N/A.
|
|
14
|
+
*
|
|
15
|
+
* ## The grammar
|
|
16
|
+
*
|
|
17
|
+
* `YYYY-MM-DDTHH:MM:SS[.f]` then `Z` or `±HH:MM`:
|
|
18
|
+
*
|
|
19
|
+
* - upper-case `T` and `Z` only;
|
|
20
|
+
* - seconds required, 0–59 (no leap second);
|
|
21
|
+
* - a fraction of 1–3 digits (millisecond precision), or none;
|
|
22
|
+
* - a day that exists in its month; hours 0–23; an offset of at most ±23:59.
|
|
23
|
+
*
|
|
24
|
+
* Anything else is refused. A window is `{ from, to }`, half-open, with
|
|
25
|
+
* `from` strictly before `to`; the strings are kept as written.
|
|
26
|
+
*/
|
|
27
|
+
import type { LedgerWindow } from './types.js';
|
|
28
|
+
/**
|
|
29
|
+
* The epoch milliseconds an instant names, or `undefined` when `value` is not
|
|
30
|
+
* one under the grammar above.
|
|
31
|
+
*/
|
|
32
|
+
export declare function instantMs(value: unknown): number | undefined;
|
|
33
|
+
/** Whether `value` is an instant in UTC (`Z`): what every entry's `at` must be. */
|
|
34
|
+
export declare function isUtcInstant(value: unknown): value is string;
|
|
35
|
+
/**
|
|
36
|
+
* The window `value` names, as a fresh frozen `{ from, to }`, or `undefined`
|
|
37
|
+
* (the refusal `bad-window`) when it is not exactly those two keys, both
|
|
38
|
+
* instants, with `from` before `to`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readWindow(value: unknown): LedgerWindow | undefined;
|
|
41
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/llm-ledger/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAsB5D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAcnE"}
|
package/dist/types/observe.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { RunStepRecorder, runStepRecorder, type RunStep, type RunStepKind, type
|
|
|
40
40
|
export { attachFlowchart, buildStepGraph, buildStepGraphFromEvents, type StepGraph, type StepNode, type StepEdge, type SlotBoundary, type ContextInjection, type FlowchartOptions, type FlowchartHandle, } from './recorders/observability/FlowchartRecorder.js';
|
|
41
41
|
export { recordRun, type Recording, type RecordRunOptions, type RunRecorder, } from './recorders/observability/recordRun.js';
|
|
42
42
|
export { recordingSizeReport, type RecordingSizeFields, type RecordingSizeMount, type RecordingSizeReport, type RecordingSizeRow, } from './recorders/observability/recordingSizeReport.js';
|
|
43
|
-
export { openSavedRecording, type OpenSavedRecordingOptions, type SavedInvocation, type SavedRecording, type SavedRecordingArtifacts, type SavedRecordingPartUnavailable, type SavedRecordingReadOptions, type SavedRecordingSizes, type SavedRecordingUnavailable, type SavedRecordingWholeOptions, } from './recorders/observability/recordingParts/open.js';
|
|
43
|
+
export { openSavedRecording, type OpenSavedRecordingOptions, type SavedInvocation, type SavedInvocationPayloads, type SavedPayloadSlot, type SavedRecording, type SavedRecordingArtifacts, type SavedRecordingPartUnavailable, type SavedRecordingReadOptions, type SavedRecordingSizes, type SavedRecordingUnavailable, type SavedRecordingWholeOptions, } from './recorders/observability/recordingParts/open.js';
|
|
44
44
|
export { contextShapeAt, type RecordedContextShape, } from './recorders/observability/contextShapes/read.js';
|
|
45
45
|
export type { ContextShapeIndex, ContextShapeOptions, ShapeEntry, } from './recorders/observability/contextShapes.js';
|
|
46
46
|
export { recordContextRun, readContextRecording, applyContextChange, contextCallCommentary, ContextRecordingError, type ContextRunRecorder, type RecordContextRunOptions, type ContextCallChange, type ContextValueWriter, type ContextValueReader, type ContextValueRecording, type OpenContextValues, type ReadContextRecording, } from './recorders/observability/contextRecording.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,eAAe,EACf,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,sBAAs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Z,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,GACX,MAAM,2BAA2B,CAAC"}
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
* loop.iteration → loop-iteration StepEdge
|
|
39
39
|
* context.injected → attached to NEXT user→llm / tool→llm StepNode
|
|
40
40
|
*
|
|
41
|
+
* A sub-flow event's `payload` becomes `entryPayload` / `exitPayload` (on the
|
|
42
|
+
* subflow node, or the slot boundary of the next model call). An event read
|
|
43
|
+
* from a recording saved in parts may carry `payloadWith: 'invocation'`
|
|
44
|
+
* instead (the payload lives with that invocation): it becomes
|
|
45
|
+
* `entryPayloadWith` / `exitPayloadWith: 'invocation'`, never an empty value.
|
|
46
|
+
*
|
|
41
47
|
* Result: a one-to-one correspondence between visible scrubbable steps
|
|
42
48
|
* and DomainEvents. Adding a new event type adds one mapping line here
|
|
43
49
|
* (or in the pure projection); no state machine, no merging.
|
|
@@ -45,126 +51,8 @@
|
|
|
45
51
|
import type { CombinedRecorder } from 'footprintjs';
|
|
46
52
|
import type { EventDispatcher } from '../../events/dispatcher.js';
|
|
47
53
|
import { BoundaryRecorder, type DomainEvent } from './BoundaryRecorder.js';
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* (actor icon, color). ReAct steps carry token + tool details; topology
|
|
51
|
-
* nodes (subflow / fork-branch / decision-branch) mirror the footprintjs
|
|
52
|
-
* composition events and exist so composition structure (Loop, Parallel,
|
|
53
|
-
* Conditional, Swarm) stays visible in the graph.
|
|
54
|
-
*/
|
|
55
|
-
export interface StepNode {
|
|
56
|
-
readonly id: string;
|
|
57
|
-
readonly kind: 'user->llm' | 'llm->tool' | 'tool->llm' | 'llm->user' | 'subflow' | 'fork-branch' | 'decision-branch';
|
|
58
|
-
readonly label: string;
|
|
59
|
-
readonly startOffsetMs: number;
|
|
60
|
-
readonly endOffsetMs?: number;
|
|
61
|
-
/** LLM step: token usage of the call that bounded this step. */
|
|
62
|
-
readonly tokens?: {
|
|
63
|
-
readonly in: number;
|
|
64
|
-
readonly out: number;
|
|
65
|
-
};
|
|
66
|
-
/** llm->tool / tool->llm: the tool name. */
|
|
67
|
-
readonly toolName?: string;
|
|
68
|
-
/** user->llm / tool->llm: the model that was invoked. */
|
|
69
|
-
readonly llmModel?: string;
|
|
70
|
-
/** Decomposition of the underlying subflowId (rooted under '__root__'). */
|
|
71
|
-
readonly subflowPath: readonly string[];
|
|
72
|
-
/** Context injections attributed to this step (LLM steps only). */
|
|
73
|
-
readonly injections?: readonly ContextInjection[];
|
|
74
|
-
/** 1-based ReAct iteration this step belongs to. Undefined for
|
|
75
|
-
* topology / composition nodes. */
|
|
76
|
-
readonly iterationIndex?: number;
|
|
77
|
-
/** Which slot the step's input updated. ReAct steps only. */
|
|
78
|
-
readonly slotUpdated?: 'system-prompt' | 'messages' | 'tools';
|
|
79
|
-
/** True ONLY for `subflow` StepNodes whose primitiveKind is `'Agent'`.
|
|
80
|
-
* Narrow flag for callers that distinguish ReAct agents from other
|
|
81
|
-
* composition primitives (cost / iteration / token attribution). */
|
|
82
|
-
readonly isAgentBoundary?: boolean;
|
|
83
|
-
/** Primitive kind from the subflow root description prefix
|
|
84
|
-
* (`'Agent'` / `'LLMCall'` / `'Sequence'` / etc.). */
|
|
85
|
-
readonly primitiveKind?: string;
|
|
86
|
-
/** True for `subflow` StepNodes representing any KNOWN primitive
|
|
87
|
-
* (Agent / LLMCall / Sequence / Parallel / Conditional / Loop) —
|
|
88
|
-
* drives Lens's drill-in container treatment. */
|
|
89
|
-
readonly isPrimitiveBoundary?: boolean;
|
|
90
|
-
/** `inputMapper` payload at the subflow's entry. Subflow nodes only. */
|
|
91
|
-
readonly entryPayload?: unknown;
|
|
92
|
-
/** Subflow shared state at exit. Subflow nodes only.
|
|
93
|
-
* Undefined for in-progress / paused subflows. */
|
|
94
|
-
readonly exitPayload?: unknown;
|
|
95
|
-
/** LLM's text content. Set on `llm->tool` (the reasoning emitted with the
|
|
96
|
-
* tool_use blocks) and on `llm->user` (the terminal answer). */
|
|
97
|
-
readonly assistantText?: string;
|
|
98
|
-
/** Tool input arguments the LLM produced. Set on `llm->tool` from the
|
|
99
|
-
* matching `tool.start` event payload. */
|
|
100
|
-
readonly toolArgs?: unknown;
|
|
101
|
-
/** Tool result returned to the LLM. Set on `tool->llm` from the
|
|
102
|
-
* preceding `tool.end` event payload. */
|
|
103
|
-
readonly toolResult?: unknown;
|
|
104
|
-
/** Stable per-execution key — same `runtimeStageId` Trace view uses. */
|
|
105
|
-
readonly runtimeStageId?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Slot boundary payloads composed for THIS LLM step.
|
|
108
|
-
*
|
|
109
|
-
* Set ONLY for `kind === 'user->llm'` and `kind === 'tool->llm'`
|
|
110
|
-
* StepNodes — the moments where context flows INTO the LLM. Each
|
|
111
|
-
* entry carries the slot subflow's `inputMapper` result (entryPayload)
|
|
112
|
-
* and rendered slot output (exitPayload).
|
|
113
|
-
*
|
|
114
|
-
* Attribution: any slot subflow that fired BETWEEN the previous LLM
|
|
115
|
-
* end (or run start) and THIS LLM start is attributed to this call.
|
|
116
|
-
* Done at projection time over `boundary.getEvents()`; no consumer-
|
|
117
|
-
* side correlation required.
|
|
118
|
-
*
|
|
119
|
-
* Lens uses this to make the 3 slot rows inside the LLM card
|
|
120
|
-
* clickable — clicking a slot reveals its entry/exit payloads in
|
|
121
|
-
* the right-pane detail panel without needing direct BoundaryRecorder
|
|
122
|
-
* access.
|
|
123
|
-
*/
|
|
124
|
-
readonly slotBoundaries?: {
|
|
125
|
-
readonly systemPrompt?: SlotBoundary;
|
|
126
|
-
readonly messages?: SlotBoundary;
|
|
127
|
-
readonly tools?: SlotBoundary;
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
/** One slot's boundary pair attributed to a specific LLM step. */
|
|
131
|
-
export interface SlotBoundary {
|
|
132
|
-
/** runtimeStageId of the slot subflow execution. */
|
|
133
|
-
readonly runtimeStageId: string;
|
|
134
|
-
/** `inputMapper` payload — the data the slot was COMPOSED FROM
|
|
135
|
-
* (RAG hits, skill content, user message, tool result, etc). */
|
|
136
|
-
readonly entryPayload?: unknown;
|
|
137
|
-
/** Subflow shared state at exit — the rendered slot content
|
|
138
|
-
* (system prompt string, messages array, tools array). */
|
|
139
|
-
readonly exitPayload?: unknown;
|
|
140
|
-
}
|
|
141
|
-
/** Consumer-facing context injection (5 axes of context engineering). */
|
|
142
|
-
export interface ContextInjection {
|
|
143
|
-
readonly slot: 'system-prompt' | 'messages' | 'tools';
|
|
144
|
-
readonly asRole?: 'system' | 'user' | 'assistant' | 'tool';
|
|
145
|
-
readonly source: string;
|
|
146
|
-
readonly sourceId?: string;
|
|
147
|
-
readonly contentSummary?: string;
|
|
148
|
-
readonly reason?: string;
|
|
149
|
-
readonly sectionTag?: string;
|
|
150
|
-
readonly upstreamRef?: string;
|
|
151
|
-
readonly retrievalScore?: number;
|
|
152
|
-
readonly rankPosition?: number;
|
|
153
|
-
readonly budgetTokens?: number;
|
|
154
|
-
readonly budgetFraction?: number;
|
|
155
|
-
}
|
|
156
|
-
export interface StepEdge {
|
|
157
|
-
readonly id: string;
|
|
158
|
-
readonly from: string;
|
|
159
|
-
readonly to: string;
|
|
160
|
-
readonly kind: 'next' | 'loop-iteration' | 'fork-branch' | 'decision-branch';
|
|
161
|
-
readonly iteration?: number;
|
|
162
|
-
}
|
|
163
|
-
export interface StepGraph {
|
|
164
|
-
readonly nodes: readonly StepNode[];
|
|
165
|
-
readonly edges: readonly StepEdge[];
|
|
166
|
-
readonly activeNodeId?: string;
|
|
167
|
-
}
|
|
54
|
+
import type { StepGraph } from './stepGraphTypes.js';
|
|
55
|
+
export type { ContextInjection, SlotBoundary, StepEdge, StepGraph, StepNode, } from './stepGraphTypes.js';
|
|
168
56
|
export interface FlowchartOptions {
|
|
169
57
|
/** Called each time the graph changes; fires synchronously on the
|
|
170
58
|
* driving event so the UI updates the moment the structure changes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowchartRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/FlowchartRecorder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"FlowchartRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/FlowchartRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,gBAAgB,EAEhB,KAAK,WAAW,EAEjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAIV,SAAS,EAEV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B;4EACwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B;uBACmB;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC;IACtC;;sBAEkB;IAClB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,MAAM,IAAI,EACxD,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,gBAAqB,EAC9B,cAAc,CAAC,EAAE,MAAM,MAAM,GAC5B,eAAe,CAmCjB;AA2ED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAqUlF"}
|
|
@@ -53,6 +53,15 @@ export interface DomainSubflowEvent extends DomainEventBase {
|
|
|
53
53
|
readonly isAgentInternal: boolean;
|
|
54
54
|
/** `inputMapper` result on entry; subflow shared state on exit. */
|
|
55
55
|
readonly payload?: unknown;
|
|
56
|
+
/**
|
|
57
|
+
* Set ONLY on an event read from a recording saved in parts (index format
|
|
58
|
+
* 2), in place of `payload`: the payload lives with the invocation this
|
|
59
|
+
* event's `runtimeStageId` names, read with
|
|
60
|
+
* `openSavedRecording(…).readInvocation(runtimeStageId)` (its `payloads`).
|
|
61
|
+
* The row's `meta.subflowPayloads` is `'with-invocation'` then. No mark and
|
|
62
|
+
* no `payload` means none was recorded. The live stream never carries it.
|
|
63
|
+
*/
|
|
64
|
+
readonly payloadWith?: 'invocation';
|
|
56
65
|
}
|
|
57
66
|
export interface DomainForkBranchEvent extends DomainEventBase {
|
|
58
67
|
readonly type: 'fork.branch';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainEvents.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/boundaryRecorder/domainEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIpF,yCAAyC;AACzC,UAAU,eAAe;IACvB;;wEAEoE;IACpE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CA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AAM,MAAM,WAAW,GACnB,cAAc,GACd,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,GACxB,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,0BAA0B,CAAC"}
|
|
@@ -13,10 +13,29 @@
|
|
|
13
13
|
* decides before reading bytes is decided from it, so everything in it is
|
|
14
14
|
* checked here before anything else trusts it.
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The format marker of an index the writer writes: format 2, where an
|
|
18
|
+
* invocation's sub-flow entry and exit payloads live with the invocation
|
|
19
|
+
* (`recordingParts/subflowPayloads.ts`). A v2 index names v2 parts.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RECORDING_INDEX_FORMAT = "agentfootprint.recording.index.v2";
|
|
22
|
+
/** Format 1, still read: every payload in the base row. A v1 index names v1 parts; no mix. */
|
|
23
|
+
export declare const RECORDING_INDEX_FORMAT_V1 = "agentfootprint.recording.index.v1";
|
|
24
|
+
/** The format marker of a part (the base part and every invocation part) a v2 index names. */
|
|
25
|
+
export declare const RECORDING_PART_FORMAT = "agentfootprint.recording.part.v2";
|
|
26
|
+
/** The part format a v1 index names. */
|
|
27
|
+
export declare const RECORDING_PART_FORMAT_V1 = "agentfootprint.recording.part.v1";
|
|
28
|
+
/** Either index format this reader admits. */
|
|
29
|
+
export type RecordingIndexFormat = typeof RECORDING_INDEX_FORMAT | typeof RECORDING_INDEX_FORMAT_V1;
|
|
30
|
+
/** The part format an index of `format` names. */
|
|
31
|
+
export declare function partFormatOf(format: RecordingIndexFormat): string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether `value` is an index of a format this reader does not know: a plain
|
|
34
|
+
* object whose `format` is spelled `agentfootprint.recording.index.v<N>` for
|
|
35
|
+
* another N. A reader answers it `unsupported-format`, so the next bump is
|
|
36
|
+
* honest; anything else it cannot admit stays `invalid-index`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isUnsupportedIndexFormat(value: unknown): boolean;
|
|
20
39
|
/**
|
|
21
40
|
* The size a part is filled to: 1 MiB of JSON text. A part holds whole
|
|
22
41
|
* results only, so one result bigger than this is a part of its own.
|
|
@@ -48,6 +67,22 @@ export interface StoredPartEntry {
|
|
|
48
67
|
/** One invocation part: the stored artifact and how many results it holds. */
|
|
49
68
|
export interface IndexPartEntry extends StoredPartEntry {
|
|
50
69
|
readonly results: number;
|
|
70
|
+
/** Format 2 only (required there): how many `'stored'` payloads the part holds. */
|
|
71
|
+
readonly payloads?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* How one sub-flow boundary payload left the base row (format 2):
|
|
75
|
+
* - `'same'` proven at the cut by equal JSON text to the result's own value
|
|
76
|
+
* (entry: `treeContext.history[0].overwrite`, exit:
|
|
77
|
+
* `treeContext.globalContext`); nothing is stored for it.
|
|
78
|
+
* - `'stored'` the texts differ; the payload is stored in the invocation's
|
|
79
|
+
* part, beside its result (never inside it).
|
|
80
|
+
*/
|
|
81
|
+
export type IndexPayloadPlace = 'same' | 'stored';
|
|
82
|
+
/** Where one invocation's moved payloads are (format 2). At least one of the two is present. */
|
|
83
|
+
export interface IndexInvocationPayloads {
|
|
84
|
+
readonly entry?: IndexPayloadPlace;
|
|
85
|
+
readonly exit?: IndexPayloadPlace;
|
|
51
86
|
}
|
|
52
87
|
/** One recorded invocation. `part` is `null` when the tree mounts it but no result was recorded. */
|
|
53
88
|
export interface IndexInvocation {
|
|
@@ -59,6 +94,40 @@ export interface IndexInvocation {
|
|
|
59
94
|
readonly part: number | null;
|
|
60
95
|
/** Compact JSON bytes of this one result; present exactly when `part` is a number. */
|
|
61
96
|
readonly bytes?: number;
|
|
97
|
+
/** Format 2: present exactly when one of its payloads moved (never when `part` is `null`). */
|
|
98
|
+
readonly payloads?: IndexInvocationPayloads;
|
|
99
|
+
/** Format 2: present exactly when a payload is `'same'`; the plain JSON bytes a whole read restores from the result. */
|
|
100
|
+
readonly restoredBytes?: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Format 2: the sub-flow payload counts. `same`, `stored` and `restoredBytes`
|
|
104
|
+
* equal the sums over the invocations, and `stored` the sum over the parts:
|
|
105
|
+
* `readRecordingIndex` admits nothing else.
|
|
106
|
+
*/
|
|
107
|
+
export interface IndexSubflowPayloads {
|
|
108
|
+
readonly same: number;
|
|
109
|
+
readonly stored: number;
|
|
110
|
+
readonly restoredBytes: number;
|
|
111
|
+
/**
|
|
112
|
+
* Positions in `snapshot.recorders` of the rows the cut marked, ascending:
|
|
113
|
+
* the only rows a reader restores. Empty exactly when nothing moved. A row
|
|
114
|
+
* that arrived carrying the row fact or the mark key is never listed: it
|
|
115
|
+
* is kept whole, as the recording's own data.
|
|
116
|
+
*/
|
|
117
|
+
readonly rows: readonly number[];
|
|
118
|
+
/** Sub-flow payloads left whole in the base row, by why. */
|
|
119
|
+
readonly kept: {
|
|
120
|
+
/** The rows do not hold exactly one entry and at most one exit with that id and its `subflowId`. */
|
|
121
|
+
readonly ambiguous: number;
|
|
122
|
+
/**
|
|
123
|
+
* `payload` is not the event's last key, or its row cannot carry a mark
|
|
124
|
+
* (not a BoundaryEvents row in full mode, or one of its events already
|
|
125
|
+
* holds the mark's key).
|
|
126
|
+
*/
|
|
127
|
+
readonly notLast: number;
|
|
128
|
+
/** No indexed invocation with a part has that id (a paused mount, or not an index key). */
|
|
129
|
+
readonly noPart: number;
|
|
130
|
+
};
|
|
62
131
|
}
|
|
63
132
|
/** A path alias of `subflowResults`: proven equal to an execution key's result, or stored itself. */
|
|
64
133
|
export type IndexAlias = {
|
|
@@ -75,7 +144,7 @@ export interface IndexUnmounted {
|
|
|
75
144
|
}
|
|
76
145
|
/** An admitted index. */
|
|
77
146
|
export interface RecordingIndex {
|
|
78
|
-
readonly format:
|
|
147
|
+
readonly format: RecordingIndexFormat;
|
|
79
148
|
/** The run the recording was filed for (`origin.runId`). */
|
|
80
149
|
readonly runId?: string;
|
|
81
150
|
/** `snapshot.runId`, the engine's executor id. */
|
|
@@ -90,9 +159,11 @@ export interface RecordingIndex {
|
|
|
90
159
|
readonly invocations: readonly IndexInvocation[];
|
|
91
160
|
readonly aliases: readonly IndexAlias[];
|
|
92
161
|
readonly unmounted: readonly IndexUnmounted[];
|
|
162
|
+
/** Present exactly when `format` is format 2. */
|
|
163
|
+
readonly subflowPayloads?: IndexSubflowPayloads;
|
|
93
164
|
}
|
|
94
165
|
/** Everything in an index except the refs the store mints. */
|
|
95
|
-
export type IndexDraft = Omit<RecordingIndex, '
|
|
166
|
+
export type IndexDraft = Omit<RecordingIndex, 'base' | 'parts'> & {
|
|
96
167
|
readonly base: Omit<StoredPartEntry, 'ref'>;
|
|
97
168
|
readonly parts: readonly Omit<IndexPartEntry, 'ref'>[];
|
|
98
169
|
};
|
|
@@ -114,12 +185,16 @@ export declare function pathKey(path: readonly string[]): string;
|
|
|
114
185
|
/**
|
|
115
186
|
* Admit an index read back from a store, or refuse it whole (`undefined`).
|
|
116
187
|
*
|
|
117
|
-
* Checked: the exact field set at every level, plain data only;
|
|
118
|
-
* artifact grammar; digests in `sha-256:<hex>`; byte counts; part
|
|
119
|
-
* range; unique, canonical execution keys; bounded paths that end
|
|
120
|
-
* and whose every prefix is itself an invocation; aliases that
|
|
121
|
-
* key or a part; per-part result counts that match the
|
|
122
|
-
* unmounted results that name the part; `complete` that
|
|
188
|
+
* Checked: the exact field set at every level for its format, plain data only;
|
|
189
|
+
* refs in the artifact grammar; digests in `sha-256:<hex>`; byte counts; part
|
|
190
|
+
* ordinals in range; unique, canonical execution keys; bounded paths that end
|
|
191
|
+
* at their key and whose every prefix is itself an invocation; aliases that
|
|
192
|
+
* name a stored key or a part; per-part result counts that match the
|
|
193
|
+
* invocations and unmounted results that name the part; `complete` that
|
|
194
|
+
* admits what is listed. Format 2 also: every invocation's payload places,
|
|
195
|
+
* only on an invocation with a part, its `restoredBytes` exactly when one is
|
|
196
|
+
* `'same'`, and the counts equal to the sums over the invocations and the parts.
|
|
197
|
+
* An unknown format is refused here too; `isUnsupportedIndexFormat` names it.
|
|
123
198
|
*/
|
|
124
199
|
export declare function readRecordingIndex(value: unknown): RecordingIndex | undefined;
|
|
125
200
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/recordingParts/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/recordingParts/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,sCAAsC,CAAC;AAE1E,8FAA8F;AAC9F,eAAO,MAAM,yBAAyB,sCAAsC,CAAC;AAE7E,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AAExE,wCAAwC;AACxC,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAEpG,kDAAkD;AAClD,wBAAgB,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAEjE;AAKD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAShE;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,QAAc,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;IAOjC,wDAAwD;;EAExD,CAAC;AAEH,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kEAA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