coding-agent-adapters 0.4.3 → 0.5.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
@@ -465,6 +465,14 @@ interface AdapterPatterns {
465
465
  auth: string[];
466
466
  /** Blocking prompt detection patterns */
467
467
  blocking: string[];
468
+ /** Loading/active indicator patterns */
469
+ loading: string[];
470
+ /** Turn completion patterns */
471
+ turnComplete: string[];
472
+ /** Tool wait patterns */
473
+ toolWait: string[];
474
+ /** Exit/session complete patterns */
475
+ exit: string[];
468
476
  /** Source of patterns */
469
477
  source: 'snapshot' | 'baseline';
470
478
  /** Version these patterns are from (if from snapshot) */
package/dist/index.d.ts CHANGED
@@ -465,6 +465,14 @@ interface AdapterPatterns {
465
465
  auth: string[];
466
466
  /** Blocking prompt detection patterns */
467
467
  blocking: string[];
468
+ /** Loading/active indicator patterns */
469
+ loading: string[];
470
+ /** Turn completion patterns */
471
+ turnComplete: string[];
472
+ /** Tool wait patterns */
473
+ toolWait: string[];
474
+ /** Exit/session complete patterns */
475
+ exit: string[];
468
476
  /** Source of patterns */
469
477
  source: 'snapshot' | 'baseline';
470
478
  /** Version these patterns are from (if from snapshot) */
package/dist/index.js CHANGED
@@ -983,6 +983,15 @@ var GeminiAdapter = class extends BaseCodingAdapter {
983
983
  instructions: "Gemini is asking to apply a change (file write, shell command, etc.)"
984
984
  };
985
985
  }
986
+ if (/Interactive\s+shell\s+awaiting\s+input/i.test(stripped)) {
987
+ return {
988
+ detected: true,
989
+ type: "tool_wait",
990
+ prompt: "Gemini interactive shell needs user focus",
991
+ canAutoRespond: false,
992
+ instructions: "Press Tab to focus the interactive shell, or wait for it to complete"
993
+ };
994
+ }
986
995
  const loginDetection = this.detectLogin(output);
987
996
  if (loginDetection.required) {
988
997
  return {
@@ -1104,6 +1113,12 @@ var GeminiAdapter = class extends BaseCodingAdapter {
1104
1113
  code: 0
1105
1114
  };
1106
1115
  }
1116
+ if (/Agent\s+powering\s+down/i.test(stripped)) {
1117
+ return {
1118
+ exited: true,
1119
+ code: 0
1120
+ };
1121
+ }
1107
1122
  return super.detectExit(output);
1108
1123
  }
1109
1124
  getPromptPattern() {
@@ -1901,6 +1916,15 @@ var BASELINE_PATTERNS = {
1901
1916
  "update available",
1902
1917
  "[y/n]"
1903
1918
  ],
1919
+ loading: [
1920
+ "Reading X files\u2026"
1921
+ ],
1922
+ turnComplete: [
1923
+ "Cooked for 1m 6s",
1924
+ "<CustomVerb> for 4m 39s"
1925
+ ],
1926
+ toolWait: [],
1927
+ exit: [],
1904
1928
  source: "baseline"
1905
1929
  },
1906
1930
  gemini: {
@@ -1922,6 +1946,20 @@ var BASELINE_PATTERNS = {
1922
1946
  "update available",
1923
1947
  "[y/n]"
1924
1948
  ],
1949
+ loading: [
1950
+ "<phrase> (esc to cancel, 25s)",
1951
+ "Waiting for user confirmation...",
1952
+ "Generating witty retort\u2026",
1953
+ "Reticulating splines",
1954
+ "Warming up the AI hamsters"
1955
+ ],
1956
+ turnComplete: [],
1957
+ toolWait: [
1958
+ "Interactive shell awaiting input... press tab to focus shell"
1959
+ ],
1960
+ exit: [
1961
+ "Agent powering down. Goodbye!"
1962
+ ],
1925
1963
  source: "baseline"
1926
1964
  },
1927
1965
  codex: {
@@ -1940,6 +1978,18 @@ var BASELINE_PATTERNS = {
1940
1978
  "update available",
1941
1979
  "[y/n]"
1942
1980
  ],
1981
+ loading: [
1982
+ "\u2022 Working (0s \u2022 esc to interrupt)",
1983
+ "Booting MCP server: alpha"
1984
+ ],
1985
+ turnComplete: [
1986
+ "Worked for 1m 05s"
1987
+ ],
1988
+ toolWait: [
1989
+ "Waiting for background terminal \xB7 <command>",
1990
+ "Searching the web"
1991
+ ],
1992
+ exit: [],
1943
1993
  source: "baseline"
1944
1994
  },
1945
1995
  aider: {
@@ -1958,6 +2008,16 @@ var BASELINE_PATTERNS = {
1958
2008
  "(Y)es/(N)o",
1959
2009
  "[y/n]"
1960
2010
  ],
2011
+ loading: [
2012
+ "Waiting for <model>",
2013
+ "Waiting for LLM",
2014
+ "Generating commit message with <model>"
2015
+ ],
2016
+ turnComplete: [
2017
+ "Aider is waiting for your input"
2018
+ ],
2019
+ toolWait: [],
2020
+ exit: [],
1961
2021
  source: "baseline"
1962
2022
  }
1963
2023
  };
@@ -1975,6 +2035,10 @@ async function tryLoadFromMonitor(adapter, version) {
1975
2035
  ready: patterns.readyPatterns || [],
1976
2036
  auth: patterns.authPatterns || [],
1977
2037
  blocking: patterns.blockingPatterns || [],
2038
+ loading: patterns.loadingPatterns || [],
2039
+ turnComplete: patterns.turnCompletePatterns || [],
2040
+ toolWait: patterns.toolWaitPatterns || [],
2041
+ exit: patterns.exitPatterns || [],
1978
2042
  source: "snapshot",
1979
2043
  version: patterns.version
1980
2044
  };