UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

54 lines • 2.31 kB
/** * time/textForms — the spellings of the times written in TEXT (time * design § 9.5, step T7): the text rule of `forms.ts` · `timeFormsOf`, and * the small spelling parts both halves share. * * Pattern: pure regular expressions over the text — no reading, no resolver. * Role: split from `forms.ts` BY FILE for the synchronous doors: the * evidence gate's exempt corpus (`evidence/evidenceIndex.ts` · * `addExempt`) runs on every agent with a gate, and a bundler places * a whole file on the synchronous graph — so the window half, which * re-resolves a recorded reading (`resolve.ts`), stays behind * `import()` (the optional-family law, * `test/trace-toolpack/browserGraph.test.ts`). Imports nothing. * Emits: N/A. * * @example * ```ts * timeFormsOfText('2026-10-09').said; // ['2026', '10', '9'] * timeFormsOfText('took 2h'); // { said: [], derived: [] } * ``` */ /** The two lineages of the spellings of one source — see the file header. */ export interface TimeForms { readonly said: readonly string[]; readonly derived: readonly string[]; } /** * The spellings of the times written in `text` — `said` only (the text rule of * `forms.ts` · `timeFormsOf`, which delegates here): an ISO date → its year, * month and day; a 12-hour or 24-hour clock reading → its spellings. Slash * dates and durations are never read. * * @example * ```ts * timeFormsOfText('what connected 8 Am to 8:40 AM PST').said; * // ['8:00', '08:00', '8:00am', '8:40', '08:40', '8:40am'] * ``` */ export declare function timeFormsOfText(text: string): TimeForms; /** * The spellings of ONE clock time: the 24-hour form bare and padded * (`8:00`, `08:00`, `20:00`), the 12-hour colon form (`8:00`) and its glued * suffix form (`8:00pm`). After tokenizing, `8:00 PM` and `8:00 AM` both read * `8:00` — the same hour on a 12-hour dial. */ export declare function clockSpellings(h24: number, minutes: string): readonly string[]; export declare const pad2: (n: number) => string; /** An insertion-ordered set of spellings. */ export declare class Spellings { private readonly seen; push(...forms: readonly string[]): void; list(): readonly string[]; } //# sourceMappingURL=textForms.d.ts.map