@pushary/agent-hooks 0.98.0 → 1.0.0
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 +24 -0
- package/dist/bin/pushary-bell-hook.js +20 -19
- package/dist/bin/pushary-bell.js +7 -6
- package/dist/bin/pushary-claude.js +24 -25
- package/dist/bin/pushary-clean.js +61 -18
- package/dist/bin/pushary-codex-bridge.js +11 -10
- package/dist/bin/pushary-codex-hook.js +43 -35
- package/dist/bin/pushary-codex.js +7 -7
- package/dist/bin/pushary-connect.js +7 -6
- package/dist/bin/pushary-cowork.js +3 -3
- package/dist/bin/pushary-daemon.js +24 -23
- package/dist/bin/pushary-disconnect.js +48 -7
- package/dist/bin/pushary-doctor.js +61 -21
- package/dist/bin/pushary-elicitation-hook.js +19 -18
- package/dist/bin/pushary-gemini-bridge.js +10 -9
- package/dist/bin/pushary-gemini-hook.js +27 -28
- package/dist/bin/pushary-hook.js +63 -34
- package/dist/bin/pushary-login.js +8 -7
- package/dist/bin/pushary-logout.js +5 -4
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +28 -22
- package/dist/bin/pushary-opencode-hook.js +29 -30
- package/dist/bin/pushary-permission-denied-hook.js +26 -24
- package/dist/bin/pushary-permission-hook.js +34 -25
- package/dist/bin/pushary-post-hook.js +32 -23
- package/dist/bin/pushary-prompt-hook.js +28 -22
- package/dist/bin/pushary-session-end-hook.js +28 -22
- package/dist/bin/pushary-session-start-hook.js +32 -26
- package/dist/bin/pushary-setup.js +146 -37
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +11 -10
- package/dist/bin/pushary-stop-hook.js +29 -23
- package/dist/bin/pushary-stopfailure-hook.js +28 -22
- package/dist/bin/pushary-transcript-register.js +18 -17
- package/dist/bin/pushary-transcripts.js +6 -5
- package/dist/bin/pushary-upgrade.js +15 -14
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-HFQ7WSHZ.js → chunk-2PS3DTHQ.js} +7 -4
- package/dist/{chunk-W2MG2P46.js → chunk-2SL5X7UB.js} +9 -6
- package/dist/{chunk-53QCTSWY.js → chunk-3C4ERARU.js} +4 -4
- package/dist/{chunk-LBNAGGLV.js → chunk-3UUAK2AK.js} +3 -2
- package/dist/{chunk-V47GITZV.js → chunk-447SBIC7.js} +15 -2
- package/dist/{chunk-VZD2GEKB.js → chunk-4LL6LG5X.js} +1 -43
- package/dist/{chunk-WU6LSXJ6.js → chunk-7WMFPYR5.js} +2 -2
- package/dist/{chunk-XPPXOKIG.js → chunk-7ZDFVWRR.js} +1 -1
- package/dist/chunk-A3D43VXO.js +44 -0
- package/dist/{chunk-3RVCQDC4.js → chunk-BOZETFXB.js} +1 -1
- package/dist/{chunk-LX4NNYII.js → chunk-BPD4P3NN.js} +2 -2
- package/dist/{chunk-IRLTW6KF.js → chunk-CDTGL7TT.js} +1 -1
- package/dist/{chunk-CP34FI4B.js → chunk-D2N2EJH2.js} +2 -2
- package/dist/{chunk-J44RPHUZ.js → chunk-DMJTWULU.js} +2 -2
- package/dist/{chunk-SJLGOVC6.js → chunk-DOYARIYB.js} +4 -2
- package/dist/{chunk-XOOWC62T.js → chunk-DUOG74E7.js} +1 -1
- package/dist/{chunk-OPR2BPD4.js → chunk-EMCNSBF3.js} +1 -1
- package/dist/{chunk-5KLAETSU.js → chunk-GTR72MIU.js} +1 -1
- package/dist/{chunk-5B5QV3KC.js → chunk-HGEI7SVM.js} +8 -8
- package/dist/chunk-HS2KEAFD.js +224 -0
- package/dist/{chunk-6CYB77VD.js → chunk-I3TWY7GH.js} +30 -29
- package/dist/{chunk-NQGYPTJQ.js → chunk-IBU7UU3R.js} +1 -1
- package/dist/{chunk-M4TVEMLH.js → chunk-IWZG2Y4Z.js} +1 -1
- package/dist/{chunk-TZHDKRMG.js → chunk-IYA3NCZG.js} +2 -2
- package/dist/{chunk-XL3RKJYQ.js → chunk-LTPQKBJH.js} +65 -30
- package/dist/{chunk-YJDRHQLG.js → chunk-MDV7ZRAT.js} +698 -43
- package/dist/{chunk-QXIF6R4P.js → chunk-MGI6MLFU.js} +16 -16
- package/dist/{chunk-DOD3A6EU.js → chunk-MSOFZYI3.js} +4 -4
- package/dist/{chunk-JQU6PMH4.js → chunk-R744XA2M.js} +62 -45
- package/dist/{chunk-FAJ4R7IB.js → chunk-RFNMSC6N.js} +1 -1
- package/dist/{chunk-NIXVMMJM.js → chunk-S2W4ZSHE.js} +1 -1
- package/dist/{chunk-OUAE3GKO.js → chunk-TTBRBWAK.js} +278 -1
- package/dist/{chunk-6C6MS57P.js → chunk-TVY7AT6O.js} +1 -1
- package/dist/{chunk-2GLOHBYB.js → chunk-UWQVODHT.js} +1 -1
- package/dist/{chunk-6LRGZJFB.js → chunk-XK34HTMW.js} +10 -6
- package/dist/{chunk-SI7GYBQP.js → chunk-XKDKUFMP.js} +1 -1
- package/dist/{chunk-HB2KB7QL.js → chunk-XNXIMIFY.js} +1 -1
- package/dist/{chunk-K6CH5NVW.js → chunk-Y55JNI2I.js} +1 -1
- package/dist/{chunk-OBYC6SN4.js → chunk-YKLCWWEI.js} +1 -1
- package/dist/{chunk-B35OCFXH.js → chunk-ZZIUQVAN.js} +4 -4
- package/dist/reapply-I4NB5SSM.js +30 -0
- package/dist/src/index.js +13 -10
- package/package.json +1 -1
- package/dist/chunk-A76GNRIK.js +0 -608
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
Run `pushary setup` and tick the agents you use. Five more are on the list: Qwen Code, CodeBuddy, Qoder, Droid and Devin CLI. Nothing changes for an agent you already had wired.
|
|
6
|
+
|
|
7
|
+
- Gate five more agents on their own hooks, not on good intentions. Qwen Code, CodeBuddy, Qoder, Droid and Devin CLI each register the same events Claude Code does, in the file and the spelling that agent uses, and each returns a verdict that agent obeys. Shell commands, writes and edits go through your policy and your phone the same way they always have. Twelve agents are now enforced rather than cooperative.
|
|
8
|
+
- Devin answers in its own dialect. It reads `{"decision":"approve"|"block"}` where the others read Claude's `permissionDecision`, so the verdict is written the way each agent reads it. A stop from your phone carries across both: it ends the turn rather than declining one tool call and letting the next one through.
|
|
9
|
+
- Two tools are deliberately not claimed on Devin. A question answered on your phone comes back as rewritten input, and Devin's reply shape has nowhere to put it, so asking there would tell the agent "approved" and hand it the question you already answered. Pushary stands aside instead, and Devin asks you itself.
|
|
10
|
+
- Read the file out of a patch before judging it. Droid edits by sending a patch rather than a path, and a rule written for a file cannot match a patch body. A single-file patch is now resolved to the file it touches, so `Edit(**/.env)` denies it. A patch over several files is not judged at all and goes back to the agent to ask, because one answer cannot cover several files honestly.
|
|
11
|
+
- Never judge a call whose target cannot be read. If a tool names its file under a key Pushary does not recognise, the only rule that could match is the one written for the tool alone, and that is always the looser one. Pushary now says it has no opinion and lets the agent ask you, rather than approving on a rule that was never meant for that file.
|
|
12
|
+
- Leave a config alone when it is not the shape Pushary knows. These are five other vendors' files. Where a hook list is something other than a list, setup now names the key, changes nothing and reports the agent as skipped, instead of replacing what it found. It already refused to rewrite a file that would not parse; this is the same care for a file that parses and is simply shaped differently.
|
|
13
|
+
- Keep the directory a shell command names. An approval card that said `rm -rf *` without saying where it ran was describing a different command than the one about to happen.
|
|
14
|
+
|
|
15
|
+
These five rest on each vendor's documentation and our own round trip; no vendor binary was installed to confirm them. If setup reports one as skipped, that is the check above doing its job, and the message names the key it did not recognise.
|
|
16
|
+
|
|
17
|
+
## 0.99.0
|
|
18
|
+
|
|
19
|
+
Nothing to run. This release is the part that runs itself: the repairs below happen on the next session start, on the machine that already has them wrong.
|
|
20
|
+
|
|
21
|
+
- Switch on a hold that an older release registered without its proof. `PermissionDenied` and Codex's `Stop` hold only when their registration carries `--hold-budget`, and a registration written before 0.97.0 is present and looks correct, so nothing noticed it had stopped holding. Until now the repair was `pushary upgrade`, run by hand. Claude Code's registration is now checked on every session start whether or not Claude Code itself has changed, and Codex's is checked on its own session start, which had no repair of any kind before this. An auto-mode block or an auto-reviewer denial can be answered again without anyone being told to run a command.
|
|
22
|
+
- Hooks the macOS app wrote are still left to the app, on both agents. It repairs its own, and rewriting them here would point them at a binary the app does not install.
|
|
23
|
+
- Read a hold budget that is not this release's as no proof, which is what the Mac app has always done. `pushary doctor` says a hook "carries no current hold budget" rather than that it predates one, because now it can mean either.
|
|
24
|
+
- Never replace an absolute path in a hook command with a bare name. When the bin directory cannot be found, which is what a GUI-launched agent or an nvm switch does to `npm prefix -g`, the rewrite is refused and the registration you already have is left alone. A hold that does not hold still works less well than it should; a hook command that no longer resolves does nothing at all, and the rewrite touches every event at once. `pushary upgrade` is a person at a prompt and is unchanged.
|
|
25
|
+
- Write Codex's `config.toml` atomically, carrying its permissions over. It is now written from a session-start hook, and two sessions starting at once must not leave it half written. An atomic write replaces the file rather than its bytes, so the mode is copied across by hand: this file holds your API key, Codex creates it private to you, and it stays that way.
|
|
26
|
+
|
|
3
27
|
## 0.98.0
|
|
4
28
|
|
|
5
29
|
Run `pushary setup` so the instruction block in Codex's AGENTS.md, GEMINI.md and OpenCode's AGENTS.md carries the new line. `pushary upgrade` rewrites hooks and trust, not instruction files.
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-S2W4ZSHE.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-IWZG2Y4Z.js";
|
|
8
|
+
import "../chunk-HGEI7SVM.js";
|
|
9
|
+
import "../chunk-YKLCWWEI.js";
|
|
10
|
+
import "../chunk-2SL5X7UB.js";
|
|
11
|
+
import "../chunk-3UUAK2AK.js";
|
|
12
|
+
import "../chunk-CDTGL7TT.js";
|
|
13
|
+
import "../chunk-XK34HTMW.js";
|
|
14
|
+
import "../chunk-MSOFZYI3.js";
|
|
15
|
+
import "../chunk-2PS3DTHQ.js";
|
|
16
|
+
import "../chunk-UWQVODHT.js";
|
|
17
|
+
import "../chunk-7ZDFVWRR.js";
|
|
18
18
|
import "../chunk-EQRS3SGM.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-IBU7UU3R.js";
|
|
20
20
|
import "../chunk-XHKBHWLX.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-EMCNSBF3.js";
|
|
22
|
+
import "../chunk-7WMFPYR5.js";
|
|
23
|
+
import "../chunk-LTPQKBJH.js";
|
|
24
24
|
import "../chunk-GMXKITVA.js";
|
|
25
25
|
import "../chunk-DINDL2CF.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-DOYARIYB.js";
|
|
27
27
|
import "../chunk-7QLSKOSU.js";
|
|
28
28
|
import "../chunk-KZERVKTD.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-A3D43VXO.js";
|
|
30
|
+
import "../chunk-4LL6LG5X.js";
|
|
30
31
|
import "../chunk-2UMNXADU.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-TTBRBWAK.js";
|
|
32
33
|
|
|
33
34
|
// bin/pushary-bell-hook.ts
|
|
34
35
|
var main = async () => {
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-S2W4ZSHE.js";
|
|
9
9
|
import {
|
|
10
10
|
addBellHooks,
|
|
11
11
|
bellInstalled,
|
|
12
12
|
removeBellHooks
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-UWQVODHT.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeSettings
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-LTPQKBJH.js";
|
|
17
17
|
import {
|
|
18
18
|
createIo
|
|
19
19
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -25,17 +25,18 @@ import {
|
|
|
25
25
|
parseFlags
|
|
26
26
|
} from "../chunk-GMXKITVA.js";
|
|
27
27
|
import "../chunk-DINDL2CF.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-DOYARIYB.js";
|
|
29
29
|
import "../chunk-7QLSKOSU.js";
|
|
30
30
|
import {
|
|
31
31
|
EXIT
|
|
32
32
|
} from "../chunk-KZERVKTD.js";
|
|
33
|
+
import "../chunk-A3D43VXO.js";
|
|
33
34
|
import {
|
|
34
35
|
readJsonSafe,
|
|
35
36
|
writeJsonAtomic
|
|
36
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-4LL6LG5X.js";
|
|
37
38
|
import "../chunk-2UMNXADU.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-TTBRBWAK.js";
|
|
39
40
|
|
|
40
41
|
// bin/pushary-bell.ts
|
|
41
42
|
exitOnHelpFlag("bell");
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
describeIdleWindow,
|
|
9
9
|
startProcessOwnership,
|
|
10
10
|
withSpawnProcessOwnership
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-DMJTWULU.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer
|
|
14
14
|
} from "../chunk-YHG74UFF.js";
|
|
@@ -17,30 +17,33 @@ import {
|
|
|
17
17
|
loadSessionKey,
|
|
18
18
|
registerTranscript,
|
|
19
19
|
registeredTranscriptEnabled
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-HGEI7SVM.js";
|
|
21
|
+
import "../chunk-YKLCWWEI.js";
|
|
22
|
+
import "../chunk-2SL5X7UB.js";
|
|
23
|
+
import "../chunk-3UUAK2AK.js";
|
|
24
|
+
import "../chunk-CDTGL7TT.js";
|
|
25
|
+
import "../chunk-XK34HTMW.js";
|
|
26
26
|
import {
|
|
27
27
|
ensureDaemonRunning
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-MSOFZYI3.js";
|
|
29
|
+
import "../chunk-2PS3DTHQ.js";
|
|
30
|
+
import "../chunk-UWQVODHT.js";
|
|
31
31
|
import {
|
|
32
32
|
encryptRecord
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-7ZDFVWRR.js";
|
|
34
34
|
import "../chunk-EQRS3SGM.js";
|
|
35
35
|
import {
|
|
36
36
|
transcriptsEnabled
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-IBU7UU3R.js";
|
|
38
38
|
import {
|
|
39
39
|
needsShell,
|
|
40
40
|
spawnClaude
|
|
41
41
|
} from "../chunk-XHKBHWLX.js";
|
|
42
42
|
import {
|
|
43
43
|
DEFAULT_SESSION,
|
|
44
|
+
UNNAMED_ACTION,
|
|
45
|
+
deriveToolTarget,
|
|
46
|
+
describeToolCall,
|
|
44
47
|
fetchModeState,
|
|
45
48
|
getPolicy,
|
|
46
49
|
markPendingCommandDelivered,
|
|
@@ -51,15 +54,10 @@ import {
|
|
|
51
54
|
removePendingCommand,
|
|
52
55
|
repoKeyFor,
|
|
53
56
|
reportEvent,
|
|
54
|
-
savePendingCommand
|
|
55
|
-
} from "../chunk-YJDRHQLG.js";
|
|
56
|
-
import {
|
|
57
|
-
UNNAMED_ACTION,
|
|
58
|
-
deriveToolTarget,
|
|
59
|
-
describeToolCall,
|
|
57
|
+
savePendingCommand,
|
|
60
58
|
scopePathFor
|
|
61
|
-
} from "../chunk-
|
|
62
|
-
import "../chunk-
|
|
59
|
+
} from "../chunk-MDV7ZRAT.js";
|
|
60
|
+
import "../chunk-EMCNSBF3.js";
|
|
63
61
|
import {
|
|
64
62
|
DECISION_STOP_REASON,
|
|
65
63
|
askUser,
|
|
@@ -72,16 +70,17 @@ import {
|
|
|
72
70
|
} from "../chunk-LGXUGYUH.js";
|
|
73
71
|
import {
|
|
74
72
|
getMachineId
|
|
75
|
-
} from "../chunk-
|
|
76
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-7WMFPYR5.js";
|
|
74
|
+
import "../chunk-LTPQKBJH.js";
|
|
77
75
|
import "../chunk-GMXKITVA.js";
|
|
78
76
|
import "../chunk-DINDL2CF.js";
|
|
79
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-DOYARIYB.js";
|
|
80
78
|
import "../chunk-EYRGBYZG.js";
|
|
81
79
|
import "../chunk-SAF6HGAA.js";
|
|
82
80
|
import "../chunk-7QLSKOSU.js";
|
|
83
81
|
import "../chunk-KZERVKTD.js";
|
|
84
|
-
import "../chunk-
|
|
82
|
+
import "../chunk-A3D43VXO.js";
|
|
83
|
+
import "../chunk-4LL6LG5X.js";
|
|
85
84
|
import {
|
|
86
85
|
getApiKey,
|
|
87
86
|
getBaseUrl
|
|
@@ -90,7 +89,7 @@ import {
|
|
|
90
89
|
KILL_REASON,
|
|
91
90
|
redactSecrets,
|
|
92
91
|
resolveGate
|
|
93
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-TTBRBWAK.js";
|
|
94
93
|
|
|
95
94
|
// src/wrapper/localPassthrough.ts
|
|
96
95
|
var SIGNAL_NUMBERS = {
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
createGuards,
|
|
6
6
|
resolveHermesPython,
|
|
7
7
|
runHermesPythonScript
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-RFNMSC6N.js";
|
|
9
9
|
import "../chunk-KBITFQST.js";
|
|
10
10
|
import {
|
|
11
11
|
removeInstructionBlock,
|
|
12
12
|
shortenHome,
|
|
13
13
|
unregisterPluginLocation,
|
|
14
14
|
vscodeSettingsTargets
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-447SBIC7.js";
|
|
16
16
|
import {
|
|
17
17
|
OPENCODE_PLUGIN_SIBLING,
|
|
18
18
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -22,35 +22,45 @@ import {
|
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodePluginFile,
|
|
24
24
|
removeOpenCodeMcpServer
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-XNXIMIFY.js";
|
|
26
|
+
import {
|
|
27
|
+
compatibleConfigFile,
|
|
28
|
+
compatibleInstructionsFile,
|
|
29
|
+
compatibleMcpFile,
|
|
30
|
+
compatiblePermissionRuleFile,
|
|
31
|
+
removeCompatibleHooks,
|
|
32
|
+
removeCompatibleMcpServer
|
|
33
|
+
} from "../chunk-HS2KEAFD.js";
|
|
26
34
|
import {
|
|
27
35
|
isClaudeMcpSnapshot,
|
|
28
36
|
removeClaudeMcpServers,
|
|
29
37
|
removePusharySettings,
|
|
38
|
+
removePusharyToolPermissions,
|
|
30
39
|
restoreClaudeMcpServer
|
|
31
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-MGI6MLFU.js";
|
|
32
41
|
import {
|
|
33
42
|
hookOwnerOf,
|
|
34
43
|
isHookTakeoverReceipt,
|
|
35
44
|
restoreHookTakeover,
|
|
36
45
|
restoreMcpServer
|
|
37
|
-
} from "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-2SL5X7UB.js";
|
|
47
|
+
import "../chunk-3UUAK2AK.js";
|
|
48
|
+
import "../chunk-CDTGL7TT.js";
|
|
40
49
|
import {
|
|
41
50
|
pusharyHookExecutable
|
|
42
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-XK34HTMW.js";
|
|
43
52
|
import {
|
|
44
53
|
disableDaemonService
|
|
45
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-MSOFZYI3.js";
|
|
46
55
|
import {
|
|
47
56
|
removeGeminiSettings
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
57
|
+
} from "../chunk-2PS3DTHQ.js";
|
|
58
|
+
import "../chunk-UWQVODHT.js";
|
|
50
59
|
import "../chunk-XHKBHWLX.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-MDV7ZRAT.js";
|
|
61
|
+
import "../chunk-EMCNSBF3.js";
|
|
62
|
+
import "../chunk-LGXUGYUH.js";
|
|
63
|
+
import "../chunk-7WMFPYR5.js";
|
|
54
64
|
import {
|
|
55
65
|
bridgeAgentKey,
|
|
56
66
|
claudeJson,
|
|
@@ -79,7 +89,7 @@ import {
|
|
|
79
89
|
restoreCodexHookTrust,
|
|
80
90
|
vscodePluginDir,
|
|
81
91
|
vscodePluginMcp
|
|
82
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-LTPQKBJH.js";
|
|
83
93
|
import {
|
|
84
94
|
exitOnHelpFlag
|
|
85
95
|
} from "../chunk-GOQHN2UH.js";
|
|
@@ -90,18 +100,22 @@ import {
|
|
|
90
100
|
import "../chunk-DINDL2CF.js";
|
|
91
101
|
import {
|
|
92
102
|
removeClaudeAlias
|
|
93
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-DOYARIYB.js";
|
|
104
|
+
import "../chunk-EYRGBYZG.js";
|
|
105
|
+
import "../chunk-SAF6HGAA.js";
|
|
94
106
|
import "../chunk-7QLSKOSU.js";
|
|
95
107
|
import {
|
|
96
108
|
EXIT
|
|
97
109
|
} from "../chunk-KZERVKTD.js";
|
|
98
|
-
import "../chunk-
|
|
110
|
+
import "../chunk-A3D43VXO.js";
|
|
111
|
+
import "../chunk-4LL6LG5X.js";
|
|
99
112
|
import "../chunk-2UMNXADU.js";
|
|
100
113
|
import {
|
|
101
114
|
CURSOR_GATE_EVENTS,
|
|
115
|
+
HOOK_COMPATIBLE_PROFILES,
|
|
102
116
|
HOOK_LOCATOR_BINARY,
|
|
103
117
|
isValidApiKey
|
|
104
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-TTBRBWAK.js";
|
|
105
119
|
|
|
106
120
|
// bin/pushary-clean.ts
|
|
107
121
|
import { existsSync, readFileSync, copyFileSync, readdirSync } from "fs";
|
|
@@ -550,6 +564,35 @@ var main = async () => {
|
|
|
550
564
|
} else {
|
|
551
565
|
console.log(` ${skip} Codex skill directory ${dim("(not found)")}`);
|
|
552
566
|
}
|
|
567
|
+
for (const profile of HOOK_COMPATIBLE_PROFILES) {
|
|
568
|
+
const edits = [
|
|
569
|
+
[compatibleConfigFile(profile), (config) => removeCompatibleHooks(config, profile)],
|
|
570
|
+
...compatibleMcpFile(profile) ? [[compatibleMcpFile(profile), (config) => removeCompatibleMcpServer(config, profile)]] : [],
|
|
571
|
+
...compatiblePermissionRuleFile(profile) ? [[compatiblePermissionRuleFile(profile), removePusharyToolPermissions]] : []
|
|
572
|
+
];
|
|
573
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
574
|
+
for (const [path, edit] of edits) byPath.set(path, [...byPath.get(path) ?? [], edit]);
|
|
575
|
+
for (const [path, removals] of byPath) {
|
|
576
|
+
const config = readJson(path);
|
|
577
|
+
if (!config) {
|
|
578
|
+
console.log(` ${skip} ${profile.label} ${shortenHome(path)} ${dim("(not found)")}`);
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
581
|
+
if (removals.reduce((changed, remove) => remove(config) || changed, false)) {
|
|
582
|
+
writeJson(path, config);
|
|
583
|
+
console.log(` ${check} ${profile.label} ${shortenHome(path)} ${dim(did("cleaned"))}`);
|
|
584
|
+
} else {
|
|
585
|
+
console.log(` ${skip} ${profile.label} ${shortenHome(path)} ${dim("(no pushary entries)")}`);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
const instructions = compatibleInstructionsFile(profile);
|
|
589
|
+
if (!instructions) continue;
|
|
590
|
+
if (guardedInstructionBlockRemoval(instructions)) {
|
|
591
|
+
console.log(` ${check} ${profile.label} ${shortenHome(instructions)} ${dim("(removed Pushary block)")}`);
|
|
592
|
+
} else {
|
|
593
|
+
console.log(` ${skip} ${profile.label} ${shortenHome(instructions)} ${dim("(no pushary block)")}`);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
553
596
|
const geminiSettingsPath = geminiSettings();
|
|
554
597
|
const geminiSettings2 = readJson(geminiSettingsPath);
|
|
555
598
|
if (geminiSettings2) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-IYA3NCZG.js";
|
|
3
3
|
import {
|
|
4
4
|
LiveTranscriptRelay,
|
|
5
5
|
liveSessionSleep,
|
|
6
6
|
postLiveSession,
|
|
7
7
|
postLiveSessionUntilAccepted,
|
|
8
8
|
startLiveSessionHeartbeat
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-GTR72MIU.js";
|
|
10
10
|
import {
|
|
11
11
|
SESSION_IDLE_TIMEOUT_MS,
|
|
12
12
|
describeIdleWindow,
|
|
13
13
|
idleDeadlinePassed,
|
|
14
14
|
startProcessOwnership,
|
|
15
15
|
withSpawnProcessOwnership
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-DMJTWULU.js";
|
|
17
|
+
import "../chunk-7ZDFVWRR.js";
|
|
18
18
|
import "../chunk-EQRS3SGM.js";
|
|
19
19
|
import {
|
|
20
20
|
transcriptsEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-IBU7UU3R.js";
|
|
22
22
|
import {
|
|
23
23
|
spawnClaude
|
|
24
24
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -28,18 +28,19 @@ import {
|
|
|
28
28
|
} from "../chunk-LGXUGYUH.js";
|
|
29
29
|
import {
|
|
30
30
|
getMachineId
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-7WMFPYR5.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveBinary
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-LTPQKBJH.js";
|
|
35
|
+
import "../chunk-DOYARIYB.js";
|
|
36
36
|
import {
|
|
37
37
|
callMcpTool
|
|
38
38
|
} from "../chunk-EYRGBYZG.js";
|
|
39
39
|
import "../chunk-SAF6HGAA.js";
|
|
40
40
|
import "../chunk-7QLSKOSU.js";
|
|
41
41
|
import "../chunk-KZERVKTD.js";
|
|
42
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-A3D43VXO.js";
|
|
43
|
+
import "../chunk-4LL6LG5X.js";
|
|
43
44
|
import {
|
|
44
45
|
getApiKey,
|
|
45
46
|
getBaseUrl
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
import {
|
|
48
49
|
parseAgentQuestion,
|
|
49
50
|
parseAgentQuestionAnswers
|
|
50
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-TTBRBWAK.js";
|
|
51
52
|
|
|
52
53
|
// bin/pushary-codex-bridge.ts
|
|
53
54
|
import { existsSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
takeHookHoldBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XKDKUFMP.js";
|
|
5
5
|
import {
|
|
6
6
|
blockedActionFingerprint,
|
|
7
7
|
codexCallKey,
|
|
@@ -12,38 +12,44 @@ import {
|
|
|
12
12
|
recordBlockedActionHint,
|
|
13
13
|
recordCodexCallDecision,
|
|
14
14
|
userScope
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-3C4ERARU.js";
|
|
16
16
|
import {
|
|
17
17
|
isGatingMoment,
|
|
18
18
|
recordKeylessMoment
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-DUOG74E7.js";
|
|
20
20
|
import {
|
|
21
21
|
readHookInput
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-IWZG2Y4Z.js";
|
|
23
23
|
import {
|
|
24
24
|
denyReasonFrom,
|
|
25
25
|
isDeferAnswer
|
|
26
26
|
} from "../chunk-YHG74UFF.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-HGEI7SVM.js";
|
|
28
|
+
import "../chunk-YKLCWWEI.js";
|
|
29
|
+
import "../chunk-2SL5X7UB.js";
|
|
30
|
+
import "../chunk-3UUAK2AK.js";
|
|
31
|
+
import "../chunk-CDTGL7TT.js";
|
|
32
|
+
import "../chunk-XK34HTMW.js";
|
|
33
|
+
import "../chunk-MSOFZYI3.js";
|
|
34
|
+
import "../chunk-2PS3DTHQ.js";
|
|
35
|
+
import "../chunk-UWQVODHT.js";
|
|
36
|
+
import "../chunk-7ZDFVWRR.js";
|
|
37
37
|
import "../chunk-EQRS3SGM.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-IBU7UU3R.js";
|
|
39
39
|
import "../chunk-XHKBHWLX.js";
|
|
40
40
|
import {
|
|
41
41
|
CODEX_AGENT,
|
|
42
42
|
DEFAULT_SESSION,
|
|
43
|
+
UNNAMED_ACTION,
|
|
43
44
|
codexAllow,
|
|
44
45
|
codexDeny,
|
|
45
46
|
codexPass,
|
|
47
|
+
codexReviewerDenialsSince,
|
|
48
|
+
deriveActionBody,
|
|
49
|
+
deriveBlocker,
|
|
50
|
+
deriveToolTarget,
|
|
46
51
|
describeApplyPatch,
|
|
52
|
+
describeToolCall,
|
|
47
53
|
fetchModeState,
|
|
48
54
|
getPolicy,
|
|
49
55
|
handleCompaction,
|
|
@@ -52,30 +58,22 @@ import {
|
|
|
52
58
|
handleStop,
|
|
53
59
|
handleSubagentStop,
|
|
54
60
|
handleUserPrompt,
|
|
61
|
+
isCodexGuardianRolloutHead,
|
|
55
62
|
permissionTimeoutDecision,
|
|
56
63
|
policyRequestFor,
|
|
57
64
|
preToolUseTimeoutDecision,
|
|
65
|
+
readCodexTurnContext,
|
|
58
66
|
readLastPrompt,
|
|
59
67
|
repoKeyFor,
|
|
60
68
|
reportEvent,
|
|
69
|
+
scanCodexGuardianReviews,
|
|
70
|
+
scopePathFor,
|
|
71
|
+
sessionIdentityOf,
|
|
61
72
|
toCodexWire,
|
|
62
73
|
toPolicyLookup,
|
|
63
74
|
toPolicyLookups
|
|
64
|
-
} from "../chunk-
|
|
65
|
-
import
|
|
66
|
-
UNNAMED_ACTION,
|
|
67
|
-
codexReviewerDenialsSince,
|
|
68
|
-
deriveActionBody,
|
|
69
|
-
deriveBlocker,
|
|
70
|
-
deriveToolTarget,
|
|
71
|
-
describeToolCall,
|
|
72
|
-
isCodexGuardianRolloutHead,
|
|
73
|
-
readCodexTurnContext,
|
|
74
|
-
scanCodexGuardianReviews,
|
|
75
|
-
scopePathFor,
|
|
76
|
-
sessionIdentityOf
|
|
77
|
-
} from "../chunk-A76GNRIK.js";
|
|
78
|
-
import "../chunk-OPR2BPD4.js";
|
|
75
|
+
} from "../chunk-MDV7ZRAT.js";
|
|
76
|
+
import "../chunk-EMCNSBF3.js";
|
|
79
77
|
import {
|
|
80
78
|
DECISION_STOP_REASON,
|
|
81
79
|
askUser,
|
|
@@ -90,20 +88,21 @@ import {
|
|
|
90
88
|
} from "../chunk-LGXUGYUH.js";
|
|
91
89
|
import {
|
|
92
90
|
getMachineId
|
|
93
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-7WMFPYR5.js";
|
|
94
92
|
import {
|
|
95
93
|
canonicalJson
|
|
96
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-LTPQKBJH.js";
|
|
97
95
|
import "../chunk-GMXKITVA.js";
|
|
98
96
|
import "../chunk-DINDL2CF.js";
|
|
99
|
-
import "../chunk-
|
|
97
|
+
import "../chunk-DOYARIYB.js";
|
|
100
98
|
import "../chunk-EYRGBYZG.js";
|
|
101
99
|
import "../chunk-SAF6HGAA.js";
|
|
102
100
|
import "../chunk-7QLSKOSU.js";
|
|
103
101
|
import "../chunk-KZERVKTD.js";
|
|
102
|
+
import "../chunk-A3D43VXO.js";
|
|
104
103
|
import {
|
|
105
104
|
writeFileAtomic
|
|
106
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-4LL6LG5X.js";
|
|
107
106
|
import {
|
|
108
107
|
getApiKey
|
|
109
108
|
} from "../chunk-2UMNXADU.js";
|
|
@@ -119,7 +118,7 @@ import {
|
|
|
119
118
|
hookWaitClamped,
|
|
120
119
|
hookWaitDeadline,
|
|
121
120
|
resolveGate
|
|
122
|
-
} from "../chunk-
|
|
121
|
+
} from "../chunk-TTBRBWAK.js";
|
|
123
122
|
|
|
124
123
|
// bin/pushary-codex-hook.ts
|
|
125
124
|
import { basename } from "path";
|
|
@@ -733,6 +732,14 @@ var decidePreToolUse = async (input) => {
|
|
|
733
732
|
return codexPass();
|
|
734
733
|
}
|
|
735
734
|
};
|
|
735
|
+
var repairCodexHoldsQuietly = async () => {
|
|
736
|
+
try {
|
|
737
|
+
const { repairCodexHolds } = await import("../reapply-I4NB5SSM.js");
|
|
738
|
+
repairCodexHolds();
|
|
739
|
+
} catch {
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
};
|
|
736
743
|
var reportSessionStart = async (input, action = "Session started") => {
|
|
737
744
|
try {
|
|
738
745
|
await reportEvent({
|
|
@@ -803,6 +810,7 @@ var main = async () => {
|
|
|
803
810
|
break;
|
|
804
811
|
}
|
|
805
812
|
case "SessionStart":
|
|
813
|
+
await repairCodexHoldsQuietly();
|
|
806
814
|
await reportSessionStart(input);
|
|
807
815
|
break;
|
|
808
816
|
case "SessionEnd":
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-OPR2BPD4.js";
|
|
4
|
+
} from "../chunk-MDV7ZRAT.js";
|
|
5
|
+
import "../chunk-EMCNSBF3.js";
|
|
7
6
|
import {
|
|
8
7
|
askUser,
|
|
9
8
|
isDecisionStopped,
|
|
@@ -11,17 +10,18 @@ import {
|
|
|
11
10
|
} from "../chunk-LGXUGYUH.js";
|
|
12
11
|
import {
|
|
13
12
|
getMachineId
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-7WMFPYR5.js";
|
|
14
|
+
import "../chunk-LTPQKBJH.js";
|
|
16
15
|
import "../chunk-EYRGBYZG.js";
|
|
17
16
|
import "../chunk-SAF6HGAA.js";
|
|
18
17
|
import "../chunk-7QLSKOSU.js";
|
|
19
18
|
import "../chunk-KZERVKTD.js";
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-A3D43VXO.js";
|
|
20
|
+
import "../chunk-4LL6LG5X.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
23
|
} from "../chunk-2UMNXADU.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-TTBRBWAK.js";
|
|
25
25
|
|
|
26
26
|
// bin/pushary-codex.ts
|
|
27
27
|
import { basename } from "path";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
printKeyCheck
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-TVY7AT6O.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDevice,
|
|
7
7
|
connectExistingApp,
|
|
8
8
|
printConnectInstructions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-BPD4P3NN.js";
|
|
10
10
|
import "../chunk-3EGEA4KH.js";
|
|
11
11
|
import {
|
|
12
12
|
checkApiKey
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-BOZETFXB.js";
|
|
14
14
|
import "../chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
createIo
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import "../chunk-DINDL2CF.js";
|
|
26
26
|
import {
|
|
27
27
|
readKeySource
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-DOYARIYB.js";
|
|
29
29
|
import "../chunk-EYRGBYZG.js";
|
|
30
30
|
import "../chunk-SAF6HGAA.js";
|
|
31
31
|
import {
|
|
@@ -34,9 +34,10 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
EXIT
|
|
36
36
|
} from "../chunk-KZERVKTD.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-A3D43VXO.js";
|
|
38
|
+
import "../chunk-4LL6LG5X.js";
|
|
38
39
|
import "../chunk-2UMNXADU.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-TTBRBWAK.js";
|
|
40
41
|
|
|
41
42
|
// bin/pushary-connect.ts
|
|
42
43
|
exitOnHelpFlag("connect");
|