@pushary/agent-hooks 1.9.14 → 1.9.15

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 (99) hide show
  1. package/CHANGELOG.md +14 -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 +28 -28
  6. package/dist/bin/pushary-codex-bridge.js +17 -17
  7. package/dist/bin/pushary-codex-hook.js +72 -48
  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 +31 -31
  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 +29 -29
  18. package/dist/bin/pushary-login.js +12 -12
  19. package/dist/bin/pushary-logout.js +10 -10
  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-Y6IKUCVF.js → chunk-2DCGUCPZ.js} +2 -2
  42. package/dist/{chunk-EB6LH3U6.js → chunk-3FQCZSEQ.js} +3 -3
  43. package/dist/{chunk-J5RQW52I.js → chunk-3QXCTYMG.js} +2 -2
  44. package/dist/{chunk-CT4BJEU7.js → chunk-3YCYTGGK.js} +1 -1
  45. package/dist/{chunk-VYXXAFIA.js → chunk-52JA2WTH.js} +1 -1
  46. package/dist/{chunk-LETLRKSY.js → chunk-57VUNV32.js} +1 -1
  47. package/dist/{chunk-3KHQWC4F.js → chunk-5BIMNGRQ.js} +6 -6
  48. package/dist/{chunk-NMDGIMDV.js → chunk-5EWNGYFD.js} +2 -2
  49. package/dist/{chunk-5UYAJVAQ.js → chunk-5LQ7QUVF.js} +1 -1
  50. package/dist/{chunk-ARM4DMIL.js → chunk-6GRUERVL.js} +1 -1
  51. package/dist/{chunk-2Q6IT5PR.js → chunk-6LORREOI.js} +1 -1
  52. package/dist/{chunk-2Z56BRTF.js → chunk-6MLSXBNR.js} +2 -2
  53. package/dist/{chunk-H7MTFFNI.js → chunk-6WECKO24.js} +4 -4
  54. package/dist/{chunk-XJKM6NQS.js → chunk-7QZZK2YU.js} +6 -6
  55. package/dist/{chunk-NXJNYAP7.js → chunk-7VOEZPJ4.js} +1 -1
  56. package/dist/{chunk-NAROM5IR.js → chunk-AYV2NRYJ.js} +93 -2
  57. package/dist/{chunk-NNCK2PUR.js → chunk-C2OUUGCW.js} +2 -2
  58. package/dist/{chunk-42WYKVHL.js → chunk-COZE23R3.js} +2 -2
  59. package/dist/{chunk-34PUBGLS.js → chunk-CU7Y7Y4L.js} +2 -2
  60. package/dist/{chunk-2QASSTM5.js → chunk-D72OJS4S.js} +2 -2
  61. package/dist/{chunk-SEQSZYLW.js → chunk-FZW7Q7GM.js} +5 -5
  62. package/dist/{chunk-Q7JWY33N.js → chunk-H5YC7H6V.js} +3 -3
  63. package/dist/{chunk-2WWHZTI5.js → chunk-HJL5RBOU.js} +4 -4
  64. package/dist/{chunk-7MGNY7S3.js → chunk-HSVJ62BE.js} +1 -1
  65. package/dist/{chunk-AJRT3JGE.js → chunk-HTO2XULO.js} +1 -1
  66. package/dist/{chunk-WYPQKDKX.js → chunk-IQCNOEQL.js} +13 -18
  67. package/dist/{chunk-ECU2Y7D2.js → chunk-JC3AGMOP.js} +2 -2
  68. package/dist/{chunk-LRZMGU7T.js → chunk-JEJSAI6Z.js} +4 -4
  69. package/dist/{chunk-YSVCBUT3.js → chunk-LJJWNHUW.js} +2 -2
  70. package/dist/{chunk-POJUUEGO.js → chunk-ME55HQOI.js} +4 -4
  71. package/dist/{chunk-ZVFKNSRX.js → chunk-NA5D62OI.js} +1 -1
  72. package/dist/{chunk-5RONPCMH.js → chunk-NDKFHLJI.js} +5 -5
  73. package/dist/{chunk-4BXVGCPE.js → chunk-NDZBDXU3.js} +4 -4
  74. package/dist/{chunk-OMR3P7PJ.js → chunk-OIESPH3R.js} +14 -14
  75. package/dist/{chunk-FKQMH2DW.js → chunk-PNUWMEIY.js} +1 -1
  76. package/dist/{chunk-3U4R475X.js → chunk-PSWFYNOX.js} +3 -3
  77. package/dist/{chunk-QD6GQDYW.js → chunk-Q4JD6WNB.js} +1 -1
  78. package/dist/{chunk-DVTXGXXL.js → chunk-QIOWXUFH.js} +1 -1
  79. package/dist/{chunk-MSEUUAJ7.js → chunk-SDDKVY4I.js} +5 -5
  80. package/dist/{chunk-CIZQARGJ.js → chunk-SYLJL63X.js} +3 -3
  81. package/dist/{chunk-7SIZISYH.js → chunk-TFV6RATK.js} +5 -5
  82. package/dist/{chunk-2A234H3F.js → chunk-TMQMUGSN.js} +3 -3
  83. package/dist/{chunk-ZSL7B7NF.js → chunk-VKTDXQGH.js} +2 -2
  84. package/dist/{chunk-RV4U3LYL.js → chunk-VP6WDFVO.js} +3 -3
  85. package/dist/{chunk-5VP72OOI.js → chunk-WBQK6KD5.js} +8 -8
  86. package/dist/{chunk-JHDHC2M7.js → chunk-WJO7SENK.js} +4 -4
  87. package/dist/{chunk-3XAUHY35.js → chunk-WWTB4DAE.js} +1 -1
  88. package/dist/{chunk-2NIBBM3N.js → chunk-Y6KG5JZP.js} +2 -2
  89. package/dist/{chunk-K2IUMMZJ.js → chunk-YKYFFCB5.js} +1 -1
  90. package/dist/{chunk-PWO6T7JG.js → chunk-YL6HU2KF.js} +5 -5
  91. package/dist/{chunk-RMWV3MYN.js → chunk-YOHPJNFW.js} +4 -4
  92. package/dist/{chunk-APG7IAUK.js → chunk-ZH74RRGM.js} +1 -1
  93. package/dist/{chunk-ZECHTK3K.js → chunk-ZMUDVPOT.js} +3 -3
  94. package/dist/{global-upgrade-P5CJ22AW.js → global-upgrade-MOBLBPIJ.js} +6 -6
  95. package/dist/{paths-XZE2MPTP.js → paths-55SPLYW5.js} +2 -2
  96. package/dist/{reapply-V4GMKCGP.js → reapply-SOIJJKGO.js} +20 -20
  97. package/dist/src/index.js +19 -19
  98. package/dist/{upgrade-lock-DQF62B6X.js → upgrade-lock-FER4DMDA.js} +3 -3
  99. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-YSVCBUT3.js";
3
+ } from "./chunk-LJJWNHUW.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-FKQMH2DW.js";
6
+ } from "./chunk-PNUWMEIY.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-CIZQARGJ.js";
3
+ } from "./chunk-SYLJL63X.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-FKQMH2DW.js";
6
+ } from "./chunk-PNUWMEIY.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -2,23 +2,23 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-RV4U3LYL.js";
5
+ } from "./chunk-VP6WDFVO.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-K2IUMMZJ.js";
8
+ } from "./chunk-YKYFFCB5.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-NXJNYAP7.js";
11
+ } from "./chunk-7VOEZPJ4.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  hasCodexHooks,
15
15
  holdBudgetOf
16
- } from "./chunk-2WWHZTI5.js";
16
+ } from "./chunk-HJL5RBOU.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-NAROM5IR.js";
21
+ } from "./chunk-AYV2NRYJ.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-POJUUEGO.js";
4
+ } from "./chunk-ME55HQOI.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-SEQSZYLW.js";
7
+ } from "./chunk-FZW7Q7GM.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-2WWHZTI5.js";
11
+ } from "./chunk-HJL5RBOU.js";
12
12
 
13
13
  // src/cursor-config.ts
14
14
  var hookCommandOf = (entry) => {
@@ -13,7 +13,7 @@ import {
13
13
  isReleaseVersion,
14
14
  ownPackageName,
15
15
  withHookHoldBudget
16
- } from "./chunk-NAROM5IR.js";
16
+ } from "./chunk-AYV2NRYJ.js";
17
17
 
18
18
  // src/setup/paths.ts
19
19
  import { homedir as homedir2 } from "os";
@@ -365,9 +365,9 @@ var installGlobally = (options) => {
365
365
  }
366
366
  const started = (async () => {
367
367
  if (!npmIsOnPath()) throw new NpmMissingError();
368
- const { withUpgradeLock } = await import("./global-upgrade-P5CJ22AW.js");
369
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-DQF62B6X.js");
370
- const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-XZE2MPTP.js");
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");
371
371
  let result = "skipped";
372
372
  const install = async () => {
373
373
  const platform = process.platform;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-NMDGIMDV.js";
3
+ } from "./chunk-5EWNGYFD.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-FKQMH2DW.js";
3
+ } from "./chunk-PNUWMEIY.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-VYXXAFIA.js";
5
+ } from "./chunk-52JA2WTH.js";
6
6
  import {
7
7
  cancelQuestion,
8
8
  clientErrorKindOf,
@@ -10,26 +10,26 @@ import {
10
10
  reportClientError,
11
11
  sendNotification,
12
12
  waitForAnswer
13
- } from "./chunk-PWO6T7JG.js";
13
+ } from "./chunk-YL6HU2KF.js";
14
14
  import {
15
15
  withRetry
16
- } from "./chunk-CIZQARGJ.js";
16
+ } from "./chunk-SYLJL63X.js";
17
17
  import {
18
18
  getMachineId
19
- } from "./chunk-ZVFKNSRX.js";
19
+ } from "./chunk-NA5D62OI.js";
20
20
  import {
21
21
  reportedInstallSource
22
- } from "./chunk-ZSL7B7NF.js";
22
+ } from "./chunk-VKTDXQGH.js";
23
23
  import {
24
24
  canonicalJson
25
- } from "./chunk-2WWHZTI5.js";
25
+ } from "./chunk-HJL5RBOU.js";
26
26
  import {
27
27
  writeFileAtomic
28
28
  } from "./chunk-T7E75EKA.js";
29
29
  import {
30
30
  getApiKey,
31
31
  getBaseUrl
32
- } from "./chunk-AJRT3JGE.js";
32
+ } from "./chunk-HTO2XULO.js";
33
33
  import {
34
34
  ACTION_BODY_MAX,
35
35
  AGENT_LABELS_BY_TYPE,
@@ -50,6 +50,7 @@ import {
50
50
  localRepoKey,
51
51
  modeStateFromResponse,
52
52
  normalizeRepoRemote,
53
+ parseMcpToolName,
53
54
  pendingCommandEvents,
54
55
  redactSecrets,
55
56
  redactSecretsDeep,
@@ -58,7 +59,7 @@ import {
58
59
  resolvePolicy,
59
60
  toToolLookup,
60
61
  truncateLine
61
- } from "./chunk-NAROM5IR.js";
62
+ } from "./chunk-AYV2NRYJ.js";
62
63
 
63
64
  // ../hook-mapping/src/describe.ts
64
65
  import { isAbsolute, relative, resolve } from "path";
@@ -105,14 +106,6 @@ var eventPrefixes = {
105
106
  Task: (input) => `ran subagent: ${describeTaskCall(input)}`,
106
107
  WebSearch: (input) => `searched: ${firstString(input.query) ?? "the web"}`
107
108
  };
108
- var MCP_TOOL_PREFIX = "mcp__";
109
- var parseMcpToolName = (toolName) => {
110
- if (!toolName.startsWith(MCP_TOOL_PREFIX)) return void 0;
111
- const rest = toolName.slice(MCP_TOOL_PREFIX.length);
112
- const split = rest.indexOf("__");
113
- if (split <= 0 || split + 2 >= rest.length) return void 0;
114
- return { server: rest.slice(0, split), tool: rest.slice(split + 2) };
115
- };
116
109
  var NETWORK_TARGET_KEYS = ["url", "urls", "href", "host", "hosts", "hostname", "domain", "domains"];
117
110
  var ABSOLUTE_HTTP_URL = /^https?:\/\//i;
118
111
  var HOSTNAME = /^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?::\d{1,5})?$/i;
@@ -199,12 +192,12 @@ var parseApplyPatchOps = (command) => {
199
192
  if (typeof command !== "string") return [];
200
193
  const ops = [];
201
194
  for (const line of command.split("\n")) {
202
- const file = line.match(/^\*\*\*\s+(Add|Update|Delete) File:\s+(.+?)\s*$/);
195
+ const file = line.match(/^\s*\*\*\*\s+(Add|Update|Delete) File:\s+(.+?)\s*$/);
203
196
  if (file) {
204
197
  ops.push({ op: file[1].toLowerCase(), path: file[2] });
205
198
  continue;
206
199
  }
207
- const move = line.match(/^\*\*\*\s+Move to:\s+(.+?)\s*$/);
200
+ const move = line.match(/^\s*\*\*\*\s+Move to:\s+(.+?)\s*$/);
208
201
  if (move) ops.push({ op: "move", path: move[1] });
209
202
  }
210
203
  return ops;
@@ -1365,6 +1358,7 @@ var toCodexWire = (event, decision) => {
1365
1358
  decision.kind === "deny" ? decision.reason : void 0
1366
1359
  ) ?? null;
1367
1360
  };
1361
+ var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
1368
1362
  var describeApplyPatch = (command) => {
1369
1363
  const ops = parseApplyPatchOps(command);
1370
1364
  if (ops.length === 0) return null;
@@ -2285,6 +2279,7 @@ export {
2285
2279
  codexDeny,
2286
2280
  codexPass,
2287
2281
  toCodexWire,
2282
+ patchDeletesFiles,
2288
2283
  describeApplyPatch,
2289
2284
  toPolicyLookup,
2290
2285
  toPolicyLookups,
@@ -10,10 +10,10 @@ import {
10
10
  resolvePackageVersionFromBinary,
11
11
  resolvePathBinary,
12
12
  resolvePathBinaryAsync
13
- } from "./chunk-2WWHZTI5.js";
13
+ } from "./chunk-HJL5RBOU.js";
14
14
  import {
15
15
  MANAGED_PROVIDERS
16
- } from "./chunk-NAROM5IR.js";
16
+ } from "./chunk-AYV2NRYJ.js";
17
17
 
18
18
  // src/setup/codex-install.ts
19
19
  var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-5VP72OOI.js";
3
+ } from "./chunk-WBQK6KD5.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-POJUUEGO.js";
6
+ } from "./chunk-ME55HQOI.js";
7
7
  import {
8
8
  writeDegraded
9
- } from "./chunk-PWO6T7JG.js";
9
+ } from "./chunk-YL6HU2KF.js";
10
10
  import {
11
11
  claudeShapedHookInput,
12
12
  hookCompatibleProfileBySource
13
- } from "./chunk-NAROM5IR.js";
13
+ } from "./chunk-AYV2NRYJ.js";
14
14
 
15
15
  // src/tool-hook-input.ts
16
16
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
@@ -8,10 +8,10 @@ import {
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand,
10
10
  resolvePathBinary
11
- } from "./chunk-2WWHZTI5.js";
11
+ } from "./chunk-HJL5RBOU.js";
12
12
  import {
13
13
  getPackageVersion
14
- } from "./chunk-NAROM5IR.js";
14
+ } from "./chunk-AYV2NRYJ.js";
15
15
 
16
16
  // src/codex-app-server.ts
17
17
  import { existsSync, realpathSync } from "fs";
@@ -3,18 +3,18 @@ import {
3
3
  addGeminiMcpServer,
4
4
  removeGeminiMcpServer,
5
5
  supportedClaudeEvents
6
- } from "./chunk-RV4U3LYL.js";
6
+ } from "./chunk-VP6WDFVO.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  parseApplyPatchFiles
10
- } from "./chunk-WYPQKDKX.js";
10
+ } from "./chunk-IQCNOEQL.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-2WWHZTI5.js";
17
+ } from "./chunk-HJL5RBOU.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-NAROM5IR.js";
27
+ } from "./chunk-AYV2NRYJ.js";
28
28
 
29
29
  // src/claude-config.ts
30
30
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-2WWHZTI5.js";
3
+ } from "./chunk-HJL5RBOU.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-T7E75EKA.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-POJUUEGO.js";
3
+ } from "./chunk-ME55HQOI.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-SEQSZYLW.js";
9
+ } from "./chunk-FZW7Q7GM.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-K2IUMMZJ.js";
12
+ } from "./chunk-YKYFFCB5.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-2WWHZTI5.js";
21
+ } from "./chunk-HJL5RBOU.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-NAROM5IR.js";
31
+ } from "./chunk-AYV2NRYJ.js";
32
32
 
33
33
  // src/opencode-plugin.ts
34
34
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  MCP_BRIDGE_BINARY
3
- } from "./chunk-2QASSTM5.js";
3
+ } from "./chunk-D72OJS4S.js";
4
4
  import {
5
5
  KEY_FILE_MODE
6
- } from "./chunk-NMDGIMDV.js";
6
+ } from "./chunk-5EWNGYFD.js";
7
7
  import {
8
8
  NpmMissingError
9
- } from "./chunk-2WWHZTI5.js";
9
+ } from "./chunk-HJL5RBOU.js";
10
10
  import {
11
11
  readJsonSafe,
12
12
  writeFileAtomic,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-T7E75EKA.js";
15
15
  import {
16
16
  NPX_LATEST_COMMAND
17
- } from "./chunk-FKQMH2DW.js";
17
+ } from "./chunk-PNUWMEIY.js";
18
18
 
19
19
  // src/instruction-file.ts
20
20
  import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  defersToNativeMode,
3
3
  reportMachineDenial
4
- } from "./chunk-42WYKVHL.js";
4
+ } from "./chunk-COZE23R3.js";
5
5
  import {
6
6
  isGatingMoment,
7
7
  recordKeylessMoment
8
- } from "./chunk-3XAUHY35.js";
8
+ } from "./chunk-WWTB4DAE.js";
9
9
  import {
10
10
  announceSubscriptionRequired,
11
11
  denyReasonFrom,
12
12
  isDeferAnswer,
13
13
  oncePerSession
14
- } from "./chunk-ARM4DMIL.js";
14
+ } from "./chunk-6GRUERVL.js";
15
15
  import {
16
16
  activeHookSource,
17
17
  activeIdentity
18
- } from "./chunk-POJUUEGO.js";
18
+ } from "./chunk-ME55HQOI.js";
19
19
  import {
20
20
  DEFAULT_SESSION,
21
21
  UNNAMED_ACTION,
@@ -40,7 +40,7 @@ import {
40
40
  reportEvent,
41
41
  scopePathFor,
42
42
  settleQuestionsForToolUse
43
- } from "./chunk-WYPQKDKX.js";
43
+ } from "./chunk-IQCNOEQL.js";
44
44
  import {
45
45
  askUser,
46
46
  cancelQuestion,
@@ -51,26 +51,27 @@ import {
51
51
  requestGate,
52
52
  sendNotification,
53
53
  waitForQuestion
54
- } from "./chunk-PWO6T7JG.js";
54
+ } from "./chunk-YL6HU2KF.js";
55
55
  import {
56
56
  SubscriptionRequiredError
57
- } from "./chunk-CIZQARGJ.js";
57
+ } from "./chunk-SYLJL63X.js";
58
58
  import {
59
59
  getMachineId
60
- } from "./chunk-ZVFKNSRX.js";
60
+ } from "./chunk-NA5D62OI.js";
61
61
  import {
62
62
  getApiKey,
63
63
  getBaseUrl
64
- } from "./chunk-AJRT3JGE.js";
64
+ } from "./chunk-HTO2XULO.js";
65
65
  import {
66
66
  NPX_LATEST_COMMAND
67
- } from "./chunk-FKQMH2DW.js";
67
+ } from "./chunk-PNUWMEIY.js";
68
68
  import {
69
69
  AGENT_QUESTION_STRATEGY,
70
70
  DECISION_STOP_REASON,
71
71
  GATE_BLOCK_REASON_MAX_LENGTH,
72
72
  GATE_WIRE,
73
73
  PLAN_DECLINED_REASON,
74
+ SCOPE_BATCH_REASON,
74
75
  SOLE_GATE_SIGNED_OUT_REASON,
75
76
  SOLE_GATE_UNDECIDED_REASON,
76
77
  UNVERIFIABLE_APPROVAL_REASON,
@@ -102,7 +103,7 @@ import {
102
103
  parseAgentQuestions,
103
104
  questionHandedToTheTerminal,
104
105
  resolveGate
105
- } from "./chunk-NAROM5IR.js";
106
+ } from "./chunk-AYV2NRYJ.js";
106
107
 
107
108
  // src/claude-permission-rules.ts
108
109
  import { readFileSync, statSync } from "fs";
@@ -545,7 +546,6 @@ var claudeGateInput = (modeState, config, input, canonical) => {
545
546
  };
546
547
  };
547
548
  var unreadableReason = "Pushary could not read every target of this call. Use a supported command or a single-file edit.";
548
- var batchScopeReason = "This patch exceeds the agreed scope. Split it into single-file edits so each additional path can be approved.";
549
549
  var BLOCKED_ACTION_GATE_TIMEOUT_MS = 15e3;
550
550
  var BLOCKED_ACTION_CLAIM_TIMEOUT_MS = 4e3;
551
551
  var BLOCKED_ACTION_ALLOW_REASON = "Approved from Pushary after auto mode blocked it";
@@ -616,7 +616,7 @@ var handlePreToolUse = async (input, canonical) => {
616
616
  return deny(verdict.reason);
617
617
  }
618
618
  if (canonical === null) return deny(unreadableReason);
619
- if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(batchScopeReason);
619
+ if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(SCOPE_BATCH_REASON);
620
620
  if (agentQuestionStrategy(ACTIVE_SOURCE, "PreToolUse", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
621
621
  if (input.tool_name === "AskUserQuestion") {
622
622
  return handleAskUserQuestion(apiKey, input, modeState);
@@ -683,7 +683,7 @@ var handlePermissionRequest = async (input, canonical) => {
683
683
  }
684
684
  if (canonical === null) return permReqDeny(unreadableReason);
685
685
  if (agentQuestionStrategy(ACTIVE_SOURCE, "PermissionRequest", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
686
- if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return permReqDeny(batchScopeReason);
686
+ if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return permReqDeny(SCOPE_BATCH_REASON);
687
687
  if (!(verdict.kind === "gate" && verdict.scopeReason) && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode)) return void 0;
688
688
  switch (verdict.kind) {
689
689
  case "allow":
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-NAROM5IR.js";
5
+ } from "./chunk-AYV2NRYJ.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-EB6LH3U6.js";
3
+ } from "./chunk-3FQCZSEQ.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-AJRT3JGE.js";
12
+ } from "./chunk-HTO2XULO.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-NAROM5IR.js";
16
+ } from "./chunk-AYV2NRYJ.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,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-NMDGIMDV.js";
3
+ } from "./chunk-5EWNGYFD.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-NAROM5IR.js";
3
+ } from "./chunk-AYV2NRYJ.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-LETLRKSY.js";
7
+ } from "./chunk-57VUNV32.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-2Z56BRTF.js";
17
+ } from "./chunk-6MLSXBNR.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-2WWHZTI5.js";
30
+ } from "./chunk-HJL5RBOU.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-FKQMH2DW.js";
33
+ } from "./chunk-PNUWMEIY.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-NAROM5IR.js";
42
+ } from "./chunk-AYV2NRYJ.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-3U4R475X.js";
3
+ } from "./chunk-PSWFYNOX.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-EB6LH3U6.js";
6
+ } from "./chunk-3FQCZSEQ.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-AJRT3JGE.js";
9
+ } from "./chunk-HTO2XULO.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-NMDGIMDV.js";
7
+ } from "./chunk-5EWNGYFD.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-ZVFKNSRX.js";
10
+ } from "./chunk-NA5D62OI.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-2WWHZTI5.js";
14
+ } from "./chunk-HJL5RBOU.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
@@ -20,14 +20,14 @@ import {
20
20
  } from "./chunk-T7E75EKA.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-AJRT3JGE.js";
23
+ } from "./chunk-HTO2XULO.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
27
27
  getPackageVersion,
28
28
  globalPackageFolder,
29
29
  globalRootFor
30
- } from "./chunk-NAROM5IR.js";
30
+ } from "./chunk-AYV2NRYJ.js";
31
31
 
32
32
  // src/daemon-lifecycle.ts
33
33
  import { dirname, join, win32 as win32Path } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-K2IUMMZJ.js";
3
+ } from "./chunk-YKYFFCB5.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-FKQMH2DW.js";
12
+ } from "./chunk-PNUWMEIY.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-NAROM5IR.js";
20
+ } from "./chunk-AYV2NRYJ.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-AJRT3JGE.js";
3
+ } from "./chunk-HTO2XULO.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-NAROM5IR.js";
6
+ } from "./chunk-AYV2NRYJ.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";