/** * A short, path-safe identity for one stopped tree. * * The tree path is hashed rather than embedded: it is long, it contains the * user's name and drive layout, and a notice key ends up in a `clientRequestId` * column that shows up in logs. */ export declare function stopNoticeKey(agentId: string, taskId: string | null | undefined, treePath: string | null | undefined, /** * Which INCARNATION of the tree this is (the lease's `createdAt`). * * The tree path is DETERMINISTIC per task (`taskrun-`), so keying on * the path alone made the latch effectively TASK-scoped: the second run of the * same task, stopped within the 24h TTL, resolved the very same key, was read * as a replayed wake and **skipped the save entirely** - no commit, no * cleanup, no `[work stopped]` comment, while the human was told nothing * (2026-11-05). One mirror incarnation gets one latch, so a replay of the same * stop is still at-most-once and a genuinely new run is saved normally. */ incarnation?: string | null): string; /** * True when this stop has NOT been announced yet, and records that it now has * been. * * Claims BEFORE the caller posts, and the claim is what makes the post * at-most-once. That is the opposite trade from the old dedupe-ledger approach, * and deliberately so: a comment is a terminal, human-facing announcement of an * irreversible event. Duplicating it is embarrassing; losing it means a human * never learns where their work went. When those two conflict, at-most-once * wins - and the server-side `clientRequestId` still protects against the * failure mode a ledger creates (see `bridge-notice.ts`). * * Claims older than the TTL are reclaimed, so a crashed daemon never wedges a * notice forever. */ export declare function claimStopNotice(key: string, now?: number): boolean; /** Drop latches past their TTL. Called by the daemon's periodic sweeps. */ export declare function sweepStopNotices(): number; /** Exposed for `doctor`. */ export declare function listStopNotices(): string[];