UNPKG

framework

Version:

The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.

38 lines 2.3 kB
import { type StoreFs } from './run-store.js'; /** Where a project records the runs its daemon suspended (#923). Transient, like the run logs. */ export declare const SUSPENDED_FILE = "suspended.json"; /** * How long a suspended run stays resumable, ms (#923). A daemon restart within the day picks * the work back up; a machine that has been off for a week does not wake up spending a day's * quota on work whose repo has moved on. Older entries are dropped, not resumed. */ export declare const SUSPEND_MAX_AGE_MS: number; /** A run its daemon stopped at shutdown, and what is needed to pick it up again (#923). */ export interface SuspendedRun { /** The run's id, which is also its worktree and its row in the dashboard. */ runId: string; /** The agent conversation to continue, when the run got far enough to report one. */ sessionId?: string; /** When the daemon stopped it, ISO. */ suspendedAt: string; /** * The queue entry a drain pinned the run to (#1268), carried across the restart so the resumed * run re-emits it. Its meta is what keeps the entry off the sweep's market (#1253), and the * meta rebuilt on `--continue-run` proved able to lose the fold — a released pin means a second * agent on work the resumed one is still doing. */ queueEntry?: string; } /** The runs this project's daemon suspended, or `[]` when there are none / the file is unreadable. */ export declare function readSuspendedRuns(cwd: string, fs?: StoreFs): Promise<SuspendedRun[]>; /** Record the runs a shutting-down daemon stopped. Replaces the list; an empty list clears it. */ export declare function writeSuspendedRuns(cwd: string, runs: SuspendedRun[], fs?: StoreFs): Promise<void>; /** * The entries a booting daemon should pick back up: suspended recently enough to still be worth * resuming (#923). Pure, so the cutoff is testable without a clock. An entry with an unparseable * timestamp is dropped rather than resumed, since its age is exactly what the rule turns on; a * timestamp in the future (a clock that moved) counts as recent, and the entry is consumed by * that boot either way. */ export declare function resumableRuns(runs: SuspendedRun[], now: number, maxAgeMs?: number): SuspendedRun[]; //# sourceMappingURL=suspend.d.ts.map