@pushary/agent-hooks 1.9.81 → 1.9.83

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 (137) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/data/SKILL.md +132 -465
  3. package/data/cowork/SKILL.md +8 -8
  4. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  5. package/data/cursor-plugin/CHANGELOG.md +8 -0
  6. package/data/cursor-plugin/commands/notify-when-done.md +1 -1
  7. package/data/cursor-plugin/rules/pushary.mdc +5 -4
  8. package/data/cursor-plugin/skills/pushary/SKILL.md +131 -464
  9. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  10. package/data/vscode-plugin/CHANGELOG.md +8 -0
  11. package/data/vscode-plugin/commands/notify-when-done.md +1 -1
  12. package/data/vscode-plugin/skills/pushary/SKILL.md +131 -464
  13. package/dist/{api-VFUZ5HBR.js → api-EKLKVJQG.js} +11 -11
  14. package/dist/bin/pushary-bell-hook.js +26 -26
  15. package/dist/bin/pushary-bell.js +11 -11
  16. package/dist/bin/pushary-claude.js +27 -27
  17. package/dist/bin/pushary-clean.js +37 -34
  18. package/dist/bin/pushary-codex-bridge.js +22 -22
  19. package/dist/bin/pushary-codex-hook.js +31 -31
  20. package/dist/bin/pushary-codex-session.js +8 -8
  21. package/dist/bin/pushary-codex.js +14 -14
  22. package/dist/bin/pushary-connect.js +27 -27
  23. package/dist/bin/pushary-cowork.js +6 -6
  24. package/dist/bin/pushary-daemon.js +39 -39
  25. package/dist/bin/pushary-disconnect.js +26 -26
  26. package/dist/bin/pushary-display-hook.js +17 -17
  27. package/dist/bin/pushary-doctor.js +48 -44
  28. package/dist/bin/pushary-elicitation-hook.js +26 -26
  29. package/dist/bin/pushary-gemini-bridge.js +16 -16
  30. package/dist/bin/pushary-gemini-hook.js +28 -28
  31. package/dist/bin/pushary-hook.js +30 -30
  32. package/dist/bin/pushary-login.js +21 -21
  33. package/dist/bin/pushary-logout.js +25 -25
  34. package/dist/bin/pushary-mcp.js +12 -12
  35. package/dist/bin/pushary-mode.js +16 -16
  36. package/dist/bin/pushary-notification-hook.js +25 -25
  37. package/dist/bin/pushary-opencode-hook.js +27 -27
  38. package/dist/bin/pushary-permission-denied-hook.js +30 -30
  39. package/dist/bin/pushary-permission-hook.js +30 -30
  40. package/dist/bin/pushary-post-hook.js +25 -25
  41. package/dist/bin/pushary-prompt-hook.js +25 -25
  42. package/dist/bin/pushary-session-end-hook.js +27 -27
  43. package/dist/bin/pushary-session-start-hook.js +35 -35
  44. package/dist/bin/pushary-setup.js +52 -49
  45. package/dist/bin/pushary-stats.js +6 -6
  46. package/dist/bin/pushary-status.js +32 -32
  47. package/dist/bin/pushary-stop-hook.js +25 -25
  48. package/dist/bin/pushary-stopfailure-hook.js +25 -25
  49. package/dist/bin/pushary-suggestions.js +16 -16
  50. package/dist/bin/pushary-transcript-register.js +17 -17
  51. package/dist/bin/pushary-transcripts.js +19 -19
  52. package/dist/bin/pushary-upgrade.js +40 -40
  53. package/dist/bin/pushary-wait.js +16 -16
  54. package/dist/bin/pushary.js +8 -8
  55. package/dist/{chunk-DPP3ZCEE.js → chunk-2B7YU4EK.js} +3 -3
  56. package/dist/{chunk-ALTTZKDU.js → chunk-2BDGGE2G.js} +9 -8
  57. package/dist/{chunk-TTTK44RK.js → chunk-2KVELJZX.js} +1 -1
  58. package/dist/{chunk-4TR4G7A4.js → chunk-35ABA2JQ.js} +1 -1
  59. package/dist/{chunk-X772USE7.js → chunk-42RQG2VG.js} +7 -6
  60. package/dist/{chunk-74QJBFMG.js → chunk-44R5ATBR.js} +2 -2
  61. package/dist/{chunk-5WC7TXSS.js → chunk-46P53RBT.js} +13 -13
  62. package/dist/{chunk-LFEJVQWI.js → chunk-4P256ZAU.js} +6 -6
  63. package/dist/{chunk-NVEDZZ3V.js → chunk-5FM4BQOM.js} +14 -12
  64. package/dist/{chunk-NK3I2QQA.js → chunk-5UPZR3C3.js} +4 -4
  65. package/dist/{chunk-IQQQ2LGB.js → chunk-6BD5ZZLL.js} +5 -5
  66. package/dist/{chunk-TJZIUFWK.js → chunk-6CJ4MSZU.js} +20 -19
  67. package/dist/{chunk-5WIVX2NN.js → chunk-6PWU2LBT.js} +4 -4
  68. package/dist/{chunk-SFUJLUBM.js → chunk-7EIMASAA.js} +1 -1
  69. package/dist/{chunk-KXSZ43Z6.js → chunk-7MRX5JYA.js} +9 -9
  70. package/dist/{chunk-HG5EUDF3.js → chunk-7YYJASRF.js} +2 -2
  71. package/dist/{chunk-AZV3DQQU.js → chunk-A3TMREYJ.js} +4 -4
  72. package/dist/{chunk-PJ26BODT.js → chunk-ACM4OINM.js} +1 -1
  73. package/dist/{chunk-7JU6DPO7.js → chunk-ASEHRBD4.js} +3 -3
  74. package/dist/{chunk-B2HMISVL.js → chunk-B2RDWRKR.js} +86 -46
  75. package/dist/{chunk-QNEWV4JV.js → chunk-BG4YJEFE.js} +1 -1
  76. package/dist/{chunk-K5QN6V5K.js → chunk-BJN7LMMK.js} +9 -6
  77. package/dist/{chunk-3BFCJZBU.js → chunk-BLM6O2QL.js} +1 -1
  78. package/dist/{chunk-DLBUDQEE.js → chunk-BUXMFD5C.js} +4 -4
  79. package/dist/{chunk-M5XNFUXN.js → chunk-C5EWCNJF.js} +1 -1
  80. package/dist/{chunk-35S7VB26.js → chunk-CVPVP4KP.js} +5 -5
  81. package/dist/{chunk-BB4W35D6.js → chunk-ELYJNNXG.js} +10 -10
  82. package/dist/{chunk-VYRJAPZ6.js → chunk-EMT7I74E.js} +3 -3
  83. package/dist/{chunk-NPBPH7KI.js → chunk-FEF3ILT6.js} +2 -2
  84. package/dist/{chunk-ESS7CW3I.js → chunk-FGWRVOBP.js} +5 -5
  85. package/dist/{chunk-LJ4TUZJV.js → chunk-G4HTRKCP.js} +6 -6
  86. package/dist/{chunk-UUASO2FU.js → chunk-GGI6GTBL.js} +4 -4
  87. package/dist/{chunk-RVC7OSC7.js → chunk-GKWPIE6R.js} +1 -1
  88. package/dist/{chunk-KERGWHCK.js → chunk-GMZTABMV.js} +7 -7
  89. package/dist/{chunk-IA53GEP5.js → chunk-HCLP2QBX.js} +6 -6
  90. package/dist/{chunk-ZBST77LF.js → chunk-HIMEVTA5.js} +3 -3
  91. package/dist/{chunk-3YOXBN7V.js → chunk-IBULUTHA.js} +4 -4
  92. package/dist/{chunk-W3VRQEL3.js → chunk-IUZCERPQ.js} +2 -2
  93. package/dist/{chunk-YAAJ3VZA.js → chunk-J2PAQ3HF.js} +6 -6
  94. package/dist/{chunk-WPGSQRMW.js → chunk-JIC5PGNI.js} +17 -11
  95. package/dist/{chunk-YNWEE2WC.js → chunk-KR3KVDXD.js} +1 -1
  96. package/dist/{chunk-WG67W43Y.js → chunk-L4THAI7Q.js} +1 -1
  97. package/dist/{chunk-ZBYZCM6Y.js → chunk-LLQBPDFQ.js} +2 -2
  98. package/dist/{chunk-DF7A5AWF.js → chunk-MA6FJ7U3.js} +3 -3
  99. package/dist/{chunk-ER4UCECJ.js → chunk-MND7HQ4P.js} +1 -1
  100. package/dist/{chunk-ID46TTYS.js → chunk-NDLOWIYO.js} +4 -4
  101. package/dist/{chunk-IO3OLTED.js → chunk-OKZC4FHN.js} +4 -4
  102. package/dist/{chunk-JTO6UPTJ.js → chunk-OUYFUUWB.js} +2 -2
  103. package/dist/{chunk-SEVGKJ7K.js → chunk-QPJQAE2L.js} +4 -4
  104. package/dist/{chunk-JTYZEP4Q.js → chunk-S55CXRFD.js} +1 -1
  105. package/dist/{chunk-JXE4UQFJ.js → chunk-SN22OXY3.js} +1 -1
  106. package/dist/{chunk-BYFFELB3.js → chunk-SSNLMIFR.js} +6 -6
  107. package/dist/{chunk-X2P3O4PX.js → chunk-SVAGMJOH.js} +1 -1
  108. package/dist/{chunk-ONUAAXAW.js → chunk-TBU4WXA4.js} +1 -1
  109. package/dist/{chunk-VII55DVC.js → chunk-TMBLBDPB.js} +2 -2
  110. package/dist/{chunk-YIKIQ6YN.js → chunk-TNWQ6SKS.js} +3 -3
  111. package/dist/{chunk-47RUEZZA.js → chunk-UNEJNC6X.js} +5 -5
  112. package/dist/{chunk-ZIJKTWNO.js → chunk-VBY2AHSX.js} +1 -1
  113. package/dist/{chunk-HNUK557P.js → chunk-VCMDY6YL.js} +3 -3
  114. package/dist/{chunk-IXVMMDIG.js → chunk-VRHVOMH2.js} +3 -3
  115. package/dist/{chunk-FIMSM5SW.js → chunk-VUI4HK5O.js} +2 -2
  116. package/dist/{chunk-GOYYPBBJ.js → chunk-XHHX63PY.js} +3 -3
  117. package/dist/{chunk-7WCB2BC4.js → chunk-XYEGVQST.js} +7 -7
  118. package/dist/{chunk-VK2CHU3L.js → chunk-Y32CL7XZ.js} +1 -1
  119. package/dist/{chunk-IS5YVKUX.js → chunk-YIAJOV2X.js} +7 -5
  120. package/dist/{chunk-CRKODLLY.js → chunk-YZVAAY6B.js} +2 -2
  121. package/dist/{chunk-QZ666HLH.js → chunk-ZGZ2L3QN.js} +5 -5
  122. package/dist/{chunk-LJFB5ZJ4.js → chunk-ZS27XXDA.js} +4 -4
  123. package/dist/{chunk-QTOLNRET.js → chunk-ZVU6WMMU.js} +10 -0
  124. package/dist/{codex-app-cards-switch-ZL6OHUXQ.js → codex-app-cards-switch-CTAOTOCH.js} +12 -12
  125. package/dist/{codex-desktop-launch-LQF5CPKU.js → codex-desktop-launch-2DZVA5C7.js} +1 -1
  126. package/dist/{codex-session-launch-5WBL5YHX.js → codex-session-launch-TMOSTWEH.js} +19 -19
  127. package/dist/{config-MZDRETL2.js → config-OV6WLZXO.js} +3 -3
  128. package/dist/{global-upgrade-HDDPHNGX.js → global-upgrade-FI42NJNL.js} +11 -11
  129. package/dist/{identity-RNZLFMKW.js → identity-PCA25OI5.js} +5 -5
  130. package/dist/{live-capabilities-Y2Q5QBVK.js → live-capabilities-CYFXHTOI.js} +6 -6
  131. package/dist/{paths-WILX6YI3.js → paths-4YFDMUK6.js} +4 -4
  132. package/dist/{reapply-KF7ZZSA2.js → reapply-PBQ46BPS.js} +28 -28
  133. package/dist/src/index.js +29 -29
  134. package/dist/{upgrade-lock-7Q4VWMDA.js → upgrade-lock-22J2AMVY.js} +5 -5
  135. package/dist/usage-7KTINNRK.js +11 -0
  136. package/package.json +1 -1
  137. package/dist/usage-MSILPJVQ.js +0 -11
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  installNetworkDefaults
4
- } from "../chunk-ID46TTYS.js";
5
- import "../chunk-WPGSQRMW.js";
6
- import "../chunk-B2HMISVL.js";
7
- import "../chunk-IS5YVKUX.js";
8
- import "../chunk-ONUAAXAW.js";
4
+ } from "../chunk-NDLOWIYO.js";
5
+ import "../chunk-JIC5PGNI.js";
6
+ import "../chunk-B2RDWRKR.js";
7
+ import "../chunk-YIAJOV2X.js";
8
+ import "../chunk-TBU4WXA4.js";
9
9
  import "../chunk-PPY5N2E6.js";
10
10
  import {
11
11
  EXIT
@@ -14,11 +14,11 @@ import {
14
14
  LISTED_COMMANDS,
15
15
  renderHelp,
16
16
  resolveCommandName
17
- } from "../chunk-TTTK44RK.js";
17
+ } from "../chunk-2KVELJZX.js";
18
18
  import {
19
19
  getPackageVersion
20
- } from "../chunk-QTOLNRET.js";
21
- import "../chunk-WG67W43Y.js";
20
+ } from "../chunk-ZVU6WMMU.js";
21
+ import "../chunk-L4THAI7Q.js";
22
22
  import "../chunk-MLKGABMK.js";
23
23
 
24
24
  // src/cli/runtime.ts
@@ -7,13 +7,13 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-B2HMISVL.js";
10
+ } from "./chunk-B2RDWRKR.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-IS5YVKUX.js";
13
+ } from "./chunk-YIAJOV2X.js";
14
14
  import {
15
15
  getPackageVersion
16
- } from "./chunk-QTOLNRET.js";
16
+ } from "./chunk-ZVU6WMMU.js";
17
17
 
18
18
  // src/codex-app-server.ts
19
19
  import { existsSync, realpathSync } from "fs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-UUASO2FU.js";
3
+ } from "./chunk-GGI6GTBL.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-X772USE7.js";
9
+ } from "./chunk-42RQG2VG.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-JXE4UQFJ.js";
12
+ } from "./chunk-SN22OXY3.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -17,11 +17,12 @@ import {
17
17
  geminiSettings,
18
18
  guardedArgv,
19
19
  pusharyDir,
20
- vscodePluginDir
21
- } from "./chunk-B2HMISVL.js";
20
+ vscodePluginDir,
21
+ windowsNodeLauncherFor
22
+ } from "./chunk-B2RDWRKR.js";
22
23
  import {
23
24
  readJsonSafe
24
- } from "./chunk-IS5YVKUX.js";
25
+ } from "./chunk-YIAJOV2X.js";
25
26
  import {
26
27
  HOOK_BUDGETS,
27
28
  HOOK_COMPATIBLE_PROFILES,
@@ -29,7 +30,7 @@ import {
29
30
  OPENCODE_APPROVAL_EVENT,
30
31
  hookCompatibleProfile,
31
32
  isRecord
32
- } from "./chunk-WG67W43Y.js";
33
+ } from "./chunk-L4THAI7Q.js";
33
34
 
34
35
  // src/opencode-plugin.ts
35
36
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -411,7 +412,7 @@ import { homedir } from "os";
411
412
  import { join } from "path";
412
413
  var OPENCODE_HOOK_BINARY = "pushary-opencode-hook";
413
414
  var OPENCODE_HOOK_ARGS = ["--source", "opencode"];
414
- var openCodeHookArgv = (resolvedBinary) => guardedArgv({ kind: "binary", path: resolvedBinary ?? OPENCODE_HOOK_BINARY, runtime: "node" }, OPENCODE_HOOK_ARGS);
415
+ var openCodeHookArgv = (resolvedBinary, platform = process.platform) => guardedArgv({ kind: "binary", path: resolvedBinary ?? OPENCODE_HOOK_BINARY, runtime: "node" }, OPENCODE_HOOK_ARGS, platform, windowsNodeLauncherFor(platform));
415
416
  var openCodeConfigDirFrom = (home, env = process.env) => env.OPENCODE_CONFIG_DIR?.trim() || join(env.XDG_CONFIG_HOME?.trim() || join(home, ".config"), "opencode");
416
417
  var openCodeConfigDir = () => openCodeConfigDirFrom(homedir());
417
418
  var OPENCODE_PLUGIN_PATH = `${OPENCODE_PLUGIN_DIR}/${OPENCODE_PLUGIN_FILE}`;
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-WG67W43Y.js";
5
+ } from "./chunk-L4THAI7Q.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-WG67W43Y.js";
5
+ } from "./chunk-L4THAI7Q.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -1,24 +1,25 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-JXE4UQFJ.js";
3
+ } from "./chunk-SN22OXY3.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-VK2CHU3L.js";
6
+ } from "./chunk-Y32CL7XZ.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
10
10
  HOOK_SHELL,
11
11
  hasCodexHooks,
12
12
  holdBudgetOf,
13
+ hookBinaryNameOf,
13
14
  isProtectedByScope,
14
15
  registerHookEntry
15
- } from "./chunk-B2HMISVL.js";
16
+ } from "./chunk-B2RDWRKR.js";
16
17
  import {
17
18
  CURSOR_GATE_EVENTS,
18
19
  HOOK_BUDGETS,
19
20
  HOOK_LOCATOR_BINARY,
20
21
  hookCommandHoldBudget
21
- } from "./chunk-WG67W43Y.js";
22
+ } from "./chunk-L4THAI7Q.js";
22
23
 
23
24
  // src/diagnostics/bridge.ts
24
25
  import { execFileSync } from "child_process";
@@ -204,7 +205,7 @@ var pusharyHookExecutable = (command) => {
204
205
  for (const raw of tokens.reverse()) {
205
206
  const unquoted = raw[0] === '"' && raw.at(-1) === '"' || raw[0] === "'" && raw.at(-1) === "'" ? raw.slice(1, -1) : raw;
206
207
  const token = command.startsWith(`${HOOK_SHELL} `) && raw[0] === '"' ? unquoted.replace(/\\(["\\$`])/g, "$1") : unquoted;
207
- const name = token.split(/[/\\]/).pop()?.replace(/\.(cmd|exe|mjs)$/i, "") ?? "";
208
+ const name = hookBinaryNameOf(token.split(/[/\\]/).pop() ?? "");
208
209
  if (name === HOOK_LOCATOR_BINARY || EXACT_HOOK_BINARY.test(name)) return token;
209
210
  }
210
211
  return null;
@@ -321,7 +322,7 @@ var commandsIn = (value) => {
321
322
  var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
322
323
  var hasPaidPusharyCommand = (value) => commandsIn(value).some((command) => {
323
324
  const executable = pusharyHookExecutable(command);
324
- const name = executable?.split(/[/\\]/).pop()?.replace(/\.(cmd|exe|mjs)$/i, "");
325
+ const name = executable === null ? void 0 : hookBinaryNameOf(executable.split(/[/\\]/).pop() ?? "");
325
326
  return executable !== null && !isBridgeLocator(executable) && name !== BELL_HOOK_BINARY;
326
327
  });
327
328
  var hasAppCommand = (value) => commandsIn(value).some((command) => {
@@ -4,10 +4,10 @@ import {
4
4
  keyPrefix,
5
5
  readConfigFileKey,
6
6
  readMacAppKeyPrefix
7
- } from "./chunk-3YOXBN7V.js";
7
+ } from "./chunk-IBULUTHA.js";
8
8
  import {
9
9
  NPX_LATEST_COMMAND
10
- } from "./chunk-TTTK44RK.js";
10
+ } from "./chunk-2KVELJZX.js";
11
11
 
12
12
  // src/key-signed-out.ts
13
13
  var VERDICT_BY_CHECK = {
@@ -4,24 +4,24 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-BYFFELB3.js";
7
+ } from "./chunk-SSNLMIFR.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-X2P3O4PX.js";
11
+ } from "./chunk-SVAGMJOH.js";
12
12
  import {
13
13
  isAdmitted,
14
14
  readAdmissionRules
15
- } from "./chunk-7WCB2BC4.js";
15
+ } from "./chunk-XYEGVQST.js";
16
16
  import {
17
17
  isDeferAnswer,
18
18
  oncePerSession
19
- } from "./chunk-ZIJKTWNO.js";
19
+ } from "./chunk-VBY2AHSX.js";
20
20
  import {
21
21
  activeHookSource,
22
22
  activeIdentity,
23
23
  namedSource
24
- } from "./chunk-UUASO2FU.js";
24
+ } from "./chunk-GGI6GTBL.js";
25
25
  import {
26
26
  DEFAULT_SESSION,
27
27
  UNNAMED_ACTION,
@@ -45,10 +45,10 @@ import {
45
45
  reportEvent,
46
46
  scopePathFor,
47
47
  settleQuestionsForToolUse
48
- } from "./chunk-KXSZ43Z6.js";
48
+ } from "./chunk-7MRX5JYA.js";
49
49
  import {
50
50
  repoKeyFor
51
- } from "./chunk-M5XNFUXN.js";
51
+ } from "./chunk-C5EWCNJF.js";
52
52
  import {
53
53
  askUser,
54
54
  cancelQuestion,
@@ -65,20 +65,20 @@ import {
65
65
  waitForQuestion,
66
66
  waitsForThePhone,
67
67
  withdrawQuestion
68
- } from "./chunk-IQQQ2LGB.js";
68
+ } from "./chunk-6BD5ZZLL.js";
69
69
  import {
70
70
  getMachineId
71
- } from "./chunk-WPGSQRMW.js";
71
+ } from "./chunk-JIC5PGNI.js";
72
72
  import {
73
73
  claudeConfigDir
74
- } from "./chunk-B2HMISVL.js";
74
+ } from "./chunk-B2RDWRKR.js";
75
75
  import {
76
76
  getApiKey,
77
77
  getBaseUrl
78
- } from "./chunk-ONUAAXAW.js";
78
+ } from "./chunk-TBU4WXA4.js";
79
79
  import {
80
80
  NPX_LATEST_COMMAND
81
- } from "./chunk-TTTK44RK.js";
81
+ } from "./chunk-2KVELJZX.js";
82
82
  import {
83
83
  AGENT_QUESTION_STRATEGY,
84
84
  AGENT_QUESTION_TOOL,
@@ -133,7 +133,7 @@ import {
133
133
  terminalStaysLiveForTheCall,
134
134
  timeoutActionWithoutLocalPrompt,
135
135
  unansweredRefusalReason
136
- } from "./chunk-WG67W43Y.js";
136
+ } from "./chunk-L4THAI7Q.js";
137
137
 
138
138
  // src/terminal-answer-watch.ts
139
139
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-JTYZEP4Q.js";
7
+ } from "./chunk-S55CXRFD.js";
8
8
  import {
9
9
  CommandReceipts,
10
10
  controllerCommandSchema
@@ -14,24 +14,24 @@ import {
14
14
  describeIdleWindow,
15
15
  idleDeadlinePassed,
16
16
  startProcessOwnership
17
- } from "./chunk-7JU6DPO7.js";
17
+ } from "./chunk-ASEHRBD4.js";
18
18
  import {
19
19
  spawnClaude
20
20
  } from "./chunk-XHKBHWLX.js";
21
21
  import {
22
22
  repoKeyFor
23
- } from "./chunk-M5XNFUXN.js";
23
+ } from "./chunk-C5EWCNJF.js";
24
24
  import {
25
25
  isAskUserResponse,
26
26
  isDecisionStopped,
27
27
  isWaitForAnswerResponse,
28
28
  withdrawQuestion,
29
29
  writeDegraded
30
- } from "./chunk-IQQQ2LGB.js";
30
+ } from "./chunk-6BD5ZZLL.js";
31
31
  import {
32
32
  callMcpTool,
33
33
  isRetryable
34
- } from "./chunk-SEVGKJ7K.js";
34
+ } from "./chunk-QPJQAE2L.js";
35
35
  import {
36
36
  AGENT_QUESTION_DESCRIPTION_MAX,
37
37
  AGENT_QUESTION_HEADER_MAX,
@@ -52,7 +52,7 @@ import {
52
52
  parseCodexQuestions,
53
53
  planElicitationAsk,
54
54
  readElicitationFields
55
- } from "./chunk-WG67W43Y.js";
55
+ } from "./chunk-L4THAI7Q.js";
56
56
 
57
57
  // src/codex-question-owner.ts
58
58
  import { createHash } from "crypto";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-DPP3ZCEE.js";
3
+ } from "./chunk-2B7YU4EK.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
7
7
  installHermesPlugin,
8
8
  refreshHermesPluginFiles,
9
9
  shippedHermesPlugin
10
- } from "./chunk-IO3OLTED.js";
10
+ } from "./chunk-OKZC4FHN.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-QZ666HLH.js";
19
+ } from "./chunk-ZGZ2L3QN.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-ALTTZKDU.js";
31
+ } from "./chunk-2BDGGE2G.js";
32
32
  import {
33
33
  detectClaudeVersion
34
- } from "./chunk-DF7A5AWF.js";
34
+ } from "./chunk-MA6FJ7U3.js";
35
35
  import {
36
36
  addCompatibleHooks,
37
37
  compatibleConfigFile,
38
38
  compatibleInstructionsFile,
39
39
  hasCompatibleHooks
40
- } from "./chunk-UUASO2FU.js";
40
+ } from "./chunk-GGI6GTBL.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-X772USE7.js";
52
+ } from "./chunk-42RQG2VG.js";
53
53
  import {
54
54
  CLAUDE_HOOK_BINARY,
55
55
  CLAUDE_HOOK_EVENTS,
@@ -72,6 +72,7 @@ import {
72
72
  clineRules,
73
73
  codexAgentsMd,
74
74
  codexConfigToml,
75
+ codexHookCommand,
75
76
  codexHookPositions,
76
77
  codexHooksJson,
77
78
  codexMcpStartsCommand,
@@ -94,20 +95,21 @@ import {
94
95
  renderAgentInstructions,
95
96
  supportedClaudeEvents,
96
97
  vscodePluginMcp
97
- } from "./chunk-B2HMISVL.js";
98
+ } from "./chunk-B2RDWRKR.js";
98
99
  import {
99
100
  formatVersion,
101
+ hookCommandsUseBareNames,
100
102
  readJsonSafe,
101
103
  resolveGlobalBinDir,
102
104
  resolveGlobalBinary,
103
105
  writeFileAtomic,
104
106
  writeJsonAtomic
105
- } from "./chunk-IS5YVKUX.js";
107
+ } from "./chunk-YIAJOV2X.js";
106
108
  import {
107
109
  HOOK_COMPATIBLE_PROFILES,
108
110
  isCompatibleAgentType,
109
111
  isRecord
110
- } from "./chunk-WG67W43Y.js";
112
+ } from "./chunk-L4THAI7Q.js";
111
113
 
112
114
  // src/reapply.ts
113
115
  import { dirname, join } from "path";
@@ -184,7 +186,7 @@ var reapplyClaudeSettings = (apiKey, paths = {}) => {
184
186
  if (!settingsWritable) throw new Error("settings.json could not be parsed");
185
187
  const s = settings;
186
188
  addPusharyToolPermissions(s);
187
- const binary = (paths.resolveBinary ?? resolveGlobalBinary)(CLAUDE_HOOK_BINARY);
189
+ const binary = hookCommandsUseBareNames(paths.platform ?? process.platform) ? void 0 : (paths.resolveBinary ?? resolveGlobalBinary)(CLAUDE_HOOK_BINARY);
188
190
  addPusharyHooks(s, binary ? dirname(binary) : void 0, (paths.detectVersion ?? detectClaudeVersion)());
189
191
  writeJson(settingsPath, s);
190
192
  hooks = true;
@@ -278,7 +280,7 @@ var reapplyCodexSettings = (apiKey, paths = {}, nativeOwnership = "preserve") =>
278
280
  return { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
279
281
  }
280
282
  }
281
- const command = guardBinary((paths.resolveBinary ?? resolveGlobalBinary)(CODEX_HOOK_BINARY) ?? CODEX_HOOK_BINARY);
283
+ const command = codexHookCommand((paths.resolveBinary ?? resolveGlobalBinary)(CODEX_HOOK_BINARY));
282
284
  let hooks = false;
283
285
  let mcp = false;
284
286
  let failed = hooksConfig === null || config === null;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-DF7A5AWF.js";
3
+ } from "./chunk-MA6FJ7U3.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
- } from "./chunk-QNEWV4JV.js";
6
+ } from "./chunk-BG4YJEFE.js";
7
7
  import {
8
8
  readGlobalPrefixAsync,
9
9
  resolveGlobalBinary,
@@ -13,10 +13,10 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-IS5YVKUX.js";
16
+ } from "./chunk-YIAJOV2X.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
- } from "./chunk-WG67W43Y.js";
19
+ } from "./chunk-L4THAI7Q.js";
20
20
 
21
21
  // src/live-capabilities.ts
22
22
  import { homedir } from "os";
@@ -6,18 +6,18 @@ import {
6
6
  McpToolError,
7
7
  SubscriptionRequiredError,
8
8
  callMcpTool
9
- } from "./chunk-SEVGKJ7K.js";
9
+ } from "./chunk-QPJQAE2L.js";
10
10
  import {
11
11
  installNetworkDefaults,
12
12
  isNetworkFailure
13
- } from "./chunk-ID46TTYS.js";
13
+ } from "./chunk-NDLOWIYO.js";
14
14
  import {
15
15
  clientReportClaims
16
- } from "./chunk-B2HMISVL.js";
16
+ } from "./chunk-B2RDWRKR.js";
17
17
  import {
18
18
  getApiKey,
19
19
  getBaseUrl
20
- } from "./chunk-ONUAAXAW.js";
20
+ } from "./chunk-TBU4WXA4.js";
21
21
  import {
22
22
  ASK_AGENT_NAME_MAX,
23
23
  CLIENT_REPORT_PATH,
@@ -26,7 +26,7 @@ import {
26
26
  TOOL_FAILURE_CODES,
27
27
  degradedLine,
28
28
  truncateLine
29
- } from "./chunk-WG67W43Y.js";
29
+ } from "./chunk-L4THAI7Q.js";
30
30
 
31
31
  // src/api.ts
32
32
  import { randomUUID } from "crypto";
@@ -4,33 +4,33 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-3YOXBN7V.js";
7
+ } from "./chunk-IBULUTHA.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-WPGSQRMW.js";
10
+ } from "./chunk-JIC5PGNI.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-B2HMISVL.js";
13
+ } from "./chunk-B2RDWRKR.js";
14
14
  import {
15
15
  readJsonSafe,
16
16
  resolveGlobalBinary,
17
17
  writeFileAtomic,
18
18
  writeJsonAtomic,
19
19
  writeJsonAtomicDurable
20
- } from "./chunk-IS5YVKUX.js";
20
+ } from "./chunk-YIAJOV2X.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-ONUAAXAW.js";
23
+ } from "./chunk-TBU4WXA4.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
- cmdShimTarget,
26
+ cmdShimScriptOf,
27
27
  getPackageVersion,
28
28
  globalPackageFolder,
29
29
  globalRootFor
30
- } from "./chunk-QTOLNRET.js";
30
+ } from "./chunk-ZVU6WMMU.js";
31
31
  import {
32
32
  isRecord
33
- } from "./chunk-WG67W43Y.js";
33
+ } from "./chunk-L4THAI7Q.js";
34
34
 
35
35
  // src/daemon-lifecycle.ts
36
36
  import { dirname, join, win32 as win32Path } from "path";
@@ -292,25 +292,25 @@ WantedBy=default.target
292
292
  return null;
293
293
  };
294
294
  var WINDOWS_DAEMON_ENTRY_SEGMENTS = ["dist", "bin", "pushary-daemon.js"];
295
- var WINDOWS_CMD_SHIM = /\.cmd$/i;
296
295
  var readTextFile = (path) => readFileSync(path, "utf8");
297
- var windowsShimTarget = (shim, readFile) => {
298
- if (!WINDOWS_CMD_SHIM.test(shim)) return void 0;
299
- try {
300
- return cmdShimTarget(win32Path.dirname(shim), readFile(shim));
301
- } catch {
302
- return void 0;
303
- }
304
- };
305
296
  var windowsPackageDaemonEntries = (globalPrefix) => {
306
297
  const root = globalRootFor(globalPrefix, "win32");
307
298
  return CLI_PACKAGE_NAMES.map((name) => win32Path.join(globalPackageFolder(root, name, "win32"), ...WINDOWS_DAEMON_ENTRY_SEGMENTS));
308
299
  };
309
300
  var windowsDaemonEntryCandidates = (shim, readFile) => {
310
- const shimEntry = windowsShimTarget(shim, readFile);
301
+ const shimEntry = cmdShimScriptOf(shim, readFile);
311
302
  const packageEntries = windowsPackageDaemonEntries(win32Path.dirname(shim));
312
303
  return shimEntry === void 0 ? packageEntries : [shimEntry, ...packageEntries];
313
304
  };
305
+ var HOMEBREW_VERSIONED_NODE = /^(.+)\/Cellar\/([^/]+)\/[^/]+\/bin\/node$/;
306
+ var homebrewLinkedNodeFor = (execPath) => {
307
+ const versioned = HOMEBREW_VERSIONED_NODE.exec(execPath);
308
+ return versioned ? `${versioned[1]}/opt/${versioned[2]}/bin/node` : null;
309
+ };
310
+ var serviceNodeFor = (execPath, exists) => {
311
+ const linked = homebrewLinkedNodeFor(execPath);
312
+ return linked !== null && exists(linked) ? linked : execPath;
313
+ };
314
314
  var resolveDaemonServiceDefinition = (options = {}) => {
315
315
  const platform = options.platform ?? process.platform;
316
316
  const exists = options.entryExists ?? existsSync;
@@ -333,7 +333,7 @@ var resolveDaemonServiceDefinition = (options = {}) => {
333
333
  platform,
334
334
  homeDir,
335
335
  stateDir: options.stateDir ?? pusharyDir(),
336
- execPath: options.execPath ?? process.execPath,
336
+ execPath: serviceNodeFor(options.execPath ?? process.execPath, exists),
337
337
  daemonEntry,
338
338
  pathEnv: options.pathEnv ?? process.env.PATH ?? "",
339
339
  uid: options.uid ?? process.getuid?.(),
@@ -1128,6 +1128,7 @@ export {
1128
1128
  daemonServiceManagerAvailable,
1129
1129
  DAEMON_LEASE_RENEW_INTERVAL_MS,
1130
1130
  xml,
1131
+ serviceNodeFor,
1131
1132
  parseDaemonAction,
1132
1133
  manageDaemonService,
1133
1134
  hasDaemonServiceDefinition,
@@ -3,21 +3,21 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-B2HMISVL.js";
6
+ } from "./chunk-B2RDWRKR.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
10
- } from "./chunk-IS5YVKUX.js";
10
+ } from "./chunk-YIAJOV2X.js";
11
11
  import {
12
12
  CLI_PACKAGE_NAMES,
13
13
  POSIX_GLOBAL_ROOT_SEGMENTS,
14
14
  cliPackagePathSegments,
15
15
  globalUpgradeEntry,
16
16
  ownPackageRoot
17
- } from "./chunk-QTOLNRET.js";
17
+ } from "./chunk-ZVU6WMMU.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-WG67W43Y.js";
20
+ } from "./chunk-L4THAI7Q.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-IS5YVKUX.js";
3
+ } from "./chunk-YIAJOV2X.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  repoKeyFor
3
- } from "./chunk-M5XNFUXN.js";
3
+ } from "./chunk-C5EWCNJF.js";
4
4
  import {
5
5
  cancelQuestion,
6
6
  clientErrorKindOf,
@@ -8,33 +8,33 @@ import {
8
8
  reportClientError,
9
9
  sendNotification,
10
10
  waitForAnswer
11
- } from "./chunk-IQQQ2LGB.js";
11
+ } from "./chunk-6BD5ZZLL.js";
12
12
  import {
13
13
  withRetry
14
- } from "./chunk-SEVGKJ7K.js";
14
+ } from "./chunk-QPJQAE2L.js";
15
15
  import {
16
16
  getMachineId
17
- } from "./chunk-WPGSQRMW.js";
17
+ } from "./chunk-JIC5PGNI.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-NPBPH7KI.js";
20
+ } from "./chunk-FEF3ILT6.js";
21
21
  import {
22
22
  IDLE_PROMPT_NOTIFICATION,
23
23
  NOTIFICATION_PUSH_TYPES,
24
24
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
25
25
  canonicalJson,
26
26
  claudeConfigDir
27
- } from "./chunk-B2HMISVL.js";
27
+ } from "./chunk-B2RDWRKR.js";
28
28
  import {
29
29
  compareVersion,
30
30
  parseVersion,
31
31
  writeFileAtomic,
32
32
  writeJsonAtomicDurable
33
- } from "./chunk-IS5YVKUX.js";
33
+ } from "./chunk-YIAJOV2X.js";
34
34
  import {
35
35
  getApiKey,
36
36
  getBaseUrl
37
- } from "./chunk-ONUAAXAW.js";
37
+ } from "./chunk-TBU4WXA4.js";
38
38
  import {
39
39
  ACTION_BODY_MAX,
40
40
  AGENTS,
@@ -76,7 +76,7 @@ import {
76
76
  toToolLookup,
77
77
  truncateLine,
78
78
  unansweredRefusalReason
79
- } from "./chunk-WG67W43Y.js";
79
+ } from "./chunk-L4THAI7Q.js";
80
80
 
81
81
  // ../hook-mapping/src/describe.ts
82
82
  import { isAbsolute, relative, resolve } from "path";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-SEVGKJ7K.js";
3
+ } from "./chunk-QPJQAE2L.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-TTTK44RK.js";
6
+ } from "./chunk-2KVELJZX.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";