/** * Durable, content-addressed storage for routing policies, evidence, decisions, * shadow decisions, events and drift samples. * * Storage lives under `/routing/`. All writes are atomic * (write-temp-then-rename), read snapshots are cached but never authoritative, * and the active-policy pointer is swapped atomically with an immutable old * policy retained for rollback. */ import type { CandidateEvidence, OrchestrationDecision, OrchestrationEvent, RoutingPolicyCandidate, ShadowDecision } from "./types.js"; /** SHA-256 hex digest. */ export declare function sha256(input: string): string; /** Deterministic stable JSON serialization (sorted keys). */ export declare function stableStringify(value: unknown): string; export interface ActivePolicyPointer { policyId: string; policyVersion: number; hash: string; activatedAt: string; previousPolicyId?: string; } export declare function loadActivePolicyPointer(): ActivePolicyPointer | undefined; export declare function saveActivePolicyPointer(pointer: ActivePolicyPointer): void; export declare function writePolicy(policy: RoutingPolicyCandidate): string; export declare function readPolicy(policyId: string): RoutingPolicyCandidate | undefined; export declare function listPolicies(): RoutingPolicyCandidate[]; export declare function deletePolicy(policyId: string): void; export declare function writeDecision(decision: OrchestrationDecision): string; export declare function readDecision(decisionId: string): OrchestrationDecision | undefined; export declare function listDecisions(limit: number): OrchestrationDecision[]; export declare function writeEvidence(evidence: CandidateEvidence): string; export declare function readEvidence(candidateId: string): CandidateEvidence | undefined; export declare function writeShadowDecision(shadow: ShadowDecision): string; export declare function listShadowDecisions(limit: number): ShadowDecision[]; /** Append an event to the current run's event log (bounded). Returns the event. */ export declare function appendEvent(event: Omit): OrchestrationEvent; export declare function listEvents(limit: number): OrchestrationEvent[]; export declare function appendDriftSample(dimension: string, value: number): void; export declare function readDriftSamples(dimension: string): { t: number; v: number; }[]; export interface RegistrySnapshot { agents: { name: string; role: string; model: string; provider: string; }[]; retrievalPolicies: string[]; budgetClasses: string[]; } /** Scan the canonical subagent registry files. Never authoritative; used only for candidate generation. */ export declare function scanSubagentRegistry(): RegistrySnapshot; //# sourceMappingURL=store.d.ts.map