/** * Stopping and removing runs: `/workflow cancel` (spec §6.4) and `/workflow delete` (spec §6.5). * * The two are deliberately sequential — a live run must be cancelled before it can be deleted — so * removal is always a second, deliberate act. */ import type { RunStatus } from "../resume-router.ts"; import type { RunLock } from "../run-lock.ts"; import type { RunStore } from "../types.ts"; import { type NotifyCtx } from "./context.ts"; /** * The live/stopped split the two commands turn on (spec §6.4/§6.5): a live run can be cancelled but * not deleted, a stopped one the reverse. Stated once, so completion (spec §14.4) can filter run-ids * by the rule the handlers enforce instead of carrying a second copy of the status list. */ export declare function isLiveRun(status: RunStatus): boolean; /** * `/workflow cancel [run-id]` (spec §6.4, §10.2). Two distinct cases: * * - **Executing run** — abort its signal; the engine stops at the next step boundary (spec §8.6). * - **Blocked run** — there is nothing executing to abort (the guard is released while blocked, spec * §7.1), so cancel it *cold*: append `run-cancelled` to its log. Spec §10.2 requires that stopping * a blocked run works, and the dismissal hint points users straight here. * * Bare targets the executing run, or the sole blocked run when none is executing; with several blocked * a run-id is required — in full, by its hash, or by any unique prefix ({@link resolveRunRef}). */ export declare function handleCancel(ctx: NotifyCtx, guard: RunLock, store: Pick, runRef: string | undefined): Promise; /** * `/workflow delete ` (spec §6.5) — permanently remove a **stopped** run. A live run * (`in_progress`/`blocked`) is rejected: cancel it first, so the removal is always a deliberate second act. */ export declare function handleDelete(ctx: NotifyCtx, store: Pick, runRef: string): Promise; //# sourceMappingURL=lifecycle.d.ts.map