import { type WorkflowJournalEntry, type WorkflowJournalStore } from "../../core/workflow-journal-store.js"; /** * SVC-2 — the shared size bound for a journaled workflow-agent result, so ALL backends DEGRADE IDENTICALLY on * an oversize TaskResult (no dialect divergence). Inlined from service's `workflow-journal-limits` on * onboarding (channel [375]) — the 5 MiB figure aligns with TiDB's ~6 MiB per-row txn-entry-size-limit (a row * over it is REJECTED with "entry too large"); a LOAD-BEARING `append` that hit that would THROW and kill the * whole workflow. PostgreSQL TEXT has no such low limit, so without a shared guard the same large result would * journal fine on PG but fail the workflow on TiDB. All backends instead skip-journal a result whose serialized * size exceeds {@link MAX_JOURNAL_RESULT_BYTES} (a no-op, never an insert/throw): the agent's ordinal is simply * not cached, so a resume re-runs that one agent live. Resume is an optimization — a too-big-to-cache result is * a graceful degrade, not a failure. Measured in BYTES (UTF-8) — a multibyte result can be larger than its * `.length` in chars. */ export declare const MAX_JOURNAL_RESULT_BYTES: number; /** True when a serialized journal result is too large to store (UTF-8 byte length over {@link MAX_JOURNAL_RESULT_BYTES}). */ export declare function oversizeJournalResult(serialized: string): boolean; export declare class FileWorkflowJournalStore implements WorkflowJournalStore { private readonly fsyncEnabled; private readonly dir; private readonly fds; /** Per-run committed scope, cached at first touch — the append-path scope guard must NOT re-read the whole * ledger per append (a journaled result can be MBs; a many-agent workflow would go O(n²) on disk). One replay * discovers it; every later append compares against the cache. */ private readonly scopes; constructor(root: string, fsyncEnabled?: boolean); private pathFor; /** Replay a run's ledger: last-writer-wins per ordinal; a torn/unparsable line is skipped (uncommitted). */ private replay; append(runId: string, scope: string, entry: WorkflowJournalEntry): Promise; load(runId: string, scope: string): Promise; /** GC (service extra, mirrors the SQL twins): drop the run's ledger once the run is terminal + retained. */ deleteByRun(runId: string): Promise; /** Release ledger fds (graceful shutdown; parity with the other file stores' dispose). */ dispose(): void; } //# sourceMappingURL=workflow-journal-store.d.ts.map