| 64 | } |
| 65 | |
| 66 | function parseAgentTarget(input?: string): AgentTarget { |
| 67 | const normalized = (input ?? "claude").toLowerCase(); |
| 68 | if (normalized === "claude" || normalized === "claude-code") return "claude"; |
| 69 | if (normalized === "cursor") return "cursor"; |
| 70 | if (normalized === "vscode" || normalized === "vs-code" || normalized === "vs") return "vscode"; |
| 71 | if (normalized === "windsurf") return "windsurf"; |
| 72 | if (normalized === "opencode" || normalized === "open-code") return "opencode"; |
| 73 | throw new Error(`Unsupported coding agent \"${input}\". Use one of: claude, cursor, vscode, windsurf, opencode.`); |
| 74 | } |
| 75 | |
| 76 | function parseRunner(args: string[]): "npx" | "bunx" { |
| 77 | const explicit = args.find((arg) => arg.startsWith("--runner=")); |