import type { Check } from '../types.js'; /** * Companion to `checkEvidenceProvenance` for the OTHER two provenance fields * the same live-store audit found near-absent: `transcript_ref` * (`memories.source_hash`, surfaced via why_memory — src/server/queries/ * provenance.ts) and `session` (`memories.session_id` resolved against * `sessions`). Root-caused 2026-07-13 (FEAT-485): tracing the ingest paths * (hook-built envelopes -> `POST /ingest/transcript` -> distillHandler -> * PipelineContext -> embedAndIndex's `insertWithCreateEvent` call, plus the * FEAT-449 spool-drain path, which reuses the exact same * `ingestCanonicalTranscript` function) shows `session_id` and `source_hash` * ARE threaded correctly end-to-end on every row that goes through that * pipeline — `git log -S` on the relevant lines shows no regression. What * DOES lack both fields, always, by design, since its very first commit * (`cd7849d`): the `remember` MCP tool and the Anthropic memory-tool adapter * (src/memory-tool/adapter.ts) — direct-insert paths with no transcript * context to attach (ADR-009 "born-at-scope"). So a low overall rate across * ALL memories is expected and not itself a bug; what WOULD be a real * pipeline regression is a source_hash-tagged (i.e. genuinely distill- * sourced) row missing session_id — that should never happen given * distillHandler always supplies a non-null `session_id` from the job * payload. This check isolates exactly that slice instead of conflating it * with the (expected) direct-insert gap. */ export declare function checkTranscriptSessionProvenance(dataDir: string, encryptionEnabled: boolean): Check;