agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
23 lines (22 loc) • 1.07 kB
TypeScript
/**
* window/removal — "these messages left" → the facts the ledger needs.
*
* Pattern: Pure function over the meter's provenance.
* Role: core/ layer. The stage binds this into every
* `WindowStrategyInput.removalFacts`, so a strategy can name what it
* removed without ever touching the meter — and cannot file a
* removal it is unable to name.
* Emits: N/A.
*/
import type { MessageOrigin } from '../../../recorders/core/CompactionMeter.js';
import type { RemovalFacts } from './strategy.js';
/**
* Resolve which stages wrote the removed messages, and how long each lived.
*
* `survivalMs` is measured (`atMs - bornAtMs`), and is 0 — not a guess — when
* a message's birth is unknown, which happens only for a window seeded from
* outside this run.
*/
export declare function removalFacts(origins: readonly MessageOrigin[], indices: readonly number[], atMs: number): RemovalFacts;
/** `[from, toExclusive)` as a list of indices. */
export declare function indexRange(from: number, toExclusive: number): number[];