@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
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-YAAJ3VZA.js";
15
+ } from "./chunk-J2PAQ3HF.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -24,14 +24,14 @@ import {
24
24
  } from "./chunk-FO3MDD26.js";
25
25
  import {
26
26
  reportedInstallSource
27
- } from "./chunk-NPBPH7KI.js";
27
+ } from "./chunk-FEF3ILT6.js";
28
28
  import {
29
29
  NPX_LATEST_COMMAND
30
- } from "./chunk-TTTK44RK.js";
30
+ } from "./chunk-2KVELJZX.js";
31
31
  import {
32
32
  NO_PAIRING_COMPUTER,
33
33
  PAIR_TTL_SECONDS
34
- } from "./chunk-WG67W43Y.js";
34
+ } from "./chunk-L4THAI7Q.js";
35
35
 
36
36
  // src/onboarding.ts
37
37
  import qrcodeTerminal from "qrcode-terminal";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-ONUAAXAW.js";
12
+ } from "./chunk-TBU4WXA4.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-B2HMISVL.js";
3
+ } from "./chunk-B2RDWRKR.js";
4
4
  import {
5
5
  readJsonSafe
6
- } from "./chunk-IS5YVKUX.js";
6
+ } from "./chunk-YIAJOV2X.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-WG67W43Y.js";
9
+ } from "./chunk-L4THAI7Q.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -4,7 +4,10 @@ import {
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted,
6
6
  writeFileAtomic
7
- } from "./chunk-IS5YVKUX.js";
7
+ } from "./chunk-YIAJOV2X.js";
8
+ import {
9
+ cmdShimScriptOf
10
+ } from "./chunk-ZVU6WMMU.js";
8
11
  import {
9
12
  CLAUDE_PRETOOLUSE_MATCHER,
10
13
  CODEX_QUESTION_TOOLS,
@@ -12,7 +15,7 @@ import {
12
15
  HOOK_LOCATOR_BINARY,
13
16
  PRETOOLUSE_GATED_TOOLS,
14
17
  withHookHoldBudget
15
- } from "./chunk-WG67W43Y.js";
18
+ } from "./chunk-L4THAI7Q.js";
16
19
 
17
20
  // src/setup/paths.ts
18
21
  import { createHash as createHash2 } from "crypto";
@@ -32,35 +35,6 @@ import { createHash } from "crypto";
32
35
  import { homedir as homedir2 } from "os";
33
36
  import { join as join2 } from "path";
34
37
 
35
- // src/registration-holder.ts
36
- var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
37
- var registeredCommands = (document) => {
38
- const hooks = asRecord(document?.hooks);
39
- if (!hooks) return [];
40
- const found = [];
41
- for (const [event, value] of Object.entries(hooks)) {
42
- if (!Array.isArray(value)) continue;
43
- for (const item of value) {
44
- const inner = asRecord(item)?.hooks;
45
- if (!Array.isArray(inner)) continue;
46
- for (const hook of inner) {
47
- const command = asRecord(hook)?.command;
48
- if (typeof command === "string") found.push({ event, command });
49
- }
50
- }
51
- }
52
- return found;
53
- };
54
- var wholeSegments = (command) => command.split(/[\s/\\"']+/).map((segment) => segment.replace(/\.(cmd|exe)$/i, ""));
55
- var namesLocator = (command) => wholeSegments(command).includes(HOOK_LOCATOR_BINARY);
56
- var namesCliBinary = (command, cliBinaries) => wholeSegments(command).some((segment) => cliBinaries.has(segment));
57
- var namesOurBinary = (command, cliBinaries) => namesLocator(command) || namesCliBinary(command, cliBinaries);
58
- var registrationHolderOf = (document, cliBinaries) => {
59
- const commands = registeredCommands(document);
60
- if (commands.some(({ command }) => namesLocator(command))) return "app";
61
- return commands.some(({ command }) => namesCliBinary(command, cliBinaries)) ? "cli" : "none";
62
- };
63
-
64
38
  // src/hook-command.ts
65
39
  var HOOK_SHELL = "/bin/sh -c";
66
40
  var holdBudgetOf = (hook) => hook.holds ? hook.timeout : void 0;
@@ -93,12 +67,25 @@ var guardKindOf = (target) => {
93
67
  };
94
68
  var targetPath = (target) => target.kind === "binary" ? target.path : target.script;
95
69
  var runsThroughNode = (target) => target.kind !== "binary";
96
- var guardHookCommand = (target, platform = process.platform) => {
70
+ var LAUNCHABLE_EXTENSION = /\.(cmd|exe|js|mjs)$/i;
71
+ var hookBinaryNameOf = (fileName) => fileName.replace(LAUNCHABLE_EXTENSION, "");
72
+ var windowsNodeLaunchOf = (target, launcher) => {
73
+ if (launcher === null) return null;
74
+ if (target.kind !== "binary") return { node: launcher.node, script: target.script };
75
+ if (target.runtime !== "node") return null;
76
+ const script = launcher.scriptFor(target.path);
77
+ return script === void 0 ? null : { node: launcher.node, script };
78
+ };
79
+ var guardHookCommand = (target, platform = process.platform, launcher = null) => {
97
80
  const path = quoteIfNeeded(targetPath(target), platform);
98
- if (platform === "win32") return runsThroughNode(target) ? `node ${path}` : path;
81
+ if (platform === "win32") {
82
+ const launch = windowsNodeLaunchOf(target, launcher);
83
+ if (launch !== null) return `${quoteIfNeeded(launch.node, platform)} ${quoteIfNeeded(launch.script, platform)}`;
84
+ return runsThroughNode(target) ? `node ${path}` : path;
85
+ }
99
86
  return `${HOOK_SHELL} '${HOOK_GUARD_SCRIPTS[guardKindOf(target)]}' ${path}`;
100
87
  };
101
- var guardBinary = (path, platform) => guardHookCommand({ kind: "binary", path, runtime: "node" }, platform);
88
+ var guardBinary = (path, platform, launcher) => guardHookCommand({ kind: "binary", path, runtime: "node" }, platform, launcher);
102
89
  var SILENT_MISS = "exit 0";
103
90
  var REFUSE = "R";
104
91
  var definesRefusal = (refusal) => `${REFUSE}() { printf %s ${shellDoubleQuoted(refusal)}; exit 0; }`;
@@ -109,15 +96,64 @@ var guardBinaryRefusing = (path, refusal, platform = process.platform) => {
109
96
  };
110
97
  var guardNodeScript = (script, platform) => guardHookCommand({ kind: "node", script }, platform);
111
98
  var guardCursorGate = (script, platform) => guardHookCommand({ kind: "cursor_gate", script }, platform);
112
- var guardedArgv = (target, args = [], platform = process.platform) => {
99
+ var guardedArgv = (target, args = [], platform = process.platform, launcher = null) => {
113
100
  const path = targetPath(target);
114
101
  if (platform === "win32") {
102
+ const launch = windowsNodeLaunchOf(target, launcher);
103
+ if (launch !== null) return [launch.node, launch.script, ...args];
115
104
  return runsThroughNode(target) ? ["node", path, ...args] : [path, ...args];
116
105
  }
117
106
  const [shell, ...shellArgs] = HOOK_SHELL.split(/\s+/);
118
107
  return [shell, ...shellArgs, HOOK_GUARD_SCRIPTS[guardKindOf(target)], path, ...args];
119
108
  };
120
109
 
110
+ // src/registration-holder.ts
111
+ var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
112
+ var registeredCommands = (document) => {
113
+ const hooks = asRecord(document?.hooks);
114
+ if (!hooks) return [];
115
+ const found = [];
116
+ for (const [event, value] of Object.entries(hooks)) {
117
+ if (!Array.isArray(value)) continue;
118
+ for (const item of value) {
119
+ const inner = asRecord(item)?.hooks;
120
+ if (!Array.isArray(inner)) continue;
121
+ for (const hook of inner) {
122
+ const command = asRecord(hook)?.command;
123
+ if (typeof command === "string") found.push({ event, command });
124
+ }
125
+ }
126
+ }
127
+ return found;
128
+ };
129
+ var wholeSegments = (command) => command.split(/[\s/\\"']+/).map(hookBinaryNameOf);
130
+ var namesLocator = (command) => wholeSegments(command).includes(HOOK_LOCATOR_BINARY);
131
+ var namesCliBinary = (command, cliBinaries) => wholeSegments(command).some((segment) => cliBinaries.has(segment));
132
+ var namesOurBinary = (command, cliBinaries) => namesLocator(command) || namesCliBinary(command, cliBinaries);
133
+ var registrationHolderOf = (document, cliBinaries) => {
134
+ const commands = registeredCommands(document);
135
+ if (commands.some(({ command }) => namesLocator(command))) return "app";
136
+ return commands.some(({ command }) => namesCliBinary(command, cliBinaries)) ? "cli" : "none";
137
+ };
138
+
139
+ // src/windows-node-launcher.ts
140
+ import { existsSync, readFileSync } from "fs";
141
+ import { win32 } from "path";
142
+ var STANDARD_NODE_LOCATION = ["nodejs", "node.exe"];
143
+ var isStandardWindowsNode = (execPath, programFolders) => {
144
+ const running = win32.normalize(execPath).toLowerCase();
145
+ return programFolders.some((folder) => folder !== void 0 && folder !== "" && win32.join(folder, ...STANDARD_NODE_LOCATION).toLowerCase() === running);
146
+ };
147
+ var windowsHookScriptFor = (shim, files) => {
148
+ const script = cmdShimScriptOf(shim, files.readFile);
149
+ return script !== void 0 && files.exists(script) ? script : void 0;
150
+ };
151
+ var INSTALLED_FILES = {
152
+ exists: existsSync,
153
+ readFile: (path) => readFileSync(path, "utf8")
154
+ };
155
+ var windowsNodeLauncherFor = (platform) => platform === "win32" && process.platform === "win32" && isStandardWindowsNode(process.execPath, [process.env.ProgramFiles, process.env.ProgramW6432]) ? { node: process.execPath, scriptFor: (shim) => windowsHookScriptFor(shim, INSTALLED_FILES) } : null;
156
+
121
157
  // src/hook-entries.ts
122
158
  var registerHookEntry = (existing, isOurs, entry2) => {
123
159
  const rewritten = [];
@@ -149,6 +185,7 @@ var canonicalJson = (value) => {
149
185
 
150
186
  // src/codex-config.ts
151
187
  var CODEX_HOOK_BINARY = "pushary-codex-hook";
188
+ var codexHookCommand = (resolvedBinary, platform = process.platform) => guardBinary(resolvedBinary ?? CODEX_HOOK_BINARY, platform, windowsNodeLauncherFor(platform));
152
189
  var codexHome = () => codexHomeFrom(homedir2());
153
190
  var codexHomeFrom = (home) => process.env.CODEX_HOME?.trim() || join2(home, ".codex");
154
191
  var codexConfigToml = () => join2(codexHome(), "config.toml");
@@ -746,7 +783,7 @@ var removePusharySettings = (settings, scope) => {
746
783
  };
747
784
 
748
785
  // src/instruction-file.ts
749
- import { accessSync, constants, existsSync, readFileSync, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
786
+ import { accessSync, constants, existsSync as existsSync2, readFileSync as readFileSync2, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
750
787
  import { dirname } from "path";
751
788
  var PUSHARY_BEGIN = "<!-- BEGIN PUSHARY (managed by @pushary/agent-hooks; do not edit this block) -->";
752
789
  var PUSHARY_END = "<!-- END PUSHARY -->";
@@ -758,7 +795,7 @@ You have Pushary MCP tools that reach the user on their phone. Use them proactiv
758
795
  - Ask once, on one channel. If you also have a built-in way to prompt the user, use that or \`ask_user\` for a given question, never both. \`ask_user\` is the one that reaches the user when they are away from this machine, so prefer it. Raising both strands the user in whichever prompt you are not waiting on.
759
796
  - Honor authorization already granted in this session. Ask before a risky or irreversible action outside that authorization, or when an enforced host policy requires it. Do not ask again for an already authorized step, and never bypass an enforced gate. When a Pushary hook result says the user approved a specific command after a denial, rerunning that exact command is the approved path and not a bypass of that gate.
760
797
  - Call \`propose_scope\` only for an unresolved or requested file boundary. A ratified scope narrows what may proceed; it does not bypass other approval rules. Do not add a plan approval merely because work spans several files, and do not propose a new scope mid-run just to widen it. Let the installed gate request any scope expansion before the edit executes. Only file paths are checked, and only on tool calls that carry one, so put a boundary that is not a path (recipients, channels, spend, systems you will not open) in \`promises\` and never in \`allowedPaths\`. Read the \`enforces\` field that comes back: an empty array means nothing in that contract is checked automatically, and you must say so rather than report that a scope is in force. \`hookSeen: false\` means no hook has reported that sessionId, so the gate will never find the contract: fix the session id rather than proceeding as if a scope were in force.
761
- - Before a task of more than two steps, break it into steps and find the forks. Settle by yourself every fork that a file, a command or a tool call can answer, then ask the rest as one numbered round with your recommended answer against each. A question in the terminal is free; a push is not. When the user is at the terminal, ask the whole round there. When the user is away, send only the fork that stops the run, and decide the rest on your recommendation.
798
+ - Before a task of more than two steps, break it into steps and find the forks. Settle by yourself every fork that a file, a command or a tool call can answer, then ask the rest as one numbered round with your recommended answer against each. A question in the terminal is free; a push is not. When the user is at the terminal, ask the whole round there. When the user is away, send only the fork that stops the run. Decide another fork on your recommendation only if it is reversible, spends nothing and stays inside the task, and list it in your final message; ask the rest once the first answer is back.
762
799
  - When you are blocked, stuck, or hit an error you cannot resolve on your own, call \`send_notification\` so the user knows, and call \`ask_user\` if you need a decision to continue.
763
800
  - When meaningful work finishes while the user is away, or they requested an alert, call \`send_notification\` so the user knows it is done. Skip trivial completions and duplicate reports to someone already reading. Always pass \`context\` with a \`type\` of "task_complete", "error" or "info": it is what tells Pushary this is a task update, so the user's own setting for where updates land can route it.
764
801
  - Confirm notifications can offer lock-screen actions; arbitrary choices and text open the app. The Mac notch handles personal account questions, not Partner customer enrollment.
@@ -794,10 +831,10 @@ var withInstructionBlockReplaced = (existing, body) => {
794
831
  };
795
832
  var writeInstructionBlock = (filePath, body) => {
796
833
  const dir = dirname(filePath);
797
- if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
834
+ if (!existsSync2(dir)) mkdirSync(dir, { recursive: true });
798
835
  let existing = "";
799
836
  try {
800
- existing = readFileSync(filePath, "utf-8");
837
+ existing = readFileSync2(filePath, "utf-8");
801
838
  } catch {
802
839
  }
803
840
  writeFileSync(filePath, withInstructionBlockReplaced(existing, body) ?? withInstructionBlockAppended(existing, body), "utf-8");
@@ -814,7 +851,7 @@ var CRLF = "\r\n";
814
851
  var withLineEndingsOf = (sample, block) => sample.includes(CRLF) ? block.replaceAll("\n", CRLF) : block;
815
852
  var readUtf8 = (filePath) => {
816
853
  try {
817
- const bytes = readFileSync(filePath);
854
+ const bytes = readFileSync2(filePath);
818
855
  const text = bytes.toString("utf-8");
819
856
  return Buffer.from(text, "utf-8").equals(bytes) ? { kind: "text", text } : { kind: "not_utf8" };
820
857
  } catch {
@@ -830,7 +867,7 @@ var isWritable = (filePath) => {
830
867
  }
831
868
  };
832
869
  var refreshInstructionBlock = (filePath, body) => {
833
- if (!existsSync(filePath)) return "absent";
870
+ if (!existsSync2(filePath)) return "absent";
834
871
  const read = readUtf8(filePath);
835
872
  if (read.kind !== "text") return read.kind;
836
873
  const block = soleManagedBlock(read.text);
@@ -851,7 +888,7 @@ var refreshInstructionBlock = (filePath, body) => {
851
888
  var removeInstructionBlock = (filePath) => {
852
889
  let existing = "";
853
890
  try {
854
- existing = readFileSync(filePath, "utf-8");
891
+ existing = readFileSync2(filePath, "utf-8");
855
892
  } catch {
856
893
  return false;
857
894
  }
@@ -868,7 +905,7 @@ var removeInstructionBlock = (filePath) => {
868
905
  };
869
906
  var hasInstructionBlock = (filePath) => {
870
907
  try {
871
- return readFileSync(filePath, "utf-8").includes(PUSHARY_BEGIN);
908
+ return readFileSync2(filePath, "utf-8").includes(PUSHARY_BEGIN);
872
909
  } catch {
873
910
  return false;
874
911
  }
@@ -1079,20 +1116,23 @@ var clineRules = () => clineRulesFile(clineLocation());
1079
1116
  export {
1080
1117
  claudeConfigDir,
1081
1118
  claudeUserConfigFile,
1082
- registeredCommands,
1083
- namesOurBinary,
1084
- registrationHolderOf,
1085
1119
  HOOK_SHELL,
1086
1120
  holdBudgetOf,
1121
+ hookBinaryNameOf,
1087
1122
  guardBinary,
1088
1123
  guardBinaryRefusing,
1089
1124
  guardNodeScript,
1090
1125
  guardCursorGate,
1091
1126
  guardedArgv,
1127
+ registeredCommands,
1128
+ namesOurBinary,
1129
+ registrationHolderOf,
1130
+ windowsNodeLauncherFor,
1092
1131
  registerHookEntry,
1093
1132
  isProtectedByScope,
1094
1133
  canonicalJson,
1095
1134
  CODEX_HOOK_BINARY,
1135
+ codexHookCommand,
1096
1136
  codexHome,
1097
1137
  codexHomeFrom,
1098
1138
  codexConfigToml,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFile
3
- } from "./chunk-IS5YVKUX.js";
3
+ } from "./chunk-YIAJOV2X.js";
4
4
 
5
5
  // src/claude-native-install.ts
6
6
  import { accessSync, constants } from "fs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  readJsonSafe,
3
3
  writeJsonAtomic
4
- } from "./chunk-IS5YVKUX.js";
4
+ } from "./chunk-YIAJOV2X.js";
5
5
  import {
6
6
  configFilePath
7
- } from "./chunk-ONUAAXAW.js";
7
+ } from "./chunk-TBU4WXA4.js";
8
8
  import {
9
9
  readSetupOutcomeProperties
10
- } from "./chunk-WG67W43Y.js";
10
+ } from "./chunk-L4THAI7Q.js";
11
11
 
12
12
  // src/diagnostics/service-runtime.ts
13
13
  var unescapeXml = (value) => value.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
@@ -35,7 +35,8 @@ var MANAGER_SEGMENTS = [
35
35
  [".volta", "volta"],
36
36
  ["volta", "volta"],
37
37
  [".asdf", "asdf"],
38
- ["asdf", "asdf"]
38
+ ["asdf", "asdf"],
39
+ ["Cellar", "homebrew"]
39
40
  ];
40
41
  var versionManagerOf = (execPath) => {
41
42
  const segments = execPath.split(/[/\\]/);
@@ -45,7 +46,8 @@ var versionManagerOf = (execPath) => {
45
46
  }
46
47
  return null;
47
48
  };
48
- var describeVersionManagerPin = (execPath, manager) => `The background service is pinned to ${execPath}, which ${manager} manages. Switching Node versions strands it; run pushary daemon install afterwards.`;
49
+ var describeVersionManagerPin = (execPath, manager) => `The background service is pinned to ${execPath}, which ${manager} manages. Switching or upgrading Node strands it; run pushary daemon install afterwards.`;
50
+ var describeServiceNodeRisk = (manager) => manager === "homebrew" ? "a Homebrew version folder; brew upgrade strands the service, and `pushary daemon install` repins it to the stable link" : `managed by ${manager}; a version switch strands the service`;
49
51
 
50
52
  // src/setup/failure-record.ts
51
53
  import { dirname, join } from "path";
@@ -68,5 +70,6 @@ export {
68
70
  readSetupFailure,
69
71
  readServiceExecPath,
70
72
  versionManagerOf,
71
- describeVersionManagerPin
73
+ describeVersionManagerPin,
74
+ describeServiceNodeRisk
72
75
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-WG67W43Y.js";
4
+ } from "./chunk-L4THAI7Q.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-YAAJ3VZA.js";
3
+ } from "./chunk-J2PAQ3HF.js";
4
4
  import {
5
5
  canChangeApprovalSettings
6
- } from "./chunk-JTO6UPTJ.js";
6
+ } from "./chunk-OUYFUUWB.js";
7
7
  import {
8
8
  matchMacAccountStep,
9
9
  retryAgentCommand
10
- } from "./chunk-VYRJAPZ6.js";
10
+ } from "./chunk-EMT7I74E.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-KZERVKTD.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-TTTK44RK.js";
16
+ } from "./chunk-2KVELJZX.js";
17
17
 
18
18
  // src/setup/closing.ts
19
19
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote
4
- } from "./chunk-WG67W43Y.js";
4
+ } from "./chunk-L4THAI7Q.js";
5
5
 
6
6
  // src/repo.ts
7
7
  import { existsSync, readFileSync, statSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readMacAppAgentKey
3
- } from "./chunk-47RUEZZA.js";
3
+ } from "./chunk-UNEJNC6X.js";
4
4
  import {
5
5
  API_KEYS_PATH
6
- } from "./chunk-JTO6UPTJ.js";
6
+ } from "./chunk-OUYFUUWB.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-3YOXBN7V.js";
16
+ } from "./chunk-IBULUTHA.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-HNUK557P.js";
19
+ } from "./chunk-VCMDY6YL.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-WG67W43Y.js";
22
+ } from "./chunk-L4THAI7Q.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -3,16 +3,16 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-SFUJLUBM.js";
6
+ } from "./chunk-7EIMASAA.js";
7
7
  import {
8
8
  SESSION_HISTORY_RETENTION_DAYS
9
9
  } from "./chunk-MHUKYYYR.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-TJZIUFWK.js";
12
+ } from "./chunk-6CJ4MSZU.js";
13
13
  import {
14
14
  hookOwnerOf
15
- } from "./chunk-X772USE7.js";
15
+ } from "./chunk-42RQG2VG.js";
16
16
  import {
17
17
  buildTranscriptRecords,
18
18
  decodePublicKey,
@@ -23,37 +23,37 @@ import {
23
23
  recordSealerFor,
24
24
  uploadTranscriptRecords,
25
25
  wrapSessionKey
26
- } from "./chunk-W3VRQEL3.js";
26
+ } from "./chunk-IUZCERPQ.js";
27
27
  import {
28
28
  external_exports
29
29
  } from "./chunk-XMSDA5WA.js";
30
30
  import {
31
31
  transcriptEnvironmentPreference,
32
32
  transcriptsEnabled
33
- } from "./chunk-RVC7OSC7.js";
33
+ } from "./chunk-GKWPIE6R.js";
34
34
  import {
35
35
  readTranscriptPreference
36
- } from "./chunk-3YOXBN7V.js";
36
+ } from "./chunk-IBULUTHA.js";
37
37
  import {
38
38
  claudeConfigDir,
39
39
  codexHome,
40
40
  pusharyDir
41
- } from "./chunk-B2HMISVL.js";
41
+ } from "./chunk-B2RDWRKR.js";
42
42
  import {
43
43
  writeJsonAtomic,
44
44
  writeJsonAtomicDurable
45
- } from "./chunk-IS5YVKUX.js";
45
+ } from "./chunk-YIAJOV2X.js";
46
46
  import {
47
47
  getApiKey,
48
48
  getBaseUrl
49
- } from "./chunk-ONUAAXAW.js";
49
+ } from "./chunk-TBU4WXA4.js";
50
50
  import {
51
51
  PENDING_COMMAND_PREFIX,
52
52
  SESSION_HISTORY_BACKFILL_LIMIT_BYTES,
53
53
  canonicalJsonText,
54
54
  isRecord,
55
55
  redactSecretsFromContent
56
- } from "./chunk-WG67W43Y.js";
56
+ } from "./chunk-L4THAI7Q.js";
57
57
 
58
58
  // src/transcript-registration.ts
59
59
  import { createHash as createHash4 } from "crypto";
@@ -3,13 +3,13 @@ import {
3
3
  NpmMissingError,
4
4
  NpmPermissionError,
5
5
  writeFileAtomic
6
- } from "./chunk-IS5YVKUX.js";
6
+ } from "./chunk-YIAJOV2X.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-TTTK44RK.js";
9
+ } from "./chunk-2KVELJZX.js";
10
10
  import {
11
11
  readSetupAgentFailures
12
- } from "./chunk-WG67W43Y.js";
12
+ } from "./chunk-L4THAI7Q.js";
13
13
 
14
14
  // src/setup/config-write.ts
15
15
  var AgentConfigWriteError = class extends Error {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-ONUAAXAW.js";
3
+ } from "./chunk-TBU4WXA4.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-WG67W43Y.js";
6
+ } from "./chunk-L4THAI7Q.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-ALTTZKDU.js";
3
+ } from "./chunk-2BDGGE2G.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
- } from "./chunk-QNEWV4JV.js";
6
+ } from "./chunk-BG4YJEFE.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-UUASO2FU.js";
9
+ } from "./chunk-GGI6GTBL.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-B2HMISVL.js";
14
+ } from "./chunk-B2RDWRKR.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
- } from "./chunk-WG67W43Y.js";
17
+ } from "./chunk-L4THAI7Q.js";
18
18
 
19
19
  // src/vscode-config.ts
20
20
  import { homedir } from "os";
@@ -2,31 +2,31 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-74QJBFMG.js";
5
+ } from "./chunk-44R5ATBR.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-JTO6UPTJ.js";
8
+ } from "./chunk-OUYFUUWB.js";
9
9
  import {
10
10
  createIo
11
11
  } from "./chunk-FO3MDD26.js";
12
12
  import {
13
13
  readKeySource
14
- } from "./chunk-3YOXBN7V.js";
14
+ } from "./chunk-IBULUTHA.js";
15
15
  import {
16
16
  absoluteUrl,
17
17
  checkApiKey,
18
18
  describeKeyCheck,
19
19
  keyCheckFromResponse
20
- } from "./chunk-HNUK557P.js";
20
+ } from "./chunk-VCMDY6YL.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-ONUAAXAW.js";
23
+ } from "./chunk-TBU4WXA4.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-KZERVKTD.js";
27
27
  import {
28
28
  KEY_SCOPE
29
- } from "./chunk-WG67W43Y.js";
29
+ } from "./chunk-L4THAI7Q.js";
30
30
 
31
31
  // src/cli/report-key.ts
32
32
  var { dim, yellow } = createIo();
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addGeminiMcpServer,
3
3
  removeGeminiMcpServer
4
- } from "./chunk-X772USE7.js";
4
+ } from "./chunk-42RQG2VG.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT,
7
7
  compatibleToolLookup
8
- } from "./chunk-KXSZ43Z6.js";
8
+ } from "./chunk-7MRX5JYA.js";
9
9
  import {
10
10
  CLAUDE_HOOK_EVENTS,
11
11
  PUSHARY_MCP_URL,
@@ -17,7 +17,7 @@ import {
17
17
  isPusharyHook,
18
18
  registerHookEntry,
19
19
  removeClaudeMcpServers
20
- } from "./chunk-B2HMISVL.js";
20
+ } from "./chunk-B2RDWRKR.js";
21
21
  import {
22
22
  HOOK_COMPATIBLE_PROFILES,
23
23
  PHONE_ANSWERED_TOOLS,
@@ -28,7 +28,7 @@ import {
28
28
  pusharyMissingReason,
29
29
  refusalOutput,
30
30
  withHookHoldBudget
31
- } from "./chunk-WG67W43Y.js";
31
+ } from "./chunk-L4THAI7Q.js";
32
32
 
33
33
  // src/config-document.ts
34
34
  import { parse, stringify } from "smol-toml";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-3YOXBN7V.js";
3
+ } from "./chunk-IBULUTHA.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {