/** * `generacy cockpit resume ` — re-arm a failed phase in place. * * Engine-owned label surgery: on an issue carrying `failed:` (with or * without `agent:error`), applies the additions `waiting-for:` * + `completed:` + `agent:paused` FIRST, then removes * `failed:` plus defensive `agent:error` / `phase:` / * `failed:-repeated` (#942 escalation sibling) when present. The * terminal on-issue state is byte-identical to a naturally-paused-then-completed * gate — the label monitor's next poll emits a resume event, and the worker's * `PhaseResolver.resolveFromContinue` walks the preserved * `completed:` chain to pick `` as the start phase. * * Side effects (in order): * 1. gh addLabels [waiting-for:, completed:, agent:paused] * 2. gh removeLabels [failed:, ...conditional] * * Idempotent (FR-003): no `failed:*` → no-op with single-line stdout, exit 0. * Refuses (FR-004) with evidence and zero mutations when the state is * ambiguous or non-re-armable. No `--force` in v1 (parity with `advance`). * * #942: `failed:-repeated` (repeat-identical failure escalation) is * treated as a sibling of `failed:` — it is NOT counted as a separate * primary failure for the multiple-failed refusal, and it is cleared alongside * its primary. Count semantics on clear are "resume, do not reset": the next * same-fingerprint failure re-escalates immediately. */ import { Command } from 'commander'; import { loadCockpitConfig, type CommandRunner, type GhWrapper } from '@generacy-ai/cockpit'; export interface ResumeCommandDeps { runner?: CommandRunner; gh?: GhWrapper; loadConfig?: typeof loadCockpitConfig; env?: NodeJS.ProcessEnv; now?: () => Date; stdout?: (line: string) => void; stderr?: (line: string) => void; } export interface ResumeOptions { workflow?: string; } export declare function resumeCommand(deps?: ResumeCommandDeps): Command; export declare function runResume(issue: string | undefined, opts: ResumeOptions, deps: ResumeCommandDeps): Promise; //# sourceMappingURL=resume.d.ts.map