@pushary/agent-hooks 1.6.0 → 1.6.2

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 (81) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/bin/pushary-bell-hook.js +18 -18
  3. package/dist/bin/pushary-bell.js +6 -6
  4. package/dist/bin/pushary-claude.js +19 -19
  5. package/dist/bin/pushary-clean.js +20 -20
  6. package/dist/bin/pushary-codex-bridge.js +95 -20
  7. package/dist/bin/pushary-codex-hook.js +24 -24
  8. package/dist/bin/pushary-codex.js +7 -7
  9. package/dist/bin/pushary-connect.js +6 -6
  10. package/dist/bin/pushary-cowork.js +3 -3
  11. package/dist/bin/pushary-daemon.js +23 -23
  12. package/dist/bin/pushary-disconnect.js +11 -11
  13. package/dist/bin/pushary-doctor.js +23 -23
  14. package/dist/bin/pushary-elicitation-hook.js +18 -18
  15. package/dist/bin/pushary-gemini-bridge.js +9 -9
  16. package/dist/bin/pushary-gemini-hook.js +21 -21
  17. package/dist/bin/pushary-hook.js +24 -24
  18. package/dist/bin/pushary-login.js +7 -7
  19. package/dist/bin/pushary-logout.js +4 -4
  20. package/dist/bin/pushary-mode.js +3 -3
  21. package/dist/bin/pushary-notification-hook.js +21 -21
  22. package/dist/bin/pushary-opencode-hook.js +20 -20
  23. package/dist/bin/pushary-permission-denied-hook.js +25 -25
  24. package/dist/bin/pushary-permission-hook.js +24 -24
  25. package/dist/bin/pushary-post-hook.js +21 -21
  26. package/dist/bin/pushary-prompt-hook.js +21 -21
  27. package/dist/bin/pushary-session-end-hook.js +21 -21
  28. package/dist/bin/pushary-session-start-hook.js +25 -25
  29. package/dist/bin/pushary-setup.js +29 -30
  30. package/dist/bin/pushary-stats.js +2 -2
  31. package/dist/bin/pushary-status.js +10 -10
  32. package/dist/bin/pushary-stop-hook.js +21 -21
  33. package/dist/bin/pushary-stopfailure-hook.js +21 -21
  34. package/dist/bin/pushary-transcript-register.js +16 -16
  35. package/dist/bin/pushary-transcripts.js +4 -4
  36. package/dist/bin/pushary-upgrade.js +16 -16
  37. package/dist/bin/pushary-wait.js +3 -3
  38. package/dist/{chunk-FDF72XHK.js → chunk-2J63MNXV.js} +2 -2
  39. package/dist/{chunk-OR3A3RLH.js → chunk-3HUDBDO7.js} +1 -1
  40. package/dist/{chunk-GDXSCXQC.js → chunk-3PDQE66Q.js} +1 -1
  41. package/dist/{chunk-XGL5JC6U.js → chunk-55AT5DJD.js} +2 -2
  42. package/dist/{chunk-FI3LQCUH.js → chunk-572FZF7T.js} +5 -5
  43. package/dist/{chunk-GP6SFVEN.js → chunk-5KREBDUT.js} +1 -1
  44. package/dist/{chunk-SFNRAEEW.js → chunk-7REOI7BC.js} +1 -1
  45. package/dist/{chunk-YFD7CRIZ.js → chunk-A5ODW52C.js} +36 -7
  46. package/dist/{chunk-644CGYOB.js → chunk-A6BENRKI.js} +7 -7
  47. package/dist/{chunk-F4KRNFDE.js → chunk-CH4QMWBM.js} +1 -1
  48. package/dist/{chunk-OP7HFIWE.js → chunk-D5ORNUHK.js} +6 -6
  49. package/dist/{chunk-MOQOJOMD.js → chunk-D5PQGC5V.js} +3 -3
  50. package/dist/{chunk-5MH5P366.js → chunk-E72R2MHO.js} +2 -2
  51. package/dist/{chunk-ALG3IBLB.js → chunk-F5ENKWKY.js} +1 -1
  52. package/dist/{chunk-66BIMA62.js → chunk-GKO7T4JM.js} +6 -6
  53. package/dist/{chunk-NDS27FXU.js → chunk-HLY5W2P4.js} +1 -1
  54. package/dist/{chunk-BK5F3FGE.js → chunk-HW2M7XAU.js} +3 -3
  55. package/dist/{chunk-CSW6A2EW.js → chunk-HXKY6DFD.js} +1 -1
  56. package/dist/{chunk-RBPJO4KG.js → chunk-HYN2BILS.js} +1 -1
  57. package/dist/{chunk-KZBGITM4.js → chunk-KKZ5TDTB.js} +4 -4
  58. package/dist/{chunk-DZ75BJ7V.js → chunk-KUQF2VO6.js} +3 -3
  59. package/dist/{chunk-7JSE6JTZ.js → chunk-LH2N6VAN.js} +1 -1
  60. package/dist/{chunk-G5LENVCZ.js → chunk-LN3FETAC.js} +3 -3
  61. package/dist/{chunk-PYCQXCI5.js → chunk-LVHGSD5E.js} +2 -0
  62. package/dist/{chunk-A2GS2ENL.js → chunk-M543MAUN.js} +6 -6
  63. package/dist/{chunk-GOXINLDU.js → chunk-N6AMKPDW.js} +1 -1
  64. package/dist/{chunk-XQOT4CCK.js → chunk-ND43S2N4.js} +1 -1
  65. package/dist/{chunk-A5URWZTP.js → chunk-NEUYPY3I.js} +1 -1
  66. package/dist/{chunk-VMNI33F5.js → chunk-NSG2Q4PI.js} +1 -1
  67. package/dist/{chunk-F2OPOBRO.js → chunk-ON7VIYOQ.js} +1 -1
  68. package/dist/{chunk-E7MJBWSR.js → chunk-OXFWJIW4.js} +1 -1
  69. package/dist/{chunk-HWG7X3VI.js → chunk-RK2MUM6Q.js} +3 -3
  70. package/dist/{chunk-TDKE3V6W.js → chunk-RKNA2L2J.js} +1 -1
  71. package/dist/{chunk-NYD7W7AT.js → chunk-RKSBBEGT.js} +1 -1
  72. package/dist/{chunk-B6TYEKJR.js → chunk-SB2CRLFK.js} +1 -1
  73. package/dist/{chunk-BE4P7ERZ.js → chunk-SD6SAIEV.js} +3 -3
  74. package/dist/{chunk-BW3Y2D24.js → chunk-TCT4WUDP.js} +4 -4
  75. package/dist/{chunk-PCVVCS4A.js → chunk-TDXQQB55.js} +1 -1
  76. package/dist/{chunk-5QCZYSYR.js → chunk-VQIINJ45.js} +1 -1
  77. package/dist/{chunk-VZANUMIF.js → chunk-XINNQCPW.js} +1 -1
  78. package/dist/{chunk-PRZXYILJ.js → chunk-ZRLB3N37.js} +2 -2
  79. package/dist/{reapply-RRDVJATI.js → reapply-KV6RTOQL.js} +9 -9
  80. package/dist/src/index.js +13 -13
  81. package/package.json +1 -1
@@ -5,18 +5,18 @@ import {
5
5
  import {
6
6
  ensureCodexTrustAfterReapply,
7
7
  reapplyAllAgents
8
- } from "../chunk-OP7HFIWE.js";
9
- import "../chunk-NDS27FXU.js";
10
- import "../chunk-XQOT4CCK.js";
8
+ } from "../chunk-D5ORNUHK.js";
9
+ import "../chunk-HLY5W2P4.js";
10
+ import "../chunk-ND43S2N4.js";
11
11
  import {
12
12
  waitForMachineReadiness
13
- } from "../chunk-BW3Y2D24.js";
14
- import "../chunk-HWG7X3VI.js";
13
+ } from "../chunk-TCT4WUDP.js";
14
+ import "../chunk-RK2MUM6Q.js";
15
15
  import {
16
16
  detectProviderLiveCapabilities,
17
17
  hasSpawnProvider,
18
18
  resolveControlPolicy
19
- } from "../chunk-5MH5P366.js";
19
+ } from "../chunk-E72R2MHO.js";
20
20
  import {
21
21
  AUTO_UPDATE_DISABLE_ENV,
22
22
  describeAutoUpdateCheck,
@@ -27,8 +27,8 @@ import {
27
27
  readAutoUpdateState,
28
28
  updateAutoUpdateState,
29
29
  upgradeEntryFor
30
- } from "../chunk-RBPJO4KG.js";
31
- import "../chunk-MOQOJOMD.js";
30
+ } from "../chunk-HYN2BILS.js";
31
+ import "../chunk-D5PQGC5V.js";
32
32
  import {
33
33
  daemonHasRemoteProof,
34
34
  daemonServiceManagerAvailable,
@@ -39,13 +39,13 @@ import {
39
39
  replaceDaemonService,
40
40
  stopDaemonService,
41
41
  waitForDaemonRemoteProof
42
- } from "../chunk-DZ75BJ7V.js";
43
- import "../chunk-BK5F3FGE.js";
42
+ } from "../chunk-KUQF2VO6.js";
43
+ import "../chunk-HW2M7XAU.js";
44
44
  import {
45
45
  needsShell
46
46
  } from "../chunk-XHKBHWLX.js";
47
- import "../chunk-VZANUMIF.js";
48
- import "../chunk-7JSE6JTZ.js";
47
+ import "../chunk-XINNQCPW.js";
48
+ import "../chunk-LH2N6VAN.js";
49
49
  import {
50
50
  LATEST_TAG,
51
51
  autoUpdateLock,
@@ -61,22 +61,22 @@ import {
61
61
  npmErrorMessage,
62
62
  resolveGlobalBinary,
63
63
  vscodePluginDir
64
- } from "../chunk-F2OPOBRO.js";
64
+ } from "../chunk-ON7VIYOQ.js";
65
65
  import {
66
66
  exitOnHelpFlag
67
67
  } from "../chunk-P4BNYJ5Q.js";
68
68
  import {
69
69
  readControlMode
70
- } from "../chunk-TDKE3V6W.js";
70
+ } from "../chunk-RKNA2L2J.js";
71
71
  import {
72
72
  EXIT
73
73
  } from "../chunk-KZERVKTD.js";
74
- import "../chunk-VMNI33F5.js";
74
+ import "../chunk-NSG2Q4PI.js";
75
75
  import "../chunk-T7E75EKA.js";
76
76
  import {
77
77
  getApiKey
78
78
  } from "../chunk-OSJEMXSR.js";
79
- import "../chunk-YFD7CRIZ.js";
79
+ import "../chunk-A5ODW52C.js";
80
80
  import {
81
81
  NPX_LATEST_COMMAND
82
82
  } from "../chunk-EA3IELHP.js";
@@ -4,8 +4,8 @@ import {
4
4
  } from "../chunk-CVWG2N3Y.js";
5
5
  import {
6
6
  exitOnFailedResponse
7
- } from "../chunk-PCVVCS4A.js";
8
- import "../chunk-CSW6A2EW.js";
7
+ } from "../chunk-TDXQQB55.js";
8
+ import "../chunk-HXKY6DFD.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-5RUIFDTP.js";
@@ -26,7 +26,7 @@ import {
26
26
  getApiKey,
27
27
  getBaseUrl
28
28
  } from "../chunk-OSJEMXSR.js";
29
- import "../chunk-YFD7CRIZ.js";
29
+ import "../chunk-A5ODW52C.js";
30
30
  import "../chunk-EA3IELHP.js";
31
31
  import "../chunk-HWJW3CPO.js";
32
32
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-A2GS2ENL.js";
3
+ } from "./chunk-M543MAUN.js";
4
4
  import {
5
5
  degradedLine
6
- } from "./chunk-YFD7CRIZ.js";
6
+ } from "./chunk-A5ODW52C.js";
7
7
 
8
8
  // src/tool-hook-input.ts
9
9
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-F2OPOBRO.js";
3
+ } from "./chunk-ON7VIYOQ.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_LOCATOR_BINARY
3
- } from "./chunk-YFD7CRIZ.js";
3
+ } from "./chunk-A5ODW52C.js";
4
4
 
5
5
  // src/diagnostics/bridge.ts
6
6
  import { execFileSync } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-A5URWZTP.js";
3
+ } from "./chunk-NEUYPY3I.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-YFD7CRIZ.js";
17
+ } from "./chunk-A5ODW52C.js";
18
18
 
19
19
  // src/cli/cowork.ts
20
20
  import { readFileSync } from "fs";
@@ -3,28 +3,28 @@ import {
3
3
  addPusharyToolPermissions,
4
4
  isPusharyHook,
5
5
  removeClaudeMcpServers
6
- } from "./chunk-HWG7X3VI.js";
6
+ } from "./chunk-RK2MUM6Q.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  addGeminiMcpServer,
10
10
  removeGeminiMcpServer
11
- } from "./chunk-BK5F3FGE.js";
11
+ } from "./chunk-HW2M7XAU.js";
12
12
  import {
13
13
  CLAUDE_CODE_AGENT,
14
14
  parseApplyPatchFiles
15
- } from "./chunk-66BIMA62.js";
15
+ } from "./chunk-GKO7T4JM.js";
16
16
  import {
17
17
  guardBinary,
18
18
  holdBudgetOf,
19
19
  registerHookEntry
20
- } from "./chunk-F2OPOBRO.js";
20
+ } from "./chunk-ON7VIYOQ.js";
21
21
  import {
22
22
  PHONE_ANSWERED_TOOLS,
23
23
  hookCompatibleProfile,
24
24
  hookCompatibleProfileBySource,
25
25
  toToolLookup,
26
26
  withHookHoldBudget
27
- } from "./chunk-YFD7CRIZ.js";
27
+ } from "./chunk-A5ODW52C.js";
28
28
 
29
29
  // src/compatible-config.ts
30
30
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-TDKE3V6W.js";
3
+ } from "./chunk-RKNA2L2J.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecrets
3
- } from "./chunk-YFD7CRIZ.js";
3
+ } from "./chunk-A5ODW52C.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -1179,10 +1179,33 @@ var INLINE_CODE_SHORT_FLAG_LETTERS = /* @__PURE__ */ new Set(["c", "e", "E", "p"
1179
1179
  var SHORT_FLAG_CLUSTER = /^-([A-Za-z]+)/;
1180
1180
  var INLINE_CODE_SUBCOMMAND = "eval";
1181
1181
  var STANDARD_INPUT_ARGUMENT = "-";
1182
- var DESTRUCTIVE_FLAGS_BY_PROGRAM = /* @__PURE__ */ new Map([
1182
+ var DESTRUCTIVE_ARGUMENTS_BY_COMMAND = /* @__PURE__ */ new Map([
1183
1183
  ["find", /* @__PURE__ */ new Set(["-delete", "-exec", "-execdir", "-ok", "-okdir"])],
1184
- ["rsync", /* @__PURE__ */ new Set(["--delete", "--delete-before", "--delete-during", "--delete-after", "--delete-excluded", "--remove-source-files"])]
1184
+ ["rsync", /* @__PURE__ */ new Set([
1185
+ "--del",
1186
+ "--delete",
1187
+ "--delete-before",
1188
+ "--delete-during",
1189
+ "--delete-delay",
1190
+ "--delete-after",
1191
+ "--delete-excluded",
1192
+ "--delete-missing-args",
1193
+ "--remove-source-files",
1194
+ "--remove-sent-files"
1195
+ ])],
1196
+ ["git checkout", /* @__PURE__ */ new Set(["-f", "--force", "--", "-B"])],
1197
+ ["git switch", /* @__PURE__ */ new Set(["-f", "--force", "--discard-changes", "-C", "--force-create"])],
1198
+ ["git branch", /* @__PURE__ */ new Set(["-f", "--force", "-D", "-M", "-C"])]
1185
1199
  ]);
1200
+ var DESTRUCTIVE_WORDS_IN_ANY_CASE_BY_COMMAND = /* @__PURE__ */ new Map([
1201
+ ["redis-cli", /* @__PURE__ */ new Set(["flushall", "flushdb"])]
1202
+ ]);
1203
+ var namesDestructiveWordInAnyCase = (name, texts) => {
1204
+ const words = DESTRUCTIVE_WORDS_IN_ANY_CASE_BY_COMMAND.get(name);
1205
+ return words !== void 0 && texts.some((text) => words.has(text.toLowerCase()));
1206
+ };
1207
+ var LONG_OPTION = /^--[A-Za-z]/;
1208
+ var namesDestructiveArgument = (text, destructiveArguments) => destructiveArguments.has(text) || LONG_OPTION.test(text) && [...destructiveArguments].some((argument) => argument.startsWith(text)) || [...SHORT_FLAG_CLUSTER.exec(text)?.[1] ?? ""].some((letter) => destructiveArguments.has(`-${letter}`));
1186
1209
  var RUNNER_SUBCOMMANDS = /* @__PURE__ */ new Set(["exec", "dlx"]);
1187
1210
  var SUBCOMMAND_CLIS = /* @__PURE__ */ new Set([
1188
1211
  "git",
@@ -1360,11 +1383,13 @@ var passesInlineCode = (arg) => {
1360
1383
  };
1361
1384
  var interpreterRunsUnreadableCode = (args) => args.some(passesInlineCode) || args.every((arg) => arg.startsWith("-"));
1362
1385
  var programHidesItsEffect = (program) => SHELL_RESERVED_WORDS.has(program.text) || !program.plain || program.expands || SHELL_ENV_ASSIGNMENT.test(program.text) || !PLAIN_PROGRAM_WORD.test(program.text) || COMMAND_RUNNERS.has(basenameOf(program.text));
1386
+ var destructiveArgumentsOf = (name, args) => DESTRUCTIVE_ARGUMENTS_BY_COMMAND.get(name) ?? DESTRUCTIVE_ARGUMENTS_BY_COMMAND.get(`${name} ${subcommandWordsOf(argsAfterHarmlessGlobalFlags(args))[0]?.text ?? ""}`);
1363
1387
  var argumentsHideTheEffect = (name, args) => {
1364
1388
  const texts = args.map((arg) => arg.text);
1365
1389
  if (INLINE_CODE_INTERPRETERS.has(name.replace(/\d+(?:\.\d+)*$/, "")) && interpreterRunsUnreadableCode(texts)) return true;
1366
- const destructiveFlags = DESTRUCTIVE_FLAGS_BY_PROGRAM.get(name);
1367
- if (destructiveFlags && texts.some((text) => destructiveFlags.has(text))) return true;
1390
+ const destructiveArguments = destructiveArgumentsOf(name, args);
1391
+ if (destructiveArguments && texts.some((text) => namesDestructiveArgument(text, destructiveArguments))) return true;
1392
+ if (namesDestructiveWordInAnyCase(name, texts)) return true;
1368
1393
  if (!SUBCOMMAND_CLIS.has(name)) return false;
1369
1394
  const meaningful = argsAfterHarmlessGlobalFlags(args);
1370
1395
  return (meaningful[0]?.text.startsWith("-") ?? false) || subcommandWordsOf(meaningful).some((word) => word.expands || RUNNER_SUBCOMMANDS.has(word.text));
@@ -2309,17 +2334,21 @@ var elicitationEnum = (property) => {
2309
2334
  var readElicitationFields = (schema) => {
2310
2335
  const record = elicitationRecord(schema);
2311
2336
  const properties = elicitationRecord(record?.properties);
2312
- if (!properties) return null;
2337
+ if (!properties || record?.type !== "object") return null;
2338
+ if (Object.keys(record).some((key) => !["type", "properties", "required", "$schema"].includes(key))) return null;
2339
+ if (record.required !== void 0 && (!Array.isArray(record.required) || !record.required.every((name) => typeof name === "string" && Object.hasOwn(properties, name)))) return null;
2313
2340
  const entries = Object.entries(properties);
2314
2341
  if (entries.length === 0) return null;
2315
2342
  const fields = [];
2316
2343
  for (const [name, raw] of entries) {
2317
2344
  const property = elicitationRecord(raw);
2318
- if (!property) return null;
2345
+ if (!property || !name) return null;
2346
+ if (Object.keys(property).some((key) => !["type", "title", "enum"].includes(key))) return null;
2347
+ if (property.title !== void 0 && typeof property.title !== "string") return null;
2319
2348
  const label = elicitationLabel(name, property);
2320
2349
  if ("enum" in property) {
2321
2350
  const options = elicitationEnum(property);
2322
- if (!options) return null;
2351
+ if (property.type !== "string" || !options || options.some((option) => !option.trim()) || new Set(options).size !== options.length) return null;
2323
2352
  fields.push({ kind: "choice", name, label, options });
2324
2353
  continue;
2325
2354
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  activeHookSource,
3
3
  activeIdentity
4
- } from "./chunk-FI3LQCUH.js";
4
+ } from "./chunk-572FZF7T.js";
5
5
  import {
6
6
  blockedActionFingerprint,
7
7
  defersToNativeMode,
@@ -9,11 +9,11 @@ import {
9
9
  hasBlockedActionHint,
10
10
  recordBlockedActionHint,
11
11
  reportMachineDenial
12
- } from "./chunk-BE4P7ERZ.js";
12
+ } from "./chunk-SD6SAIEV.js";
13
13
  import {
14
14
  isGatingMoment,
15
15
  recordKeylessMoment
16
- } from "./chunk-F4KRNFDE.js";
16
+ } from "./chunk-CH4QMWBM.js";
17
17
  import {
18
18
  denyReasonFrom,
19
19
  isDeferAnswer
@@ -36,7 +36,7 @@ import {
36
36
  reportEvent,
37
37
  scopePathFor,
38
38
  settleQuestionsForToolUse
39
- } from "./chunk-66BIMA62.js";
39
+ } from "./chunk-GKO7T4JM.js";
40
40
  import {
41
41
  DECISION_STOP_REASON,
42
42
  askUser,
@@ -48,10 +48,10 @@ import {
48
48
  requestGate,
49
49
  sendNotification,
50
50
  waitForQuestion
51
- } from "./chunk-PYCQXCI5.js";
51
+ } from "./chunk-LVHGSD5E.js";
52
52
  import {
53
53
  getMachineId
54
- } from "./chunk-7JSE6JTZ.js";
54
+ } from "./chunk-LH2N6VAN.js";
55
55
  import {
56
56
  getApiKey,
57
57
  getBaseUrl
@@ -83,7 +83,7 @@ import {
83
83
  parseAgentQuestions,
84
84
  resolveGate,
85
85
  stoppedOutput
86
- } from "./chunk-YFD7CRIZ.js";
86
+ } from "./chunk-A5ODW52C.js";
87
87
 
88
88
  // src/claude-permission-rules.ts
89
89
  import { readFileSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-YFD7CRIZ.js";
3
+ } from "./chunk-A5ODW52C.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  detectClaudeVersion
3
- } from "./chunk-NDS27FXU.js";
3
+ } from "./chunk-HLY5W2P4.js";
4
4
  import {
5
5
  ensureCodexTrustsPusharyHooks
6
- } from "./chunk-XQOT4CCK.js";
6
+ } from "./chunk-ND43S2N4.js";
7
7
  import {
8
8
  addClaudeMcpServer,
9
9
  addPusharyHooks,
10
10
  addPusharyToolPermissions
11
- } from "./chunk-HWG7X3VI.js";
11
+ } from "./chunk-RK2MUM6Q.js";
12
12
  import {
13
13
  claudeUnprovenHolds,
14
14
  claudeWired,
15
15
  codexUnprovenHolds,
16
16
  codexWired,
17
17
  geminiWired
18
- } from "./chunk-MOQOJOMD.js";
18
+ } from "./chunk-D5PQGC5V.js";
19
19
  import {
20
20
  CLAUDE_HOOK_BINARY,
21
21
  CLAUDE_HOOK_EVENTS,
@@ -27,7 +27,7 @@ import {
27
27
  needsReregistration,
28
28
  registrationSignatures,
29
29
  supportedClaudeEvents
30
- } from "./chunk-BK5F3FGE.js";
30
+ } from "./chunk-HW2M7XAU.js";
31
31
  import {
32
32
  CODEX_HOOK_BINARY,
33
33
  addCodexHookTrust,
@@ -47,7 +47,7 @@ import {
47
47
  registrationHolderOf,
48
48
  resolveGlobalBinary,
49
49
  vscodePluginMcp
50
- } from "./chunk-F2OPOBRO.js";
50
+ } from "./chunk-ON7VIYOQ.js";
51
51
  import {
52
52
  readJsonSafe,
53
53
  writeFileAtomic,
@@ -2,17 +2,17 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-BK5F3FGE.js";
5
+ } from "./chunk-HW2M7XAU.js";
6
6
  import {
7
7
  CODEX_HOOK_EVENTS,
8
8
  hasCodexHooks,
9
9
  holdBudgetOf
10
- } from "./chunk-F2OPOBRO.js";
10
+ } from "./chunk-ON7VIYOQ.js";
11
11
  import {
12
12
  CURSOR_GATE_EVENTS,
13
13
  HOOK_LOCATOR_BINARY,
14
14
  hookCommandHoldBudget
15
- } from "./chunk-YFD7CRIZ.js";
15
+ } from "./chunk-A5ODW52C.js";
16
16
 
17
17
  // src/diagnostics/wiring.ts
18
18
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -2,10 +2,10 @@ import {
2
2
  resolveBinary,
3
3
  resolveGlobalPackageVersion,
4
4
  resolvePackageVersionFromBinary
5
- } from "./chunk-F2OPOBRO.js";
5
+ } from "./chunk-ON7VIYOQ.js";
6
6
  import {
7
7
  MANAGED_PROVIDERS
8
- } from "./chunk-YFD7CRIZ.js";
8
+ } from "./chunk-A5ODW52C.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
  pusharyDir
3
- } from "./chunk-F2OPOBRO.js";
3
+ } from "./chunk-ON7VIYOQ.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-T7E75EKA.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  NOTIFICATION_PUSH_TYPES,
3
3
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
4
- } from "./chunk-VZANUMIF.js";
4
+ } from "./chunk-XINNQCPW.js";
5
5
  import {
6
6
  cancelQuestion,
7
7
  isPolicyConfig,
8
8
  sendNotification,
9
9
  waitForAnswer
10
- } from "./chunk-PYCQXCI5.js";
10
+ } from "./chunk-LVHGSD5E.js";
11
11
  import {
12
12
  getMachineId
13
- } from "./chunk-7JSE6JTZ.js";
13
+ } from "./chunk-LH2N6VAN.js";
14
14
  import {
15
15
  withRetry
16
16
  } from "./chunk-HETOKNIL.js";
17
17
  import {
18
18
  reportedInstallSource
19
- } from "./chunk-VMNI33F5.js";
19
+ } from "./chunk-NSG2Q4PI.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-YFD7CRIZ.js";
47
+ } from "./chunk-A5ODW52C.js";
48
48
 
49
49
  // src/policy.ts
50
50
  import { createHash } from "crypto";
@@ -647,7 +647,7 @@ var MEANING_BY_HOOK = {
647
647
  beforeSubmitPrompt: { kind: "prompt", event: "user_prompt" },
648
648
  preCompact: { kind: "compaction", event: "compaction" },
649
649
  subagentStart: { kind: "session_start", event: "session_begin", action: "Subagent started" },
650
- subagentStop: { kind: "subagent_stop", event: "session_end" }
650
+ subagentStop: { kind: "subagent_stop", event: "notification" }
651
651
  },
652
652
  vscode: {
653
653
  PostToolUse: { kind: "tool", event: "tool_complete" },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseVersion
3
- } from "./chunk-BK5F3FGE.js";
3
+ } from "./chunk-HW2M7XAU.js";
4
4
 
5
5
  // src/setup/agent-probe.ts
6
6
  import { execSync } from "child_process";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  NOTIFICATION_MATCHED_TYPES,
3
3
  POSTTOOLUSE_MIRRORED_TOOLS
4
- } from "./chunk-VZANUMIF.js";
4
+ } from "./chunk-XINNQCPW.js";
5
5
  import {
6
6
  isProtectedByScope,
7
7
  registerHookEntry
8
- } from "./chunk-F2OPOBRO.js";
8
+ } from "./chunk-ON7VIYOQ.js";
9
9
  import {
10
10
  CLAUDE_PRETOOLUSE_MATCHER,
11
11
  HOOK_BUDGETS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-YFD7CRIZ.js";
13
+ } from "./chunk-A5ODW52C.js";
14
14
 
15
15
  // src/gemini-config.ts
16
16
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-YFD7CRIZ.js";
16
+ } from "./chunk-A5ODW52C.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
  autoUpdateState
3
- } from "./chunk-F2OPOBRO.js";
3
+ } from "./chunk-ON7VIYOQ.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeJsonAtomic
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-A5URWZTP.js";
3
+ } from "./chunk-NEUYPY3I.js";
4
4
  import {
5
5
  isBridgeLocator
6
- } from "./chunk-GDXSCXQC.js";
6
+ } from "./chunk-3PDQE66Q.js";
7
7
  import {
8
8
  pusharyHookExecutable
9
- } from "./chunk-MOQOJOMD.js";
9
+ } from "./chunk-D5PQGC5V.js";
10
10
  import {
11
11
  BELL_HOOK_BINARY
12
- } from "./chunk-OR3A3RLH.js";
12
+ } from "./chunk-3HUDBDO7.js";
13
13
 
14
14
  // src/setup/hook-ownership.ts
15
15
  var commandsIn = (value) => {
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-7JSE6JTZ.js";
7
+ } from "./chunk-LH2N6VAN.js";
8
8
  import {
9
9
  pusharyDir,
10
10
  resolveGlobalBinary
11
- } from "./chunk-F2OPOBRO.js";
11
+ } from "./chunk-ON7VIYOQ.js";
12
12
  import {
13
13
  readControlMode
14
- } from "./chunk-TDKE3V6W.js";
14
+ } from "./chunk-RKNA2L2J.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-F2OPOBRO.js";
3
+ } from "./chunk-ON7VIYOQ.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-T7E75EKA.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-B6TYEKJR.js";
3
+ } from "./chunk-SB2CRLFK.js";
4
4
  import {
5
5
  codexHomeFrom
6
- } from "./chunk-F2OPOBRO.js";
6
+ } from "./chunk-ON7VIYOQ.js";
7
7
  import {
8
8
  HOOK_COMPATIBLE_PROFILES
9
- } from "./chunk-YFD7CRIZ.js";
9
+ } from "./chunk-A5ODW52C.js";
10
10
 
11
11
  // src/vscode-config.ts
12
12
  import { homedir } from "os";
@@ -145,6 +145,8 @@ var claimBlockedAction = async (apiKey, request, timeoutMs) => {
145
145
 
146
146
  export {
147
147
  isPolicyConfig,
148
+ isAskUserResponse,
149
+ isWaitForAnswerResponse,
148
150
  DECISION_STOP_REASON,
149
151
  isDecisionStopped,
150
152
  isLocalQuestionHandoff,
@@ -6,16 +6,16 @@ import {
6
6
  } from "./chunk-SGZJ5LYH.js";
7
7
  import {
8
8
  hookOwnerOf
9
- } from "./chunk-KZBGITM4.js";
9
+ } from "./chunk-KKZ5TDTB.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-DZ75BJ7V.js";
12
+ } from "./chunk-KUQF2VO6.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-SFNRAEEW.js";
18
+ } from "./chunk-7REOI7BC.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
@@ -23,14 +23,14 @@ import {
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-GP6SFVEN.js";
26
+ } from "./chunk-5KREBDUT.js";
27
27
  import {
28
28
  codexHome,
29
29
  pusharyDir
30
- } from "./chunk-F2OPOBRO.js";
30
+ } from "./chunk-ON7VIYOQ.js";
31
31
  import {
32
32
  readTranscriptPreference
33
- } from "./chunk-TDKE3V6W.js";
33
+ } from "./chunk-RKNA2L2J.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-T7E75EKA.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-YFD7CRIZ.js";
4
+ } from "./chunk-A5ODW52C.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -6,7 +6,7 @@ import {
6
6
  codexHooksJsonIn,
7
7
  isPusharyCodexCommand,
8
8
  resolvePathBinary
9
- } from "./chunk-F2OPOBRO.js";
9
+ } from "./chunk-ON7VIYOQ.js";
10
10
  import {
11
11
  getPackageVersion
12
12
  } from "./chunk-HWJW3CPO.js";