| 1 | import type { AgentDef } from '../types.js'; |
| 2 | |
| 3 | /** |
| 4 | * Aider def (`aider`, by Aider-AI — aider-ai/aider, Python pair-programmer). |
| 5 | * |
| 6 | * Aider does NOT read its prompt from stdin — the one-shot entry is the |
| 7 | * `-m`/`--message` argv flag (send one message, process, exit). So the prompt |
| 8 | * goes into argv (same shape as the hermes def), with promptViaStdin left off. |
| 9 | * |
| 10 | * Scripting flags: |
| 11 | * --yes-always auto-confirm "Add file to chat?" etc., else it can stall |
| 12 | * even with -m (long-standing behaviour). |
| 13 | * --no-pretty drop ANSI colour/markup so stdout is clean text. |
| 14 | * --no-stream emit the full reply at once rather than token-streaming. |
| 15 | * Default output is human-readable text (no JSON), so plain mode reads the |
| 16 | * fenced ```html``` block. |
| 17 | */ |
| 18 | export const aider: AgentDef = { |
| 19 | id: 'aider', |
| 20 | name: 'Aider', |
| 21 | bin: 'aider', |
| 22 | versionArgs: ['--version'], |
| 23 | buildArgs(prompt, _ctx) { |
| 24 | // argv-only prompt (Aider has no stdin prompt path). |
| 25 | return ['--yes-always', '--no-pretty', '--no-stream', '--message', prompt]; |
| 26 | }, |
| 27 | streamFormat: 'plain', |
| 28 | installUrl: 'https://aider.chat/docs/scripting.html', |
| 29 | }; |
| 30 |