pushary 1.9.121 → 1.9.122

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 (102) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{api-RI52IA65.js → api-KE4OJ3NK.js} +7 -7
  3. package/dist/bin/pushary-bell-hook.js +15 -15
  4. package/dist/bin/pushary-bell.js +3 -3
  5. package/dist/bin/pushary-claude.js +14 -14
  6. package/dist/bin/pushary-clean.js +24 -24
  7. package/dist/bin/pushary-codex-bridge.js +11 -11
  8. package/dist/bin/pushary-codex-hook.js +21 -21
  9. package/dist/bin/pushary-codex-session.js +6 -6
  10. package/dist/bin/pushary-codex.js +8 -8
  11. package/dist/bin/pushary-connect.js +17 -17
  12. package/dist/bin/pushary-daemon.js +29 -29
  13. package/dist/bin/pushary-disconnect.js +17 -17
  14. package/dist/bin/pushary-display-hook.js +7 -7
  15. package/dist/bin/pushary-doctor.js +28 -28
  16. package/dist/bin/pushary-elicitation-hook.js +16 -16
  17. package/dist/bin/pushary-gemini-bridge.js +6 -6
  18. package/dist/bin/pushary-gemini-hook.js +19 -19
  19. package/dist/bin/pushary-hook.js +20 -20
  20. package/dist/bin/pushary-login.js +11 -11
  21. package/dist/bin/pushary-logout.js +15 -15
  22. package/dist/bin/pushary-mcp.js +8 -8
  23. package/dist/bin/pushary-mode.js +7 -7
  24. package/dist/bin/pushary-notification-hook.js +15 -15
  25. package/dist/bin/pushary-opencode-hook.js +18 -18
  26. package/dist/bin/pushary-permission-denied-hook.js +20 -20
  27. package/dist/bin/pushary-permission-hook.js +20 -20
  28. package/dist/bin/pushary-post-hook.js +15 -15
  29. package/dist/bin/pushary-prompt-hook.js +15 -15
  30. package/dist/bin/pushary-session-end-hook.js +15 -15
  31. package/dist/bin/pushary-session-start-hook.js +24 -24
  32. package/dist/bin/pushary-setup.js +35 -35
  33. package/dist/bin/pushary-status.js +20 -20
  34. package/dist/bin/pushary-stop-hook.js +15 -15
  35. package/dist/bin/pushary-stopfailure-hook.js +15 -15
  36. package/dist/bin/pushary-suggestions.js +7 -7
  37. package/dist/bin/pushary-transcript-register.js +7 -7
  38. package/dist/bin/pushary-transcripts.js +14 -14
  39. package/dist/bin/pushary-upgrade.js +30 -30
  40. package/dist/bin/pushary-wait.js +7 -7
  41. package/dist/bin/pushary.js +4 -4
  42. package/dist/{chunk-3HZ374VU.js → chunk-27FILS44.js} +2 -2
  43. package/dist/{chunk-JY2DOJKN.js → chunk-2FOCCDVV.js} +3 -3
  44. package/dist/{chunk-UIHY3ANL.js → chunk-2M7ZV6NA.js} +1 -1
  45. package/dist/{chunk-N47MAVYX.js → chunk-2WGP6QE7.js} +1 -1
  46. package/dist/{chunk-RK7QHQTY.js → chunk-44SXI642.js} +3 -3
  47. package/dist/{chunk-RI5APNBY.js → chunk-6VMEUCKP.js} +3 -3
  48. package/dist/{chunk-F4K2A7DJ.js → chunk-7LZQK7EB.js} +2 -2
  49. package/dist/{chunk-W4OWC34V.js → chunk-7M5M3CF5.js} +2 -2
  50. package/dist/{chunk-QK4I4CHR.js → chunk-7ZTVBYPE.js} +3 -3
  51. package/dist/{chunk-HLZWEGW3.js → chunk-ABYRJP4R.js} +2 -2
  52. package/dist/{chunk-2A4X4ETF.js → chunk-AVSHVOFB.js} +3 -3
  53. package/dist/{chunk-HINZZUOB.js → chunk-B5OX2WCA.js} +1 -1
  54. package/dist/{chunk-TZHTLLXJ.js → chunk-BHQYJFPY.js} +9 -9
  55. package/dist/{chunk-WJUFRGJS.js → chunk-C2L477NM.js} +3 -3
  56. package/dist/{chunk-JK7GROFO.js → chunk-DK6R5IVR.js} +1 -1
  57. package/dist/{chunk-IZ7MIGO7.js → chunk-DRYQ7RLF.js} +1 -1
  58. package/dist/{chunk-B3KFHR43.js → chunk-E3LX6DEF.js} +2 -2
  59. package/dist/{chunk-6LP6G2NA.js → chunk-EBJ5QUVE.js} +1 -1
  60. package/dist/{chunk-GZ3D46PV.js → chunk-EUIDFLPM.js} +4 -2
  61. package/dist/{chunk-5CMNZXJV.js → chunk-I2D23TBS.js} +2 -2
  62. package/dist/{chunk-FG67GH5B.js → chunk-JLUMELYR.js} +1 -1
  63. package/dist/{chunk-IGMI36FA.js → chunk-KQKHSJOM.js} +3 -3
  64. package/dist/{chunk-UI7XS3MN.js → chunk-LRS26PXE.js} +3 -3
  65. package/dist/{chunk-WSYWK4I3.js → chunk-MIO2IWCZ.js} +7 -7
  66. package/dist/{chunk-5UT5EFMH.js → chunk-MKUFVNZL.js} +1 -1
  67. package/dist/{chunk-S6TMCUU7.js → chunk-MXUQJIQS.js} +2 -2
  68. package/dist/{chunk-J7WPO2M2.js → chunk-NPAEVCTN.js} +2 -2
  69. package/dist/{chunk-FBJHC7HW.js → chunk-NZEFACKS.js} +2 -2
  70. package/dist/{chunk-NDOT226I.js → chunk-O2UMQKR4.js} +3 -3
  71. package/dist/{chunk-7FDDOT2A.js → chunk-OJPHNITI.js} +1 -1
  72. package/dist/{chunk-KRKH26TX.js → chunk-P2WA3YY2.js} +1 -1
  73. package/dist/{chunk-ZQHT57AL.js → chunk-P6H2DI6T.js} +3 -3
  74. package/dist/{chunk-EVWF3A5D.js → chunk-PO5Z73HT.js} +1 -1
  75. package/dist/{chunk-D2LPVOG5.js → chunk-PO6ECYXG.js} +1 -1
  76. package/dist/{chunk-XOYPF2BI.js → chunk-Q3KKA5IZ.js} +2 -2
  77. package/dist/{chunk-4LR27PGD.js → chunk-RBPPX663.js} +1 -1
  78. package/dist/{chunk-AXSAL7DK.js → chunk-RF66KSSY.js} +2 -2
  79. package/dist/{chunk-DLXYQE5G.js → chunk-RKXSWF62.js} +3 -3
  80. package/dist/{chunk-O7VVRTOR.js → chunk-SBPVEVLZ.js} +3 -3
  81. package/dist/{chunk-F5FMUDD7.js → chunk-SNF3OTPB.js} +4 -4
  82. package/dist/{chunk-SQPAX33Q.js → chunk-SO44USAF.js} +2 -2
  83. package/dist/{chunk-H2OUB5S5.js → chunk-STGEWWFW.js} +1 -1
  84. package/dist/{chunk-FEJP2I44.js → chunk-TJ32WT6M.js} +4 -4
  85. package/dist/{chunk-X4CDZLUK.js → chunk-WLC3AX6F.js} +5 -5
  86. package/dist/{chunk-7FH6T4EN.js → chunk-WZWZ7UCN.js} +23 -16
  87. package/dist/{chunk-IEZXEY7L.js → chunk-X6WYICTL.js} +4 -4
  88. package/dist/{chunk-SFMJMQJC.js → chunk-XWFYR52C.js} +3 -3
  89. package/dist/{chunk-BPU6P3DS.js → chunk-YANGE5FG.js} +5 -5
  90. package/dist/{chunk-BMME65OT.js → chunk-YWA4Q42Z.js} +1 -1
  91. package/dist/{chunk-6RME4X3J.js → chunk-ZAYXOSEP.js} +3 -3
  92. package/dist/{codex-app-cards-switch-MEVTS3QV.js → codex-app-cards-switch-HUU5TTBZ.js} +6 -6
  93. package/dist/{codex-desktop-launch-E5TZ72YZ.js → codex-desktop-launch-QJOCWURE.js} +1 -1
  94. package/dist/{codex-session-launch-UMVQ7FJA.js → codex-session-launch-DANHY5JS.js} +11 -11
  95. package/dist/{global-upgrade-KHVTFNAK.js → global-upgrade-SIAPPAFR.js} +7 -7
  96. package/dist/{identity-DAUTKB5X.js → identity-DCDWOISV.js} +3 -3
  97. package/dist/{live-capabilities-T2FOTXAH.js → live-capabilities-VB7PM2DJ.js} +3 -3
  98. package/dist/{paths-W5X4C6PA.js → paths-346XNBFK.js} +2 -2
  99. package/dist/{reapply-WW4LJZUD.js → reapply-LMTBF3XQ.js} +19 -19
  100. package/dist/src/index.js +20 -20
  101. package/dist/{upgrade-lock-TJBGZLH6.js → upgrade-lock-YT4O5QW6.js} +3 -3
  102. package/package.json +1 -1
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
3
- } from "./chunk-D2LPVOG5.js";
3
+ } from "./chunk-PO6ECYXG.js";
4
4
  import {
5
5
  declinedAgentsFile,
6
6
  readDeclinedAgents
7
- } from "./chunk-6LP6G2NA.js";
7
+ } from "./chunk-EBJ5QUVE.js";
8
8
  import {
9
9
  OPENCODE_HOOK_BINARY,
10
10
  openCodeConfigDir,
11
11
  openCodePluginArgv,
12
12
  openCodePluginFile
13
- } from "./chunk-O7VVRTOR.js";
13
+ } from "./chunk-SBPVEVLZ.js";
14
14
  import {
15
15
  liveCursorGateCoverage
16
- } from "./chunk-WJUFRGJS.js";
16
+ } from "./chunk-C2L477NM.js";
17
17
  import {
18
18
  compatibleConfigFile,
19
19
  compatibleHookEvents,
20
20
  grokHome,
21
21
  parseConfigDocument
22
- } from "./chunk-6RME4X3J.js";
22
+ } from "./chunk-ZAYXOSEP.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-XOYPF2BI.js";
28
+ } from "./chunk-Q3KKA5IZ.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-GZ3D46PV.js";
56
+ } from "./chunk-EUIDFLPM.js";
57
57
  import {
58
58
  readRegularJsonFile,
59
59
  readRegularTextFile
@@ -2,7 +2,7 @@ import {
2
2
  NpmInstallError,
3
3
  NpmMissingError,
4
4
  NpmPermissionError
5
- } from "./chunk-IGMI36FA.js";
5
+ } from "./chunk-KQKHSJOM.js";
6
6
  import {
7
7
  writeFileAtomic
8
8
  } from "./chunk-T5I4PKOQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-KRKH26TX.js";
3
+ } from "./chunk-P2WA3YY2.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-ROVLRXBI.js";
@@ -13,7 +13,7 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-IGMI36FA.js";
16
+ } from "./chunk-KQKHSJOM.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
19
  } from "./chunk-HI5YJFKW.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-O7VVRTOR.js";
3
+ } from "./chunk-SBPVEVLZ.js";
4
4
  import {
5
5
  keyPrefix
6
6
  } from "./chunk-SZV5SLSD.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-GZ3D46PV.js";
9
+ } from "./chunk-EUIDFLPM.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-T5I4PKOQ.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NLEHRQHL.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-JK7GROFO.js";
8
+ } from "./chunk-DK6R5IVR.js";
9
9
  import {
10
10
  createIo
11
11
  } from "./chunk-FO3MDD26.js";
@@ -14,7 +14,7 @@ import {
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-HINZZUOB.js";
17
+ } from "./chunk-B5OX2WCA.js";
18
18
  import {
19
19
  readKeySource
20
20
  } from "./chunk-SZV5SLSD.js";
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-G66WIAST.js";
8
8
  import {
9
9
  ensureDaemonRunning
10
- } from "./chunk-SFMJMQJC.js";
10
+ } from "./chunk-XWFYR52C.js";
11
11
  import {
12
12
  hookOwnerOf
13
- } from "./chunk-XOYPF2BI.js";
13
+ } from "./chunk-Q3KKA5IZ.js";
14
14
  import {
15
15
  hookMeaning
16
16
  } from "./chunk-7OSBFMRV.js";
@@ -42,7 +42,7 @@ import {
42
42
  claudeConfigDir,
43
43
  codexHome,
44
44
  pusharyDir
45
- } from "./chunk-GZ3D46PV.js";
45
+ } from "./chunk-EUIDFLPM.js";
46
46
  import {
47
47
  getApiKey,
48
48
  getBaseUrl
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-X4CDZLUK.js";
3
+ } from "./chunk-WLC3AX6F.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ROVLRXBI.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-IGMI36FA.js";
6
+ } from "./chunk-KQKHSJOM.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-HI5YJFKW.js";
@@ -3,17 +3,17 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-S6TMCUU7.js";
6
+ } from "./chunk-MXUQJIQS.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-SFMJMQJC.js";
13
+ } from "./chunk-XWFYR52C.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-4LR27PGD.js";
16
+ } from "./chunk-RBPPX663.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeySource
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-SQPAX33Q.js";
3
+ } from "./chunk-SO44USAF.js";
4
4
  import {
5
5
  fetchAsCredential
6
6
  } from "./chunk-E5LU5MJ2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  claudeConfigDir
3
- } from "./chunk-GZ3D46PV.js";
3
+ } from "./chunk-EUIDFLPM.js";
4
4
  import {
5
5
  claudePermissionRulesFromSettings
6
6
  } from "./chunk-HI5YJFKW.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-LS3CQ536.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-IZ7MIGO7.js";
6
+ } from "./chunk-DRYQ7RLF.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -15,7 +15,7 @@ import {
15
15
  isBridgeLocator,
16
16
  isProtectedByScope,
17
17
  registerHookEntry
18
- } from "./chunk-GZ3D46PV.js";
18
+ } from "./chunk-EUIDFLPM.js";
19
19
  import {
20
20
  CURSOR_GATE_EVENTS,
21
21
  HOOK_BUDGETS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-GZ3D46PV.js";
3
+ } from "./chunk-EUIDFLPM.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-T5I4PKOQ.js";
@@ -7,10 +7,10 @@ import {
7
7
  isLocalQuestionHandoff,
8
8
  unavailableQuestionUnlessRefused,
9
9
  waitForQuestion
10
- } from "./chunk-QK4I4CHR.js";
10
+ } from "./chunk-7ZTVBYPE.js";
11
11
  import {
12
12
  getMachineId
13
- } from "./chunk-4LR27PGD.js";
13
+ } from "./chunk-RBPPX663.js";
14
14
  import {
15
15
  hookWaitClamped,
16
16
  hookWaitDeadline,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-O7VVRTOR.js";
3
+ } from "./chunk-SBPVEVLZ.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-ROVLRXBI.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-6RME4X3J.js";
9
+ } from "./chunk-ZAYXOSEP.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-GZ3D46PV.js";
14
+ } from "./chunk-EUIDFLPM.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
17
  } from "./chunk-HI5YJFKW.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-6RME4X3J.js";
3
+ } from "./chunk-ZAYXOSEP.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands
7
- } from "./chunk-XOYPF2BI.js";
7
+ } from "./chunk-Q3KKA5IZ.js";
8
8
  import {
9
9
  AGENT_CHOICES
10
10
  } from "./chunk-LS3CQ536.js";
@@ -19,7 +19,7 @@ import {
19
19
  resolveBridgeStub,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-GZ3D46PV.js";
22
+ } from "./chunk-EUIDFLPM.js";
23
23
  import {
24
24
  readJsonSafe
25
25
  } from "./chunk-T5I4PKOQ.js";
@@ -4,10 +4,10 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-5UT5EFMH.js";
7
+ } from "./chunk-MKUFVNZL.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-EVWF3A5D.js";
10
+ } from "./chunk-PO5Z73HT.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
13
  } from "./chunk-SZV5SLSD.js";
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-GZ3D46PV.js";
35
+ } from "./chunk-EUIDFLPM.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-IGMI36FA.js";
38
+ } from "./chunk-KQKHSJOM.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-HINZZUOB.js";
3
+ } from "./chunk-B5OX2WCA.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-UIHY3ANL.js";
6
+ } from "./chunk-2M7ZV6NA.js";
7
7
  import {
8
8
  fetchAsCredential
9
9
  } from "./chunk-E5LU5MJ2.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-GZ3D46PV.js";
6
+ } from "./chunk-EUIDFLPM.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-WJUFRGJS.js";
4
+ } from "./chunk-C2L477NM.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-NDOT226I.js";
7
+ } from "./chunk-O2UMQKR4.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-6RME4X3J.js";
10
+ } from "./chunk-ZAYXOSEP.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-QK4I4CHR.js";
13
+ } from "./chunk-7ZTVBYPE.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
@@ -39,17 +39,17 @@ import {
39
39
  reportClientError,
40
40
  sendNotification,
41
41
  waitForAnswer
42
- } from "./chunk-QK4I4CHR.js";
42
+ } from "./chunk-7ZTVBYPE.js";
43
43
  import {
44
44
  isRetryable,
45
45
  withRetry
46
- } from "./chunk-SQPAX33Q.js";
46
+ } from "./chunk-SO44USAF.js";
47
47
  import {
48
48
  fetchAsCredential
49
49
  } from "./chunk-E5LU5MJ2.js";
50
50
  import {
51
51
  getMachineId
52
- } from "./chunk-4LR27PGD.js";
52
+ } from "./chunk-RBPPX663.js";
53
53
  import {
54
54
  reportedInstallSource
55
55
  } from "./chunk-NCHNITQW.js";
@@ -59,11 +59,11 @@ import {
59
59
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
60
60
  canonicalJson,
61
61
  claudeConfigDir
62
- } from "./chunk-GZ3D46PV.js";
62
+ } from "./chunk-EUIDFLPM.js";
63
63
  import {
64
64
  compareVersion,
65
65
  parseVersion
66
- } from "./chunk-IGMI36FA.js";
66
+ } from "./chunk-KQKHSJOM.js";
67
67
  import {
68
68
  getApiKey,
69
69
  getBaseUrl
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-3HZ374VU.js";
3
+ } from "./chunk-27FILS44.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
7
7
  installHermesPlugin,
8
8
  refreshHermesPluginFiles,
9
9
  shippedHermesPlugin
10
- } from "./chunk-F4K2A7DJ.js";
10
+ } from "./chunk-7LZQK7EB.js";
11
11
  import {
12
12
  fxIgnoresInstructionsFile,
13
13
  fxInstructionsBody,
@@ -16,7 +16,7 @@ import {
16
16
  macAppFxBridge,
17
17
  refreshClineKey,
18
18
  switchFxHttpEntryToBridge
19
- } from "./chunk-F5FMUDD7.js";
19
+ } from "./chunk-SNF3OTPB.js";
20
20
  import {
21
21
  OPENCODE_HOOK_BINARY,
22
22
  agentHookOwner,
@@ -28,16 +28,16 @@ import {
28
28
  openCodePluginDir,
29
29
  openCodeWired,
30
30
  withOpenCodeAskRules
31
- } from "./chunk-O7VVRTOR.js";
31
+ } from "./chunk-SBPVEVLZ.js";
32
32
  import {
33
33
  detectClaudeVersion
34
- } from "./chunk-KRKH26TX.js";
34
+ } from "./chunk-P2WA3YY2.js";
35
35
  import {
36
36
  addCompatibleHooks,
37
37
  compatibleConfigFile,
38
38
  compatibleInstructionsFile,
39
39
  hasCompatibleHooks
40
- } from "./chunk-6RME4X3J.js";
40
+ } from "./chunk-ZAYXOSEP.js";
41
41
  import {
42
42
  GEMINI_HOOK_BINARY,
43
43
  addGeminiHooks,
@@ -49,7 +49,7 @@ import {
49
49
  geminiWired,
50
50
  hasGeminiHooks,
51
51
  planHooks
52
- } from "./chunk-XOYPF2BI.js";
52
+ } from "./chunk-Q3KKA5IZ.js";
53
53
  import {
54
54
  CLAUDE_HOOK_BINARY,
55
55
  CLAUDE_HOOK_EVENTS,
@@ -85,6 +85,7 @@ import {
85
85
  geminiMd,
86
86
  guardBinary,
87
87
  hasCodexHooks,
88
+ namesCliBinary,
88
89
  namesOurBinary,
89
90
  needsReregistration,
90
91
  pusharyDir,
@@ -95,13 +96,13 @@ import {
95
96
  renderAgentInstructions,
96
97
  supportedClaudeEvents,
97
98
  vscodePluginMcp
98
- } from "./chunk-GZ3D46PV.js";
99
+ } from "./chunk-EUIDFLPM.js";
99
100
  import {
100
101
  formatVersion,
101
102
  hookCommandsUseBareNames,
102
103
  resolveGlobalBinDir,
103
104
  resolveGlobalBinary
104
- } from "./chunk-IGMI36FA.js";
105
+ } from "./chunk-KQKHSJOM.js";
105
106
  import {
106
107
  readJsonSafe,
107
108
  writeFileAtomic,
@@ -123,6 +124,7 @@ import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
123
124
  var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
124
125
  var CLAUDE_CLI_BINARIES = new Set(CLAUDE_HOOK_EVENTS.map((hook) => hook.binary));
125
126
  var registrationHolder = (settings) => registrationHolderOf(settings, CLAUDE_CLI_BINARIES);
127
+ var holdsCliHooks = (settings) => registeredCommands(settings).some(({ command }) => namesCliBinary(command, CLAUDE_CLI_BINARIES));
126
128
  var registeredPusharyEvents = (settings) => new Set(
127
129
  registeredCommands(settings).filter(({ command }) => namesOurBinary(command, CLAUDE_CLI_BINARIES)).map(({ event }) => event)
128
130
  );
@@ -131,11 +133,13 @@ var reregisterVerdict = ({ settings, stored, version }) => {
131
133
  if (holder === "none") return { kind: "not_wired" };
132
134
  if (holder === "app") return { kind: "app_owned" };
133
135
  const unproven = claudeUnprovenHolds(settings);
134
- if (unproven.length === 0 && !needsReregistration(stored, version)) return { kind: "current" };
135
136
  const supported = new Set(supportedClaudeEvents(version).map((hook) => hook.event));
136
137
  const present = registeredPusharyEvents(settings);
137
138
  const missing = [...supported].filter((event) => !present.has(event));
138
- const extra = [...present].filter((event) => !supported.has(event));
139
+ if (unproven.length === 0 && missing.length === 0 && !needsReregistration(stored, version)) {
140
+ return { kind: "current" };
141
+ }
142
+ const extra = version === null ? [] : [...present].filter((event) => !supported.has(event));
139
143
  const repairable = unproven.filter((event) => supported.has(event));
140
144
  return missing.length > 0 || extra.length > 0 || repairable.length > 0 ? { kind: "stale", version, missing, extra, unproven: repairable } : { kind: "record_only", version };
141
145
  };
@@ -161,7 +165,7 @@ var readJson = (filePath) => {
161
165
  return null;
162
166
  };
163
167
  var writeJson = (filePath, data) => writeJsonAtomic(filePath, data);
164
- var hasPusharyClaudeHooks = (settings) => JSON.stringify(settings.hooks ?? {}).includes(CLAUDE_HOOK_BINARY);
168
+ var hasPusharyClaudeHooks = (settings) => holdsCliHooks(settings);
165
169
  var hasPusharyMcp = (claudeJson2) => !!claudeJson2.mcpServers?.pushary;
166
170
  var PRIVATE_TO_OWNER = 384;
167
171
  var modeToPreserve = (filePath) => {
@@ -171,6 +175,9 @@ var modeToPreserve = (filePath) => {
171
175
  return PRIVATE_TO_OWNER;
172
176
  }
173
177
  };
178
+ var OWNER_WRITE = 128;
179
+ var isReadOnly = (filePath) => (modeToPreserve(filePath) & OWNER_WRITE) === 0;
180
+ var writableModeToPreserve = (filePath) => isReadOnly(filePath) ? void 0 : modeToPreserve(filePath);
174
181
  var wouldWriteBareNames = (resolve, probe) => resolve(probe) === void 0;
175
182
  var reapplyClaudeSettings = (apiKey, paths = {}) => {
176
183
  const settingsPath = paths.settingsPath ?? claudeSettings();
@@ -190,7 +197,7 @@ var reapplyClaudeSettings = (apiKey, paths = {}) => {
190
197
  addPusharyToolPermissions(s);
191
198
  const binary = hookCommandsUseBareNames(paths.platform ?? process.platform) ? void 0 : (paths.resolveBinary ?? resolveGlobalBinary)(CLAUDE_HOOK_BINARY);
192
199
  addPusharyHooks(s, binary ? dirname(binary) : void 0, (paths.detectVersion ?? detectClaudeVersion)());
193
- writeJson(settingsPath, s);
200
+ writeJsonAtomic(settingsPath, s, writableModeToPreserve(settingsPath));
194
201
  hooks = true;
195
202
  } catch {
196
203
  failed = true;
@@ -200,7 +207,7 @@ var reapplyClaudeSettings = (apiKey, paths = {}) => {
200
207
  if (!claudeJsonWritable) throw new Error(".claude.json could not be parsed");
201
208
  const cj = claudeJson2;
202
209
  addClaudeMcpServer(cj, apiKey);
203
- writeJson(claudeJsonPath, cj);
210
+ writeJsonAtomic(claudeJsonPath, cj, PRIVATE_TO_OWNER);
204
211
  mcp = true;
205
212
  } catch {
206
213
  failed = true;
@@ -224,10 +231,10 @@ var reapplyClaudeForVersion = (apiKey, paths = {}) => {
224
231
  return { verdict: verdict.kind, rewrote: false, missing: [] };
225
232
  }
226
233
  const resolveBinary = paths.resolveBinary ?? resolveGlobalBinary;
227
- if (verdict.kind === "stale" && wouldWriteBareNames(resolveBinary, CLAUDE_HOOK_BINARY)) {
234
+ if (verdict.kind === "stale" && (wouldWriteBareNames(resolveBinary, CLAUDE_HOOK_BINARY) || isReadOnly(settingsPath))) {
228
235
  return { verdict: "stale", rewrote: false, missing: verdict.missing };
229
236
  }
230
- const rewrote = verdict.kind === "stale" ? reapplyClaudeSettings(apiKey, { ...paths, settingsPath }).hooks : false;
237
+ const rewrote = verdict.kind === "stale" ? reapplyClaudeSettings(apiKey, { ...paths, settingsPath, detectVersion: () => version }).hooks : false;
231
238
  if (verdict.kind === "stale" && !rewrote) return { verdict: "stale", rewrote: false, missing: verdict.missing };
232
239
  writeJsonAtomic(receiptPath, receiptFor(version));
233
240
  return {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-7FDDOT2A.js";
4
+ } from "./chunk-OJPHNITI.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
9
  waitForQuestion
10
- } from "./chunk-QK4I4CHR.js";
10
+ } from "./chunk-7ZTVBYPE.js";
11
11
  import {
12
12
  SubscriptionRequiredError
13
- } from "./chunk-SQPAX33Q.js";
13
+ } from "./chunk-SO44USAF.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-4LR27PGD.js";
16
+ } from "./chunk-RBPPX663.js";
17
17
  import {
18
18
  ASK_CONTEXT_MAX,
19
19
  agentQuestionContext,
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-4LR27PGD.js";
7
+ } from "./chunk-RBPPX663.js";
8
8
  import {
9
9
  readControlMode
10
10
  } from "./chunk-SZV5SLSD.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-GZ3D46PV.js";
13
+ } from "./chunk-EUIDFLPM.js";
14
14
  import {
15
15
  resolveGlobalBinary
16
- } from "./chunk-IGMI36FA.js";
16
+ } from "./chunk-KQKHSJOM.js";
17
17
  import {
18
18
  getApiKey
19
19
  } from "./chunk-2M7FELUY.js";
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-5CMNZXJV.js";
6
+ } from "./chunk-I2D23TBS.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-S6TMCUU7.js";
9
+ } from "./chunk-MXUQJIQS.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,19 +18,19 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-H2OUB5S5.js";
21
+ } from "./chunk-STGEWWFW.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-GZ3D46PV.js";
26
+ } from "./chunk-EUIDFLPM.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
31
  readGlobalCliInstallAt,
32
32
  readGlobalPrefix
33
- } from "./chunk-IGMI36FA.js";
33
+ } from "./chunk-KQKHSJOM.js";
34
34
  import {
35
35
  EXIT
36
36
  } from "./chunk-BG4HHB7E.js";
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-JY2DOJKN.js";
15
+ } from "./chunk-2FOCCDVV.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CLAUDE_CODE_AGENT
3
- } from "./chunk-X4CDZLUK.js";
3
+ } from "./chunk-WLC3AX6F.js";
4
4
  import {
5
5
  addGeminiMcpServer,
6
6
  removeGeminiMcpServer
7
- } from "./chunk-XOYPF2BI.js";
7
+ } from "./chunk-Q3KKA5IZ.js";
8
8
  import {
9
9
  compatibleToolLookup
10
10
  } from "./chunk-7OSBFMRV.js";
@@ -19,7 +19,7 @@ import {
19
19
  isPusharyHook,
20
20
  registerHookEntry,
21
21
  removeClaudeMcpServers
22
- } from "./chunk-GZ3D46PV.js";
22
+ } from "./chunk-EUIDFLPM.js";
23
23
  import {
24
24
  HOOK_COMPATIBLE_PROFILES,
25
25
  PHONE_ANSWERED_TOOLS,