/** * Context store abstraction (Phase 2): the operational index for context item metadata, * retention/policy decisions, and retrieval records. Per memory-architecture.md, this is * an index/state/cache layer, not the sole audit source — transcript and artifacts remain * canonical. An in-memory implementation is provided for tests; sqlite-runtime-index.ts * provides an explicit SQLite implementation for callers that opt into it. * * Nothing here is wired into session persistence or prompt construction by default yet. */ import type { ContextItem } from "./context-item.ts"; import type { PolicyDecision } from "./policy-types.ts"; export type RetrievalSliceKind = "metadata" | "preview" | "lines_around_error" | "file_range" | "search_sample" | "transcript_slice" | "full_artifact"; export interface RetrievalRecord { id: string; contextItemId: string; requestedAtTurn: number; sliceKind: RetrievalSliceKind; resultSummary: string; } export interface PolicyDecisionRecord { id: string; contextItemId?: string; decision: PolicyDecision; recordedAtTurn: number; } export interface ContextStore { upsertItem(item: ContextItem): void; getItem(id: string): ContextItem | undefined; listItems(): ContextItem[]; removeItem(id: string): void; recordPolicyDecision(record: PolicyDecisionRecord): void; listPolicyDecisions(contextItemId?: string): PolicyDecisionRecord[]; recordRetrieval(record: RetrievalRecord): void; listRetrievals(contextItemId?: string): RetrievalRecord[]; } export declare function createInMemoryContextStore(): ContextStore; //# sourceMappingURL=context-store.d.ts.map