coding-agent-adapters 0.4.0 → 0.4.2
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 +2 -2
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ const login = adapter.detectLogin(output);
|
|
|
68
68
|
| Adapter | Auth Types | Source Files |
|
|
69
69
|
|---------|-----------|-------------|
|
|
70
70
|
| Claude | API key, OAuth browser | CLI runtime |
|
|
71
|
-
| Gemini | Google OAuth, API key entry, auth in-progress | `AuthDialog.tsx`, `ApiAuthDialog.tsx`, `AuthInProgress.tsx` |
|
|
71
|
+
| Gemini | Google OAuth, API key entry, auth in-progress (ignores "Both keys set" success messages) | `AuthDialog.tsx`, `ApiAuthDialog.tsx`, `AuthInProgress.tsx` |
|
|
72
72
|
| Codex | Device code flow, onboarding auth menu | `auth.rs`, `headless_chatgpt_login.rs` |
|
|
73
73
|
| Aider | API key missing/invalid, OpenRouter OAuth | `onboarding.py`, `models.py` |
|
|
74
74
|
|
|
@@ -100,7 +100,7 @@ Each adapter implements `detectTaskComplete(output)` to recognize when the CLI h
|
|
|
100
100
|
|
|
101
101
|
| Adapter | Completion Indicators | Source Patterns |
|
|
102
102
|
|---------|----------------------|----------------|
|
|
103
|
-
| Claude | Turn duration (`Cooked for 3m 12s`, custom verb) + `❯` prompt | `claude_completed_turn_duration` |
|
|
103
|
+
| Claude | Turn duration (`Cooked for 3m 12s`, custom verb) + `❯` prompt (tolerates trailing status bar) | `claude_completed_turn_duration` |
|
|
104
104
|
| Gemini | `◇ Ready` window title, `Type your message` composer | `gemini_ready_title` |
|
|
105
105
|
| Codex | `Worked for 1m 05s` separator + `›` prompt | `codex_completed_worked_for_separator`, `codex_ready_prompt` |
|
|
106
106
|
| Aider | `Aider is waiting for your input`, mode prompts with edit/cost markers | `aider_completed_llm_response_ready` |
|
package/dist/index.cjs
CHANGED
|
@@ -763,7 +763,8 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
763
763
|
detectTaskComplete(output) {
|
|
764
764
|
const stripped = this.stripAnsi(output);
|
|
765
765
|
const hasDuration = /[A-Z][A-Za-z' -]{2,40}\s+for\s+\d+(?:h\s+\d{1,2}m\s+\d{1,2}s|m\s+\d{1,2}s|s)/.test(stripped);
|
|
766
|
-
const
|
|
766
|
+
const tail = stripped.slice(-300);
|
|
767
|
+
const hasIdlePrompt = /❯/.test(tail);
|
|
767
768
|
if (hasDuration && hasIdlePrompt) {
|
|
768
769
|
return true;
|
|
769
770
|
}
|
|
@@ -777,10 +778,11 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
777
778
|
if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
|
|
778
779
|
return false;
|
|
779
780
|
}
|
|
781
|
+
const tail = stripped.slice(-300);
|
|
780
782
|
return stripped.includes("How can I help") || stripped.includes("What would you like") || // v2.1+ shows "for shortcuts" hint when ready
|
|
781
783
|
stripped.includes("for shortcuts") || // Match "claude> " or similar specific prompts, not bare ">"
|
|
782
|
-
/claude
|
|
783
|
-
|
|
784
|
+
/claude>/i.test(tail) || // v2.1+ uses ❯ as the input prompt
|
|
785
|
+
/❯/.test(tail);
|
|
784
786
|
}
|
|
785
787
|
parseOutput(output) {
|
|
786
788
|
const stripped = this.stripAnsi(output);
|
|
@@ -922,7 +924,7 @@ var GeminiAdapter = class extends BaseCodingAdapter {
|
|
|
922
924
|
}
|
|
923
925
|
detectLogin(output) {
|
|
924
926
|
const stripped = this.stripAnsi(output);
|
|
925
|
-
if (stripped.includes("API key not found") ||
|
|
927
|
+
if (stripped.includes("API key not found") || /set (?:GOOGLE_API_KEY|GEMINI_API_KEY)/i.test(stripped) || stripped.includes("authentication required") || stripped.includes("Invalid API key") || stripped.includes("API key is not valid")) {
|
|
926
928
|
return {
|
|
927
929
|
required: true,
|
|
928
930
|
type: "api_key",
|