/** * `cockpit_advance` MCP tool handler. * * Wraps `runAdvance` (which throws `CockpitExit` on refusal / parse error / * transport failure). `wrapToolBoundary` maps thrown `CockpitExit` to a * typed `ToolErrorResult` via the exit-code table. * * Idempotent no-op (advance.ts:122-127): when `completed:` already * present, `runAdvance` returns without throwing but writes a stdout line * that starts with "already advanced". Represent this as * `{status: "ok", data: {..., noop: true, action: "already-advanced"}}`. */ import type { CommandRunner, GhWrapper } from '@generacy-ai/cockpit'; import { type AdvanceCommandDeps } from '../../advance.js'; import { type ToolResult } from '../errors.js'; import { type IssueRefInput, type GateNameInput } from '../schemas.js'; export interface CockpitAdvanceInput { issue: IssueRefInput; gate: GateNameInput; } export interface CockpitAdvanceData { ref: { owner: string; repo: string; number: number; nwo: string; }; gate: string; action: 'advanced' | 'already-advanced'; completedLabel: string; commentUrl?: string; noop?: true; } export interface CockpitAdvanceDeps { runner?: CommandRunner; gh?: GhWrapper; loadConfig?: AdvanceCommandDeps['loadConfig']; env?: NodeJS.ProcessEnv; now?: () => Date; } export declare function cockpitAdvance(input: CockpitAdvanceInput, deps?: CockpitAdvanceDeps): Promise>; //# sourceMappingURL=cockpit_advance.d.ts.map