UNPKG

agentfootprint

Version:

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

314 lines • 15 kB
/** * The answer account's words — ONE closed, versioned table. * * Every string a reader of the account sees comes from here: row headings, * chips, the lines, the signals, the one-liner, and the small pieces a line is * built from (the skill form, the distance, "it / both / all n"). The lens owns * layout only; no app overrides the words in v1. * * Laws (each pinned by `test/answer-account/templates.test.ts`): * - never "a" / "an" before a placeholder — a lint over this table; * - plurals are explicit pairs, `{{count:n,'value','values'}}`; zero has its * own template, chosen by the reader; * - a sentence starts with fixed words or a `:code` tool id; * - changing a template's words bumps its `version` AND * `ANSWER_ACCOUNT_TEMPLATE_SET_VERSION`: a pinned digest of the table fails * on a word change without a bump. * * Placeholder grammar (filled by `render.ts` · `fillParts`, non-recursively over * the VARS — a var's value is never re-read as a template): * `{{name}}` the var's value as plain text * `{{name:code}}` a tool or skill id, verbatim * `{{name:quote}}` words quoted from the record * `{{name:label}}` a declared label (its own voucher) * `{{name:skill}}` `part.skill.labelled` / `part.skill.bare`, from * var `name` (the id) and var `nameLabel` (optional) * `{{name:distance}}` `distance.*`, from var `name` (n) and * var `nameWindowed` (1 = a window strategy ran) * `{{count:name,'one','many'}}` "n one" / "n many" * `{{allOf:name}}` `part.allOf.*` — it / both / all n * * `voucher` is the template's OWN claim-maker; a sentence's voucher is the * weakest of it and every truth-deciding var (`render.ts` · `sentence`). * `tool` means "the tool named by the `tool` var". */ export type TemplateVoucher = 'person' | 'library' | 'tool' | 'model' | 'app'; export interface AccountTemplate { readonly version: number; readonly text: string; readonly voucher: TemplateVoucher; } /** Bumped whenever any template's words change (a pinned digest enforces it). */ export declare const ANSWER_ACCOUNT_TEMPLATE_SET_VERSION = 14; /** The closed table. Ids are `row.part@version` in prose; the version lives on the entry. */ export declare const ANSWER_ACCOUNT_TEMPLATES: Readonly<{ 'row.asked': AccountTemplate; 'row.understood': AccountTemplate; 'row.checked': AccountTemplate; 'row.notChecked': AccountTemplate; 'row.found': AccountTemplate; 'row.howSure': AccountTemplate; 'row.wrong': AccountTemplate; 'row.more': AccountTemplate; 'items.more': AccountTemplate; 'row.sizeBound': AccountTemplate; 'items.keptOut': AccountTemplate; 'chip.saidBy': AccountTemplate; 'chip.who.person': AccountTemplate; 'chip.who.library': AccountTemplate; 'chip.who.model': AccountTemplate; 'chip.who.app': AccountTemplate; 'chip.declared': AccountTemplate; 'chip.notDeclared': AccountTemplate; 'chip.undeclaredEmpty': AccountTemplate; 'chip.decidedDelivered': AccountTemplate; 'chip.decidedNotDelivered': AccountTemplate; 'chip.notRecorded': AccountTemplate; 'chip.beforePause': AccountTemplate; 'chip.beforePause.held': AccountTemplate; 'chip.kind.existence': AccountTemplate; 'chip.kind.scope': AccountTemplate; 'chip.signals': AccountTemplate; 'chip.noneFound': AccountTemplate; 'part.skill.labelled': AccountTemplate; 'part.skill.bare': AccountTemplate; 'part.allOf.one': AccountTemplate; 'part.allOf.two': AccountTemplate; 'part.allOf.many': AccountTemplate; 'part.clipped': AccountTemplate; 'distance.previous': AccountTemplate; 'distance.back': AccountTemplate; 'distance.atLeast': AccountTemplate; 'unreadable.line': AccountTemplate; asked: AccountTemplate; 'asked.rewritten': AccountTemplate; 'asked.raw.notRecorded': AccountTemplate; 'asked.resumed': AccountTemplate; 'asked.none': AccountTemplate; 'asked.keptOut': AccountTemplate; 'understood.rule': AccountTemplate; 'understood.rule.witness': AccountTemplate; 'understood.intent': AccountTemplate; 'understood.scores.allOthers': AccountTemplate; 'understood.scores': AccountTemplate; 'understood.continuity': AccountTemplate; 'understood.decider': AccountTemplate; 'understood.decider.noModel': AccountTemplate; 'understood.menu': AccountTemplate; 'understood.menu.bare': AccountTemplate; 'understood.menu.picked': AccountTemplate; 'understood.none': AccountTemplate; 'understood.notConfigured': AccountTemplate; 'understood.notRecorded': AccountTemplate; 'understood.resumed': AccountTemplate; 'understood.delivered': AccountTemplate; 'understood.notDelivered': AccountTemplate; 'understood.notDelivered.other': AccountTemplate; 'understood.delivery.unknown': AccountTemplate; 'understood.refused': AccountTemplate; 'understood.refused.unnamed': AccountTemplate; 'understood.refused.more': AccountTemplate; 'understood.rejected': AccountTemplate; 'understood.confidence.none': AccountTemplate; 'understood.app.notRecorded': AccountTemplate; 'checked.declared': AccountTemplate; 'checked.item': AccountTemplate; 'checked.item.full': AccountTemplate; 'checked.silent': AccountTemplate; 'checked.undeclared': AccountTemplate; 'checked.failed': AccountTemplate; 'checked.refused': AccountTemplate; 'checked.refused.unnamed': AccountTemplate; 'checked.declined': AccountTemplate; 'checked.notDispatched': AccountTemplate; 'checked.unknown': AccountTemplate; 'checked.beforePause.declared': AccountTemplate; 'checked.beforePause.silent': AccountTemplate; 'checked.beforePause.undeclared': AccountTemplate; 'beforePause.more': AccountTemplate; 'beforePause.noResults': AccountTemplate; 'beforePause.keptOut': AccountTemplate; 'checked.unnamed': AccountTemplate; 'checked.beforePause.none': AccountTemplate; 'checked.noCalls': AccountTemplate; 'notChecked.declared': AccountTemplate; 'notChecked.item': AccountTemplate; 'notChecked.item.full': AccountTemplate; 'notChecked.silent': AccountTemplate; 'notChecked.undeclared': AccountTemplate; 'cannotCover.declared': AccountTemplate; 'cannotCover.item': AccountTemplate; 'cannotCover.item.full': AccountTemplate; 'tryInstead.tool': AccountTemplate; 'notChecked.unnamed': AccountTemplate; 'notChecked.notListed': AccountTemplate; 'notChecked.noCalls': AccountTemplate; 'notChecked.noneRan': AccountTemplate; 'notChecked.beforePause': AccountTemplate; 'found.absent': AccountTemplate; 'found.bare': AccountTemplate; 'found.undeclaredEmpty': AccountTemplate; 'found.rows': AccountTemplate; 'found.described.facts': AccountTemplate; 'found.described.series': AccountTemplate; 'found.described.edges': AccountTemplate; 'found.described.provenance': AccountTemplate; 'found.clarify': AccountTemplate; 'found.result': AccountTemplate; 'found.failed': AccountTemplate; 'found.refused': AccountTemplate; 'found.declined': AccountTemplate; 'found.notDispatched': AccountTemplate; 'found.unknown': AccountTemplate; 'found.withheld': AccountTemplate; 'found.beforePause': AccountTemplate; 'found.beforePause.absent': AccountTemplate; 'found.beforePause.bare': AccountTemplate; 'found.beforePause.undeclaredEmpty': AccountTemplate; 'found.beforePause.rows': AccountTemplate; 'found.beforePause.clarify': AccountTemplate; 'found.beforePause.result': AccountTemplate; 'found.inView': AccountTemplate; 'found.inView.undeclaredEmpty': AccountTemplate; 'found.inView.absent': AccountTemplate; 'found.inView.more': AccountTemplate; 'found.unnamed': AccountTemplate; 'found.noCalls': AccountTemplate; 'howSure.standing.none': AccountTemplate; 'howSure.standing.noAnswer': AccountTemplate; 'howSure.standing.keptOut': AccountTemplate; 'howSure.standing.known': AccountTemplate; 'howSure.standing.consistent': AccountTemplate; 'howSure.standing.notSure': AccountTemplate; 'howSure.standing.ask': AccountTemplate; 'howSure.standing.notAssessed': AccountTemplate; 'howSure.check.toolCoverage': AccountTemplate; 'howSure.check.resultShape': AccountTemplate; 'howSure.check.namesAndNumbers': AccountTemplate; 'howSure.check.answerChecks': AccountTemplate; 'howSure.check.scriptMatch': AccountTemplate; 'howSure.check.argumentRules': AccountTemplate; 'howSure.check.argumentSources': AccountTemplate; 'howSure.check.resultPeriod': AccountTemplate; 'howSure.reason.asked': AccountTemplate; 'howSure.reason.argumentAsked': AccountTemplate; 'howSure.reason.argumentAssumed': AccountTemplate; 'howSure.reason.argumentUnverified': AccountTemplate; 'howSure.reason.argumentRead': AccountTemplate; 'howSure.reason.valueContingent': AccountTemplate; 'howSure.reason.coverageGap': AccountTemplate; 'howSure.reason.declaredAbsent': AccountTemplate; 'howSure.reason.emptyUndeclared': AccountTemplate; 'howSure.reason.periodNotHeld': AccountTemplate; 'howSure.reason.periodPartlyHeld': AccountTemplate; 'howSure.reason.periodUnknown': AccountTemplate; 'howSure.reason.periodUndeclared': AccountTemplate; 'howSure.reason.periodDiffersFromAsked': AccountTemplate; 'howSure.reason.periodBeyondRetention': AccountTemplate; 'howSure.reason.sourcesConflict': AccountTemplate; 'howSure.reason.valueUnsupported': AccountTemplate; 'howSure.reason.valueSurvivedRevision': AccountTemplate; 'howSure.reason.derivedFromReading': AccountTemplate; 'howSure.reason.scriptUnmatched': AccountTemplate; 'howSure.reason.stoppedEarly': AccountTemplate; 'howSure.reason.stepsUnfinished': AccountTemplate; 'howSure.reason.negativeProseUnverified': AccountTemplate; 'howSure.reason.claimExceedsSearch': AccountTemplate; 'howSure.reason.declarationOverclaimed': AccountTemplate; 'howSure.reason.answerCheckFailed': AccountTemplate; 'howSure.reason.checkUnreachable': AccountTemplate; 'howSure.expected.direct': AccountTemplate; 'howSure.expected.directNoRating': AccountTemplate; 'howSure.expected.exploratory': AccountTemplate; 'howSure.expected.more': AccountTemplate; 'howSure.outcome.nothing': AccountTemplate; 'howSure.outcome.empty': AccountTemplate; 'howSure.evidence.lookedUp': AccountTemplate; 'howSure.evidence.lookedUp.none': AccountTemplate; 'howSure.evidence.unsplit': AccountTemplate; 'howSure.evidence.flagged': AccountTemplate; 'howSure.evidence.flagged.list': AccountTemplate; 'howSure.evidence.flagged.atLeast': AccountTemplate; 'howSure.evidence.value': AccountTemplate; 'howSure.evidence.revised': AccountTemplate; 'howSure.evidence.empty': AccountTemplate; 'howSure.evidence.truncated': AccountTemplate; 'howSure.evidence.off': AccountTemplate; 'howSure.evidence.keptOut': AccountTemplate; 'howSure.evidence.notRecorded': AccountTemplate; 'howSure.script.shown.submitted': AccountTemplate; 'howSure.script.shown.returned': AccountTemplate; 'howSure.script.shown.reportedSuccess': AccountTemplate; 'howSure.script.shown.reportedFailure': AccountTemplate; 'howSure.script.shown.completed': AccountTemplate; 'howSure.script.shown.completedWithFailure': AccountTemplate; 'howSure.script.shown.unknown': AccountTemplate; 'howSure.script.shown.unknownService': AccountTemplate; 'howSure.script.shown.withheld': AccountTemplate; 'howSure.script.withheld': AccountTemplate; 'howSure.script.rewritten': AccountTemplate; 'howSure.script.unmatched': AccountTemplate; 'howSure.script.shown.more': AccountTemplate; 'howSure.script.attached.returned': AccountTemplate; 'howSure.script.attached.reportedSuccess': AccountTemplate; 'howSure.script.attached.reportedFailure': AccountTemplate; 'howSure.script.attached.completed': AccountTemplate; 'howSure.script.attached.completedWithFailure': AccountTemplate; 'howSure.script.attached.unknown': AccountTemplate; 'howSure.script.attached.cut': AccountTemplate; 'howSure.script.attached.notInText': AccountTemplate; 'howSure.script.attached.omitted': AccountTemplate; 'howSure.script.attached.more': AccountTemplate; 'signal.decidedNotDelivered': AccountTemplate; 'signal.existenceNotChecked': AccountTemplate; 'signal.existenceNotChecked.full': AccountTemplate; 'signal.existenceCannotCover': AccountTemplate; 'signal.existenceCannotCover.full': AccountTemplate; 'signal.existenceNotChecked.keptOut': AccountTemplate; 'signal.existenceCannotCover.keptOut': AccountTemplate; 'signal.undeclaredEmptyUsed': AccountTemplate; 'signal.undeclaredEmptyUsed.beforePause': AccountTemplate; 'signal.undeclaredEmptyInView': AccountTemplate; 'unreachable.decided': AccountTemplate; 'unreachable.delivery': AccountTemplate; 'unreachable.existence': AccountTemplate; 'unreachable.unnamed': AccountTemplate; 'unreachable.unnamed.existence': AccountTemplate; 'unreachable.unnamed.both': AccountTemplate; 'unreachable.empty': AccountTemplate; 'unreachable.empty.noList': AccountTemplate; 'unreachable.empty.uncountedTicket': AccountTemplate; 'unreachable.inView.redacted': AccountTemplate; 'unreachable.empty.redacted': AccountTemplate; 'wrong.errors': AccountTemplate; 'wrong.withheld': AccountTemplate; 'wrong.noErrors': AccountTemplate; 'wrong.none': AccountTemplate; 'wrong.unreachable': AccountTemplate; 'wrong.unreachable.all': AccountTemplate; 'wrong.more': AccountTemplate; 'wrong.notApplicable': AccountTemplate; 'wrong.beforePause': AccountTemplate; 'wrong.beforePause.held': AccountTemplate; 'wrong.beforePause.held.events': AccountTemplate; 'scope.noOwnEvents': AccountTemplate; 'row.notInRecord': AccountTemplate; 'scope.keptOut': AccountTemplate; 'row.keptOut': AccountTemplate; 'scope.tooLarge': AccountTemplate; 'row.tooLarge': AccountTemplate; 'scope.unfiltered': AccountTemplate; 'summary.signal': AccountTemplate; 'summary.signals': AccountTemplate; 'summary.none': AccountTemplate; 'summary.none.partial': AccountTemplate; 'summary.none.nothingRun': AccountTemplate; 'summary.none.notApplicable': AccountTemplate; 'summary.resumed': AccountTemplate; 'summary.resumed.tail': AccountTemplate; 'summary.resumed.held': AccountTemplate; 'summary.unfinished': AccountTemplate; 'summary.notAvailable': AccountTemplate; }>; export type TemplateId = keyof typeof ANSWER_ACCOUNT_TEMPLATES; //# sourceMappingURL=templates.d.ts.map