@pushary/agent-hooks 1.2.0 → 1.3.1

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 (85) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/data/SKILL.md +22 -10
  3. package/data/cursor-plugin/skills/pushary/SKILL.md +21 -9
  4. package/data/vscode-plugin/skills/pushary/SKILL.md +21 -9
  5. package/dist/bin/pushary-bell-hook.js +20 -20
  6. package/dist/bin/pushary-bell.js +7 -7
  7. package/dist/bin/pushary-claude.js +20 -20
  8. package/dist/bin/pushary-clean.js +21 -21
  9. package/dist/bin/pushary-codex-bridge.js +11 -11
  10. package/dist/bin/pushary-codex-hook.js +24 -24
  11. package/dist/bin/pushary-codex.js +7 -7
  12. package/dist/bin/pushary-connect.js +7 -7
  13. package/dist/bin/pushary-cowork.js +3 -3
  14. package/dist/bin/pushary-daemon.js +24 -24
  15. package/dist/bin/pushary-disconnect.js +11 -11
  16. package/dist/bin/pushary-doctor.js +35 -22
  17. package/dist/bin/pushary-elicitation-hook.js +19 -19
  18. package/dist/bin/pushary-gemini-bridge.js +10 -10
  19. package/dist/bin/pushary-gemini-hook.js +21 -21
  20. package/dist/bin/pushary-hook.js +30 -40
  21. package/dist/bin/pushary-login.js +8 -8
  22. package/dist/bin/pushary-logout.js +5 -5
  23. package/dist/bin/pushary-mode.js +3 -3
  24. package/dist/bin/pushary-notification-hook.js +22 -22
  25. package/dist/bin/pushary-opencode-hook.js +21 -21
  26. package/dist/bin/pushary-permission-denied-hook.js +26 -26
  27. package/dist/bin/pushary-permission-hook.js +30 -29
  28. package/dist/bin/pushary-post-hook.js +22 -22
  29. package/dist/bin/pushary-prompt-hook.js +22 -22
  30. package/dist/bin/pushary-session-end-hook.js +22 -22
  31. package/dist/bin/pushary-session-start-hook.js +24 -24
  32. package/dist/bin/pushary-setup.js +27 -27
  33. package/dist/bin/pushary-stats.js +2 -2
  34. package/dist/bin/pushary-status.js +11 -11
  35. package/dist/bin/pushary-stop-hook.js +22 -22
  36. package/dist/bin/pushary-stopfailure-hook.js +22 -22
  37. package/dist/bin/pushary-transcript-register.js +18 -18
  38. package/dist/bin/pushary-transcripts.js +6 -6
  39. package/dist/bin/pushary-upgrade.js +15 -15
  40. package/dist/bin/pushary-wait.js +3 -3
  41. package/dist/{chunk-PX53RT6Q.js → chunk-34NNTYK6.js} +1 -1
  42. package/dist/{chunk-7ERWAYVV.js → chunk-35RPUNYU.js} +1 -1
  43. package/dist/{chunk-KZPUARCU.js → chunk-465UENKO.js} +2 -2
  44. package/dist/{chunk-7TDQ7KDY.js → chunk-5SALHATY.js} +2 -2
  45. package/dist/{chunk-7DQVIIHX.js → chunk-5UWDYOZX.js} +33 -6
  46. package/dist/{chunk-ZFQPSGPO.js → chunk-5WLH2ENB.js} +1 -1
  47. package/dist/{chunk-YK3OU4E2.js → chunk-5XKMOZO6.js} +4 -4
  48. package/dist/{chunk-CVCSUAXI.js → chunk-6HH4IH4K.js} +4 -4
  49. package/dist/{chunk-JQJB7BZE.js → chunk-AFKOWCMQ.js} +1 -1
  50. package/dist/{chunk-JOTV75GX.js → chunk-AFOTOA24.js} +1 -1
  51. package/dist/{chunk-6QCN5XQE.js → chunk-CDSL3LLO.js} +1 -1
  52. package/dist/{chunk-4UT44NRP.js → chunk-CKLWJ6EL.js} +10 -2
  53. package/dist/{chunk-VDOKRCWM.js → chunk-EAGMQMRM.js} +1 -1
  54. package/dist/{chunk-WC5PYFDK.js → chunk-FGNABUPN.js} +1 -1
  55. package/dist/{chunk-BXLFUTSD.js → chunk-HCTSTMDD.js} +4 -4
  56. package/dist/{chunk-KODKICKJ.js → chunk-I2OLM3DM.js} +30 -21
  57. package/dist/{chunk-LGO7U23Z.js → chunk-JZA2JOGO.js} +1 -1
  58. package/dist/{chunk-ERP7FOFQ.js → chunk-KHGIM2BN.js} +3 -3
  59. package/dist/{chunk-U42ES5U3.js → chunk-KLZJEMSE.js} +1 -1
  60. package/dist/{chunk-YT6H7BB5.js → chunk-LWT34GSY.js} +20 -13
  61. package/dist/{chunk-VE2ZWUML.js → chunk-NDSOOJDX.js} +1 -1
  62. package/dist/{chunk-2DT7STR5.js → chunk-OMP3KDDU.js} +1 -1
  63. package/dist/{chunk-PCT2MYG5.js → chunk-P232YODQ.js} +8 -8
  64. package/dist/{chunk-7GH3D6YG.js → chunk-PEV6ULSM.js} +3 -3
  65. package/dist/{chunk-CG4ZUQ5O.js → chunk-PHXU4NOP.js} +2 -2
  66. package/dist/{chunk-LAXU5U75.js → chunk-QDYJQLXT.js} +2 -2
  67. package/dist/{chunk-C3WH44MH.js → chunk-QOCWB4Q6.js} +3 -3
  68. package/dist/{chunk-OGSRCIOD.js → chunk-R5CU7ED6.js} +1 -1
  69. package/dist/{chunk-W6XVHP4U.js → chunk-REIZ5GXG.js} +4 -4
  70. package/dist/{chunk-DRAATYTY.js → chunk-RERJ2ZDV.js} +6 -6
  71. package/dist/{chunk-PX54KULQ.js → chunk-SGZE2JBF.js} +3 -3
  72. package/dist/{chunk-YKLCWWEI.js → chunk-SGZJ5LYH.js} +1 -1
  73. package/dist/{chunk-4LL6LG5X.js → chunk-T7E75EKA.js} +4 -3
  74. package/dist/{chunk-VIQ7CCWW.js → chunk-TGG4FWWB.js} +2 -2
  75. package/dist/{chunk-RN6ZWIAC.js → chunk-TW7KA27C.js} +1 -1
  76. package/dist/{chunk-5AATCXJN.js → chunk-WOBHHXW5.js} +4 -4
  77. package/dist/{chunk-KEVJ2WW6.js → chunk-XOUQUZ43.js} +2 -2
  78. package/dist/{chunk-UWP66NDF.js → chunk-XP2KRTZD.js} +1 -1
  79. package/dist/{chunk-LWKVEMVK.js → chunk-XVE52YFZ.js} +1 -1
  80. package/dist/{chunk-KHTBSSY5.js → chunk-YXWM4TNX.js} +1 -1
  81. package/dist/{reapply-47AMVIXN.js → reapply-ADFRVH5N.js} +9 -9
  82. package/dist/src/index.d.ts +2 -2
  83. package/dist/src/index.js +13 -13
  84. package/package.json +1 -1
  85. /package/dist/{chunk-KBITFQST.js → chunk-P32LPT2L.js} +0 -0
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  NOTIFICATION_MATCHED_TYPES,
3
3
  POSTTOOLUSE_MIRRORED_TOOLS
4
- } from "./chunk-UWP66NDF.js";
4
+ } from "./chunk-XP2KRTZD.js";
5
5
  import {
6
6
  isProtectedByScope,
7
7
  registerHookEntry
8
- } from "./chunk-PX53RT6Q.js";
8
+ } from "./chunk-34NNTYK6.js";
9
9
  import {
10
10
  CLAUDE_PRETOOLUSE_MATCHER,
11
11
  HOOK_BUDGETS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-7DQVIIHX.js";
13
+ } from "./chunk-5UWDYOZX.js";
14
14
 
15
15
  // src/gemini-config.ts
16
16
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_LOCATOR_BINARY
3
- } from "./chunk-7DQVIIHX.js";
3
+ } from "./chunk-5UWDYOZX.js";
4
4
 
5
5
  // src/diagnostics/bridge.ts
6
6
  import { execFileSync } from "child_process";
@@ -3,36 +3,40 @@ import {
3
3
  addPusharyToolPermissions,
4
4
  isPusharyHook,
5
5
  removeClaudeMcpServers
6
- } from "./chunk-PX54KULQ.js";
6
+ } from "./chunk-SGZE2JBF.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  addGeminiMcpServer,
10
10
  removeGeminiMcpServer
11
- } from "./chunk-ERP7FOFQ.js";
11
+ } from "./chunk-KHGIM2BN.js";
12
12
  import {
13
13
  CLAUDE_CODE_AGENT,
14
14
  parseApplyPatchFiles
15
- } from "./chunk-5AATCXJN.js";
15
+ } from "./chunk-WOBHHXW5.js";
16
16
  import {
17
17
  guardBinary,
18
18
  holdBudgetOf,
19
19
  registerHookEntry
20
- } from "./chunk-PX53RT6Q.js";
20
+ } from "./chunk-34NNTYK6.js";
21
21
  import {
22
22
  PHONE_ANSWERED_TOOLS,
23
23
  hookCompatibleProfile,
24
+ hookCompatibleProfileBySource,
24
25
  toToolLookup,
25
26
  withHookHoldBudget
26
- } from "./chunk-7DQVIIHX.js";
27
+ } from "./chunk-5UWDYOZX.js";
27
28
 
28
29
  // src/compatible-config.ts
29
30
  import { homedir } from "os";
30
31
  import { isAbsolute, join, resolve } from "path";
31
32
  var AGENT_FLAG = "--agent";
33
+ var SOURCE_FLAG = "--source";
32
34
  var agentArgument = (profile) => `${AGENT_FLAG}=${profile.agentType}`;
33
35
  var profileFromArgv = (argv) => {
34
36
  const named = namedAgent(argv);
35
- return named ? hookCompatibleProfile(named) : void 0;
37
+ if (named !== void 0) return hookCompatibleProfile(named);
38
+ const source = namedSource(argv);
39
+ return source === void 0 ? void 0 : hookCompatibleProfileBySource(source);
36
40
  };
37
41
  var activeIdentity = (argv) => {
38
42
  const profile = profileFromArgv(argv);
@@ -42,10 +46,18 @@ var namedAgent = (argv) => {
42
46
  const prefix = `${AGENT_FLAG}=`;
43
47
  return argv.find((argument) => argument.startsWith(prefix))?.slice(prefix.length);
44
48
  };
49
+ var namedSource = (argv) => {
50
+ const inline = argv.find((argument) => argument.startsWith(`${SOURCE_FLAG}=`));
51
+ if (inline) return inline.slice(SOURCE_FLAG.length + 1);
52
+ const index = argv.indexOf(SOURCE_FLAG);
53
+ return index === -1 ? void 0 : argv[index + 1];
54
+ };
45
55
  var activeHookSource = (argv) => {
46
56
  const named = namedAgent(argv);
47
- if (named === void 0) return "claude";
48
- return hookCompatibleProfile(named)?.source ?? null;
57
+ if (named !== void 0) return hookCompatibleProfile(named)?.source ?? null;
58
+ const source = namedSource(argv);
59
+ if (source === void 0) return "claude";
60
+ return hookCompatibleProfileBySource(source)?.source ?? "claude";
49
61
  };
50
62
  var PATCH_INPUT_KEYS = ["command", "patch", "input"];
51
63
  var patchedFiles = (toolInput) => [...new Set(PATCH_INPUT_KEYS.flatMap((key) => parseApplyPatchFiles(toolInput[key])))];
@@ -62,10 +74,6 @@ var normalizeToolCall = (profile, input) => {
62
74
  const lookup = lookupFor(profile, input);
63
75
  return { ...input, tool_name: lookup.tool, tool_input: lookup.input };
64
76
  };
65
- var unreadableTool = (profile, input) => {
66
- if (!profile || !input.tool_name) return void 0;
67
- return lookupFor(profile, input).unreadable ? input.tool_name : void 0;
68
- };
69
77
  var underHome = (segments, home = homedir()) => join(home, ...segments);
70
78
  var compatibleConfigFile = (profile, home) => underHome(profile.configFile, home);
71
79
  var compatibleMcpFile = (profile, home) => profile.mcp ? underHome(profile.mcp.file, home) : null;
@@ -215,7 +223,6 @@ export {
215
223
  activeIdentity,
216
224
  activeHookSource,
217
225
  normalizeToolCall,
218
- unreadableTool,
219
226
  compatibleConfigFile,
220
227
  compatibleMcpFile,
221
228
  compatibleInstructionsFile,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeKeyCheck,
3
3
  keyCheckFromResponse
4
- } from "./chunk-RN6ZWIAC.js";
4
+ } from "./chunk-TW7KA27C.js";
5
5
  import {
6
6
  createIo
7
7
  } from "./chunk-5RUIFDTP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-7DQVIIHX.js";
3
+ } from "./chunk-5UWDYOZX.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -3,19 +3,19 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-YKLCWWEI.js";
6
+ } from "./chunk-SGZJ5LYH.js";
7
7
  import {
8
8
  hookOwnerOf
9
- } from "./chunk-W6XVHP4U.js";
9
+ } from "./chunk-REIZ5GXG.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-CVCSUAXI.js";
12
+ } from "./chunk-6HH4IH4K.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-6QCN5XQE.js";
18
+ } from "./chunk-CDSL3LLO.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
@@ -23,17 +23,17 @@ import {
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-KHTBSSY5.js";
26
+ } from "./chunk-YXWM4TNX.js";
27
27
  import {
28
28
  codexHome,
29
29
  pusharyDir
30
- } from "./chunk-PX53RT6Q.js";
30
+ } from "./chunk-34NNTYK6.js";
31
31
  import {
32
32
  readTranscriptPreference
33
- } from "./chunk-7TDQ7KDY.js";
33
+ } from "./chunk-5SALHATY.js";
34
34
  import {
35
35
  writeJsonAtomic
36
- } from "./chunk-4LL6LG5X.js";
36
+ } from "./chunk-T7E75EKA.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-LWKVEMVK.js";
3
+ } from "./chunk-XVE52YFZ.js";
4
4
  import {
5
5
  codexHomeFrom
6
- } from "./chunk-PX53RT6Q.js";
6
+ } from "./chunk-34NNTYK6.js";
7
7
  import {
8
8
  HOOK_COMPATIBLE_PROFILES
9
- } from "./chunk-7DQVIIHX.js";
9
+ } from "./chunk-5UWDYOZX.js";
10
10
 
11
11
  // src/vscode-config.ts
12
12
  import { homedir } from "os";
@@ -2,10 +2,10 @@ import {
2
2
  resolveBinary,
3
3
  resolveGlobalPackageVersion,
4
4
  resolvePackageVersionFromBinary
5
- } from "./chunk-PX53RT6Q.js";
5
+ } from "./chunk-34NNTYK6.js";
6
6
  import {
7
7
  MANAGED_PROVIDERS
8
- } from "./chunk-7DQVIIHX.js";
8
+ } from "./chunk-5UWDYOZX.js";
9
9
 
10
10
  // src/live-capabilities.ts
11
11
  var CLAUDE_BRIDGE_CAPABILITY = "claude-bridge";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-WC5PYFDK.js";
3
+ } from "./chunk-FGNABUPN.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-GMXKITVA.js";
@@ -14,7 +14,7 @@ import {
14
14
  CLAUDE_CONNECTOR_URL,
15
15
  COWORK_CONNECTOR_LIMIT,
16
16
  COWORK_STANDING_INSTRUCTIONS
17
- } from "./chunk-7DQVIIHX.js";
17
+ } from "./chunk-5UWDYOZX.js";
18
18
 
19
19
  // src/cli/cowork.ts
20
20
  import { readFileSync } from "fs";
@@ -2,17 +2,17 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-ERP7FOFQ.js";
5
+ } from "./chunk-KHGIM2BN.js";
6
6
  import {
7
7
  CODEX_HOOK_EVENTS,
8
8
  hasCodexHooks,
9
9
  holdBudgetOf
10
- } from "./chunk-PX53RT6Q.js";
10
+ } from "./chunk-34NNTYK6.js";
11
11
  import {
12
12
  CURSOR_GATE_EVENTS,
13
13
  HOOK_LOCATOR_BINARY,
14
14
  hookCommandHoldBudget
15
- } from "./chunk-7DQVIIHX.js";
15
+ } from "./chunk-5UWDYOZX.js";
16
16
 
17
17
  // src/diagnostics/wiring.ts
18
18
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -3,7 +3,7 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-6QCN5XQE.js";
6
+ } from "./chunk-CDSL3LLO.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-WC5PYFDK.js";
3
+ } from "./chunk-FGNABUPN.js";
4
4
  import {
5
5
  isBridgeLocator
6
- } from "./chunk-U42ES5U3.js";
6
+ } from "./chunk-KLZJEMSE.js";
7
7
  import {
8
8
  pusharyHookExecutable
9
- } from "./chunk-C3WH44MH.js";
9
+ } from "./chunk-QOCWB4Q6.js";
10
10
  import {
11
11
  BELL_HOOK_BINARY
12
- } from "./chunk-VDOKRCWM.js";
12
+ } from "./chunk-EAGMQMRM.js";
13
13
 
14
14
  // src/setup/hook-ownership.ts
15
15
  var commandsIn = (value) => {
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  detectClaudeVersion
3
- } from "./chunk-JQJB7BZE.js";
3
+ } from "./chunk-AFKOWCMQ.js";
4
4
  import {
5
5
  addClaudeMcpServer,
6
6
  addPusharyHooks,
7
7
  addPusharyToolPermissions
8
- } from "./chunk-PX54KULQ.js";
8
+ } from "./chunk-SGZE2JBF.js";
9
9
  import {
10
10
  claudeUnprovenHolds,
11
11
  claudeWired,
12
12
  codexUnprovenHolds,
13
13
  codexWired,
14
14
  geminiWired
15
- } from "./chunk-C3WH44MH.js";
15
+ } from "./chunk-QOCWB4Q6.js";
16
16
  import {
17
17
  CLAUDE_HOOK_BINARY,
18
18
  CLAUDE_HOOK_EVENTS,
@@ -24,7 +24,7 @@ import {
24
24
  needsReregistration,
25
25
  registrationSignatures,
26
26
  supportedClaudeEvents
27
- } from "./chunk-ERP7FOFQ.js";
27
+ } from "./chunk-KHGIM2BN.js";
28
28
  import {
29
29
  CODEX_HOOK_BINARY,
30
30
  addCodexHookTrust,
@@ -44,12 +44,12 @@ import {
44
44
  registrationHolderOf,
45
45
  resolveGlobalBinary,
46
46
  vscodePluginMcp
47
- } from "./chunk-PX53RT6Q.js";
47
+ } from "./chunk-34NNTYK6.js";
48
48
  import {
49
49
  readJsonSafe,
50
50
  writeFileAtomic,
51
51
  writeJsonAtomic
52
- } from "./chunk-4LL6LG5X.js";
52
+ } from "./chunk-T7E75EKA.js";
53
53
 
54
54
  // src/reapply.ts
55
55
  import { dirname, join } from "path";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  supportedClaudeEvents
4
- } from "./chunk-ERP7FOFQ.js";
4
+ } from "./chunk-KHGIM2BN.js";
5
5
  import {
6
6
  guardBinary,
7
7
  holdBudgetOf,
8
8
  isProtectedByScope,
9
9
  registerHookEntry
10
- } from "./chunk-PX53RT6Q.js";
10
+ } from "./chunk-34NNTYK6.js";
11
11
  import {
12
12
  HOOK_LOCATOR_BINARY,
13
13
  withHookHoldBudget
14
- } from "./chunk-7DQVIIHX.js";
14
+ } from "./chunk-5UWDYOZX.js";
15
15
 
16
16
  // src/claude-config.ts
17
17
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-4LL6LG5X.js";
3
+ } from "./chunk-T7E75EKA.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -1,5 +1,5 @@
1
1
  // src/cli/fsx.ts
2
- import { copyFileSync, existsSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
2
+ import { copyFileSync, lstatSync, realpathSync, existsSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
3
3
  import { dirname, join } from "path";
4
4
  var readJsonSafe = (filePath) => {
5
5
  let raw;
@@ -24,7 +24,8 @@ var backupFile = (filePath) => {
24
24
  return target;
25
25
  };
26
26
  var writeFileAtomic = (filePath, contents, mode, encoding = "utf-8") => {
27
- const dir = dirname(filePath);
27
+ const target = lstatSync(filePath, { throwIfNoEntry: false })?.isSymbolicLink() ? realpathSync(filePath) : filePath;
28
+ const dir = dirname(target);
28
29
  if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
29
30
  const temp = join(dir, `.${process.pid}-${stamp()}.pushary-tmp`);
30
31
  try {
@@ -35,7 +36,7 @@ var writeFileAtomic = (filePath, contents, mode, encoding = "utf-8") => {
35
36
  } finally {
36
37
  closeSync(handle);
37
38
  }
38
- renameSync(temp, filePath);
39
+ renameSync(temp, target);
39
40
  } catch (err) {
40
41
  try {
41
42
  if (existsSync(temp)) unlinkSync(temp);
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-EYRGBYZG.js";
16
16
  import {
17
17
  reportedInstallSource
18
- } from "./chunk-ZFQPSGPO.js";
18
+ } from "./chunk-5WLH2ENB.js";
19
19
  import {
20
20
  isAnswerSource
21
- } from "./chunk-7DQVIIHX.js";
21
+ } from "./chunk-5UWDYOZX.js";
22
22
 
23
23
  // src/reach.ts
24
24
  var reachVerdict = (channels) => {
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-7DQVIIHX.js";
16
+ } from "./chunk-5UWDYOZX.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NOTIFICATION_PUSH_TYPES,
3
3
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
4
- } from "./chunk-UWP66NDF.js";
4
+ } from "./chunk-XP2KRTZD.js";
5
5
  import {
6
6
  cancelQuestion,
7
7
  isPolicyConfig,
@@ -10,13 +10,13 @@ import {
10
10
  } from "./chunk-LGXUGYUH.js";
11
11
  import {
12
12
  getMachineId
13
- } from "./chunk-KZPUARCU.js";
13
+ } from "./chunk-465UENKO.js";
14
14
  import {
15
15
  withRetry
16
16
  } from "./chunk-EYRGBYZG.js";
17
17
  import {
18
18
  reportedInstallSource
19
- } from "./chunk-ZFQPSGPO.js";
19
+ } from "./chunk-5WLH2ENB.js";
20
20
  import {
21
21
  getApiKey,
22
22
  getBaseUrl
@@ -44,7 +44,7 @@ import {
44
44
  resolveAutoResolveOrigin,
45
45
  resolvePolicy,
46
46
  toToolLookup
47
- } from "./chunk-7DQVIIHX.js";
47
+ } from "./chunk-5UWDYOZX.js";
48
48
 
49
49
  // src/policy.ts
50
50
  import { createHash } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-PX53RT6Q.js";
3
+ } from "./chunk-34NNTYK6.js";
4
4
  import {
5
5
  readJsonSafe
6
- } from "./chunk-4LL6LG5X.js";
6
+ } from "./chunk-T7E75EKA.js";
7
7
 
8
8
  // src/process-ownership.ts
9
9
  import { createHash, randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-7DQVIIHX.js";
3
+ } from "./chunk-5UWDYOZX.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_BUDGETS,
3
3
  OPENCODE_APPROVAL_EVENT
4
- } from "./chunk-7DQVIIHX.js";
4
+ } from "./chunk-5UWDYOZX.js";
5
5
 
6
6
  // src/opencode-plugin.ts
7
7
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-7TDQ7KDY.js";
3
+ } from "./chunk-5SALHATY.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -8,15 +8,15 @@ import {
8
8
  reapplyGeminiSettings,
9
9
  reapplyVsCodePlugin,
10
10
  repairCodexHolds
11
- } from "./chunk-DRAATYTY.js";
12
- import "./chunk-JQJB7BZE.js";
13
- import "./chunk-PX54KULQ.js";
14
- import "./chunk-C3WH44MH.js";
15
- import "./chunk-ERP7FOFQ.js";
16
- import "./chunk-UWP66NDF.js";
17
- import "./chunk-PX53RT6Q.js";
18
- import "./chunk-4LL6LG5X.js";
19
- import "./chunk-7DQVIIHX.js";
11
+ } from "./chunk-RERJ2ZDV.js";
12
+ import "./chunk-AFKOWCMQ.js";
13
+ import "./chunk-SGZE2JBF.js";
14
+ import "./chunk-QOCWB4Q6.js";
15
+ import "./chunk-KHGIM2BN.js";
16
+ import "./chunk-XP2KRTZD.js";
17
+ import "./chunk-34NNTYK6.js";
18
+ import "./chunk-T7E75EKA.js";
19
+ import "./chunk-5UWDYOZX.js";
20
20
  export {
21
21
  inspectConfiguredManagedProviders,
22
22
  reapplyAllAgents,
@@ -1,6 +1,6 @@
1
+ import { CanonicalGateInputs, ReceiptMeta } from '@pushary/hook-mapping';
1
2
  import { ClaudePreToolUseOutput, PolicyConfig, ApprovalMode, ModeState, AutoResolveOrigin, AgentQuestion } from '@pushary/contracts';
2
3
  export { ApprovalMode, ModeState, PolicyConfig, ToolPolicy, resolvePolicy } from '@pushary/contracts';
3
- import { ReceiptMeta } from '@pushary/hook-mapping';
4
4
 
5
5
  interface ToolInput {
6
6
  tool_name: string;
@@ -12,7 +12,7 @@ interface ToolInput {
12
12
  permission_mode?: string;
13
13
  }
14
14
  type HookOutput = ClaudePreToolUseOutput;
15
- declare const handlePreToolUse: (input: ToolInput) => Promise<HookOutput | undefined>;
15
+ declare const handlePreToolUse: (input: ToolInput, canonical?: CanonicalGateInputs | null) => Promise<HookOutput | undefined>;
16
16
 
17
17
  declare const getPolicy: (apiKey: string, expectedVersion?: string | null, agent?: string, repoAware?: boolean, sessionId?: string) => Promise<PolicyConfig>;
18
18
 
package/dist/src/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  handlePreToolUse
3
- } from "../chunk-KODKICKJ.js";
4
- import "../chunk-YT6H7BB5.js";
5
- import "../chunk-PX54KULQ.js";
6
- import "../chunk-BXLFUTSD.js";
7
- import "../chunk-2DT7STR5.js";
3
+ } from "../chunk-I2OLM3DM.js";
4
+ import "../chunk-LWT34GSY.js";
5
+ import "../chunk-SGZE2JBF.js";
6
+ import "../chunk-HCTSTMDD.js";
7
+ import "../chunk-OMP3KDDU.js";
8
8
  import "../chunk-YHG74UFF.js";
9
- import "../chunk-ERP7FOFQ.js";
9
+ import "../chunk-KHGIM2BN.js";
10
10
  import {
11
11
  fetchAccountPublicKey
12
12
  } from "../chunk-EQRS3SGM.js";
@@ -18,28 +18,28 @@ import {
18
18
  handlePostToolUse,
19
19
  handleStop,
20
20
  reportEvent
21
- } from "../chunk-5AATCXJN.js";
22
- import "../chunk-UWP66NDF.js";
21
+ } from "../chunk-WOBHHXW5.js";
22
+ import "../chunk-XP2KRTZD.js";
23
23
  import {
24
24
  askUser,
25
25
  cancelQuestion,
26
26
  waitForAnswer
27
27
  } from "../chunk-LGXUGYUH.js";
28
- import "../chunk-KZPUARCU.js";
29
- import "../chunk-PX53RT6Q.js";
28
+ import "../chunk-465UENKO.js";
29
+ import "../chunk-34NNTYK6.js";
30
30
  import "../chunk-EYRGBYZG.js";
31
31
  import "../chunk-SAF6HGAA.js";
32
32
  import "../chunk-7QLSKOSU.js";
33
33
  import "../chunk-KZERVKTD.js";
34
- import "../chunk-ZFQPSGPO.js";
35
- import "../chunk-4LL6LG5X.js";
34
+ import "../chunk-5WLH2ENB.js";
35
+ import "../chunk-T7E75EKA.js";
36
36
  import {
37
37
  getApiKey,
38
38
  getBaseUrl
39
39
  } from "../chunk-2UMNXADU.js";
40
40
  import {
41
41
  resolvePolicy
42
- } from "../chunk-7DQVIIHX.js";
42
+ } from "../chunk-5UWDYOZX.js";
43
43
  export {
44
44
  askUser,
45
45
  cancelQuestion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/agent-hooks",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Permission hooks for AI coding agents: route tool approvals through Pushary push notifications",
5
5
  "keywords": [
6
6
  "pushary",
File without changes