/** Mark a node mid-turn (pi entered a turn). Best-effort. A new turn makes any * prior clean-abort certificate stale before it can affect a later crash. */ export declare function markBusy(nodeId: string): void; /** Clear the mid-run marker after Pi settles, however it routed. Best-effort. */ export declare function clearBusy(nodeId: string): void; /** Certify that this broker aborted a busy turn and Pi persisted its settled * aborted entry before teardown. The daemon consumes this durable certificate * once to resume with a continuation; a dirty death never writes it. */ export declare function markCleanAbort(nodeId: string): void; /** Remove a consumed clean-abort certificate as a broker boots. */ export declare function clearCleanAbort(nodeId: string): void; /** Whether the dead broker left a persisted clean-abort certificate. */ export declare function hasCleanAbort(nodeId: string): boolean; /** Is the node currently inside a turn? AND this with `pidAlive` at the call * site — a stale marker from a crashed pi is harmless because the dead pid * fails the AND. */ export declare function isBusy(nodeId: string): boolean; /** Re-touch the mid-turn marker's mtime — the daemon's wedge-detection * heartbeat (crtrd.ts `handleWedgeDetection`). Called from canvas-stophook on * every engine-level sign of life WITHIN a turn (a tool starting/streaming/ * ending, a streamed assistant token, a turn ending) so the marker's mtime * always reflects the last moment the engine visibly did something, not just * when the run began. No-ops when the node isn't currently busy — a touch * arriving after `clearBusy` (e.g. a late event racing agent_settled) must * never resurrect a stale marker. Best-effort. */ export declare function touchBusy(nodeId: string): void; /** The mid-turn marker's mtime: the last moment ANY engine-level progress was * observed while the node was busy (see `touchBusy`). Null when the node isn't * busy or the marker is unreadable. This is the sole heartbeat the daemon's * wedge detector reads — it needs no new instrumentation beyond re-touching an * already-existing file. */ export declare function busySince(nodeId: string): number | null;