/** * Outbox — append-only JSONL queue of pending sync operations. * * Every governance mutation (create pipeline, promote gate, submit evidence, * etc.) is recorded here when performed offline. The sync engine reads * pending entries and replays them against the ForgeOS engine API. * * File: `.forgeos/outbox.jsonl` * * Uses JSONL append for writes (no full rewrite). Read operations parse * the entire file — acceptable because the outbox is pruned regularly. * * Uses only Node.js built-ins (fs, path, crypto). No external dependencies. */ import type { OutboxEntry } from "./types.js"; export declare class Outbox { private filePath; constructor(projectRoot: string); /** * Append a new outbox entry. Auto-generates id, timestamp, and sets * synced=false, retries=0. * * @returns The complete OutboxEntry with generated fields. */ append(entry: Omit): OutboxEntry; /** Return all entries that have not been successfully synced. */ getPending(): OutboxEntry[]; /** * Mark an entry as successfully synced. Rewrites the file with the * updated entry. */ markSynced(id: string): void; /** * Mark an entry as failed. Increments the retry counter and records * the error message. Rewrites the file with the updated entry. */ markFailed(id: string, error: string): void; /** Return aggregate statistics about the outbox. */ getStats(): { total: number; pending: number; synced: number; failed: number; }; /** * Remove synced entries older than the given number of days. * Defaults to 7 days. Returns the number of entries removed. */ prune(olderThanDays?: number): number; /** Read all entries from the JSONL file. */ private readAll; /** Rewrite the entire outbox file with the given entries. */ private writeAll; /** Update a single entry by ID, then rewrite the file. */ private updateEntry; /** Ensure the parent directory of the outbox file exists. */ private ensureDir; } //# sourceMappingURL=outbox.d.ts.map