/** * Defines the common wire-size ceiling for v1 agent snapshots. * Retain, push, reconstruction, and restore consumers share this contract so * no stored backup can exceed the smallest restore boundary. */ /** * Canonical maximum RESTORABLE v1 wire size. A retained v1 backup above this is * unrestorable by construction, so it must never be retained in the first * place. Raising this alone is meaningless: it is bounded by what the smallest * consumer on the restore path accepts (`/api/restore`'s request-body cap and * the backup-chain reconstruction cap), so all of them move together or not at * all. */ export declare const MAX_RESTORABLE_AGENT_BACKUP_BYTES: number; /** * Resolve the snapshot RETAIN budget from an operator override, clamped so it * can never exceed {@link MAX_RESTORABLE_AGENT_BACKUP_BYTES}. * * The override exists to LOWER the budget (staging soak, a memory-constrained * worker). Allowing it to raise the budget past what restore accepts would * silently re-open the retain-vs-restore divergence through configuration * alone, which is why the clamp lives here next to the limit rather than at the * call site. * * Only an ABSENT override defaults. A present-but-invalid value throws rather * than silently falling back: an operator who set the variable meant to change * the budget, so quietly running on the canonical limit would hide a * misconfiguration behind behavior that looks deliberate. `Number.parseInt` is * deliberately not used — it accepts malformed numeric prefixes (`"128MiB"` and * `"128abc"` both yield 128), which is exactly the silent-misread this guards. */ export declare function resolveRetainableAgentBackupBytes(rawOverride: string | undefined): number; /** * Restore payload exceeds the receiving boundary’s accepted size. */ export declare class SnapshotPayloadTooLargeError extends Error { readonly payloadBytes: number; readonly limitBytes: number; readonly name = "SnapshotPayloadTooLargeError"; constructor(payloadBytes: number, limitBytes: number); }