/** * learning/decisions.ts — Decisions log (append-only, tamper-evident). * * v10.1.1 — Pillar D: Decisions log backed by `.bizar/learning/decisions.jsonl`. * * Each entry: * {id, ts, event: 'decide'|'supersede'|'redact', * subject, rationale, refs?, prev_hash, hash} * * tamper-evident chain: sha256(prev_hash + entry_body) → current hash. * Datamark on render: escape unicode surrogates via JSON.stringify replacer * (same pattern as gstack's wrapUntrustedContent). */ interface DecisionInput { event: "decide" | "supersede" | "redact"; subject: string; rationale: string; refs?: string[]; project?: string; } /** Record a new decision. Returns the created entry. */ export declare function recordDecision({ event, subject, rationale, refs, project, }: DecisionInput): Record; /** List all decisions. */ export declare function listDecisions(opts?: { project?: string; }): Record[]; /** * Verify the tamper-evident chain. * Returns { ok: true } if every entry's hash matches the computed hash * and prev_hash chains correctly. Returns { ok: false, at: number } on * the first break. */ export declare function verifyChain(opts?: { project?: string; }): { ok: boolean; at?: number; }; /** * Datamark renderer — escape unicode surrogates so JSON.stringify never * emits invalid strings when rendering decisions in the UI. * Pattern borrowed from gstack's wrapUntrustedContent. */ export declare function datamark(value: unknown): unknown; export {}; //# sourceMappingURL=decisions.d.ts.map