@pushary/agent-hooks 1.9.147 → 1.9.148

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/dist/{api-2KDVLXHT.js → api-H7H75ARS.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-claude.js +27 -27
  7. package/dist/bin/pushary-clean.js +36 -36
  8. package/dist/bin/pushary-codex-bridge.js +23 -23
  9. package/dist/bin/pushary-codex-hook.js +35 -35
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +16 -16
  12. package/dist/bin/pushary-connect.js +32 -32
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +44 -44
  15. package/dist/bin/pushary-disconnect.js +28 -28
  16. package/dist/bin/pushary-doctor.js +44 -44
  17. package/dist/bin/pushary-elicitation-hook.js +28 -28
  18. package/dist/bin/pushary-gemini-bridge.js +17 -17
  19. package/dist/bin/pushary-gemini-hook.js +32 -32
  20. package/dist/bin/pushary-hook.js +35 -35
  21. package/dist/bin/pushary-login.js +21 -21
  22. package/dist/bin/pushary-logout.js +27 -27
  23. package/dist/bin/pushary-mcp.js +12 -12
  24. package/dist/bin/pushary-mode.js +15 -15
  25. package/dist/bin/pushary-notification-hook.js +27 -27
  26. package/dist/bin/pushary-opencode-hook.js +31 -31
  27. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  28. package/dist/bin/pushary-permission-hook.js +35 -35
  29. package/dist/bin/pushary-post-hook.js +28 -28
  30. package/dist/bin/pushary-prompt-hook.js +27 -27
  31. package/dist/bin/pushary-session-end-hook.js +27 -27
  32. package/dist/bin/pushary-session-start-hook.js +37 -37
  33. package/dist/bin/pushary-setup.js +56 -71
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +33 -33
  36. package/dist/bin/pushary-stop-hook.js +27 -27
  37. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  38. package/dist/bin/pushary-suggestions.js +15 -15
  39. package/dist/bin/pushary-transcript-register.js +17 -17
  40. package/dist/bin/pushary-transcripts.js +25 -25
  41. package/dist/bin/pushary-upgrade.js +42 -42
  42. package/dist/bin/pushary-wait.js +15 -15
  43. package/dist/bin/pushary.js +7 -7
  44. package/dist/{chunk-EV54ZQ5J.js → chunk-2VPRLAKF.js} +4 -4
  45. package/dist/{chunk-MI7GHNTO.js → chunk-3AAQJ75F.js} +5 -5
  46. package/dist/{chunk-RZGR4G5G.js → chunk-3OPXQK4D.js} +5 -5
  47. package/dist/{chunk-5II3USXS.js → chunk-3T7RA7WJ.js} +2 -2
  48. package/dist/{chunk-KH27X5CW.js → chunk-3WD3BEPB.js} +2 -2
  49. package/dist/{chunk-BU2J4P7P.js → chunk-43NHQUCY.js} +24 -3
  50. package/dist/{chunk-UGPNLU4O.js → chunk-4L2IYNLC.js} +1 -1
  51. package/dist/{chunk-6EPTMB7L.js → chunk-5IG3VPHT.js} +4 -4
  52. package/dist/{chunk-A5MSVNFS.js → chunk-5ZIYTFPW.js} +10 -10
  53. package/dist/{chunk-T3TVMMXJ.js → chunk-6HO36P3A.js} +1 -1
  54. package/dist/{chunk-4P3ML7HP.js → chunk-6RYJ3XCD.js} +5 -5
  55. package/dist/{chunk-WLKW2TF7.js → chunk-6YX3VB5P.js} +6 -6
  56. package/dist/{chunk-GGCUXNZN.js → chunk-A3URJPYH.js} +1 -1
  57. package/dist/{chunk-CSNG5NQR.js → chunk-ABTQG6XU.js} +1 -1
  58. package/dist/{chunk-GJV5RVUU.js → chunk-AQ7L2E2U.js} +2 -2
  59. package/dist/{chunk-I72UU75H.js → chunk-B6RTPP3X.js} +16 -16
  60. package/dist/{chunk-Q6POCQOV.js → chunk-BP5HLKR6.js} +12 -12
  61. package/dist/{chunk-57GVGSOQ.js → chunk-BPKB7BI4.js} +1 -1
  62. package/dist/{chunk-3TTXOU6G.js → chunk-CABBLJD5.js} +3 -3
  63. package/dist/{chunk-NMUEUDTT.js → chunk-CAHULQIO.js} +1 -1
  64. package/dist/{chunk-GPAMD5JG.js → chunk-CBIS7IYQ.js} +5 -5
  65. package/dist/{chunk-2G54YLN3.js → chunk-CDQOARIF.js} +3 -3
  66. package/dist/{chunk-ISM6XF3V.js → chunk-CIRTRWHM.js} +4 -4
  67. package/dist/{chunk-TZ7CBPCD.js → chunk-CMTDMZPV.js} +2 -2
  68. package/dist/{chunk-XQOBM3E6.js → chunk-CU5SYUMK.js} +3 -6
  69. package/dist/{chunk-7WDEJTNX.js → chunk-D3QT4S7U.js} +4 -4
  70. package/dist/{chunk-FKGWP4MF.js → chunk-DHCJDYBT.js} +6 -6
  71. package/dist/{chunk-RZJHCHEA.js → chunk-DLPI45DF.js} +6 -6
  72. package/dist/{chunk-T274HRSR.js → chunk-ENRL4WFD.js} +4 -4
  73. package/dist/{chunk-BYVLAPCF.js → chunk-FQLS37AX.js} +1 -1
  74. package/dist/{chunk-6YVGY2ZX.js → chunk-H6FFNTSR.js} +6 -6
  75. package/dist/{chunk-BHGSNYG5.js → chunk-HEOBF5H6.js} +3 -3
  76. package/dist/{chunk-OSYULPJO.js → chunk-JSZ6LKX5.js} +11 -11
  77. package/dist/{chunk-2RAIG6NF.js → chunk-JUEQUYAT.js} +2 -2
  78. package/dist/{chunk-QGKFDSEO.js → chunk-KP6ERYOA.js} +8 -8
  79. package/dist/{chunk-L2M6D2N4.js → chunk-KWJJYZ3T.js} +4 -4
  80. package/dist/{chunk-FWCECQTY.js → chunk-KXNAB76Z.js} +16 -5
  81. package/dist/{chunk-YOVJOHM5.js → chunk-LC53HRZ6.js} +1 -1
  82. package/dist/{chunk-KDJIDRJS.js → chunk-M7HJZ7HO.js} +3 -3
  83. package/dist/{chunk-7P32YU2M.js → chunk-MT4GBXLM.js} +5 -5
  84. package/dist/{chunk-2QY2BD4T.js → chunk-MUSINFEU.js} +5 -5
  85. package/dist/{chunk-2YNAQ5TX.js → chunk-NHZV2H63.js} +1 -1
  86. package/dist/{chunk-5K65H6OO.js → chunk-NLED3JGR.js} +1 -1
  87. package/dist/{chunk-UR55VBLY.js → chunk-NRPQUU3D.js} +2 -2
  88. package/dist/{chunk-6JBX55K4.js → chunk-O5ARO3JM.js} +2 -2
  89. package/dist/{chunk-7TVSWGAV.js → chunk-PH3MVQCQ.js} +17 -9
  90. package/dist/{chunk-FMAIUTVU.js → chunk-PUTX5BBE.js} +7 -4
  91. package/dist/{chunk-2I6A34GJ.js → chunk-PVBDITRS.js} +5 -5
  92. package/dist/{chunk-FHBJJOMF.js → chunk-Q7GZKNMH.js} +1 -1
  93. package/dist/{chunk-72S6PF2I.js → chunk-QSZYHL7Z.js} +2 -2
  94. package/dist/{chunk-L6BTSIKF.js → chunk-QTQRQZIU.js} +4 -4
  95. package/dist/{chunk-OXDKZYBO.js → chunk-R2JRRCZK.js} +1 -1
  96. package/dist/{chunk-2EETRVCZ.js → chunk-RMBY7JGO.js} +1 -1
  97. package/dist/{chunk-P6W2V2AP.js → chunk-RWTH5RYA.js} +2 -2
  98. package/dist/{chunk-T2CR5REM.js → chunk-RYDDLS62.js} +3 -3
  99. package/dist/{chunk-ISOP4ENY.js → chunk-S3MEI2D2.js} +5 -5
  100. package/dist/{chunk-BEDAQAEN.js → chunk-T3CMGGNW.js} +1 -1
  101. package/dist/{chunk-Q767Y4LY.js → chunk-T4PX3DRF.js} +1 -1
  102. package/dist/{chunk-JDIKCM2N.js → chunk-TXXAQRX4.js} +3 -1
  103. package/dist/{chunk-LO52V6WG.js → chunk-UAHBSOO4.js} +2 -2
  104. package/dist/{chunk-KFL7OWLI.js → chunk-UFGFO7QB.js} +1 -1
  105. package/dist/{chunk-37ZBJB2Q.js → chunk-UJUGFLVF.js} +5 -5
  106. package/dist/{chunk-526XSNMS.js → chunk-UL2NNDKD.js} +3 -3
  107. package/dist/{chunk-3NMX4725.js → chunk-VPADWVYD.js} +1 -1
  108. package/dist/{chunk-6C5QRJIH.js → chunk-VPMSV35B.js} +5 -5
  109. package/dist/{chunk-Q3JW44JV.js → chunk-WQEJCDMR.js} +2 -2
  110. package/dist/{chunk-D7ZWJYXB.js → chunk-WQJ5NJ35.js} +1 -1
  111. package/dist/{chunk-WNV3X2VU.js → chunk-X4OEGFOG.js} +3 -3
  112. package/dist/{chunk-YICO6HEW.js → chunk-X4OQ5UMH.js} +5 -5
  113. package/dist/{chunk-KXMIDDUN.js → chunk-XSBW6TUH.js} +2 -2
  114. package/dist/{chunk-GIWI5IHB.js → chunk-XZGQZDFP.js} +6 -6
  115. package/dist/{chunk-NAGF5ZJ2.js → chunk-YOP7LFHW.js} +8 -8
  116. package/dist/{chunk-7XIJD7NL.js → chunk-YTD7RV6F.js} +3 -3
  117. package/dist/{chunk-ZKAQWXGO.js → chunk-YWSIN7IH.js} +1 -1
  118. package/dist/{chunk-MYJJNLT2.js → chunk-ZCB5SCYM.js} +2 -2
  119. package/dist/{chunk-ANLR5G2W.js → chunk-ZOATPL53.js} +4 -4
  120. package/dist/{chunk-ELRZO6A7.js → chunk-ZX2O66NS.js} +3 -3
  121. package/dist/{codex-app-cards-switch-GN65VEKM.js → codex-app-cards-switch-BCM547E6.js} +11 -11
  122. package/dist/{codex-card-routing-JTS75442.js → codex-card-routing-222EKZJR.js} +2 -2
  123. package/dist/{codex-desktop-launch-AQ2HSOQJ.js → codex-desktop-launch-6AFOLMZ7.js} +1 -1
  124. package/dist/{codex-session-launch-QYZZGVSQ.js → codex-session-launch-4YJR4ZGN.js} +20 -20
  125. package/dist/{config-5ATI6KPI.js → config-GWNPGS47.js} +3 -3
  126. package/dist/{global-upgrade-K4HWVUMI.js → global-upgrade-VRF6OSSU.js} +9 -9
  127. package/dist/{identity-V2GZCPJV.js → identity-PQIM7R2N.js} +4 -4
  128. package/dist/{live-capabilities-PD62FO4K.js → live-capabilities-G3LMKZUB.js} +4 -4
  129. package/dist/{paths-WPJEIHUE.js → paths-TFGIP5PU.js} +3 -3
  130. package/dist/{reapply-ZEWMGDXT.js → reapply-3IRAI6JF.js} +30 -30
  131. package/dist/src/index.js +34 -34
  132. package/dist/{upgrade-lock-7OR6V323.js → upgrade-lock-2G7ANYYO.js} +6 -4
  133. package/dist/{usage-GWZ3UGZG.js → usage-K3EGYCSU.js} +3 -3
  134. package/package.json +1 -1
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-FWCECQTY.js";
6
+ } from "./chunk-KXNAB76Z.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-ELRZO6A7.js";
9
+ } from "./chunk-ZX2O66NS.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,25 +18,25 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-MYJJNLT2.js";
21
+ } from "./chunk-ZCB5SCYM.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-GJV5RVUU.js";
26
+ } from "./chunk-AQ7L2E2U.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
31
  readGlobalCliInstallAt,
32
32
  readGlobalPrefix
33
- } from "./chunk-BU2J4P7P.js";
33
+ } from "./chunk-43NHQUCY.js";
34
34
  import {
35
35
  EXIT
36
36
  } from "./chunk-BG4HHB7E.js";
37
37
  import {
38
38
  NPX_LATEST_COMMAND
39
- } from "./chunk-JDIKCM2N.js";
39
+ } from "./chunk-TXXAQRX4.js";
40
40
  import {
41
41
  commandsPackage,
42
42
  globalUpgradeEntry,
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-G66WIAST.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-XQOBM3E6.js";
16
+ } from "./chunk-CU5SYUMK.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-3NMX4725.js";
19
+ } from "./chunk-VPADWVYD.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-JDIKCM2N.js";
22
+ } from "./chunk-TXXAQRX4.js";
23
23
  import {
24
24
  isValidApiKey
25
- } from "./chunk-6JBX55K4.js";
25
+ } from "./chunk-O5ARO3JM.js";
26
26
 
27
27
  // src/cli/login-ui.ts
28
28
  import { hostname } from "os";
@@ -2,7 +2,7 @@ import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote,
4
4
  parseGitBranch
5
- } from "./chunk-6JBX55K4.js";
5
+ } from "./chunk-O5ARO3JM.js";
6
6
 
7
7
  // src/repo.ts
8
8
  import { existsSync, readFileSync, statSync } from "fs";
@@ -2,10 +2,10 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-Q3JW44JV.js";
5
+ } from "./chunk-WQEJCDMR.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-LO52V6WG.js";
8
+ } from "./chunk-UAHBSOO4.js";
9
9
  import {
10
10
  createIo
11
11
  } from "./chunk-YM2T76UM.js";
@@ -14,19 +14,19 @@ import {
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-3TTXOU6G.js";
17
+ } from "./chunk-CABBLJD5.js";
18
18
  import {
19
19
  readKeySource
20
- } from "./chunk-XQOBM3E6.js";
20
+ } from "./chunk-CU5SYUMK.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-3NMX4725.js";
23
+ } from "./chunk-VPADWVYD.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-BG4HHB7E.js";
27
27
  import {
28
28
  KEY_SCOPE
29
- } from "./chunk-6JBX55K4.js";
29
+ } from "./chunk-O5ARO3JM.js";
30
30
 
31
31
  // src/cli/report-key.ts
32
32
  var { dim, yellow } = createIo();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-NMUEUDTT.js";
3
+ } from "./chunk-CAHULQIO.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-YPY4YCIZ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YU2EUD7O.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-JDIKCM2N.js";
12
+ } from "./chunk-TXXAQRX4.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-6JBX55K4.js";
20
+ } from "./chunk-O5ARO3JM.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-5II3USXS.js";
3
+ } from "./chunk-3T7RA7WJ.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
@@ -9,7 +9,7 @@ import {
9
9
  refreshHermesPluginFiles,
10
10
  refreshOpenClawPlugin,
11
11
  shippedHermesPlugin
12
- } from "./chunk-ISM6XF3V.js";
12
+ } from "./chunk-CIRTRWHM.js";
13
13
  import {
14
14
  fxIgnoresInstructionsFile,
15
15
  fxInstructionsBody,
@@ -18,7 +18,7 @@ import {
18
18
  macAppFxBridge,
19
19
  refreshClineKey,
20
20
  switchFxHttpEntryToBridge
21
- } from "./chunk-RZGR4G5G.js";
21
+ } from "./chunk-3OPXQK4D.js";
22
22
  import {
23
23
  OPENCODE_HOOK_BINARY,
24
24
  agentHookOwner,
@@ -30,16 +30,16 @@ import {
30
30
  openCodePluginDir,
31
31
  openCodeWired,
32
32
  withOpenCodeAskRules
33
- } from "./chunk-MI7GHNTO.js";
33
+ } from "./chunk-3AAQJ75F.js";
34
34
  import {
35
35
  detectClaudeVersion
36
- } from "./chunk-UR55VBLY.js";
36
+ } from "./chunk-NRPQUU3D.js";
37
37
  import {
38
38
  addCompatibleHooks,
39
39
  compatibleConfigFile,
40
40
  compatibleInstructionsFile,
41
41
  hasCompatibleHooks
42
- } from "./chunk-2I6A34GJ.js";
42
+ } from "./chunk-PVBDITRS.js";
43
43
  import {
44
44
  GEMINI_HOOK_BINARY,
45
45
  addGeminiHooks,
@@ -51,10 +51,10 @@ import {
51
51
  geminiWired,
52
52
  hasGeminiHooks,
53
53
  planHooks
54
- } from "./chunk-L6BTSIKF.js";
54
+ } from "./chunk-QTQRQZIU.js";
55
55
  import {
56
56
  KEY_FILE_MODE
57
- } from "./chunk-XQOBM3E6.js";
57
+ } from "./chunk-CU5SYUMK.js";
58
58
  import {
59
59
  CLAUDE_HOOK_BINARY,
60
60
  CLAUDE_HOOK_EVENTS,
@@ -101,13 +101,13 @@ import {
101
101
  renderAgentInstructions,
102
102
  supportedClaudeEvents,
103
103
  vscodePluginMcp
104
- } from "./chunk-GJV5RVUU.js";
104
+ } from "./chunk-AQ7L2E2U.js";
105
105
  import {
106
106
  formatVersion,
107
107
  hookCommandsUseBareNames,
108
108
  resolveGlobalBinDir,
109
109
  resolveGlobalBinary
110
- } from "./chunk-BU2J4P7P.js";
110
+ } from "./chunk-43NHQUCY.js";
111
111
  import {
112
112
  readJsonSafe,
113
113
  writeFileAtomic,
@@ -117,7 +117,7 @@ import {
117
117
  HOOK_COMPATIBLE_PROFILES,
118
118
  isCompatibleAgentType,
119
119
  isRecord
120
- } from "./chunk-6JBX55K4.js";
120
+ } from "./chunk-O5ARO3JM.js";
121
121
 
122
122
  // src/reapply.ts
123
123
  import { dirname, join } from "path";
@@ -9,13 +9,13 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-7XIJD7NL.js";
12
+ } from "./chunk-YTD7RV6F.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
16
16
  import {
17
17
  xml
18
- } from "./chunk-GIWI5IHB.js";
18
+ } from "./chunk-XZGQZDFP.js";
19
19
  import {
20
20
  writeFileAtomic
21
21
  } from "./chunk-TODDEIYG.js";
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
3
- } from "./chunk-TZ7CBPCD.js";
3
+ } from "./chunk-CMTDMZPV.js";
4
4
  import {
5
5
  declinedAgentsFile,
6
6
  readDeclinedAgents
7
- } from "./chunk-P6W2V2AP.js";
7
+ } from "./chunk-RWTH5RYA.js";
8
8
  import {
9
9
  OPENCODE_HOOK_BINARY,
10
10
  openCodeConfigDir,
11
11
  openCodePluginArgv,
12
12
  openCodePluginFile
13
- } from "./chunk-MI7GHNTO.js";
13
+ } from "./chunk-3AAQJ75F.js";
14
14
  import {
15
15
  liveCursorGateCoverage
16
- } from "./chunk-7WDEJTNX.js";
16
+ } from "./chunk-D3QT4S7U.js";
17
17
  import {
18
18
  compatibleConfigFile,
19
19
  compatibleHookEvents,
20
20
  grokHome,
21
21
  parseConfigDocument
22
- } from "./chunk-2I6A34GJ.js";
22
+ } from "./chunk-PVBDITRS.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-L6BTSIKF.js";
28
+ } from "./chunk-QTQRQZIU.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-GJV5RVUU.js";
56
+ } from "./chunk-AQ7L2E2U.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-6JBX55K4.js";
70
+ } from "./chunk-O5ARO3JM.js";
71
71
 
72
72
  // src/hook-wiring.ts
73
73
  import { createHash } from "crypto";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-5II3USXS.js";
3
+ } from "./chunk-3T7RA7WJ.js";
4
4
  import {
5
5
  HERMES_ALWAYS_ALLOWED_SHELL_RULE,
6
6
  HERMES_COMMAND_ALLOWLIST_KEY,
7
7
  HERMES_GATE_TOOLS_KEY,
8
8
  HERMES_SHELL_TOOL
9
- } from "./chunk-ISM6XF3V.js";
9
+ } from "./chunk-CIRTRWHM.js";
10
10
  import {
11
11
  retryAgentCommand
12
- } from "./chunk-FMAIUTVU.js";
12
+ } from "./chunk-PUTX5BBE.js";
13
13
  import {
14
14
  NPX_LATEST_COMMAND
15
- } from "./chunk-JDIKCM2N.js";
15
+ } from "./chunk-TXXAQRX4.js";
16
16
 
17
17
  // src/setup/codex-trust.ts
18
18
  var CODEX_TRUST_TELEMETRY = {
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-GJV5RVUU.js";
3
+ } from "./chunk-AQ7L2E2U.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
+ npmExitedBeforeInstalling,
7
8
  npmExitedOnPermissionDenied
8
- } from "./chunk-BU2J4P7P.js";
9
+ } from "./chunk-43NHQUCY.js";
9
10
  import {
10
11
  writeJsonAtomic
11
12
  } from "./chunk-TODDEIYG.js";
@@ -13,7 +14,7 @@ import {
13
14
  // src/upgrade-lock.ts
14
15
  import { fork } from "child_process";
15
16
  import { createHash } from "crypto";
16
- import { existsSync, mkdirSync, readFileSync, realpathSync, unlinkSync } from "fs";
17
+ import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, unlinkSync } from "fs";
17
18
  import { createServer, Server } from "net";
18
19
  import { basename, dirname, join } from "path";
19
20
  var LOCK_HOST = "127.0.0.1";
@@ -26,6 +27,15 @@ var HANDOFF_TIMEOUT_MS = 1e4;
26
27
  var FINISH_TIMEOUT_MS = 5 * 60 * 1e3;
27
28
  var KERNEL_LOCK_FORMAT = "kernel-v1";
28
29
  var heldLocks = /* @__PURE__ */ new Map();
30
+ var PENDING_INSTALL_STALE_AFTER_MS = 15 * 6e4;
31
+ var lockRecordAgeMs = (path, nowMs) => {
32
+ try {
33
+ return nowMs - statSync(path).mtimeMs;
34
+ } catch {
35
+ return null;
36
+ }
37
+ };
38
+ var pendingInstallWasAbandoned = (holderPid, ageMs, isAlive) => holderPid !== void 0 && ageMs !== null && ageMs > PENDING_INSTALL_STALE_AFTER_MS && !isAlive(holderPid);
29
39
  var canonicalLockPath = (path) => {
30
40
  mkdirSync(dirname(path), { recursive: true });
31
41
  return join(realpathSync(dirname(path)), basename(path));
@@ -98,7 +108,7 @@ var claimUpgradeLock = async (request = {}) => {
98
108
  listener.listen({ host: LOCK_HOST, port: lockPort(path), exclusive: true }, resolve);
99
109
  });
100
110
  const record = readLockRecord(path);
101
- if (record.installationPending) {
111
+ if (record.installationPending && !pendingInstallWasAbandoned(record.pid, lockRecordAgeMs(path, (request.now ?? Date.now)()), request.isAlive ?? isProcessAlive)) {
102
112
  server.close();
103
113
  return { kind: "unavailable", reason: `An earlier installation did not finish safely. Stop its npm processes (or restart the computer), then remove ${path} and retry the upgrade.` };
104
114
  }
@@ -170,13 +180,14 @@ var installWithUpgradeLock = (request, lockPath = autoUpdateLock(), runNpm) => {
170
180
  try {
171
181
  installPackageGlobally(request, runNpm);
172
182
  } catch (error) {
173
- if (npmExitedOnPermissionDenied(error, process.platform)) writeSettledLockRecord(path);
183
+ if (npmExitedOnPermissionDenied(error, process.platform) || npmExitedBeforeInstalling(error)) writeSettledLockRecord(path);
174
184
  throw error;
175
185
  }
176
186
  writeSettledLockRecord(path);
177
187
  };
178
188
 
179
189
  export {
190
+ PENDING_INSTALL_STALE_AFTER_MS,
180
191
  claimUpgradeLock,
181
192
  ownsUpgradeLock,
182
193
  releaseAutoUpdateLock,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computerOsOfPlatform,
3
3
  isComputerAgent
4
- } from "./chunk-6JBX55K4.js";
4
+ } from "./chunk-O5ARO3JM.js";
5
5
 
6
6
  // src/setup/phone-check.ts
7
7
  var planPhoneCheck = (context) => {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-2QY2BD4T.js";
3
+ } from "./chunk-MUSINFEU.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-UGPNLU4O.js";
6
+ } from "./chunk-4L2IYNLC.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-JDIKCM2N.js";
9
+ } from "./chunk-TXXAQRX4.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-6EPTMB7L.js";
8
+ } from "./chunk-5IG3VPHT.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-LO52V6WG.js";
11
+ } from "./chunk-UAHBSOO4.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-3TTXOU6G.js";
14
+ } from "./chunk-CABBLJD5.js";
15
15
  import {
16
16
  findExportedKeyLines,
17
17
  isAdoptedMacAppKey,
@@ -21,10 +21,10 @@ import {
21
21
  readConfigFileKey,
22
22
  readKeySource,
23
23
  readMacAppKeyPrefix
24
- } from "./chunk-XQOBM3E6.js";
24
+ } from "./chunk-CU5SYUMK.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-6JBX55K4.js";
27
+ } from "./chunk-O5ARO3JM.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-3TTXOU6G.js";
3
+ } from "./chunk-CABBLJD5.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-2G54YLN3.js";
6
+ } from "./chunk-CDQOARIF.js";
7
7
  import {
8
8
  fetchAsCredential
9
- } from "./chunk-UGPNLU4O.js";
9
+ } from "./chunk-4L2IYNLC.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-3NMX4725.js";
12
+ } from "./chunk-VPADWVYD.js";
13
13
  import {
14
14
  isRecord,
15
15
  isToolErrorResult,
16
16
  toolFailureCodeOfResult
17
- } from "./chunk-6JBX55K4.js";
17
+ } from "./chunk-O5ARO3JM.js";
18
18
 
19
19
  // src/retry.ts
20
20
  var isRetryable = (err) => {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-BG4HHB7E.js";
8
8
  import {
9
9
  redactSecretsFromContent
10
- } from "./chunk-6JBX55K4.js";
10
+ } from "./chunk-O5ARO3JM.js";
11
11
 
12
12
  // src/cli/json.ts
13
13
  var writeStdoutFully = (text) => new Promise((resolve, reject) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-Q6POCQOV.js";
3
+ } from "./chunk-BP5HLKR6.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-CYTPQDQY.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-BU2J4P7P.js";
6
+ } from "./chunk-43NHQUCY.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-6JBX55K4.js";
9
+ } from "./chunk-O5ARO3JM.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -3731,10 +3731,10 @@ var SETUP_AGENT_FAILURE_KINDS = [
3731
3731
  "app-account-mismatch"
3732
3732
  ];
3733
3733
  var isSetupAgentFailureKind = (value) => typeof value === "string" && SETUP_AGENT_FAILURE_KINDS.includes(value);
3734
- var SETUP_AGENT_FAILURE_CODES = ["npm-missing", "npm-global-prefix-denied", "npm-file-in-use", "npm-install-failed", "config-write-failed"];
3734
+ var SETUP_AGENT_FAILURE_CODES = ["npm-missing", "npm-global-prefix-denied", "npm-file-in-use", "npm-release-age", "npm-install-failed", "config-write-failed"];
3735
3735
  var SETUP_AGENT_FAILURE_STAGES = ["runtime-install", "config-read", "config-write", "hook-validation", "account-check", "unknown"];
3736
3736
  var isSetupAgentFailureStage = (value) => typeof value === "string" && SETUP_AGENT_FAILURE_STAGES.includes(value);
3737
- var SETUP_AGENT_FAILURE_REMEDIES = ["retry-agent", "install-node", "fix-npm-prefix", "close-node-programs", "match-mac-account"];
3737
+ var SETUP_AGENT_FAILURE_REMEDIES = ["retry-agent", "install-node", "fix-npm-prefix", "close-node-programs", "use-npm-policy", "match-mac-account"];
3738
3738
  var isSetupAgentFailureCode = (value) => typeof value === "string" && SETUP_AGENT_FAILURE_CODES.includes(value);
3739
3739
  var isSetupAgentFailureRemedy = (value) => typeof value === "string" && SETUP_AGENT_FAILURE_REMEDIES.includes(value);
3740
3740
  var isSetupAgentFailure = (value) => {
@@ -1,19 +1,20 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-WLKW2TF7.js";
3
+ } from "./chunk-6YX3VB5P.js";
4
4
  import {
5
5
  canChangeApprovalSettings
6
- } from "./chunk-LO52V6WG.js";
6
+ } from "./chunk-UAHBSOO4.js";
7
7
  import {
8
8
  matchMacAccountStep,
9
9
  retryAgentCommand
10
- } from "./chunk-FMAIUTVU.js";
10
+ } from "./chunk-PUTX5BBE.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
- NPX_LATEST_COMMAND
16
- } from "./chunk-JDIKCM2N.js";
15
+ NPX_LATEST_COMMAND,
16
+ npmExecSetupCommandFor
17
+ } from "./chunk-TXXAQRX4.js";
17
18
 
18
19
  // src/setup/closing.ts
19
20
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -23,7 +24,7 @@ var sendAnotherTestLines = (appPlatforms) => {
23
24
  const step = notificationAnswerStep(appPlatforms);
24
25
  return step === null ? [CHECK_THE_NOTIFICATION_OPENED, SEND_ANOTHER_TEST] : [SEND_ANOTHER_TEST, step];
25
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
+ var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them. Pushary can open a session only for a documented legal request, and every opening is logged. Turn off: ${NPX_LATEST_COMMAND} transcripts off`;
27
28
  var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND} pair pair the Pushary app on your phone`;
28
29
  var ALLOW_NOTIFICATIONS_HINT = `${NPX_LATEST_COMMAND} doctor --roundtrip after you allow notifications in the Pushary app`;
29
30
  var unreachedPhoneHint = (facts) => facts.phoneAwaitsNotifications === true ? ALLOW_NOTIFICATIONS_HINT : PAIR_PHONE_APP_HINT;
@@ -159,7 +160,11 @@ var describeClosing = (facts) => {
159
160
  return {
160
161
  ok: false,
161
162
  headline: "Setup failed.",
162
- next: ["Nothing was configured. Run pushary doctor to see why."],
163
+ next: [
164
+ "No agent was set up. Your key is saved.",
165
+ ...reachable ? ["Push works."] : [],
166
+ `Fix the problem above, then run setup again. To check this computer, run ${NPX_LATEST_COMMAND} doctor.`
167
+ ],
163
168
  exitCode: EXIT.FAILED,
164
169
  reason: "configured-nothing"
165
170
  };
@@ -262,8 +267,10 @@ var RETRY_AGENT_LABEL = "Retry just this agent:";
262
267
  var INSTALL_NODE_STEP = "Install the current Node.js LTS, which includes npm, then run setup again.";
263
268
  var NPM_PREFIX_STEP = "npm can't install globally here. Use nvm, or run: npm config set prefix ~/.npm-global, then run setup again.";
264
269
  var NPM_FILE_IN_USE_STEP = "Close other terminals or editors that use Node, then run setup again.";
265
- var nextStepFor = (failure) => {
270
+ var nextStepFor = (failure, releaseAgeRefusedAgents) => {
266
271
  switch (failure.remedy) {
272
+ case "use-npm-policy":
273
+ return { kind: "use-npm-policy", instruction: `Your npm only installs releases older than its min-release-age. Run this instead: ${npmExecSetupCommandFor(process.platform, releaseAgeRefusedAgents)}` };
267
274
  case "install-node":
268
275
  return { kind: "install-node", instruction: INSTALL_NODE_STEP };
269
276
  case "fix-npm-prefix":
@@ -278,8 +285,9 @@ var nextStepFor = (failure) => {
278
285
  };
279
286
  var describeAgentFailures = (failures, agentName) => failures.map((failure) => ({
280
287
  summary: `${agentName(failure.agent)}: ${failure.detail}`,
281
- next: nextStepFor(failure)
288
+ next: nextStepFor(failure, agentsRefusedForReleaseAge(failures))
282
289
  }));
290
+ var agentsRefusedForReleaseAge = (failures) => failures.filter((failure) => failure.remedy === "use-npm-policy").map((failure) => failure.agent);
283
291
  var agentFailureFollowUps = (failures) => [
284
292
  ...failures.some((failure) => failure.remedy === "install-node") ? ["install-node"] : [],
285
293
  ...failures.some((failure) => failure.remedy === "fix-npm-prefix") ? ["fix-npm-prefix"] : [],
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  NpmInstallError,
3
3
  NpmMissingError,
4
- NpmPermissionError
5
- } from "./chunk-BU2J4P7P.js";
4
+ NpmPermissionError,
5
+ NpmReleaseAgeError
6
+ } from "./chunk-43NHQUCY.js";
6
7
  import {
7
8
  writeFileAtomic
8
9
  } from "./chunk-TODDEIYG.js";
9
10
  import {
10
11
  NPX_LATEST_COMMAND
11
- } from "./chunk-JDIKCM2N.js";
12
+ } from "./chunk-TXXAQRX4.js";
12
13
  import {
13
14
  readSetupAgentFailures
14
- } from "./chunk-6JBX55K4.js";
15
+ } from "./chunk-O5ARO3JM.js";
15
16
 
16
17
  // src/setup/config-write.ts
17
18
  var AgentConfigWriteError = class extends Error {
@@ -62,11 +63,13 @@ var NPM_PERMISSION_REMEDIES = {
62
63
  "file-in-use": "close-node-programs"
63
64
  };
64
65
  var remedyForError = (error) => {
66
+ if (error instanceof NpmReleaseAgeError) return "use-npm-policy";
65
67
  if (error instanceof NpmMissingError) return "install-node";
66
68
  if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
67
69
  return "retry-agent";
68
70
  };
69
71
  var setupFailureDiagnostic = (error) => {
72
+ if (error instanceof NpmReleaseAgeError) return { stage: "runtime-install", diagnosticCode: "npm-release-age" };
70
73
  if (error instanceof AgentConfigError) return { stage: "config-read" };
71
74
  if (error instanceof AgentConfigWriteError) return { stage: "config-write", diagnosticCode: "config-write-failed" };
72
75
  if (error instanceof NpmMissingError) return { stage: "runtime-install", diagnosticCode: "npm-missing" };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  addGeminiMcpServer,
3
3
  removeGeminiMcpServer
4
- } from "./chunk-L6BTSIKF.js";
4
+ } from "./chunk-QTQRQZIU.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT
7
- } from "./chunk-Q6POCQOV.js";
7
+ } from "./chunk-BP5HLKR6.js";
8
8
  import {
9
9
  compatibleToolLookup
10
- } from "./chunk-D7ZWJYXB.js";
10
+ } from "./chunk-WQJ5NJ35.js";
11
11
  import {
12
12
  CLAUDE_HOOK_EVENTS,
13
13
  PUSHARY_MCP_URL,
@@ -19,7 +19,7 @@ import {
19
19
  isPusharyHook,
20
20
  registerHookEntry,
21
21
  removeClaudeMcpServers
22
- } from "./chunk-GJV5RVUU.js";
22
+ } from "./chunk-AQ7L2E2U.js";
23
23
  import {
24
24
  HOOK_COMPATIBLE_PROFILES,
25
25
  PHONE_ANSWERED_TOOLS,
@@ -30,7 +30,7 @@ import {
30
30
  pusharyMissingReason,
31
31
  refusalOutput,
32
32
  withHookHoldBudget
33
- } from "./chunk-6JBX55K4.js";
33
+ } from "./chunk-O5ARO3JM.js";
34
34
 
35
35
  // src/config-document.ts
36
36
  import { parse, stringify } from "smol-toml";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-6JBX55K4.js";
3
+ } from "./chunk-O5ARO3JM.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";