@pushary/agent-hooks 1.9.166 → 1.9.167

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 (139) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{api-D4SZ2E5J.js → api-7DCJGW6H.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +11 -11
  6. package/dist/bin/pushary-calls.js +15 -15
  7. package/dist/bin/pushary-claude.js +27 -27
  8. package/dist/bin/pushary-clean.js +38 -38
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +36 -36
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +34 -34
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +45 -45
  16. package/dist/bin/pushary-disconnect.js +29 -29
  17. package/dist/bin/pushary-display-hook.js +10 -4
  18. package/dist/bin/pushary-doctor.js +46 -46
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +17 -17
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +36 -36
  23. package/dist/bin/pushary-login.js +22 -22
  24. package/dist/bin/pushary-logout.js +29 -29
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-hook.js +33 -33
  29. package/dist/bin/pushary-permission-denied-hook.js +36 -36
  30. package/dist/bin/pushary-permission-hook.js +36 -36
  31. package/dist/bin/pushary-post-hook.js +28 -28
  32. package/dist/bin/pushary-prompt-hook.js +27 -27
  33. package/dist/bin/pushary-session-end-hook.js +27 -27
  34. package/dist/bin/pushary-session-start-hook.js +38 -38
  35. package/dist/bin/pushary-setup.js +54 -54
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +35 -35
  38. package/dist/bin/pushary-stop-hook.js +27 -27
  39. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  40. package/dist/bin/pushary-suggestions.js +16 -16
  41. package/dist/bin/pushary-transcript-register.js +17 -17
  42. package/dist/bin/pushary-transcripts.js +25 -25
  43. package/dist/bin/pushary-upgrade.js +43 -43
  44. package/dist/bin/pushary-wait.js +16 -16
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-ZB5O3LKY.js → chunk-2MJDREYL.js} +1 -1
  47. package/dist/{chunk-WTUQEQ54.js → chunk-3AICHW2O.js} +6 -6
  48. package/dist/{chunk-X7IIWYAG.js → chunk-3AK7A275.js} +1 -1
  49. package/dist/{chunk-6QLOTNO2.js → chunk-3FQGK5XX.js} +2 -2
  50. package/dist/{chunk-QV5HMBT4.js → chunk-4AYUAZEK.js} +12 -12
  51. package/dist/{chunk-2KZZZ4JK.js → chunk-4Q2BXJKI.js} +3 -3
  52. package/dist/{chunk-GNCFKXQS.js → chunk-4QFWQ337.js} +2 -2
  53. package/dist/{chunk-7TQXWAOZ.js → chunk-57JWFFEI.js} +1 -1
  54. package/dist/{chunk-BOJWXETW.js → chunk-5FYS2WJI.js} +1 -1
  55. package/dist/{chunk-XRAUQWLP.js → chunk-5H7HNGXQ.js} +6 -6
  56. package/dist/{chunk-DFGHHYS5.js → chunk-5HYHDR2D.js} +4 -4
  57. package/dist/{chunk-NUHIGW7H.js → chunk-5WH6NFNY.js} +1 -1
  58. package/dist/{chunk-L4HJSUP7.js → chunk-63TOLXOC.js} +1 -1
  59. package/dist/{chunk-R23ZNBJU.js → chunk-65A5VPDE.js} +6 -6
  60. package/dist/{chunk-SIZBYHXW.js → chunk-6FTP2IGU.js} +4 -4
  61. package/dist/{chunk-MTB52RSH.js → chunk-7FBLMKLW.js} +2 -2
  62. package/dist/{chunk-LFS3PX7S.js → chunk-7JPXLFTJ.js} +4 -4
  63. package/dist/{chunk-7X7ZTLIN.js → chunk-7RTMQPNV.js} +11 -11
  64. package/dist/{chunk-TBDSTEO3.js → chunk-A23GU72F.js} +3 -3
  65. package/dist/{chunk-YLR6QHCH.js → chunk-AB265IBW.js} +6 -6
  66. package/dist/{chunk-A4IK6JTC.js → chunk-AG2WP3R5.js} +4 -4
  67. package/dist/{chunk-2J3IIFS3.js → chunk-B6MT6HZQ.js} +2 -2
  68. package/dist/{chunk-JAE5ULC6.js → chunk-BILK2RDJ.js} +5 -5
  69. package/dist/{chunk-YENSTBQI.js → chunk-C2AXJZNA.js} +1 -1
  70. package/dist/{chunk-7HXO72HS.js → chunk-CGNNCVSC.js} +1 -1
  71. package/dist/{chunk-635I27L4.js → chunk-DHMTIS7B.js} +3 -3
  72. package/dist/{chunk-X6YYQZW7.js → chunk-DRZLGR3F.js} +8 -4
  73. package/dist/{chunk-7WHUMPWM.js → chunk-EEIYR2PU.js} +1 -1
  74. package/dist/{chunk-U6NNLBWJ.js → chunk-EQUF4YXM.js} +5 -5
  75. package/dist/{chunk-7YUKURRZ.js → chunk-FXKXPDQH.js} +1 -1
  76. package/dist/{chunk-7JO3NNIQ.js → chunk-FZLALNEW.js} +2 -2
  77. package/dist/{chunk-7PMCRTPW.js → chunk-G5NBQSB5.js} +3 -3
  78. package/dist/{chunk-3I5IFXHF.js → chunk-G5TR3F6L.js} +1 -1
  79. package/dist/{chunk-X4YQCI5T.js → chunk-GJRRTSKA.js} +1 -1
  80. package/dist/{chunk-3CLLJJJ2.js → chunk-GLPVQBG6.js} +5 -5
  81. package/dist/{chunk-YQ67XWMM.js → chunk-GRBUY5ZC.js} +4 -4
  82. package/dist/{chunk-LDEZYH7Y.js → chunk-GWVT4TQN.js} +10 -10
  83. package/dist/{chunk-ITGM5QW4.js → chunk-GYQER2XO.js} +6 -6
  84. package/dist/{chunk-NCZ7MLNW.js → chunk-H44MW5CL.js} +9 -9
  85. package/dist/{chunk-WIVLMIJ6.js → chunk-HP74S2AZ.js} +4 -4
  86. package/dist/{chunk-ILBNQX44.js → chunk-HR67NNCI.js} +5 -5
  87. package/dist/{chunk-OPN6FWMG.js → chunk-J2SH6BMP.js} +1 -1
  88. package/dist/{chunk-BFMILGSX.js → chunk-JD4PIFZA.js} +3 -3
  89. package/dist/{chunk-L2NGVERQ.js → chunk-JIJVIP6B.js} +1 -1
  90. package/dist/{chunk-NEGPZ3DO.js → chunk-L35WZXWE.js} +2 -2
  91. package/dist/{chunk-NXTAXFQS.js → chunk-L7B5RMS3.js} +8 -8
  92. package/dist/{chunk-NN2RZ2UB.js → chunk-N7IF5QJ5.js} +3 -3
  93. package/dist/{chunk-ZPFENH7C.js → chunk-NA2P74E6.js} +4 -4
  94. package/dist/{chunk-EANTIGY7.js → chunk-NJTMQOLV.js} +1 -1
  95. package/dist/{chunk-JLGZGITL.js → chunk-O7QQO22I.js} +2 -2
  96. package/dist/{chunk-C2PGBMTH.js → chunk-OHB4XCZT.js} +1 -1
  97. package/dist/{chunk-I4BIOADS.js → chunk-OTEHOBCC.js} +4 -4
  98. package/dist/{chunk-IEENAYGT.js → chunk-P4KKTV6I.js} +1 -1
  99. package/dist/{chunk-RZRBXDGN.js → chunk-PI3L74XD.js} +6 -6
  100. package/dist/{chunk-JARCCL3M.js → chunk-PNZ5DTOG.js} +2 -2
  101. package/dist/{chunk-6OBGKICP.js → chunk-PZH43ICC.js} +3 -3
  102. package/dist/{chunk-VDNKX5OF.js → chunk-Q7S6ITE4.js} +5 -5
  103. package/dist/{chunk-UM4RAZPH.js → chunk-QS5A5WBR.js} +1 -1
  104. package/dist/{chunk-IGBKHRCZ.js → chunk-SCJZGEYG.js} +1 -1
  105. package/dist/{chunk-3GWMSKFY.js → chunk-SFMMWJLD.js} +23 -20
  106. package/dist/{chunk-ILGAR7DW.js → chunk-SG45DOSW.js} +2 -2
  107. package/dist/{chunk-67CGCPI4.js → chunk-SMT3YD6D.js} +2 -2
  108. package/dist/{chunk-2FLJZICI.js → chunk-SSPDI2AU.js} +2 -2
  109. package/dist/{chunk-D3KD7K3N.js → chunk-SZYXBY2H.js} +4 -4
  110. package/dist/{chunk-MYN6FNBS.js → chunk-T4LDWOIG.js} +3 -3
  111. package/dist/{chunk-LJSRMA5C.js → chunk-U2LU6NXY.js} +5 -5
  112. package/dist/{chunk-RN4Z5BQJ.js → chunk-U5SZI6GP.js} +3 -3
  113. package/dist/{chunk-ZEPOIQ4H.js → chunk-U6XGBWHB.js} +18 -4
  114. package/dist/{chunk-Y3QV3VYX.js → chunk-UCQJA73V.js} +1 -1
  115. package/dist/{chunk-YORHQJ5M.js → chunk-VFFJSYJQ.js} +4 -4
  116. package/dist/{chunk-TVXGBUOL.js → chunk-XANRM6TE.js} +1 -1
  117. package/dist/{chunk-MN2FFBYE.js → chunk-XG7VMTTL.js} +2 -2
  118. package/dist/{chunk-6ZGXNEBA.js → chunk-XJ23WHWH.js} +5 -5
  119. package/dist/{chunk-NYCN3CCK.js → chunk-XSHGKPWN.js} +1 -1
  120. package/dist/{chunk-OJRX6UVD.js → chunk-Y6QXHWZZ.js} +7 -7
  121. package/dist/{chunk-L54D5IIR.js → chunk-YMO2IWHO.js} +5 -5
  122. package/dist/{chunk-ANMVHKNK.js → chunk-YTWNOHNK.js} +3 -3
  123. package/dist/{chunk-5I34FSSW.js → chunk-Z4RNXOJM.js} +6 -6
  124. package/dist/{chunk-KYBVLSMT.js → chunk-ZOEMN4PT.js} +3 -3
  125. package/dist/{chunk-I2FH4E6H.js → chunk-ZUDFZNBQ.js} +2 -2
  126. package/dist/{codex-app-cards-switch-BOIE5IZL.js → codex-app-cards-switch-MO6URXIW.js} +11 -11
  127. package/dist/{codex-card-routing-B2ZI4WRI.js → codex-card-routing-7C4NT6VL.js} +2 -2
  128. package/dist/{codex-desktop-launch-LBL2LPS7.js → codex-desktop-launch-B57GFBK6.js} +1 -1
  129. package/dist/{codex-session-launch-7WVCWASC.js → codex-session-launch-GOUPFBK5.js} +20 -20
  130. package/dist/{config-S53I5YNR.js → config-KCJBXXFC.js} +3 -3
  131. package/dist/{global-upgrade-ND726NHJ.js → global-upgrade-CX5FWDDN.js} +9 -9
  132. package/dist/{identity-3G66JTAR.js → identity-JMYE6VRO.js} +4 -4
  133. package/dist/{live-capabilities-76C2DKTY.js → live-capabilities-YZFB7SNI.js} +4 -4
  134. package/dist/{paths-O3CZR2BV.js → paths-26C7U354.js} +3 -3
  135. package/dist/{reapply-TEATBGFG.js → reapply-7QZ5CZEH.js} +31 -31
  136. package/dist/src/index.js +35 -35
  137. package/dist/{upgrade-lock-PDCUHFRW.js → upgrade-lock-24S6DVKT.js} +4 -4
  138. package/dist/{usage-DFCL7TQU.js → usage-23YN2SGZ.js} +3 -3
  139. package/package.json +1 -1
@@ -2,39 +2,39 @@ import {
2
2
  forgetPhoneApproval,
3
3
  rememberPhoneApproval,
4
4
  takePhoneApproval
5
- } from "./chunk-JLGZGITL.js";
5
+ } from "./chunk-O7QQO22I.js";
6
6
  import {
7
7
  claudeSettingsLocationFor,
8
8
  readClaudePermissionRules
9
- } from "./chunk-GNCFKXQS.js";
9
+ } from "./chunk-4QFWQ337.js";
10
10
  import {
11
11
  defersToNativeMode
12
- } from "./chunk-TVXGBUOL.js";
12
+ } from "./chunk-XANRM6TE.js";
13
13
  import {
14
14
  askAgentQuestions,
15
15
  outcomeOfFailedAsk,
16
16
  storedWaitDeadline
17
- } from "./chunk-L54D5IIR.js";
17
+ } from "./chunk-YMO2IWHO.js";
18
18
  import {
19
19
  reportMachineDenial
20
- } from "./chunk-RN4Z5BQJ.js";
20
+ } from "./chunk-U5SZI6GP.js";
21
21
  import {
22
22
  isGatingMoment,
23
23
  recordKeylessMoment
24
- } from "./chunk-L2NGVERQ.js";
24
+ } from "./chunk-JIJVIP6B.js";
25
25
  import {
26
26
  isAdmitted,
27
27
  readAdmissionRules
28
- } from "./chunk-3CLLJJJ2.js";
28
+ } from "./chunk-GLPVQBG6.js";
29
29
  import {
30
30
  isDeferAnswer,
31
31
  oncePerSession
32
- } from "./chunk-IEENAYGT.js";
32
+ } from "./chunk-P4KKTV6I.js";
33
33
  import {
34
34
  activeHookSource,
35
35
  activeIdentity,
36
36
  namedSource
37
- } from "./chunk-XRAUQWLP.js";
37
+ } from "./chunk-5H7HNGXQ.js";
38
38
  import {
39
39
  DEFAULT_SESSION,
40
40
  approvalAwaitingRetry,
@@ -57,7 +57,7 @@ import {
57
57
  settleQuestionsForToolUse,
58
58
  sweepFilesOlderThan,
59
59
  userScope
60
- } from "./chunk-QV5HMBT4.js";
60
+ } from "./chunk-4AYUAZEK.js";
61
61
  import {
62
62
  UNNAMED_ACTION,
63
63
  deriveAction,
@@ -68,12 +68,12 @@ import {
68
68
  patchDeletesFiles,
69
69
  permissionDeniedAction,
70
70
  scopePathFor
71
- } from "./chunk-X6YYQZW7.js";
71
+ } from "./chunk-DRZLGR3F.js";
72
72
  import {
73
73
  branchFor,
74
74
  repoKeyFor,
75
75
  repositoryScopeFor
76
- } from "./chunk-C2PGBMTH.js";
76
+ } from "./chunk-OHB4XCZT.js";
77
77
  import {
78
78
  askUser,
79
79
  cancelQuestion,
@@ -90,23 +90,23 @@ import {
90
90
  waitForQuestion,
91
91
  waitsForThePhone,
92
92
  withdrawQuestion
93
- } from "./chunk-RZRBXDGN.js";
93
+ } from "./chunk-PI3L74XD.js";
94
94
  import {
95
95
  getMachineId
96
- } from "./chunk-IGBKHRCZ.js";
96
+ } from "./chunk-SCJZGEYG.js";
97
97
  import {
98
98
  POSTTOOLUSE_MIRRORED_TOOLS
99
- } from "./chunk-MN2FFBYE.js";
99
+ } from "./chunk-XG7VMTTL.js";
100
100
  import {
101
101
  getApiKey,
102
102
  getBaseUrl
103
- } from "./chunk-Y3QV3VYX.js";
103
+ } from "./chunk-UCQJA73V.js";
104
104
  import {
105
105
  writeFileAtomic
106
106
  } from "./chunk-TODDEIYG.js";
107
107
  import {
108
108
  NPX_LATEST_COMMAND
109
- } from "./chunk-BOJWXETW.js";
109
+ } from "./chunk-5FYS2WJI.js";
110
110
  import {
111
111
  AGENT_QUESTION_STRATEGY,
112
112
  AGENT_QUESTION_TOOL,
@@ -155,6 +155,7 @@ import {
155
155
  isBlockedActionRequest,
156
156
  isClaudeRefusalsOnlyTool,
157
157
  isCursorHookPayload,
158
+ isNeverAskedToolOfACatchAllAgent,
158
159
  isPermissionRequestOwnedByPreToolUse,
159
160
  isPusharyConnectorTool,
160
161
  isPusharyOwnOrConnectorTool,
@@ -176,7 +177,7 @@ import {
176
177
  timeoutActionWithoutLocalPrompt,
177
178
  unansweredRefusalReason,
178
179
  unapprovedScopeReason
179
- } from "./chunk-ZEPOIQ4H.js";
180
+ } from "./chunk-U6XGBWHB.js";
180
181
 
181
182
  // src/terminal-answer-watch.ts
182
183
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -866,9 +867,10 @@ var rememberHandbackToThePrompt = (input, heldForMcpRoute, result) => {
866
867
  return result;
867
868
  };
868
869
  var isRefusalsOnlyCallInClaudeCode = (input) => ACTIVE_SOURCE === "claude" && isClaudeRefusalsOnlyTool(input.tool_name);
870
+ var isNeverAskedToolInThisAgent = (input) => ACTIVE_SOURCE !== null && isNeverAskedToolOfACatchAllAgent(ACTIVE_SOURCE, input.tool_name);
869
871
  var STANDING_REFUSAL_NETWORK_BUDGET_MS = 800;
870
872
  var refusalsOnlyOutcomeOf = (toolName) => toolName.startsWith(MCP_TOOL_PREFIX) ? "mcp_tool" : "refusals_only";
871
- var standingRefusalOf = async (input) => {
873
+ var standingRefusalOf = async (input, canonical) => {
872
874
  const noStandingRefusal = refusalsOnlyOutcomeOf(input.tool_name);
873
875
  let apiKey;
874
876
  try {
@@ -885,7 +887,7 @@ var standingRefusalOf = async (input) => {
885
887
  }
886
888
  const policy = answeredLive ? await getPolicyForStandingDenies(apiKey, modeState.policyVersion, ACTIVE_AGENT.type, true, input.session_id, networkBudget) : readCachedPolicy(apiKey, ACTIVE_AGENT.type, true);
887
889
  if (policy === null) return settledAs("undecided", void 0);
888
- const gateInputFor = (toolName) => claudeGateInput(modeState, policy, { ...input, tool_name: toolName });
890
+ const gateInputFor = (toolName) => claudeGateInput(modeState, policy, { ...input, tool_name: toolName }, canonical && { ...canonical, toolName });
889
891
  const asCalled = resolveGate(gateInputFor(input.tool_name));
890
892
  const denied = asCalled.kind === "deny" ? asCalled : standingDenyOfSubagentAlias(input.tool_name, (toolName) => resolveGate(gateInputFor(toolName)));
891
893
  if (denied === void 0) return settledAs(noStandingRefusal, void 0);
@@ -899,6 +901,7 @@ var standingRefusalOf = async (input) => {
899
901
  var decidePreToolUse = async (input, canonical) => {
900
902
  if (PHONE_APPROVAL_SOURCE) forgetPhoneApproval(PHONE_APPROVAL_SOURCE, input);
901
903
  if (isPusharyOwnTool(input.tool_name)) return settledAs("mcp_tool", void 0);
904
+ if (canonical !== null && isNeverAskedToolInThisAgent(input)) return standingRefusalOf(input, canonical);
902
905
  if (isRefusalsOnlyCallInClaudeCode(input) && !mcpCallWaitsForSomeoneElse(input)) {
903
906
  return isPusharyConnectorTool(input.tool_name) ? settledAs("mcp_tool", void 0) : standingRefusalOf(input);
904
907
  }
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autoUpdateLock
3
- } from "./chunk-MN2FFBYE.js";
3
+ } from "./chunk-XG7VMTTL.js";
4
4
  import {
5
5
  installPackageGlobally,
6
6
  npmErrorMessage,
7
7
  throwIfNpmRefusesInstall
8
- } from "./chunk-ZPFENH7C.js";
8
+ } from "./chunk-NA2P74E6.js";
9
9
  import {
10
10
  writeJsonAtomic
11
11
  } from "./chunk-TODDEIYG.js";
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-TBDSTEO3.js";
12
+ } from "./chunk-A23GU72F.js";
13
13
  import {
14
14
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
15
  CODEX_APP_LAUNCH_VARIABLE
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-QCGNGEGE.js";
20
20
  import {
21
21
  xml
22
- } from "./chunk-YLR6QHCH.js";
22
+ } from "./chunk-AB265IBW.js";
23
23
  import {
24
24
  writeFileAtomic
25
25
  } from "./chunk-TODDEIYG.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-MN2FFBYE.js";
6
+ } from "./chunk-XG7VMTTL.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-UQTQ6HPO.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-ZEPOIQ4H.js";
20
+ } from "./chunk-U6XGBWHB.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-NUHIGW7H.js";
3
+ } from "./chunk-5WH6NFNY.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-7WHUMPWM.js";
6
+ } from "./chunk-EEIYR2PU.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-MN2FFBYE.js";
19
+ } from "./chunk-XG7VMTTL.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-ZEPOIQ4H.js";
25
+ } from "./chunk-U6XGBWHB.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-NUHIGW7H.js";
3
+ } from "./chunk-5WH6NFNY.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-YPY4YCIZ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YU2EUD7O.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-BOJWXETW.js";
12
+ } from "./chunk-5FYS2WJI.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-ZEPOIQ4H.js";
20
+ } from "./chunk-U6XGBWHB.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-YORHQJ5M.js";
8
+ } from "./chunk-VFFJSYJQ.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-2J3IIFS3.js";
11
+ } from "./chunk-B6MT6HZQ.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-635I27L4.js";
14
+ } from "./chunk-DHMTIS7B.js";
15
15
  import {
16
16
  findExportedKeyLines,
17
17
  isAdoptedMacAppKey,
@@ -21,10 +21,10 @@ import {
21
21
  readConfigFileKey,
22
22
  readKeySource,
23
23
  readMacAppKeyPrefix
24
- } from "./chunk-KYBVLSMT.js";
24
+ } from "./chunk-ZOEMN4PT.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-ZEPOIQ4H.js";
27
+ } from "./chunk-U6XGBWHB.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -4,15 +4,15 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-QV5HMBT4.js";
7
+ } from "./chunk-4AYUAZEK.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
11
- } from "./chunk-X6YYQZW7.js";
11
+ } from "./chunk-DRZLGR3F.js";
12
12
  import {
13
13
  machineDecisionFor,
14
14
  wireVerdictFor
15
- } from "./chunk-ZEPOIQ4H.js";
15
+ } from "./chunk-U6XGBWHB.js";
16
16
 
17
17
  // src/machine-decision-audit.ts
18
18
  import { basename } from "path";
@@ -532,7 +532,7 @@ var AGENTS = {
532
532
  connectVia: "Native hooks + MCP",
533
533
  setupCommand: PUSHARY_SETUP_COMMAND,
534
534
  enforcementDetail: "Shell, edits and MCP calls through native PreToolUse hooks. Grok's own permission checks still apply after a phone approval.",
535
- capabilityNote: "Grok fails open if it kills a hook or cannot run it. Setup leaves Grok's permission mode unchanged. Native question and plan dialogs stay in Grok; proactive phone questions use Pushary MCP."
535
+ capabilityNote: "Grok's read-only tools (`grep`, `list_dir`, `glob`, `read_file`, `todo_write`, `search_tool`) are never asked about, as Claude Code's reads are not; a rule that denies one still blocks it. Grok fails open if it kills a hook or cannot run it. Setup leaves Grok's permission mode unchanged. Native question and plan dialogs stay in Grok; proactive phone questions use Pushary MCP."
536
536
  },
537
537
  grok_bot: {
538
538
  ...defaults,
@@ -699,11 +699,14 @@ var pathsNamedIn = (record5, keys3) => keys3.flatMap((key) => {
699
699
  var namesOneFile = (paths2, resolvePath) => new Set(paths2.map(resolvePath)).size === 1;
700
700
  var filePathKeysOf = (profile) => [...profile.pathInputKeys, ...CANONICAL_PATH_KEYS];
701
701
  var namesAFilePath = (profile, toolInput) => pathsNamedIn(toolInput, filePathKeysOf(profile)).length > 0;
702
+ var namesTwoValuesForOneKey = (profile, toolInput) => Object.entries(profile.inputKeyAliases).some(([agentKey, canonicalKey]) => toolInput[agentKey] !== void 0 && toolInput[canonicalKey] !== void 0 && toolInput[agentKey] !== toolInput[canonicalKey]);
702
703
  var withCanonicalInputKeys = (profile, toolInput) => {
703
704
  const renamed = Object.entries(profile.inputKeyAliases).flatMap(([agentKey, canonicalKey]) => toolInput[agentKey] === void 0 || toolInput[canonicalKey] !== void 0 ? [] : [[canonicalKey, toolInput[agentKey]]]);
704
705
  return renamed.length === 0 ? toolInput : { ...toolInput, ...Object.fromEntries(renamed) };
705
706
  };
706
707
  var canonicalToolName = (profile, toolName) => profile.toolAliases[toolName] ?? toolName;
708
+ var CATCH_ALL_MATCHER = ".*";
709
+ var sendsEveryToolCall = (profile) => profile.extraMatchers.includes(CATCH_ALL_MATCHER);
707
710
  var TASK_OUTPUT_TOOL = "BashOutput";
708
711
  var TASK_STOP_TOOL = "KillShell";
709
712
  var BLANK_TASK_INPUT_TOOL = "TaskInput";
@@ -748,7 +751,7 @@ var toToolLookup = (profile, toolName, toolInput, resolvePath = (path) => path)
748
751
  if (!command) return { tool, input: toolInput, unreadable: true };
749
752
  return { tool, input: { command, ...shellContextOf(profile, toolInput) }, unreadable: false };
750
753
  }
751
- if (!PATH_TOOLS.has(tool)) return { tool, input: toolInput, unreadable: false };
754
+ if (!PATH_TOOLS.has(tool)) return { tool, input: withCanonicalInputKeys(profile, toolInput), unreadable: namesTwoValuesForOneKey(profile, toolInput) };
752
755
  const paths2 = pathsNamedIn(toolInput, filePathKeysOf(profile));
753
756
  const [filePath] = paths2;
754
757
  if (!filePath || !namesOneFile(paths2, resolvePath)) return { tool, input: toolInput, unreadable: true };
@@ -1085,15 +1088,20 @@ var GROK = {
1085
1088
  search_replace: "Edit",
1086
1089
  apply_patch: "Edit",
1087
1090
  read_file: "Read",
1091
+ grep: "Grep",
1092
+ glob: "Glob",
1093
+ list_dir: "LS",
1094
+ todo_write: "TodoWrite",
1095
+ search_tool: "ToolSearch",
1088
1096
  web_search: "WebSearch",
1089
1097
  web_fetch: "WebFetch",
1090
1098
  spawn_subagent: "Task",
1091
1099
  task_output: "BashOutput",
1092
1100
  kill_task: "KillShell"
1093
1101
  },
1094
- inputKeyAliases: {},
1102
+ inputKeyAliases: { target_directory: "path" },
1095
1103
  extraMatchers: [".*"],
1096
- pathInputKeys: [],
1104
+ pathInputKeys: ["target_file"],
1097
1105
  shellCommandKeys: [],
1098
1106
  shellContextKeys: ["cwd"],
1099
1107
  events: ["PreToolUse", "PostToolUse", "PostToolUseFailure", "Stop", "StopCancelled", "StopFailure", "UserPromptSubmit", "Notification", "SessionStart", "SessionEnd", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact"],
@@ -9430,6 +9438,11 @@ var CLAUDE_SUBAGENT_TOOL_ALIASES = { Task: "Agent", Agent: "Task" };
9430
9438
  var claudeSubagentToolAliasOf = (toolName) => Object.hasOwn(CLAUDE_SUBAGENT_TOOL_ALIASES, toolName) ? CLAUDE_SUBAGENT_TOOL_ALIASES[toolName] : void 0;
9431
9439
  var isPusharyOwnOrConnectorTool = (toolName) => isPusharyOwnTool(toolName) || isPusharyConnectorTool(toolName);
9432
9440
  var isClaudeRefusalsOnlyTool = (toolName) => toolName.startsWith(MCP_TOOL_PREFIX) || CLAUDE_REFUSALS_ONLY_TOOLS.includes(toolName);
9441
+ var TOOLS_NEVER_ASKED_OF_A_CATCH_ALL_AGENT = /* @__PURE__ */ new Set([...CAPABILITY_PATTERNS.read, "TodoWrite", "ToolSearch"]);
9442
+ var isNeverAskedToolOfACatchAllAgent = (source, toolName) => {
9443
+ const profile = hookCompatibleProfileBySource(source);
9444
+ return profile !== void 0 && sendsEveryToolCall(profile) && TOOLS_NEVER_ASKED_OF_A_CATCH_ALL_AGENT.has(canonicalToolName(profile, toolName));
9445
+ };
9433
9446
  var standingDenyOfSubagentAlias = (toolName, verdictFor) => {
9434
9447
  const alias = claudeSubagentToolAliasOf(toolName);
9435
9448
  if (alias === void 0) return void 0;
@@ -10496,6 +10509,7 @@ export {
10496
10509
  CLAUDE_REFUSALS_ONLY_PRETOOLUSE_MATCHER,
10497
10510
  isPusharyOwnOrConnectorTool,
10498
10511
  isClaudeRefusalsOnlyTool,
10512
+ isNeverAskedToolOfACatchAllAgent,
10499
10513
  standingDenyOfSubagentAlias,
10500
10514
  permissionsOffLineAppliesTo,
10501
10515
  permissionsOffAskReason,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-BOJWXETW.js";
3
+ } from "./chunk-5FYS2WJI.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-5I34FSSW.js";
3
+ } from "./chunk-Z4RNXOJM.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-KYBVLSMT.js";
6
+ } from "./chunk-ZOEMN4PT.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-MN2FFBYE.js";
9
+ } from "./chunk-XG7VMTTL.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-TODDEIYG.js";
13
13
  import {
14
14
  isRecord,
15
15
  isValidApiKey
16
- } from "./chunk-ZEPOIQ4H.js";
16
+ } from "./chunk-U6XGBWHB.js";
17
17
 
18
18
  // src/shared-mcp-key.ts
19
19
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldDeferToNativeMode
3
- } from "./chunk-ZEPOIQ4H.js";
3
+ } from "./chunk-U6XGBWHB.js";
4
4
 
5
5
  // src/native-defer.ts
6
6
  var nativeDeferOptions = () => {
@@ -3,7 +3,7 @@ import {
3
3
  formatVersion,
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted
6
- } from "./chunk-ZPFENH7C.js";
6
+ } from "./chunk-NA2P74E6.js";
7
7
  import {
8
8
  writeFileAtomic
9
9
  } from "./chunk-TODDEIYG.js";
@@ -22,7 +22,7 @@ import {
22
22
  PUSHARY_HOSTS,
23
23
  PUSHARY_TOOL_PREFIX,
24
24
  withHookHoldBudget
25
- } from "./chunk-ZEPOIQ4H.js";
25
+ } from "./chunk-U6XGBWHB.js";
26
26
 
27
27
  // src/setup/paths.ts
28
28
  import { createHash as createHash2 } from "crypto";
@@ -3,24 +3,24 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-BFMILGSX.js";
6
+ } from "./chunk-JD4PIFZA.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-YLR6QHCH.js";
13
+ } from "./chunk-AB265IBW.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-IGBKHRCZ.js";
16
+ } from "./chunk-SCJZGEYG.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeySource
20
- } from "./chunk-KYBVLSMT.js";
20
+ } from "./chunk-ZOEMN4PT.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-Y3QV3VYX.js";
23
+ } from "./chunk-UCQJA73V.js";
24
24
  import {
25
25
  getPackageVersion
26
26
  } from "./chunk-UQTQ6HPO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-KYBVLSMT.js";
3
+ } from "./chunk-ZOEMN4PT.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -2,31 +2,31 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-7JO3NNIQ.js";
5
+ } from "./chunk-FZLALNEW.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-2J3IIFS3.js";
8
+ } from "./chunk-B6MT6HZQ.js";
9
9
  import {
10
10
  createIo
11
- } from "./chunk-7HXO72HS.js";
11
+ } from "./chunk-CGNNCVSC.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-635I27L4.js";
17
+ } from "./chunk-DHMTIS7B.js";
18
18
  import {
19
19
  readKeySource
20
- } from "./chunk-KYBVLSMT.js";
20
+ } from "./chunk-ZOEMN4PT.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-Y3QV3VYX.js";
23
+ } from "./chunk-UCQJA73V.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-BG4HHB7E.js";
27
27
  import {
28
28
  KEY_SCOPE
29
- } from "./chunk-ZEPOIQ4H.js";
29
+ } from "./chunk-U6XGBWHB.js";
30
30
 
31
31
  // src/cli/report-key.ts
32
32
  var { dim, yellow } = createIo();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-IEENAYGT.js";
4
+ } from "./chunk-P4KKTV6I.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
@@ -9,13 +9,13 @@ import {
9
9
  isThePersonsStop,
10
10
  waitForOpenQuestion,
11
11
  waitForQuestion
12
- } from "./chunk-RZRBXDGN.js";
12
+ } from "./chunk-PI3L74XD.js";
13
13
  import {
14
14
  SubscriptionRequiredError
15
- } from "./chunk-ILBNQX44.js";
15
+ } from "./chunk-HR67NNCI.js";
16
16
  import {
17
17
  getMachineId
18
- } from "./chunk-IGBKHRCZ.js";
18
+ } from "./chunk-SCJZGEYG.js";
19
19
  import {
20
20
  ASK_CONTEXT_MAX,
21
21
  agentQuestionContext,
@@ -26,7 +26,7 @@ import {
26
26
  parseAgentQuestionAnswers,
27
27
  plainAskOf,
28
28
  questionsShownAsASet
29
- } from "./chunk-ZEPOIQ4H.js";
29
+ } from "./chunk-U6XGBWHB.js";
30
30
 
31
31
  // src/agent-question-ask.ts
32
32
  var ONLY_QUESTION = { index: 0, total: 1 };
@@ -5,13 +5,13 @@ import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-MN2FFBYE.js";
8
+ } from "./chunk-XG7VMTTL.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-ZPFENH7C.js";
11
+ } from "./chunk-NA2P74E6.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-ZEPOIQ4H.js";
14
+ } from "./chunk-U6XGBWHB.js";
15
15
 
16
16
  // src/openclaw/wiring-state.ts
17
17
  var OPENCLAW_PLUGIN_ID = "pushary";
@@ -10,17 +10,17 @@ import {
10
10
  openCodePluginArgv,
11
11
  openCodePluginModule,
12
12
  renderOpenCodePlugin
13
- } from "./chunk-3I5IFXHF.js";
13
+ } from "./chunk-G5TR3F6L.js";
14
14
  import {
15
15
  compatibleConfigFile
16
- } from "./chunk-XRAUQWLP.js";
16
+ } from "./chunk-5H7HNGXQ.js";
17
17
  import {
18
18
  hookOwnerOf,
19
19
  hookOwnerOfCommands
20
- } from "./chunk-D3KD7K3N.js";
20
+ } from "./chunk-SZYXBY2H.js";
21
21
  import {
22
22
  AGENT_CHOICES
23
- } from "./chunk-NUHIGW7H.js";
23
+ } from "./chunk-5WH6NFNY.js";
24
24
  import {
25
25
  OPENCODE_INSTRUCTIONS_LABEL,
26
26
  bridgeStub,
@@ -34,7 +34,7 @@ import {
34
34
  resolveBridgeStub,
35
35
  vscodePluginDir,
36
36
  windowsNodeLauncherFor
37
- } from "./chunk-MN2FFBYE.js";
37
+ } from "./chunk-XG7VMTTL.js";
38
38
  import {
39
39
  readJsonSafe
40
40
  } from "./chunk-TODDEIYG.js";
@@ -44,7 +44,7 @@ import {
44
44
  OPENCODE_APPROVAL_EVENT,
45
45
  hookCompatibleProfile,
46
46
  isRecord
47
- } from "./chunk-ZEPOIQ4H.js";
47
+ } from "./chunk-U6XGBWHB.js";
48
48
 
49
49
  // src/opencode-config.ts
50
50
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-MTB52RSH.js";
3
+ } from "./chunk-7FBLMKLW.js";
4
4
  import {
5
5
  configFilePath
6
- } from "./chunk-Y3QV3VYX.js";
6
+ } from "./chunk-UCQJA73V.js";
7
7
  import {
8
8
  backupFile,
9
9
  readJsonSafe,
@@ -14,7 +14,7 @@ import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord,
16
16
  isValidApiKey
17
- } from "./chunk-ZEPOIQ4H.js";
17
+ } from "./chunk-U6XGBWHB.js";
18
18
 
19
19
  // src/shell-alias.ts
20
20
  import { homedir } from "os";
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-MN2FFBYE.js";
10
+ } from "./chunk-XG7VMTTL.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-ZPFENH7C.js";
13
+ } from "./chunk-NA2P74E6.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-UQTQ6HPO.js";