pushary 1.9.142 → 1.9.143

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/{api-JR3YAO4I.js → api-2YC2KSIM.js} +6 -2
  3. package/dist/bin/pushary-bell-hook.js +5 -5
  4. package/dist/bin/pushary-claude.js +20 -9
  5. package/dist/bin/pushary-clean.js +13 -13
  6. package/dist/bin/pushary-codex-bridge.js +3 -3
  7. package/dist/bin/pushary-codex-hook.js +10 -10
  8. package/dist/bin/pushary-codex-session.js +3 -3
  9. package/dist/bin/pushary-codex.js +3 -3
  10. package/dist/bin/pushary-connect.js +8 -8
  11. package/dist/bin/pushary-daemon.js +9 -9
  12. package/dist/bin/pushary-disconnect.js +8 -8
  13. package/dist/bin/pushary-doctor.js +11 -11
  14. package/dist/bin/pushary-elicitation-hook.js +6 -6
  15. package/dist/bin/pushary-gemini-hook.js +8 -8
  16. package/dist/bin/pushary-hook.js +10 -10
  17. package/dist/bin/pushary-login.js +3 -3
  18. package/dist/bin/pushary-logout.js +7 -7
  19. package/dist/bin/pushary-mcp.js +2 -2
  20. package/dist/bin/pushary-notification-hook.js +5 -5
  21. package/dist/bin/pushary-opencode-hook.js +8 -8
  22. package/dist/bin/pushary-permission-denied-hook.js +10 -10
  23. package/dist/bin/pushary-permission-hook.js +10 -10
  24. package/dist/bin/pushary-post-hook.js +6 -6
  25. package/dist/bin/pushary-prompt-hook.js +5 -5
  26. package/dist/bin/pushary-session-end-hook.js +5 -5
  27. package/dist/bin/pushary-session-start-hook.js +9 -9
  28. package/dist/bin/pushary-setup.js +15 -15
  29. package/dist/bin/pushary-status.js +8 -8
  30. package/dist/bin/pushary-stop-hook.js +5 -5
  31. package/dist/bin/pushary-stopfailure-hook.js +5 -5
  32. package/dist/bin/pushary-transcripts.js +3 -3
  33. package/dist/bin/pushary-upgrade.js +11 -11
  34. package/dist/{chunk-XIU5ER6S.js → chunk-3WZMIDGX.js} +1 -1
  35. package/dist/{chunk-TKYGEPBH.js → chunk-42DRRA6N.js} +1 -1
  36. package/dist/{chunk-5N6Q5XGF.js → chunk-44Z6MQZ2.js} +2 -2
  37. package/dist/{chunk-CZCLJXUA.js → chunk-5RSM5DRT.js} +1 -1
  38. package/dist/{chunk-3KW7WC4L.js → chunk-CNURORKI.js} +41 -6
  39. package/dist/{chunk-A3DVD55C.js → chunk-DOXH5BV4.js} +1 -1
  40. package/dist/{chunk-POXASZR6.js → chunk-DU4KCXC2.js} +1 -1
  41. package/dist/{chunk-TYQITMXN.js → chunk-EGUT2MWV.js} +1 -1
  42. package/dist/{chunk-7K3KDCOX.js → chunk-FYB6HBHQ.js} +1 -1
  43. package/dist/{chunk-5GE7PKK4.js → chunk-G3G7DWR3.js} +3 -3
  44. package/dist/{chunk-DV4ZWKI6.js → chunk-G7G2ZPT4.js} +2 -2
  45. package/dist/{chunk-EECOWW5X.js → chunk-K7MVCPH5.js} +1 -1
  46. package/dist/{chunk-UPI4IIX3.js → chunk-LWQLM3AO.js} +1 -1
  47. package/dist/{chunk-7PJLQRRM.js → chunk-MLOYBLO4.js} +1 -1
  48. package/dist/{chunk-76N6DCSP.js → chunk-MMS7R3VO.js} +1 -1
  49. package/dist/{chunk-ZGYVUZEZ.js → chunk-MQF6MQMR.js} +3 -3
  50. package/dist/{chunk-77ZUOR3U.js → chunk-NZHRH4RR.js} +2 -2
  51. package/dist/{chunk-KY6AHZ2P.js → chunk-QGJK3NAR.js} +2 -2
  52. package/dist/{chunk-G562FBHB.js → chunk-SYZF5SDG.js} +1 -1
  53. package/dist/{chunk-ZJHZICA4.js → chunk-UJETZZG5.js} +2 -2
  54. package/dist/{chunk-FFAVOHI5.js → chunk-USNGPJXF.js} +2 -2
  55. package/dist/{chunk-34JVH6VP.js → chunk-V53QYJNY.js} +10 -1
  56. package/dist/{chunk-MDIBO7U7.js → chunk-V7CS72Q5.js} +1 -1
  57. package/dist/{chunk-4KVGNCMN.js → chunk-WSKBXADV.js} +1 -1
  58. package/dist/{chunk-TPQDOZGK.js → chunk-X2MC2CF3.js} +8 -8
  59. package/dist/{chunk-Z5OFTJGZ.js → chunk-ZDOTNMGL.js} +1 -1
  60. package/dist/{codex-app-cards-switch-FAWUGM7P.js → codex-app-cards-switch-EGUHSLTG.js} +2 -2
  61. package/dist/{codex-desktop-launch-WPN7UNS7.js → codex-desktop-launch-6UN5CWCX.js} +1 -1
  62. package/dist/{codex-session-launch-YPPBWBBH.js → codex-session-launch-7R3HNIDJ.js} +3 -3
  63. package/dist/{reapply-4PUJZT73.js → reapply-W6AIK5PH.js} +8 -8
  64. package/dist/src/index.js +10 -10
  65. package/package.json +1 -1
@@ -36,7 +36,7 @@ import {
36
36
  renderCommandSurface,
37
37
  teamOfferLines,
38
38
  unverifiedKeyClosingReason
39
- } from "../chunk-7PJLQRRM.js";
39
+ } from "../chunk-MLOYBLO4.js";
40
40
  import {
41
41
  coworkOutput,
42
42
  coworkSelection
@@ -44,7 +44,7 @@ import {
44
44
  import "../chunk-PUZZELE6.js";
45
45
  import {
46
46
  readCodexHooksOnDisk
47
- } from "../chunk-ZJHZICA4.js";
47
+ } from "../chunk-UJETZZG5.js";
48
48
  import "../chunk-FS47XZCE.js";
49
49
  import {
50
50
  clearDeclinedAgent,
@@ -79,7 +79,7 @@ import {
79
79
  pairingEscapeApplies,
80
80
  printConnectInstructions,
81
81
  waitForYourPhone
82
- } from "../chunk-UPI4IIX3.js";
82
+ } from "../chunk-LWQLM3AO.js";
83
83
  import "../chunk-3EGEA4KH.js";
84
84
  import {
85
85
  SETUP_AGENT_NAME,
@@ -88,7 +88,7 @@ import {
88
88
  roundTripEvidence,
89
89
  roundTripWasAnswered,
90
90
  verifyRoundTrip
91
- } from "../chunk-MDIBO7U7.js";
91
+ } from "../chunk-V7CS72Q5.js";
92
92
  import {
93
93
  keepLinuxDaemonAfterLogout,
94
94
  lingerReportOf
@@ -107,7 +107,7 @@ import {
107
107
  } from "../chunk-XR27HPYC.js";
108
108
  import {
109
109
  codexEngineBehindLauncher
110
- } from "../chunk-5N6Q5XGF.js";
110
+ } from "../chunk-44Z6MQZ2.js";
111
111
  import "../chunk-XCEN33UP.js";
112
112
  import {
113
113
  CURSOR_PLUGIN_BACKUP_INFIX,
@@ -117,7 +117,7 @@ import {
117
117
  soleGateFile,
118
118
  soleGateReceipt,
119
119
  soleGateReceiptFile
120
- } from "../chunk-A3DVD55C.js";
120
+ } from "../chunk-DOXH5BV4.js";
121
121
  import {
122
122
  describeDetection,
123
123
  detectAllAgents,
@@ -126,11 +126,11 @@ import {
126
126
  registerPluginLocation,
127
127
  shortenHome,
128
128
  vscodeSettingsTargets
129
- } from "../chunk-DV4ZWKI6.js";
129
+ } from "../chunk-G7G2ZPT4.js";
130
130
  import {
131
131
  mcpServerBearer,
132
132
  readMacAppAgentKey
133
- } from "../chunk-EECOWW5X.js";
133
+ } from "../chunk-K7MVCPH5.js";
134
134
  import {
135
135
  keyScopeOf
136
136
  } from "../chunk-TKFNIDZK.js";
@@ -165,7 +165,7 @@ import {
165
165
  readFxProfileForSetup,
166
166
  withFxPusharyServer,
167
167
  writeFxProfile
168
- } from "../chunk-Z5OFTJGZ.js";
168
+ } from "../chunk-ZDOTNMGL.js";
169
169
  import {
170
170
  AgentConfigError,
171
171
  afterAgentFailureNote,
@@ -181,7 +181,7 @@ import {
181
181
  } from "../chunk-XWYCFODT.js";
182
182
  import {
183
183
  MCP_BRIDGE_BINARY
184
- } from "../chunk-TYQITMXN.js";
184
+ } from "../chunk-EGUT2MWV.js";
185
185
  import {
186
186
  OPENCODE_HOOK_BINARY,
187
187
  addOpenCodeMcpServer,
@@ -199,7 +199,7 @@ import {
199
199
  openCodePluginFile,
200
200
  openCodeWired,
201
201
  withOpenCodeAskRules
202
- } from "../chunk-G562FBHB.js";
202
+ } from "../chunk-SYZF5SDG.js";
203
203
  import {
204
204
  ansiPainter,
205
205
  createIo,
@@ -240,7 +240,7 @@ import {
240
240
  compatibleRecord,
241
241
  compatibleTargetPaths,
242
242
  hasCompatibleHooks
243
- } from "../chunk-CZCLJXUA.js";
243
+ } from "../chunk-5RSM5DRT.js";
244
244
  import {
245
245
  DAEMON_COLD_START_TIMEOUT_MS,
246
246
  clearDaemonNeedsLogin,
@@ -278,7 +278,7 @@ import {
278
278
  } from "../chunk-3VOUWGFF.js";
279
279
  import {
280
280
  reportEvent
281
- } from "../chunk-KY6AHZ2P.js";
281
+ } from "../chunk-QGJK3NAR.js";
282
282
  import "../chunk-7QWH257P.js";
283
283
  import {
284
284
  AGENT_CHOICES,
@@ -294,9 +294,9 @@ import {
294
294
  transcriptPreferenceForSetup
295
295
  } from "../chunk-7VMVMC4H.js";
296
296
  import "../chunk-EMODTMHE.js";
297
- import "../chunk-3KW7WC4L.js";
297
+ import "../chunk-CNURORKI.js";
298
298
  import "../chunk-POFBE6ZY.js";
299
- import "../chunk-34JVH6VP.js";
299
+ import "../chunk-V53QYJNY.js";
300
300
  import {
301
301
  checkApiKey,
302
302
  describeKeyCheck,
@@ -4,12 +4,12 @@ import {
4
4
  } from "../chunk-QLGLUUOP.js";
5
5
  import {
6
6
  fetchChannels
7
- } from "../chunk-UPI4IIX3.js";
7
+ } from "../chunk-LWQLM3AO.js";
8
8
  import "../chunk-3EGEA4KH.js";
9
9
  import {
10
10
  describeReach,
11
11
  reachVerdict
12
- } from "../chunk-MDIBO7U7.js";
12
+ } from "../chunk-V7CS72Q5.js";
13
13
  import {
14
14
  describeLastSeen,
15
15
  listMachines
@@ -24,10 +24,10 @@ import {
24
24
  CONNECTED_THROUGH_MAC_APP,
25
25
  keyWrittenByMacApp,
26
26
  readMacAppConnectionWhenKeyless
27
- } from "../chunk-EECOWW5X.js";
27
+ } from "../chunk-K7MVCPH5.js";
28
28
  import "../chunk-TKFNIDZK.js";
29
29
  import "../chunk-QCGNGEGE.js";
30
- import "../chunk-G562FBHB.js";
30
+ import "../chunk-SYZF5SDG.js";
31
31
  import {
32
32
  createIo
33
33
  } from "../chunk-FO3MDD26.js";
@@ -37,10 +37,10 @@ import {
37
37
  import "../chunk-R27HXRSK.js";
38
38
  import "../chunk-UIZE4YMU.js";
39
39
  import "../chunk-CYTPQDQY.js";
40
- import "../chunk-CZCLJXUA.js";
40
+ import "../chunk-5RSM5DRT.js";
41
41
  import "../chunk-ZF4CPOO7.js";
42
42
  import "../chunk-3VOUWGFF.js";
43
- import "../chunk-KY6AHZ2P.js";
43
+ import "../chunk-QGJK3NAR.js";
44
44
  import "../chunk-7QWH257P.js";
45
45
  import "../chunk-53KLGXFL.js";
46
46
  import "../chunk-MH5BRZOQ.js";
@@ -48,9 +48,9 @@ import {
48
48
  rejectUnknownFlags
49
49
  } from "../chunk-YPY4YCIZ.js";
50
50
  import "../chunk-EMODTMHE.js";
51
- import "../chunk-3KW7WC4L.js";
51
+ import "../chunk-CNURORKI.js";
52
52
  import "../chunk-POFBE6ZY.js";
53
- import "../chunk-34JVH6VP.js";
53
+ import "../chunk-V53QYJNY.js";
54
54
  import {
55
55
  checkApiKey,
56
56
  describeKeyCheck
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-77ZUOR3U.js";
4
+ } from "../chunk-NZHRH4RR.js";
5
5
  import "../chunk-6JLANX5L.js";
6
6
  import "../chunk-LTPKSJWY.js";
7
7
  import "../chunk-VAE5JBR5.js";
@@ -9,7 +9,7 @@ import "../chunk-G66WIAST.js";
9
9
  import {
10
10
  activeHookSource,
11
11
  activeIdentity
12
- } from "../chunk-CZCLJXUA.js";
12
+ } from "../chunk-5RSM5DRT.js";
13
13
  import "../chunk-ZF4CPOO7.js";
14
14
  import "../chunk-3VOUWGFF.js";
15
15
  import {
@@ -17,7 +17,7 @@ import {
17
17
  handleStop,
18
18
  handleSubagentStop,
19
19
  isSubagentStop
20
- } from "../chunk-KY6AHZ2P.js";
20
+ } from "../chunk-QGJK3NAR.js";
21
21
  import "../chunk-7QWH257P.js";
22
22
  import "../chunk-53KLGXFL.js";
23
23
  import "../chunk-MH5BRZOQ.js";
@@ -26,9 +26,9 @@ import "../chunk-22CXL7YI.js";
26
26
  import "../chunk-XMSDA5WA.js";
27
27
  import "../chunk-7VMVMC4H.js";
28
28
  import "../chunk-EMODTMHE.js";
29
- import "../chunk-3KW7WC4L.js";
29
+ import "../chunk-CNURORKI.js";
30
30
  import "../chunk-POFBE6ZY.js";
31
- import "../chunk-34JVH6VP.js";
31
+ import "../chunk-V53QYJNY.js";
32
32
  import "../chunk-DZLLKJJT.js";
33
33
  import "../chunk-4OX4SJGA.js";
34
34
  import "../chunk-H6CL3T2S.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-77ZUOR3U.js";
4
+ } from "../chunk-NZHRH4RR.js";
5
5
  import "../chunk-6JLANX5L.js";
6
6
  import "../chunk-LTPKSJWY.js";
7
7
  import "../chunk-VAE5JBR5.js";
@@ -9,12 +9,12 @@ import "../chunk-G66WIAST.js";
9
9
  import {
10
10
  activeHookSource,
11
11
  activeIdentity
12
- } from "../chunk-CZCLJXUA.js";
12
+ } from "../chunk-5RSM5DRT.js";
13
13
  import "../chunk-ZF4CPOO7.js";
14
14
  import "../chunk-3VOUWGFF.js";
15
15
  import {
16
16
  handleStopFailure
17
- } from "../chunk-KY6AHZ2P.js";
17
+ } from "../chunk-QGJK3NAR.js";
18
18
  import "../chunk-7QWH257P.js";
19
19
  import "../chunk-53KLGXFL.js";
20
20
  import "../chunk-MH5BRZOQ.js";
@@ -23,9 +23,9 @@ import "../chunk-22CXL7YI.js";
23
23
  import "../chunk-XMSDA5WA.js";
24
24
  import "../chunk-7VMVMC4H.js";
25
25
  import "../chunk-EMODTMHE.js";
26
- import "../chunk-3KW7WC4L.js";
26
+ import "../chunk-CNURORKI.js";
27
27
  import "../chunk-POFBE6ZY.js";
28
- import "../chunk-34JVH6VP.js";
28
+ import "../chunk-V53QYJNY.js";
29
29
  import "../chunk-DZLLKJJT.js";
30
30
  import "../chunk-4OX4SJGA.js";
31
31
  import "../chunk-H6CL3T2S.js";
@@ -4,8 +4,8 @@ import {
4
4
  } from "../chunk-S4HS6VTI.js";
5
5
  import {
6
6
  TRANSCRIPT_SYNC_NOTICE
7
- } from "../chunk-7PJLQRRM.js";
8
- import "../chunk-MDIBO7U7.js";
7
+ } from "../chunk-MLOYBLO4.js";
8
+ import "../chunk-V7CS72Q5.js";
9
9
  import "../chunk-TKFNIDZK.js";
10
10
  import "../chunk-XWYCFODT.js";
11
11
  import {
@@ -40,7 +40,7 @@ import {
40
40
  transcriptEnvironmentPreference,
41
41
  transcriptsEnabled
42
42
  } from "../chunk-7VMVMC4H.js";
43
- import "../chunk-34JVH6VP.js";
43
+ import "../chunk-V53QYJNY.js";
44
44
  import "../chunk-DZLLKJJT.js";
45
45
  import "../chunk-4OX4SJGA.js";
46
46
  import "../chunk-H6CL3T2S.js";
@@ -24,16 +24,16 @@ import {
24
24
  } from "../chunk-QQHUUPPW.js";
25
25
  import {
26
26
  phoneStartFellShortLine
27
- } from "../chunk-7PJLQRRM.js";
27
+ } from "../chunk-MLOYBLO4.js";
28
28
  import {
29
29
  ensureCodexTrustAfterReapply,
30
30
  reapplyAllAgents
31
- } from "../chunk-5GE7PKK4.js";
31
+ } from "../chunk-G3G7DWR3.js";
32
32
  import {
33
33
  HERMES_RESTART_COMMAND,
34
34
  describeCodexTrustConfirmation
35
35
  } from "../chunk-KRSZFHNS.js";
36
- import "../chunk-MDIBO7U7.js";
36
+ import "../chunk-V7CS72Q5.js";
37
37
  import {
38
38
  keepLinuxDaemonAfterLogout,
39
39
  lingerReportOf
@@ -44,7 +44,7 @@ import {
44
44
  import "../chunk-HLWS6ADK.js";
45
45
  import {
46
46
  readMacAppAgentKey
47
- } from "../chunk-EECOWW5X.js";
47
+ } from "../chunk-K7MVCPH5.js";
48
48
  import "../chunk-TKFNIDZK.js";
49
49
  import "../chunk-KP6FVUCC.js";
50
50
  import {
@@ -54,12 +54,12 @@ import {
54
54
  fxServerHolder,
55
55
  inspectFxPusharyHttpWiring,
56
56
  macAppFxBridge
57
- } from "../chunk-Z5OFTJGZ.js";
57
+ } from "../chunk-ZDOTNMGL.js";
58
58
  import {
59
59
  retryAgentCommand
60
60
  } from "../chunk-XWYCFODT.js";
61
- import "../chunk-TYQITMXN.js";
62
- import "../chunk-G562FBHB.js";
61
+ import "../chunk-EGUT2MWV.js";
62
+ import "../chunk-SYZF5SDG.js";
63
63
  import {
64
64
  exitOnHelpFlag
65
65
  } from "../chunk-QESEICW4.js";
@@ -81,7 +81,7 @@ import {
81
81
  readAutoUpdateState,
82
82
  updateAutoUpdateState
83
83
  } from "../chunk-MOYEHNFP.js";
84
- import "../chunk-CZCLJXUA.js";
84
+ import "../chunk-5RSM5DRT.js";
85
85
  import {
86
86
  DAEMON_COLD_START_TIMEOUT_MS,
87
87
  daemonHasRemoteProof,
@@ -96,15 +96,15 @@ import {
96
96
  waitForDaemonRemoteProof
97
97
  } from "../chunk-ZF4CPOO7.js";
98
98
  import "../chunk-3VOUWGFF.js";
99
- import "../chunk-KY6AHZ2P.js";
99
+ import "../chunk-QGJK3NAR.js";
100
100
  import "../chunk-7QWH257P.js";
101
101
  import "../chunk-53KLGXFL.js";
102
102
  import "../chunk-MH5BRZOQ.js";
103
103
  import "../chunk-YPY4YCIZ.js";
104
104
  import "../chunk-EMODTMHE.js";
105
- import "../chunk-3KW7WC4L.js";
105
+ import "../chunk-CNURORKI.js";
106
106
  import "../chunk-POFBE6ZY.js";
107
- import "../chunk-34JVH6VP.js";
107
+ import "../chunk-V53QYJNY.js";
108
108
  import "../chunk-DZLLKJJT.js";
109
109
  import "../chunk-4OX4SJGA.js";
110
110
  import "../chunk-H6CL3T2S.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readMacAppAgentKey
3
- } from "./chunk-EECOWW5X.js";
3
+ } from "./chunk-K7MVCPH5.js";
4
4
  import {
5
5
  API_KEYS_PATH
6
6
  } from "./chunk-TKFNIDZK.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-KY6AHZ2P.js";
3
+ } from "./chunk-QGJK3NAR.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -536,7 +536,7 @@ var loadedOnce = (load) => {
536
536
  };
537
537
 
538
538
  // src/codex-desktop-proxy.ts
539
- var loadThePhone = () => import("./api-JR3YAO4I.js");
539
+ var loadThePhone = () => import("./api-2YC2KSIM.js");
540
540
  var loadTheCardRouting = () => import("./codex-card-routing-I6YOJBTT.js");
541
541
  var theFirstCardLoadsAgain = () => {
542
542
  };
@@ -1097,7 +1097,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1097
1097
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1098
1098
  }
1099
1099
  if (args[0] === APP_CARDS_FLAG) {
1100
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-FAWUGM7P.js");
1100
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-EGUHSLTG.js");
1101
1101
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1102
1102
  }
1103
1103
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3VOUWGFF.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT
7
- } from "./chunk-KY6AHZ2P.js";
7
+ } from "./chunk-QGJK3NAR.js";
8
8
  import {
9
9
  compatibleToolLookup
10
10
  } from "./chunk-7QWH257P.js";
@@ -3,10 +3,12 @@ import {
3
3
  isDisabledByEnv
4
4
  } from "./chunk-POFBE6ZY.js";
5
5
  import {
6
+ McpHttpError,
6
7
  McpToolError,
7
8
  SubscriptionRequiredError,
8
- callMcpTool
9
- } from "./chunk-34JVH6VP.js";
9
+ callMcpTool,
10
+ isRetryable
11
+ } from "./chunk-V53QYJNY.js";
10
12
  import {
11
13
  installNetworkDefaults,
12
14
  isNetworkFailure
@@ -239,6 +241,31 @@ var nextLongPollMs = (deadlineMs, nowMs) => {
239
241
  return hold >= MIN_LONG_POLL_MS ? hold : null;
240
242
  };
241
243
  var ABANDONED_WAIT = { answered: false, status: "abandoned" };
244
+ var PASSING_CLIENT_ERRORS = /* @__PURE__ */ new Set([408, 429]);
245
+ var FIRST_SERVER_ERROR = 500;
246
+ var MAX_WAIT_RETRY_PAUSE_MS = 15e3;
247
+ var isPassingHttpStatus = (status) => status >= FIRST_SERVER_ERROR || PASSING_CLIENT_ERRORS.has(status);
248
+ var DROPPED_CONNECTION_CODES = /* @__PURE__ */ new Set(["UND_ERR_SOCKET", "UND_ERR_CLOSED", "ECONNRESET", "EPIPE"]);
249
+ var DROPPED_RESPONSE_MESSAGE = "terminated";
250
+ var causeCodeOf = (error) => {
251
+ const { cause } = error;
252
+ return typeof cause === "object" && cause !== null && "code" in cause && typeof cause.code === "string" ? cause.code : null;
253
+ };
254
+ var isDroppedConnection = (error) => {
255
+ if (!(error instanceof Error)) return false;
256
+ const code = causeCodeOf(error);
257
+ return error.message === DROPPED_RESPONSE_MESSAGE || code !== null && DROPPED_CONNECTION_CODES.has(code);
258
+ };
259
+ var isTransientWaitFailure = (error) => {
260
+ if (error instanceof McpHttpError) return isPassingHttpStatus(error.status);
261
+ if (error instanceof SubscriptionRequiredError || error instanceof McpToolError) return false;
262
+ return isRetryable(error) || isDroppedConnection(error);
263
+ };
264
+ var waitRetryPauseMs = (failures, pollInterval) => Math.min(pollInterval * 2 ** Math.max(0, failures - 1), MAX_WAIT_RETRY_PAUSE_MS);
265
+ var withdrawAfterAFailedPoll = async (apiKey, correlationId) => {
266
+ const late = await withdrawQuestion(apiKey, correlationId);
267
+ return late.answered ? late : STOPPED;
268
+ };
242
269
  var sleepUnlessAborted = (ms, signal) => new Promise((resolve) => {
243
270
  const wake = () => {
244
271
  clearTimeout(timer);
@@ -250,6 +277,8 @@ var sleepUnlessAborted = (ms, signal) => new Promise((resolve) => {
250
277
  });
251
278
  var boundedBy = (timeoutMs, signal) => signal ? AbortSignal.any([AbortSignal.timeout(timeoutMs), signal]) : AbortSignal.timeout(timeoutMs);
252
279
  var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3, signal) => {
280
+ let failures = 0;
281
+ let waitedThroughAnOutage = false;
253
282
  while (Date.now() < deadlineMs) {
254
283
  if (signal?.aborted) return ABANDONED_WAIT;
255
284
  const hold = nextLongPollMs(deadlineMs, Date.now());
@@ -260,17 +289,21 @@ var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3
260
289
  let answer;
261
290
  try {
262
291
  answer = await waitForAnswer(apiKey, correlationId, hold, boundedBy(Math.max(1, deadlineMs - Date.now()), signal));
263
- } catch {
292
+ } catch (error) {
264
293
  if (signal?.aborted) return ABANDONED_WAIT;
265
- const late = await withdrawQuestion(apiKey, correlationId);
266
- return late.answered ? late : STOPPED;
294
+ if (!isTransientWaitFailure(error)) return withdrawAfterAFailedPoll(apiKey, correlationId);
295
+ failures += 1;
296
+ waitedThroughAnOutage = true;
297
+ await sleepUnlessAborted(Math.min(waitRetryPauseMs(failures, pollInterval), Math.max(0, deadlineMs - Date.now())), signal);
298
+ continue;
267
299
  }
300
+ failures = 0;
268
301
  if (isDecisionStopped(answer) || answer.answered) return answer;
269
302
  if (answer.status === "expired") return STOPPED;
270
303
  await sleepUnlessAborted(Math.min(pollInterval, Math.max(0, deadlineMs - Date.now())), signal);
271
304
  }
272
305
  if (signal?.aborted) return ABANDONED_WAIT;
273
- return withdrawQuestion(apiKey, correlationId);
306
+ return waitedThroughAnOutage ? withdrawAfterAFailedPoll(apiKey, correlationId) : withdrawQuestion(apiKey, correlationId);
274
307
  };
275
308
  var cancelQuestion = async (apiKey, correlationId, signal, baseUrl) => {
276
309
  return callMcpTool(apiKey, "cancel_question", { correlationId }, { signal, timeoutMs: 4e3, maxRetries: 1, baseUrl });
@@ -345,6 +378,8 @@ export {
345
378
  WAIT_RESPONSE_GRACE_MS,
346
379
  nextLongPollMs,
347
380
  ABANDONED_WAIT,
381
+ isTransientWaitFailure,
382
+ waitRetryPauseMs,
348
383
  pollForAnswer,
349
384
  cancelQuestion,
350
385
  withdrawQuestion,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-CZCLJXUA.js";
4
+ } from "./chunk-5RSM5DRT.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
7
  } from "./chunk-3VOUWGFF.js";
@@ -4,7 +4,7 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-KY6AHZ2P.js";
7
+ } from "./chunk-QGJK3NAR.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-34JVH6VP.js";
3
+ } from "./chunk-V53QYJNY.js";
4
4
  import {
5
5
  fetchAsCredential
6
6
  } from "./chunk-YCU7Y77H.js";
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-5N6Q5XGF.js";
12
+ } from "./chunk-44Z6MQZ2.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
@@ -16,7 +16,7 @@ import {
16
16
  macAppFxBridge,
17
17
  refreshClineKey,
18
18
  switchFxHttpEntryToBridge
19
- } from "./chunk-Z5OFTJGZ.js";
19
+ } from "./chunk-ZDOTNMGL.js";
20
20
  import {
21
21
  OPENCODE_HOOK_BINARY,
22
22
  agentHookOwner,
@@ -28,7 +28,7 @@ import {
28
28
  openCodePluginDir,
29
29
  openCodeWired,
30
30
  withOpenCodeAskRules
31
- } from "./chunk-G562FBHB.js";
31
+ } from "./chunk-SYZF5SDG.js";
32
32
  import {
33
33
  detectClaudeVersion
34
34
  } from "./chunk-UIZE4YMU.js";
@@ -37,7 +37,7 @@ import {
37
37
  compatibleConfigFile,
38
38
  compatibleInstructionsFile,
39
39
  hasCompatibleHooks
40
- } from "./chunk-CZCLJXUA.js";
40
+ } from "./chunk-5RSM5DRT.js";
41
41
  import {
42
42
  GEMINI_HOOK_BINARY,
43
43
  addGeminiHooks,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-G562FBHB.js";
3
+ } from "./chunk-SYZF5SDG.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-CYTPQDQY.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-CZCLJXUA.js";
9
+ } from "./chunk-5RSM5DRT.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-G562FBHB.js";
3
+ } from "./chunk-SYZF5SDG.js";
4
4
  import {
5
5
  keyPrefix
6
6
  } from "./chunk-HIIXYZYV.js";
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-MDIBO7U7.js";
15
+ } from "./chunk-V7CS72Q5.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-MDIBO7U7.js";
3
+ } from "./chunk-V7CS72Q5.js";
4
4
  import {
5
5
  canChangeApprovalSettings
6
6
  } from "./chunk-TKFNIDZK.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  callDecisionStore,
3
3
  identifyingToolInput
4
- } from "./chunk-KY6AHZ2P.js";
4
+ } from "./chunk-QGJK3NAR.js";
5
5
  import {
6
6
  canonicalJson
7
7
  } from "./chunk-IG7NGXBS.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-TKYGEPBH.js";
4
+ } from "./chunk-42DRRA6N.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
9
  waitForQuestion
10
- } from "./chunk-3KW7WC4L.js";
10
+ } from "./chunk-CNURORKI.js";
11
11
  import {
12
12
  SubscriptionRequiredError
13
- } from "./chunk-34JVH6VP.js";
13
+ } from "./chunk-V53QYJNY.js";
14
14
  import {
15
15
  getMachineId
16
16
  } from "./chunk-4Z7YVVKQ.js";
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-LTPKSJWY.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-CZCLJXUA.js";
10
+ } from "./chunk-5RSM5DRT.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-3KW7WC4L.js";
13
+ } from "./chunk-CNURORKI.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
@@ -39,11 +39,11 @@ import {
39
39
  reportClientError,
40
40
  sendNotification,
41
41
  waitForAnswer
42
- } from "./chunk-3KW7WC4L.js";
42
+ } from "./chunk-CNURORKI.js";
43
43
  import {
44
44
  isRetryable,
45
45
  withRetry
46
- } from "./chunk-34JVH6VP.js";
46
+ } from "./chunk-V53QYJNY.js";
47
47
  import {
48
48
  RETRY_ACK,
49
49
  readCommandAck,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-CZCLJXUA.js";
3
+ } from "./chunk-5RSM5DRT.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands