coding-agent-adapters 0.4.3 → 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/dist/index.d.cts CHANGED
@@ -151,6 +151,12 @@ declare abstract class BaseCodingAdapter extends BaseCLIAdapter {
151
151
  * Coding agent CLIs use TUI menus that require arrow-key navigation.
152
152
  */
153
153
  readonly usesTuiMenus: boolean;
154
+ /**
155
+ * Ms of output silence after detectReady match before emitting session_ready.
156
+ * Allows TUI rendering (status bar, shortcuts, update notices) to complete
157
+ * before the orchestrator sends input.
158
+ */
159
+ readonly readySettleMs: number;
154
160
  /**
155
161
  * Installation information for this CLI tool
156
162
  */
@@ -250,6 +256,8 @@ declare abstract class BaseCodingAdapter extends BaseCLIAdapter {
250
256
  declare class ClaudeAdapter extends BaseCodingAdapter {
251
257
  readonly adapterType = "claude";
252
258
  readonly displayName = "Claude Code";
259
+ /** Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions */
260
+ readonly readySettleMs: number;
253
261
  readonly installation: InstallationInfo;
254
262
  /**
255
263
  * Auto-response rules for Claude Code CLI.
@@ -398,6 +406,8 @@ declare class CodexAdapter extends BaseCodingAdapter {
398
406
  declare class AiderAdapter extends BaseCodingAdapter {
399
407
  readonly adapterType = "aider";
400
408
  readonly displayName = "Aider";
409
+ /** Minimal TUI, mostly text output — shorter settle delay */
410
+ readonly readySettleMs: number;
401
411
  /**
402
412
  * Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
403
413
  */
@@ -465,6 +475,14 @@ interface AdapterPatterns {
465
475
  auth: string[];
466
476
  /** Blocking prompt detection patterns */
467
477
  blocking: string[];
478
+ /** Loading/active indicator patterns */
479
+ loading: string[];
480
+ /** Turn completion patterns */
481
+ turnComplete: string[];
482
+ /** Tool wait patterns */
483
+ toolWait: string[];
484
+ /** Exit/session complete patterns */
485
+ exit: string[];
468
486
  /** Source of patterns */
469
487
  source: 'snapshot' | 'baseline';
470
488
  /** Version these patterns are from (if from snapshot) */
package/dist/index.d.ts CHANGED
@@ -151,6 +151,12 @@ declare abstract class BaseCodingAdapter extends BaseCLIAdapter {
151
151
  * Coding agent CLIs use TUI menus that require arrow-key navigation.
152
152
  */
153
153
  readonly usesTuiMenus: boolean;
154
+ /**
155
+ * Ms of output silence after detectReady match before emitting session_ready.
156
+ * Allows TUI rendering (status bar, shortcuts, update notices) to complete
157
+ * before the orchestrator sends input.
158
+ */
159
+ readonly readySettleMs: number;
154
160
  /**
155
161
  * Installation information for this CLI tool
156
162
  */
@@ -250,6 +256,8 @@ declare abstract class BaseCodingAdapter extends BaseCLIAdapter {
250
256
  declare class ClaudeAdapter extends BaseCodingAdapter {
251
257
  readonly adapterType = "claude";
252
258
  readonly displayName = "Claude Code";
259
+ /** Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions */
260
+ readonly readySettleMs: number;
253
261
  readonly installation: InstallationInfo;
254
262
  /**
255
263
  * Auto-response rules for Claude Code CLI.
@@ -398,6 +406,8 @@ declare class CodexAdapter extends BaseCodingAdapter {
398
406
  declare class AiderAdapter extends BaseCodingAdapter {
399
407
  readonly adapterType = "aider";
400
408
  readonly displayName = "Aider";
409
+ /** Minimal TUI, mostly text output — shorter settle delay */
410
+ readonly readySettleMs: number;
401
411
  /**
402
412
  * Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
403
413
  */
@@ -465,6 +475,14 @@ interface AdapterPatterns {
465
475
  auth: string[];
466
476
  /** Blocking prompt detection patterns */
467
477
  blocking: string[];
478
+ /** Loading/active indicator patterns */
479
+ loading: string[];
480
+ /** Turn completion patterns */
481
+ turnComplete: string[];
482
+ /** Tool wait patterns */
483
+ toolWait: string[];
484
+ /** Exit/session complete patterns */
485
+ exit: string[];
468
486
  /** Source of patterns */
469
487
  source: 'snapshot' | 'baseline';
470
488
  /** Version these patterns are from (if from snapshot) */
package/dist/index.js CHANGED
@@ -366,6 +366,12 @@ var BaseCodingAdapter = class extends BaseCLIAdapter {
366
366
  * Coding agent CLIs use TUI menus that require arrow-key navigation.
367
367
  */
368
368
  usesTuiMenus = true;
369
+ /**
370
+ * Ms of output silence after detectReady match before emitting session_ready.
371
+ * Allows TUI rendering (status bar, shortcuts, update notices) to complete
372
+ * before the orchestrator sends input.
373
+ */
374
+ readySettleMs = 300;
369
375
  /**
370
376
  * The primary memory file for this CLI (the one it reads for project instructions).
371
377
  * Returns the relativePath of the first 'memory' type file from getWorkspaceFiles().
@@ -533,6 +539,8 @@ Docs: ${this.installation.docsUrl}`
533
539
  var ClaudeAdapter = class extends BaseCodingAdapter {
534
540
  adapterType = "claude";
535
541
  displayName = "Claude Code";
542
+ /** Heaviest TUI — status bar, shortcuts, update notices, /ide suggestions */
543
+ readySettleMs = 500;
536
544
  installation = {
537
545
  command: "npm install -g @anthropic-ai/claude-code",
538
546
  alternatives: [
@@ -983,6 +991,15 @@ var GeminiAdapter = class extends BaseCodingAdapter {
983
991
  instructions: "Gemini is asking to apply a change (file write, shell command, etc.)"
984
992
  };
985
993
  }
994
+ if (/Interactive\s+shell\s+awaiting\s+input/i.test(stripped)) {
995
+ return {
996
+ detected: true,
997
+ type: "tool_wait",
998
+ prompt: "Gemini interactive shell needs user focus",
999
+ canAutoRespond: false,
1000
+ instructions: "Press Tab to focus the interactive shell, or wait for it to complete"
1001
+ };
1002
+ }
986
1003
  const loginDetection = this.detectLogin(output);
987
1004
  if (loginDetection.required) {
988
1005
  return {
@@ -1104,6 +1121,12 @@ var GeminiAdapter = class extends BaseCodingAdapter {
1104
1121
  code: 0
1105
1122
  };
1106
1123
  }
1124
+ if (/Agent\s+powering\s+down/i.test(stripped)) {
1125
+ return {
1126
+ exited: true,
1127
+ code: 0
1128
+ };
1129
+ }
1107
1130
  return super.detectExit(output);
1108
1131
  }
1109
1132
  getPromptPattern() {
@@ -1449,6 +1472,8 @@ var CodexAdapter = class extends BaseCodingAdapter {
1449
1472
  var AiderAdapter = class extends BaseCodingAdapter {
1450
1473
  adapterType = "aider";
1451
1474
  displayName = "Aider";
1475
+ /** Minimal TUI, mostly text output — shorter settle delay */
1476
+ readySettleMs = 200;
1452
1477
  /**
1453
1478
  * Aider uses plain text [y/n] prompts, NOT TUI arrow-key menus.
1454
1479
  */
@@ -1901,6 +1926,15 @@ var BASELINE_PATTERNS = {
1901
1926
  "update available",
1902
1927
  "[y/n]"
1903
1928
  ],
1929
+ loading: [
1930
+ "Reading X files\u2026"
1931
+ ],
1932
+ turnComplete: [
1933
+ "Cooked for 1m 6s",
1934
+ "<CustomVerb> for 4m 39s"
1935
+ ],
1936
+ toolWait: [],
1937
+ exit: [],
1904
1938
  source: "baseline"
1905
1939
  },
1906
1940
  gemini: {
@@ -1922,6 +1956,20 @@ var BASELINE_PATTERNS = {
1922
1956
  "update available",
1923
1957
  "[y/n]"
1924
1958
  ],
1959
+ loading: [
1960
+ "<phrase> (esc to cancel, 25s)",
1961
+ "Waiting for user confirmation...",
1962
+ "Generating witty retort\u2026",
1963
+ "Reticulating splines",
1964
+ "Warming up the AI hamsters"
1965
+ ],
1966
+ turnComplete: [],
1967
+ toolWait: [
1968
+ "Interactive shell awaiting input... press tab to focus shell"
1969
+ ],
1970
+ exit: [
1971
+ "Agent powering down. Goodbye!"
1972
+ ],
1925
1973
  source: "baseline"
1926
1974
  },
1927
1975
  codex: {
@@ -1940,6 +1988,18 @@ var BASELINE_PATTERNS = {
1940
1988
  "update available",
1941
1989
  "[y/n]"
1942
1990
  ],
1991
+ loading: [
1992
+ "\u2022 Working (0s \u2022 esc to interrupt)",
1993
+ "Booting MCP server: alpha"
1994
+ ],
1995
+ turnComplete: [
1996
+ "Worked for 1m 05s"
1997
+ ],
1998
+ toolWait: [
1999
+ "Waiting for background terminal \xB7 <command>",
2000
+ "Searching the web"
2001
+ ],
2002
+ exit: [],
1943
2003
  source: "baseline"
1944
2004
  },
1945
2005
  aider: {
@@ -1958,6 +2018,16 @@ var BASELINE_PATTERNS = {
1958
2018
  "(Y)es/(N)o",
1959
2019
  "[y/n]"
1960
2020
  ],
2021
+ loading: [
2022
+ "Waiting for <model>",
2023
+ "Waiting for LLM",
2024
+ "Generating commit message with <model>"
2025
+ ],
2026
+ turnComplete: [
2027
+ "Aider is waiting for your input"
2028
+ ],
2029
+ toolWait: [],
2030
+ exit: [],
1961
2031
  source: "baseline"
1962
2032
  }
1963
2033
  };
@@ -1975,6 +2045,10 @@ async function tryLoadFromMonitor(adapter, version) {
1975
2045
  ready: patterns.readyPatterns || [],
1976
2046
  auth: patterns.authPatterns || [],
1977
2047
  blocking: patterns.blockingPatterns || [],
2048
+ loading: patterns.loadingPatterns || [],
2049
+ turnComplete: patterns.turnCompletePatterns || [],
2050
+ toolWait: patterns.toolWaitPatterns || [],
2051
+ exit: patterns.exitPatterns || [],
1978
2052
  source: "snapshot",
1979
2053
  version: patterns.version
1980
2054
  };