agentfootprint 7.4.0 → 7.6.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/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +108 -11
- package/ai-instructions/claude-code/SKILL.md +1 -1
- package/dist/core/Agent.js +19 -1
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/RunnerBase.js +12 -1
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +33 -1
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +225 -16
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/checkin.js +266 -0
- package/dist/core/checkin.js.map +1 -0
- package/dist/core/pause.js +17 -1
- package/dist/core/pause.js.map +1 -1
- package/dist/core/tools.js +3 -0
- package/dist/core/tools.js.map +1 -1
- package/dist/debug.js +17 -2
- package/dist/debug.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +6 -1
- package/dist/esm/core/Agent.js +19 -1
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +12 -1
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +27 -0
- package/dist/esm/core/agent/AgentBuilder.js +33 -1
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +9 -0
- package/dist/esm/core/agent/stages/toolCalls.js +225 -16
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +2 -0
- package/dist/esm/core/checkin.d.ts +263 -0
- package/dist/esm/core/checkin.js +254 -0
- package/dist/esm/core/checkin.js.map +1 -0
- package/dist/esm/core/pause.d.ts +24 -0
- package/dist/esm/core/pause.js +15 -0
- package/dist/esm/core/pause.js.map +1 -1
- package/dist/esm/core/tools.d.ts +19 -0
- package/dist/esm/core/tools.js +3 -0
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/debug.d.ts +3 -2
- package/dist/esm/debug.js +10 -2
- package/dist/esm/debug.js.map +1 -1
- package/dist/esm/events/dispatcher.d.ts +1 -1
- package/dist/esm/events/dispatcher.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +19 -0
- package/dist/esm/events/registry.d.ts +7 -1
- package/dist/esm/events/registry.js +6 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +9 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/index.d.ts +1 -0
- package/dist/esm/lib/context-bisect/index.js +3 -0
- package/dist/esm/lib/context-bisect/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/localize.d.ts +6 -2
- package/dist/esm/lib/context-bisect/localize.js +19 -3
- package/dist/esm/lib/context-bisect/localize.js.map +1 -1
- package/dist/esm/lib/context-bisect/rerun.d.ts +123 -0
- package/dist/esm/lib/context-bisect/rerun.js +155 -0
- package/dist/esm/lib/context-bisect/rerun.js.map +1 -0
- package/dist/esm/lib/context-bisect/types.d.ts +8 -0
- package/dist/esm/lib/context-bisect/types.js.map +1 -1
- package/dist/esm/lib/influence-core/index.d.ts +2 -0
- package/dist/esm/lib/influence-core/index.js +2 -0
- package/dist/esm/lib/influence-core/index.js.map +1 -1
- package/dist/esm/lib/influence-core/lexical.d.ts +60 -0
- package/dist/esm/lib/influence-core/lexical.js +142 -0
- package/dist/esm/lib/influence-core/lexical.js.map +1 -0
- package/dist/esm/lib/influence-core/signals.d.ts +5 -0
- package/dist/esm/lib/influence-core/signals.js +6 -2
- package/dist/esm/lib/influence-core/signals.js.map +1 -1
- package/dist/esm/lib/influence-core/strategies.d.ts +51 -0
- package/dist/esm/lib/influence-core/strategies.js +29 -0
- package/dist/esm/lib/influence-core/strategies.js.map +1 -0
- package/dist/esm/lib/recorded-chat/index.d.ts +11 -0
- package/dist/esm/lib/recorded-chat/index.js +11 -0
- package/dist/esm/lib/recorded-chat/index.js.map +1 -0
- package/dist/esm/lib/recorded-chat/recordedChat.d.ts +20 -0
- package/dist/esm/lib/recorded-chat/recordedChat.js +240 -0
- package/dist/esm/lib/recorded-chat/recordedChat.js.map +1 -0
- package/dist/esm/lib/recorded-chat/types.d.ts +182 -0
- package/dist/esm/lib/recorded-chat/types.js +31 -0
- package/dist/esm/lib/recorded-chat/types.js.map +1 -0
- package/dist/esm/recorders/core/CheckInRecorder.d.ts +90 -0
- package/dist/esm/recorders/core/CheckInRecorder.js +109 -0
- package/dist/esm/recorders/core/CheckInRecorder.js.map +1 -0
- package/dist/events/dispatcher.js.map +1 -1
- package/dist/events/registry.js +6 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/context-bisect/index.js +6 -1
- package/dist/lib/context-bisect/index.js.map +1 -1
- package/dist/lib/context-bisect/localize.js +19 -3
- package/dist/lib/context-bisect/localize.js.map +1 -1
- package/dist/lib/context-bisect/rerun.js +160 -0
- package/dist/lib/context-bisect/rerun.js.map +1 -0
- package/dist/lib/context-bisect/types.js.map +1 -1
- package/dist/lib/influence-core/index.js +7 -1
- package/dist/lib/influence-core/index.js.map +1 -1
- package/dist/lib/influence-core/lexical.js +146 -0
- package/dist/lib/influence-core/lexical.js.map +1 -0
- package/dist/lib/influence-core/signals.js +8 -3
- package/dist/lib/influence-core/signals.js.map +1 -1
- package/dist/lib/influence-core/strategies.js +33 -0
- package/dist/lib/influence-core/strategies.js.map +1 -0
- package/dist/lib/recorded-chat/index.js +15 -0
- package/dist/lib/recorded-chat/index.js.map +1 -0
- package/dist/lib/recorded-chat/recordedChat.js +244 -0
- package/dist/lib/recorded-chat/recordedChat.js.map +1 -0
- package/dist/lib/recorded-chat/types.js +32 -0
- package/dist/lib/recorded-chat/types.js.map +1 -0
- package/dist/recorders/core/CheckInRecorder.js +114 -0
- package/dist/recorders/core/CheckInRecorder.js.map +1 -0
- package/dist/types/core/Agent.d.ts +6 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +27 -0
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +9 -0
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +2 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/checkin.d.ts +264 -0
- package/dist/types/core/checkin.d.ts.map +1 -0
- package/dist/types/core/pause.d.ts +24 -0
- package/dist/types/core/pause.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +19 -0
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/debug.d.ts +3 -2
- package/dist/types/debug.d.ts.map +1 -1
- package/dist/types/events/dispatcher.d.ts +1 -1
- package/dist/types/events/dispatcher.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +19 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +7 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/index.d.ts +1 -0
- package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/localize.d.ts +6 -2
- package/dist/types/lib/context-bisect/localize.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/rerun.d.ts +124 -0
- package/dist/types/lib/context-bisect/rerun.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/types.d.ts +8 -0
- package/dist/types/lib/context-bisect/types.d.ts.map +1 -1
- package/dist/types/lib/influence-core/index.d.ts +2 -0
- package/dist/types/lib/influence-core/index.d.ts.map +1 -1
- package/dist/types/lib/influence-core/lexical.d.ts +61 -0
- package/dist/types/lib/influence-core/lexical.d.ts.map +1 -0
- package/dist/types/lib/influence-core/signals.d.ts +5 -0
- package/dist/types/lib/influence-core/signals.d.ts.map +1 -1
- package/dist/types/lib/influence-core/strategies.d.ts +52 -0
- package/dist/types/lib/influence-core/strategies.d.ts.map +1 -0
- package/dist/types/lib/recorded-chat/index.d.ts +12 -0
- package/dist/types/lib/recorded-chat/index.d.ts.map +1 -0
- package/dist/types/lib/recorded-chat/recordedChat.d.ts +21 -0
- package/dist/types/lib/recorded-chat/recordedChat.d.ts.map +1 -0
- package/dist/types/lib/recorded-chat/types.d.ts +183 -0
- package/dist/types/lib/recorded-chat/types.d.ts.map +1 -0
- package/dist/types/recorders/core/CheckInRecorder.d.ts +91 -0
- package/dist/types/recorders/core/CheckInRecorder.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordedChat.js","sourceRoot":"","sources":["../../../../src/lib/recorded-chat/recordedChat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GAMpB,MAAM,4BAA4B,CAAC;AAepC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAC9C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAE5C,wEAAwE;AACxE,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACzC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAA8B,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACnE,MAAM,CAAC,CAAC,CAAC,GAAI,GAA+B,CAAC,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AAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnE,IAAI;YACJ,OAAO;SACR,CAAC,CAAC;QACH,KAAK,CAAC,eAAe,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1F,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,OAA4B;IACvD,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* recorded-chat types — the session-scoped turn recorder over the existing
|
|
3
|
+
* context-bisect product loop (localizeContextBug + rerunWithoutSources +
|
|
4
|
+
* removableSources).
|
|
5
|
+
*
|
|
6
|
+
* WHY THIS EXISTS: multi-turn chat on agentfootprint is a HOST convention —
|
|
7
|
+
* `AgentInput` has no history field, so hosts thread the transcript into the
|
|
8
|
+
* `message` string themselves. Every chat host that wanted per-turn
|
|
9
|
+
* transparency then re-wrote the same correctness-critical glue and got three
|
|
10
|
+
* things subtly wrong:
|
|
11
|
+
*
|
|
12
|
+
* 1. `agent.getLastSnapshot()` is last-run-only — a second `run()` clobbers
|
|
13
|
+
* it, so reasoning about turn K after turn K+1 ran silently attributes
|
|
14
|
+
* the wrong run.
|
|
15
|
+
* 2. History is a convention — the transcript preamble must be BYTE-identical
|
|
16
|
+
* between the recorded turn and its counterfactual re-run, or the re-run
|
|
17
|
+
* ablates a subtly different scenario without failing anything.
|
|
18
|
+
* 3. The `AblationRunner` duplicates turn construction — the re-run is only
|
|
19
|
+
* valid if the rebuilt turn matches the recorded one (same system, facts,
|
|
20
|
+
* preamble).
|
|
21
|
+
*
|
|
22
|
+
* `recordedChat({ makeAgent })` owns exactly those three: per-turn artifact
|
|
23
|
+
* freezing (1), byte-exact history threading (2), and deriving the turn-K
|
|
24
|
+
* runner from the SAME `makeAgent` that ran the turn (3). It COMPOSES with the
|
|
25
|
+
* 7.5 surface — `reason()` calls `localizeContextBug`, `rerunTurn()` delegates
|
|
26
|
+
* to `rerunWithoutSources` and returns its result UNMODIFIED (the honesty
|
|
27
|
+
* tiers are not hidden). Session registries, UI joins, comparators and
|
|
28
|
+
* persistence stay host-side by design (see the guide's "What stays yours").
|
|
29
|
+
*/
|
|
30
|
+
import type { RuntimeSnapshot } from 'footprintjs';
|
|
31
|
+
import type { Agent } from '../../core/Agent.js';
|
|
32
|
+
import type { MemoryIdentity } from '../../memory/identity/types.js';
|
|
33
|
+
import type { AblationSpec, CapturedEventLike, ContextBugReport, LocalizeContextBugOptions, RerunWithoutSourcesOptions, RerunWithoutSourcesResult } from '../context-bisect/index.js';
|
|
34
|
+
/**
|
|
35
|
+
* The ONE agent factory — live turns, rerun probes, baseline probes, and
|
|
36
|
+
* fork turns all go through it (the single source of truth the
|
|
37
|
+
* `AblationRunner` contract already demands).
|
|
38
|
+
*
|
|
39
|
+
* Contract (the `AblationRunner` contract, now enforced-by-shape for live
|
|
40
|
+
* turns too):
|
|
41
|
+
* - Return a FRESH agent with a FRESH provider on every call — scripted
|
|
42
|
+
* mock providers are stateful (replies consume in order).
|
|
43
|
+
* - Apply `specs` at CONSTRUCTION (the documented seam): filter facts /
|
|
44
|
+
* tools / memory entries with `applyAblations(specs, { ... })` before
|
|
45
|
+
* building. `specs` is ALWAYS the union of the session's persistent
|
|
46
|
+
* removals (forks carry these) and the probe's ablation specs; it is
|
|
47
|
+
* empty for a plain live turn in an unforked session.
|
|
48
|
+
* - `seed` varies 0..N-1 across a probe's samples (always 0 for live
|
|
49
|
+
* turns). Thread it into any stochastic knob; ignore it when the agent
|
|
50
|
+
* is deterministic.
|
|
51
|
+
*/
|
|
52
|
+
export type MakeChatAgent = (build: {
|
|
53
|
+
readonly specs: readonly AblationSpec[];
|
|
54
|
+
readonly seed: number;
|
|
55
|
+
}) => Agent | Promise<Agent>;
|
|
56
|
+
/** How transcript lines and the per-turn message string are rendered. */
|
|
57
|
+
export interface ChatFormat {
|
|
58
|
+
/** Preamble header line. Default `'Recent conversation:'`. */
|
|
59
|
+
readonly header?: string;
|
|
60
|
+
/** Label for user lines (`'<userLabel>: ...'`). Default `'User'`. */
|
|
61
|
+
readonly userLabel?: string;
|
|
62
|
+
/** Label for reply lines. Default `'Assistant'`. */
|
|
63
|
+
readonly assistantLabel?: string;
|
|
64
|
+
}
|
|
65
|
+
/** One transcript entry — the structured form of a rendered line. */
|
|
66
|
+
export interface ChatMessage {
|
|
67
|
+
readonly role: 'user' | 'assistant';
|
|
68
|
+
readonly text: string;
|
|
69
|
+
}
|
|
70
|
+
export interface RecordedChatOptions {
|
|
71
|
+
readonly makeAgent: MakeChatAgent;
|
|
72
|
+
readonly format?: ChatFormat;
|
|
73
|
+
/**
|
|
74
|
+
* Transcript the session OPENS with (frozen; rendered as the seed
|
|
75
|
+
* preamble of every turn). `fork()` fills this; hosts may also pass a
|
|
76
|
+
* persisted transcript to rehydrate a session — authenticity of a
|
|
77
|
+
* hand-supplied seed is then the host's responsibility.
|
|
78
|
+
*/
|
|
79
|
+
readonly seed?: readonly ChatMessage[];
|
|
80
|
+
/**
|
|
81
|
+
* Session-persistent removals: every turn (and every probe) in this
|
|
82
|
+
* session runs with these specs applied. `fork()` fills this so the
|
|
83
|
+
* what-if world STAYS the what-if world.
|
|
84
|
+
*/
|
|
85
|
+
readonly removed?: readonly AblationSpec[];
|
|
86
|
+
}
|
|
87
|
+
/** One recorded turn — everything frozen at record time. */
|
|
88
|
+
export interface ChatTurn {
|
|
89
|
+
/** 0-based position in `turns`. */
|
|
90
|
+
readonly index: number;
|
|
91
|
+
readonly userMessage: string;
|
|
92
|
+
/** The agent's reply (agentfootprint `AgentOutput` string). */
|
|
93
|
+
readonly reply: string;
|
|
94
|
+
/**
|
|
95
|
+
* The EXACT message string `agent.run()` received — composed once at
|
|
96
|
+
* record time. Re-runs of this turn replay these bytes verbatim; the
|
|
97
|
+
* byte-exact-history guarantee lives here.
|
|
98
|
+
*/
|
|
99
|
+
readonly message: string;
|
|
100
|
+
/** Rendered transcript lines the turn opened with (frozen copy). */
|
|
101
|
+
readonly transcriptBefore: readonly string[];
|
|
102
|
+
/**
|
|
103
|
+
* Localize-ready evidence: pass straight to
|
|
104
|
+
* `localizeContextBug({ artifacts: turn.artifacts, ... })`.
|
|
105
|
+
*/
|
|
106
|
+
readonly artifacts: {
|
|
107
|
+
readonly snapshot: RuntimeSnapshot;
|
|
108
|
+
readonly events: readonly CapturedEventLike[];
|
|
109
|
+
};
|
|
110
|
+
/** runtimeStageId of the turn's LAST LLM call — the default `atStep`. */
|
|
111
|
+
readonly lastLlmCallId: string | undefined;
|
|
112
|
+
/** The identity `send()` was given, threaded into re-runs unchanged. */
|
|
113
|
+
readonly identity: MemoryIdentity | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface SendOptions {
|
|
116
|
+
/** Multi-tenant memory scope, passed through to `agent.run()`. */
|
|
117
|
+
readonly identity?: MemoryIdentity;
|
|
118
|
+
}
|
|
119
|
+
/** `reason(k)` options — localize passthrough minus what the turn provides. */
|
|
120
|
+
export interface ReasonOptions extends Omit<LocalizeContextBugOptions, 'artifacts' | 'rerun'> {
|
|
121
|
+
/** Recompute even if a memoized report exists (e.g. a new scorer). */
|
|
122
|
+
readonly fresh?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/** `rerunTurn(k)` options — `rerunWithoutSources` minus what the turn provides. */
|
|
125
|
+
export interface RerunTurnOptions extends Omit<RerunWithoutSourcesOptions, 'report' | 'runner' | 'originalAnswer'> {
|
|
126
|
+
/**
|
|
127
|
+
* The report to resolve `ignore` against. Default: the turn's memoized
|
|
128
|
+
* `reason(k)` report (computed with this call's `embedder` + the default
|
|
129
|
+
* scorer if none exists yet).
|
|
130
|
+
*/
|
|
131
|
+
readonly report?: ContextBugReport;
|
|
132
|
+
}
|
|
133
|
+
export interface ForkOptions {
|
|
134
|
+
/**
|
|
135
|
+
* Seed the fork's last reply with this counterfactual answer. MUST be a
|
|
136
|
+
* result produced by THIS session's `rerunTurn(k, ...)` for the SAME k
|
|
137
|
+
* (identity-checked) — a fabricated fork would be a lie. Omitted: the
|
|
138
|
+
* fork continues from the ORIGINAL reply (a plain branch, no ablation).
|
|
139
|
+
*/
|
|
140
|
+
readonly fromRerun?: RerunWithoutSourcesResult;
|
|
141
|
+
}
|
|
142
|
+
export interface ForkOrigin {
|
|
143
|
+
readonly parent: RecordedChat;
|
|
144
|
+
readonly turnIndex: number;
|
|
145
|
+
/** True when the fork was seeded from a re-run's counterfactual answer. */
|
|
146
|
+
readonly viaRerun: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface RecordedChat {
|
|
149
|
+
/** Runs one recorded turn. One send at a time — concurrent sends throw. */
|
|
150
|
+
send(userMessage: string, options?: SendOptions): Promise<ChatTurn>;
|
|
151
|
+
/** Turn K's frozen record. Out-of-range throws (names the valid range). */
|
|
152
|
+
turn(k: number): ChatTurn;
|
|
153
|
+
readonly turns: readonly ChatTurn[];
|
|
154
|
+
/** The transcript the session opened with (forks / rehydration; else `[]`). */
|
|
155
|
+
readonly seed: readonly ChatMessage[];
|
|
156
|
+
/** The session's persistent removals (forks carry these; else `[]`). */
|
|
157
|
+
readonly removed: readonly AblationSpec[];
|
|
158
|
+
/** Set on sessions created by `fork()`; `undefined` otherwise. */
|
|
159
|
+
readonly forkedFrom: ForkOrigin | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Turn K's `ContextBugReport` (agentfootprint's, unmodified) via
|
|
162
|
+
* `localizeContextBug` over the frozen artifacts, `atStep` defaulted to
|
|
163
|
+
* the turn's last LLM call. Memoized per turn; `fresh: true` recomputes.
|
|
164
|
+
*/
|
|
165
|
+
reason(k: number, options: ReasonOptions): Promise<ContextBugReport>;
|
|
166
|
+
/**
|
|
167
|
+
* Re-run turn K without the named sources — same recorded history bytes,
|
|
168
|
+
* same user message, minus the sources — delegating to
|
|
169
|
+
* `rerunWithoutSources` with a runner derived from `makeAgent`. Returns
|
|
170
|
+
* agentfootprint's `RerunWithoutSourcesResult` UNMODIFIED (a `verdict`
|
|
171
|
+
* only when `checkBaseline: true` — the honesty tiers are not hidden).
|
|
172
|
+
*/
|
|
173
|
+
rerunTurn(k: number, options: RerunTurnOptions): Promise<RerunWithoutSourcesResult>;
|
|
174
|
+
/**
|
|
175
|
+
* Branch, never rewrite: a NEW `RecordedChat` (same `makeAgent`, same
|
|
176
|
+
* format) whose seed is the conversation through turn K with the reply
|
|
177
|
+
* swapped for the re-run's counterfactual answer (or kept, without
|
|
178
|
+
* `fromRerun`), and whose `removed` is this session's removals plus the
|
|
179
|
+
* re-run's `removed` specs. The original session is never touched.
|
|
180
|
+
*/
|
|
181
|
+
fork(k: number, options?: ForkOptions): RecordedChat;
|
|
182
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* recorded-chat types — the session-scoped turn recorder over the existing
|
|
3
|
+
* context-bisect product loop (localizeContextBug + rerunWithoutSources +
|
|
4
|
+
* removableSources).
|
|
5
|
+
*
|
|
6
|
+
* WHY THIS EXISTS: multi-turn chat on agentfootprint is a HOST convention —
|
|
7
|
+
* `AgentInput` has no history field, so hosts thread the transcript into the
|
|
8
|
+
* `message` string themselves. Every chat host that wanted per-turn
|
|
9
|
+
* transparency then re-wrote the same correctness-critical glue and got three
|
|
10
|
+
* things subtly wrong:
|
|
11
|
+
*
|
|
12
|
+
* 1. `agent.getLastSnapshot()` is last-run-only — a second `run()` clobbers
|
|
13
|
+
* it, so reasoning about turn K after turn K+1 ran silently attributes
|
|
14
|
+
* the wrong run.
|
|
15
|
+
* 2. History is a convention — the transcript preamble must be BYTE-identical
|
|
16
|
+
* between the recorded turn and its counterfactual re-run, or the re-run
|
|
17
|
+
* ablates a subtly different scenario without failing anything.
|
|
18
|
+
* 3. The `AblationRunner` duplicates turn construction — the re-run is only
|
|
19
|
+
* valid if the rebuilt turn matches the recorded one (same system, facts,
|
|
20
|
+
* preamble).
|
|
21
|
+
*
|
|
22
|
+
* `recordedChat({ makeAgent })` owns exactly those three: per-turn artifact
|
|
23
|
+
* freezing (1), byte-exact history threading (2), and deriving the turn-K
|
|
24
|
+
* runner from the SAME `makeAgent` that ran the turn (3). It COMPOSES with the
|
|
25
|
+
* 7.5 surface — `reason()` calls `localizeContextBug`, `rerunTurn()` delegates
|
|
26
|
+
* to `rerunWithoutSources` and returns its result UNMODIFIED (the honesty
|
|
27
|
+
* tiers are not hidden). Session registries, UI joins, comparators and
|
|
28
|
+
* persistence stay host-side by design (see the guide's "What stays yours").
|
|
29
|
+
*/
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/recorded-chat/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CheckInRecorder — the audit record for evidence-carrying human consent.
|
|
3
|
+
*
|
|
4
|
+
* Two exports, both for `agentfootprint.checkin.*`:
|
|
5
|
+
*
|
|
6
|
+
* • `checkInEventsBridge(...)` — an {@link EmitBridge} factory (same shape as
|
|
7
|
+
* `costRecorder` / `permissionRecorder`). Forwards `checkin.request` /
|
|
8
|
+
* `checkin.decision` `$emit`s to the EventDispatcher so
|
|
9
|
+
* `agent.on('agentfootprint.checkin.*')` fires. Attached ALWAYS by the
|
|
10
|
+
* Agent (zero-cost until a `checkIn`-declaring tool trips) — this is pure
|
|
11
|
+
* wiring, not a store.
|
|
12
|
+
*
|
|
13
|
+
* • `CheckInRecorder` — a compose-a-STORE recorder (no base class). Attach it
|
|
14
|
+
* with `agent.attach(new CheckInRecorder())` to CAPTURE every ask + decision
|
|
15
|
+
* as a queryable record — the "the decision is a record" pillar. It reads
|
|
16
|
+
* the same `$emit` stream (footprintjs calls `onEmit` for every emit), so it
|
|
17
|
+
* works whether or not any `agent.on(...)` listener is attached.
|
|
18
|
+
*
|
|
19
|
+
* Pattern: Factory over EmitBridge (wiring) + compose-a-store CombinedRecorder
|
|
20
|
+
* (capture). Telemetry rides the EMIT channel — never CommitBundle.
|
|
21
|
+
*/
|
|
22
|
+
import type { CombinedRecorder, EmitEvent } from 'footprintjs';
|
|
23
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
24
|
+
import type { CheckInRequest } from '../../core/checkin.js';
|
|
25
|
+
export type CheckInRecorderBridgeOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
26
|
+
readonly id?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The always-on dispatcher bridge for `agentfootprint.checkin.*`. Wiring only:
|
|
30
|
+
* forwards the emits so typed `agent.on(...)` listeners fire.
|
|
31
|
+
*/
|
|
32
|
+
export declare function checkInEventsBridge(options: CheckInRecorderBridgeOptions): EmitBridge;
|
|
33
|
+
/** One captured check-in ask. */
|
|
34
|
+
export interface CheckInRequestRecord {
|
|
35
|
+
readonly toolName: string;
|
|
36
|
+
readonly toolCallId: string;
|
|
37
|
+
readonly iteration: number;
|
|
38
|
+
/** The typed ask + evidence pack. */
|
|
39
|
+
readonly request: CheckInRequest;
|
|
40
|
+
}
|
|
41
|
+
/** One captured human decision. */
|
|
42
|
+
export interface CheckInDecisionRecord {
|
|
43
|
+
readonly toolName: string;
|
|
44
|
+
readonly toolCallId: string;
|
|
45
|
+
readonly iteration: number;
|
|
46
|
+
readonly approved: boolean;
|
|
47
|
+
readonly by: string;
|
|
48
|
+
readonly note?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Roll-up counts across a run (or the recorder's lifetime). */
|
|
51
|
+
export interface CheckInStats {
|
|
52
|
+
readonly requested: number;
|
|
53
|
+
readonly approved: number;
|
|
54
|
+
readonly declined: number;
|
|
55
|
+
/** Asks with no decision yet (paused, awaiting a human). */
|
|
56
|
+
readonly pending: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A queryable store of every check-in ask + decision. Attach once; read after
|
|
60
|
+
* the run (or between runs — it accumulates across `agent.run()` calls until
|
|
61
|
+
* you detach or make a fresh one).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const checkins = new CheckInRecorder();
|
|
65
|
+
* agent.attach(checkins);
|
|
66
|
+
* await agent.run({ message });
|
|
67
|
+
* // ...human approves...
|
|
68
|
+
* await agent.resume(outcome.checkpoint, checkInApproved({ by: 'alice' }));
|
|
69
|
+
* checkins.getStats(); // { requested: 1, approved: 1, declined: 0, pending: 0 }
|
|
70
|
+
* checkins.getDecisions(); // [{ toolName, approved: true, by: 'alice', ... }]
|
|
71
|
+
*/
|
|
72
|
+
export declare class CheckInRecorder implements CombinedRecorder {
|
|
73
|
+
readonly id: string;
|
|
74
|
+
private readonly requests;
|
|
75
|
+
private readonly decisions;
|
|
76
|
+
/**
|
|
77
|
+
* @param id Stable recorder id for idempotent attach/detach. Give distinct
|
|
78
|
+
* ids if you attach more than one to the same agent.
|
|
79
|
+
*/
|
|
80
|
+
constructor(id?: string);
|
|
81
|
+
onEmit(event: EmitEvent): void;
|
|
82
|
+
/** Every check-in ask captured, oldest first. */
|
|
83
|
+
getRequests(): readonly CheckInRequestRecord[];
|
|
84
|
+
/** Every human decision captured, oldest first. */
|
|
85
|
+
getDecisions(): readonly CheckInDecisionRecord[];
|
|
86
|
+
/** Roll-up counts. `pending` = asks still awaiting a decision. */
|
|
87
|
+
getStats(): CheckInStats;
|
|
88
|
+
/** Drop all captured records (e.g. between runs when reusing the recorder). */
|
|
89
|
+
reset(): void;
|
|
90
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CheckInRecorder — the audit record for evidence-carrying human consent.
|
|
3
|
+
*
|
|
4
|
+
* Two exports, both for `agentfootprint.checkin.*`:
|
|
5
|
+
*
|
|
6
|
+
* • `checkInEventsBridge(...)` — an {@link EmitBridge} factory (same shape as
|
|
7
|
+
* `costRecorder` / `permissionRecorder`). Forwards `checkin.request` /
|
|
8
|
+
* `checkin.decision` `$emit`s to the EventDispatcher so
|
|
9
|
+
* `agent.on('agentfootprint.checkin.*')` fires. Attached ALWAYS by the
|
|
10
|
+
* Agent (zero-cost until a `checkIn`-declaring tool trips) — this is pure
|
|
11
|
+
* wiring, not a store.
|
|
12
|
+
*
|
|
13
|
+
* • `CheckInRecorder` — a compose-a-STORE recorder (no base class). Attach it
|
|
14
|
+
* with `agent.attach(new CheckInRecorder())` to CAPTURE every ask + decision
|
|
15
|
+
* as a queryable record — the "the decision is a record" pillar. It reads
|
|
16
|
+
* the same `$emit` stream (footprintjs calls `onEmit` for every emit), so it
|
|
17
|
+
* works whether or not any `agent.on(...)` listener is attached.
|
|
18
|
+
*
|
|
19
|
+
* Pattern: Factory over EmitBridge (wiring) + compose-a-store CombinedRecorder
|
|
20
|
+
* (capture). Telemetry rides the EMIT channel — never CommitBundle.
|
|
21
|
+
*/
|
|
22
|
+
import { EmitBridge } from './EmitBridge.js';
|
|
23
|
+
/**
|
|
24
|
+
* The always-on dispatcher bridge for `agentfootprint.checkin.*`. Wiring only:
|
|
25
|
+
* forwards the emits so typed `agent.on(...)` listeners fire.
|
|
26
|
+
*/
|
|
27
|
+
export function checkInEventsBridge(options) {
|
|
28
|
+
return new EmitBridge({
|
|
29
|
+
id: options.id ?? 'agentfootprint.checkin-bridge',
|
|
30
|
+
prefix: 'agentfootprint.checkin.',
|
|
31
|
+
dispatcher: options.dispatcher,
|
|
32
|
+
getRunContext: options.getRunContext,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A queryable store of every check-in ask + decision. Attach once; read after
|
|
37
|
+
* the run (or between runs — it accumulates across `agent.run()` calls until
|
|
38
|
+
* you detach or make a fresh one).
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const checkins = new CheckInRecorder();
|
|
42
|
+
* agent.attach(checkins);
|
|
43
|
+
* await agent.run({ message });
|
|
44
|
+
* // ...human approves...
|
|
45
|
+
* await agent.resume(outcome.checkpoint, checkInApproved({ by: 'alice' }));
|
|
46
|
+
* checkins.getStats(); // { requested: 1, approved: 1, declined: 0, pending: 0 }
|
|
47
|
+
* checkins.getDecisions(); // [{ toolName, approved: true, by: 'alice', ... }]
|
|
48
|
+
*/
|
|
49
|
+
export class CheckInRecorder {
|
|
50
|
+
id;
|
|
51
|
+
requests = [];
|
|
52
|
+
decisions = [];
|
|
53
|
+
/**
|
|
54
|
+
* @param id Stable recorder id for idempotent attach/detach. Give distinct
|
|
55
|
+
* ids if you attach more than one to the same agent.
|
|
56
|
+
*/
|
|
57
|
+
constructor(id = 'agentfootprint.checkin-recorder') {
|
|
58
|
+
this.id = id;
|
|
59
|
+
}
|
|
60
|
+
onEmit(event) {
|
|
61
|
+
if (event.name === 'agentfootprint.checkin.request') {
|
|
62
|
+
const p = event.payload;
|
|
63
|
+
this.requests.push({
|
|
64
|
+
toolName: p.toolName,
|
|
65
|
+
toolCallId: p.toolCallId,
|
|
66
|
+
iteration: p.iteration,
|
|
67
|
+
request: p.request,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else if (event.name === 'agentfootprint.checkin.decision') {
|
|
71
|
+
const p = event.payload;
|
|
72
|
+
this.decisions.push({
|
|
73
|
+
toolName: p.toolName,
|
|
74
|
+
toolCallId: p.toolCallId,
|
|
75
|
+
iteration: p.iteration,
|
|
76
|
+
approved: p.approved,
|
|
77
|
+
by: p.by,
|
|
78
|
+
...(p.note !== undefined && { note: p.note }),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** Every check-in ask captured, oldest first. */
|
|
83
|
+
getRequests() {
|
|
84
|
+
return this.requests;
|
|
85
|
+
}
|
|
86
|
+
/** Every human decision captured, oldest first. */
|
|
87
|
+
getDecisions() {
|
|
88
|
+
return this.decisions;
|
|
89
|
+
}
|
|
90
|
+
/** Roll-up counts. `pending` = asks still awaiting a decision. */
|
|
91
|
+
getStats() {
|
|
92
|
+
let approved = 0;
|
|
93
|
+
let declined = 0;
|
|
94
|
+
for (const d of this.decisions)
|
|
95
|
+
d.approved ? approved++ : declined++;
|
|
96
|
+
return {
|
|
97
|
+
requested: this.requests.length,
|
|
98
|
+
approved,
|
|
99
|
+
declined,
|
|
100
|
+
pending: this.requests.length - this.decisions.length,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Drop all captured records (e.g. between runs when reusing the recorder). */
|
|
104
|
+
reset() {
|
|
105
|
+
this.requests.length = 0;
|
|
106
|
+
this.decisions.length = 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=CheckInRecorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckInRecorder.js","sourceRoot":"","sources":["../../../../src/recorders/core/CheckInRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AAQrE;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAqC;IACvE,OAAO,IAAI,UAAU,CAAC;QACpB,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,+BAA+B;QACjD,MAAM,EAAE,yBAAyB;QACjC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC,CAAC;AACL,CAAC;AA8BD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,eAAe;IACjB,EAAE,CAAS;IACH,QAAQ,GAA2B,EAAE,CAAC;IACtC,SAAS,GAA4B,EAAE,CAAC;IAEzD;;;OAGG;IACH,YAAY,EAAE,GAAG,iCAAiC;QAChD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED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O;YACL,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM;YAC/B,QAAQ;YACR,QAAQ;YACR,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;SACtD,CAAC;IACJ,CAAC;IAED,+EAA+E;IAC/E,KAAK;QACH,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../src/events/dispatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,6CAAwC;AA0BxC;2EAC2E;AAC3E,MAAM,eAAe,GAAgB,GAAG,EAAE,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../src/events/dispatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,6CAAwC;AA0BxC;2EAC2E;AAC3E,MAAM,eAAe,GAAgB,GAAG,EAAE,CAAC,SAAS,CAAC;AAmDrD;;;GAGG;AACH,SAAS,WAAW,CAAC,MAA2B;IAC9C,KAAK,MAAM,MAAM,IAAI,MAAM;QAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC;AAED,wEAAwE;AAExE;;;;;GAKG;AACH,MAAa,eAAe;IACT,MAAM,GAAG,IAAI,GAAG,EAA+B,CAAC;IAChD,eAAe,GAAG,IAAI,GAAG,EAA+B,CAAC;IACzD,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE1D,qEAAqE;IAErE;;;OAGG;IACH,eAAe,CAAC,IAA6B;QAC3C,IAAI,IAAI,CAAC,YAAY,CAAC,IAA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CAAC;IAElC,MAAM,OAAO,GAAG,CAAC,KAA0B,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAY,CAAC;QAC1C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;YAC7D,sCAAsC;YACtC,OAAO,CAAC,IAAI,CACV,kCAAkC,IAAI,yBAAyB;gBAC7D,0EAA0E;gBAC1E,sEAAsE;gBACtE,+DAA+D,CAClE,CAAC;YACF,8DAA8D;YAC7D,MAA2B,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBAClD,sCAAsC;gBACtC,OAAO,CAAC,KAAK,CAAC,0CAA0C,IAAI,aAAa,EAAE,GAAG,CAAC,CAAC;YAClF,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IAEF,YAAY,CAAC,GAAG,CAAC,OAA4B,EAAE,QAAQ,CAAC,CAAC;IACzD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/events/registry.js
CHANGED
|
@@ -120,6 +120,10 @@ exports.EVENT_NAMES = {
|
|
|
120
120
|
request: 'agentfootprint.pause.request',
|
|
121
121
|
resume: 'agentfootprint.pause.resume',
|
|
122
122
|
},
|
|
123
|
+
checkin: {
|
|
124
|
+
request: 'agentfootprint.checkin.request',
|
|
125
|
+
decision: 'agentfootprint.checkin.decision',
|
|
126
|
+
},
|
|
123
127
|
embedding: {
|
|
124
128
|
generated: 'agentfootprint.embedding.generated',
|
|
125
129
|
},
|
|
@@ -193,6 +197,8 @@ exports.ALL_EVENT_TYPES = [
|
|
|
193
197
|
'agentfootprint.reliability.recovered',
|
|
194
198
|
'agentfootprint.pause.request',
|
|
195
199
|
'agentfootprint.pause.resume',
|
|
200
|
+
'agentfootprint.checkin.request',
|
|
201
|
+
'agentfootprint.checkin.decision',
|
|
196
202
|
'agentfootprint.embedding.generated',
|
|
197
203
|
];
|
|
198
204
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/events/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/events/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAyEH,yEAAyE;AACzE,gEAAgE;AAChE,wEAAwE;AAC3D,QAAA,WAAW,GAAG;IACzB,WAAW,EAAE;QACX,KAAK,EAAE,kCAAkC;QACzC,IAAI,EAAE,iCAAiC;QACvC,SAAS,EAAE,uCAAuC;QAClD,cAAc,EAAE,4CAA4C;QAC5D,QAAQ,EAAE,sCAAsC;QAChD,YAAY,EAAE,0CAA0C;QACxD,cAAc,EAAE,4CAA4C;QAC5D,aAAa,EAAE,2CAA2C;KAC3D;IACD,KAAK,EAAE;QACL,SAAS,EAAE,iCAAiC;QAC5C,OAAO,EAAE,+BAA+B;QACxC,cAAc,EAAE,sCAAsC;QACtD,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,oCAAoC;QAClD,OAAO,EAAE,8BAA8B;QACvC,4BAA4B,EAAE,sDAAsD;QACpF,mBAAmB,EAAE,4CAA4C;KAClE;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,iCAAiC;QAC3C,MAAM,EAAE,+BAA+B;QACvC,KAAK,EAAE,6BAA6B;QACpC,SAAS,EAAE,kCAAkC;QAC7C,OAAO,EAAE,gCAAgC;QACzC,aAAa,EAAE,sCAAsC;QACrD,WAAW,EAAE,oCAAoC;KAClD;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,iCAAiC;QAC3C,OAAO,EAAE,gCAAgC;QACzC,YAAY,EAAE,sCAAsC;QACpD,cAAc,EAAE,wCAAwC;QACxD,SAAS,EAAE,kCAAkC;KAC9C;IACD,MAAM,EAAE;QACN,eAAe,EAAE,wCAAwC;QACzD,QAAQ,EAAE,gC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,OAAO,EAAE,gCAAgC;QACzC,QAAQ,EAAE,iCAAiC;KAC5C;IACD,SAAS,EAAE;QACT,SAAS,EAAE,oCAAoC;KAChD;CACO,CAAC;AA4SX;;;GAGG;AACU,QAAA,eAAe,GAAuC;IACjE,kCAAkC;IAClC,iCAAiC;IACjC,uCAAuC;IACvC,4CAA4C;IAC5C,sCAAsC;IACtC,0CAA0C;IAC1C,4CAA4C;IAC5C,2CAA2C;IAC3C,iCAAiC;IACjC,+BAA+B;IAC/B,sCAAsC;IACtC,oCAAoC;IACpC,oCAAoC;IACpC,8BAA8B;IAC9B,sDAAsD;IACtD,4CAA4C;IAC5C,iCAAiC;IACjC,+BAA+B;IAC/B,6BAA6B;IAC7B,kCAAkC;IAClC,gCAAgC;IAChC,sCAAsC;IACtC,oCAAoC;IACpC,iCAAiC;IACjC,gCAAgC;IAChC,sCAAsC;IACtC,wCAAwC;IACxC,kCAAkC;IAClC,wCAAwC;IACxC,gCAAgC;IAChC,gCAAgC;IAChC,+BAA+B;IAC/B,8BAA8B;IAC9B,gCAAgC;IAChC,kCAAkC;IAClC,wCAAwC;IACxC,0CAA0C;IAC1C,uCAAuC;IACvC,wCAAwC;IACxC,gCAAgC;IAChC,kCAAkC;IAClC,+BAA+B;IAC/B,iCAAiC;IACjC,uCAAuC;IACvC,uCAAuC;IACvC,gCAAgC;IAChC,qCAAqC;IACrC,oCAAoC;IACpC,kDAAkD;IAClD,kCAAkC;IAClC,6BAA6B;IAC7B,mCAAmC;IACnC,0BAA0B;IAC1B,+BAA+B;IAC/B,2BAA2B;IAC3B,uCAAuC;IACvC,8BAA8B;IAC9B,gCAAgC;IAChC,4BAA4B;IAC5B,sCAAsC;IACtC,oCAAoC;IACpC,sCAAsC;IACtC,8BAA8B;IAC9B,6BAA6B;IAC7B,gCAAgC;IAChC,iCAAiC;IACjC,oCAAoC;CAC5B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
24
|
+
exports.ConditionalBuilder = exports.Conditional = exports.ParallelBuilder = exports.Parallel = exports.SequenceBuilder = exports.Sequence = exports.formatToolContractCheckup = exports.toolContractCheckup = exports.warnIfInvalidToolName = exports.assertValidToolName = exports.defineTool = exports.flowchartAsTool = exports.RunCheckpointError = exports.applyOutputSchema = exports.OutputSchemaError = exports.AgentBuilder = exports.Agent = exports.buildAgentMessageApiChart = exports.LLMCallBuilder = exports.LLMCall = exports.selectCommentaryKey = exports.renderCommentary = exports.extractCommentaryVars = exports.extractAgentName = exports.defaultCommentaryTemplates = exports.CheckInRecorder = exports.minimalEvidenceAssembler = exports.standardEvidenceAssembler = exports.lexicalDriverScorer = exports.isCheckInDecision = exports.checkInDeclined = exports.checkInApproved = exports.isCheckInPause = exports.isPaused = exports.isPauseRequest = exports.askHuman = exports.pauseHere = exports.makeRunId = exports.RunnerBase = exports.BASELINE_SOURCES = exports.ENGINEERED_SOURCES = exports.isBaselineSource = exports.isEngineeredSource = exports.contextEngineering = exports.COMPOSITION_KEYS = exports.milestoneFor = exports.stageRole = exports.isInjectionKey = exports.injectionKeyForSlot = exports.INJECTION_KEYS = void 0;
|
|
25
|
+
exports.indexDocuments = exports.defineRAG = exports.providerFromEnv = exports.LoopBuilder = exports.Loop = void 0;
|
|
25
26
|
// Side-effect imports — auto-register v2.6+ cache strategies in the
|
|
26
27
|
// strategy registry. Without these, only the wildcard NoOp is
|
|
27
28
|
// registered and `Agent.create({ provider: browserAnthropic({...}) })`
|
|
@@ -84,6 +85,22 @@ Object.defineProperty(exports, "pauseHere", { enumerable: true, get: function ()
|
|
|
84
85
|
Object.defineProperty(exports, "askHuman", { enumerable: true, get: function () { return pause_js_1.askHuman; } });
|
|
85
86
|
Object.defineProperty(exports, "isPauseRequest", { enumerable: true, get: function () { return pause_js_1.isPauseRequest; } });
|
|
86
87
|
Object.defineProperty(exports, "isPaused", { enumerable: true, get: function () { return pause_js_1.isPaused; } });
|
|
88
|
+
Object.defineProperty(exports, "isCheckInPause", { enumerable: true, get: function () { return pause_js_1.isCheckInPause; } });
|
|
89
|
+
// Check in with the receipts — evidence-carrying human consent. A tool
|
|
90
|
+
// declares `checkIn` (see `defineTool`); when it trips the run pauses with a
|
|
91
|
+
// `CheckInRequest` (the ask + evidence pack); a human answers with
|
|
92
|
+
// `checkInApproved` / `checkInDeclined`; the `CheckInDecision` lands as a
|
|
93
|
+
// typed record (`checkin.request` / `checkin.decision` events + `CheckInRecorder`).
|
|
94
|
+
var checkin_js_1 = require("./core/checkin.js");
|
|
95
|
+
Object.defineProperty(exports, "checkInApproved", { enumerable: true, get: function () { return checkin_js_1.checkInApproved; } });
|
|
96
|
+
Object.defineProperty(exports, "checkInDeclined", { enumerable: true, get: function () { return checkin_js_1.checkInDeclined; } });
|
|
97
|
+
Object.defineProperty(exports, "isCheckInDecision", { enumerable: true, get: function () { return checkin_js_1.isCheckInDecision; } });
|
|
98
|
+
Object.defineProperty(exports, "lexicalDriverScorer", { enumerable: true, get: function () { return checkin_js_1.lexicalDriverScorer; } });
|
|
99
|
+
Object.defineProperty(exports, "standardEvidenceAssembler", { enumerable: true, get: function () { return checkin_js_1.standardEvidenceAssembler; } });
|
|
100
|
+
Object.defineProperty(exports, "minimalEvidenceAssembler", { enumerable: true, get: function () { return checkin_js_1.minimalEvidenceAssembler; } });
|
|
101
|
+
// The built-in check-in audit store — `agent.attach(new CheckInRecorder())`.
|
|
102
|
+
var CheckInRecorder_js_1 = require("./recorders/core/CheckInRecorder.js");
|
|
103
|
+
Object.defineProperty(exports, "CheckInRecorder", { enumerable: true, get: function () { return CheckInRecorder_js_1.CheckInRecorder; } });
|
|
87
104
|
// Commentary — bundled prose templates + engine for narrating a run.
|
|
88
105
|
// Consumers ship their own JSON locale / brand voice via the same
|
|
89
106
|
// shape; viewers (Lens, CLI tail, log file) consume this surface.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;AAEH,oEAAoE;AACpE,8DAA8D;AAC9D,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,sDAAsD;AACtD,wDAAsD;AACtD,qDAAmD;AACnD,sDAAoD;AAsCpD,6BAA6B;AAC7B,sDAAoC;AAEpC,yEAAyE;AACzE,uDAAuD;AACvD,mDAkB0B;AAjBxB,gHAAA,cAAc,OAAA;AACd,qHAAA,mBAAmB,OAAA;AACnB,gHAAA,cAAc,OAAA;AAEd,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,gBAAgB;AAChB,2GAAA,SAAS,OAAA;AAET,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,8GAAA,YAAY,OAAA;AAId,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,sDAOmC;AANjC,4GAAA,gBAAgB,OAAA;AAWlB,yCAAyC;AACzC,EAAE;AACF,yEAAyE;AACzE,kEAAkE;AAClE,oEAAoE;AACpE,qEAAqE;AACrE,2EAA2E;AAC3E,8EAA8E;AAC9E,0DAA0D;AAC1D,gFAUgD;AAT9C,2HAAA,kBAAkB,OAAA;AAClB,2HAAA,kBAAkB,OAAA;AAClB,yHAAA,gBAAgB,OAAA;AAChB,2HAAA,kBAAkB,OAAA;AAClB,yHAAA,gBAAgB,OAAA;AASlB,sDAA6D;AAApD,2GAAA,UAAU,OAAA;AAAE,0GAAA,SAAS,OAAA;AAO9B,sE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AACxE,qEAAqE;AACrE,mEAAmE;AACnE,sEAAsE;AACtE,sEAAsE;AAEtE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* may change before GA.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CONTEXT_BISECT_DEFAULTS = exports.bisectCulprits = exports.findLoopHeads = exports.bucketByAnchors = exports.assembleTrajectory = exports.buildWriterFrameIndex = exports.walkTrajectory = exports.walkToRoot = exports.DEFAULT_RECENCY_DECAY = exports.shortlistEarlyCulprits = exports.MIN_LOOPS_SAVED = exports.classifySuspect = exports.assignCostVerdicts = exports.verdictFor = exports.runAblationProbe = exports.probeFlipped = exports.median = exports.defaultOutcomeComparator = exports.costStatsFrom = exports.applyAblations = exports.ablationForSuspect = exports.sliceToBacktrackTrace = exports.toBacktrackTrace = exports.suspectLabel = exports.localizeContextBug = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.defaultSuspectClassifier = exports.runRestorationProbe = exports.findDroppedContext = exports.stepOutputText = exports.llmEdgeWeigher = void 0;
|
|
22
|
+
exports.CONTEXT_BISECT_DEFAULTS = exports.bisectCulprits = exports.findLoopHeads = exports.bucketByAnchors = exports.assembleTrajectory = exports.buildWriterFrameIndex = exports.walkTrajectory = exports.walkToRoot = exports.DEFAULT_RECENCY_DECAY = exports.shortlistEarlyCulprits = exports.rerunWithoutSources = exports.removableSources = exports.MIN_LOOPS_SAVED = exports.classifySuspect = exports.assignCostVerdicts = exports.verdictFor = exports.runAblationProbe = exports.probeFlipped = exports.median = exports.defaultOutcomeComparator = exports.costStatsFrom = exports.applyAblations = exports.ablationForSuspect = exports.sliceToBacktrackTrace = exports.toBacktrackTrace = exports.suspectLabel = exports.localizeContextBug = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.defaultSuspectClassifier = exports.runRestorationProbe = exports.findDroppedContext = exports.stepOutputText = exports.llmEdgeWeigher = void 0;
|
|
23
23
|
var llmEdgeWeigher_js_1 = require("./llmEdgeWeigher.js");
|
|
24
24
|
Object.defineProperty(exports, "llmEdgeWeigher", { enumerable: true, get: function () { return llmEdgeWeigher_js_1.llmEdgeWeigher; } });
|
|
25
25
|
Object.defineProperty(exports, "stepOutputText", { enumerable: true, get: function () { return llmEdgeWeigher_js_1.stepOutputText; } });
|
|
@@ -54,6 +54,11 @@ var cost_js_1 = require("./cost.js");
|
|
|
54
54
|
Object.defineProperty(exports, "assignCostVerdicts", { enumerable: true, get: function () { return cost_js_1.assignCostVerdicts; } });
|
|
55
55
|
Object.defineProperty(exports, "classifySuspect", { enumerable: true, get: function () { return cost_js_1.classifySuspect; } });
|
|
56
56
|
Object.defineProperty(exports, "MIN_LOOPS_SAVED", { enumerable: true, get: function () { return cost_js_1.MIN_LOOPS_SAVED; } });
|
|
57
|
+
// The counterfactual re-run as one call — the product loop over the ablation
|
|
58
|
+
// machinery (wraps applyAblations/runAblationProbe; no new machinery).
|
|
59
|
+
var rerun_js_1 = require("./rerun.js");
|
|
60
|
+
Object.defineProperty(exports, "removableSources", { enumerable: true, get: function () { return rerun_js_1.removableSources; } });
|
|
61
|
+
Object.defineProperty(exports, "rerunWithoutSources", { enumerable: true, get: function () { return rerun_js_1.rerunWithoutSources; } });
|
|
57
62
|
// Per-loop recall shortlist (proposal 006, L3): rescue early culprits → narrow before ablation.
|
|
58
63
|
var loop_recall_js_1 = require("./loop-recall.js");
|
|
59
64
|
Object.defineProperty(exports, "shortlistEarlyCulprits", { enumerable: true, get: function () { return loop_recall_js_1.shortlistEarlyCulprits; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAEH,yDAM6B;AAL3B,mHAAA,cAAc,OAAA;AACd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