@pushary/agent-hooks 1.9.20 → 1.9.22

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 (103) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/bin/pushary-bell-hook.js +27 -27
  3. package/dist/bin/pushary-bell.js +14 -12
  4. package/dist/bin/pushary-claude.js +26 -26
  5. package/dist/bin/pushary-clean.js +36 -33
  6. package/dist/bin/pushary-codex-bridge.js +18 -18
  7. package/dist/bin/pushary-codex-hook.js +37 -37
  8. package/dist/bin/pushary-codex.js +13 -13
  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 +33 -33
  12. package/dist/bin/pushary-disconnect.js +25 -25
  13. package/dist/bin/pushary-doctor.js +34 -34
  14. package/dist/bin/pushary-elicitation-hook.js +27 -27
  15. package/dist/bin/pushary-gemini-bridge.js +14 -14
  16. package/dist/bin/pushary-gemini-hook.js +30 -30
  17. package/dist/bin/pushary-hook.js +31 -31
  18. package/dist/bin/pushary-login.js +13 -13
  19. package/dist/bin/pushary-logout.js +36 -20
  20. package/dist/bin/pushary-mcp.js +10 -10
  21. package/dist/bin/pushary-mode.js +13 -13
  22. package/dist/bin/pushary-notification-hook.js +26 -26
  23. package/dist/bin/pushary-opencode-hook.js +29 -29
  24. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  25. package/dist/bin/pushary-permission-hook.js +30 -30
  26. package/dist/bin/pushary-post-hook.js +26 -26
  27. package/dist/bin/pushary-prompt-hook.js +26 -26
  28. package/dist/bin/pushary-session-end-hook.js +26 -26
  29. package/dist/bin/pushary-session-start-hook.js +30 -30
  30. package/dist/bin/pushary-setup.js +53 -48
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +34 -29
  33. package/dist/bin/pushary-stop-hook.js +26 -26
  34. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  35. package/dist/bin/pushary-suggestions.js +13 -13
  36. package/dist/bin/pushary-transcript-register.js +19 -19
  37. package/dist/bin/pushary-transcripts.js +9 -9
  38. package/dist/bin/pushary-upgrade.js +31 -31
  39. package/dist/bin/pushary-wait.js +13 -13
  40. package/dist/bin/pushary.js +7 -7
  41. package/dist/{chunk-LXYNKZFP.js → chunk-2MW4OHWI.js} +2 -2
  42. package/dist/{chunk-OLJ4GIRP.js → chunk-3BWW4UMT.js} +2 -2
  43. package/dist/{chunk-ZNFARGEY.js → chunk-4AO2OVUA.js} +6 -6
  44. package/dist/{chunk-P77EIWBJ.js → chunk-4PERN2SO.js} +2 -2
  45. package/dist/{chunk-5C2GFTWE.js → chunk-5AZ546F6.js} +1 -1
  46. package/dist/{chunk-MID7BURF.js → chunk-5TLRS3AK.js} +2 -2
  47. package/dist/{chunk-4ABHSCFJ.js → chunk-6IOLTFNP.js} +29 -26
  48. package/dist/{chunk-HILWD7WM.js → chunk-6SFTI7LM.js} +3 -3
  49. package/dist/{chunk-DF2FSJ7B.js → chunk-6TSEEKPL.js} +4 -4
  50. package/dist/{chunk-XQ4HTTBB.js → chunk-75MJRC5I.js} +1 -1
  51. package/dist/{chunk-MGW26CW7.js → chunk-76YNWUXC.js} +1 -1
  52. package/dist/{chunk-K5PUP76V.js → chunk-AGIO7SF5.js} +9 -6
  53. package/dist/{chunk-FT7UNIS3.js → chunk-AQFEP65J.js} +2 -1
  54. package/dist/{chunk-DBEJIFJD.js → chunk-AR4NXO4Q.js} +2 -2
  55. package/dist/{chunk-ANPECDYL.js → chunk-ARJSQUIS.js} +3 -3
  56. package/dist/{chunk-UVEIBBTR.js → chunk-BDGKWUK2.js} +2 -2
  57. package/dist/{chunk-CRW4P7JU.js → chunk-BDV4WDIA.js} +1 -1
  58. package/dist/{chunk-CW4CF7NU.js → chunk-CW3QUV6B.js} +11 -11
  59. package/dist/{chunk-A6U4RRFM.js → chunk-DV26ZWUC.js} +2 -2
  60. package/dist/{chunk-XGHXQUDG.js → chunk-E3FSKKTJ.js} +1 -1
  61. package/dist/{chunk-YJWEQZJC.js → chunk-E7EOUEGQ.js} +4 -4
  62. package/dist/{chunk-LU7JPQKL.js → chunk-E7HOX73X.js} +4 -4
  63. package/dist/{chunk-RGSG2GYV.js → chunk-G5YMVGAK.js} +4 -4
  64. package/dist/{chunk-6HMCOGKJ.js → chunk-GFXZDU4V.js} +31 -12
  65. package/dist/{chunk-ATDOYZXC.js → chunk-GNQZY4GL.js} +1 -1
  66. package/dist/{chunk-LB4HVID5.js → chunk-GWKT2ZZS.js} +3 -3
  67. package/dist/{chunk-6W6UY4AJ.js → chunk-JQVGCDHW.js} +5 -5
  68. package/dist/{chunk-AESHOWIB.js → chunk-KCLWVCGN.js} +8 -5
  69. package/dist/{chunk-XDKZZSU6.js → chunk-KCXG2INQ.js} +2 -2
  70. package/dist/{chunk-7YTJOWYI.js → chunk-KH2EDRJQ.js} +6 -3
  71. package/dist/{chunk-PPAMIQOV.js → chunk-LH3GTSXC.js} +10 -10
  72. package/dist/{chunk-HPMP6QQD.js → chunk-N2JP3RKP.js} +10 -9
  73. package/dist/{chunk-NESTNKCA.js → chunk-NB2PY5JX.js} +3 -3
  74. package/dist/{chunk-SB2GN6OP.js → chunk-OYIN77HO.js} +3 -2
  75. package/dist/{chunk-MMIN6VNU.js → chunk-OZVZGWER.js} +1 -1
  76. package/dist/{chunk-6I4D3XZ3.js → chunk-P345G4DK.js} +1 -7
  77. package/dist/{chunk-422Z3LBB.js → chunk-SGUGGHMC.js} +3 -3
  78. package/dist/{chunk-736I6CBY.js → chunk-T57BCGHQ.js} +1 -1
  79. package/dist/{chunk-DNSYWI7D.js → chunk-TH3HKKGW.js} +14 -13
  80. package/dist/{chunk-Q4EQHBA7.js → chunk-TSFNX5J2.js} +5 -14
  81. package/dist/{chunk-LHGB64O2.js → chunk-TZWZVAMN.js} +1 -1
  82. package/dist/{chunk-YONHM5BQ.js → chunk-U26CAOZC.js} +1 -1
  83. package/dist/{chunk-XJGGGDHX.js → chunk-U2IEM5FF.js} +2 -2
  84. package/dist/{chunk-XVNZHIVF.js → chunk-U4OWRGYI.js} +9 -8
  85. package/dist/{chunk-DQTBQHB5.js → chunk-UFGU7AK3.js} +2 -2
  86. package/dist/{chunk-6WEC3KZP.js → chunk-VTR4VRL2.js} +1 -1
  87. package/dist/{chunk-RZCTGLUJ.js → chunk-WAKQYJ6T.js} +3 -3
  88. package/dist/{chunk-2V2CCTGQ.js → chunk-WE2RVY7V.js} +1 -1
  89. package/dist/{chunk-N5K5H2AQ.js → chunk-XDTYGS6R.js} +5 -5
  90. package/dist/{chunk-VOIN2NZW.js → chunk-YGR5PBOF.js} +3 -3
  91. package/dist/{chunk-Z4YQ7ZMO.js → chunk-YI543EKI.js} +3 -3
  92. package/dist/{chunk-2YAHQ763.js → chunk-YODL2CJV.js} +5 -5
  93. package/dist/{chunk-OZOD37XK.js → chunk-YPZ4AE2R.js} +5 -5
  94. package/dist/{chunk-BIQF3C4H.js → chunk-YR3DHPYI.js} +1 -1
  95. package/dist/{chunk-EP6FWWBY.js → chunk-Z7KB4R6U.js} +11 -8
  96. package/dist/{chunk-R7SSVBHX.js → chunk-ZUOIDI6M.js} +4 -4
  97. package/dist/{global-upgrade-EELV2YEK.js → global-upgrade-F3QY6OHE.js} +7 -7
  98. package/dist/{paths-MDOKPY7A.js → paths-CBEAZNJR.js} +2 -2
  99. package/dist/{reapply-22C75UEY.js → reapply-4HP6N7LY.js} +21 -21
  100. package/dist/src/index.d.ts +1 -0
  101. package/dist/src/index.js +20 -20
  102. package/dist/{upgrade-lock-VPL5AYPQ.js → upgrade-lock-N3G5V2QS.js} +4 -4
  103. package/package.json +1 -1
@@ -2,10 +2,10 @@ import {
2
2
  autoUpdateLock,
3
3
  installPackageGlobally,
4
4
  npmErrorMessage
5
- } from "./chunk-YJWEQZJC.js";
5
+ } from "./chunk-E7EOUEGQ.js";
6
6
  import {
7
7
  writeJsonAtomic
8
- } from "./chunk-FT7UNIS3.js";
8
+ } from "./chunk-AQFEP65J.js";
9
9
 
10
10
  // src/upgrade-lock.ts
11
11
  import { fork } from "child_process";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-6HMCOGKJ.js";
4
+ } from "./chunk-GFXZDU4V.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-XQ4HTTBB.js";
3
+ } from "./chunk-75MJRC5I.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-6HMCOGKJ.js";
6
+ } from "./chunk-GFXZDU4V.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,15 +1,19 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-MID7BURF.js";
3
+ } from "./chunk-5TLRS3AK.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
7
7
  writeFileAtomic,
8
8
  writeJsonAtomic
9
- } from "./chunk-FT7UNIS3.js";
9
+ } from "./chunk-AQFEP65J.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-XQ4HTTBB.js";
12
+ } from "./chunk-75MJRC5I.js";
13
+ import {
14
+ API_KEY_PREFIX_PATTERN,
15
+ isRecord
16
+ } from "./chunk-GFXZDU4V.js";
13
17
 
14
18
  // src/shell-alias.ts
15
19
  import { homedir } from "os";
@@ -111,7 +115,6 @@ var isDisabledExport = (line) => {
111
115
  };
112
116
  var keyPrefix = (key) => key.split(".")[0] ?? key;
113
117
  var MAC_APP_KEY_PREFIX_FIELD = "macAppKeyPrefix";
114
- var KEY_PREFIX_SHAPE = /^pk_[a-f0-9]+$/;
115
118
  var findKeyExport = (contents) => {
116
119
  const lines = contents.split("\n");
117
120
  for (const [index, line] of lines.entries()) {
@@ -120,6 +123,10 @@ var findKeyExport = (contents) => {
120
123
  }
121
124
  return null;
122
125
  };
126
+ var readConfigRecord = (configPath) => {
127
+ const result = readJsonSafe(configPath);
128
+ return result.kind === "ok" && isRecord(result.value) ? result.value : null;
129
+ };
123
130
  var keepMacAppKeyPrefix = (current, apiKey) => {
124
131
  const { [MAC_APP_KEY_PREFIX_FIELD]: recorded, ...rest } = current;
125
132
  return recorded === keyPrefix(apiKey) ? { ...rest, [MAC_APP_KEY_PREFIX_FIELD]: recorded } : rest;
@@ -214,9 +221,9 @@ var writeKey = (apiKey, options = {}) => {
214
221
  `${configPath} exists but could not be read (${existing.error.message}). Fix its permissions or remove it, then re-run setup. Nothing was changed.`
215
222
  );
216
223
  }
217
- if (existing.kind === "ok") {
224
+ if (existing.kind === "ok" && isRecord(existing.value)) {
218
225
  current = existing.value;
219
- } else if (existing.kind === "unparseable") {
226
+ } else if (existing.kind === "ok" || existing.kind === "unparseable") {
220
227
  configBackupPath = backupFile(configPath);
221
228
  }
222
229
  writeJsonAtomic(
@@ -238,10 +245,10 @@ var writeKey = (apiKey, options = {}) => {
238
245
  };
239
246
  var clearKey = (options = {}) => {
240
247
  const configPath = configFilePath();
241
- const existing = readJsonSafe(configPath);
248
+ const existing = readConfigRecord(configPath);
242
249
  let removedFromConfig = false;
243
- if (existing.kind === "ok" && typeof existing.value.apiKey === "string") {
244
- const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing.value;
250
+ if (existing !== null && typeof existing.apiKey === "string") {
251
+ const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing;
245
252
  writeJsonAtomic(configPath, rest, KEY_FILE_MODE);
246
253
  restrictFile(configPath);
247
254
  removedFromConfig = true;
@@ -277,22 +284,18 @@ var restrictFile = (filePath) => {
277
284
  }
278
285
  };
279
286
  var readConfigKey = (configPath) => {
280
- const result = readJsonSafe(configPath);
281
- if (result.kind !== "ok") return null;
282
- const key = typeof result.value.apiKey === "string" ? result.value.apiKey.trim() : "";
287
+ const apiKey = readConfigRecord(configPath)?.apiKey;
288
+ const key = typeof apiKey === "string" ? apiKey.trim() : "";
283
289
  return key || null;
284
290
  };
285
291
  var readConfigFileKey = () => readConfigKey(configFilePath());
286
292
  var readControlMode = (configPath = configFilePath()) => {
287
- const result = readJsonSafe(configPath);
288
- if (result.kind !== "ok") return null;
289
- const value = result.value.controlMode;
293
+ const value = readConfigRecord(configPath)?.controlMode;
290
294
  return value === "auto" || value === "on" || value === "off" ? value : null;
291
295
  };
292
296
  var readTranscriptPreference = () => {
293
- const result = readJsonSafe(configFilePath());
294
- if (result.kind !== "ok") return null;
295
- return typeof result.value.transcriptsEnabled === "boolean" ? result.value.transcriptsEnabled : null;
297
+ const value = readConfigRecord(configFilePath())?.transcriptsEnabled;
298
+ return typeof value === "boolean" ? value : null;
296
299
  };
297
300
  var readKeySource = () => {
298
301
  const configPath = configFilePath();
@@ -304,16 +307,15 @@ var readKeySource = () => {
304
307
  return { kind: "none", key: null, origin: null, drift: null };
305
308
  };
306
309
  var readMacAppKeyPrefix = (configPath = configFilePath()) => {
307
- const result = readJsonSafe(configPath);
308
- if (result.kind !== "ok") return null;
309
- const recorded = result.value[MAC_APP_KEY_PREFIX_FIELD];
310
- return typeof recorded === "string" && KEY_PREFIX_SHAPE.test(recorded) ? recorded : null;
310
+ const recorded = readConfigRecord(configPath)?.[MAC_APP_KEY_PREFIX_FIELD];
311
+ return typeof recorded === "string" && API_KEY_PREFIX_PATTERN.test(recorded) ? recorded : null;
311
312
  };
313
+ var isAdoptedMacAppKey = (key, adoptedPrefix) => keyPrefix(key) === adoptedPrefix;
312
314
  var recordMacAppKeyPrefix = (apiKey, configPath = configFilePath()) => {
313
- const result = readJsonSafe(configPath);
314
- if (result.kind !== "ok" || result.value.apiKey !== apiKey) return false;
315
- if (result.value[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
316
- writeJsonAtomic(configPath, { ...result.value, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
315
+ const config = readConfigRecord(configPath);
316
+ if (config === null || config.apiKey !== apiKey) return false;
317
+ if (config[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
318
+ writeJsonAtomic(configPath, { ...config, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
317
319
  restrictFile(configPath);
318
320
  return true;
319
321
  };
@@ -354,6 +356,7 @@ export {
354
356
  readTranscriptPreference,
355
357
  readKeySource,
356
358
  readMacAppKeyPrefix,
359
+ isAdoptedMacAppKey,
357
360
  recordMacAppKeyPrefix,
358
361
  findExportedKeyLines,
359
362
  findExportedKeyLine
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-NESTNKCA.js";
3
+ } from "./chunk-NB2PY5JX.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-RZCTGLUJ.js";
6
+ } from "./chunk-WAKQYJ6T.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-XQ4HTTBB.js";
9
+ } from "./chunk-75MJRC5I.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-VOIN2NZW.js";
6
+ } from "./chunk-YGR5PBOF.js";
7
7
  import {
8
8
  CLAUDE_CODE_AGENT,
9
9
  parseApplyPatchFiles
10
- } from "./chunk-CW4CF7NU.js";
10
+ } from "./chunk-CW3QUV6B.js";
11
11
  import {
12
12
  guardBinary,
13
13
  guardBinaryRefusing,
14
14
  holdBudgetOf,
15
15
  isProtectedByScope,
16
16
  registerHookEntry
17
- } from "./chunk-YJWEQZJC.js";
17
+ } from "./chunk-E7EOUEGQ.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-6HMCOGKJ.js";
27
+ } from "./chunk-GFXZDU4V.js";
28
28
 
29
29
  // src/claude-config.ts
30
30
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-LHGB64O2.js";
3
+ } from "./chunk-TZWZVAMN.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-4ABHSCFJ.js";
3
+ } from "./chunk-6IOLTFNP.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -5,26 +5,27 @@ import {
5
5
  import {
6
6
  SubscriptionRequiredError,
7
7
  callMcpTool
8
- } from "./chunk-HILWD7WM.js";
8
+ } from "./chunk-6SFTI7LM.js";
9
9
  import {
10
10
  installNetworkDefaults,
11
11
  isNetworkFailure
12
- } from "./chunk-RZCTGLUJ.js";
12
+ } from "./chunk-WAKQYJ6T.js";
13
13
  import {
14
14
  clientReportClaims
15
- } from "./chunk-YJWEQZJC.js";
15
+ } from "./chunk-E7EOUEGQ.js";
16
16
  import {
17
17
  getApiKey,
18
18
  getBaseUrl
19
- } from "./chunk-XQ4HTTBB.js";
19
+ } from "./chunk-75MJRC5I.js";
20
20
  import {
21
21
  ASK_AGENT_NAME_MAX,
22
22
  ASK_QUESTION_MAX,
23
23
  CLIENT_REPORT_PATH,
24
24
  DECISION_LINE_MAX,
25
+ GATE_PERMISSION_MODE_MAX_LENGTH,
25
26
  degradedLine,
26
27
  truncateLine
27
- } from "./chunk-6HMCOGKJ.js";
28
+ } from "./chunk-GFXZDU4V.js";
28
29
 
29
30
  // src/client-report-claim.ts
30
31
  import { createHash } from "crypto";
@@ -190,13 +191,15 @@ var unavailableQuestionUnlessSubscriptionRequired = (error) => {
190
191
  return { correlationId: "", status: "unavailable" };
191
192
  };
192
193
  var truncateOptional = (text, max) => text === void 0 ? void 0 : truncateLine(text, max);
194
+ var boundedPermissionMode = (value) => typeof value === "string" && value.length > 0 ? value.slice(0, GATE_PERMISSION_MODE_MAX_LENGTH) : void 0;
193
195
  var withinAskUserLimits = (params) => ({
194
196
  ...params,
195
197
  question: truncateLine(params.question, ASK_QUESTION_MAX),
196
198
  agentName: truncateOptional(params.agentName, ASK_AGENT_NAME_MAX),
197
199
  intent: truncateOptional(params.intent, DECISION_LINE_MAX),
198
200
  action: truncateOptional(params.action, DECISION_LINE_MAX),
199
- blocker: truncateOptional(params.blocker, DECISION_LINE_MAX)
201
+ blocker: truncateOptional(params.blocker, DECISION_LINE_MAX),
202
+ permissionMode: boundedPermissionMode(params.permissionMode)
200
203
  });
201
204
  var askUser = async (apiKey, params, timeoutMs = 15e3) => {
202
205
  const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
@@ -12,7 +12,8 @@ var readJsonSafe = (filePath) => {
12
12
  }
13
13
  if (raw.trim() === "") return { kind: "ok", value: {} };
14
14
  try {
15
- return { kind: "ok", value: JSON.parse(raw) };
15
+ const value = JSON.parse(raw);
16
+ return { kind: "ok", value };
16
17
  } catch (err) {
17
18
  return { kind: "unparseable", error: err, raw };
18
19
  }
@@ -6,12 +6,12 @@ import {
6
6
  permissionDeniedAction,
7
7
  releaseThrottle,
8
8
  reportEvent
9
- } from "./chunk-CW4CF7NU.js";
9
+ } from "./chunk-CW3QUV6B.js";
10
10
  import {
11
11
  machineDecisionFor,
12
12
  shouldDeferToNativeMode,
13
13
  wireVerdictFor
14
- } from "./chunk-6HMCOGKJ.js";
14
+ } from "./chunk-GFXZDU4V.js";
15
15
 
16
16
  // src/machine-decision-audit.ts
17
17
  import { basename } from "path";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-YJWEQZJC.js";
3
+ } from "./chunk-E7EOUEGQ.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
7
- } from "./chunk-FT7UNIS3.js";
7
+ } from "./chunk-AQFEP65J.js";
8
8
  import {
9
9
  DECLINED_AGENTS_FILE,
10
10
  DISCONNECT_AGENT_IDS,
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-6HMCOGKJ.js";
16
+ } from "./chunk-GFXZDU4V.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-HILWD7WM.js";
3
+ } from "./chunk-6SFTI7LM.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-LHGB64O2.js";
6
+ } from "./chunk-TZWZVAMN.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
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-6HMCOGKJ.js";
3
+ } from "./chunk-GFXZDU4V.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -2,7 +2,7 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-CRW4P7JU.js";
5
+ } from "./chunk-BDV4WDIA.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-K5PUP76V.js";
13
+ } from "./chunk-AGIO7SF5.js";
14
14
  import {
15
15
  withRetry
16
- } from "./chunk-HILWD7WM.js";
16
+ } from "./chunk-6SFTI7LM.js";
17
17
  import {
18
18
  getMachineId
19
- } from "./chunk-XJGGGDHX.js";
19
+ } from "./chunk-U2IEM5FF.js";
20
20
  import {
21
21
  reportedInstallSource
22
- } from "./chunk-MID7BURF.js";
22
+ } from "./chunk-5TLRS3AK.js";
23
23
  import {
24
24
  canonicalJson
25
- } from "./chunk-YJWEQZJC.js";
25
+ } from "./chunk-E7EOUEGQ.js";
26
26
  import {
27
27
  writeFileAtomic
28
- } from "./chunk-FT7UNIS3.js";
28
+ } from "./chunk-AQFEP65J.js";
29
29
  import {
30
30
  getApiKey,
31
31
  getBaseUrl
32
- } from "./chunk-XQ4HTTBB.js";
32
+ } from "./chunk-75MJRC5I.js";
33
33
  import {
34
34
  ACTION_BODY_MAX,
35
35
  AGENT_LABELS_BY_TYPE,
@@ -60,7 +60,7 @@ import {
60
60
  resolvePolicy,
61
61
  toToolLookup,
62
62
  truncateLine
63
- } from "./chunk-6HMCOGKJ.js";
63
+ } from "./chunk-GFXZDU4V.js";
64
64
 
65
65
  // ../hook-mapping/src/describe.ts
66
66
  import { isAbsolute, relative, resolve } from "path";
@@ -204,6 +204,7 @@ var parseApplyPatchOps = (command) => {
204
204
  return ops;
205
205
  };
206
206
  var parseApplyPatchFiles = (command) => [...new Set(parseApplyPatchOps(command).map((entry) => entry.path))];
207
+ var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
207
208
  var OPENCODE_TOOL_NAMES = {
208
209
  bash: "Bash",
209
210
  // A shell command reaching outside the worktree asks a second time under its
@@ -1359,7 +1360,6 @@ var toCodexWire = (event, decision) => {
1359
1360
  decision.kind === "deny" ? decision.reason : void 0
1360
1361
  ) ?? null;
1361
1362
  };
1362
- var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
1363
1363
  var describeApplyPatch = (command) => {
1364
1364
  const ops = parseApplyPatchOps(command);
1365
1365
  if (ops.length === 0) return null;
@@ -2246,6 +2246,7 @@ export {
2246
2246
  describeToolCall,
2247
2247
  deriveToolTarget,
2248
2248
  parseApplyPatchFiles,
2249
+ patchDeletesFiles,
2249
2250
  OPENCODE_TOOL_NAMES,
2250
2251
  canonicalGateInputs,
2251
2252
  scopePathFor,
@@ -2279,7 +2280,6 @@ export {
2279
2280
  codexDeny,
2280
2281
  codexPass,
2281
2282
  toCodexWire,
2282
- patchDeletesFiles,
2283
2283
  describeApplyPatch,
2284
2284
  toPolicyLookup,
2285
2285
  toPolicyLookups,
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-XGHXQUDG.js";
6
+ } from "./chunk-E3FSKKTJ.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-ATDOYZXC.js";
10
+ } from "./chunk-GNQZY4GL.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
  redactSecretsFromContent
3
- } from "./chunk-6HMCOGKJ.js";
3
+ } from "./chunk-GFXZDU4V.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -13,7 +13,7 @@ import {
13
13
  isReleaseVersion,
14
14
  ownPackageName,
15
15
  withHookHoldBudget
16
- } from "./chunk-6HMCOGKJ.js";
16
+ } from "./chunk-GFXZDU4V.js";
17
17
 
18
18
  // src/setup/paths.ts
19
19
  import { homedir as homedir2 } from "os";
@@ -395,9 +395,9 @@ var installGlobally = (options) => {
395
395
  }
396
396
  const started = (async () => {
397
397
  if (!npmIsOnPath()) throw new NpmMissingError();
398
- const { withUpgradeLock } = await import("./global-upgrade-EELV2YEK.js");
399
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-VPL5AYPQ.js");
400
- const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-MDOKPY7A.js");
398
+ const { withUpgradeLock } = await import("./global-upgrade-F3QY6OHE.js");
399
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-N3G5V2QS.js");
400
+ const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-CBEAZNJR.js");
401
401
  let result = "skipped";
402
402
  const install = async () => {
403
403
  const platform = process.platform;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-PPAMIQOV.js";
3
+ } from "./chunk-LH3GTSXC.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-DF2FSJ7B.js";
6
+ } from "./chunk-6TSEEKPL.js";
7
7
  import {
8
8
  writeDegraded
9
- } from "./chunk-K5PUP76V.js";
9
+ } from "./chunk-AGIO7SF5.js";
10
10
  import {
11
11
  claudeShapedHookInput,
12
12
  hookCompatibleProfileBySource
13
- } from "./chunk-6HMCOGKJ.js";
13
+ } from "./chunk-GFXZDU4V.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"];
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-FO3MDD26.js";
15
15
  import {
16
16
  callMcpTool
17
- } from "./chunk-HILWD7WM.js";
17
+ } from "./chunk-6SFTI7LM.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-MID7BURF.js";
20
+ } from "./chunk-5TLRS3AK.js";
21
21
  import {
22
22
  NPX_LATEST_COMMAND
23
- } from "./chunk-LHGB64O2.js";
23
+ } from "./chunk-TZWZVAMN.js";
24
24
  import {
25
25
  NO_PAIRING_COMPUTER,
26
26
  PAIR_TTL_SECONDS,
27
27
  classifyConfirmResponse,
28
28
  isAnswerSource
29
- } from "./chunk-6HMCOGKJ.js";
29
+ } from "./chunk-GFXZDU4V.js";
30
30
 
31
31
  // src/reach.ts
32
32
  var reachVerdict = (channels) => {