@pushary/agent-hooks 1.9.15 → 1.9.17

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 (100) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/bin/pushary-bell-hook.js +25 -25
  3. package/dist/bin/pushary-bell.js +10 -10
  4. package/dist/bin/pushary-claude.js +24 -24
  5. package/dist/bin/pushary-clean.js +29 -29
  6. package/dist/bin/pushary-codex-bridge.js +17 -17
  7. package/dist/bin/pushary-codex-hook.js +45 -61
  8. package/dist/bin/pushary-codex.js +12 -12
  9. package/dist/bin/pushary-connect.js +25 -25
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +31 -31
  12. package/dist/bin/pushary-disconnect.js +24 -24
  13. package/dist/bin/pushary-doctor.js +34 -34
  14. package/dist/bin/pushary-elicitation-hook.js +25 -25
  15. package/dist/bin/pushary-gemini-bridge.js +13 -13
  16. package/dist/bin/pushary-gemini-hook.js +27 -27
  17. package/dist/bin/pushary-hook.js +29 -29
  18. package/dist/bin/pushary-login.js +13 -13
  19. package/dist/bin/pushary-logout.js +11 -11
  20. package/dist/bin/pushary-mcp.js +9 -9
  21. package/dist/bin/pushary-mode.js +13 -13
  22. package/dist/bin/pushary-notification-hook.js +24 -24
  23. package/dist/bin/pushary-opencode-hook.js +26 -26
  24. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  25. package/dist/bin/pushary-permission-hook.js +28 -28
  26. package/dist/bin/pushary-post-hook.js +24 -24
  27. package/dist/bin/pushary-prompt-hook.js +24 -24
  28. package/dist/bin/pushary-session-end-hook.js +24 -24
  29. package/dist/bin/pushary-session-start-hook.js +28 -28
  30. package/dist/bin/pushary-setup.js +443 -117
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +27 -27
  33. package/dist/bin/pushary-stop-hook.js +24 -24
  34. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  35. package/dist/bin/pushary-suggestions.js +13 -13
  36. package/dist/bin/pushary-transcript-register.js +17 -17
  37. package/dist/bin/pushary-transcripts.js +7 -7
  38. package/dist/bin/pushary-upgrade.js +30 -30
  39. package/dist/bin/pushary-wait.js +13 -13
  40. package/dist/bin/pushary.js +10 -7
  41. package/dist/{chunk-WJO7SENK.js → chunk-2V4NKFHD.js} +5 -5
  42. package/dist/{chunk-TFV6RATK.js → chunk-35USDKDL.js} +5 -5
  43. package/dist/{chunk-6MLSXBNR.js → chunk-3FBU6HUW.js} +2 -2
  44. package/dist/{chunk-LJJWNHUW.js → chunk-3LRUBMNK.js} +2 -2
  45. package/dist/{chunk-Q4JD6WNB.js → chunk-5DVWWQ7H.js} +1 -1
  46. package/dist/{chunk-JEJSAI6Z.js → chunk-5SHOKE4K.js} +4 -4
  47. package/dist/{chunk-JC3AGMOP.js → chunk-5Y4PJEBJ.js} +2 -2
  48. package/dist/{chunk-ME55HQOI.js → chunk-73NUMFZG.js} +4 -4
  49. package/dist/{chunk-IQCNOEQL.js → chunk-AEWPTGG2.js} +10 -11
  50. package/dist/{chunk-5LQ7QUVF.js → chunk-AVNOQUNA.js} +1 -1
  51. package/dist/{chunk-YOHPJNFW.js → chunk-B45C755V.js} +36 -25
  52. package/dist/{chunk-3QXCTYMG.js → chunk-B4WI4UOX.js} +2 -2
  53. package/dist/{chunk-COZE23R3.js → chunk-BHBTPKYT.js} +2 -2
  54. package/dist/{chunk-ZMUDVPOT.js → chunk-CSKEQDLX.js} +3 -3
  55. package/dist/{chunk-SYLJL63X.js → chunk-CUW5CPJJ.js} +3 -3
  56. package/dist/{chunk-7VOEZPJ4.js → chunk-D2ZPTCAL.js} +1 -1
  57. package/dist/{chunk-HSVJ62BE.js → chunk-D45B4GNL.js} +1 -1
  58. package/dist/{chunk-NDZBDXU3.js → chunk-DCPJNJN3.js} +27 -8
  59. package/dist/{chunk-VP6WDFVO.js → chunk-E755IUIH.js} +3 -3
  60. package/dist/{chunk-OIESPH3R.js → chunk-EBABFMC7.js} +11 -11
  61. package/dist/{chunk-CU7Y7Y4L.js → chunk-ENR7TJSA.js} +2 -2
  62. package/dist/{chunk-U4TMAANR.js → chunk-FO3MDD26.js} +4 -4
  63. package/dist/{chunk-HJL5RBOU.js → chunk-GFW4NSYW.js} +23 -4
  64. package/dist/{chunk-H5YC7H6V.js → chunk-GYLRXSZW.js} +3 -3
  65. package/dist/{chunk-WWTB4DAE.js → chunk-H3OSAPDD.js} +1 -1
  66. package/dist/{chunk-3YCYTGGK.js → chunk-IJOITMKQ.js} +1 -1
  67. package/dist/{chunk-HTO2XULO.js → chunk-KRSBK5BE.js} +1 -1
  68. package/dist/{chunk-3FQCZSEQ.js → chunk-KWMZDPUJ.js} +3 -3
  69. package/dist/{chunk-6LORREOI.js → chunk-LBUKSO4N.js} +1 -1
  70. package/dist/{chunk-YKYFFCB5.js → chunk-MRMXB6Z6.js} +1 -1
  71. package/dist/{chunk-57VUNV32.js → chunk-NHJUNVMB.js} +1 -1
  72. package/dist/{chunk-AYV2NRYJ.js → chunk-OG5HVCVG.js} +12 -1
  73. package/dist/{chunk-7QZZK2YU.js → chunk-OQTTGULW.js} +6 -6
  74. package/dist/{chunk-NDKFHLJI.js → chunk-P76XTT2Y.js} +5 -5
  75. package/dist/{chunk-6WECKO24.js → chunk-PILHK3P5.js} +4 -4
  76. package/dist/{chunk-5BIMNGRQ.js → chunk-PJCNX4AA.js} +6 -6
  77. package/dist/{chunk-SDDKVY4I.js → chunk-PM7XZ5GJ.js} +5 -5
  78. package/dist/{chunk-D72OJS4S.js → chunk-PMKC4ZYP.js} +2 -2
  79. package/dist/{chunk-2DCGUCPZ.js → chunk-PYKF2DUY.js} +2 -2
  80. package/dist/{chunk-QIOWXUFH.js → chunk-QWO5UBVP.js} +1 -1
  81. package/dist/{chunk-Y6KG5JZP.js → chunk-SRK4O45T.js} +2 -2
  82. package/dist/{chunk-5EWNGYFD.js → chunk-TEWUZ3MT.js} +2 -2
  83. package/dist/{chunk-C2OUUGCW.js → chunk-TY2OTJFK.js} +2 -2
  84. package/dist/{chunk-52JA2WTH.js → chunk-UJTQCOYP.js} +1 -1
  85. package/dist/{chunk-ZH74RRGM.js → chunk-UM7CBQS5.js} +1 -1
  86. package/dist/{chunk-VKTDXQGH.js → chunk-UNO3UEDW.js} +2 -2
  87. package/dist/{chunk-FZW7Q7GM.js → chunk-VZA4GGXL.js} +10 -15
  88. package/dist/{chunk-TMQMUGSN.js → chunk-XGRZU6J4.js} +3 -3
  89. package/dist/{chunk-WBQK6KD5.js → chunk-XTVOEEZ5.js} +8 -8
  90. package/dist/{chunk-NA5D62OI.js → chunk-YCBXYOPI.js} +1 -1
  91. package/dist/{chunk-6GRUERVL.js → chunk-YJCNFRKV.js} +1 -1
  92. package/dist/{chunk-PNUWMEIY.js → chunk-YVDFJ6VV.js} +3 -2
  93. package/dist/{chunk-YL6HU2KF.js → chunk-Z4M66PI6.js} +5 -5
  94. package/dist/{chunk-PSWFYNOX.js → chunk-Z7LEZQSY.js} +3 -3
  95. package/dist/{global-upgrade-MOBLBPIJ.js → global-upgrade-MYSWPDKE.js} +6 -6
  96. package/dist/{paths-55SPLYW5.js → paths-JFXSQQBD.js} +2 -2
  97. package/dist/{reapply-SOIJJKGO.js → reapply-E3JKAGNS.js} +20 -20
  98. package/dist/src/index.js +19 -19
  99. package/dist/{upgrade-lock-FER4DMDA.js → upgrade-lock-DO5TUCXB.js} +3 -3
  100. package/package.json +1 -1
@@ -72,11 +72,11 @@ var createIo = (stream = process.stdout, context = {}) => {
72
72
  process.stderr.write(`${yellow("!")} ${s}
73
73
  `);
74
74
  };
75
+ const finishedLine = (label, end) => end ? ` ${end.ok ? check() : yellow("!")} ${end.label}` : ` ${check()} ${label}`;
75
76
  const spinner = async (label, fn, options = {}) => {
76
77
  if (stream.isTTY !== true) {
77
78
  try {
78
- await fn();
79
- line(` ${check()} ${label}`);
79
+ line(finishedLine(label, await fn()));
80
80
  } catch (err) {
81
81
  line(` ${yellow("!")} ${label} ${dim(`(${describeError(err)})`)}`);
82
82
  if (!options.optional) throw err;
@@ -88,9 +88,9 @@ var createIo = (stream = process.stdout, context = {}) => {
88
88
  stream.write(`\r ${dim(SPINNER_FRAMES[frame++ % SPINNER_FRAMES.length])} ${clipToRow(label, terminalColumns(stream) - SPINNER_FRAME_WIDTH)}\x1B[K`);
89
89
  }, SPINNER_INTERVAL_MS);
90
90
  try {
91
- await fn();
91
+ const end = await fn();
92
92
  clearInterval(timer);
93
- stream.write(`\r ${check()} ${label}\x1B[K
93
+ stream.write(`\r${finishedLine(label, end)}\x1B[K
94
94
  `);
95
95
  } catch (err) {
96
96
  clearInterval(timer);
@@ -13,7 +13,7 @@ import {
13
13
  isReleaseVersion,
14
14
  ownPackageName,
15
15
  withHookHoldBudget
16
- } from "./chunk-AYV2NRYJ.js";
16
+ } from "./chunk-OG5HVCVG.js";
17
17
 
18
18
  // src/setup/paths.ts
19
19
  import { homedir as homedir2 } from "os";
@@ -168,6 +168,23 @@ var NpmMissingError = class extends Error {
168
168
  this.name = "NpmMissingError";
169
169
  }
170
170
  };
171
+ var NpmPermissionError = class extends Error {
172
+ constructor(detail) {
173
+ super(detail);
174
+ this.name = "NpmPermissionError";
175
+ }
176
+ };
177
+ var NPM_PERMISSION_CODE = /\bE(?:ACCES|PERM)\b/;
178
+ var ERROR_TEXT_FIELDS = ["code", "stderr", "stdout", "message"];
179
+ var errorTextOf = (err) => {
180
+ if (typeof err !== "object" || err === null) return [String(err)];
181
+ return ERROR_TEXT_FIELDS.flatMap((field) => {
182
+ const value = Reflect.get(err, field);
183
+ return typeof value === "string" || Buffer.isBuffer(value) ? [value.toString()] : [];
184
+ });
185
+ };
186
+ var isNpmPermissionFailure = (err) => errorTextOf(err).some((text) => NPM_PERMISSION_CODE.test(text));
187
+ var npmInstallFailure = (err) => isNpmPermissionFailure(err) ? new NpmPermissionError(npmErrorMessage(err)) : new Error(npmErrorMessage(err));
171
188
  var resolveBinary = (name) => resolveGlobalBinary(name) ?? resolvePathBinary(name);
172
189
  var resolvePackageVersionFromBinary = (binary, packageName) => {
173
190
  try {
@@ -365,9 +382,9 @@ var installGlobally = (options) => {
365
382
  }
366
383
  const started = (async () => {
367
384
  if (!npmIsOnPath()) throw new NpmMissingError();
368
- const { withUpgradeLock } = await import("./global-upgrade-MOBLBPIJ.js");
369
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-FER4DMDA.js");
370
- const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-55SPLYW5.js");
385
+ const { withUpgradeLock } = await import("./global-upgrade-MYSWPDKE.js");
386
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-DO5TUCXB.js");
387
+ const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-JFXSQQBD.js");
371
388
  let result = "skipped";
372
389
  const install = async () => {
373
390
  const platform = process.platform;
@@ -848,6 +865,8 @@ export {
848
865
  npmIsOnPath,
849
866
  globalPackageState,
850
867
  NpmMissingError,
868
+ NpmPermissionError,
869
+ npmInstallFailure,
851
870
  resolveBinary,
852
871
  resolvePackageVersionFromBinary,
853
872
  resolveGlobalPackageVersion,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-ME55HQOI.js";
4
+ } from "./chunk-73NUMFZG.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-FZW7Q7GM.js";
7
+ } from "./chunk-VZA4GGXL.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-HJL5RBOU.js";
11
+ } from "./chunk-GFW4NSYW.js";
12
12
 
13
13
  // src/cursor-config.ts
14
14
  var hookCommandOf = (entry) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-AYV2NRYJ.js";
3
+ } from "./chunk-OG5HVCVG.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-HTO2XULO.js";
3
+ } from "./chunk-KRSBK5BE.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-PNUWMEIY.js";
3
+ } from "./chunk-YVDFJ6VV.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-NA5D62OI.js";
3
+ } from "./chunk-YCBXYOPI.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-HTO2XULO.js";
9
+ } from "./chunk-KRSBK5BE.js";
10
10
  import {
11
11
  clientContextHeaders,
12
12
  getPackageVersion
13
- } from "./chunk-AYV2NRYJ.js";
13
+ } from "./chunk-OG5HVCVG.js";
14
14
 
15
15
  // src/cli/net.ts
16
16
  import { createRequire } from "module";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-HTO2XULO.js";
12
+ } from "./chunk-KRSBK5BE.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -10,7 +10,7 @@ import {
10
10
  isSetupConnectMode,
11
11
  isValidApiKey,
12
12
  normalizeAgentId
13
- } from "./chunk-AYV2NRYJ.js";
13
+ } from "./chunk-OG5HVCVG.js";
14
14
 
15
15
  // src/setup/options.ts
16
16
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -2,7 +2,7 @@ import {
2
2
  autoUpdateLock,
3
3
  installPackageGlobally,
4
4
  npmErrorMessage
5
- } from "./chunk-HJL5RBOU.js";
5
+ } from "./chunk-GFW4NSYW.js";
6
6
  import {
7
7
  writeJsonAtomic
8
8
  } from "./chunk-T7E75EKA.js";
@@ -2585,7 +2585,16 @@ var agentPromptsBeforeAnEdit = ({ source, event, permissionMode }) => {
2585
2585
  var editGoesToTheAgentsPrompt = (call, input, verdict) => agentPromptsBeforeAnEdit(call) && editAsksAtTheAgentsPrompt(input, verdict);
2586
2586
  var SCOPE_BATCH_REASON = "This patch exceeds the agreed scope. Split it into single-file edits so each additional path can be approved.";
2587
2587
  var unapprovedScopeReason = (scopeReason) => `${scopeReason}. Nobody approved this path, so the change was refused.`;
2588
+ var NO_RESPONSE_REASON = "No response within timeout";
2588
2589
  var codexRaisesItsOwnPrompts = (permissionMode) => permissionMode !== "bypassPermissions";
2590
+ var CODEX_ASK_PASSES = { kind: "pass" };
2591
+ var CODEX_ASK_UNANSWERED = { kind: "deny", reason: NO_RESPONSE_REASON };
2592
+ var timeoutActionApplies = (ask) => ask.mode === "push_only" && ask.fullWindowServed;
2593
+ var codexUnansweredPreToolUse = (ask) => {
2594
+ if (timeoutActionApplies(ask) && ask.timeoutAction === "approve") return CODEX_ASK_PASSES;
2595
+ if (timeoutActionApplies(ask) && ask.timeoutAction === "deny") return CODEX_ASK_UNANSWERED;
2596
+ return codexRaisesItsOwnPrompts(ask.permissionMode) ? CODEX_ASK_PASSES : CODEX_ASK_UNANSWERED;
2597
+ };
2589
2598
  var isScopeReason = (scopeReason) => typeof scopeReason === "string" && scopeReason.length > 0;
2590
2599
  var scopeBreachReasonOf = (verdict) => verdict.kind === "gate" && isScopeReason(verdict.scopeReason) ? verdict.scopeReason : void 0;
2591
2600
  var onlyCodexPreToolUseCanAsk = (verdict, permissionMode) => verdict.kind === "gate" && (scopeBreachReasonOf(verdict) !== void 0 || !codexRaisesItsOwnPrompts(permissionMode));
@@ -3219,8 +3228,10 @@ export {
3219
3228
  editGoesToTheAgentsPrompt,
3220
3229
  SCOPE_BATCH_REASON,
3221
3230
  unapprovedScopeReason,
3231
+ NO_RESPONSE_REASON,
3232
+ codexRaisesItsOwnPrompts,
3233
+ codexUnansweredPreToolUse,
3222
3234
  scopeBreachReasonOf,
3223
- onlyCodexPreToolUseCanAsk,
3224
3235
  codexCallNeedsAPerson,
3225
3236
  claudePermissionRulesFromSettings,
3226
3237
  claudeConsultsItsAllowlist,
@@ -3,27 +3,27 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-JC3AGMOP.js";
6
+ } from "./chunk-5Y4PJEBJ.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-TFV6RATK.js";
13
+ } from "./chunk-35USDKDL.js";
14
14
  import {
15
15
  readControlMode,
16
16
  readKeySource
17
- } from "./chunk-5EWNGYFD.js";
17
+ } from "./chunk-TEWUZ3MT.js";
18
18
  import {
19
19
  getMachineId
20
- } from "./chunk-NA5D62OI.js";
20
+ } from "./chunk-YCBXYOPI.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-HTO2XULO.js";
23
+ } from "./chunk-KRSBK5BE.js";
24
24
  import {
25
25
  getPackageVersion
26
- } from "./chunk-AYV2NRYJ.js";
26
+ } from "./chunk-OG5HVCVG.js";
27
27
 
28
28
  // src/machines.ts
29
29
  import { hostname } from "os";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-ME55HQOI.js";
3
+ } from "./chunk-73NUMFZG.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-FZW7Q7GM.js";
9
+ } from "./chunk-VZA4GGXL.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-YKYFFCB5.js";
12
+ } from "./chunk-MRMXB6Z6.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -18,7 +18,7 @@ import {
18
18
  guardedArgv,
19
19
  pusharyDir,
20
20
  vscodePluginDir
21
- } from "./chunk-HJL5RBOU.js";
21
+ } from "./chunk-GFW4NSYW.js";
22
22
  import {
23
23
  readJsonSafe
24
24
  } from "./chunk-T7E75EKA.js";
@@ -28,7 +28,7 @@ import {
28
28
  HOOK_LOCATOR_BINARY,
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile
31
- } from "./chunk-AYV2NRYJ.js";
31
+ } from "./chunk-OG5HVCVG.js";
32
32
 
33
33
  // src/opencode-plugin.ts
34
34
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-NDKFHLJI.js";
3
+ } from "./chunk-P76XTT2Y.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-5EWNGYFD.js";
6
+ } from "./chunk-TEWUZ3MT.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-HJL5RBOU.js";
9
+ } from "./chunk-GFW4NSYW.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-T7E75EKA.js";
13
13
  import {
14
14
  isValidApiKey
15
- } from "./chunk-AYV2NRYJ.js";
15
+ } from "./chunk-OG5HVCVG.js";
16
16
 
17
17
  // src/shared-mcp-key.ts
18
18
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-LJJWNHUW.js";
3
+ } from "./chunk-3LRUBMNK.js";
4
4
  import {
5
5
  detectClaudeVersion
6
6
  } from "./chunk-RIVNNBEK.js";
@@ -12,12 +12,12 @@ import {
12
12
  openCodeHookArgv,
13
13
  openCodePluginDir,
14
14
  openCodeWired
15
- } from "./chunk-NDKFHLJI.js";
15
+ } from "./chunk-P76XTT2Y.js";
16
16
  import {
17
17
  addClaudeMcpServer,
18
18
  addPusharyHooks,
19
19
  addPusharyToolPermissions
20
- } from "./chunk-ME55HQOI.js";
20
+ } from "./chunk-73NUMFZG.js";
21
21
  import {
22
22
  claudeUnprovenHolds,
23
23
  claudeWired,
@@ -25,7 +25,7 @@ import {
25
25
  codexWired,
26
26
  geminiWired,
27
27
  planHooks
28
- } from "./chunk-FZW7Q7GM.js";
28
+ } from "./chunk-VZA4GGXL.js";
29
29
  import {
30
30
  CLAUDE_HOOK_BINARY,
31
31
  CLAUDE_HOOK_EVENTS,
@@ -36,7 +36,7 @@ import {
36
36
  needsReregistration,
37
37
  registrationSignatures,
38
38
  supportedClaudeEvents
39
- } from "./chunk-VP6WDFVO.js";
39
+ } from "./chunk-E755IUIH.js";
40
40
  import {
41
41
  formatVersion
42
42
  } from "./chunk-6ICPEJY5.js";
@@ -59,7 +59,7 @@ import {
59
59
  registrationHolderOf,
60
60
  resolveGlobalBinary,
61
61
  vscodePluginMcp
62
- } from "./chunk-HJL5RBOU.js";
62
+ } from "./chunk-GFW4NSYW.js";
63
63
  import {
64
64
  readJsonSafe,
65
65
  writeFileAtomic,
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-57VUNV32.js";
7
+ } from "./chunk-NHJUNVMB.js";
8
8
  import {
9
9
  describeAutoUpdateCheck,
10
10
  globalInstallLocation,
@@ -14,7 +14,7 @@ import {
14
14
  readAutoUpdateState,
15
15
  updateAutoUpdateState,
16
16
  upgradeEntryFor
17
- } from "./chunk-6MLSXBNR.js";
17
+ } from "./chunk-3FBU6HUW.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
@@ -27,10 +27,10 @@ import {
27
27
  npmErrorMessage,
28
28
  readGlobalCliInstallAt,
29
29
  readGlobalPrefix
30
- } from "./chunk-HJL5RBOU.js";
30
+ } from "./chunk-GFW4NSYW.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-PNUWMEIY.js";
33
+ } from "./chunk-YVDFJ6VV.js";
34
34
  import {
35
35
  commandsPackage,
36
36
  globalUpgradeEntry,
@@ -39,7 +39,7 @@ import {
39
39
  isSameMajorVersion,
40
40
  ownPackageRoot,
41
41
  packageVersionAt
42
- } from "./chunk-AYV2NRYJ.js";
42
+ } from "./chunk-OG5HVCVG.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-SYLJL63X.js";
3
+ } from "./chunk-CUW5CPJJ.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-PNUWMEIY.js";
6
+ } from "./chunk-YVDFJ6VV.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-HJL5RBOU.js";
3
+ } from "./chunk-GFW4NSYW.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-AYV2NRYJ.js";
16
+ } from "./chunk-OG5HVCVG.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-AYV2NRYJ.js";
3
+ } from "./chunk-OG5HVCVG.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-QIOWXUFH.js";
6
+ } from "./chunk-QWO5UBVP.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-3YCYTGGK.js";
10
+ } from "./chunk-IJOITMKQ.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-VKTDXQGH.js";
3
+ } from "./chunk-UNO3UEDW.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-T7E75EKA.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-HTO2XULO.js";
12
+ } from "./chunk-KRSBK5BE.js";
13
13
 
14
14
  // src/shell-alias.ts
15
15
  import { homedir } from "os";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-KZERVKTD.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-PNUWMEIY.js";
6
+ } from "./chunk-YVDFJ6VV.js";
7
7
  import {
8
8
  getPackageVersion
9
- } from "./chunk-AYV2NRYJ.js";
9
+ } from "./chunk-OG5HVCVG.js";
10
10
 
11
11
  // src/cli/usage.ts
12
12
  var exitOnHelpFlag = (command) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-AYV2NRYJ.js";
3
+ } from "./chunk-OG5HVCVG.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-AYV2NRYJ.js";
4
+ } from "./chunk-OG5HVCVG.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-HTO2XULO.js";
3
+ } from "./chunk-KRSBK5BE.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-AYV2NRYJ.js";
6
+ } from "./chunk-OG5HVCVG.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -2,23 +2,23 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-VP6WDFVO.js";
5
+ } from "./chunk-E755IUIH.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-YKYFFCB5.js";
8
+ } from "./chunk-MRMXB6Z6.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-7VOEZPJ4.js";
11
+ } from "./chunk-D2ZPTCAL.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  hasCodexHooks,
15
15
  holdBudgetOf
16
- } from "./chunk-HJL5RBOU.js";
16
+ } from "./chunk-GFW4NSYW.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-AYV2NRYJ.js";
21
+ } from "./chunk-OG5HVCVG.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -319,17 +319,12 @@ var planHooks = (context) => {
319
319
  if (context.takeOverHooks) return "install";
320
320
  return "keep";
321
321
  };
322
- var describeAppOwnership = (agentName) => `The Pushary Mac app owns ${agentName}'s hooks.`;
323
- var KEEP_HINT = "Kept with the app's account. Pass --take-over-hooks to have the CLI own them instead.";
324
- var OWNER_LABELS = {
325
- app: "the Pushary Mac app",
326
- cli: "the CLI"
327
- };
322
+ var describeAppOwnership = (agentName) => `Pushary for Mac handles ${agentName}'s approvals.`;
323
+ var KEEP_HINT = "Kept on the app's account. Pass --take-over-hooks to have this setup handle them instead.";
324
+ var namesInWords = (names) => names.length <= 1 ? names.join("") : `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
328
325
  var describeHookOwnership = (entries, names) => {
329
- const owned = entries.filter((entry) => entry.owner !== "none");
330
- if (owned.length === 0) return null;
331
- const parts = owned.map((entry) => `${names[entry.agent]} by ${OWNER_LABELS[entry.owner]}${entry.kept ? " (kept)" : ""}`);
332
- return `Hooks: ${parts.join(", ")}.`;
326
+ const handledByMac = entries.filter((entry) => entry.owner === "app").map((entry) => names[entry.agent]);
327
+ return handledByMac.length === 0 ? null : `Pushary for Mac handles approvals for ${namesInWords(handledByMac)}.`;
333
328
  };
334
329
 
335
330
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-YKYFFCB5.js";
3
+ } from "./chunk-MRMXB6Z6.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-GMXKITVA.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-7QLSKOSU.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-PNUWMEIY.js";
12
+ } from "./chunk-YVDFJ6VV.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-AYV2NRYJ.js";
20
+ } from "./chunk-OG5HVCVG.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -6,38 +6,38 @@ import {
6
6
  } from "./chunk-SGZJ5LYH.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-TFV6RATK.js";
9
+ } from "./chunk-35USDKDL.js";
10
10
  import {
11
11
  buildTranscriptRecords,
12
12
  decodePublicKey,
13
13
  generateSessionKey,
14
14
  wrapSessionKey
15
- } from "./chunk-QIOWXUFH.js";
15
+ } from "./chunk-QWO5UBVP.js";
16
16
  import {
17
17
  fetchTranscriptRecipients,
18
18
  uploadTranscriptRecords
19
- } from "./chunk-3YCYTGGK.js";
19
+ } from "./chunk-IJOITMKQ.js";
20
20
  import {
21
21
  transcriptEnvironmentPreference,
22
22
  transcriptsEnabled
23
- } from "./chunk-HSVJ62BE.js";
23
+ } from "./chunk-D45B4GNL.js";
24
24
  import {
25
25
  hookOwnerOf
26
- } from "./chunk-FZW7Q7GM.js";
26
+ } from "./chunk-VZA4GGXL.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-5EWNGYFD.js";
29
+ } from "./chunk-TEWUZ3MT.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-HJL5RBOU.js";
33
+ } from "./chunk-GFW4NSYW.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-T7E75EKA.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-HTO2XULO.js";
40
+ } from "./chunk-KRSBK5BE.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-HJL5RBOU.js";
3
+ } from "./chunk-GFW4NSYW.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-T7E75EKA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-IQCNOEQL.js";
3
+ } from "./chunk-AEWPTGG2.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var denyReasonFrom = (value, note) => {