agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
83 lines • 3.69 kB
TypeScript
/**
* time/rowsBuild — the builders of the time layer's rows (`rows.ts` owns
* the shapes, the readers and the checkpoint door's checks).
*
* Pattern: one builder per row kind, each returning the plain record the
* ledger's one writer files.
* Role: L0 leaf (the time layer). Split from `rows.ts` because
* `timeReadingRows` runs the resolver (`resolve.ts`), which only an
* armed agent loads — its callers (`agent/stages/timeLayer.ts`, the
* inputs layer's `arguments/resolve.ts`) are reached through
* `import()` — while `rows.ts` sits on the checkpoint door's
* synchronous path (the optional-family law of docs-next's site
* budget). Import a builder from HERE — `rows.ts` does not re-export
* them, or a bundler would place them on its synchronous path.
* Emits: N/A.
*
* @example
* ```ts
* clockRow(clock, { turn: 1, iteration: 1 }); // { kind: 'clock', turn: 1, … }
* ```
*/
import type { TimeRange } from './range.js';
import { type ReadRunTime, type TimeClock } from './clock.js';
import type { CheckedMention } from './reader.js';
import type { CallWindow } from './bind.js';
import { type TimePolicy } from './resolve.js';
import type { CallDrift, CallRow, CallWindowRow, ClockOnResumeRow, ClockRow, TimeReaderStamp, TimeReadingRow } from './rows.js';
/** The clock stamp for one turn. */
export declare function clockRow(clock: TimeClock, at: {
readonly turn: number;
readonly iteration: number;
}, window?: TimeRange): ClockRow;
/**
* The row for one dispatched call. `nowMs` is the wall clock — the second of
* the layer's two recorded wall-clock reads (the first is a default `now`).
*/
export declare function callRow(call: {
readonly toolCallId: string;
readonly toolName: string;
}, at: {
readonly turn: number;
readonly iteration: number;
}, nowMs: number, drift?: CallDrift): CallRow;
/**
* The row for a resume whose passed `time` differs from the turn's kept clock
* (`clock.ts` · `clockChange`), or `undefined` when nothing differs. The kept
* clock is the turn's `clock` row; it is never replaced.
*/
export declare function clockOnResumeRow(passed: ReadRunTime, kept: ClockRow, at: {
readonly turn: number;
readonly iteration: number;
}): ClockOnResumeRow | undefined;
/**
* The `time-reading` rows for one checked reading (`reader.ts` ·
* `checkReading`): one per mention, resolved against the turn's clock — or
* one `mentions: 0` row. The one owner of the law "a reading only PROPOSES"
* (the owner's decision "Always confirm", time design TQ29): whatever the
* reader's kind, no reading is settled by the library and none is the
* person's words — its candidates carry `said: []` and its choice stays
* `open` with `confirm` (the policy may still remove readings), so the time
* ask offers it, pre-filled with its window and zone, and only the person's
* answer settles it (`rows.ts` · `TimeAnswerRow`).
*/
export declare function timeReadingRows(input: {
readonly mentions: readonly CheckedMention[];
readonly clock: TimeClock;
readonly policy: TimePolicy;
readonly reader: TimeReaderStamp;
readonly tzdata: string;
readonly at: {
readonly turn: number;
readonly iteration: number;
};
}): TimeReadingRow[];
/** The `call-window` row for one call's decision (`bind.ts` · `callWindowOf`). */
export declare function callWindowRow(call: {
readonly toolCallId: string;
readonly toolName: string;
}, decision: CallWindow, at: {
readonly turn: number;
readonly iteration: number;
}): CallWindowRow;
//# sourceMappingURL=rowsBuild.d.ts.map