pushary 1.9.27 → 1.9.28

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 +6 -0
  2. package/dist/bin/pushary-bell-hook.js +25 -25
  3. package/dist/bin/pushary-bell.js +9 -9
  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 +30 -30
  8. package/dist/bin/pushary-codex.js +12 -12
  9. package/dist/bin/pushary-connect.js +24 -24
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +32 -32
  12. package/dist/bin/pushary-disconnect.js +24 -24
  13. package/dist/bin/pushary-doctor.js +33 -33
  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 +40 -32
  18. package/dist/bin/pushary-login.js +12 -12
  19. package/dist/bin/pushary-logout.js +24 -24
  20. package/dist/bin/pushary-mcp.js +9 -9
  21. package/dist/bin/pushary-mode.js +12 -12
  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 +35 -35
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +26 -26
  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 +12 -12
  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 +12 -12
  40. package/dist/bin/pushary.js +6 -6
  41. package/dist/{chunk-5ZR7XFTB.js → chunk-3OFFLLSJ.js} +21 -13
  42. package/dist/{chunk-AT4URLSU.js → chunk-3TF5FHAT.js} +5 -5
  43. package/dist/{chunk-H2ZHGK4F.js → chunk-43DOHHZZ.js} +2 -2
  44. package/dist/{chunk-W4LNR7LP.js → chunk-56U55YDV.js} +3 -3
  45. package/dist/{chunk-MSKJRRHY.js → chunk-5NXOJ3JG.js} +3 -3
  46. package/dist/{chunk-PQAA37YV.js → chunk-64LLZV5F.js} +6 -6
  47. package/dist/{chunk-JXOCD4MG.js → chunk-74YRZTGP.js} +2 -2
  48. package/dist/{chunk-ZQZRBPTP.js → chunk-7DXPQW2H.js} +59 -8
  49. package/dist/{chunk-Z5AAPX3O.js → chunk-7RKX7WRQ.js} +1 -1
  50. package/dist/{chunk-NK2URK5A.js → chunk-7TBCGHJT.js} +2 -2
  51. package/dist/{chunk-MDAJO2MP.js → chunk-7ZWU4BNG.js} +5 -5
  52. package/dist/{chunk-SLW45RGY.js → chunk-A24TEUD6.js} +11 -11
  53. package/dist/{chunk-2NQHGDK5.js → chunk-AR7XOG6W.js} +1 -1
  54. package/dist/{chunk-5LLH2TBR.js → chunk-AXGA3WJI.js} +1 -1
  55. package/dist/{chunk-LUJAURFP.js → chunk-BG7T5MNV.js} +1 -1
  56. package/dist/{chunk-KN5ULH4O.js → chunk-BXUYF5HB.js} +3 -3
  57. package/dist/{chunk-V6HQFOBS.js → chunk-CJTTAF4O.js} +3 -3
  58. package/dist/{chunk-TWCWRHNK.js → chunk-COEOZ2NC.js} +5 -5
  59. package/dist/{chunk-UQTQVH5X.js → chunk-EBO5KWWC.js} +1 -1
  60. package/dist/{chunk-QMMOVPUP.js → chunk-EP425PGA.js} +8 -8
  61. package/dist/{chunk-VGVMBY4V.js → chunk-FD3QASU3.js} +18 -9
  62. package/dist/{chunk-RZNJGCPR.js → chunk-FY2XCYLK.js} +5 -5
  63. package/dist/{chunk-JK42X2VL.js → chunk-FYYWKCPO.js} +2 -2
  64. package/dist/{chunk-MTODICDT.js → chunk-GXZFDZJG.js} +1 -1
  65. package/dist/{chunk-LY3KHTHS.js → chunk-HRAZMBUX.js} +1 -1
  66. package/dist/{chunk-YZ7D3P3M.js → chunk-ICMVPBRQ.js} +2 -2
  67. package/dist/{chunk-4LIOV4YP.js → chunk-IDXEDMWI.js} +3 -3
  68. package/dist/{chunk-U4Q3AKLU.js → chunk-IWPQBWFN.js} +1 -1
  69. package/dist/{chunk-WGTD4NZV.js → chunk-IWYBFBRW.js} +2 -2
  70. package/dist/{chunk-DY6AKR4W.js → chunk-JOZWN4YI.js} +4 -4
  71. package/dist/{chunk-UWEDDQHU.js → chunk-L5ZMZOQL.js} +2 -2
  72. package/dist/{chunk-GORB726L.js → chunk-ME2PKG7C.js} +2 -2
  73. package/dist/{chunk-VWTCGKMU.js → chunk-MNHY3EIN.js} +1 -1
  74. package/dist/{chunk-XTTMUQ4Z.js → chunk-OK4WDRGM.js} +1 -1
  75. package/dist/{chunk-4LO6OQZ4.js → chunk-OQKV3OXH.js} +1 -1
  76. package/dist/{chunk-IOTR2VQN.js → chunk-S3NAONBN.js} +4 -4
  77. package/dist/{chunk-MRMIGVUI.js → chunk-SGAQYFGS.js} +1 -1
  78. package/dist/{chunk-YTTPPJZW.js → chunk-TAPGV2YV.js} +4 -4
  79. package/dist/{chunk-HFGTWPAD.js → chunk-UJZ3KD4E.js} +2 -2
  80. package/dist/{chunk-OPSLFAKF.js → chunk-UMTGSFAI.js} +39 -10
  81. package/dist/{chunk-M463H5LN.js → chunk-URZOKMAV.js} +2 -2
  82. package/dist/{chunk-CSXWXXFJ.js → chunk-V5BIWNB3.js} +1 -1
  83. package/dist/{chunk-W4DFSUZG.js → chunk-VAJLOCFP.js} +2 -2
  84. package/dist/{chunk-TYPQUHIS.js → chunk-VU6O4P2N.js} +5 -5
  85. package/dist/{chunk-O2SMA3JN.js → chunk-VYKUGORF.js} +4 -4
  86. package/dist/{chunk-6CBKIF3S.js → chunk-W6MUIG6S.js} +3 -3
  87. package/dist/{chunk-BZYYTJ65.js → chunk-WIAWMH6T.js} +4 -4
  88. package/dist/{chunk-E4NITECV.js → chunk-YRB2VBKK.js} +2 -2
  89. package/dist/{chunk-XESMYZLU.js → chunk-YTCMVHW5.js} +1 -1
  90. package/dist/{chunk-5SKHXKIF.js → chunk-YW7JQ7Z4.js} +5 -5
  91. package/dist/{chunk-LOVDPKUU.js → chunk-ZH32OREM.js} +1 -1
  92. package/dist/{chunk-OXOT3CGW.js → chunk-ZMWCN3QS.js} +4 -4
  93. package/dist/{chunk-ZWDXBLEZ.js → chunk-ZREXC363.js} +3 -3
  94. package/dist/{chunk-TQE5VIDJ.js → chunk-ZX5ISG5O.js} +10 -9
  95. package/dist/{global-upgrade-FKQPJL5P.js → global-upgrade-MBW4MRJ2.js} +6 -6
  96. package/dist/{paths-TU47TCRS.js → paths-H4XMIYUS.js} +2 -2
  97. package/dist/{reapply-CTJZBUJY.js → reapply-JFEY77OC.js} +22 -20
  98. package/dist/src/index.js +19 -19
  99. package/dist/{upgrade-lock-2SQCRMDL.js → upgrade-lock-2RGMG5ZV.js} +3 -3
  100. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-GORB726L.js";
3
+ } from "./chunk-ME2PKG7C.js";
4
4
  import {
5
5
  detectClaudeVersion
6
6
  } from "./chunk-RIVNNBEK.js";
@@ -12,12 +12,15 @@ import {
12
12
  openCodeHookArgv,
13
13
  openCodePluginDir,
14
14
  openCodeWired
15
- } from "./chunk-5SKHXKIF.js";
15
+ } from "./chunk-YW7JQ7Z4.js";
16
16
  import {
17
17
  addClaudeMcpServer,
18
+ addCompatibleHooks,
18
19
  addPusharyHooks,
19
- addPusharyToolPermissions
20
- } from "./chunk-TQE5VIDJ.js";
20
+ addPusharyToolPermissions,
21
+ compatibleConfigFile,
22
+ hasCompatibleHooks
23
+ } from "./chunk-ZX5ISG5O.js";
21
24
  import {
22
25
  claudeUnprovenHolds,
23
26
  claudeWired,
@@ -25,7 +28,7 @@ import {
25
28
  codexWired,
26
29
  geminiWired,
27
30
  planHooks
28
- } from "./chunk-TWCWRHNK.js";
31
+ } from "./chunk-COEOZ2NC.js";
29
32
  import {
30
33
  CLAUDE_HOOK_BINARY,
31
34
  CLAUDE_HOOK_EVENTS,
@@ -36,7 +39,7 @@ import {
36
39
  needsReregistration,
37
40
  registrationSignatures,
38
41
  supportedClaudeEvents
39
- } from "./chunk-KN5ULH4O.js";
42
+ } from "./chunk-BXUYF5HB.js";
40
43
  import {
41
44
  formatVersion
42
45
  } from "./chunk-6ICPEJY5.js";
@@ -57,17 +60,20 @@ import {
57
60
  namesOurBinary,
58
61
  registeredCommands,
59
62
  registrationHolderOf,
63
+ resolveGlobalBinDir,
60
64
  resolveGlobalBinary,
61
65
  vscodePluginMcp
62
- } from "./chunk-YTTPPJZW.js";
66
+ } from "./chunk-TAPGV2YV.js";
63
67
  import {
64
68
  readJsonSafe,
65
69
  writeFileAtomic,
66
70
  writeJsonAtomic
67
71
  } from "./chunk-AQFEP65J.js";
68
72
  import {
73
+ HOOK_COMPATIBLE_PROFILES,
74
+ isCompatibleAgentType,
69
75
  isRecord
70
- } from "./chunk-ZQZRBPTP.js";
76
+ } from "./chunk-7DXPQW2H.js";
71
77
 
72
78
  // src/reapply.ts
73
79
  import { dirname, join } from "path";
@@ -328,6 +334,22 @@ var reapplyOpenCodePlugin = (paths = {}) => {
328
334
  return { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
329
335
  }
330
336
  };
337
+ var NOT_CONFIGURED = { configured: false, reapplied: false, hooks: false, mcp: false };
338
+ var CONFIGURED_BUT_FAILED = { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
339
+ var REFRESHED_HOOKS = { configured: true, reapplied: true, hooks: true, mcp: false };
340
+ var reapplyCompatibleHooks = (profile, paths = {}) => {
341
+ const configFile = paths.configFile ?? compatibleConfigFile(profile);
342
+ const config = readJson(configFile);
343
+ if (config == null || !hasCompatibleHooks(config, profile)) return NOT_CONFIGURED;
344
+ try {
345
+ const written = addCompatibleHooks(config, profile, paths.binDir ?? resolveGlobalBinDir(CLAUDE_HOOK_BINARY));
346
+ if (!written.ok) return CONFIGURED_BUT_FAILED;
347
+ writeJson(configFile, config);
348
+ return REFRESHED_HOOKS;
349
+ } catch {
350
+ return CONFIGURED_BUT_FAILED;
351
+ }
352
+ };
331
353
  var SETUP_CHOICE_BY_REAPPLY_ID = {
332
354
  claude: "claude_code",
333
355
  codex: "codex",
@@ -336,7 +358,8 @@ var SETUP_CHOICE_BY_REAPPLY_ID = {
336
358
  vscode: "vscode",
337
359
  opencode: "opencode"
338
360
  };
339
- var reapplyHookOwner = (id, appAvailable) => agentHookOwner(SETUP_CHOICE_BY_REAPPLY_ID[id], appAvailable);
361
+ var setupChoiceOf = (id) => isCompatibleAgentType(id) ? id : SETUP_CHOICE_BY_REAPPLY_ID[id];
362
+ var reapplyHookOwner = (id, appAvailable) => agentHookOwner(setupChoiceOf(id), appAvailable);
340
363
  var reapplyHolder = (id, appAvailable) => planHooks({ owner: reapplyHookOwner(id, appAvailable), takeOverHooks: false, nonInteractive: true }) === "keep" ? "app" : "cli";
341
364
  var KEPT_FOR_APP = { configured: true, reapplied: false, hooks: false, mcp: false };
342
365
  var FAILED_REAPPLY = { configured: false, reapplied: false, hooks: false, mcp: false, failed: true };
@@ -347,7 +370,12 @@ var reapplyAllAgents = (apiKey, options = {}) => {
347
370
  { id: "gemini", label: "Gemini CLI", run: () => reapplyGeminiSettings(apiKey) },
348
371
  { id: "cursor", label: "Cursor", run: () => reapplyCursorPlugin(apiKey) },
349
372
  { id: "vscode", label: "VS Code", run: () => reapplyVsCodePlugin(apiKey) },
350
- { id: "opencode", label: "OpenCode", run: () => reapplyOpenCodePlugin() }
373
+ { id: "opencode", label: "OpenCode", run: () => reapplyOpenCodePlugin() },
374
+ ...HOOK_COMPATIBLE_PROFILES.map((profile) => ({
375
+ id: profile.agentType,
376
+ label: profile.label,
377
+ run: () => reapplyCompatibleHooks(profile)
378
+ }))
351
379
  ];
352
380
  const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
353
381
  const done = [];
@@ -378,6 +406,7 @@ export {
378
406
  reapplyCursorPlugin,
379
407
  reapplyVsCodePlugin,
380
408
  reapplyOpenCodePlugin,
409
+ reapplyCompatibleHooks,
381
410
  reapplyAllAgents,
382
411
  ensureCodexTrustAfterReapply
383
412
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-YTTPPJZW.js";
3
+ } from "./chunk-TAPGV2YV.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-AQFEP65J.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-ZQZRBPTP.js";
9
+ } from "./chunk-7DXPQW2H.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-ZQZRBPTP.js";
3
+ } from "./chunk-7DXPQW2H.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-LY3KHTHS.js";
6
+ } from "./chunk-HRAZMBUX.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-5LLH2TBR.js";
10
+ } from "./chunk-AXGA3WJI.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-4LIOV4YP.js";
7
+ } from "./chunk-IDXEDMWI.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-U4Q3AKLU.js";
10
+ } from "./chunk-IWPQBWFN.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-YTTPPJZW.js";
14
+ } from "./chunk-TAPGV2YV.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-AQFEP65J.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-XTTMUQ4Z.js";
23
+ } from "./chunk-OK4WDRGM.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
@@ -28,7 +28,7 @@ import {
28
28
  globalPackageFolder,
29
29
  globalRootFor,
30
30
  isRecord
31
- } from "./chunk-ZQZRBPTP.js";
31
+ } from "./chunk-7DXPQW2H.js";
32
32
 
33
33
  // src/daemon-lifecycle.ts
34
34
  import { dirname, join, win32 as win32Path } from "path";
@@ -2,25 +2,25 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-HFGTWPAD.js";
5
+ } from "./chunk-UJZ3KD4E.js";
6
6
  import {
7
7
  createIo
8
8
  } from "./chunk-FO3MDD26.js";
9
9
  import {
10
10
  readKeySource
11
- } from "./chunk-4LIOV4YP.js";
11
+ } from "./chunk-IDXEDMWI.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-MSKJRRHY.js";
17
+ } from "./chunk-5NXOJ3JG.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-XTTMUQ4Z.js";
23
+ } from "./chunk-OK4WDRGM.js";
24
24
 
25
25
  // src/cli/report-key.ts
26
26
  var { dim, yellow } = createIo();
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-5SKHXKIF.js";
3
+ } from "./chunk-YW7JQ7Z4.js";
4
4
  import {
5
5
  codexHomeFrom,
6
6
  resolvePathBinary
7
- } from "./chunk-YTTPPJZW.js";
7
+ } from "./chunk-TAPGV2YV.js";
8
8
  import {
9
9
  HOOK_COMPATIBLE_PROFILES
10
- } from "./chunk-ZQZRBPTP.js";
10
+ } from "./chunk-7DXPQW2H.js";
11
11
 
12
12
  // src/hermes-config.ts
13
13
  import { execFileSync } from "child_process";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  MCP_BRIDGE_BINARY
3
- } from "./chunk-JK42X2VL.js";
3
+ } from "./chunk-FYYWKCPO.js";
4
4
  import {
5
5
  KEY_FILE_MODE
6
- } from "./chunk-4LIOV4YP.js";
6
+ } from "./chunk-IDXEDMWI.js";
7
7
  import {
8
8
  NpmMissingError,
9
9
  NpmPermissionError
10
- } from "./chunk-YTTPPJZW.js";
10
+ } from "./chunk-TAPGV2YV.js";
11
11
  import {
12
12
  readJsonSafe,
13
13
  writeFileAtomic,
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-AQFEP65J.js";
16
16
  import {
17
17
  NPX_LATEST_COMMAND
18
- } from "./chunk-Z5AAPX3O.js";
18
+ } from "./chunk-7RKX7WRQ.js";
19
19
 
20
20
  // src/instruction-file.ts
21
21
  import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
@@ -6,12 +6,12 @@ import {
6
6
  permissionDeniedAction,
7
7
  releaseThrottle,
8
8
  reportEvent
9
- } from "./chunk-VGVMBY4V.js";
9
+ } from "./chunk-FD3QASU3.js";
10
10
  import {
11
11
  machineDecisionFor,
12
12
  shouldDeferToNativeMode,
13
13
  wireVerdictFor
14
- } from "./chunk-ZQZRBPTP.js";
14
+ } from "./chunk-7DXPQW2H.js";
15
15
 
16
16
  // src/machine-decision-audit.ts
17
17
  import { basename } from "path";
@@ -2,7 +2,7 @@ import {
2
2
  autoUpdateLock,
3
3
  installPackageGlobally,
4
4
  npmErrorMessage
5
- } from "./chunk-YTTPPJZW.js";
5
+ } from "./chunk-TAPGV2YV.js";
6
6
  import {
7
7
  writeJsonAtomic
8
8
  } from "./chunk-AQFEP65J.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-TQE5VIDJ.js";
3
+ } from "./chunk-ZX5ISG5O.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-TWCWRHNK.js";
9
+ } from "./chunk-COEOZ2NC.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-MRMIGVUI.js";
12
+ } from "./chunk-SGAQYFGS.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-YTTPPJZW.js";
21
+ } from "./chunk-TAPGV2YV.js";
22
22
  import {
23
23
  readJsonSafe
24
24
  } from "./chunk-AQFEP65J.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-ZQZRBPTP.js";
32
+ } from "./chunk-7DXPQW2H.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-VGVMBY4V.js";
3
+ } from "./chunk-FD3QASU3.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-TQE5VIDJ.js";
4
+ } from "./chunk-ZX5ISG5O.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-TWCWRHNK.js";
7
+ } from "./chunk-COEOZ2NC.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-YTTPPJZW.js";
11
+ } from "./chunk-TAPGV2YV.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-ZQZRBPTP.js";
14
+ } from "./chunk-7DXPQW2H.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-MSKJRRHY.js";
3
+ } from "./chunk-5NXOJ3JG.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-W4LNR7LP.js";
6
+ } from "./chunk-56U55YDV.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-XTTMUQ4Z.js";
9
+ } from "./chunk-OK4WDRGM.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -3,18 +3,18 @@ import {
3
3
  addGeminiMcpServer,
4
4
  removeGeminiMcpServer,
5
5
  supportedClaudeEvents
6
- } from "./chunk-KN5ULH4O.js";
6
+ } from "./chunk-BXUYF5HB.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  parseApplyPatchFiles
10
- } from "./chunk-VGVMBY4V.js";
10
+ } from "./chunk-FD3QASU3.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-YTTPPJZW.js";
17
+ } from "./chunk-TAPGV2YV.js";
18
18
  import {
19
19
  HOOK_LOCATOR_BINARY,
20
20
  PHONE_ANSWERED_TOOLS,
@@ -24,7 +24,7 @@ import {
24
24
  refusalOutput,
25
25
  toToolLookup,
26
26
  withHookHoldBudget
27
- } from "./chunk-ZQZRBPTP.js";
27
+ } from "./chunk-7DXPQW2H.js";
28
28
 
29
29
  // src/claude-config.ts
30
30
  import { join } from "path";
@@ -277,9 +277,11 @@ var pruneEmptyMap = (config, keyPath) => {
277
277
  };
278
278
  var aliasesFor = (profile, canonical) => Object.entries(profile.toolAliases).flatMap(([agentName, target]) => target === canonical ? [agentName] : []);
279
279
  var carriesPhoneAnswer = (profile, canonical) => profile.wire !== "permission_decision" && PHONE_ANSWERED_TOOLS.has(canonical);
280
- var translateMatcher = (profile, matcher) => {
280
+ var isSoleGateEvent = (profile, definition) => profile.soleGate !== null && definition.delivery === "approval";
281
+ var soleGateCoverage = (profile, definition) => profile.soleGate && isSoleGateEvent(profile, definition) ? profile.soleGate.coveredTools : [];
282
+ var translateMatcher = (profile, definition, matcher) => {
281
283
  const spellings = matcher.split("|").filter((canonical) => !carriesPhoneAnswer(profile, canonical)).flatMap((canonical) => [canonical, ...aliasesFor(profile, canonical)]);
282
- return [.../* @__PURE__ */ new Set([...spellings, ...profile.extraMatchers])].join("|");
284
+ return [.../* @__PURE__ */ new Set([...spellings, ...soleGateCoverage(profile, definition), ...profile.extraMatchers])].join("|");
283
285
  };
284
286
  var TOOL_MATCHED_EVENTS = /* @__PURE__ */ new Set(["PreToolUse", "PostToolUse"]);
285
287
  var isPusharyHandler = (entry2, scope) => {
@@ -291,7 +293,7 @@ var withoutMatcher = ({ matcher, ...hook }) => hook;
291
293
  var compatibleHookEvents = (profile) => CLAUDE_HOOK_EVENTS.filter((hook) => profile.events.includes(hook.event)).map((hook) => {
292
294
  if (!hook.matcher) return hook;
293
295
  if (!TOOL_MATCHED_EVENTS.has(hook.event)) return withoutMatcher(hook);
294
- return { ...hook, matcher: translateMatcher(profile, hook.matcher) };
296
+ return { ...hook, matcher: translateMatcher(profile, hook, hook.matcher) };
295
297
  });
296
298
  var WRITTEN = { ok: true };
297
299
  var ROOT_KEY = "(root)";
@@ -329,8 +331,7 @@ var commandFor = (profile, definition, resolve2) => {
329
331
  return withHookHoldBudget(command, holdBudgetOf(definition));
330
332
  };
331
333
  var writesBareHandler = (profile, definition) => profile.nonToolEntries === "handler" && !TOOL_MATCHED_EVENTS.has(definition.event);
332
- var refusesWhenPusharyIsMissing = (profile, definition) => profile.soleGate !== null && definition.delivery === "approval";
333
- var guardFor = (profile, definition, path) => refusesWhenPusharyIsMissing(profile, definition) ? guardBinaryRefusing(path, refusalOutput(profile, pusharyMissingReason(profile))) : guardBinary(path);
334
+ var guardFor = (profile, definition, path) => isSoleGateEvent(profile, definition) ? guardBinaryRefusing(path, refusalOutput(profile, pusharyMissingReason(profile))) : guardBinary(path);
334
335
  var entryFor = (profile, definition, resolve2) => {
335
336
  const handler = { type: "command", command: commandFor(profile, definition, resolve2), timeout: definition.timeout };
336
337
  if (writesBareHandler(profile, definition)) return handler;
@@ -5,15 +5,15 @@ import {
5
5
  readGlobalUpgradeSubject,
6
6
  upgradeInstalledPackage,
7
7
  withUpgradeLock
8
- } from "./chunk-MDAJO2MP.js";
9
- import "./chunk-XESMYZLU.js";
10
- import "./chunk-WGTD4NZV.js";
8
+ } from "./chunk-7ZWU4BNG.js";
9
+ import "./chunk-YTCMVHW5.js";
10
+ import "./chunk-IWYBFBRW.js";
11
11
  import "./chunk-POFBE6ZY.js";
12
12
  import "./chunk-KZERVKTD.js";
13
- import "./chunk-YTTPPJZW.js";
13
+ import "./chunk-TAPGV2YV.js";
14
14
  import "./chunk-AQFEP65J.js";
15
- import "./chunk-Z5AAPX3O.js";
16
- import "./chunk-ZQZRBPTP.js";
15
+ import "./chunk-7RKX7WRQ.js";
16
+ import "./chunk-7DXPQW2H.js";
17
17
  export {
18
18
  finishGlobalUpgrade,
19
19
  finishUpgradeWithLock,
@@ -32,8 +32,8 @@ import {
32
32
  pusharyDir,
33
33
  vscodePluginDir,
34
34
  vscodePluginMcp
35
- } from "./chunk-YTTPPJZW.js";
36
- import "./chunk-ZQZRBPTP.js";
35
+ } from "./chunk-TAPGV2YV.js";
36
+ import "./chunk-7DXPQW2H.js";
37
37
  export {
38
38
  autoUpdateLock,
39
39
  autoUpdateLog,
@@ -5,39 +5,40 @@ import {
5
5
  reapplyClaudeForVersion,
6
6
  reapplyClaudeSettings,
7
7
  reapplyCodexSettings,
8
+ reapplyCompatibleHooks,
8
9
  reapplyCursorPlugin,
9
10
  reapplyGeminiSettings,
10
11
  reapplyOpenCodePlugin,
11
12
  reapplyVsCodePlugin,
12
13
  repairCodexHolds
13
- } from "./chunk-OPSLFAKF.js";
14
- import "./chunk-GORB726L.js";
14
+ } from "./chunk-UMTGSFAI.js";
15
+ import "./chunk-ME2PKG7C.js";
15
16
  import "./chunk-RIVNNBEK.js";
16
17
  import "./chunk-XHKBHWLX.js";
17
- import "./chunk-5SKHXKIF.js";
18
- import "./chunk-TQE5VIDJ.js";
19
- import "./chunk-TWCWRHNK.js";
20
- import "./chunk-KN5ULH4O.js";
21
- import "./chunk-MRMIGVUI.js";
22
- import "./chunk-MTODICDT.js";
18
+ import "./chunk-YW7JQ7Z4.js";
19
+ import "./chunk-ZX5ISG5O.js";
20
+ import "./chunk-COEOZ2NC.js";
21
+ import "./chunk-BXUYF5HB.js";
22
+ import "./chunk-SGAQYFGS.js";
23
+ import "./chunk-GXZFDZJG.js";
23
24
  import "./chunk-GMXKITVA.js";
24
25
  import "./chunk-6ICPEJY5.js";
25
- import "./chunk-VGVMBY4V.js";
26
- import "./chunk-CSXWXXFJ.js";
27
- import "./chunk-AT4URLSU.js";
26
+ import "./chunk-FD3QASU3.js";
27
+ import "./chunk-V5BIWNB3.js";
28
+ import "./chunk-3TF5FHAT.js";
28
29
  import "./chunk-POFBE6ZY.js";
29
- import "./chunk-ZWDXBLEZ.js";
30
- import "./chunk-MSKJRRHY.js";
31
- import "./chunk-W4LNR7LP.js";
32
- import "./chunk-U4Q3AKLU.js";
30
+ import "./chunk-ZREXC363.js";
31
+ import "./chunk-5NXOJ3JG.js";
32
+ import "./chunk-56U55YDV.js";
33
+ import "./chunk-IWPQBWFN.js";
33
34
  import "./chunk-7QLSKOSU.js";
34
35
  import "./chunk-KZERVKTD.js";
35
- import "./chunk-UWEDDQHU.js";
36
- import "./chunk-YTTPPJZW.js";
36
+ import "./chunk-L5ZMZOQL.js";
37
+ import "./chunk-TAPGV2YV.js";
37
38
  import "./chunk-AQFEP65J.js";
38
- import "./chunk-XTTMUQ4Z.js";
39
- import "./chunk-Z5AAPX3O.js";
40
- import "./chunk-ZQZRBPTP.js";
39
+ import "./chunk-OK4WDRGM.js";
40
+ import "./chunk-7RKX7WRQ.js";
41
+ import "./chunk-7DXPQW2H.js";
41
42
  export {
42
43
  ensureCodexTrustAfterReapply,
43
44
  inspectConfiguredManagedProviders,
@@ -45,6 +46,7 @@ export {
45
46
  reapplyClaudeForVersion,
46
47
  reapplyClaudeSettings,
47
48
  reapplyCodexSettings,
49
+ reapplyCompatibleHooks,
48
50
  reapplyCursorPlugin,
49
51
  reapplyGeminiSettings,
50
52
  reapplyOpenCodePlugin,
package/dist/src/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  handlePreToolUse
3
- } from "../chunk-SLW45RGY.js";
4
- import "../chunk-E4NITECV.js";
5
- import "../chunk-LUJAURFP.js";
6
- import "../chunk-LOVDPKUU.js";
3
+ } from "../chunk-A24TEUD6.js";
4
+ import "../chunk-YRB2VBKK.js";
5
+ import "../chunk-BG7T5MNV.js";
6
+ import "../chunk-ZH32OREM.js";
7
7
  import {
8
8
  fetchAccountPublicKey
9
- } from "../chunk-5LLH2TBR.js";
10
- import "../chunk-TQE5VIDJ.js";
11
- import "../chunk-KN5ULH4O.js";
9
+ } from "../chunk-AXGA3WJI.js";
10
+ import "../chunk-ZX5ISG5O.js";
11
+ import "../chunk-BXUYF5HB.js";
12
12
  import "../chunk-6ICPEJY5.js";
13
13
  import {
14
14
  fetchModeOverride,
@@ -18,31 +18,31 @@ import {
18
18
  handlePostToolUse,
19
19
  handleStop,
20
20
  reportEvent
21
- } from "../chunk-VGVMBY4V.js";
22
- import "../chunk-CSXWXXFJ.js";
21
+ } from "../chunk-FD3QASU3.js";
22
+ import "../chunk-V5BIWNB3.js";
23
23
  import {
24
24
  askUser,
25
25
  cancelQuestion,
26
26
  waitForAnswer
27
- } from "../chunk-AT4URLSU.js";
27
+ } from "../chunk-3TF5FHAT.js";
28
28
  import "../chunk-POFBE6ZY.js";
29
- import "../chunk-ZWDXBLEZ.js";
30
- import "../chunk-MSKJRRHY.js";
31
- import "../chunk-W4LNR7LP.js";
32
- import "../chunk-U4Q3AKLU.js";
29
+ import "../chunk-ZREXC363.js";
30
+ import "../chunk-5NXOJ3JG.js";
31
+ import "../chunk-56U55YDV.js";
32
+ import "../chunk-IWPQBWFN.js";
33
33
  import "../chunk-7QLSKOSU.js";
34
34
  import "../chunk-KZERVKTD.js";
35
- import "../chunk-UWEDDQHU.js";
36
- import "../chunk-YTTPPJZW.js";
35
+ import "../chunk-L5ZMZOQL.js";
36
+ import "../chunk-TAPGV2YV.js";
37
37
  import "../chunk-AQFEP65J.js";
38
38
  import {
39
39
  getApiKey,
40
40
  getBaseUrl
41
- } from "../chunk-XTTMUQ4Z.js";
42
- import "../chunk-Z5AAPX3O.js";
41
+ } from "../chunk-OK4WDRGM.js";
42
+ import "../chunk-7RKX7WRQ.js";
43
43
  import {
44
44
  resolvePolicy
45
- } from "../chunk-ZQZRBPTP.js";
45
+ } from "../chunk-7DXPQW2H.js";
46
46
  export {
47
47
  askUser,
48
48
  cancelQuestion,
@@ -5,10 +5,10 @@ import {
5
5
  installWithUpgradeLock,
6
6
  ownsUpgradeLock,
7
7
  releaseAutoUpdateLock
8
- } from "./chunk-XESMYZLU.js";
9
- import "./chunk-YTTPPJZW.js";
8
+ } from "./chunk-YTCMVHW5.js";
9
+ import "./chunk-TAPGV2YV.js";
10
10
  import "./chunk-AQFEP65J.js";
11
- import "./chunk-ZQZRBPTP.js";
11
+ import "./chunk-7DXPQW2H.js";
12
12
  export {
13
13
  claimUpgradeLock,
14
14
  finishWithUpgradeLock,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushary",
3
- "version": "1.9.27",
3
+ "version": "1.9.28",
4
4
  "description": "Permission hooks for AI coding agents: route tool approvals through Pushary push notifications",
5
5
  "keywords": [
6
6
  "pushary",