/** * Decision recording and retrieval for session audit trail. * * Decisions are recorded to the BRAIN decision-store (`brain_decisions`, the * canonical, queryable store) and to the legacy `.cleo/audit/decisions.jsonl` * ledger. Reads prefer BRAIN and fall back to — or are supplemented by — the * ledger. * * @task T4782 * @epic T4654 * @task T1450 — normalized (projectRoot, params) signature * @task T11185 — BRAIN-first decision routing * @task T12458 — salvaged onto current memory-authority semantics */ import type { SessionDecisionLogParams, SessionRecordDecisionParams } from '@cleocode/contracts'; import type { DecisionRecord } from './types.js'; /** * Record a decision to the BRAIN decision-store AND the audit ledger. * * Dual-write: the BRAIN `brain_decisions` row is canonical (queryable, * eligibility-filtered on read); the `.cleo/audit/decisions.jsonl` line keeps * session attribution and backward compatibility. The BRAIN write is * best-effort; the ledger write is mandatory. When the BRAIN write succeeds the * ledger id is `:dec-`, linking the two records. * * The BRAIN write never requests LLM validation (`validateWithLlm` stays * unset) — recording a caller-sourced decision does not invoke synthesis. * * Normalized Core signature: (projectRoot, params) → Result. * Throws if required params are missing. * * @task T1450 * @task T11185 */ export declare function recordDecision(projectRoot: string, params: SessionRecordDecisionParams): Promise; /** * Read decisions, optionally filtered by sessionId and/or taskId. * * BRAIN `brain_decisions` rows are read first (current-authority eligibility * applies — invalidated and superseded rows are excluded by the accessor). The * legacy ledger supplements them and is the sole source when BRAIN is * unavailable. A BRAIN row replaces the linked ledger record carrying its * content; remaining records are deduplicated by content (decision + * rationale). The result is in chronological order. * * A ledger record linked to a BRAIN row that has since been invalidated or * superseded is omitted, so the ledger cannot resurrect retired decisions. * * BRAIN rows carry no session column: a row's session comes from the linked * ledger record with the same content (else the most recent linked record). Under a `sessionId` filter, a BRAIN row is returned only * when a linked ledger record proves it belongs to that session. * * Normalized Core signature: (projectRoot, params) → Result. * * @task T1450 * @task T11185 */ export declare function getDecisionLog(projectRoot: string, params: SessionDecisionLogParams): Promise; //# sourceMappingURL=decisions.d.ts.map