| 1 | import type { AgentDef } from '../types.js'; |
| 2 | |
| 3 | /** |
| 4 | * Claude Code CLI def (`claude`, by Anthropic). |
| 5 | * Slim version: prompt via stdin, plain text streamFormat. |
| 6 | * v0.2 will switch to stream-json when we wire interactive tool_result. |
| 7 | */ |
| 8 | export const claude: AgentDef = { |
| 9 | id: 'claude', |
| 10 | name: 'Claude Code', |
| 11 | bin: 'claude', |
| 12 | versionArgs: ['--version'], |
| 13 | buildArgs(_prompt, _ctx) { |
| 14 | // --print: non-interactive, write entire response to stdout then exit. |
| 15 | // No permission-mode: chat-to-HTML never edits files; the model only emits |
| 16 | // text + a fenced ```html``` block, which our extractor reads. Plan mode |
| 17 | // (which we tried in v0.3) suppressed actual content. |
| 18 | return ['--print']; |
| 19 | }, |
| 20 | streamFormat: 'plain', |
| 21 | promptViaStdin: true, |
| 22 | installUrl: 'https://docs.claude.com/en/docs/claude-code/setup', |
| 23 | }; |
| 24 |