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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* window/folded — join a summary sitting in a conversation back to what it
|
|
3
|
+
* stands for.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Pure lookup over recorded facts. No I/O, no inference.
|
|
6
|
+
* Role: core/ layer, and the ONE public door onto retained originals.
|
|
7
|
+
* Emits: N/A.
|
|
8
|
+
*
|
|
9
|
+
* ── Why a fingerprint and not an index ──────────────────────────────────────
|
|
10
|
+
* The obvious join key is "the summary is at `history[3]`". It is also wrong.
|
|
11
|
+
* A later fold swallows the span that CONTAINS an earlier summary, and every
|
|
12
|
+
* index after it moves; a conversation that folded four times would need its
|
|
13
|
+
* stored indices rewritten on every fold, and any reader holding an old one
|
|
14
|
+
* would silently be pointing at somebody else's message.
|
|
15
|
+
*
|
|
16
|
+
* So the join key is a fingerprint of the summary message's full content —
|
|
17
|
+
* authored frame included. Three things follow, and all three are the point:
|
|
18
|
+
*
|
|
19
|
+
* • it costs NO extra bytes on the wire (no id token planted in the frame);
|
|
20
|
+
* • it survives JSON, storage, and being read by a runtime that has never
|
|
21
|
+
* heard of this function;
|
|
22
|
+
* • it cannot be FORGED. A model that writes a message opening with the
|
|
23
|
+
* frame's own words produces different content, therefore a different
|
|
24
|
+
* fingerprint, therefore no match — `isCompactedSummary` alone says "this
|
|
25
|
+
* LOOKS like a frame", and this says "this IS the frame of a fold that was
|
|
26
|
+
* recorded". The two answers are different questions and the gap between
|
|
27
|
+
* them is exactly where a forgery would live.
|
|
28
|
+
*
|
|
29
|
+
* ── Absent is an answer ─────────────────────────────────────────────────────
|
|
30
|
+
* `undefined` means "no fold was recorded for this message" and never "there
|
|
31
|
+
* were no originals". A conversation stored by 8.1 has summaries and no spans
|
|
32
|
+
* at all; one folded under `retain: 'discard'` has a span whose `messages` is
|
|
33
|
+
* absent. Those are three different facts and the caller can tell them apart:
|
|
34
|
+
* no span, a span with no messages, a span with messages.
|
|
35
|
+
*/
|
|
36
|
+
import type { LLMMessage } from '../../../adapters/types.js';
|
|
37
|
+
import type { FoldedSpan } from './types.js';
|
|
38
|
+
/**
|
|
39
|
+
* The join key for one summary message: a fingerprint of its whole content.
|
|
40
|
+
*
|
|
41
|
+
* @internal Consumers join through {@link foldedSpanFor}; this is exported for
|
|
42
|
+
* the strategy that stamps the span and for tests that pin the two agree.
|
|
43
|
+
*/
|
|
44
|
+
export declare function summaryFingerprint(content: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* The smallest thing that can answer "what did this conversation fold?".
|
|
47
|
+
*
|
|
48
|
+
* Structural rather than `AgentRunCheckpoint` on purpose: it also fits a
|
|
49
|
+
* paused run's `conversation`, a hand-built fixture, and anything a consumer
|
|
50
|
+
* pulled out of their own store — and it keeps this file from importing the
|
|
51
|
+
* checkpoint module, which imports this one's sibling types.
|
|
52
|
+
*/
|
|
53
|
+
export interface FoldedConversation {
|
|
54
|
+
readonly folded?: readonly FoldedSpan[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* What one summary message in a conversation stands for.
|
|
58
|
+
*
|
|
59
|
+
* Hand it the conversation you stored and a message out of its `history`; get
|
|
60
|
+
* back the fold that produced that message, with the original messages when
|
|
61
|
+
* the policy retained them.
|
|
62
|
+
*
|
|
63
|
+
* @returns the span, or `undefined` when this conversation recorded no fold
|
|
64
|
+
* for this message — see "Absent is an answer" above.
|
|
65
|
+
*
|
|
66
|
+
* @example Show a user what the agent actually saw last week
|
|
67
|
+
* ```ts
|
|
68
|
+
* import { foldedSpanFor, isCompactedSummary } from 'agentfootprint';
|
|
69
|
+
*
|
|
70
|
+
* const conversation = readEnvelope(await sessions.hydrate(sessionId));
|
|
71
|
+
* for (const message of conversation.history) {
|
|
72
|
+
* if (!isCompactedSummary(message)) continue;
|
|
73
|
+
* const span = foldedSpanFor(conversation, message);
|
|
74
|
+
* console.log(`summary of ${span?.messageCount ?? '?'} messages`);
|
|
75
|
+
* for (const original of span?.messages ?? []) {
|
|
76
|
+
* console.log(` ${original.role}: ${original.content}`);
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function foldedSpanFor(conversation: FoldedConversation, message: LLMMessage): FoldedSpan | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Every message this conversation ever folded, oldest fold first, flattened.
|
|
84
|
+
*
|
|
85
|
+
* The transcript-shaped answer to `foldedSpanFor`'s message-shaped one: what
|
|
86
|
+
* a support view prints when somebody asks what the agent was told before the
|
|
87
|
+
* summaries. Spans that were discarded contribute nothing — they have nothing
|
|
88
|
+
* to contribute, and `foldedSpanFor` is where you find out that they existed.
|
|
89
|
+
*/
|
|
90
|
+
export declare function foldedMessages(conversation: FoldedConversation): readonly LLMMessage[];
|
|
91
|
+
//# sourceMappingURL=folded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folded.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/folded.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,YAAY,EAAE,kBAAkB,EAChC,OAAO,EAAE,UAAU,GAClB,UAAU,GAAG,SAAS,CAKxB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,kBAAkB,GAAG,SAAS,UAAU,EAAE,CAItF"}
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
* is a claim about the past, so this library files it as a claim — not as the
|
|
9
9
|
* past. A drop is an absence, and it is named the same way.
|
|
10
10
|
*
|
|
11
|
+
* A commit log lives as long as the process. A conversation lives longer, so
|
|
12
|
+
* `.compaction({ retain })` also carries the folded originals on the
|
|
13
|
+
* conversation checkpoint — `foldedSpanFor(conversation, message)` is the door
|
|
14
|
+
* back to them, in this process or the one after the deploy.
|
|
15
|
+
*
|
|
11
16
|
* Three strategies ship, all sharing one turn segmentation and one refusal
|
|
12
17
|
* engine:
|
|
13
18
|
* `summarizeOldest` fold the oldest span into a summary (`.compaction()`)
|
|
@@ -17,7 +22,8 @@
|
|
|
17
22
|
* Public surface (re-exported from the package root).
|
|
18
23
|
*/
|
|
19
24
|
export { CompactionUnmeasurableError } from './errors.js';
|
|
20
|
-
export type { CompactionOptions, CompactionRecord, FoldRefusal, FoldRefusalReason, ResolvedCompaction, SlidingWindowOptions, SlidingWindowRecord, TokenBudgetOptions, TokenBudgetRecord, WindowRecord, WindowRefusal, WindowRefusalReason, } from './types.js';
|
|
25
|
+
export type { CompactionOptions, CompactionRecord, CompactionRetention, FoldedSpan, FoldRefusal, FoldRefusalReason, ResolvedCompaction, SlidingWindowOptions, SlidingWindowRecord, TokenBudgetOptions, TokenBudgetRecord, WindowRecord, WindowRefusal, WindowRefusalReason, } from './types.js';
|
|
26
|
+
export { foldedMessages, foldedSpanFor, type FoldedConversation } from './folded.js';
|
|
21
27
|
export type { RemovalFacts, WindowEviction, WindowStrategy, WindowStrategyInput, WindowStrategyResult, } from './strategy.js';
|
|
22
28
|
export type { RemovalPlan, Turn } from './turns.js';
|
|
23
29
|
export { COMPACTED_FRAME_PREFIX, isCompactedSummary } from './summarize.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrF,YAAY,EACV,YAAY,EACZ,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
* out to be nonsense on iteration 40 of a paid run is a policy that cost you
|
|
14
14
|
* money to discover.
|
|
15
15
|
*/
|
|
16
|
-
import type { CompactionOptions, ResolvedCompaction, SlidingWindowOptions, TokenBudgetOptions } from './types.js';
|
|
16
|
+
import type { CompactionOptions, CompactionRetention, ResolvedCompaction, SlidingWindowOptions, TokenBudgetOptions } from './types.js';
|
|
17
17
|
/** Default depth of the "never touch this" recent window. */
|
|
18
18
|
export declare const DEFAULT_KEEP_RECENT_TURNS = 6;
|
|
19
|
+
/**
|
|
20
|
+
* What happens to folded messages when nobody said. The originals ride with
|
|
21
|
+
* the conversation: losing them has to be a choice somebody typed, not a
|
|
22
|
+
* default they inherited.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_RETENTION: CompactionRetention;
|
|
19
25
|
/**
|
|
20
26
|
* Validate `.compaction()` / `summarizeOldest()` options.
|
|
21
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAAoC,CAAC;AAkCrE;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,MAAM,GACZ,kBAAkB,CAoCpB;AAED,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAWtC;AAED,wCAAwC;AACxC,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAMxE"}
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* This is what `.compaction({...})` configures, and the market's familiar
|
|
11
11
|
* move (Claude Code / the Claude Agent SDK call it compaction). What is
|
|
12
12
|
* different here is not the fold — it is that the fold is filed as a claim:
|
|
13
|
-
* a summary is a claim ABOUT the past, and the past itself stays
|
|
14
|
-
* commit log,
|
|
13
|
+
* a summary is a claim ABOUT the past, and the past itself stays. In the
|
|
14
|
+
* commit log for as long as the process lives, and — since 8.2, under
|
|
15
|
+
* `retain: 'conversation'` — on the conversation checkpoint for as long as
|
|
16
|
+
* the conversation does, which is the half a standing agent actually needs.
|
|
15
17
|
*
|
|
16
18
|
* Everything it decides, it explains. Every engaged path returns a record —
|
|
17
19
|
* including the paths that change nothing, which are the ones a person
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarizeOldest.d.ts","sourceRoot":"","sources":["../../../../../../src/core/agent/window/strategies/summarizeOldest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summarizeOldest.d.ts","sourceRoot":"","sources":["../../../../../../src/core/agent/window/strategies/summarizeOldest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,KAAK,EAAE,cAAc,EAA6C,MAAM,gBAAgB,CAAC;AAGhG,OAAO,KAAK,EAAE,iBAAiB,EAA+C,MAAM,aAAa,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,CAuK1E"}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import type { LLMMessage } from '../../../adapters/types.js';
|
|
41
41
|
import type { Turn, RemovalPlan } from './turns.js';
|
|
42
|
-
import type { WindowRecord } from './types.js';
|
|
42
|
+
import type { FoldedSpan, WindowRecord } from './types.js';
|
|
43
43
|
/** One message leaving the window, with the facts an eviction event needs. */
|
|
44
44
|
export interface WindowEviction {
|
|
45
45
|
/** Index in the PRE-change window — the index the content hash was built on. */
|
|
@@ -76,6 +76,16 @@ export interface WindowStrategyInput {
|
|
|
76
76
|
} | undefined;
|
|
77
77
|
/** The ReAct iteration this decision belongs to. */
|
|
78
78
|
readonly iteration: number;
|
|
79
|
+
/**
|
|
80
|
+
* The run this decision belongs to.
|
|
81
|
+
*
|
|
82
|
+
* A strategy that retains what it removed has to name the run whose commit
|
|
83
|
+
* log held it — that is the honest answer to "where else could I have found
|
|
84
|
+
* this?", and the answer is "nowhere, once that process ended", which is the
|
|
85
|
+
* whole reason retention exists. `'unknown'` when the runtime could not name
|
|
86
|
+
* the run, never a fabricated id.
|
|
87
|
+
*/
|
|
88
|
+
readonly runId: string;
|
|
79
89
|
/** The agent's own model — the sensible default for a strategy that bills. */
|
|
80
90
|
readonly agentModel: string;
|
|
81
91
|
/** `provider.name` of the MAIN provider, for a refusal that names it. */
|
|
@@ -128,6 +138,21 @@ export interface WindowStrategyResult {
|
|
|
128
138
|
readonly record: WindowRecord;
|
|
129
139
|
/** Messages that left the window, for `context.evicted`. */
|
|
130
140
|
readonly evictions: readonly WindowEviction[];
|
|
141
|
+
/**
|
|
142
|
+
* Spans this visit removed, in the form that OUTLIVES the process: appended
|
|
143
|
+
* to the conversation checkpoint, so a restart can still say what a summary
|
|
144
|
+
* stands for — and, under `retain: 'conversation'`, produce it verbatim.
|
|
145
|
+
*
|
|
146
|
+
* OMIT IT unless your strategy replaced messages with something that stands
|
|
147
|
+
* for them. `summarizeOldest` fills it because a summary is a claim that
|
|
148
|
+
* needs its evidence; the drop strategies do not, because a drop replaces
|
|
149
|
+
* nothing and its authored notice claims nothing.
|
|
150
|
+
*
|
|
151
|
+
* The stage writes these in the SAME commit as the window change, so there
|
|
152
|
+
* is no state in which messages left the window and the record of what they
|
|
153
|
+
* were did not follow them.
|
|
154
|
+
*/
|
|
155
|
+
readonly folded?: readonly FoldedSpan[];
|
|
131
156
|
/**
|
|
132
157
|
* The budget reading to report on `agentfootprint.context.budget_pressure`.
|
|
133
158
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3D,8EAA8E;AAC9E,MAA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IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;CAC7E"}
|
|
@@ -17,9 +17,15 @@
|
|
|
17
17
|
*
|
|
18
18
|
* The frame is authored. The summary is data. Neither can become
|
|
19
19
|
* the other.
|
|
20
|
+
*
|
|
21
|
+
* A third rule joined them in 8.2: the frame may only claim what is
|
|
22
|
+
* true. It names where the folded messages went, and it reads that
|
|
23
|
+
* from the resolved retention policy rather than asserting a
|
|
24
|
+
* constant — see {@link retentionSentence}.
|
|
20
25
|
* Emits: N/A (the stage emits; this file only builds and calls).
|
|
21
26
|
*/
|
|
22
27
|
import type { LLMMessage, LLMProvider, LLMResponse } from '../../../adapters/types.js';
|
|
28
|
+
import type { CompactionRetention } from './types.js';
|
|
23
29
|
/** Opening of the authored label. Stable — tests and readers match on it. */
|
|
24
30
|
export declare const COMPACTED_FRAME_PREFIX = "[compacted history";
|
|
25
31
|
/**
|
|
@@ -39,11 +45,16 @@ export declare function renderTranscript(messages: readonly LLMMessage[]): strin
|
|
|
39
45
|
* The label is written by this function and always comes first. `summary` is
|
|
40
46
|
* appended to it verbatim: the library never edits model output, and it never
|
|
41
47
|
* lets model output speak in the library's voice either.
|
|
48
|
+
*
|
|
49
|
+
* The label states the retention policy, and states it truthfully — see
|
|
50
|
+
* {@link retentionSentence}. `COMPACTED_FRAME_PREFIX` is unchanged: it is what
|
|
51
|
+
* every reader and every test matches on, and it stays put.
|
|
42
52
|
*/
|
|
43
53
|
export declare function buildSummaryMessage(summary: string, facts: {
|
|
44
54
|
readonly foldedMessageCount: number;
|
|
45
55
|
readonly iteration: number;
|
|
46
56
|
readonly model: string;
|
|
57
|
+
readonly retain: CompactionRetention;
|
|
47
58
|
}): LLMMessage;
|
|
48
59
|
/** True when this message is a frame a previous fold wrote. */
|
|
49
60
|
export declare function isCompactedSummary(msg: LLMMessage | undefined): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarize.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/summarize.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"summarize.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/summarize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAM3D;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAYzB,CAAC;AAcb,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAExE;AAoBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE;IACL,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC,GACA,UAAU,CAOZ;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAEvE;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,UAAU,EAAE,EAC3B,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,eAAe,CAAC,CAQ1B"}
|
|
@@ -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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAM1E;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB;AAC7B,4EAA4E;AAC1E,iBAAiB;AACnB;;;;GAIG;GACD,sBAAsB;AACxB,oEAAoE;GAClE,aAAa;AACf,uEAAuE;GACrE,kBAAkB;AACpB,yEAAyE;GACvE,oBAAoB;AACtB;;;;GAIG;GACD,uBAAuB;AACzB,0EAA0E;GACxE,mBAAmB;AACrB;;;;;;;;;;GAUG;GACD,qBAAqB,CAAC;AAE1B,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mEAAmE;I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Q,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAC3C;AAMD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCheckpoint.d.ts","sourceRoot":"","sources":["../../../src/core/runCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"runCheckpoint.d.ts","sourceRoot":"","sources":["../../../src/core/runCheckpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB;;;qEAGiE;IACjE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;gEAC4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC;;;uCAGmC;IACnC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC;+DAC2D;IA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,CAAC,GACrD,CAAC,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC,CAAA;KAAE,GAC1B,CAAC,GACD,KAAK,GACP,KAAK,CAAC;CACX;AACD;;;;;GAKG;AACH,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,GAC7B,kBAAkB,CAWpB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CA0BrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,KAAK,GAAG,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAmBzF"}
|
package/dist/types/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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAOpD,YAAY,EAEV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,EAEZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EAEV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAEhB,SAAS,EAET,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,cAAc,qBAAqB,CAAC;AAIpC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,YAAY,EAKjB,SAAS,EACT,KAAK,SAAS,EAKd,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,2BAA2B,CA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KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,QAAQ,EACR,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,SAAS,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,IAAI,EACJ,WAAW,EACX,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,EACL,KAAK,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAkB9B,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC;AAS1C,cAAc,qBAAqB,CAAC;AAWpC,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|