agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
43 lines (42 loc) • 2.03 kB
TypeScript
/**
* search/events — what a `search` tool's composed coverage puts on an EVENT.
*
* Pattern: one pure projection, read by the dispatch funnel for
* `tools.absent` and `tools.coverage_declared`.
* Role: semantics/ layer, pure.
* Emits: N/A (it shapes the payload; the funnel emits).
*
* Composed VALUES ride no event, in any mode. Events reach exporters, sinks
* and browsers that the run's redaction policy does not govern the way it
* governs the committed row, so a value the call sent — or a default, a
* host-filled identity, a result-declared instant — rides as a REFERENCE
* `{ resultId, argument }` to the row that holds it. What does ride:
*
* • `checked` — the declaration's constants only (the declared source and
* the fixed qualifiers), as `{ what }`;
* • `notChecked` / `cannotCover` — the plain gap lists, whose words name
* arguments and verdicts, never a value;
* • `composition` — origin, the row's address, `complete`, the facet
* references and the typed gaps.
*
* `lookedFor` is the tool's own words: today's bytes while `.negativeClaims()`
* is unarmed, and a reference to the row's field under the arm.
*/
import type { CoverageCompositionPayload, CoverageFieldReference, CoverageItemPayload } from '../../../events/payloads.js';
import type { CoverageFacts } from '../read.js';
/** The payload fields a composed statement contributes. */
export interface ComposedEventFields {
readonly checked: readonly CoverageItemPayload[];
readonly notChecked: readonly CoverageItemPayload[];
readonly cannotCover: readonly CoverageItemPayload[];
readonly composition: CoverageCompositionPayload;
readonly lookedFor?: string;
readonly lookedForRef?: CoverageFieldReference;
}
/**
* The event fields of one composed statement. `facts` must carry `composed`
* (the funnel asks only for those).
*/
export declare function composedEventFields(facts: CoverageFacts, opts: {
readonly armed: boolean;
}): ComposedEventFields;