coding-agent-adapters 0.13.0 → 0.14.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
@@ -614,7 +614,7 @@ declare class HermesAdapter extends BaseCodingAdapter {
614
614
  /**
615
615
  * Dynamic Pattern Loader
616
616
  *
617
- * Loads adapter patterns from @parallax/adapter-monitor snapshots when available,
617
+ * Loads adapter patterns from @parallaxai/adapter-monitor snapshots when available,
618
618
  * with fallback to hardcoded baseline patterns.
619
619
  */
620
620
 
@@ -644,7 +644,7 @@ interface AdapterPatterns {
644
644
  /**
645
645
  * Load patterns for an adapter
646
646
  *
647
- * Tries to load from @parallax/adapter-monitor snapshots first,
647
+ * Tries to load from @parallaxai/adapter-monitor snapshots first,
648
648
  * falls back to hardcoded baseline patterns.
649
649
  *
650
650
  * @param adapter - Adapter type
package/dist/index.d.ts CHANGED
@@ -614,7 +614,7 @@ declare class HermesAdapter extends BaseCodingAdapter {
614
614
  /**
615
615
  * Dynamic Pattern Loader
616
616
  *
617
- * Loads adapter patterns from @parallax/adapter-monitor snapshots when available,
617
+ * Loads adapter patterns from @parallaxai/adapter-monitor snapshots when available,
618
618
  * with fallback to hardcoded baseline patterns.
619
619
  */
620
620
 
@@ -644,7 +644,7 @@ interface AdapterPatterns {
644
644
  /**
645
645
  * Load patterns for an adapter
646
646
  *
647
- * Tries to load from @parallax/adapter-monitor snapshots first,
647
+ * Tries to load from @parallaxai/adapter-monitor snapshots first,
648
648
  * falls back to hardcoded baseline patterns.
649
649
  *
650
650
  * @param adapter - Adapter type
package/dist/index.js CHANGED
@@ -587,6 +587,16 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
587
587
  * Explicit responseType: 'text' prevents the usesTuiMenus default from kicking in.
588
588
  */
589
589
  autoResponseRules = [
590
+ {
591
+ pattern: /choose\s+the\s+text\s+style\s+that\s+looks\s+best\s+with\s+your\s+terminal|syntax\s+theme:/i,
592
+ type: "config",
593
+ response: "",
594
+ responseType: "keys",
595
+ keys: ["enter"],
596
+ description: "Accept Claude first-run theme/style prompt",
597
+ safe: true,
598
+ once: true
599
+ },
590
600
  {
591
601
  pattern: /trust.*(?:folder|directory)|safety.?check|project.you.created|(?:Yes|Allow).*(?:No|Deny).*(?:Enter|Return)/i,
592
602
  type: "permission",
@@ -1093,7 +1103,8 @@ jq -nc --arg event "${"$"}EVENT" --arg notification_type "${"$"}NOTIFICATION
1093
1103
  const hasConversationalReadyText = stripped.includes("How can I help") || stripped.includes("What would you like");
1094
1104
  const hasLegacyPrompt = /claude>/i.test(tail);
1095
1105
  const hasShortcutsHint = stripped.includes("for shortcuts");
1096
- return hasConversationalReadyText || hasLegacyPrompt || hasShortcutsHint;
1106
+ const hasInteractivePromptBar = /❯\s+\S/.test(tail) && (/\/effort/i.test(stripped) || /Welcome back/i.test(stripped) || /Recent activity/i.test(stripped) || /What's new/i.test(stripped));
1107
+ return hasConversationalReadyText || hasLegacyPrompt || hasShortcutsHint || hasInteractivePromptBar;
1097
1108
  }
1098
1109
  parseOutput(output) {
1099
1110
  const withoutHookMarkers = this.stripHookMarkers(output);
@@ -1945,12 +1956,20 @@ var CodexAdapter = class extends BaseCodingAdapter {
1945
1956
  return false;
1946
1957
  }
1947
1958
  detectReady(output) {
1959
+ const rawTail = output.slice(-2e3);
1960
+ const hasRawComposerSignals = /OpenAI\s+Codex/i.test(rawTail) && (/Explain\s+this\s+codebase/i.test(rawTail) || /Summarize\s+recent\s+commits/i.test(rawTail) || /Ask\s+Codex\s+to\s+do\s+anything/i.test(rawTail) || /\?\s+for\s+shortcuts/i.test(rawTail) || /context\s+left/i.test(rawTail));
1961
+ if (hasRawComposerSignals) {
1962
+ return true;
1963
+ }
1948
1964
  const stripped = this.stripAnsi(output);
1949
1965
  if (!stripped.trim()) return false;
1950
1966
  const tail = stripped.slice(-1200);
1951
1967
  const hasComposerPrompt = /^\s*›\s*(?!\d+\.)\S.*$/m.test(tail) || /›\s+Ask\s+Codex\s+to\s+do\s+anything/.test(tail);
1952
1968
  const hasComposerFooter = /\?\s+for\s+shortcuts/i.test(tail) || /context\s+left/i.test(tail) || /tab\s+to\s+queue\s+message/i.test(tail) || /shift\s*\+\s*enter\s+for\s+newline/i.test(tail);
1953
- if (hasComposerPrompt || hasComposerFooter) {
1969
+ const hasStartupComposerHints = /Summarize\s+recent\s+commits/i.test(tail) || /Explain\s+this\s+codebase/i.test(tail) || /Ask\s+Codex\s+to\s+do\s+anything/i.test(tail);
1970
+ const hasCodexHeader = /OpenAI\s+Codex/i.test(tail) && /directory:\s+~?\/?.+/i.test(tail);
1971
+ const hasInteractiveStatusBar = /gpt-[\w.-]+\s+(?:high|medium|low)/i.test(tail) && /left\b/i.test(tail);
1972
+ if (hasComposerPrompt || hasComposerFooter || hasStartupComposerHints || hasCodexHeader && hasInteractiveStatusBar) {
1954
1973
  return true;
1955
1974
  }
1956
1975
  if (/do.?you.?trust.?the.?contents/i.test(stripped) || /sign.?in.?with.?chatgpt/i.test(stripped) || /update.?available/i.test(stripped) || /enable.?full.?access/i.test(stripped) || /choose.?working.?directory/i.test(stripped)) {
@@ -2059,6 +2078,14 @@ var AiderAdapter = class extends BaseCodingAdapter {
2059
2078
  description: "Decline automatic bug report",
2060
2079
  safe: true
2061
2080
  },
2081
+ {
2082
+ pattern: /open documentation url for more info\?/i,
2083
+ type: "config",
2084
+ response: "n",
2085
+ responseType: "text",
2086
+ description: "Decline opening Aider documentation for model warnings",
2087
+ safe: true
2088
+ },
2062
2089
  // ── File / edit operations ──────────────────────────────────────────
2063
2090
  {
2064
2091
  pattern: /add .+ to the chat\?/i,
@@ -2232,8 +2259,9 @@ var AiderAdapter = class extends BaseCodingAdapter {
2232
2259
  }
2233
2260
  getArgs(config) {
2234
2261
  const args = [];
2235
- args.push("--auto-commits");
2236
- if (!this.isInteractive(config)) {
2262
+ const interactive = this.isInteractive(config);
2263
+ if (!interactive) {
2264
+ args.push("--auto-commits");
2237
2265
  args.push("--no-pretty");
2238
2266
  args.push("--no-show-diffs");
2239
2267
  }
@@ -2241,22 +2269,26 @@ var AiderAdapter = class extends BaseCodingAdapter {
2241
2269
  const credentials = this.getCredentials(config);
2242
2270
  if (config.env?.AIDER_MODEL) {
2243
2271
  args.push("--model", config.env.AIDER_MODEL);
2244
- } else if (provider === "anthropic") {
2272
+ } else if (interactive && (credentials.googleKey || process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY)) {
2273
+ args.push("--model", "gemini");
2274
+ } else if (!interactive && provider === "anthropic") {
2245
2275
  args.push("--model", "sonnet");
2246
- } else if (provider === "openai") {
2276
+ } else if (!interactive && provider === "openai") {
2247
2277
  args.push("--model", "4o");
2248
- } else if (provider === "google") {
2278
+ } else if (!interactive && provider === "google") {
2249
2279
  args.push("--model", "gemini");
2250
- } else if (credentials.anthropicKey) {
2280
+ } else if (!interactive && credentials.anthropicKey) {
2251
2281
  args.push("--model", "sonnet");
2252
- } else if (credentials.openaiKey) {
2282
+ } else if (!interactive && credentials.openaiKey) {
2253
2283
  args.push("--model", "4o");
2254
- } else if (credentials.googleKey) {
2284
+ } else if (!interactive && credentials.googleKey) {
2255
2285
  args.push("--model", "gemini");
2256
2286
  }
2257
- if (credentials.anthropicKey) args.push("--api-key", `anthropic=${credentials.anthropicKey}`);
2258
- if (credentials.openaiKey) args.push("--api-key", `openai=${credentials.openaiKey}`);
2259
- if (credentials.googleKey) args.push("--api-key", `gemini=${credentials.googleKey}`);
2287
+ if (!interactive) {
2288
+ if (credentials.anthropicKey) args.push("--api-key", `anthropic=${credentials.anthropicKey}`);
2289
+ if (credentials.openaiKey) args.push("--api-key", `openai=${credentials.openaiKey}`);
2290
+ if (credentials.googleKey) args.push("--api-key", `gemini=${credentials.googleKey}`);
2291
+ }
2260
2292
  const approvalConfig = this.getApprovalConfig(config);
2261
2293
  if (approvalConfig) {
2262
2294
  args.push(...approvalConfig.cliFlags);