pushary 1.9.138 → 1.9.140

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 (134) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/data/vscode-plugin/README.md +2 -0
  3. package/dist/{api-J4XJ7XWW.js → api-ZV6JN5J3.js} +11 -11
  4. package/dist/bin/pushary-audit.js +3 -3
  5. package/dist/bin/pushary-bell-hook.js +28 -28
  6. package/dist/bin/pushary-bell.js +10 -10
  7. package/dist/bin/pushary-claude.js +27 -27
  8. package/dist/bin/pushary-clean.js +35 -35
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +35 -35
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +29 -29
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +106 -95
  16. package/dist/bin/pushary-disconnect.js +28 -28
  17. package/dist/bin/pushary-display-hook.js +88 -7
  18. package/dist/bin/pushary-doctor.js +43 -43
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +19 -18
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +35 -35
  23. package/dist/bin/pushary-login.js +21 -21
  24. package/dist/bin/pushary-logout.js +27 -27
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +15 -15
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-hook.js +31 -31
  29. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  30. package/dist/bin/pushary-permission-hook.js +35 -35
  31. package/dist/bin/pushary-post-hook.js +28 -28
  32. package/dist/bin/pushary-prompt-hook.js +27 -27
  33. package/dist/bin/pushary-session-end-hook.js +27 -27
  34. package/dist/bin/pushary-session-start-hook.js +36 -36
  35. package/dist/bin/pushary-setup.js +50 -50
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +33 -33
  38. package/dist/bin/pushary-stop-hook.js +27 -27
  39. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  40. package/dist/bin/pushary-suggestions.js +15 -15
  41. package/dist/bin/pushary-transcript-register.js +17 -17
  42. package/dist/bin/pushary-transcripts.js +25 -25
  43. package/dist/bin/pushary-upgrade.js +41 -41
  44. package/dist/bin/pushary-wait.js +15 -15
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-B4UIRMOE.js → chunk-2MELVDYD.js} +2 -2
  47. package/dist/{chunk-SNMTACCY.js → chunk-3FJO3HIA.js} +3 -3
  48. package/dist/{chunk-33E75LIY.js → chunk-3HORJAQX.js} +2 -2
  49. package/dist/{chunk-LIZEMDE4.js → chunk-3TQ4NPFC.js} +3 -3
  50. package/dist/{chunk-QXATIKHQ.js → chunk-4IAFTTNQ.js} +1 -1
  51. package/dist/{chunk-KXKE3SW3.js → chunk-4SMS5DND.js} +3 -3
  52. package/dist/{chunk-52B2TQJM.js → chunk-4YIVV4PY.js} +2 -2
  53. package/dist/{chunk-WM7OY63L.js → chunk-5TPC3M45.js} +4 -5
  54. package/dist/{chunk-VVN3RPV6.js → chunk-6LK6I62M.js} +1 -1
  55. package/dist/{chunk-A2YJ2FBR.js → chunk-6WBHYQ2P.js} +1 -1
  56. package/dist/{chunk-APTNHX63.js → chunk-6Z7VJ65F.js} +5 -5
  57. package/dist/{chunk-Y47BMZUR.js → chunk-7AXEKUXY.js} +1 -1
  58. package/dist/{chunk-P6HLLS5J.js → chunk-7DPPMWTR.js} +2 -2
  59. package/dist/{chunk-DMZMPYLB.js → chunk-7LBMCU3S.js} +4 -4
  60. package/dist/{chunk-YOV3LHOL.js → chunk-7OBROSQL.js} +3 -3
  61. package/dist/{chunk-JFGM6VSU.js → chunk-7TXUHOQW.js} +10 -10
  62. package/dist/{chunk-5XDFQ6E3.js → chunk-7W4XA2WF.js} +1 -1
  63. package/dist/{chunk-DES272QQ.js → chunk-7WLNPGEY.js} +6 -6
  64. package/dist/{chunk-FQ3ASV5L.js → chunk-AQVXXXFZ.js} +4 -4
  65. package/dist/{chunk-FYLYAVQG.js → chunk-AXAO3JF5.js} +3 -12
  66. package/dist/{chunk-KN4YJ4QS.js → chunk-B4KAY45V.js} +30 -22
  67. package/dist/{chunk-L3UV4LLL.js → chunk-BAT4TJOE.js} +8 -8
  68. package/dist/{chunk-R7CQF2P3.js → chunk-BMBWFLIT.js} +1 -1
  69. package/dist/{chunk-RRUP72V6.js → chunk-D7AJ3ZCI.js} +1 -1
  70. package/dist/{chunk-VF4N6NHG.js → chunk-E4MC6B6U.js} +4 -4
  71. package/dist/{chunk-H5XLVJI7.js → chunk-E67Y7DSA.js} +2 -2
  72. package/dist/{chunk-HVRXBHX2.js → chunk-FSDTFT7J.js} +2 -2
  73. package/dist/{chunk-ICQU3SNR.js → chunk-GUVTHNCX.js} +5 -5
  74. package/dist/{chunk-PPCZSOCL.js → chunk-H2EXF6DB.js} +3 -3
  75. package/dist/{chunk-LPXHKIJC.js → chunk-HJFTPNP6.js} +2 -2
  76. package/dist/{chunk-42BVIKPZ.js → chunk-HNN46FYL.js} +4 -4
  77. package/dist/{chunk-MENTZJHA.js → chunk-IEHY7DCR.js} +1 -1
  78. package/dist/{chunk-TN5PGMH5.js → chunk-IJMWFHZZ.js} +2 -2
  79. package/dist/{chunk-FO5MHOBI.js → chunk-JHRJ3KKG.js} +5 -5
  80. package/dist/{chunk-NLJ2ILA7.js → chunk-JYOC6N7C.js} +2 -2
  81. package/dist/{chunk-EHQCMJHI.js → chunk-L7BWJD25.js} +1 -1
  82. package/dist/{chunk-CBTXOWB3.js → chunk-LAAGGP7K.js} +5 -5
  83. package/dist/{chunk-NIBF37NU.js → chunk-LURIPMCB.js} +6 -6
  84. package/dist/{chunk-NUG2A73X.js → chunk-LW7TXMCP.js} +1 -1
  85. package/dist/{chunk-IRIXOH4U.js → chunk-MDRNNK3L.js} +1 -1
  86. package/dist/{chunk-WHOFZB5W.js → chunk-MEFTOIUI.js} +1 -1
  87. package/dist/{chunk-OAGYR5LI.js → chunk-MFRNEOCN.js} +11 -11
  88. package/dist/{chunk-MQMVJDII.js → chunk-MGBYRHT3.js} +1 -1
  89. package/dist/{chunk-N3VCBXI6.js → chunk-MTVAACOE.js} +3 -3
  90. package/dist/{chunk-CULDO4UA.js → chunk-N346VCKX.js} +3 -3
  91. package/dist/{chunk-FJ7OESWX.js → chunk-NBJ7N7KL.js} +5 -5
  92. package/dist/{chunk-S47AAQFT.js → chunk-O55PACNP.js} +4 -4
  93. package/dist/{chunk-VQMGR32B.js → chunk-O66URN57.js} +3 -3
  94. package/dist/{chunk-NNDUDXOJ.js → chunk-OZY4EU6V.js} +11 -11
  95. package/dist/{chunk-O26H5X5M.js → chunk-PHZYLAHL.js} +2 -2
  96. package/dist/{chunk-TXPXK5Q6.js → chunk-QAT2PWRX.js} +16 -16
  97. package/dist/{chunk-DL67HX3D.js → chunk-QCIZDJSU.js} +322 -178
  98. package/dist/{chunk-AGVE7MXF.js → chunk-QDQHIQWH.js} +2 -2
  99. package/dist/{chunk-LNF36PTF.js → chunk-RACM64B6.js} +2 -2
  100. package/dist/{chunk-PNVTPEO5.js → chunk-RQPVEBKR.js} +3 -3
  101. package/dist/{chunk-6TK3DWSF.js → chunk-RVKCG7DK.js} +6 -6
  102. package/dist/{chunk-LF3ZRLUQ.js → chunk-S6LB3SZE.js} +12 -12
  103. package/dist/{chunk-K7YJBVR3.js → chunk-S7DTAH7Q.js} +1 -1
  104. package/dist/{chunk-YQQGIDBC.js → chunk-SANGITZF.js} +1 -1
  105. package/dist/{chunk-PNDL3OMR.js → chunk-SQB57AJR.js} +4 -4
  106. package/dist/{chunk-5ZK4RHYR.js → chunk-SSAGWDBN.js} +3 -3
  107. package/dist/{chunk-DK6CMXYI.js → chunk-T5GZUMBP.js} +5 -5
  108. package/dist/{chunk-KYD3LHFB.js → chunk-TA3YQY6I.js} +1 -1
  109. package/dist/{chunk-P7YVVWTW.js → chunk-TJX25WUQ.js} +2 -2
  110. package/dist/{chunk-TJCUGBCZ.js → chunk-TRCJWAZD.js} +6 -6
  111. package/dist/{chunk-B3AZPYRU.js → chunk-UGU566AU.js} +6 -6
  112. package/dist/{chunk-KTVMIG32.js → chunk-UH25VEQI.js} +4 -4
  113. package/dist/{chunk-LIUWN23V.js → chunk-UHB7G2XC.js} +5 -5
  114. package/dist/{chunk-U3OLXV5Z.js → chunk-ULRZGJSL.js} +2 -2
  115. package/dist/{chunk-EJSU5YWO.js → chunk-V5VSSRV6.js} +6 -6
  116. package/dist/{chunk-OXPYENHL.js → chunk-XJ6CRGD2.js} +4 -4
  117. package/dist/{chunk-IKBTG3OT.js → chunk-Y7LBB6YM.js} +1 -1
  118. package/dist/{chunk-ZWURBNA3.js → chunk-YB7V6V6O.js} +1 -1
  119. package/dist/{chunk-7WR3FDDX.js → chunk-YD3PTYOT.js} +37 -33
  120. package/dist/{chunk-IDGWQY3J.js → chunk-YIIGX653.js} +5 -5
  121. package/dist/{codex-app-cards-switch-R3MIDYFA.js → codex-app-cards-switch-YW4R5WTG.js} +11 -11
  122. package/dist/{codex-card-routing-LQJEJNTS.js → codex-card-routing-5EHXCS7Y.js} +2 -2
  123. package/dist/{codex-desktop-launch-2YRIBVDK.js → codex-desktop-launch-VEPL7OFZ.js} +1 -1
  124. package/dist/{codex-session-launch-CTMTMGHU.js → codex-session-launch-7UKI32XL.js} +20 -20
  125. package/dist/{config-34VUNHK6.js → config-5YVCM3JL.js} +3 -3
  126. package/dist/{global-upgrade-NMTIVAJ3.js → global-upgrade-YNLHN2LI.js} +9 -9
  127. package/dist/{identity-3XKATUN2.js → identity-ZF5BYVAH.js} +4 -4
  128. package/dist/{live-capabilities-MR35FXPF.js → live-capabilities-UDAEQC25.js} +14 -11
  129. package/dist/{paths-YA5ROXGC.js → paths-5CUJRNH3.js} +3 -3
  130. package/dist/{reapply-LIBOIVBT.js → reapply-EHYJUX67.js} +29 -29
  131. package/dist/src/index.js +34 -34
  132. package/dist/{upgrade-lock-LK4XD3HR.js → upgrade-lock-ONZN26ZJ.js} +4 -4
  133. package/dist/{usage-ZSV4LFDL.js → usage-GF3ZBAH4.js} +3 -3
  134. package/package.json +1 -1
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  UNNAMED_ACTION
3
- } from "./chunk-A2YJ2FBR.js";
3
+ } from "./chunk-6WBHYQ2P.js";
4
4
  import {
5
5
  askUser,
6
6
  isAwayPaused,
7
7
  isLocalQuestionHandoff,
8
8
  unavailableQuestionUnlessRefused,
9
9
  waitForQuestion
10
- } from "./chunk-B3AZPYRU.js";
10
+ } from "./chunk-UGU566AU.js";
11
11
  import {
12
12
  getMachineId
13
- } from "./chunk-EHQCMJHI.js";
13
+ } from "./chunk-L7BWJD25.js";
14
14
  import {
15
15
  hookWaitClamped,
16
16
  hookWaitDeadline,
17
17
  scopeBreachReasonOf
18
- } from "./chunk-DL67HX3D.js";
18
+ } from "./chunk-QCIZDJSU.js";
19
19
 
20
20
  // src/pushed-question.ts
21
21
  var scopeQuestionOf = (verdict) => {
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-XMSDA5WA.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-VVN3RPV6.js";
6
+ } from "./chunk-6LK6I62M.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-IKBTG3OT.js";
9
+ } from "./chunk-Y7LBB6YM.js";
10
10
  import {
11
11
  compressTranscriptRecord,
12
12
  redactSecretsFromContent,
13
13
  transcriptRecordPlaintext
14
- } from "./chunk-DL67HX3D.js";
14
+ } from "./chunk-QCIZDJSU.js";
15
15
 
16
16
  // src/transcript-api.ts
17
17
  var providerRecipientSchema = external_exports.object({
@@ -8,13 +8,13 @@ import {
8
8
  } from "./chunk-G66WIAST.js";
9
9
  import {
10
10
  ensureDaemonRunning
11
- } from "./chunk-6TK3DWSF.js";
11
+ } from "./chunk-RVKCG7DK.js";
12
12
  import {
13
13
  hookOwnerOf
14
- } from "./chunk-PNDL3OMR.js";
14
+ } from "./chunk-SQB57AJR.js";
15
15
  import {
16
16
  hookMeaning
17
- } from "./chunk-A2YJ2FBR.js";
17
+ } from "./chunk-6WBHYQ2P.js";
18
18
  import {
19
19
  buildTranscriptRecords,
20
20
  decodePublicKey,
@@ -25,29 +25,29 @@ import {
25
25
  recordSealerFor,
26
26
  uploadTranscriptRecords,
27
27
  wrapSessionKey
28
- } from "./chunk-YOV3LHOL.js";
28
+ } from "./chunk-7OBROSQL.js";
29
29
  import {
30
30
  external_exports
31
31
  } from "./chunk-XMSDA5WA.js";
32
32
  import {
33
33
  transcriptEnvironmentPreference,
34
34
  transcriptsEnabled
35
- } from "./chunk-ZWURBNA3.js";
35
+ } from "./chunk-YB7V6V6O.js";
36
36
  import {
37
37
  fetchAsCredential
38
- } from "./chunk-VVN3RPV6.js";
38
+ } from "./chunk-6LK6I62M.js";
39
39
  import {
40
40
  readTranscriptPreference
41
- } from "./chunk-PNVTPEO5.js";
41
+ } from "./chunk-RQPVEBKR.js";
42
42
  import {
43
43
  claudeConfigDir,
44
44
  codexHome,
45
45
  pusharyDir
46
- } from "./chunk-TN5PGMH5.js";
46
+ } from "./chunk-IJMWFHZZ.js";
47
47
  import {
48
48
  getApiKey,
49
49
  getBaseUrl
50
- } from "./chunk-IKBTG3OT.js";
50
+ } from "./chunk-Y7LBB6YM.js";
51
51
  import {
52
52
  writeJsonAtomic,
53
53
  writeJsonAtomicDurable
@@ -59,7 +59,7 @@ import {
59
59
  isHookSource,
60
60
  isRecord,
61
61
  redactSecretsFromContent
62
- } from "./chunk-DL67HX3D.js";
62
+ } from "./chunk-QCIZDJSU.js";
63
63
 
64
64
  // src/transcript-recipient-pin.ts
65
65
  import { createHash } from "crypto";
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-DL67HX3D.js";
12
+ } from "./chunk-QCIZDJSU.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-EJSU5YWO.js";
3
+ } from "./chunk-V5VSSRV6.js";
4
4
  import {
5
5
  canChangeApprovalSettings
6
- } from "./chunk-52B2TQJM.js";
6
+ } from "./chunk-4YIVV4PY.js";
7
7
  import {
8
8
  matchMacAccountStep,
9
9
  retryAgentCommand
10
- } from "./chunk-LIZEMDE4.js";
10
+ } from "./chunk-3TQ4NPFC.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-MQMVJDII.js";
16
+ } from "./chunk-MGBYRHT3.js";
17
17
 
18
18
  // src/setup/closing.ts
19
19
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -26,10 +26,10 @@ var sendAnotherTestLines = (appPlatforms) => {
26
26
  var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them; authorized Pushary compliance admins can recover them for documented legal obligations. Turn off: ${NPX_LATEST_COMMAND} transcripts off`;
27
27
  var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND} setup --connect app pair the Pushary app on your phone`;
28
28
  var RESTART_AGENTS_LINE = "Restart any open agent sessions so they pick up Pushary.";
29
- var TEAM_OFFER_LINE = "On a team? Send risky steps to a lead and see who approved: pushary.com/teams";
29
+ var TEAM_OFFER_URL = "https://pushary.com/teams?utm_source=cli&utm_medium=setup&utm_campaign=teams";
30
30
  var PLANS_THAT_CAN_MOVE_UP_TO_TEAM = ["agent", "agent_pro"];
31
31
  var canMoveUpToTeam = (plan) => PLANS_THAT_CAN_MOVE_UP_TO_TEAM.some((candidate) => candidate === plan);
32
- var teamOfferLines = (setupSucceeded, plan) => setupSucceeded && canMoveUpToTeam(plan) ? [TEAM_OFFER_LINE] : [];
32
+ var teamOfferLines = (setupSucceeded, plan) => setupSucceeded && canMoveUpToTeam(plan) ? ["On a team? Send risky steps to a lead and see who approved.", TEAM_OFFER_URL] : [];
33
33
  var ANSWERING_DEVICES = {
34
34
  mobile_app: "Your phone",
35
35
  mobile_background: "Your phone",
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-PNDL3OMR.js";
3
+ } from "./chunk-SQB57AJR.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-TN5PGMH5.js";
10
+ } from "./chunk-IJMWFHZZ.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-FYLYAVQG.js";
14
+ } from "./chunk-AXAO3JF5.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-DL67HX3D.js";
24
+ } from "./chunk-QCIZDJSU.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -254,14 +254,6 @@ var resolveGlobalPackageVersion = (name) => {
254
254
  return void 0;
255
255
  }
256
256
  };
257
- var resolveGlobalPackageVersionAsync = async (name, signal) => {
258
- try {
259
- const { stdout } = await runNpmDiscovery("list -g --depth=0 --json --no-workspaces", signal);
260
- return globalPackageVersionIn(stdout, name);
261
- } catch {
262
- return void 0;
263
- }
264
- };
265
257
  var localImportsPresent = (entry, packageDir, seen = /* @__PURE__ */ new Set()) => {
266
258
  if (seen.has(entry)) return true;
267
259
  seen.add(entry);
@@ -415,9 +407,9 @@ var installGlobally = (options) => {
415
407
  }
416
408
  const started = (async () => {
417
409
  if (!npmIsOnPath()) throw new NpmMissingError();
418
- const { withUpgradeLock } = await import("./global-upgrade-NMTIVAJ3.js");
419
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-LK4XD3HR.js");
420
- const { autoUpdateLock } = await import("./paths-YA5ROXGC.js");
410
+ const { withUpgradeLock } = await import("./global-upgrade-YNLHN2LI.js");
411
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-ONZN26ZJ.js");
412
+ const { autoUpdateLock } = await import("./paths-5CUJRNH3.js");
421
413
  let result = "skipped";
422
414
  const install = async () => {
423
415
  const platform = process.platform;
@@ -489,7 +481,6 @@ export {
489
481
  resolveBinary,
490
482
  resolvePackageVersionFromBinary,
491
483
  resolveGlobalPackageVersion,
492
- resolveGlobalPackageVersionAsync,
493
484
  readGlobalFolder,
494
485
  readGlobalCliInstallAt,
495
486
  readGlobalCliInstall,
@@ -531,8 +531,8 @@ var loadedOnce = (load) => {
531
531
  };
532
532
 
533
533
  // src/codex-desktop-proxy.ts
534
- var loadThePhone = () => import("./api-J4XJ7XWW.js");
535
- var loadTheCardRouting = () => import("./codex-card-routing-LQJEJNTS.js");
534
+ var loadThePhone = () => import("./api-ZV6JN5J3.js");
535
+ var loadTheCardRouting = () => import("./codex-card-routing-5EHXCS7Y.js");
536
536
  var theFirstCardLoadsAgain = () => {
537
537
  };
538
538
  var ASKS_WITHOUT_ROUTING = {};
@@ -712,16 +712,14 @@ var CodexAppCards = class {
712
712
  questions = /* @__PURE__ */ new Map();
713
713
  thePhone;
714
714
  theCardRouting;
715
- stoodDown = false;
715
+ closed = false;
716
716
  saidAQuestionWasUnknown = false;
717
717
  timing;
718
718
  standDown() {
719
- this.stoodDown = true;
720
- this.ledger.forgetEverything();
721
719
  void this.close();
722
720
  }
723
721
  fromTheEngine(line) {
724
- if (this.stoodDown) return;
722
+ if (this.closed || this.options.signal.aborted) return;
725
723
  try {
726
724
  if (line.includes(CARD_MARKER)) this.questionShown(parsedLine(line));
727
725
  else if (line.includes(RESOLVED_MARKER)) this.requestResolved(codexRequestResolvedBy(parsedLine(line)));
@@ -731,7 +729,7 @@ var CodexAppCards = class {
731
729
  }
732
730
  keepsFromTheApp(line) {
733
731
  try {
734
- if (this.stoodDown || this.ledger.tracksNothing) return true;
732
+ if (this.closed || this.options.signal.aborted || this.ledger.tracksNothing) return true;
735
733
  const answered = codexRequestAnsweredBy(parsedLine(line));
736
734
  if (answered === null) {
737
735
  this.ledger.appSentALine();
@@ -747,11 +745,16 @@ var CodexAppCards = class {
747
745
  }
748
746
  }
749
747
  async close() {
748
+ this.closed = true;
749
+ this.ledger.forgetEverything();
750
750
  const outstanding = [...this.questions.values()];
751
751
  this.questions.clear();
752
752
  for (const question of outstanding) question.waiting.abort();
753
753
  await Promise.allSettled(outstanding.map((question) => this.cancel(question)));
754
754
  }
755
+ canAnswer(requestId) {
756
+ return !this.closed && !this.options.signal.aborted && this.ledger.isWaiting(requestId);
757
+ }
755
758
  questionShown(message) {
756
759
  const card = codexCardOf(message);
757
760
  if (card) {
@@ -775,14 +778,14 @@ var CodexAppCards = class {
775
778
  async askThePhone(card, toolCall) {
776
779
  try {
777
780
  if (codexAppMayAnswerItself(card)) await pauseUnlessStopped(this.timing.letCodexAnswerFirstMs, this.options.signal);
778
- if (this.options.signal.aborted || !this.ledger.isWaiting(card.requestId)) return;
781
+ if (!this.canAnswer(card.requestId)) return;
779
782
  const account = await this.options.readAccount();
780
783
  if (!account) {
781
784
  this.ledger.leaveWithTheApp(card.requestId);
782
785
  return;
783
786
  }
784
787
  const [phone, routing] = await Promise.all([this.thePhone(), this.cardRoutingFor(toolCall)]);
785
- if (!this.ledger.isWaiting(card.requestId)) return;
788
+ if (!this.canAnswer(card.requestId)) return;
786
789
  const answerableUntil = Date.now() + this.timing.answerWindowMs;
787
790
  const asked = await phone.askUser(account.apiKey, {
788
791
  question: codexCardQuestion(card),
@@ -795,20 +798,20 @@ var CodexAppCards = class {
795
798
  ...routing
796
799
  }, ASK_TIMEOUT_MS, account.baseUrl);
797
800
  const question = { account, correlationId: asked.correlationId, waiting: new AbortController(), answerableUntil };
798
- if (!this.ledger.isWaiting(card.requestId)) {
801
+ if (!this.canAnswer(card.requestId)) {
799
802
  await this.cancel(question);
800
803
  return;
801
804
  }
805
+ this.questions.set(codexRequestKey(card.requestId), question);
802
806
  if (asked.answered) {
803
807
  await this.settle(card, question, asked.value);
804
808
  return;
805
809
  }
806
810
  if (!reachesAPersonAwayFromCodex(phone, asked)) {
807
811
  this.ledger.leaveWithTheApp(card.requestId);
808
- await this.cancel(question);
812
+ this.withdraw(card.requestId);
809
813
  return;
810
814
  }
811
- this.questions.set(codexRequestKey(card.requestId), question);
812
815
  await this.waitForThePhone(phone, card, question);
813
816
  } catch (error) {
814
817
  if (this.ledger.leaveWithTheApp(card.requestId)) {
@@ -820,7 +823,7 @@ var CodexAppCards = class {
820
823
  const { account, correlationId } = question;
821
824
  const stopped = AbortSignal.any([this.options.signal, question.waiting.signal]);
822
825
  let failures = 0;
823
- while (this.ledger.isWaiting(card.requestId) && !stopped.aborted && failures < MAX_CONSECUTIVE_WAIT_FAILURES) {
826
+ while (this.canAnswer(card.requestId) && !stopped.aborted && failures < MAX_CONSECUTIVE_WAIT_FAILURES) {
824
827
  const timeLeft = question.answerableUntil - Date.now();
825
828
  if (timeLeft <= 0) break;
826
829
  let answer;
@@ -832,7 +835,7 @@ var CodexAppCards = class {
832
835
  await pauseUnlessStopped(this.timing.pauseBetweenPollsMs, stopped);
833
836
  continue;
834
837
  }
835
- if (!this.ledger.isWaiting(card.requestId)) return;
838
+ if (!this.canAnswer(card.requestId)) return;
836
839
  if (answer.answered) {
837
840
  await this.settle(card, question, answer.value);
838
841
  return;
@@ -847,14 +850,19 @@ var CodexAppCards = class {
847
850
  if (this.ledger.leaveWithTheApp(card.requestId)) this.withdraw(card.requestId);
848
851
  }
849
852
  async settle(card, question, phoneAnswer) {
850
- this.questions.delete(codexRequestKey(card.requestId));
851
- const decision = codexAppCardDecisionOf(phoneAnswer);
852
- if (this.stoodDown) return;
853
- if (decision === null || !isTheSameAccount(await this.options.readAccount(), question.account)) {
854
- this.ledger.leaveWithTheApp(card.requestId);
855
- return;
853
+ const key = codexRequestKey(card.requestId);
854
+ try {
855
+ const decision = codexAppCardDecisionOf(phoneAnswer);
856
+ if (decision === null || !isTheSameAccount(await this.options.readAccount(), question.account)) {
857
+ this.ledger.leaveWithTheApp(card.requestId);
858
+ return;
859
+ }
860
+ if (!this.canAnswer(card.requestId) || question.waiting.signal.aborted) return;
861
+ if (this.questions.get(key) !== question) return;
862
+ if (this.ledger.settleOnThePhone(card.requestId)) this.options.reply(codexCardReply(card, decision));
863
+ } finally {
864
+ if (this.questions.get(key) === question) this.questions.delete(key);
856
865
  }
857
- if (this.ledger.settleOnThePhone(card.requestId)) this.options.reply(codexCardReply(card, decision));
858
866
  }
859
867
  withdraw(requestId) {
860
868
  const key = codexRequestKey(requestId);
@@ -1085,7 +1093,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1085
1093
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1086
1094
  }
1087
1095
  if (args[0] === APP_CARDS_FLAG) {
1088
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-R3MIDYFA.js");
1096
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-YW4R5WTG.js");
1089
1097
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1090
1098
  }
1091
1099
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
3
- } from "./chunk-LPXHKIJC.js";
3
+ } from "./chunk-HJFTPNP6.js";
4
4
  import {
5
5
  declinedAgentsFile,
6
6
  readDeclinedAgents
7
- } from "./chunk-P7YVVWTW.js";
7
+ } from "./chunk-TJX25WUQ.js";
8
8
  import {
9
9
  OPENCODE_HOOK_BINARY,
10
10
  openCodeConfigDir,
11
11
  openCodePluginArgv,
12
12
  openCodePluginFile
13
- } from "./chunk-ICQU3SNR.js";
13
+ } from "./chunk-GUVTHNCX.js";
14
14
  import {
15
15
  liveCursorGateCoverage
16
- } from "./chunk-FQ3ASV5L.js";
16
+ } from "./chunk-AQVXXXFZ.js";
17
17
  import {
18
18
  compatibleConfigFile,
19
19
  compatibleHookEvents,
20
20
  grokHome,
21
21
  parseConfigDocument
22
- } from "./chunk-APTNHX63.js";
22
+ } from "./chunk-6Z7VJ65F.js";
23
23
  import {
24
24
  DEFAULT_HOOKS_KEY_PATH,
25
25
  GEMINI_HOOK_BINARY,
26
26
  GEMINI_HOOK_EVENTS,
27
27
  hooksAt
28
- } from "./chunk-PNDL3OMR.js";
28
+ } from "./chunk-SQB57AJR.js";
29
29
  import {
30
30
  CODEX_EARLIER_APPROVAL_MATCHERS,
31
31
  CODEX_HOOK_BINARY,
@@ -53,7 +53,7 @@ import {
53
53
  parseHookArgv,
54
54
  parseHookCommand,
55
55
  supportedClaudeEvents
56
- } from "./chunk-TN5PGMH5.js";
56
+ } from "./chunk-IJMWFHZZ.js";
57
57
  import {
58
58
  readRegularJsonFile,
59
59
  readRegularTextFile
@@ -67,7 +67,7 @@ import {
67
67
  OPENCODE_APPROVAL_EVENT,
68
68
  isRecord,
69
69
  matcherMatchesEveryCall
70
- } from "./chunk-DL67HX3D.js";
70
+ } from "./chunk-QCIZDJSU.js";
71
71
 
72
72
  // src/hook-wiring.ts
73
73
  import { createHash } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  RETRY_ACK,
6
6
  refusedReceiptMessage
7
- } from "./chunk-Y47BMZUR.js";
7
+ } from "./chunk-7AXEKUXY.js";
8
8
 
9
9
  // src/command-receipts.ts
10
10
  import { randomUUID } from "crypto";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-BG4HHB7E.js";
8
8
  import {
9
9
  redactSecretsFromContent
10
- } from "./chunk-DL67HX3D.js";
10
+ } from "./chunk-QCIZDJSU.js";
11
11
 
12
12
  // src/cli/json.ts
13
13
  var writeStdoutFully = (text) => new Promise((resolve, reject) => {
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-APTNHX63.js";
4
+ } from "./chunk-6Z7VJ65F.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-PNDL3OMR.js";
7
+ } from "./chunk-SQB57AJR.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-TN5PGMH5.js";
11
+ } from "./chunk-IJMWFHZZ.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-DL67HX3D.js";
14
+ } from "./chunk-QCIZDJSU.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-TN5PGMH5.js";
3
+ } from "./chunk-IJMWFHZZ.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-TODDEIYG.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-DL67HX3D.js";
9
+ } from "./chunk-QCIZDJSU.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  callDecisionStore,
3
3
  identifyingToolInput
4
- } from "./chunk-LF3ZRLUQ.js";
4
+ } from "./chunk-S6LB3SZE.js";
5
5
  import {
6
6
  canonicalJson
7
- } from "./chunk-TN5PGMH5.js";
7
+ } from "./chunk-IJMWFHZZ.js";
8
8
 
9
9
  // src/phone-approval.ts
10
10
  import { createHash } from "crypto";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-APTNHX63.js";
3
+ } from "./chunk-6Z7VJ65F.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands
7
- } from "./chunk-PNDL3OMR.js";
7
+ } from "./chunk-SQB57AJR.js";
8
8
  import {
9
9
  AGENT_CHOICES
10
- } from "./chunk-5XDFQ6E3.js";
10
+ } from "./chunk-7W4XA2WF.js";
11
11
  import {
12
12
  bridgeStub,
13
13
  claudeSettings,
@@ -19,7 +19,7 @@ import {
19
19
  resolveBridgeStub,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-TN5PGMH5.js";
22
+ } from "./chunk-IJMWFHZZ.js";
23
23
  import {
24
24
  readJsonSafe
25
25
  } from "./chunk-TODDEIYG.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-DL67HX3D.js";
32
+ } from "./chunk-QCIZDJSU.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-AGVE7MXF.js";
3
+ } from "./chunk-QDQHIQWH.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-LIZEMDE4.js";
6
+ } from "./chunk-3TQ4NPFC.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-MQMVJDII.js";
9
+ } from "./chunk-MGBYRHT3.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  claudeConfigDir
3
- } from "./chunk-TN5PGMH5.js";
3
+ } from "./chunk-IJMWFHZZ.js";
4
4
  import {
5
5
  claudePermissionRulesFromSettings
6
- } from "./chunk-DL67HX3D.js";
6
+ } from "./chunk-QCIZDJSU.js";
7
7
 
8
8
  // src/claude-permission-rules.ts
9
9
  import { readFileSync, statSync } from "fs";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-ICQU3SNR.js";
3
+ } from "./chunk-GUVTHNCX.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-CYTPQDQY.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-APTNHX63.js";
9
+ } from "./chunk-6Z7VJ65F.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-TN5PGMH5.js";
14
+ } from "./chunk-IJMWFHZZ.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
- } from "./chunk-DL67HX3D.js";
17
+ } from "./chunk-QCIZDJSU.js";
18
18
 
19
19
  // src/vscode-config.ts
20
20
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-PNVTPEO5.js";
3
+ } from "./chunk-RQPVEBKR.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -3,7 +3,7 @@ import {
3
3
  formatVersion,
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted
6
- } from "./chunk-FYLYAVQG.js";
6
+ } from "./chunk-AXAO3JF5.js";
7
7
  import {
8
8
  writeFileAtomic
9
9
  } from "./chunk-TODDEIYG.js";
@@ -20,7 +20,7 @@ import {
20
20
  PRETOOLUSE_GATED_TOOLS,
21
21
  PUSHARY_TOOL_PREFIX,
22
22
  withHookHoldBudget
23
- } from "./chunk-DL67HX3D.js";
23
+ } from "./chunk-QCIZDJSU.js";
24
24
 
25
25
  // src/setup/paths.ts
26
26
  import { createHash as createHash2 } from "crypto";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-NUG2A73X.js";
4
+ } from "./chunk-LW7TXMCP.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
9
  waitForQuestion
10
- } from "./chunk-B3AZPYRU.js";
10
+ } from "./chunk-UGU566AU.js";
11
11
  import {
12
12
  SubscriptionRequiredError
13
- } from "./chunk-DK6CMXYI.js";
13
+ } from "./chunk-T5GZUMBP.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-EHQCMJHI.js";
16
+ } from "./chunk-L7BWJD25.js";
17
17
  import {
18
18
  ASK_CONTEXT_MAX,
19
19
  agentQuestionContext,
@@ -23,7 +23,7 @@ import {
23
23
  plainAskOf,
24
24
  questionsShownAsASet,
25
25
  shouldDeferToNativeMode
26
- } from "./chunk-DL67HX3D.js";
26
+ } from "./chunk-QCIZDJSU.js";
27
27
 
28
28
  // src/native-defer.ts
29
29
  var nativeDeferOptions = () => {
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-CYTPQDQY.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-FYLYAVQG.js";
6
+ } from "./chunk-AXAO3JF5.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-DL67HX3D.js";
9
+ } from "./chunk-QCIZDJSU.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";