coding-agent-adapters 0.13.0 → 0.15.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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseCLIAdapter, SpawnConfig, AutoResponseRule, LoginDetection, BlockingPromptDetection, ToolRunningInfo, ParsedOutput } from 'adapter-types';
1
+ import { BaseCLIAdapter, SpawnConfig, AutoResponseRule, LoginDetection, BlockingPromptDetection, ParsedOutput, ToolRunningInfo } from 'adapter-types';
2
2
 
3
3
  /**
4
4
  * Approval Presets
@@ -290,103 +290,93 @@ declare abstract class BaseCodingAdapter extends BaseCLIAdapter {
290
290
  }
291
291
 
292
292
  /**
293
- * Claude Code CLI Adapter
293
+ * Aider CLI Adapter
294
294
  *
295
- * Adapter for the Claude Code CLI (claude command).
295
+ * Adapter for the Aider AI pair programming tool.
296
+ * https://github.com/paul-gauthier/aider
296
297
  */
297
298
 
298
- declare class ClaudeAdapter extends BaseCodingAdapter {
299
- readonly adapterType = "claude";
300
- readonly displayName = "Claude Code";
301
- /** Heaviest TUI status bar, shortcuts, update notices, /ide suggestions */
299
+ declare class AiderAdapter extends BaseCodingAdapter {
300
+ readonly adapterType = "aider";
301
+ readonly displayName = "Aider";
302
+ /** Minimal TUI, mostly text output shorter settle delay */
302
303
  readonly readySettleMs: number;
304
+ /**
305
+ * Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
306
+ */
307
+ readonly usesTuiMenus: boolean;
303
308
  readonly installation: InstallationInfo;
304
309
  /**
305
- * Auto-response rules for Claude Code CLI.
306
- * These handle common text-based [y/n] prompts that can be safely auto-responded.
307
- * Explicit responseType: 'text' prevents the usesTuiMenus default from kicking in.
310
+ * Auto-response rules for Aider CLI.
311
+ * Aider uses plain text prompts via io.py:832 with (Y)es/(N)o format.
312
+ * All rules are responseType: 'text' Aider never uses TUI menus.
313
+ *
314
+ * Decline rules come first to override the generic accept patterns.
308
315
  */
309
316
  readonly autoResponseRules: AutoResponseRule[];
310
317
  getWorkspaceFiles(): AgentFileDescriptor[];
311
- getRecommendedModels(_credentials?: AgentCredentials): ModelRecommendations;
318
+ getRecommendedModels(credentials?: AgentCredentials): ModelRecommendations;
312
319
  getCommand(): string;
313
320
  getArgs(config: SpawnConfig): string[];
314
321
  getEnv(config: SpawnConfig): Record<string, string>;
315
- getHookTelemetryProtocol(options?: {
316
- scriptPath?: string;
317
- markerPrefix?: string;
318
- httpUrl?: string;
319
- sessionId?: string;
320
- }): {
321
- markerPrefix: string;
322
- scriptPath: string;
323
- scriptContent: string;
324
- settingsHooks: Record<string, unknown>;
325
- };
326
- private getHookMarkers;
327
- private getLatestHookMarker;
328
- private stripHookMarkers;
329
322
  detectLogin(output: string): LoginDetection;
330
323
  /**
331
- * Detect blocking prompts specific to Claude Code CLI
324
+ * Detect blocking prompts specific to Aider CLI.
325
+ * Source: io.py, onboarding.py, base_coder.py, report.py
332
326
  */
333
327
  detectBlockingPrompt(output: string): BlockingPromptDetection;
334
328
  /**
335
- * Detect if Claude Code is actively loading/processing.
329
+ * Detect if Aider is actively loading/processing.
336
330
  *
337
331
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
338
- * - claude_active_reading_files: "Reading N files…"
339
- * - General: "esc to interrupt" spinner status line
332
+ * - aider_active_waiting_model: "Waiting for <model>"
333
+ * - aider_active_waiting_llm_default: "Waiting for LLM"
334
+ * - aider_active_generating_commit_message: "Generating commit message with ..."
340
335
  */
341
336
  detectLoading(output: string): boolean;
342
337
  /**
343
- * Detect if an external tool/process is running within the Claude session.
344
- *
345
- * Claude Code can launch external tools (browser, bash, Node, Python, etc.)
346
- * that show status lines like "Claude in Chrome[javascript_tool]" or
347
- * "[bash_tool]", "[python_tool]", etc.
348
- *
349
- * When detected, stall detection is suppressed and the UI can display
350
- * which tool is active.
351
- */
352
- detectToolRunning(output: string): ToolRunningInfo | null;
353
- /**
354
- * Detect task completion for Claude Code.
338
+ * Detect task completion for Aider.
355
339
  *
356
- * High-confidence pattern: turn duration summary + idle prompt.
357
- * Claude Code shows "<Verb> for Xm Ys" (e.g. "Cooked for 3m 12s")
358
- * when a turn completes, followed by the ❯ input prompt.
340
+ * High-confidence patterns:
341
+ * - "Aider is waiting for your input" notification (bell message)
342
+ * - Edit-format mode prompts (ask>, code>, architect>) after output
359
343
  *
360
344
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
361
- * - claude_completed_turn_duration
362
- * - claude_completed_turn_duration_custom_verb
345
+ * - aider_completed_llm_response_ready
363
346
  */
364
347
  detectTaskComplete(output: string): boolean;
365
348
  detectReady(output: string): boolean;
366
349
  parseOutput(output: string): ParsedOutput | null;
367
- getPromptPattern(): RegExp;
368
- getHealthCheckCommand(): string;
350
+ /**
351
+ * Detect exit conditions specific to Aider.
352
+ * Source: base_coder.py:994, base_coder.py:998, report.py:77, versioncheck.py:58
353
+ */
369
354
  detectExit(output: string): {
370
355
  exited: boolean;
371
356
  code?: number;
372
357
  error?: string;
373
358
  };
359
+ getPromptPattern(): RegExp;
360
+ getHealthCheckCommand(): string;
374
361
  }
375
362
 
376
363
  /**
377
- * Google Gemini CLI Adapter
364
+ * Claude Code CLI Adapter
378
365
  *
379
- * Adapter for the Google Gemini CLI tool.
366
+ * Adapter for the Claude Code CLI (claude command).
380
367
  */
381
368
 
382
- declare class GeminiAdapter extends BaseCodingAdapter {
383
- readonly adapterType = "gemini";
384
- readonly displayName = "Google Gemini";
369
+ declare class ClaudeAdapter extends BaseCodingAdapter {
370
+ readonly adapterType = "claude";
371
+ readonly displayName = "Claude Code";
372
+ /** Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions.
373
+ * 3000ms needed because detectReady fires early during boot rendering. */
374
+ readonly readySettleMs: number;
385
375
  readonly installation: InstallationInfo;
386
376
  /**
387
- * Auto-response rules for Gemini CLI.
388
- * Gemini uses Ink/React TUI with arrow-key radio menus.
389
- * Source: FolderTrustDialog.tsx, MultiFolderTrustDialog.tsx, CloudFreePrivacyNotice.tsx
377
+ * Auto-response rules for Claude Code CLI.
378
+ * These handle common text-based [y/n] prompts that can be safely auto-responded.
379
+ * Explicit responseType: 'text' prevents the usesTuiMenus default from kicking in.
390
380
  */
391
381
  readonly autoResponseRules: AutoResponseRule[];
392
382
  getWorkspaceFiles(): AgentFileDescriptor[];
@@ -409,40 +399,50 @@ declare class GeminiAdapter extends BaseCodingAdapter {
409
399
  private getLatestHookMarker;
410
400
  private stripHookMarkers;
411
401
  detectLogin(output: string): LoginDetection;
402
+ /**
403
+ * Detect blocking prompts specific to Claude Code CLI
404
+ */
412
405
  detectBlockingPrompt(output: string): BlockingPromptDetection;
413
406
  /**
414
- * Detect if Gemini CLI is actively loading/processing.
407
+ * Detect if Claude Code is actively loading/processing.
415
408
  *
416
409
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
417
- * - gemini_active_loading_line: "(esc to cancel, Xs)"
418
- * - gemini_active_waiting_user_confirmation: "Waiting for user confirmation..."
410
+ * - claude_active_reading_files: "Reading N files…"
411
+ * - General: "esc to interrupt" spinner status line
419
412
  */
420
413
  detectLoading(output: string): boolean;
414
+ /**
415
+ * Detect if an external tool/process is running within the Claude session.
416
+ *
417
+ * Claude Code can launch external tools (browser, bash, Node, Python, etc.)
418
+ * that show status lines like "Claude in Chrome[javascript_tool]" or
419
+ * "[bash_tool]", "[python_tool]", etc.
420
+ *
421
+ * When detected, stall detection is suppressed and the UI can display
422
+ * which tool is active.
423
+ */
421
424
  detectToolRunning(output: string): ToolRunningInfo | null;
422
425
  /**
423
- * Detect task completion for Gemini CLI.
426
+ * Detect task completion for Claude Code.
424
427
  *
425
- * High-confidence patterns:
426
- * - "◇ Ready" window title signal (OSC sequence, may survive ANSI stripping)
427
- * - "Type your message" composer placeholder after agent output
428
+ * High-confidence pattern: turn duration summary + idle prompt.
429
+ * Claude Code shows "<Verb> for Xm Ys" (e.g. "Cooked for 3m 12s")
430
+ * when a turn completes, followed by the ❯ input prompt.
428
431
  *
429
432
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
430
- * - gemini_ready_title
433
+ * - claude_completed_turn_duration
434
+ * - claude_completed_turn_duration_custom_verb
431
435
  */
432
436
  detectTaskComplete(output: string): boolean;
433
437
  detectReady(output: string): boolean;
434
438
  parseOutput(output: string): ParsedOutput | null;
435
- /**
436
- * Detect exit conditions specific to Gemini CLI.
437
- * Source: FolderTrustDialog.tsx:127, LogoutConfirmationDialog.tsx:64
438
- */
439
+ getPromptPattern(): RegExp;
440
+ getHealthCheckCommand(): string;
439
441
  detectExit(output: string): {
440
442
  exited: boolean;
441
443
  code?: number;
442
444
  error?: string;
443
445
  };
444
- getPromptPattern(): RegExp;
445
- getHealthCheckCommand(): string;
446
446
  }
447
447
 
448
448
  /**
@@ -454,6 +454,7 @@ declare class GeminiAdapter extends BaseCodingAdapter {
454
454
  declare class CodexAdapter extends BaseCodingAdapter {
455
455
  readonly adapterType = "codex";
456
456
  readonly displayName = "OpenAI Codex";
457
+ readonly readySettleMs: number;
457
458
  readonly installation: InstallationInfo;
458
459
  /**
459
460
  * Auto-response rules for OpenAI Codex CLI.
@@ -509,66 +510,68 @@ declare class CodexAdapter extends BaseCodingAdapter {
509
510
  }
510
511
 
511
512
  /**
512
- * Aider CLI Adapter
513
+ * Google Gemini CLI Adapter
513
514
  *
514
- * Adapter for the Aider AI pair programming tool.
515
- * https://github.com/paul-gauthier/aider
515
+ * Adapter for the Google Gemini CLI tool.
516
516
  */
517
517
 
518
- declare class AiderAdapter extends BaseCodingAdapter {
519
- readonly adapterType = "aider";
520
- readonly displayName = "Aider";
521
- /** Minimal TUI, mostly text output — shorter settle delay */
518
+ declare class GeminiAdapter extends BaseCodingAdapter {
519
+ readonly adapterType = "gemini";
520
+ readonly displayName = "Google Gemini";
522
521
  readonly readySettleMs: number;
523
- /**
524
- * Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
525
- */
526
- readonly usesTuiMenus: boolean;
527
522
  readonly installation: InstallationInfo;
528
523
  /**
529
- * Auto-response rules for Aider CLI.
530
- * Aider uses plain text prompts via io.py:832 with (Y)es/(N)o format.
531
- * All rules are responseType: 'text' Aider never uses TUI menus.
532
- *
533
- * Decline rules come first to override the generic accept patterns.
524
+ * Auto-response rules for Gemini CLI.
525
+ * Gemini uses Ink/React TUI with arrow-key radio menus.
526
+ * Source: FolderTrustDialog.tsx, MultiFolderTrustDialog.tsx, CloudFreePrivacyNotice.tsx
534
527
  */
535
528
  readonly autoResponseRules: AutoResponseRule[];
536
529
  getWorkspaceFiles(): AgentFileDescriptor[];
537
- getRecommendedModels(credentials?: AgentCredentials): ModelRecommendations;
530
+ getRecommendedModels(_credentials?: AgentCredentials): ModelRecommendations;
538
531
  getCommand(): string;
539
532
  getArgs(config: SpawnConfig): string[];
540
533
  getEnv(config: SpawnConfig): Record<string, string>;
534
+ getHookTelemetryProtocol(options?: {
535
+ scriptPath?: string;
536
+ markerPrefix?: string;
537
+ httpUrl?: string;
538
+ sessionId?: string;
539
+ }): {
540
+ markerPrefix: string;
541
+ scriptPath: string;
542
+ scriptContent: string;
543
+ settingsHooks: Record<string, unknown>;
544
+ };
545
+ private getHookMarkers;
546
+ private getLatestHookMarker;
547
+ private stripHookMarkers;
541
548
  detectLogin(output: string): LoginDetection;
542
- /**
543
- * Detect blocking prompts specific to Aider CLI.
544
- * Source: io.py, onboarding.py, base_coder.py, report.py
545
- */
546
549
  detectBlockingPrompt(output: string): BlockingPromptDetection;
547
550
  /**
548
- * Detect if Aider is actively loading/processing.
551
+ * Detect if Gemini CLI is actively loading/processing.
549
552
  *
550
553
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
551
- * - aider_active_waiting_model: "Waiting for <model>"
552
- * - aider_active_waiting_llm_default: "Waiting for LLM"
553
- * - aider_active_generating_commit_message: "Generating commit message with ..."
554
+ * - gemini_active_loading_line: "(esc to cancel, Xs)"
555
+ * - gemini_active_waiting_user_confirmation: "Waiting for user confirmation..."
554
556
  */
555
557
  detectLoading(output: string): boolean;
558
+ detectToolRunning(output: string): ToolRunningInfo | null;
556
559
  /**
557
- * Detect task completion for Aider.
560
+ * Detect task completion for Gemini CLI.
558
561
  *
559
562
  * High-confidence patterns:
560
- * - "Aider is waiting for your input" notification (bell message)
561
- * - Edit-format mode prompts (ask>, code>, architect>) after output
563
+ * - " Ready" window title signal (OSC sequence, may survive ANSI stripping)
564
+ * - "Type your message" composer placeholder after agent output
562
565
  *
563
566
  * Patterns from: AGENT_LOADING_STATUS_PATTERNS.json
564
- * - aider_completed_llm_response_ready
567
+ * - gemini_ready_title
565
568
  */
566
569
  detectTaskComplete(output: string): boolean;
567
570
  detectReady(output: string): boolean;
568
571
  parseOutput(output: string): ParsedOutput | null;
569
572
  /**
570
- * Detect exit conditions specific to Aider.
571
- * Source: base_coder.py:994, base_coder.py:998, report.py:77, versioncheck.py:58
573
+ * Detect exit conditions specific to Gemini CLI.
574
+ * Source: FolderTrustDialog.tsx:127, LogoutConfirmationDialog.tsx:64
572
575
  */
573
576
  detectExit(output: string): {
574
577
  exited: boolean;
@@ -614,7 +617,7 @@ declare class HermesAdapter extends BaseCodingAdapter {
614
617
  /**
615
618
  * Dynamic Pattern Loader
616
619
  *
617
- * Loads adapter patterns from @parallax/adapter-monitor snapshots when available,
620
+ * Loads adapter patterns from @parallaxai/adapter-monitor snapshots when available,
618
621
  * with fallback to hardcoded baseline patterns.
619
622
  */
620
623
 
@@ -644,7 +647,7 @@ interface AdapterPatterns {
644
647
  /**
645
648
  * Load patterns for an adapter
646
649
  *
647
- * Tries to load from @parallax/adapter-monitor snapshots first,
650
+ * Tries to load from @parallaxai/adapter-monitor snapshots first,
648
651
  * falls back to hardcoded baseline patterns.
649
652
  *
650
653
  * @param adapter - Adapter type