coding-agent-adapters 0.7.4 → 0.7.5
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.cjs +42 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -609,6 +609,15 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
609
609
|
description: "Decline anonymous usage data",
|
|
610
610
|
safe: true
|
|
611
611
|
},
|
|
612
|
+
{
|
|
613
|
+
pattern: /how is claude doing this session\?\s*\(optional\)|1:\s*bad\s+2:\s*fine\s+3:\s*good\s+0:\s*dismiss/i,
|
|
614
|
+
type: "config",
|
|
615
|
+
response: "0",
|
|
616
|
+
responseType: "text",
|
|
617
|
+
description: "Dismiss optional Claude session survey",
|
|
618
|
+
safe: true,
|
|
619
|
+
once: true
|
|
620
|
+
},
|
|
612
621
|
{
|
|
613
622
|
pattern: /continue without.*\[y\/n\]/i,
|
|
614
623
|
type: "config",
|
|
@@ -722,6 +731,39 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
722
731
|
instructions: loginDetection.instructions
|
|
723
732
|
};
|
|
724
733
|
}
|
|
734
|
+
if (/how is claude doing this session\?\s*\(optional\)|1:\s*bad\s+2:\s*fine\s+3:\s*good\s+0:\s*dismiss/i.test(stripped)) {
|
|
735
|
+
return {
|
|
736
|
+
detected: true,
|
|
737
|
+
type: "config",
|
|
738
|
+
prompt: "Claude session survey",
|
|
739
|
+
options: ["1", "2", "3", "0"],
|
|
740
|
+
suggestedResponse: "0",
|
|
741
|
+
canAutoRespond: true,
|
|
742
|
+
instructions: "Optional survey prompt; reply 0 to dismiss"
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
if (/enter\/tab\/space to toggle.*esc to cancel|enter to confirm.*esc to cancel|esc to close/i.test(stripped)) {
|
|
746
|
+
return {
|
|
747
|
+
detected: true,
|
|
748
|
+
type: "config",
|
|
749
|
+
prompt: "Claude dialog awaiting navigation",
|
|
750
|
+
options: ["keys:enter", "keys:esc", "keys:down,enter"],
|
|
751
|
+
suggestedResponse: "keys:esc",
|
|
752
|
+
canAutoRespond: false,
|
|
753
|
+
instructions: "Use Enter/Esc or arrow keys to navigate this dialog"
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
if (/\/agents\b|\/chrome\b|\/config\b|\/tasks\b|\/skills\b|\/remote-env\b|press .* to navigate .* enter .* esc/i.test(stripped)) {
|
|
757
|
+
return {
|
|
758
|
+
detected: true,
|
|
759
|
+
type: "config",
|
|
760
|
+
prompt: "Claude menu navigation required",
|
|
761
|
+
options: ["keys:esc", "keys:enter", "keys:down,enter"],
|
|
762
|
+
suggestedResponse: "keys:esc",
|
|
763
|
+
canAutoRespond: false,
|
|
764
|
+
instructions: "Claude is showing an interactive menu; use arrow keys + Enter or Esc"
|
|
765
|
+
};
|
|
766
|
+
}
|
|
725
767
|
if (/Do you want to|wants? (your )?permission|needs your permission/i.test(stripped)) {
|
|
726
768
|
return {
|
|
727
769
|
detected: true,
|
|
@@ -807,7 +849,6 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
807
849
|
detectTaskComplete(output) {
|
|
808
850
|
const stripped = this.stripAnsi(output);
|
|
809
851
|
if (!stripped.trim()) return false;
|
|
810
|
-
if (this.detectLoading(stripped)) return false;
|
|
811
852
|
if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
|
|
812
853
|
return false;
|
|
813
854
|
}
|
|
@@ -825,7 +866,6 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
825
866
|
detectReady(output) {
|
|
826
867
|
const stripped = this.stripAnsi(output);
|
|
827
868
|
if (!stripped.trim()) return false;
|
|
828
|
-
if (this.detectLoading(stripped)) return false;
|
|
829
869
|
if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
|
|
830
870
|
return false;
|
|
831
871
|
}
|
|
@@ -1485,7 +1525,6 @@ var CodexAdapter = class extends BaseCodingAdapter {
|
|
|
1485
1525
|
detectTaskComplete(output) {
|
|
1486
1526
|
const stripped = this.stripAnsi(output);
|
|
1487
1527
|
if (!stripped.trim()) return false;
|
|
1488
|
-
if (this.detectLoading(stripped)) return false;
|
|
1489
1528
|
const hasWorkedFor = /Worked\s+for\s+\d+(?:h\s+\d{2}m\s+\d{2}s|m\s+\d{2}s|s)/.test(stripped);
|
|
1490
1529
|
const hasComposerPrompt = /›\s+Ask\s+Codex\s+to\s+do\s+anything/.test(stripped) || /^\s*›\s*(?!\d+\.)\S.*$/m.test(stripped);
|
|
1491
1530
|
const hasIdleFooterHints = /\?\s+for\s+shortcuts/i.test(stripped) || /context\s+left/i.test(stripped) || /tab\s+to\s+queue\s+message/i.test(stripped);
|
|
@@ -1503,7 +1542,6 @@ var CodexAdapter = class extends BaseCodingAdapter {
|
|
|
1503
1542
|
detectReady(output) {
|
|
1504
1543
|
const stripped = this.stripAnsi(output);
|
|
1505
1544
|
if (!stripped.trim()) return false;
|
|
1506
|
-
if (this.detectLoading(stripped)) return false;
|
|
1507
1545
|
const tail = stripped.slice(-1200);
|
|
1508
1546
|
const hasComposerPrompt = /^\s*›\s*(?!\d+\.)\S.*$/m.test(tail) || /›\s+Ask\s+Codex\s+to\s+do\s+anything/.test(tail);
|
|
1509
1547
|
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);
|