/** * `generacy cockpit advance --gate ` — manually flip a gate. * * Label-pair invariant (see #845): * Poll-path resume detection in label-monitor-service.ts requires BOTH * `waiting-for:` AND `completed:` to be present on the issue * for the monitor to emit a resume event. The worker owns clearing * `waiting-for:*`, `completed:*`, and `agent:paused` on the resume path — * this command MUST NOT remove `waiting-for:` here, or poll-only * clusters (no webhook delivery) strand the issue indefinitely at * {completed:, agent:in-progress, agent:paused}. * * Side effects (in order): * 1. gh issue comment (post manual-advance marker) * 2. gh issue edit --add-label completed: * * Idempotent (AD-6): if `completed:` is already on the issue, exits 0 * with `already advanced …` and posts nothing. * * Refusal (AD-4): if the active `waiting-for:*` ≠ requested gate, exits 3 * without side effects. No `--force` in v1. */ import { Command } from 'commander'; import { loadCockpitConfig, type CommandRunner, type GhWrapper } from '@generacy-ai/cockpit'; import { type GateDefinition } from './gate-vocabulary.js'; export interface AdvanceCommandDeps { runner?: CommandRunner; gh?: GhWrapper; loadConfig?: typeof loadCockpitConfig; env?: NodeJS.ProcessEnv; now?: () => Date; stdout?: (line: string) => void; stderr?: (line: string) => void; } export interface AdvanceOptions { gate?: string; helpGates?: boolean; } export declare function advanceCommand(deps?: AdvanceCommandDeps): Command; export declare function runAdvance(issue: string | undefined, opts: AdvanceOptions, deps: AdvanceCommandDeps): Promise; export type { GateDefinition }; //# sourceMappingURL=advance.d.ts.map