/** * TOC integration ask③ (INTEGRATION-DESIGN §11) — boot-time orphan-run reclaim, extracted from main()'s boot * sequence so the env-only/no-backend path (runStore undefined) is UNIT-TESTABLE. * * Why a helper: the original inline version did `(runStore as {...}).reclaimOrphanedAtBoot` and a bare * `typeof reclaimable.reclaimOrphanedAtBoot === "function"` — which is a MEMBER ACCESS on `undefined` when runStore is * absent (the default env-only deploy: SESSION_BACKEND=memory, no DB → backend undefined → runStore undefined). * `typeof x.y` does NOT guard against `x` being undefined (only a bare `typeof y` does), so it threw a TypeError at * boot on that lane. A workflow 2nd-pass re-review caught it (HIGH regression from 1.49.0); the 6-dim review + the full * suite missed it because they exercised FileRunStore.reclaimOrphanedAtBoot DIRECTLY, never the env-only main() boot. */ /** The host/file lane's optional orphan-reclaim capability (only FileRunStore implements it). */ export interface ReclaimableRunStore { reclaimOrphanedAtBoot?: (isResumable?: (sessionId: string) => Promise) => Promise; } /** A checkpoint store just enough to answer "is this session a resume-in-progress?" (pending checkpoint). */ export interface ReclaimCheckpointProbe { findPendingTokenBySession: (sessionId: string) => Promise; } /** * Reclaim runs orphaned by a previous host-lane engine process (flip orphaned `running` → failed + release their * `active/` claims, so a re-submit isn't EEXIST-blocked). NULL-SAFE: a no-op (returns 0) when runStore is * absent or doesn't implement the capability (env-only / cross-replica tidb-pg lane). `checkpointStore`, when present, * EXCLUDES resume-in-progress (markResuming) sessions from reclaim so a resumable session is never stranded. */ export declare function reclaimOrphansAtBoot(runStore: unknown, checkpointStore: ReclaimCheckpointProbe | undefined, logger?: { info: (msg: string, data: Record) => void; }): Promise; //# sourceMappingURL=boot-reclaim.d.ts.map