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 CHANGED
@@ -611,6 +611,15 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
611
611
  description: "Decline anonymous usage data",
612
612
  safe: true
613
613
  },
614
+ {
615
+ 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,
616
+ type: "config",
617
+ response: "0",
618
+ responseType: "text",
619
+ description: "Dismiss optional Claude session survey",
620
+ safe: true,
621
+ once: true
622
+ },
614
623
  {
615
624
  pattern: /continue without.*\[y\/n\]/i,
616
625
  type: "config",
@@ -724,6 +733,39 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
724
733
  instructions: loginDetection.instructions
725
734
  };
726
735
  }
736
+ 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)) {
737
+ return {
738
+ detected: true,
739
+ type: "config",
740
+ prompt: "Claude session survey",
741
+ options: ["1", "2", "3", "0"],
742
+ suggestedResponse: "0",
743
+ canAutoRespond: true,
744
+ instructions: "Optional survey prompt; reply 0 to dismiss"
745
+ };
746
+ }
747
+ if (/enter\/tab\/space to toggle.*esc to cancel|enter to confirm.*esc to cancel|esc to close/i.test(stripped)) {
748
+ return {
749
+ detected: true,
750
+ type: "config",
751
+ prompt: "Claude dialog awaiting navigation",
752
+ options: ["keys:enter", "keys:esc", "keys:down,enter"],
753
+ suggestedResponse: "keys:esc",
754
+ canAutoRespond: false,
755
+ instructions: "Use Enter/Esc or arrow keys to navigate this dialog"
756
+ };
757
+ }
758
+ if (/\/agents\b|\/chrome\b|\/config\b|\/tasks\b|\/skills\b|\/remote-env\b|press .* to navigate .* enter .* esc/i.test(stripped)) {
759
+ return {
760
+ detected: true,
761
+ type: "config",
762
+ prompt: "Claude menu navigation required",
763
+ options: ["keys:esc", "keys:enter", "keys:down,enter"],
764
+ suggestedResponse: "keys:esc",
765
+ canAutoRespond: false,
766
+ instructions: "Claude is showing an interactive menu; use arrow keys + Enter or Esc"
767
+ };
768
+ }
727
769
  if (/Do you want to|wants? (your )?permission|needs your permission/i.test(stripped)) {
728
770
  return {
729
771
  detected: true,
@@ -809,7 +851,6 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
809
851
  detectTaskComplete(output) {
810
852
  const stripped = this.stripAnsi(output);
811
853
  if (!stripped.trim()) return false;
812
- if (this.detectLoading(stripped)) return false;
813
854
  if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
814
855
  return false;
815
856
  }
@@ -827,7 +868,6 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
827
868
  detectReady(output) {
828
869
  const stripped = this.stripAnsi(output);
829
870
  if (!stripped.trim()) return false;
830
- if (this.detectLoading(stripped)) return false;
831
871
  if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
832
872
  return false;
833
873
  }
@@ -1487,7 +1527,6 @@ var CodexAdapter = class extends BaseCodingAdapter {
1487
1527
  detectTaskComplete(output) {
1488
1528
  const stripped = this.stripAnsi(output);
1489
1529
  if (!stripped.trim()) return false;
1490
- if (this.detectLoading(stripped)) return false;
1491
1530
  const hasWorkedFor = /Worked\s+for\s+\d+(?:h\s+\d{2}m\s+\d{2}s|m\s+\d{2}s|s)/.test(stripped);
1492
1531
  const hasComposerPrompt = /›\s+Ask\s+Codex\s+to\s+do\s+anything/.test(stripped) || /^\s*›\s*(?!\d+\.)\S.*$/m.test(stripped);
1493
1532
  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);
@@ -1505,7 +1544,6 @@ var CodexAdapter = class extends BaseCodingAdapter {
1505
1544
  detectReady(output) {
1506
1545
  const stripped = this.stripAnsi(output);
1507
1546
  if (!stripped.trim()) return false;
1508
- if (this.detectLoading(stripped)) return false;
1509
1547
  const tail = stripped.slice(-1200);
1510
1548
  const hasComposerPrompt = /^\s*›\s*(?!\d+\.)\S.*$/m.test(tail) || /›\s+Ask\s+Codex\s+to\s+do\s+anything/.test(tail);
1511
1549
  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);