pushary 1.9.56 → 1.9.58

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 (119) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{api-JHBUZ7CV.js → api-WVXBM4MR.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +27 -27
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +26 -26
  6. package/dist/bin/pushary-clean.js +49 -46
  7. package/dist/bin/pushary-codex-bridge.js +21 -21
  8. package/dist/bin/pushary-codex-hook.js +32 -32
  9. package/dist/bin/pushary-codex-session.js +10 -8
  10. package/dist/bin/pushary-codex.js +14 -14
  11. package/dist/bin/pushary-connect.js +27 -26
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +37 -37
  14. package/dist/bin/pushary-disconnect.js +26 -26
  15. package/dist/bin/pushary-doctor.js +41 -39
  16. package/dist/bin/pushary-elicitation-hook.js +27 -27
  17. package/dist/bin/pushary-gemini-bridge.js +15 -15
  18. package/dist/bin/pushary-gemini-hook.js +29 -29
  19. package/dist/bin/pushary-hook.js +31 -31
  20. package/dist/bin/pushary-login.js +13 -13
  21. package/dist/bin/pushary-logout.js +26 -26
  22. package/dist/bin/pushary-mcp.js +11 -11
  23. package/dist/bin/pushary-mode.js +13 -13
  24. package/dist/bin/pushary-notification-hook.js +26 -26
  25. package/dist/bin/pushary-opencode-hook.js +28 -28
  26. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  27. package/dist/bin/pushary-permission-hook.js +30 -30
  28. package/dist/bin/pushary-post-hook.js +26 -26
  29. package/dist/bin/pushary-prompt-hook.js +26 -26
  30. package/dist/bin/pushary-session-end-hook.js +26 -26
  31. package/dist/bin/pushary-session-start-hook.js +33 -33
  32. package/dist/bin/pushary-setup.js +65 -268
  33. package/dist/bin/pushary-stats.js +5 -5
  34. package/dist/bin/pushary-status.js +32 -30
  35. package/dist/bin/pushary-stop-hook.js +26 -26
  36. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  37. package/dist/bin/pushary-suggestions.js +13 -13
  38. package/dist/bin/pushary-transcript-register.js +18 -18
  39. package/dist/bin/pushary-transcripts.js +7 -7
  40. package/dist/bin/pushary-upgrade.js +107 -58
  41. package/dist/bin/pushary-wait.js +13 -13
  42. package/dist/bin/pushary.js +7 -7
  43. package/dist/{chunk-DWV3LTUH.js → chunk-3KOPY2UQ.js} +3 -3
  44. package/dist/{chunk-X5FHQMUL.js → chunk-3TJLPABQ.js} +3 -3
  45. package/dist/{chunk-OCYOOGXW.js → chunk-3WNOO7BM.js} +4 -4
  46. package/dist/{chunk-FJ7ZMR4N.js → chunk-4JJ3T7IE.js} +94 -15
  47. package/dist/{chunk-LTCNAIY2.js → chunk-4LUPZ347.js} +2 -2
  48. package/dist/{chunk-V2AMLVMD.js → chunk-4YNNAF53.js} +2 -2
  49. package/dist/{chunk-32MSOGMD.js → chunk-5DZHKNBU.js} +3 -3
  50. package/dist/{chunk-T4IAMIX4.js → chunk-5SFM6XB4.js} +1 -1
  51. package/dist/{chunk-WW266XKU.js → chunk-7RZO6VWD.js} +2 -2
  52. package/dist/{chunk-VZ3YPEMG.js → chunk-ATUZX4K7.js} +3 -3
  53. package/dist/{chunk-4US3BCQJ.js → chunk-C3IWX6KU.js} +1 -1
  54. package/dist/{chunk-AKFTQT7P.js → chunk-CK5BCFQF.js} +2 -2
  55. package/dist/{chunk-ILQARYXK.js → chunk-CSQJCXPX.js} +5 -5
  56. package/dist/chunk-CZULJ647.js +378 -0
  57. package/dist/{chunk-J5HQNZXQ.js → chunk-DQ565WFA.js} +5 -5
  58. package/dist/{chunk-ZMRO6ESW.js → chunk-ECJJKDP7.js} +1 -1
  59. package/dist/chunk-FAGDOPQI.js +266 -0
  60. package/dist/{chunk-WACFIQYA.js → chunk-GZL3KEPC.js} +51 -25
  61. package/dist/{chunk-MVW5WS6F.js → chunk-HRHAZ3GE.js} +36 -28
  62. package/dist/{chunk-GWQ6T6JV.js → chunk-HUWLEVL2.js} +5 -5
  63. package/dist/{chunk-5HMYW5W2.js → chunk-I43PY5G3.js} +1 -1
  64. package/dist/{chunk-SMMDQXI2.js → chunk-IJ6XKKQW.js} +1 -1
  65. package/dist/{chunk-YBE2KH2U.js → chunk-IRZ5FVWG.js} +3 -3
  66. package/dist/{chunk-M6DTXZQK.js → chunk-IUOUNRLH.js} +2 -2
  67. package/dist/{chunk-FXW3FW4A.js → chunk-JSQOHMNJ.js} +1 -1
  68. package/dist/{chunk-FLUKEZMH.js → chunk-JYXIARGW.js} +1 -1
  69. package/dist/{chunk-QWUWQBIJ.js → chunk-JZKEC4XJ.js} +5 -2
  70. package/dist/{chunk-6PUHW2FP.js → chunk-K5CAURU5.js} +4 -4
  71. package/dist/{chunk-FBFPQLJG.js → chunk-KIH5BDH5.js} +2 -7
  72. package/dist/{chunk-74DKFWU2.js → chunk-KSVCCSAO.js} +5 -5
  73. package/dist/{chunk-ECQNBLPS.js → chunk-KW6EYFZV.js} +14 -369
  74. package/dist/{chunk-MWBFB7WA.js → chunk-LVDC3RUE.js} +1 -1
  75. package/dist/{chunk-7QAL23TB.js → chunk-LVWXRXT7.js} +1 -1
  76. package/dist/{chunk-L66VPBS5.js → chunk-M7NX25ZA.js} +1 -1
  77. package/dist/{chunk-KWAOOXSD.js → chunk-MCHOBQHE.js} +5 -5
  78. package/dist/{chunk-57EOP757.js → chunk-MYBCXDIL.js} +4 -2
  79. package/dist/{chunk-LW4ZEC3A.js → chunk-N3NSWWNU.js} +1 -1
  80. package/dist/{chunk-HR3DJWP2.js → chunk-OHD35NPC.js} +2 -2
  81. package/dist/{chunk-PI2WWZQQ.js → chunk-PZOFPAPG.js} +2 -2
  82. package/dist/{chunk-4OXULVUA.js → chunk-QDFLBTUP.js} +1 -1
  83. package/dist/{chunk-DUACX6E3.js → chunk-QP3XPS5U.js} +11 -7
  84. package/dist/{chunk-G63LBV4Y.js → chunk-QTCFEKLJ.js} +1 -1
  85. package/dist/{chunk-724266XT.js → chunk-RF74KBF5.js} +9 -9
  86. package/dist/{chunk-JPTFFZWY.js → chunk-RGQEULXD.js} +11 -11
  87. package/dist/{chunk-5HRXOANL.js → chunk-S54YLXWW.js} +3 -3
  88. package/dist/{chunk-M7ZXKMVX.js → chunk-S5LX25XE.js} +1 -1
  89. package/dist/{chunk-JTQHC3RV.js → chunk-T2AC5VFQ.js} +5 -5
  90. package/dist/{chunk-VRPDHJGB.js → chunk-T2BEIPK2.js} +4 -4
  91. package/dist/{chunk-FFGW45DJ.js → chunk-TN74MUMB.js} +8 -8
  92. package/dist/{chunk-6U3L4K57.js → chunk-UMVVQXAC.js} +2 -2
  93. package/dist/{chunk-DFZTZRKL.js → chunk-VLJ5C6IT.js} +4 -4
  94. package/dist/{chunk-SM2DT5KP.js → chunk-VPZ5K72D.js} +1 -1
  95. package/dist/{chunk-T6GEEMVC.js → chunk-WVP6UQG3.js} +3 -3
  96. package/dist/{chunk-JSS5RG65.js → chunk-WXZN5CS3.js} +2 -2
  97. package/dist/{chunk-I6OGFHJT.js → chunk-X6F4BQEE.js} +5 -5
  98. package/dist/{chunk-HTN7SMKB.js → chunk-XEJV3QSS.js} +76 -29
  99. package/dist/{chunk-AKBFNTJF.js → chunk-XFUKCBPU.js} +10 -10
  100. package/dist/{chunk-OX5EYBOC.js → chunk-XTZHUIGJ.js} +1 -1
  101. package/dist/{chunk-WNVQPGLH.js → chunk-XWY4UW62.js} +4 -4
  102. package/dist/{chunk-S3CQBNUU.js → chunk-XXNT4FGA.js} +1 -1
  103. package/dist/{chunk-MW3DD3S5.js → chunk-ZEHUWE3X.js} +6 -6
  104. package/dist/{chunk-RZF2GIPI.js → chunk-ZJNU32VE.js} +21 -6
  105. package/dist/{chunk-WCPN3GVW.js → chunk-ZL3UR6M5.js} +3 -3
  106. package/dist/{codex-app-cards-switch-7UIGMEUE.js → codex-app-cards-switch-TVKXJWXE.js} +21 -19
  107. package/dist/{codex-desktop-launch-66LZ6R4Y.js → codex-desktop-launch-ROTJEEGF.js} +3 -1
  108. package/dist/{codex-session-launch-3TGHFR7R.js → codex-session-launch-VL6ZQA3N.js} +18 -18
  109. package/dist/{config-OBDZ2CL3.js → config-SYLUYZQE.js} +3 -3
  110. package/dist/global-upgrade-IPWV5PTM.js +34 -0
  111. package/dist/{identity-WJUPU3AK.js → identity-ARPAUNGN.js} +4 -4
  112. package/dist/{live-capabilities-GACO2VB6.js → live-capabilities-EWTRY2HA.js} +4 -4
  113. package/dist/{paths-5PWAQF63.js → paths-IZTNMJAQ.js} +5 -3
  114. package/dist/{reapply-EYPT5EP2.js → reapply-ILKOYYKA.js} +26 -26
  115. package/dist/src/index.js +21 -21
  116. package/dist/{upgrade-lock-G2ZPV7ZO.js → upgrade-lock-ML73QXIG.js} +4 -6
  117. package/dist/{usage-PXBMEKSA.js → usage-OUV76AIY.js} +3 -3
  118. package/package.json +1 -1
  119. package/dist/global-upgrade-6M2UXUUL.js +0 -26
@@ -4,19 +4,19 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-MVW5WS6F.js";
7
+ } from "./chunk-HRHAZ3GE.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-FLUKEZMH.js";
11
+ } from "./chunk-JYXIARGW.js";
12
12
  import {
13
13
  isDeferAnswer,
14
14
  oncePerSession
15
- } from "./chunk-SM2DT5KP.js";
15
+ } from "./chunk-VPZ5K72D.js";
16
16
  import {
17
17
  activeHookSource,
18
18
  activeIdentity
19
- } from "./chunk-WNVQPGLH.js";
19
+ } from "./chunk-XWY4UW62.js";
20
20
  import {
21
21
  DEFAULT_SESSION,
22
22
  UNNAMED_ACTION,
@@ -40,10 +40,10 @@ import {
40
40
  reportEvent,
41
41
  scopePathFor,
42
42
  settleQuestionsForToolUse
43
- } from "./chunk-724266XT.js";
43
+ } from "./chunk-RF74KBF5.js";
44
44
  import {
45
45
  repoKeyFor
46
- } from "./chunk-S3CQBNUU.js";
46
+ } from "./chunk-XXNT4FGA.js";
47
47
  import {
48
48
  askUser,
49
49
  cancelQuestion,
@@ -56,17 +56,17 @@ import {
56
56
  sendNotification,
57
57
  waitForQuestion,
58
58
  waitsForThePhone
59
- } from "./chunk-J5HQNZXQ.js";
59
+ } from "./chunk-DQ565WFA.js";
60
60
  import {
61
61
  getMachineId
62
- } from "./chunk-SMMDQXI2.js";
62
+ } from "./chunk-IJ6XKKQW.js";
63
63
  import {
64
64
  getApiKey,
65
65
  getBaseUrl
66
- } from "./chunk-MWBFB7WA.js";
66
+ } from "./chunk-LVDC3RUE.js";
67
67
  import {
68
68
  NPX_LATEST_COMMAND
69
- } from "./chunk-T4IAMIX4.js";
69
+ } from "./chunk-5SFM6XB4.js";
70
70
  import {
71
71
  AGENT_QUESTION_STRATEGY,
72
72
  AGENT_QUESTION_TOOL,
@@ -111,7 +111,7 @@ import {
111
111
  resolveGate,
112
112
  timeoutActionWithoutLocalPrompt,
113
113
  unansweredRefusalReason
114
- } from "./chunk-WACFIQYA.js";
114
+ } from "./chunk-GZL3KEPC.js";
115
115
 
116
116
  // src/claude-permission-rules.ts
117
117
  import { readFileSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-32MSOGMD.js";
3
+ } from "./chunk-5DZHKNBU.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-MWBFB7WA.js";
12
+ } from "./chunk-LVDC3RUE.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-WACFIQYA.js";
16
+ } from "./chunk-GZL3KEPC.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-MWBFB7WA.js";
12
+ } from "./chunk-LVDC3RUE.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-WNVQPGLH.js";
3
+ } from "./chunk-XWY4UW62.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-74DKFWU2.js";
9
+ } from "./chunk-KSVCCSAO.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-ZMRO6ESW.js";
12
+ } from "./chunk-ECJJKDP7.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -18,7 +18,7 @@ import {
18
18
  guardedArgv,
19
19
  pusharyDir,
20
20
  vscodePluginDir
21
- } from "./chunk-57EOP757.js";
21
+ } from "./chunk-MYBCXDIL.js";
22
22
  import {
23
23
  readJsonSafe
24
24
  } from "./chunk-QENTGE75.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-WACFIQYA.js";
32
+ } from "./chunk-GZL3KEPC.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-JTQHC3RV.js";
3
+ } from "./chunk-T2AC5VFQ.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-YBE2KH2U.js";
6
+ } from "./chunk-IRZ5FVWG.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-57EOP757.js";
9
+ } from "./chunk-MYBCXDIL.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-QENTGE75.js";
13
13
  import {
14
14
  isValidApiKey
15
- } from "./chunk-WACFIQYA.js";
15
+ } from "./chunk-GZL3KEPC.js";
16
16
 
17
17
  // src/shared-mcp-key.ts
18
18
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -6,38 +6,38 @@ import {
6
6
  } from "./chunk-QW3FRUFB.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-DUACX6E3.js";
9
+ } from "./chunk-QP3XPS5U.js";
10
10
  import {
11
11
  hookOwnerOf
12
- } from "./chunk-74DKFWU2.js";
12
+ } from "./chunk-KSVCCSAO.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-FXW3FW4A.js";
18
+ } from "./chunk-JSQOHMNJ.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
22
- } from "./chunk-LW4ZEC3A.js";
22
+ } from "./chunk-N3NSWWNU.js";
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-4US3BCQJ.js";
26
+ } from "./chunk-C3IWX6KU.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-YBE2KH2U.js";
29
+ } from "./chunk-IRZ5FVWG.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-57EOP757.js";
33
+ } from "./chunk-MYBCXDIL.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-QENTGE75.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-MWBFB7WA.js";
40
+ } from "./chunk-LVDC3RUE.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-57EOP757.js";
10
+ } from "./chunk-MYBCXDIL.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-T6GEEMVC.js";
13
+ } from "./chunk-WVP6UQG3.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-QTOLNRET.js";
@@ -2,25 +2,25 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-V2AMLVMD.js";
5
+ } from "./chunk-4YNNAF53.js";
6
6
  import {
7
7
  createIo
8
8
  } from "./chunk-FO3MDD26.js";
9
9
  import {
10
10
  readKeySource
11
- } from "./chunk-YBE2KH2U.js";
11
+ } from "./chunk-IRZ5FVWG.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-5HRXOANL.js";
17
+ } from "./chunk-S54YLXWW.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-MWBFB7WA.js";
23
+ } from "./chunk-LVDC3RUE.js";
24
24
 
25
25
  // src/cli/report-key.ts
26
26
  var { dim, yellow } = createIo();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-724266XT.js";
3
+ } from "./chunk-RF74KBF5.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -360,9 +360,9 @@ var installGlobally = (options) => {
360
360
  }
361
361
  const started = (async () => {
362
362
  if (!npmIsOnPath()) throw new NpmMissingError();
363
- const { withUpgradeLock } = await import("./global-upgrade-6M2UXUUL.js");
364
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-G2ZPV7ZO.js");
365
- const { autoUpdateLock } = await import("./paths-5PWAQF63.js");
363
+ const { withUpgradeLock } = await import("./global-upgrade-IPWV5PTM.js");
364
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-ML73QXIG.js");
365
+ const { autoUpdateLock } = await import("./paths-IZTNMJAQ.js");
366
366
  let result = "skipped";
367
367
  const install = async () => {
368
368
  const platform = process.platform;
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-QENTGE75.js";
5
5
  import {
6
6
  configFilePath
7
- } from "./chunk-MWBFB7WA.js";
7
+ } from "./chunk-LVDC3RUE.js";
8
8
  import {
9
9
  readSetupOutcomeProperties
10
- } from "./chunk-WACFIQYA.js";
10
+ } from "./chunk-GZL3KEPC.js";
11
11
 
12
12
  // src/hooks-spec.ts
13
13
  var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  APPROVAL_SETTINGS_PATH
3
- } from "./chunk-DFZTZRKL.js";
3
+ } from "./chunk-VLJ5C6IT.js";
4
4
  import {
5
5
  readMacAppAgentKey
6
- } from "./chunk-VRPDHJGB.js";
6
+ } from "./chunk-T2BEIPK2.js";
7
7
  import {
8
8
  findExportedKeyLines,
9
9
  isAdoptedMacAppKey,
@@ -13,13 +13,13 @@ import {
13
13
  readConfigFileKey,
14
14
  readKeySource,
15
15
  readMacAppKeyPrefix
16
- } from "./chunk-YBE2KH2U.js";
16
+ } from "./chunk-IRZ5FVWG.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-5HRXOANL.js";
19
+ } from "./chunk-S54YLXWW.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-WACFIQYA.js";
22
+ } from "./chunk-GZL3KEPC.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -1,4 +1,5 @@
1
1
  import {
2
+ LAUNCHCTL,
2
3
  codexAppOnThisMac,
3
4
  codexEngineBehindLauncher,
4
5
  codexPassThroughScript,
@@ -7,13 +8,13 @@ import {
7
8
  everyProgramFileIsThere,
8
9
  installedCodexApp,
9
10
  shellQuoted
10
- } from "./chunk-RZF2GIPI.js";
11
+ } from "./chunk-ZJNU32VE.js";
11
12
  import {
12
13
  writeHuman
13
14
  } from "./chunk-QCGNGEGE.js";
14
15
  import {
15
16
  xml
16
- } from "./chunk-DUACX6E3.js";
17
+ } from "./chunk-QP3XPS5U.js";
17
18
  import {
18
19
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
19
20
  CODEX_APP_LAUNCH_VARIABLE
@@ -211,7 +212,6 @@ var waitForMacAppExit = (attempts = 20, everyMs = 250) => {
211
212
  // src/codex-app-cards-switch.ts
212
213
  var CODEX_APP_CARDS_LOGIN_ITEM = "com.pushary.codex-app-cards";
213
214
  var CODEX_APP_CARDS_DIRECTORY = "codex-app";
214
- var LAUNCHCTL = "/bin/launchctl";
215
215
  var LAUNCHER_NAME = "codex";
216
216
  var RECEIPT_NAME = "turned-on.json";
217
217
  var TURNED_OFF_NAME = "turned-off";
@@ -276,14 +276,14 @@ var codexAppCardsReceiptFrom = (contents) => {
276
276
  const { entry, app, engine } = parsed;
277
277
  return Array.isArray(entry) && entry.length > 0 && entry.every(isAString) && isAString(app) && isAString(engine) && isAbsolute2(engine) ? { entry, app, engine } : null;
278
278
  };
279
+ var filesThisVersionWrites = (paths, receipt) => ({
280
+ launcherScript: desktopProxyScript(receipt.entry, receipt.app, receipt.engine, { turnsItselfOffWithoutTheEngine: true }),
281
+ loginItem: codexAppCardsLoginItem(paths.launcherPath, receipt.engine, receipt.entry)
282
+ });
279
283
  var codexAppCardsInstallation = (input) => {
280
284
  const paths = codexAppCardsPaths(input.homeDir, input.uid);
281
- return {
282
- paths,
283
- launcherScript: desktopProxyScript(input.entry, input.app, input.engine, { turnsItselfOffWithoutTheEngine: true }),
284
- loginItem: codexAppCardsLoginItem(paths.launcherPath, input.engine, input.entry),
285
- receipt: { entry: input.entry, app: input.app, engine: input.engine }
286
- };
285
+ const receipt = { entry: input.entry, app: input.app, engine: input.engine };
286
+ return { paths, ...filesThisVersionWrites(paths, receipt), receipt };
287
287
  };
288
288
  var isAbsolutePath = (value) => value.startsWith("/");
289
289
  var whatTheLauncherCannotRun = (receipt, machine) => {
@@ -292,8 +292,10 @@ var whatTheLauncherCannotRun = (receipt, machine) => {
292
292
  const missing = receipt.entry.filter(isAbsolutePath).find((path) => !machine.exists(path));
293
293
  return missing === void 0 ? null : { kind: "on_but_pushary_is_missing", missing };
294
294
  };
295
+ var LAUNCH_SETTING_NOT_READ = "The setting that starts the Codex app could not be read, so nothing was changed";
296
+ var launchVariableOrNoneWhenNotRead = (machine) => machine.launchVariable() ?? "";
295
297
  var codexAppCardsStatus = (paths, machine) => {
296
- const value = machine.launchVariable();
298
+ const value = launchVariableOrNoneWhenNotRead(machine);
297
299
  if (value.length > 0 && value !== paths.launcherPath) return { kind: "another_program_owns_the_launch", value };
298
300
  const launcherIsThere = machine.exists(paths.launcherPath);
299
301
  const setForThisLogin = value === paths.launcherPath && launcherIsThere;
@@ -306,7 +308,7 @@ var codexAppCardsStatus = (paths, machine) => {
306
308
  };
307
309
  var turnCodexAppCardsOn = (installation, machine) => {
308
310
  const { paths } = installation;
309
- const value = machine.launchVariable();
311
+ const value = launchVariableOrNoneWhenNotRead(machine);
310
312
  if (value.length > 0 && value !== paths.launcherPath) return { kind: "another_program_owns_the_launch", value };
311
313
  machine.makeDirectory(paths.launcherDirectory, PRIVATE_DIRECTORY_MODE);
312
314
  machine.writeFile(paths.launcherPath, installation.launcherScript, PRIVATE_PROGRAM_MODE);
@@ -321,7 +323,7 @@ var turnCodexAppCardsOn = (installation, machine) => {
321
323
  var setCodexAppLaunchAtLogin = (paths, machine) => {
322
324
  const isTurnedOn = machine.exists(paths.launcherPath) && machine.exists(paths.loginItemPath);
323
325
  const cannotRun = whatTheLauncherCannotRun(codexAppCardsReceiptFrom(machine.readFile(paths.receiptPath)), machine);
324
- if (!isTurnedOn || cannotRun !== null || machine.launchVariable().length > 0) return "left_as_it_is";
326
+ if (!isTurnedOn || cannotRun !== null || launchVariableOrNoneWhenNotRead(machine).length > 0) return "left_as_it_is";
325
327
  machine.setLaunchVariable(paths.launcherPath);
326
328
  return "set";
327
329
  };
@@ -336,6 +338,7 @@ var leaveOnlyThePathToTheEngine = (paths, machine) => {
336
338
  };
337
339
  var turnCodexAppCardsOff = (paths, machine) => {
338
340
  const value = machine.launchVariable();
341
+ if (value === null) throw new Error(LAUNCH_SETTING_NOT_READ);
339
342
  const ours = value === paths.launcherPath;
340
343
  const loginItemIsThere = machine.exists(paths.loginItemPath);
341
344
  leaveOnlyThePathToTheEngine(paths, machine);
@@ -352,18 +355,28 @@ var rememberCodexAppCardsWereTurnedOff = (paths, machine) => {
352
355
  machine.writeFile(paths.turnedOffPath, "", PRIVATE_FILE_MODE);
353
356
  };
354
357
  var turnedOnByTheMacApp = (receipt) => receipt !== null && isTheMacAppsHelper(receipt.entry);
355
- var codexAppCardsReport = (paths, machine) => ({
356
- status: codexAppCardsStatus(paths, machine),
357
- codexApp: machine.codexApp(),
358
- turnedOnByTheMacApp: turnedOnByTheMacApp(codexAppCardsReceiptFrom(machine.readFile(paths.receiptPath))),
359
- turnedOffOnPurpose: machine.exists(paths.turnedOffPath)
360
- });
358
+ var isWhatThisVersionWrites = (receipt, paths, machine) => {
359
+ if (receipt === null) return false;
360
+ const written = filesThisVersionWrites(paths, receipt);
361
+ return machine.readFile(paths.launcherPath) === written.launcherScript && machine.readFile(paths.loginItemPath) === written.loginItem;
362
+ };
363
+ var launchesOrStartsAtLogin = (paths, machine) => machine.launchVariable() === paths.launcherPath || machine.exists(paths.loginItemPath);
364
+ var offButStillLaunchedOrStartedAtLogin = (status, paths, machine) => status.kind === "off" && launchesOrStartsAtLogin(paths, machine);
365
+ var codexAppCardsReport = (paths, machine) => {
366
+ const status = codexAppCardsStatus(paths, machine);
367
+ const receipt = codexAppCardsReceiptFrom(machine.readFile(paths.receiptPath));
368
+ return {
369
+ status,
370
+ codexApp: machine.codexApp(),
371
+ turnedOnByTheMacApp: turnedOnByTheMacApp(receipt),
372
+ turnedOffOnPurpose: machine.exists(paths.turnedOffPath),
373
+ launcher: paths.launcherPath,
374
+ launcherIsCurrent: isWhatThisVersionWrites(receipt, paths, machine),
375
+ leavesALaunchBehind: offButStillLaunchedOrStartedAtLogin(status, paths, machine)
376
+ };
377
+ };
361
378
  var isKeptOnForTheMacApp = (request, paths, machine) => request.keepWhatTheMacAppTurnedOn && turnedOnByTheMacApp(codexAppCardsReceiptFrom(machine.readFile(paths.receiptPath))) && codexAppCardsStatus(paths, machine).kind !== "off";
362
379
  var isKeptOffForTheMacApp = (request, paths, machine) => request.keepWhatTheMacAppTurnedOn && machine.exists(paths.turnedOffPath);
363
- var codexAppCardsFolderStays = (request, machine) => {
364
- const paths = codexAppCardsPaths(request.homeDir, request.uid);
365
- return isKeptOnForTheMacApp(request, paths, machine) || isKeptOffForTheMacApp(request, paths, machine);
366
- };
367
380
  var nothingIsTurnedOn = (paths, machine) => !machine.exists(paths.launcherPath) && !machine.exists(paths.loginItemPath) && machine.launchVariable() !== paths.launcherPath;
368
381
  var removeCodexAppCards = (request, machine) => {
369
382
  const paths = codexAppCardsPaths(request.homeDir, request.uid);
@@ -373,13 +386,40 @@ var removeCodexAppCards = (request, machine) => {
373
386
  return "absent";
374
387
  }
375
388
  if (isKeptOnForTheMacApp(request, paths, machine)) return "kept_for_the_mac_app";
389
+ if (machine.launchVariable() === null) throw new Error(LAUNCH_SETTING_NOT_READ);
376
390
  if (request.dryRun) return "removed";
377
391
  turnCodexAppCardsOff(paths, machine);
378
392
  machine.remove(paths.launcherDirectory);
379
393
  if (keepsTheOff) rememberCodexAppCardsWereTurnedOff(paths, machine);
380
394
  return "removed";
381
395
  };
382
- var launchctl = (args) => execFileSync2(LAUNCHCTL, [...args], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
396
+ var firstLineOf = (error) => (error instanceof Error ? error.message : String(error)).split("\n", 1)[0] ?? "";
397
+ var whatTheCleanUpLeft = (paths, machine) => machine.launchVariable() === null || launchesOrStartsAtLogin(paths, machine) ? "could_not_turn_off" : "off_but_not_tidied";
398
+ var cleanUpCodexAppCards = (request, machine) => {
399
+ const paths = codexAppCardsPaths(request.homeDir, request.uid);
400
+ try {
401
+ const outcome = removeCodexAppCards(request, machine);
402
+ return { outcome, keepsTheFolder: outcome === "kept_for_the_mac_app" || isKeptOffForTheMacApp(request, paths, machine) };
403
+ } catch (error) {
404
+ return { outcome: whatTheCleanUpLeft(paths, machine), keepsTheFolder: true, reason: firstLineOf(error) };
405
+ }
406
+ };
407
+ var codexAppCardsFolderInTheLastSweep = (cleanedUpOnThisMac) => {
408
+ if (cleanedUpOnThisMac === null) return "swept_with_the_rest";
409
+ return cleanedUpOnThisMac.keepsTheFolder ? "kept" : "left_to_the_switch";
410
+ };
411
+ var hasWhatTheCommandSaid = (error) => typeof error === "object" && error !== null && "stderr" in error;
412
+ var whyLaunchctlFailed = (error, verb) => {
413
+ const said = hasWhatTheCommandSaid(error) && typeof error.stderr === "string" ? error.stderr.split("\n").map((line) => line.trim()).find((line) => line.length > 0) : void 0;
414
+ return said ?? `launchctl ${verb} failed`;
415
+ };
416
+ var launchctl = (args) => {
417
+ try {
418
+ return execFileSync2(LAUNCHCTL, [...args], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
419
+ } catch (error) {
420
+ throw new Error(whyLaunchctlFailed(error, args[0] ?? ""));
421
+ }
422
+ };
383
423
  var launchctlIgnoringFailure = (args) => {
384
424
  try {
385
425
  return launchctl(args);
@@ -387,6 +427,13 @@ var launchctlIgnoringFailure = (args) => {
387
427
  return "";
388
428
  }
389
429
  };
430
+ var launchVariableOnThisMac = () => {
431
+ try {
432
+ return launchctl(["getenv", CODEX_APP_LAUNCH_VARIABLE]).trim();
433
+ } catch {
434
+ return null;
435
+ }
436
+ };
390
437
  var fileContents = (path) => {
391
438
  try {
392
439
  return readFileSync(path, "utf8");
@@ -396,7 +443,7 @@ var fileContents = (path) => {
396
443
  };
397
444
  var thisMacsCodexAppCardsMachine = () => ({
398
445
  codexApp: codexAppOnThisMac,
399
- launchVariable: () => launchctlIgnoringFailure(["getenv", CODEX_APP_LAUNCH_VARIABLE]).trim(),
446
+ launchVariable: launchVariableOnThisMac,
400
447
  setLaunchVariable: (value) => {
401
448
  launchctl(["setenv", CODEX_APP_LAUNCH_VARIABLE, value]);
402
449
  },
@@ -418,8 +465,7 @@ var thisMacsCodexAppCardsMachine = () => ({
418
465
  rmSync(path, { recursive: true, force: true });
419
466
  }
420
467
  });
421
- var removeCodexAppCardsFromThisMac = (request) => removeCodexAppCards(request, thisMacsCodexAppCardsMachine());
422
- var codexAppCardsFolderStaysOnThisMac = (request) => codexAppCardsFolderStays(request, thisMacsCodexAppCardsMachine());
468
+ var cleanUpCodexAppCardsOnThisMac = (request) => cleanUpCodexAppCards(request, thisMacsCodexAppCardsMachine());
423
469
  var setCodexAppLaunchAtLoginOnThisMac = () => {
424
470
  const uid = process.getuid?.();
425
471
  if (uid === void 0) return;
@@ -516,10 +562,11 @@ export {
516
562
  turnCodexAppCardsOff,
517
563
  rememberCodexAppCardsWereTurnedOff,
518
564
  codexAppCardsReport,
519
- codexAppCardsFolderStays,
520
565
  removeCodexAppCards,
521
- removeCodexAppCardsFromThisMac,
522
- codexAppCardsFolderStaysOnThisMac,
566
+ cleanUpCodexAppCards,
567
+ codexAppCardsFolderInTheLastSweep,
568
+ whyLaunchctlFailed,
569
+ cleanUpCodexAppCardsOnThisMac,
523
570
  setCodexAppLaunchAtLoginOnThisMac,
524
571
  runsFromATemporaryFolder,
525
572
  codexAppCardsStatusLine,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-6U3L4K57.js";
3
+ } from "./chunk-UMVVQXAC.js";
4
4
  import {
5
5
  CODEX_INSTRUCTIONS_LABEL,
6
6
  GEMINI_INSTRUCTIONS_LABEL,
@@ -11,7 +11,7 @@ import {
11
11
  macAppFxBridge,
12
12
  refreshInstructionBlock,
13
13
  renderAgentInstructions
14
- } from "./chunk-GWQ6T6JV.js";
14
+ } from "./chunk-HUWLEVL2.js";
15
15
  import {
16
16
  OPENCODE_HOOK_BINARY,
17
17
  agentHookOwner,
@@ -21,10 +21,10 @@ import {
21
21
  openCodeInstructionsFile,
22
22
  openCodePluginDir,
23
23
  openCodeWired
24
- } from "./chunk-JTQHC3RV.js";
24
+ } from "./chunk-T2AC5VFQ.js";
25
25
  import {
26
26
  detectClaudeVersion
27
- } from "./chunk-7QAL23TB.js";
27
+ } from "./chunk-LVWXRXT7.js";
28
28
  import {
29
29
  addClaudeMcpServer,
30
30
  addCompatibleHooks,
@@ -33,7 +33,7 @@ import {
33
33
  compatibleConfigFile,
34
34
  compatibleInstructionsFile,
35
35
  hasCompatibleHooks
36
- } from "./chunk-WNVQPGLH.js";
36
+ } from "./chunk-XWY4UW62.js";
37
37
  import {
38
38
  claudeUnprovenHolds,
39
39
  claudeWired,
@@ -41,7 +41,7 @@ import {
41
41
  codexWired,
42
42
  geminiWired,
43
43
  planHooks
44
- } from "./chunk-74DKFWU2.js";
44
+ } from "./chunk-KSVCCSAO.js";
45
45
  import {
46
46
  CLAUDE_HOOK_BINARY,
47
47
  CLAUDE_HOOK_EVENTS,
@@ -52,7 +52,7 @@ import {
52
52
  needsReregistration,
53
53
  registrationSignatures,
54
54
  supportedClaudeEvents
55
- } from "./chunk-VZ3YPEMG.js";
55
+ } from "./chunk-ATUZX4K7.js";
56
56
  import {
57
57
  formatVersion
58
58
  } from "./chunk-6ICPEJY5.js";
@@ -80,11 +80,11 @@ import {
80
80
  registeredCommands,
81
81
  registrationHolderOf,
82
82
  vscodePluginMcp
83
- } from "./chunk-57EOP757.js";
83
+ } from "./chunk-MYBCXDIL.js";
84
84
  import {
85
85
  resolveGlobalBinDir,
86
86
  resolveGlobalBinary
87
- } from "./chunk-T6GEEMVC.js";
87
+ } from "./chunk-WVP6UQG3.js";
88
88
  import {
89
89
  readJsonSafe,
90
90
  writeFileAtomic,
@@ -94,7 +94,7 @@ import {
94
94
  HOOK_COMPATIBLE_PROFILES,
95
95
  isCompatibleAgentType,
96
96
  isRecord
97
- } from "./chunk-WACFIQYA.js";
97
+ } from "./chunk-GZL3KEPC.js";
98
98
 
99
99
  // src/reapply.ts
100
100
  import { dirname, join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-YBE2KH2U.js";
3
+ } from "./chunk-IRZ5FVWG.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -3,18 +3,18 @@ import {
3
3
  addGeminiMcpServer,
4
4
  removeGeminiMcpServer,
5
5
  supportedClaudeEvents
6
- } from "./chunk-VZ3YPEMG.js";
6
+ } from "./chunk-ATUZX4K7.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  compatibleToolLookup
10
- } from "./chunk-724266XT.js";
10
+ } from "./chunk-RF74KBF5.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-57EOP757.js";
17
+ } from "./chunk-MYBCXDIL.js";
18
18
  import {
19
19
  HOOK_COMPATIBLE_PROFILES,
20
20
  HOOK_LOCATOR_BINARY,
@@ -26,7 +26,7 @@ import {
26
26
  pusharyMissingReason,
27
27
  refusalOutput,
28
28
  withHookHoldBudget
29
- } from "./chunk-WACFIQYA.js";
29
+ } from "./chunk-GZL3KEPC.js";
30
30
 
31
31
  // src/claude-config.ts
32
32
  import { join } from "path";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote
4
- } from "./chunk-WACFIQYA.js";
4
+ } from "./chunk-GZL3KEPC.js";
5
5
 
6
6
  // src/repo.ts
7
7
  import { existsSync, readFileSync, statSync } from "fs";