/** * Noah — JSON File Store (Phase 1 Persistence) * * Zero-infrastructure persistence using atomic JSON file writes. * Same proven pattern from Grillo: temp file → rename for atomicity. * * Directory layout: * .noah-data/ * ├── state/{agentId}.json * ├── flight-plans/{planId}.json * ├── assessments/{agentId}/{cycle}-{timestamp}.json * ├── waypoints/{agentId}.json * └── audit/{agentId}-chain.json */ import type { TemporalStateStore, JsonStoreConfig } from './types.js'; import type { TemporalState } from '../types/temporal-state.js'; import type { TemporalAssessmentRecord } from '../types/assessment-record.js'; import type { EthicalFlightPlan } from '../types/flight-plan.js'; export declare class JsonTemporalStore implements TemporalStateStore { private readonly dataDir; private readonly memoryWriter?; constructor(config: JsonStoreConfig); private stateDir; private plansDir; private assessmentsDir; private waypointsDir; private auditDir; private ensureDir; /** * Atomic write: write to a temp file, then rename. * Prevents partial writes from corrupting data. */ private atomicWrite; private readJson; getState(agentId: string): Promise; saveState(state: TemporalState): Promise; getActiveFlightPlan(agentId: string): Promise; saveFlightPlan(plan: EthicalFlightPlan): Promise; supersedePlan(planId: string): Promise; appendAssessmentRecord(agentId: string, record: TemporalAssessmentRecord): Promise; getAssessmentRecords(agentId: string, limit?: number): Promise; getLastAssessmentRecord(agentId: string): Promise; getTriggeredWaypointIds(agentId: string): Promise>; saveTriggeredWaypoint(agentId: string, waypointId: string): Promise; getLastHash(agentId: string): Promise; clear(): Promise; /** Write a memory file if a MemoryWriter was configured. Never throws. */ private writeMemory; } //# sourceMappingURL=json-store.d.ts.map