agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
68 lines (67 loc) • 3.63 kB
TypeScript
/**
* coverage/timeLimits.ts — the time layer's limits lines for ONE turn (step T8),
* composed from the record and nothing else.
*
* Two readers ask it, so the person and the model are told the same thing:
*
* - the limits block (`stages/prepareFinal.ts`), which prints the lines under
* `Period` and `Clocks` for the PERSON after the answer;
* - the served time line (`agent/arguments/serve.ts` · `timeLimitsSentence`),
* which hands the MODEL the same lines as the library's conclusion, late, at
* the decision point, before it writes the answer.
*
* What it reads: the facts `timeLimitFacts.ts` · `timeLimitFactsOf` reads —
* the turn's `period` rows whose result checks hold, the turn's
* `source-clock` rows (`time/checkRecord.ts` · `clocksDiffer`) and the
* clock row's zone — rendered here (`period.ts` · `periodCheckLine`,
* `clockLines`). `undefined` when there is no clock (nothing to render in) or
* nothing to say.
*
* Loaded through `import()` only, under `.time()` (`stages/prepareFinal.ts`;
* `arguments/serve.ts`, itself loaded under the arm): it renders through
* `time/present.ts`, which a plain agent never loads.
*/
import { type PeriodRow } from './period.js';
import { type BoundPresentation } from '../../time/present.js';
import type { TimeLimitLines } from './answer.js';
import { type TimeLimitFacts, type TimeLimitsAudience } from './timeLimitFacts.js';
export type { TimeLimitLines };
/** The clocks line under an unknown zone (G15): the ranges are in UTC because the person's zone is not known. */
export declare const UNKNOWN_ZONE_LINE = "times are shown in UTC \u2014 the person's time zone is not known";
/**
* The model's line for a call whose source holds none or only part of the
* time it asked about (`PeriodRow.held`): what the call asked about and what
* its source holds, each AS DECLARED (inclusive ends, no end moved) and
* rendered in the presentation zone by the time layer's one renderer — the
* same spans the person's `Period:` line prints (`period.ts` · `periodLine`) — then
* how much of the asked time that is. `undefined` when the row carries none.
*
* @example
* ```ts
* heldLine(row, bindPresentation({ zone: 'America/Los_Angeles' }));
* // 'pscale_client_health asked about 2026-09-30 06:00:00–11:59:50 America/Los_Angeles (UTC-07:00);
* // its source holds 2026-10-01 09:22:44.300–10:02:44.300 America/Los_Angeles (UTC-07:00), which
* // covers none of that time'
* ```
*/
export declare function heldLine(row: PeriodRow, presentation: BoundPresentation): string | undefined;
/**
* The turn's time limits lines, from the ledger — {@link renderTimeLimits}
* over `timeLimitFacts.ts` · `timeLimitFactsOf`. `turn` undefined reads every
* row (a ledger that carries one turn). `audience` `'model'` (the served time
* line) names the person's window as theirs and keeps, of the clocks, only the
* label that two differ.
*
* @example
* ```ts
* timeLimitLinesOf(ledger, 1);
* // { period: ['client_activity read less than was asked — asked: …; read: …'], clocks: [] }
* ```
*/
export declare function timeLimitLinesOf(ledger: readonly unknown[] | undefined, turn: number | undefined, audience?: TimeLimitsAudience): TimeLimitLines | undefined;
/**
* The limits lines for `audience`, rendered in the facts' zone by the time
* layer's one renderer (`time/present.ts` · `bindPresentation`) —
* `undefined` when there are no facts or nothing to say.
*/
export declare function renderTimeLimits(facts: TimeLimitFacts | undefined, audience?: TimeLimitsAudience): TimeLimitLines | undefined;