pushary 1.9.119 → 1.9.121
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.
- package/CHANGELOG.md +13 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +13 -2
- package/data/vscode-plugin/scripts/pushary-gate.mjs +12 -1
- package/dist/{api-WWB7ZOLK.js → api-RI52IA65.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +43 -43
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +36 -36
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +44 -44
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +33 -33
- package/dist/bin/pushary-hook.js +33 -33
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +30 -30
- package/dist/bin/pushary-permission-denied-hook.js +33 -33
- package/dist/bin/pushary-permission-hook.js +33 -33
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +35 -35
- package/dist/bin/pushary-setup.js +90 -90
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +43 -43
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-Z3OG44Z4.js → chunk-2A4X4ETF.js} +4 -4
- package/dist/{chunk-R3RTISDD.js → chunk-2M7FELUY.js} +1 -1
- package/dist/{chunk-SE7P5BBK.js → chunk-2QWQCU7L.js} +1 -1
- package/dist/{chunk-NVV3YUTX.js → chunk-3HZ374VU.js} +2 -2
- package/dist/{chunk-TZYVXTLN.js → chunk-4LR27PGD.js} +1 -1
- package/dist/{chunk-EFFH2FYG.js → chunk-5CMNZXJV.js} +2 -2
- package/dist/{chunk-SQRS4IF2.js → chunk-5MITA7MU.js} +3 -3
- package/dist/{chunk-PJSFKKZ5.js → chunk-5S32WI3B.js} +1 -1
- package/dist/{chunk-XBH6OKHD.js → chunk-5UT5EFMH.js} +3 -3
- package/dist/{chunk-VRZOUCIK.js → chunk-6LP6G2NA.js} +2 -2
- package/dist/{chunk-YZESBU7F.js → chunk-6RME4X3J.js} +151 -6
- package/dist/{chunk-ISVHV2DP.js → chunk-7EYXAM63.js} +1 -1
- package/dist/{chunk-GBVTVTDF.js → chunk-7FDDOT2A.js} +1 -1
- package/dist/{chunk-KVDN4U6W.js → chunk-7FH6T4EN.js} +10 -10
- package/dist/{chunk-GW3PE52Q.js → chunk-7OSBFMRV.js} +1 -1
- package/dist/{chunk-TLCJCP5R.js → chunk-AH4NLZTT.js} +1 -1
- package/dist/{chunk-ZLUAXGAA.js → chunk-AXSAL7DK.js} +4 -4
- package/dist/{chunk-G5FQU2XF.js → chunk-B3KFHR43.js} +6 -6
- package/dist/{chunk-7CJ7W2RH.js → chunk-BMME65OT.js} +4 -4
- package/dist/{chunk-JKS4MN47.js → chunk-BPU6P3DS.js} +6 -6
- package/dist/{chunk-JJNF6QU4.js → chunk-BVI2N7QA.js} +1 -1
- package/dist/{chunk-DXJUASTS.js → chunk-D2LPVOG5.js} +2 -2
- package/dist/{chunk-ZTVBM3EZ.js → chunk-DLXYQE5G.js} +4 -4
- package/dist/{chunk-U32N5JZO.js → chunk-E5LU5MJ2.js} +1 -1
- package/dist/{chunk-6KX2H4I5.js → chunk-EVWF3A5D.js} +3 -3
- package/dist/{chunk-5HKU4VUL.js → chunk-F4K2A7DJ.js} +3 -3
- package/dist/{chunk-K5WTTEIQ.js → chunk-F5FMUDD7.js} +5 -5
- package/dist/{chunk-PNSIMPC7.js → chunk-FBJHC7HW.js} +6 -6
- package/dist/{chunk-2C45MJGK.js → chunk-FEJP2I44.js} +13 -6
- package/dist/{chunk-SNKC2IQZ.js → chunk-FG67GH5B.js} +2 -2
- package/dist/{chunk-CBLFIWPI.js → chunk-GZ3D46PV.js} +12 -6
- package/dist/{chunk-MYNLU6DV.js → chunk-H2OUB5S5.js} +2 -2
- package/dist/{chunk-TRDHHF3A.js → chunk-HI5YJFKW.js} +74 -10
- package/dist/{chunk-4HDX77ND.js → chunk-HINZZUOB.js} +3 -3
- package/dist/{chunk-GAOUWLYN.js → chunk-HLZWEGW3.js} +3 -3
- package/dist/{chunk-67I7QRQB.js → chunk-IA3E675D.js} +1 -1
- package/dist/{chunk-XNCKBVZX.js → chunk-IEZXEY7L.js} +5 -5
- package/dist/{chunk-KOZBVXXC.js → chunk-IGMI36FA.js} +3 -3
- package/dist/{chunk-V52J2THT.js → chunk-IZ7MIGO7.js} +1 -1
- package/dist/{chunk-FPG7X2GS.js → chunk-J7WPO2M2.js} +4 -4
- package/dist/{chunk-BQ673OOD.js → chunk-JK7GROFO.js} +2 -2
- package/dist/{chunk-YCCLWG7G.js → chunk-JY2DOJKN.js} +6 -6
- package/dist/{chunk-CXIYGD33.js → chunk-KRKH26TX.js} +2 -2
- package/dist/{chunk-HYTDNEXV.js → chunk-LIIIC27B.js} +1 -1
- package/dist/{chunk-2UE2NDCX.js → chunk-LS3CQ536.js} +1 -1
- package/dist/{chunk-VFZ2PE6U.js → chunk-N47MAVYX.js} +3 -3
- package/dist/{chunk-VMM6JCNQ.js → chunk-NCHNITQW.js} +2 -2
- package/dist/{chunk-PDAOZ2NF.js → chunk-NDOT226I.js} +10 -10
- package/dist/{chunk-UHAUC7EO.js → chunk-NLEHRQHL.js} +2 -2
- package/dist/{chunk-AGXOTZID.js → chunk-O7VVRTOR.js} +5 -5
- package/dist/{chunk-NASQPMXW.js → chunk-QK4I4CHR.js} +9 -9
- package/dist/{chunk-4SZM2HRA.js → chunk-RI5APNBY.js} +6 -6
- package/dist/{chunk-W5ZUDPKV.js → chunk-RK7QHQTY.js} +5 -5
- package/dist/{chunk-SSBETUYZ.js → chunk-S6TMCUU7.js} +3 -3
- package/dist/{chunk-EISUEJDT.js → chunk-SFMJMQJC.js} +6 -6
- package/dist/{chunk-W6LKC5YD.js → chunk-SQPAX33Q.js} +5 -5
- package/dist/{chunk-YZ7V2LVG.js → chunk-SZV5SLSD.js} +3 -3
- package/dist/{chunk-RIAELZYW.js → chunk-T2WDQ3NT.js} +2 -2
- package/dist/{chunk-KILSIJTF.js → chunk-TZHTLLXJ.js} +53 -16
- package/dist/{chunk-4D23TNCL.js → chunk-UI7XS3MN.js} +4 -4
- package/dist/{chunk-RGXFBS56.js → chunk-UIHY3ANL.js} +3 -3
- package/dist/{chunk-B7BOENW7.js → chunk-UV2JM3PZ.js} +1 -1
- package/dist/{chunk-6YLVNFQZ.js → chunk-VUNQZNKR.js} +3 -3
- package/dist/{chunk-3IESC326.js → chunk-W4OWC34V.js} +3 -3
- package/dist/{chunk-EP6I3MQY.js → chunk-WJUFRGJS.js} +4 -4
- package/dist/{chunk-R67NTMBY.js → chunk-WS37PSC5.js} +8 -8
- package/dist/{chunk-MEPYLTWF.js → chunk-WSYWK4I3.js} +10 -10
- package/dist/{chunk-3B7S2H4R.js → chunk-X2PN3XNW.js} +1 -1
- package/dist/{chunk-G4OVFWU4.js → chunk-X4CDZLUK.js} +46 -28
- package/dist/{chunk-COXNQUDP.js → chunk-XOYPF2BI.js} +4 -4
- package/dist/{chunk-5T5T4YXM.js → chunk-Z7FUHJKU.js} +1 -1
- package/dist/{chunk-L3MCQSES.js → chunk-ZQHT57AL.js} +5 -5
- package/dist/{codex-app-cards-switch-J6EULXO5.js → codex-app-cards-switch-MEVTS3QV.js} +12 -12
- package/dist/{codex-card-routing-XNJB6573.js → codex-card-routing-JTZ2PC24.js} +2 -2
- package/dist/{codex-desktop-launch-46ELENBQ.js → codex-desktop-launch-E5TZ72YZ.js} +1 -1
- package/dist/{codex-session-launch-R5FHFWAG.js → codex-session-launch-UMVQ7FJA.js} +18 -18
- package/dist/{config-RKWDMDRY.js → config-43UOHCK6.js} +3 -3
- package/dist/{global-upgrade-E65GJQS6.js → global-upgrade-KHVTFNAK.js} +9 -9
- package/dist/{identity-JRGY2KS6.js → identity-DAUTKB5X.js} +4 -4
- package/dist/{live-capabilities-SOO6PD7Y.js → live-capabilities-T2FOTXAH.js} +4 -4
- package/dist/{paths-G7NZODAY.js → paths-W5X4C6PA.js} +3 -3
- package/dist/{reapply-YKN5BKIP.js → reapply-WW4LJZUD.js} +28 -28
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +32 -32
- package/dist/{upgrade-lock-YKAZI3BH.js → upgrade-lock-TJBGZLH6.js} +4 -4
- package/dist/{usage-QWYNOIU6.js → usage-MUXR5SZ7.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_CODE_AGENT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X4CDZLUK.js";
|
|
4
4
|
import {
|
|
5
5
|
addGeminiMcpServer,
|
|
6
6
|
removeGeminiMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XOYPF2BI.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7OSBFMRV.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GZ3D46PV.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HI5YJFKW.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -56,6 +56,150 @@ var serializeConfigDocument = (value, format) => format === "toml" ? stringify(v
|
|
|
56
56
|
// src/compatible-config.ts
|
|
57
57
|
import { homedir } from "os";
|
|
58
58
|
import { join } from "path";
|
|
59
|
+
|
|
60
|
+
// ../contracts/src/agent-enforcement.ts
|
|
61
|
+
var TOOL_CALL_BLOCK = {
|
|
62
|
+
beforeMatchedCalls: "before_matched_calls",
|
|
63
|
+
whenAgentAsks: "when_agent_asks",
|
|
64
|
+
cannotBlock: "cannot_block"
|
|
65
|
+
};
|
|
66
|
+
var LOCAL_PROMPT = {
|
|
67
|
+
agentsOwnPrompt: "agents_own_prompt",
|
|
68
|
+
variesByEvent: "varies_by_event",
|
|
69
|
+
refusalInstead: "refusal_instead",
|
|
70
|
+
noHook: "no_hook"
|
|
71
|
+
};
|
|
72
|
+
var HOOK_FAILURE = {
|
|
73
|
+
agentsOwnApproval: "agents_own_approval",
|
|
74
|
+
variesByEvent: "varies_by_event",
|
|
75
|
+
refusedOnPosix: "refused_on_posix",
|
|
76
|
+
notVerifiableInThisRepo: "not_verifiable_in_this_repo",
|
|
77
|
+
noHook: "no_hook"
|
|
78
|
+
};
|
|
79
|
+
var NO_HOOK_NOTHING_GATED = "Everything. There is no hook, so the agent only reaches a person when it chooses to call Pushary.";
|
|
80
|
+
var NO_HOOK = {
|
|
81
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.cannotBlock,
|
|
82
|
+
phoneCanAnswerTheBlock: false,
|
|
83
|
+
localPrompt: LOCAL_PROMPT.noHook,
|
|
84
|
+
whenHookIsMissing: HOOK_FAILURE.noHook,
|
|
85
|
+
whenHookCrashes: HOOK_FAILURE.noHook,
|
|
86
|
+
gatedTools: [],
|
|
87
|
+
notGated: NO_HOOK_NOTHING_GATED
|
|
88
|
+
};
|
|
89
|
+
var HOOK_DECIDES_BEFORE_THE_CALL = {
|
|
90
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.beforeMatchedCalls,
|
|
91
|
+
phoneCanAnswerTheBlock: true
|
|
92
|
+
};
|
|
93
|
+
var FAILS_TO_THE_AGENTS_OWN_APPROVAL = {
|
|
94
|
+
whenHookIsMissing: HOOK_FAILURE.agentsOwnApproval,
|
|
95
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval
|
|
96
|
+
};
|
|
97
|
+
var CLAUDE_SHAPED_GATED_TOOLS = ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "mcp__.*"];
|
|
98
|
+
var CLAUDE_SHAPED_NOT_GATED = "Any tool outside the matcher, such as reads, searches and web fetches. Those only reach a person if this agent raises its own prompt and it sends PermissionRequest.";
|
|
99
|
+
var COMPATIBLE_HOOK_AGENT = {
|
|
100
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
101
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
102
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
103
|
+
gatedTools: CLAUDE_SHAPED_GATED_TOOLS,
|
|
104
|
+
notGated: CLAUDE_SHAPED_NOT_GATED
|
|
105
|
+
};
|
|
106
|
+
var AGENT_ENFORCEMENT = {
|
|
107
|
+
claude_code: {
|
|
108
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
109
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
110
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
111
|
+
gatedTools: ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "AskUserQuestion", "ExitPlanMode"],
|
|
112
|
+
notGated: "Reads, searches, WebFetch, WebSearch, Task, TodoWrite and third-party MCP tools reach a person only through PermissionRequest, when Claude Code would have asked anyway. In plan, auto and dontAsk modes PreToolUse steps aside unless a scope question or a Team route applies. It also steps aside for edits under acceptEdits and for calls that a Claude Code allowlist rule owns. Under bypassPermissions no opinion means the call runs."
|
|
113
|
+
},
|
|
114
|
+
codex: {
|
|
115
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
116
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
117
|
+
localPrompt: LOCAL_PROMPT.variesByEvent,
|
|
118
|
+
gatedTools: ["Bash", "apply_patch", "mcp__.*", "request_user_input", "request_user_input_async"],
|
|
119
|
+
notGated: "Any other tool, and every hook until Codex trusts it. PreToolUse can only deny; a hand-back there is refused, and only PermissionRequest falls through to the Codex prompt. With the auto_review approvals reviewer, or when a native mode defers the call, the hook passes it ungated unless a scope question applies. Under bypass no opinion means the call runs."
|
|
120
|
+
},
|
|
121
|
+
gemini_cli: {
|
|
122
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
123
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
124
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
125
|
+
gatedTools: ["run_shell_command", "write_file", "replace", "mcp_.*"],
|
|
126
|
+
notGated: "read_file and every other built-in tool outside the BeforeTool matcher. The wire has no ask, so a hand-back is empty output, a Gemini running without prompts then runs the call, and a bridge-launched session, which has no prompt, is refused instead."
|
|
127
|
+
},
|
|
128
|
+
cursor: {
|
|
129
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
130
|
+
localPrompt: LOCAL_PROMPT.variesByEvent,
|
|
131
|
+
whenHookIsMissing: HOOK_FAILURE.variesByEvent,
|
|
132
|
+
whenHookCrashes: HOOK_FAILURE.variesByEvent,
|
|
133
|
+
gatedTools: ["Shell", "MCP:*", "Write", "Delete", "Edit"],
|
|
134
|
+
notGated: "beforeReadFile is deliberately not registered, so file reads are not gated. preToolUse has no ask, so a file edit nobody can decide is refused where shell and MCP fall back to the Cursor prompt."
|
|
135
|
+
},
|
|
136
|
+
vscode: {
|
|
137
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
138
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
139
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
140
|
+
gatedTools: [".*"],
|
|
141
|
+
notGated: "Pushary's own tools. Every other named tool reaches the policy, and a read-only tool passes when the gate has no verdict."
|
|
142
|
+
},
|
|
143
|
+
opencode: {
|
|
144
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.whenAgentAsks,
|
|
145
|
+
phoneCanAnswerTheBlock: true,
|
|
146
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
147
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
148
|
+
gatedTools: ["bash", "edit", "webfetch"],
|
|
149
|
+
notGated: "Anything OpenCode does not raise as permission.asked. A person's own allow rule for bash, edit or webfetch is kept, and then those are not held either."
|
|
150
|
+
},
|
|
151
|
+
hermes: {
|
|
152
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.whenAgentAsks,
|
|
153
|
+
phoneCanAnswerTheBlock: true,
|
|
154
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
155
|
+
whenHookIsMissing: HOOK_FAILURE.notVerifiableInThisRepo,
|
|
156
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval,
|
|
157
|
+
gatedTools: [],
|
|
158
|
+
notGated: "Everything Hermes does not flag as a dangerous command, unless named in PUSHARY_GATE_TOOLS, which is empty by default. That list refuses on an error, while the approval transport hands back to Hermes."
|
|
159
|
+
},
|
|
160
|
+
qwen_code: COMPATIBLE_HOOK_AGENT,
|
|
161
|
+
codebuddy: COMPATIBLE_HOOK_AGENT,
|
|
162
|
+
qoder: COMPATIBLE_HOOK_AGENT,
|
|
163
|
+
droid: {
|
|
164
|
+
...COMPATIBLE_HOOK_AGENT,
|
|
165
|
+
notGated: "Any tool outside the matcher, such as reads, searches and web fetches. Droid registers no PermissionRequest, so those never reach a person through Pushary."
|
|
166
|
+
},
|
|
167
|
+
devin: {
|
|
168
|
+
...COMPATIBLE_HOOK_AGENT,
|
|
169
|
+
localPrompt: LOCAL_PROMPT.refusalInstead,
|
|
170
|
+
gatedTools: [...CLAUDE_SHAPED_GATED_TOOLS, "mcp_call_tool", "write_to_process"],
|
|
171
|
+
notGated: "Any tool outside the matcher, such as reads, searches and web fetches. Devin registers no PermissionRequest, so those never reach a person through Pushary. Its wire turns an ask into a block."
|
|
172
|
+
},
|
|
173
|
+
antigravity_cli: {
|
|
174
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
175
|
+
localPrompt: LOCAL_PROMPT.refusalInstead,
|
|
176
|
+
whenHookIsMissing: HOOK_FAILURE.refusedOnPosix,
|
|
177
|
+
whenHookCrashes: HOOK_FAILURE.notVerifiableInThisRepo,
|
|
178
|
+
gatedTools: ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "call_mcp_tool", "manage_task"],
|
|
179
|
+
notGated: "view_file, read_url_content, search_web, list_resources and read_resource. Deleting the hook entry leaves always-proceed on with nothing watching, and the hook-file guard only covers a missing binary, and not on Windows. A caught error is refused, but nothing here shows what agy does when the hook process dies or exits non-zero."
|
|
180
|
+
},
|
|
181
|
+
grok: {
|
|
182
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
183
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
184
|
+
whenHookIsMissing: HOOK_FAILURE.refusedOnPosix,
|
|
185
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval,
|
|
186
|
+
gatedTools: [".*"],
|
|
187
|
+
notGated: "Nothing at the matcher, but Grok fails open if it kills the hook or cannot start it, the missing-binary guard does not refuse on Windows, and Grok's own permission checks still apply after a phone approval. Its question and plan dialogs stay in Grok."
|
|
188
|
+
},
|
|
189
|
+
claude_chat: NO_HOOK,
|
|
190
|
+
claude_cowork: NO_HOOK,
|
|
191
|
+
chatgpt: NO_HOOK,
|
|
192
|
+
fx: NO_HOOK,
|
|
193
|
+
cline: NO_HOOK,
|
|
194
|
+
grok_bot: NO_HOOK,
|
|
195
|
+
windsurf: NO_HOOK,
|
|
196
|
+
unknown: NO_HOOK,
|
|
197
|
+
lovable: NO_HOOK,
|
|
198
|
+
mcp: NO_HOOK,
|
|
199
|
+
http: NO_HOOK
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// src/compatible-config.ts
|
|
59
203
|
var hasCompatibleMcpServer = (profile, contents) => {
|
|
60
204
|
if (!profile.mcp) return false;
|
|
61
205
|
const document = parseConfigDocument(contents, profile.mcp.file.format);
|
|
@@ -210,7 +354,8 @@ var commandFor = (profile, definition, resolve) => {
|
|
|
210
354
|
return withHookHoldBudget(command, holdBudgetOf(definition));
|
|
211
355
|
};
|
|
212
356
|
var writesBareHandler = (profile, definition) => profile.nonToolEntries === "handler" && !TOOL_MATCHED_EVENTS.has(definition.event);
|
|
213
|
-
var
|
|
357
|
+
var refusesWhenHookIsMissing = (profile, definition) => definition.delivery === "approval" && AGENT_ENFORCEMENT[profile.agentType].whenHookIsMissing === HOOK_FAILURE.refusedOnPosix;
|
|
358
|
+
var guardFor = (profile, definition, path) => refusesWhenHookIsMissing(profile, definition) ? guardBinaryRefusing(path, refusalOutput(profile, pusharyMissingReason(profile))) : guardBinary(path);
|
|
214
359
|
var entryFor = (profile, definition, resolve) => {
|
|
215
360
|
const handler = { type: "command", command: commandFor(profile, definition, resolve), timeout: definition.timeout };
|
|
216
361
|
if (writesBareHandler(profile, definition)) return handler;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3HZ374VU.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
7
7
|
installHermesPlugin,
|
|
8
8
|
refreshHermesPluginFiles,
|
|
9
9
|
shippedHermesPlugin
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-F4K2A7DJ.js";
|
|
11
11
|
import {
|
|
12
12
|
fxIgnoresInstructionsFile,
|
|
13
13
|
fxInstructionsBody,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
macAppFxBridge,
|
|
17
17
|
refreshClineKey,
|
|
18
18
|
switchFxHttpEntryToBridge
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-F5FMUDD7.js";
|
|
20
20
|
import {
|
|
21
21
|
OPENCODE_HOOK_BINARY,
|
|
22
22
|
agentHookOwner,
|
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
openCodePluginDir,
|
|
29
29
|
openCodeWired,
|
|
30
30
|
withOpenCodeAskRules
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-O7VVRTOR.js";
|
|
32
32
|
import {
|
|
33
33
|
detectClaudeVersion
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KRKH26TX.js";
|
|
35
35
|
import {
|
|
36
36
|
addCompatibleHooks,
|
|
37
37
|
compatibleConfigFile,
|
|
38
38
|
compatibleInstructionsFile,
|
|
39
39
|
hasCompatibleHooks
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6RME4X3J.js";
|
|
41
41
|
import {
|
|
42
42
|
GEMINI_HOOK_BINARY,
|
|
43
43
|
addGeminiHooks,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
geminiWired,
|
|
50
50
|
hasGeminiHooks,
|
|
51
51
|
planHooks
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-XOYPF2BI.js";
|
|
53
53
|
import {
|
|
54
54
|
CLAUDE_HOOK_BINARY,
|
|
55
55
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -95,13 +95,13 @@ import {
|
|
|
95
95
|
renderAgentInstructions,
|
|
96
96
|
supportedClaudeEvents,
|
|
97
97
|
vscodePluginMcp
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-GZ3D46PV.js";
|
|
99
99
|
import {
|
|
100
100
|
formatVersion,
|
|
101
101
|
hookCommandsUseBareNames,
|
|
102
102
|
resolveGlobalBinDir,
|
|
103
103
|
resolveGlobalBinary
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-IGMI36FA.js";
|
|
105
105
|
import {
|
|
106
106
|
readJsonSafe,
|
|
107
107
|
writeFileAtomic,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
HOOK_COMPATIBLE_PROFILES,
|
|
112
112
|
isCompatibleAgentType,
|
|
113
113
|
isRecord
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-HI5YJFKW.js";
|
|
115
115
|
|
|
116
116
|
// src/reapply.ts
|
|
117
117
|
import { dirname, join } from "path";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UNNAMED_ACTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7OSBFMRV.js";
|
|
4
4
|
import {
|
|
5
5
|
askUser,
|
|
6
6
|
isAwayPaused,
|
|
7
7
|
isLocalQuestionHandoff,
|
|
8
8
|
unavailableQuestionUnlessRefused,
|
|
9
9
|
waitForQuestion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QK4I4CHR.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4LR27PGD.js";
|
|
14
14
|
import {
|
|
15
15
|
hookWaitClamped,
|
|
16
16
|
hookWaitDeadline,
|
|
17
17
|
scopeBreachReasonOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HI5YJFKW.js";
|
|
19
19
|
|
|
20
20
|
// src/pushed-question.ts
|
|
21
21
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
|
-
CODEX_APP_LAUNCH_VARIABLE
|
|
16
|
-
} from "./chunk-E46NE7FB.js";
|
|
12
|
+
} from "./chunk-HLZWEGW3.js";
|
|
17
13
|
import {
|
|
18
14
|
writeHuman
|
|
19
15
|
} from "./chunk-QCGNGEGE.js";
|
|
20
16
|
import {
|
|
21
17
|
xml
|
|
22
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SFMJMQJC.js";
|
|
23
19
|
import {
|
|
24
20
|
writeFileAtomic
|
|
25
21
|
} from "./chunk-T5I4PKOQ.js";
|
|
22
|
+
import {
|
|
23
|
+
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
24
|
+
CODEX_APP_LAUNCH_VARIABLE
|
|
25
|
+
} from "./chunk-E46NE7FB.js";
|
|
26
26
|
|
|
27
27
|
// src/codex-app-cards-switch.ts
|
|
28
28
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
reachVerdict,
|
|
13
13
|
reachesYou,
|
|
14
14
|
verifyDelivery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JY2DOJKN.js";
|
|
16
16
|
import {
|
|
17
17
|
humanIsTty,
|
|
18
18
|
writeHuman
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
} from "./chunk-FO3MDD26.js";
|
|
25
25
|
import {
|
|
26
26
|
reportedInstallSource
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NCHNITQW.js";
|
|
28
28
|
import {
|
|
29
29
|
NPX_LATEST_COMMAND
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-5S32WI3B.js";
|
|
31
31
|
import {
|
|
32
32
|
NO_PAIRING_COMPUTER,
|
|
33
33
|
PAIR_TTL_SECONDS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-HI5YJFKW.js";
|
|
35
35
|
|
|
36
36
|
// src/onboarding.ts
|
|
37
37
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5CMNZXJV.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S6TMCUU7.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,25 +18,25 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-H2OUB5S5.js";
|
|
22
22
|
import {
|
|
23
23
|
autoUpdateLock,
|
|
24
24
|
autoUpdateLog,
|
|
25
25
|
autoUpdateState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GZ3D46PV.js";
|
|
27
27
|
import {
|
|
28
28
|
execNpm,
|
|
29
29
|
fetchLatestPublishedVersion,
|
|
30
30
|
npmErrorMessage,
|
|
31
31
|
readGlobalCliInstallAt,
|
|
32
32
|
readGlobalPrefix
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-IGMI36FA.js";
|
|
34
34
|
import {
|
|
35
35
|
EXIT
|
|
36
36
|
} from "./chunk-BG4HHB7E.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5S32WI3B.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZ3D46PV.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HI5YJFKW.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O7VVRTOR.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-ROVLRXBI.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6RME4X3J.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GZ3D46PV.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HI5YJFKW.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSseMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SQPAX33Q.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchAsCredential
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E5LU5MJ2.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5S32WI3B.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp-stdio-bridge.ts
|
|
12
12
|
var MCP_BRIDGE_BINARY = "pushary-mcp";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
hermesAppWiringRecord,
|
|
6
6
|
hermesConfigReceipt,
|
|
7
7
|
hermesSetupReceipt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GZ3D46PV.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IGMI36FA.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeJsonAtomic
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-ZVU6WMMU.js";
|
|
20
20
|
import {
|
|
21
21
|
isRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HI5YJFKW.js";
|
|
23
23
|
|
|
24
24
|
// src/hermes/plugin-payload.ts
|
|
25
25
|
import { createHash } from "crypto";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5UT5EFMH.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EVWF3A5D.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SZV5SLSD.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GZ3D46PV.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IGMI36FA.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NLEHRQHL.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JK7GROFO.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "./chunk-FO3MDD26.js";
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HINZZUOB.js";
|
|
18
18
|
import {
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SZV5SLSD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2M7FELUY.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-BG4HHB7E.js";
|
|
27
27
|
import {
|
|
28
28
|
KEY_SCOPE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HI5YJFKW.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/report-key.ts
|
|
32
32
|
var { dim, yellow } = createIo();
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WJUFRGJS.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NDOT226I.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6RME4X3J.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QK4I4CHR.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HI5YJFKW.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -32,9 +32,16 @@ function isToolHookInput(value) {
|
|
|
32
32
|
}
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
|
+
function withoutNullOptionalText(value) {
|
|
36
|
+
const present = { ...value };
|
|
37
|
+
for (const field of OPTIONAL_TEXT_FIELDS) {
|
|
38
|
+
if (present[field] === null) delete present[field];
|
|
39
|
+
}
|
|
40
|
+
return present;
|
|
41
|
+
}
|
|
35
42
|
function parseToolHookInput(value) {
|
|
36
43
|
if (!isInputRecord(value)) return null;
|
|
37
|
-
const input = { ...value, tool_input: value.tool_input === void 0 ? {} : value.tool_input };
|
|
44
|
+
const input = { ...withoutNullOptionalText(value), tool_input: value.tool_input === void 0 ? {} : value.tool_input };
|
|
38
45
|
return isToolHookInput(input) ? input : null;
|
|
39
46
|
}
|
|
40
47
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZ3D46PV.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-T5I4PKOQ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HI5YJFKW.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|