/** * Noah — SQLite Temporal State Store * * BB Spec v1.1 §4: SQLite-backed persistence with WAL mode, * hash-chained records, system_config, and per-agent lifecycle state. * * Replaces JsonTemporalStore for temporal authority operations. * The JsonTemporalStore remains available for backward compatibility. */ import Database from 'better-sqlite3'; import type { CorridorThresholds, TdiThresholds, LifecycleStateRow, FleetTemporalStateRow, AssessmentRecordRow, DeviationSnapshotRow, CronJobRow, CronRunRow, SqliteStoreConfig } from './sqlite-types.js'; export declare class SqliteTemporalStore { private db; constructor(config: SqliteStoreConfig); private initializeSchema; getConfig(key: string): string | null; getConfigParsed(key: string): T | null; setConfig(key: string, value: unknown, updatedBy: string): void; getCorridorThresholds(): CorridorThresholds; getTdiThresholds(): TdiThresholds; getYellowEscalationThreshold(): number; getLifecycleState(agentId: string): LifecycleStateRow | null; upsertLifecycleState(row: Partial & { agent_id: string; }): void; incrementYellowCount(agentId: string): number; getAllLifecycleStates(): LifecycleStateRow[]; insertAssessmentRecord(row: Omit): void; getAssessmentRecords(agentId: string, limit?: number): AssessmentRecordRow[]; getLastAssessmentRecord(agentId: string): AssessmentRecordRow | null; getLastRecordHash(agentId: string): string | null; getFleetState(): FleetTemporalStateRow | null; upsertFleetState(row: Omit): void; insertDeviationSnapshot(row: Omit): void; getDeviationSnapshots(agentId: string, limit?: number): DeviationSnapshotRow[]; upsertCronJob(row: CronJobRow): void; getCronJob(id: string): CronJobRow | null; getAllCronJobs(): CronJobRow[]; getEnabledCronJobs(): CronJobRow[]; deleteCronJob(id: string): void; insertCronRun(row: Omit): void; getCronRuns(jobId: string, limit?: number): CronRunRow[]; verifyAssessmentChain(agentId: string): { valid: boolean; brokenAt?: number; total: number; }; close(): void; /** Transaction wrapper */ transaction(fn: () => T): T; /** Raw database access for advanced queries */ get raw(): Database.Database; } //# sourceMappingURL=sqlite-store.d.ts.map