agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
42 lines • 2.3 kB
TypeScript
/**
* marker — the one positive sign that a snapshot was SERVED under a redaction
* policy, carried by the snapshot itself.
*
* Pattern: a recorder with no data but a snapshot bundle, attached to a run's
* executor only when a policy covers the run
* (`runRedaction.ts` · `applyTo`).
* Role: the Lens half's guard. A reader of a record (the answer account,
* `assessAnswer`, the served views) reads footprintjs's placeholder
* as a value KEPT OUT only when the record says a policy covered the
* run. Without that sign a tool that really returned the string
* `'REDACTED'` would read as kept out — and an unredacted run's
* account would change. With no policy nothing is attached, and the
* snapshot is byte-identical to before.
*
* The bundle names no policy and no key: it says a policy was in force, which
* is a fact about the record, not about the run's values.
*
* The row is a recorder's, so the run's LIVE snapshot carries it too — true of
* its commit log (footprintjs scrubs it as it is written), never of its live
* state. The library's live readers fold that state as values and do not
* consult the row (`Agent · assessment` → `assess.ts` · `assessLive`).
*/
import type { CombinedRecorder } from 'footprintjs';
/** The id the marker's bundle carries in `snapshot.recorders`. */
export declare const REDACTION_MARKER_ID = "agentfootprint.redaction";
/** Whether `value` is one of footprintjs's redaction placeholders. */
export declare function isPlaceholder(value: unknown): boolean;
/**
* The marker for a run's executor. It contributes one row to the served
* snapshot's `recorders`, and tells the run when it has SETTLED — finished,
* failed or paused (`onSettled`) — so the run's serving can let go of what
* only the live run needed (`runRedaction.ts` · `retiredRule`).
*/
export declare function redactionMarker(onSettled?: () => void): CombinedRecorder;
/**
* Whether `snapshot` (a served snapshot, or a recording's) carries the marker —
* the record was served under a redaction policy, so a placeholder in it is a
* value the policy kept out.
*/
export declare function servedUnderPolicy(snapshot: unknown): boolean;
//# sourceMappingURL=marker.d.ts.map