agentfootprint 8.1.0 → 8.2.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/dist/core/Agent.js +44 -1
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/stages/seed.js +10 -0
- package/dist/core/agent/stages/seed.js.map +1 -1
- package/dist/core/agent/stages/window.js +21 -0
- package/dist/core/agent/stages/window.js.map +1 -1
- package/dist/core/agent/window/folded.js +98 -0
- package/dist/core/agent/window/folded.js.map +1 -0
- package/dist/core/agent/window/index.js +9 -1
- package/dist/core/agent/window/index.js.map +1 -1
- package/dist/core/agent/window/options.js +18 -2
- package/dist/core/agent/window/options.js.map +1 -1
- package/dist/core/agent/window/strategies/summarizeOldest.js +25 -2
- package/dist/core/agent/window/strategies/summarizeOldest.js.map +1 -1
- package/dist/core/agent/window/summarize.js +27 -1
- package/dist/core/agent/window/summarize.js.map +1 -1
- package/dist/core/agent/window/types.js +6 -0
- package/dist/core/agent/window/types.js.map +1 -1
- package/dist/core/runCheckpoint.js +9 -1
- package/dist/core/runCheckpoint.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +17 -0
- package/dist/esm/core/Agent.js +44 -1
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/stages/seed.d.ts +11 -0
- package/dist/esm/core/agent/stages/seed.js +10 -0
- package/dist/esm/core/agent/stages/seed.js.map +1 -1
- package/dist/esm/core/agent/stages/window.d.ts +13 -0
- package/dist/esm/core/agent/stages/window.js +21 -0
- package/dist/esm/core/agent/stages/window.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +15 -1
- package/dist/esm/core/agent/window/folded.d.ts +90 -0
- package/dist/esm/core/agent/window/folded.js +92 -0
- package/dist/esm/core/agent/window/folded.js.map +1 -0
- package/dist/esm/core/agent/window/index.d.ts +7 -1
- package/dist/esm/core/agent/window/index.js +6 -0
- package/dist/esm/core/agent/window/index.js.map +1 -1
- package/dist/esm/core/agent/window/options.d.ts +7 -1
- package/dist/esm/core/agent/window/options.js +17 -1
- package/dist/esm/core/agent/window/options.js.map +1 -1
- package/dist/esm/core/agent/window/strategies/summarizeOldest.d.ts +4 -2
- package/dist/esm/core/agent/window/strategies/summarizeOldest.js +25 -2
- package/dist/esm/core/agent/window/strategies/summarizeOldest.js.map +1 -1
- package/dist/esm/core/agent/window/strategy.d.ts +26 -1
- package/dist/esm/core/agent/window/summarize.d.ts +11 -0
- package/dist/esm/core/agent/window/summarize.js +27 -1
- package/dist/esm/core/agent/window/summarize.js.map +1 -1
- package/dist/esm/core/agent/window/types.d.ts +106 -1
- package/dist/esm/core/agent/window/types.js +6 -0
- package/dist/esm/core/agent/window/types.js.map +1 -1
- package/dist/esm/core/runCheckpoint.d.ts +32 -1
- package/dist/esm/core/runCheckpoint.js +9 -1
- package/dist/esm/core/runCheckpoint.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/types/core/Agent.d.ts +17 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/stages/seed.d.ts +11 -0
- package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
- package/dist/types/core/agent/stages/window.d.ts +13 -0
- package/dist/types/core/agent/stages/window.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +15 -1
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/agent/window/folded.d.ts +91 -0
- package/dist/types/core/agent/window/folded.d.ts.map +1 -0
- package/dist/types/core/agent/window/index.d.ts +7 -1
- package/dist/types/core/agent/window/index.d.ts.map +1 -1
- package/dist/types/core/agent/window/options.d.ts +7 -1
- package/dist/types/core/agent/window/options.d.ts.map +1 -1
- package/dist/types/core/agent/window/strategies/summarizeOldest.d.ts +4 -2
- package/dist/types/core/agent/window/strategies/summarizeOldest.d.ts.map +1 -1
- package/dist/types/core/agent/window/strategy.d.ts +26 -1
- package/dist/types/core/agent/window/strategy.d.ts.map +1 -1
- package/dist/types/core/agent/window/summarize.d.ts +11 -0
- package/dist/types/core/agent/window/summarize.d.ts.map +1 -1
- package/dist/types/core/agent/window/types.d.ts +106 -1
- package/dist/types/core/agent/window/types.d.ts.map +1 -1
- package/dist/types/core/runCheckpoint.d.ts +32 -1
- package/dist/types/core/runCheckpoint.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -17,8 +17,14 @@
|
|
|
17
17
|
* filed as a claim — its own recorded step, naming every `runtimeStageId` it
|
|
18
18
|
* folded. A drop is an ABSENCE, and it is filed the same way: the record and
|
|
19
19
|
* the eviction events name what left, by id.
|
|
20
|
+
*
|
|
21
|
+
* That law holds for as long as the PROCESS holds — a commit log is memory.
|
|
22
|
+
* A conversation outlives its process, so the durable half of the same law
|
|
23
|
+
* lives on the conversation checkpoint: `.compaction({ retain })` carries the
|
|
24
|
+
* folded originals there, beside the summary that stands for them. See
|
|
25
|
+
* {@link CompactionRetention} and {@link FoldedSpan}.
|
|
20
26
|
*/
|
|
21
|
-
import type { LLMProvider } from '../../../adapters/types.js';
|
|
27
|
+
import type { LLMMessage, LLMProvider } from '../../../adapters/types.js';
|
|
22
28
|
/**
|
|
23
29
|
* Why a turn refused to leave the window. Every one of these is NAMED in the
|
|
24
30
|
* commit — a removal that took less than it could have has to say why, or the
|
|
@@ -169,6 +175,87 @@ export interface TokenBudgetRecord extends WindowRecord {
|
|
|
169
175
|
/** How many recent turns were off-limits to this visit. */
|
|
170
176
|
readonly keepRecentTurns: number;
|
|
171
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* What becomes of the messages a fold removes from the window.
|
|
180
|
+
*
|
|
181
|
+
* The commit log keeps them for as long as the PROCESS keeps them, and that
|
|
182
|
+
* is the whole of what 8.1 offered. A standing agent outlives its process, so
|
|
183
|
+
* "the folded turns are still in the commit log" stops being true the moment
|
|
184
|
+
* the run ends — and the summary sitting in the restored conversation went on
|
|
185
|
+
* claiming otherwise. Retention is the fix: the originals ride with the
|
|
186
|
+
* CONVERSATION, which is the thing that actually survives.
|
|
187
|
+
*
|
|
188
|
+
* The trade is stated rather than hidden: **compaction shrinks the wire, not
|
|
189
|
+
* the record.** A stored session grows as it folds. That is the right way
|
|
190
|
+
* round — the model's context window is scarce and a session row is not.
|
|
191
|
+
*/
|
|
192
|
+
export type CompactionRetention =
|
|
193
|
+
/**
|
|
194
|
+
* The folded messages ride with the conversation checkpoint, so a restart —
|
|
195
|
+
* a new process, a new machine, a deploy — can still produce them verbatim.
|
|
196
|
+
* The default: originals are never destroyed unless you say so.
|
|
197
|
+
*/
|
|
198
|
+
'conversation'
|
|
199
|
+
/**
|
|
200
|
+
* The folded messages are NOT carried forward. The span is still recorded,
|
|
201
|
+
* naming what left and how much of it, because a discard is an absence and
|
|
202
|
+
* this family files absences the same way it files claims. Choose it when
|
|
203
|
+
* the conversation is the only thing you want to keep and the storage cost
|
|
204
|
+
* of the transcript is not worth paying.
|
|
205
|
+
*/
|
|
206
|
+
| 'discard';
|
|
207
|
+
/**
|
|
208
|
+
* One fold, as it survives the process: the summary's fingerprint, what it
|
|
209
|
+
* stands for, and — under `retain: 'conversation'` — the messages themselves.
|
|
210
|
+
*
|
|
211
|
+
* These accumulate on the conversation checkpoint across every turn and every
|
|
212
|
+
* restart, so a standing agent that folded week one in April can still produce
|
|
213
|
+
* week one in July.
|
|
214
|
+
*
|
|
215
|
+
* ## Joining a span to its summary
|
|
216
|
+
*
|
|
217
|
+
* By CONTENT FINGERPRINT, never by index: a later fold can swallow an earlier
|
|
218
|
+
* summary, and every index in the window moves when it does. {@link
|
|
219
|
+
* foldedSpanFor} does the join for you.
|
|
220
|
+
*/
|
|
221
|
+
export interface FoldedSpan {
|
|
222
|
+
/**
|
|
223
|
+
* Fingerprint of the summary message this span was folded into — the join
|
|
224
|
+
* key back to the message sitting in `history`.
|
|
225
|
+
*
|
|
226
|
+
* It is a hash of the message's full content (authored frame included), so
|
|
227
|
+
* it costs no extra bytes on the wire and cannot be forged by a summary that
|
|
228
|
+
* merely copies the frame's opening words: different content, different
|
|
229
|
+
* fingerprint, no match.
|
|
230
|
+
*/
|
|
231
|
+
readonly summaryFingerprint: string;
|
|
232
|
+
/**
|
|
233
|
+
* The run whose commit log held these messages. Diagnostic, and the honest
|
|
234
|
+
* answer to "where else could I have found this?" — that log is gone with
|
|
235
|
+
* the process, which is why the messages are here.
|
|
236
|
+
*/
|
|
237
|
+
readonly runId: string;
|
|
238
|
+
/** ReAct iteration the fold happened at, in that run. */
|
|
239
|
+
readonly iteration: number;
|
|
240
|
+
/** Wall clock of the fold. */
|
|
241
|
+
readonly foldedAtMs: number;
|
|
242
|
+
/** The model that wrote the summary — a claim's author is part of the claim. */
|
|
243
|
+
readonly model: string;
|
|
244
|
+
/** How many messages the summary stands for. Always recorded, both policies. */
|
|
245
|
+
readonly messageCount: number;
|
|
246
|
+
/** `runtimeStageId`s of the stages that appended those messages. */
|
|
247
|
+
readonly removedStageIds: readonly string[];
|
|
248
|
+
/** Which policy this fold ran under. */
|
|
249
|
+
readonly retained: CompactionRetention;
|
|
250
|
+
/**
|
|
251
|
+
* The folded messages, verbatim and in order. Present exactly when
|
|
252
|
+
* `retained` is `'conversation'`.
|
|
253
|
+
*
|
|
254
|
+
* Absent under `'discard'` — and absent is the honest shape there, rather
|
|
255
|
+
* than an empty array that reads like "there were none".
|
|
256
|
+
*/
|
|
257
|
+
readonly messages?: readonly LLMMessage[];
|
|
258
|
+
}
|
|
172
259
|
/**
|
|
173
260
|
* What `.compaction({...})` — and `summarizeOldest({...})` — accepts.
|
|
174
261
|
*
|
|
@@ -210,6 +297,23 @@ export interface CompactionOptions {
|
|
|
210
297
|
* `summarizer: anthropic()` alone works; name a cheap model to spend less.
|
|
211
298
|
*/
|
|
212
299
|
readonly model?: string;
|
|
300
|
+
/**
|
|
301
|
+
* What happens to the messages a fold removes. Default `'conversation'` —
|
|
302
|
+
* they ride with the conversation checkpoint and survive the process.
|
|
303
|
+
*
|
|
304
|
+
* Pass `'discard'` to opt out. Nothing is ever destroyed silently: the only
|
|
305
|
+
* way to lose the originals is to name this.
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```ts
|
|
309
|
+
* .compaction({
|
|
310
|
+
* thresholdTokens: 120_000,
|
|
311
|
+
* summarizer: anthropic(),
|
|
312
|
+
* retain: 'conversation', // the default, spelled out
|
|
313
|
+
* })
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
readonly retain?: CompactionRetention;
|
|
213
317
|
}
|
|
214
318
|
/** Resolved form — defaults applied at build time, validated once. */
|
|
215
319
|
export interface ResolvedCompaction {
|
|
@@ -217,6 +321,7 @@ export interface ResolvedCompaction {
|
|
|
217
321
|
readonly keepRecentTurns: number;
|
|
218
322
|
readonly summarizer: LLMProvider;
|
|
219
323
|
readonly model: string | undefined;
|
|
324
|
+
readonly retain: CompactionRetention;
|
|
220
325
|
}
|
|
221
326
|
/**
|
|
222
327
|
* What `slidingWindow({...})` accepts.
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
* filed as a claim — its own recorded step, naming every `runtimeStageId` it
|
|
18
18
|
* folded. A drop is an ABSENCE, and it is filed the same way: the record and
|
|
19
19
|
* the eviction events name what left, by id.
|
|
20
|
+
*
|
|
21
|
+
* That law holds for as long as the PROCESS holds — a commit log is memory.
|
|
22
|
+
* A conversation outlives its process, so the durable half of the same law
|
|
23
|
+
* lives on the conversation checkpoint: `.compaction({ retain })` carries the
|
|
24
|
+
* folded originals there, beside the summary that stands for them. See
|
|
25
|
+
* {@link CompactionRetention} and {@link FoldedSpan}.
|
|
20
26
|
*/
|
|
21
27
|
export {};
|
|
22
28
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* DFS stage).
|
|
55
55
|
*/
|
|
56
56
|
import type { LLMMessage } from '../adapters/types.js';
|
|
57
|
+
import type { FoldedSpan } from './agent/window/types.js';
|
|
57
58
|
/**
|
|
58
59
|
* JSON-serializable checkpoint of an in-progress agent run. Persist
|
|
59
60
|
* to ANY durable store (Redis / Postgres / S3 / disk / queue) and
|
|
@@ -85,6 +86,29 @@ export interface AgentRunCheckpoint {
|
|
|
85
86
|
};
|
|
86
87
|
/** Wall-clock when the checkpoint was captured. Diagnostic only. */
|
|
87
88
|
readonly checkpointedAt: number;
|
|
89
|
+
/**
|
|
90
|
+
* Every span this conversation folded into a summary, oldest first — what
|
|
91
|
+
* makes a compacted conversation still a provable one after the process
|
|
92
|
+
* that compacted it is gone.
|
|
93
|
+
*
|
|
94
|
+
* Written by `.compaction()`; absent on a conversation that never folded,
|
|
95
|
+
* and absent on one stored by a runtime older than 8.2. Under the default
|
|
96
|
+
* `retain: 'conversation'` each span carries the folded messages verbatim;
|
|
97
|
+
* under `retain: 'discard'` the span is still here, naming what left, and
|
|
98
|
+
* only `messages` is absent.
|
|
99
|
+
*
|
|
100
|
+
* Join a summary in {@link history} to its span with `foldedSpanFor(...)` —
|
|
101
|
+
* by content fingerprint, never by index, because a later fold moves every
|
|
102
|
+
* index after it.
|
|
103
|
+
*
|
|
104
|
+
* **Version 1 still, deliberately.** An optional field is not a format
|
|
105
|
+
* change: a runtime that has never heard of `folded` reads this checkpoint,
|
|
106
|
+
* ignores it, and continues the conversation correctly — the summary is an
|
|
107
|
+
* ordinary message in `history` either way. Bumping the version would make
|
|
108
|
+
* an older deployment REFUSE a session it can serve perfectly well, which is
|
|
109
|
+
* the opposite of what the version field is for.
|
|
110
|
+
*/
|
|
111
|
+
readonly folded?: readonly FoldedSpan[];
|
|
88
112
|
/** Where the failure happened. Diagnostic — surfaces in oncall
|
|
89
113
|
* triage so you can tell "LLM 500 mid-iteration" from "tool
|
|
90
114
|
* threw" from "validation kept failing". */
|
|
@@ -159,7 +183,14 @@ export declare function buildCheckpoint(tracker: RunCheckpointTracker, failurePo
|
|
|
159
183
|
phase: AgentRunCheckpoint['failurePoint'] extends infer F ? F extends {
|
|
160
184
|
phase: infer P;
|
|
161
185
|
} ? P : never : never;
|
|
162
|
-
}
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* Spans this run folded, read from committed state by the caller. Passed in
|
|
189
|
+
* rather than tracked, because the tracker follows `history` through events
|
|
190
|
+
* and a fold's span is committed state — and because the same reader then
|
|
191
|
+
* serves both checkpoint carriers, so neither can lose what the other keeps.
|
|
192
|
+
*/
|
|
193
|
+
folded?: readonly FoldedSpan[]): AgentRunCheckpoint;
|
|
163
194
|
/**
|
|
164
195
|
* Validate a checkpoint at deserialization time. Catches forward-
|
|
165
196
|
* incompatible payloads (someone tries to resume a v3 checkpoint on
|
|
@@ -103,7 +103,14 @@ export class RunCheckpointError extends Error {
|
|
|
103
103
|
*
|
|
104
104
|
* @internal
|
|
105
105
|
*/
|
|
106
|
-
export function buildCheckpoint(tracker, failurePoint
|
|
106
|
+
export function buildCheckpoint(tracker, failurePoint,
|
|
107
|
+
/**
|
|
108
|
+
* Spans this run folded, read from committed state by the caller. Passed in
|
|
109
|
+
* rather than tracked, because the tracker follows `history` through events
|
|
110
|
+
* and a fold's span is committed state — and because the same reader then
|
|
111
|
+
* serves both checkpoint carriers, so neither can lose what the other keeps.
|
|
112
|
+
*/
|
|
113
|
+
folded) {
|
|
107
114
|
return {
|
|
108
115
|
version: 1,
|
|
109
116
|
runId: tracker.runId,
|
|
@@ -112,6 +119,7 @@ export function buildCheckpoint(tracker, failurePoint) {
|
|
|
112
119
|
originalInput: tracker.originalInput,
|
|
113
120
|
checkpointedAt: Date.now(),
|
|
114
121
|
...(failurePoint && { failurePoint }),
|
|
122
|
+
...(folded !== undefined && folded.length > 0 && { folded }),
|
|
115
123
|
};
|
|
116
124
|
}
|
|
117
125
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCheckpoint.js","sourceRoot":"","sources":["../../../src/core/runCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;
|
|
1
|
+
{"version":3,"file":"runCheckpoint.js","sourceRoot":"","sources":["../../../src/core/runCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAoEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,IAAI,GAAG,oBAA6B,CAAC;IAC9C;;6BAEyB;IACP,KAAK,CAAQ;IAC/B;mEAC+D;IACtD,UAAU,CAAqB;IAExC,YAAY,KAAY,EAAE,UAA8B;QACtD,MAAM,KAAK,GAAG,UAAU,CAAC,YAAY,EAAE,KAAK,IAAI,SAAS,CAAC;QAC1D,KAAK,CACH,mCAAmC,UAAU,CAAC,YAAY,EAAE,SAAS,IAAI,GAAG,KAAK,KAAK,KAAK;YACzF,8CAA8C,UAAU,CAAC,sBAAsB,IAAI;YACnF,uDAAuD;YACvD,qBAAqB,KAAK,CAAC,OAAO,EAAE,CACvC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAuBD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA6B,EAC7B,YAOC;AACD;;;;;GAKG;AACH,MAA8B;IAE9B,OAAO;QACL,OAAO,EAAE,CAAC;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C;IACJ,CAAC;IACD,OAAO,CAAuB,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAU;IAC7C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACtB,MAAM,IAAI,GAAI,GAAyB,CAAC,IAAI,IAAI,EAAE,CAAC;IACnD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;IAC9B,sDAAsD;IACtD,IACE,IAAI,KAAK,kBAAkB,IAAI,0BAA0B;QACzD,IAAI,KAAK,gBAAgB;QACzB,IAAI,KAAK,aAAa;QACtB,IAAI,KAAK,cAAc;QACvB,8CAA8C,CAAC,IAAI,CAAC,GAAG,CAAC,EACxD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,WAAW,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export { LLMCall, LLMCallBuilder, type LLMCallInput, type LLMCallOptions, type L
|
|
|
31
31
|
export { type MessageApiChartDeps } from './core/agent/buildMessageApiChart.js';
|
|
32
32
|
export { buildAgentMessageApiChart, type AgentMessageApiChartDeps, } from './core/agent/buildAgentMessageApiChart.js';
|
|
33
33
|
export { Agent, AgentBuilder, type AgentInput, type AgentOptions, type AgentOutput, type ObserverDeliveryOptions, } from './core/Agent.js';
|
|
34
|
-
export { CompactionUnmeasurableError, COMPACTED_FRAME_PREFIX, DROP_NOTICE_PREFIX, isCompactedSummary, isDropNotice, slidingWindow, summarizeOldest, tokenBudget, type CompactionOptions, type CompactionRecord, type FoldRefusal, type FoldRefusalReason, type RemovalFacts, type RemovalPlan, type SlidingWindowOptions, type SlidingWindowRecord, type TokenBudgetOptions, type TokenBudgetRecord, type Turn, type WindowEviction, type WindowRecord, type WindowRefusal, type WindowRefusalReason, type WindowStrategy, type WindowStrategyInput, type WindowStrategyResult, } from './core/agent/window/index.js';
|
|
34
|
+
export { CompactionUnmeasurableError, COMPACTED_FRAME_PREFIX, DROP_NOTICE_PREFIX, foldedMessages, foldedSpanFor, isCompactedSummary, isDropNotice, slidingWindow, summarizeOldest, tokenBudget, type CompactionOptions, type CompactionRecord, type CompactionRetention, type FoldedConversation, type FoldedSpan, type FoldRefusal, type FoldRefusalReason, type RemovalFacts, type RemovalPlan, type SlidingWindowOptions, type SlidingWindowRecord, type TokenBudgetOptions, type TokenBudgetRecord, type Turn, type WindowEviction, type WindowRecord, type WindowRefusal, type WindowRefusalReason, type WindowStrategy, type WindowStrategyInput, type WindowStrategyResult, } from './core/agent/window/index.js';
|
|
35
35
|
export type { SelfExplainOptions } from './lib/trace-toolpack/selfExplain.js';
|
|
36
36
|
export type { ObserverDrainResult, ObserverStats } from 'footprintjs';
|
|
37
37
|
export type { ToolArgValidationMode } from './core/agent/toolArgsValidation.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -112,7 +112,12 @@ export { Agent, AgentBuilder, } from './core/Agent.js';
|
|
|
112
112
|
// summarizeOldest fold the oldest span into a summary (what `.compaction()` is)
|
|
113
113
|
// slidingWindow keep the last N turns, drop older ones
|
|
114
114
|
// tokenBudget counted-token trigger, drop instead of summarize
|
|
115
|
-
|
|
115
|
+
//
|
|
116
|
+
// A commit log lives as long as the process; a conversation lives longer. So
|
|
117
|
+
// `.compaction({ retain })` carries the folded originals on the conversation
|
|
118
|
+
// checkpoint too, and `foldedSpanFor(conversation, message)` is the door back
|
|
119
|
+
// to them after a restart.
|
|
120
|
+
export { CompactionUnmeasurableError, COMPACTED_FRAME_PREFIX, DROP_NOTICE_PREFIX, foldedMessages, foldedSpanFor, isCompactedSummary, isDropNotice, slidingWindow, summarizeOldest, tokenBudget, } from './core/agent/window/index.js';
|
|
116
121
|
export { OutputSchemaError, applyOutputSchema, } from './core/outputSchema.js';
|
|
117
122
|
// 7.26 — the loop's side of the output contract. `OutputAttempt` is the row
|
|
118
123
|
// shape `snapshot.sharedState.outputAttempts` carries; the frame prefix and
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAsCpD,6BAA6B;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,yEAAyE;AACzE,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc;AAEd,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,gBAAgB;AAChB,SAAS;AAET,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,YAAY,GAGb,MAAM,kBAAkB,CAAC;AAC1B,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EACL,gBAAgB,GAMjB,MAAM,2BAA2B,CAAC;AAKnC,yCAAyC;AACzC,EAAE;AACF,yEAAyE;AACzE,kEAAkE;AAClE,oEAAoE;AACpE,qEAAqE;AACrE,2EAA2E;AAC3E,8EAA8E;AAC9E,0DAA0D;AAC1D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GAKjB,MAAM,wCAAwC,CAAC;AAIhD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAO7D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AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
package/dist/index.js
CHANGED
|
@@ -21,8 +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.
|
|
25
|
-
exports.indexDocuments = exports.defineRAG = exports.providerFromEnv = exports.Graph = exports.graph = exports.Workflow = exports.workflow = exports.LoopBuilder = exports.Loop = 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.isSchemaCheckMessage = exports.SCHEMA_TOOL_NAME = exports.SCHEMA_CHECK_FRAME_PREFIX = exports.applyOutputSchema = exports.OutputSchemaError = exports.tokenBudget = void 0;
|
|
24
|
+
exports.isDropNotice = exports.isCompactedSummary = exports.foldedSpanFor = exports.foldedMessages = exports.DROP_NOTICE_PREFIX = exports.COMPACTED_FRAME_PREFIX = exports.CompactionUnmeasurableError = 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.ACT_KEYS = exports.actKeyFor = exports.LOOP_MOMENTS = exports.MessageDeniedError = exports.deny = exports.ask = exports.allow = exports.isAskPause = 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.Graph = exports.graph = exports.Workflow = exports.workflow = exports.LoopBuilder = exports.Loop = 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.isSchemaCheckMessage = exports.SCHEMA_TOOL_NAME = exports.SCHEMA_CHECK_FRAME_PREFIX = exports.applyOutputSchema = exports.OutputSchemaError = exports.tokenBudget = exports.summarizeOldest = exports.slidingWindow = void 0;
|
|
26
26
|
// Side-effect imports — auto-register v2.6+ cache strategies in the
|
|
27
27
|
// strategy registry. Without these, only the wildcard NoOp is
|
|
28
28
|
// registered and `Agent.create({ provider: browserAnthropic({...}) })`
|
|
@@ -170,10 +170,17 @@ Object.defineProperty(exports, "AgentBuilder", { enumerable: true, get: function
|
|
|
170
170
|
// summarizeOldest fold the oldest span into a summary (what `.compaction()` is)
|
|
171
171
|
// slidingWindow keep the last N turns, drop older ones
|
|
172
172
|
// tokenBudget counted-token trigger, drop instead of summarize
|
|
173
|
+
//
|
|
174
|
+
// A commit log lives as long as the process; a conversation lives longer. So
|
|
175
|
+
// `.compaction({ retain })` carries the folded originals on the conversation
|
|
176
|
+
// checkpoint too, and `foldedSpanFor(conversation, message)` is the door back
|
|
177
|
+
// to them after a restart.
|
|
173
178
|
var index_js_2 = require("./core/agent/window/index.js");
|
|
174
179
|
Object.defineProperty(exports, "CompactionUnmeasurableError", { enumerable: true, get: function () { return index_js_2.CompactionUnmeasurableError; } });
|
|
175
180
|
Object.defineProperty(exports, "COMPACTED_FRAME_PREFIX", { enumerable: true, get: function () { return index_js_2.COMPACTED_FRAME_PREFIX; } });
|
|
176
181
|
Object.defineProperty(exports, "DROP_NOTICE_PREFIX", { enumerable: true, get: function () { return index_js_2.DROP_NOTICE_PREFIX; } });
|
|
182
|
+
Object.defineProperty(exports, "foldedMessages", { enumerable: true, get: function () { return index_js_2.foldedMessages; } });
|
|
183
|
+
Object.defineProperty(exports, "foldedSpanFor", { enumerable: true, get: function () { return index_js_2.foldedSpanFor; } });
|
|
177
184
|
Object.defineProperty(exports, "isCompactedSummary", { enumerable: true, get: function () { return index_js_2.isCompactedSummary; } });
|
|
178
185
|
Object.defineProperty(exports, "isDropNotice", { enumerable: true, get: function () { return index_js_2.isDropNotice; } });
|
|
179
186
|
Object.defineProperty(exports, "slidingWindow", { enumerable: true, get: function () { return index_js_2.slidingWindow; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,wEAAw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MpB,+CAO6B;AAN3B,+FAAA,IAAI,OAAA;AACJ,sGAAA,WAAW,OAAA;AAMb,uDAKiC;AAJ/B,uGAAA,QAAQ,OAAA;AACR,uGAAA,QAAQ,OAAA;AAIV,iDAQ8B;AAP5B,iGAAA,KAAK,OAAA;AACL,iGAAA,KAAK,OAAA;AAQP,2BAA2B;AAC3B,8EAA8E;AAC9E,wEAAwE;AACxE,mEAAmE;AACnE,qEAAqE;AACrE,EAAE;AACF,kEAAkE;AAClE,qEAAqE;AACrE,wEAAwE;AACxE,gEAAgE;AAChE,gEAAgE;AAChE,6CAA6C;AAC7C,EAAE;AACF,2FAA2F;AAC3F,wFAAwF;AAExF,sEAK0C;AAJxC,oHAAA,eAAe,OAAA;AAMjB,+DAA+D;AAE/D,oEAAoE;AACpE,gEAAgE;AAEhE,qEAAqE;AACrE,0DAA0D;AAC1D,sDAAoC;AAEpC,uEAAuE;AACvE,uEAAuE;AACvE,oEAAoE;AACpE,sEAAsE;AACtE,8CAA8C;AAE9C,wEAAwE;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,+CAM4B;AAL1B,qGAAA,SAAS,OAAA;AAET,0GAAA,cAAc,OAAA;AAKhB,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,8DAA8D;AAC9D,wEAAwE;AACxE,gDAAgD;AAChD,wEAAwE;AACxE,gEAAgE;AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
|
@@ -199,6 +199,11 @@ export declare class Agent extends RunnerBase<AgentInput, AgentOutput> {
|
|
|
199
199
|
* function restores `scope.history` from this instead of starting
|
|
200
200
|
* fresh. Cleared on first read so subsequent runs start clean. */
|
|
201
201
|
private pendingResumeHistory?;
|
|
202
|
+
/** Its sibling for the folded spans. A restored conversation that dropped
|
|
203
|
+
* them would carry summaries nobody could unpack — the evidence would be
|
|
204
|
+
* destroyed by the act of continuing, which is the one thing retention
|
|
205
|
+
* exists to prevent. Cleared on first read, exactly like the history. */
|
|
206
|
+
private pendingResumeFolded?;
|
|
202
207
|
/** The last completed run's final answer — see `checkpoint()` for why it is
|
|
203
208
|
* kept here rather than read back from the recording. Undefined after a run
|
|
204
209
|
* that failed or paused. */
|
|
@@ -431,6 +436,18 @@ export declare class Agent extends RunnerBase<AgentInput, AgentOutput> {
|
|
|
431
436
|
* ```
|
|
432
437
|
*/
|
|
433
438
|
checkpoint(): AgentRunCheckpoint | undefined;
|
|
439
|
+
/**
|
|
440
|
+
* The folded spans this run has committed, cloned on the way out.
|
|
441
|
+
*
|
|
442
|
+
* One reader for both carriers — `checkpoint()` and the crash checkpoint
|
|
443
|
+
* `RunCheckpointError` carries — so a conversation cannot keep its spans on
|
|
444
|
+
* one path and silently lose them on the other. The clone is the same
|
|
445
|
+
* promise `checkpoint()` makes about history: a persistence layer never gets
|
|
446
|
+
* a reference into the live heap.
|
|
447
|
+
*
|
|
448
|
+
* @internal
|
|
449
|
+
*/
|
|
450
|
+
private foldedSpansOf;
|
|
434
451
|
/**
|
|
435
452
|
* Refuse, at run start, any declared messages-slot role this provider
|
|
436
453
|
* cannot carry inside its message list (7.21, D2).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../../src/core/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,sBAAsB,EAI3B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAExB,KAAK,UAAU,EACf,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAOjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAgCrD,OAAO,KAAK,EAAE,cAAc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ACxB,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAc5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,UAAU,IAAI,kBAAkB,GAAG,SAAS;IAwB5C;;;;;;;;;;OAUG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,+BAA+B;IAcvC,OAAO,CAAC,cAAc;IAiJtB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAAc,CAAC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAK3E,OAAO,CAAC,cAAc;IAiHtB,OAAO,CAAC,UAAU;CAmRnB"}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
import type { TypedScope } from 'footprintjs';
|
|
20
20
|
import type { LLMMessage, LLMToolSchema } from '../../../adapters/types.js';
|
|
21
21
|
import type { AgentInput, AgentState, RunConfig } from '../types.js';
|
|
22
|
+
import type { FoldedSpan } from '../window/types.js';
|
|
22
23
|
import type { MessageMiddleware } from '../middleware/types.js';
|
|
23
24
|
export interface SeedStageDeps {
|
|
24
25
|
/** Resolved `clampIterations(opts.maxIterations ?? 10)`. Frozen at
|
|
@@ -38,6 +39,16 @@ export interface SeedStageDeps {
|
|
|
38
39
|
* `undefined` for the normal (non-resume) path.
|
|
39
40
|
*/
|
|
40
41
|
readonly consumePendingResumeHistory: () => readonly LLMMessage[] | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The same read-AND-CLEAR accessor for the conversation's folded spans.
|
|
44
|
+
*
|
|
45
|
+
* A restored window can contain summaries that stand for messages this
|
|
46
|
+
* process never saw. Restoring the window without the spans would leave the
|
|
47
|
+
* agent holding claims whose evidence nothing can produce — and the next
|
|
48
|
+
* `checkpoint()` would then write that loss back to the store permanently.
|
|
49
|
+
* Undefined for a fresh run, and for any conversation stored before 8.2.
|
|
50
|
+
*/
|
|
51
|
+
readonly consumePendingResumeFolded?: () => readonly FoldedSpan[] | undefined;
|
|
41
52
|
/**
|
|
42
53
|
* Accessor for the current run's id, used to default the memory
|
|
43
54
|
* identity when consumer didn't pass `agent.run({ identity })`. Set
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/stages/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,MAAM,WAAW,aAAa;IAC5B;4BACwB;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;iEAE6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/C;;;;;;OAMG;IACH,QAAQ,CAAC,2BAA2B,EAAE,MAAM,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IAC9E;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACnD;;;;;;;OAOG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,SAAS,GAAG,SAAS,CAAC;IACzE;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC3D;AAED;;;;GAIG;AACH,wBA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AAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,aAAa,GAClB,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzD"}
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
* runtimeStageId whose messages left. A compacted (or trimmed) run is still a
|
|
15
15
|
* provable run.
|
|
16
16
|
*
|
|
17
|
+
* A commit log is memory, though, and a conversation outlives the process that
|
|
18
|
+
* held it. So a strategy may also hand back `folded` spans — the durable form
|
|
19
|
+
* of the same fact — and this stage commits them to `scope.foldedSpans`, which
|
|
20
|
+
* `agent.checkpoint()` carries onto the conversation. A compacted CONVERSATION
|
|
21
|
+
* is still a provable conversation, in the next process and the one after.
|
|
22
|
+
*
|
|
17
23
|
* This file is deliberately all WIRING. The decision — what the window should
|
|
18
24
|
* become — lives behind `WindowStrategy` (window/strategy.ts, public since
|
|
19
25
|
* 7.17), so the duty to record, emit and cost what happened stays in exactly
|
|
@@ -52,6 +58,13 @@ export interface WindowStageDeps {
|
|
|
52
58
|
readonly agentModel: string;
|
|
53
59
|
/** The MAIN provider's name, for a refusal that names it. */
|
|
54
60
|
readonly providerName: string;
|
|
61
|
+
/**
|
|
62
|
+
* The current run's id, read per run (the stage is built once, at chart
|
|
63
|
+
* build time, and outlives every run it serves). A strategy that retains
|
|
64
|
+
* what it removed stamps this on the span, so a stored conversation can say
|
|
65
|
+
* which run's commit log used to hold those messages.
|
|
66
|
+
*/
|
|
67
|
+
readonly getRunId?: () => string | undefined;
|
|
55
68
|
/** Optional pricing adapter, so a summarizer call is costed like any other. */
|
|
56
69
|
readonly pricingTable?: PricingTable;
|
|
57
70
|
/** Optional cumulative USD cap per run. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/stages/window.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/stages/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAKxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC7C,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED,8BAA8B;AAC9B,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,eAAe,GACpB,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CA4HlD"}
|
|
@@ -18,7 +18,7 @@ import type { CredentialProvider } from '../../identity/types.js';
|
|
|
18
18
|
import type { ToolArgValidationMode } from './toolArgsValidation.js';
|
|
19
19
|
import type { ThinkingBlock } from '../../thinking/types.js';
|
|
20
20
|
import type { ReliabilityScope } from '../../reliability/types.js';
|
|
21
|
-
import type { WindowRecord } from './window/types.js';
|
|
21
|
+
import type { FoldedSpan, WindowRecord } from './window/types.js';
|
|
22
22
|
import type { MessagesDelivery } from './delivery/types.js';
|
|
23
23
|
import type { MiddlewareDecision } from './middleware/types.js';
|
|
24
24
|
import type { OutputAttempt } from './outputEnforcement.js';
|
|
@@ -475,6 +475,20 @@ export interface AgentState {
|
|
|
475
475
|
* than break every reader for a better word. Narrow a record by its
|
|
476
476
|
* `strategy` field, not by the key it lives under. */
|
|
477
477
|
compactions?: readonly WindowRecord[];
|
|
478
|
+
/** The DURABLE half of the same law: one span per fold, carrying what the
|
|
479
|
+
* summary stands for and — under `retain: 'conversation'`, the default —
|
|
480
|
+
* the folded messages themselves.
|
|
481
|
+
*
|
|
482
|
+
* `compactions` is a record of what a RUN did and dies with the run's
|
|
483
|
+
* commit log. This is what a CONVERSATION carries: `agent.checkpoint()`
|
|
484
|
+
* copies it onto `AgentRunCheckpoint.folded`, `resumeOnError` restores it,
|
|
485
|
+
* and so a standing agent's spans accumulate across every turn, every
|
|
486
|
+
* restart and every deploy.
|
|
487
|
+
*
|
|
488
|
+
* Written only when a strategy actually replaced messages with something
|
|
489
|
+
* that stands for them (today: `summarizeOldest`). Absent otherwise, so an
|
|
490
|
+
* agent that never folds commits exactly the keys it always did. */
|
|
491
|
+
foldedSpans?: readonly FoldedSpan[];
|
|
478
492
|
/** Set when a `PermissionChecker` returns `{ result: 'halt', ... }`.
|
|
479
493
|
* `Agent.run()` reads these at the API boundary and throws a typed
|
|
480
494
|
* `PolicyHaltError` carrying the same context — the chart $break's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,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