coding-agent-adapters 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -6
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -44,12 +44,12 @@ session.send('Help me refactor this function to use async/await');
|
|
|
44
44
|
|
|
45
45
|
## Available Adapters
|
|
46
46
|
|
|
47
|
-
| Adapter | CLI | Type | Input Style | Auto-Response Rules |
|
|
48
|
-
|
|
49
|
-
| `ClaudeAdapter` | Claude Code | `claude` | TUI menus | 5 rules |
|
|
50
|
-
| `GeminiAdapter` | Gemini CLI | `gemini` | TUI menus | 3 rules |
|
|
51
|
-
| `CodexAdapter` | OpenAI Codex | `codex` | TUI menus | 6 rules |
|
|
52
|
-
| `AiderAdapter` | Aider | `aider` | Text `(Y)es/(N)o` | 17 rules |
|
|
47
|
+
| Adapter | CLI | Type | Input Style | Auto-Response Rules | Ready Settle |
|
|
48
|
+
|---------|-----|------|-------------|---------------------|-------------|
|
|
49
|
+
| `ClaudeAdapter` | Claude Code | `claude` | TUI menus | 5 rules | 500ms |
|
|
50
|
+
| `GeminiAdapter` | Gemini CLI | `gemini` | TUI menus | 3 rules | 300ms |
|
|
51
|
+
| `CodexAdapter` | OpenAI Codex | `codex` | TUI menus | 6 rules | 300ms |
|
|
52
|
+
| `AiderAdapter` | Aider | `aider` | Text `(Y)es/(N)o` | 17 rules | 200ms |
|
|
53
53
|
|
|
54
54
|
## Session Lifecycle Detection
|
|
55
55
|
|
|
@@ -83,6 +83,17 @@ Each adapter knows exactly what "ready for input" looks like:
|
|
|
83
83
|
| Codex | `>` glyph, placeholder suggestions | `chat_composer.rs` |
|
|
84
84
|
| Aider | `ask>`, `code>`, `architect>`, `help>`, `multi>`, startup banner | `io.py`, `base_coder.py` |
|
|
85
85
|
|
|
86
|
+
### Ready Settle Delay
|
|
87
|
+
|
|
88
|
+
Each adapter sets `readySettleMs` to control how long pty-manager waits after `detectReady()` matches before emitting `session_ready`. This prevents the orchestrator from sending input while the TUI is still rendering (status bar, shortcuts, update notices). The base default is 300ms; adapters override based on their rendering weight.
|
|
89
|
+
|
|
90
|
+
| Adapter | `readySettleMs` | Rationale |
|
|
91
|
+
|---------|----------------|-----------|
|
|
92
|
+
| Claude Code | 500ms | Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions |
|
|
93
|
+
| Gemini CLI | 300ms | Moderate Ink TUI (inherits base default) |
|
|
94
|
+
| Codex | 300ms | Moderate Rust TUI (inherits base default) |
|
|
95
|
+
| Aider | 200ms | Minimal TUI, mostly text output |
|
|
96
|
+
|
|
86
97
|
### Blocking Prompt Detection
|
|
87
98
|
|
|
88
99
|
Adapters detect prompts that block the session and require user action:
|
|
@@ -382,6 +393,9 @@ export class CursorAdapter extends BaseCodingAdapter {
|
|
|
382
393
|
// Set to false if the CLI uses text prompts instead of TUI menus
|
|
383
394
|
override readonly usesTuiMenus = false;
|
|
384
395
|
|
|
396
|
+
// Tune ready settle delay for this CLI's rendering speed (base default: 300ms)
|
|
397
|
+
override readonly readySettleMs = 250;
|
|
398
|
+
|
|
385
399
|
readonly autoResponseRules: AutoResponseRule[] = [
|
|
386
400
|
{ pattern: /accept terms/i, type: 'tos', response: 'y', responseType: 'text', description: 'Accept TOS', safe: true, once: true },
|
|
387
401
|
];
|
package/dist/index.cjs
CHANGED
|
@@ -368,6 +368,12 @@ var BaseCodingAdapter = class extends ptyManager.BaseCLIAdapter {
|
|
|
368
368
|
* Coding agent CLIs use TUI menus that require arrow-key navigation.
|
|
369
369
|
*/
|
|
370
370
|
usesTuiMenus = true;
|
|
371
|
+
/**
|
|
372
|
+
* Ms of output silence after detectReady match before emitting session_ready.
|
|
373
|
+
* Allows TUI rendering (status bar, shortcuts, update notices) to complete
|
|
374
|
+
* before the orchestrator sends input.
|
|
375
|
+
*/
|
|
376
|
+
readySettleMs = 300;
|
|
371
377
|
/**
|
|
372
378
|
* The primary memory file for this CLI (the one it reads for project instructions).
|
|
373
379
|
* Returns the relativePath of the first 'memory' type file from getWorkspaceFiles().
|
|
@@ -535,6 +541,8 @@ Docs: ${this.installation.docsUrl}`
|
|
|
535
541
|
var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
536
542
|
adapterType = "claude";
|
|
537
543
|
displayName = "Claude Code";
|
|
544
|
+
/** Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions */
|
|
545
|
+
readySettleMs = 500;
|
|
538
546
|
installation = {
|
|
539
547
|
command: "npm install -g @anthropic-ai/claude-code",
|
|
540
548
|
alternatives: [
|
|
@@ -1466,6 +1474,8 @@ var CodexAdapter = class extends BaseCodingAdapter {
|
|
|
1466
1474
|
var AiderAdapter = class extends BaseCodingAdapter {
|
|
1467
1475
|
adapterType = "aider";
|
|
1468
1476
|
displayName = "Aider";
|
|
1477
|
+
/** Minimal TUI, mostly text output — shorter settle delay */
|
|
1478
|
+
readySettleMs = 200;
|
|
1469
1479
|
/**
|
|
1470
1480
|
* Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
|
|
1471
1481
|
*/
|