/** * OfflineStore — filesystem-based governance state store. * * Mirrors the engine's storage layout under `.forgeos/state/`: * * .forgeos/state/ * pipelines/ {changeset_id}.json * evidence/ {changeset_id}/{gate_id}.jsonl * reviews/ {changeset_id}.json * initiatives/ {initiative_id}.json * * All JSON writes are atomic (write to .tmp, rename). Evidence uses * JSONL append for efficient incremental writes. * * Uses only Node.js built-ins (fs, path, crypto). No external dependencies. */ import type { GatePipeline, EvidenceEntry, ReviewRecord, Initiative } from "./types.js"; export declare class OfflineStore { private stateDir; constructor(projectRoot: string); /** Persist a gate pipeline. Overwrites any existing pipeline with the same changeset_id. */ savePipeline(pipeline: GatePipeline): void; /** Retrieve a pipeline by changeset ID, or null if not found. */ getPipeline(changesetId: string): GatePipeline | null; /** List all stored pipelines, sorted by created_at ascending. */ listPipelines(): GatePipeline[]; /** Append a single evidence entry for a changeset + gate. Uses JSONL append. */ appendEvidence(changesetId: string, gateId: string, evidence: EvidenceEntry): void; /** Read all evidence entries for a changeset + gate. */ getEvidence(changesetId: string, gateId: string): EvidenceEntry[]; /** Persist all reviews for a changeset. Overwrites any existing review file. */ saveReviews(changesetId: string, reviews: ReviewRecord[]): void; /** Retrieve all reviews for a changeset. Returns an empty array if none found. */ getReviews(changesetId: string): ReviewRecord[]; /** Persist an initiative. Overwrites any existing initiative with the same ID. */ saveInitiative(initiative: Initiative): void; /** Retrieve an initiative by ID, or null if not found. */ getInitiative(id: string): Initiative | null; /** List all stored initiatives, sorted by created_at ascending. */ listInitiatives(): Initiative[]; } //# sourceMappingURL=store.d.ts.map