@pushary/agent-hooks 1.4.1 → 1.5.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 +20 -0
- package/README.md +27 -0
- package/data/vscode-plugin/README.md +1 -1
- package/data/vscode-plugin/scripts/pushary-gate.mjs +2 -2
- package/dist/bin/pushary-bell-hook.js +22 -21
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +28 -24
- package/dist/bin/pushary-clean.js +30 -26
- package/dist/bin/pushary-codex-bridge.js +16 -14
- package/dist/bin/pushary-codex-hook.js +41 -31
- package/dist/bin/pushary-codex.js +15 -10
- package/dist/bin/pushary-connect.js +11 -11
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +31 -28
- package/dist/bin/pushary-disconnect.js +16 -16
- package/dist/bin/pushary-doctor.js +81 -38
- package/dist/bin/pushary-elicitation-hook.js +23 -22
- package/dist/bin/pushary-gemini-bridge.js +13 -11
- package/dist/bin/pushary-gemini-hook.js +29 -24
- package/dist/bin/pushary-hook.js +30 -30
- package/dist/bin/pushary-login.js +14 -14
- package/dist/bin/pushary-logout.js +8 -8
- package/dist/bin/pushary-mode.js +7 -7
- package/dist/bin/pushary-notification-hook.js +26 -25
- package/dist/bin/pushary-opencode-hook.js +25 -24
- package/dist/bin/pushary-permission-denied-hook.js +30 -29
- package/dist/bin/pushary-permission-hook.js +29 -28
- package/dist/bin/pushary-post-hook.js +26 -25
- package/dist/bin/pushary-prompt-hook.js +26 -25
- package/dist/bin/pushary-session-end-hook.js +26 -25
- package/dist/bin/pushary-session-start-hook.js +32 -27
- package/dist/bin/pushary-setup.js +85 -59
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +26 -25
- package/dist/bin/pushary-stopfailure-hook.js +26 -25
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +20 -19
- package/dist/bin/pushary-transcripts.js +8 -8
- package/dist/bin/pushary-upgrade.js +231 -37
- package/dist/bin/pushary-wait.js +7 -7
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-MN3XOVRK.js → chunk-2QT3GCU4.js} +1 -1
- package/dist/{chunk-LUT2EZLG.js → chunk-3NBODGQS.js} +1 -1
- package/dist/{chunk-43JKGLZZ.js → chunk-3ZSGKLSO.js} +2 -2
- package/dist/{chunk-QBS6LGEK.js → chunk-43LJSM4F.js} +2 -2
- package/dist/{chunk-SWFF5U2N.js → chunk-43ZDACBO.js} +1 -1
- package/dist/{chunk-HK3IXIQJ.js → chunk-5HYNICS7.js} +1 -1
- package/dist/{chunk-EQRS3SGM.js → chunk-66H2QQAK.js} +1 -1
- package/dist/{chunk-3BPB2HYZ.js → chunk-7XT76LWT.js} +7 -7
- package/dist/{chunk-ALFT7H5B.js → chunk-CQYHOHOK.js} +56 -5
- package/dist/{chunk-3UA6FPRC.js → chunk-DLJN5XEU.js} +3 -3
- package/dist/{chunk-BZBUPZC6.js → chunk-DTQNDR7C.js} +1 -1
- package/dist/{chunk-SAF6NNXY.js → chunk-DYHXOXUF.js} +43 -6
- package/dist/{chunk-FAH3D74E.js → chunk-EA3IELHP.js} +6 -0
- package/dist/{chunk-ED5TA2FJ.js → chunk-EADZPVYW.js} +3 -3
- package/dist/{chunk-I6HRQOMT.js → chunk-F57RGL7K.js} +8 -8
- package/dist/{chunk-LNGYW6G4.js → chunk-FDHMNT24.js} +20 -16
- package/dist/{chunk-37VLIYLI.js → chunk-H5LHTC5X.js} +1 -1
- package/dist/{chunk-EYRGBYZG.js → chunk-HETOKNIL.js} +1 -1
- package/dist/{chunk-K6I5M2ME.js → chunk-HU5LSYL2.js} +2 -2
- package/dist/{chunk-SKXLIVFM.js → chunk-HVBF35GT.js} +2 -2
- package/dist/{chunk-DINDL2CF.js → chunk-HWJW3CPO.js} +25 -5
- package/dist/{chunk-GOFDGTEI.js → chunk-IYTQ4B5I.js} +18 -45
- package/dist/{chunk-WIOXWUUH.js → chunk-J4J45VPZ.js} +3 -3
- package/dist/{chunk-HQLAZWJJ.js → chunk-JF736N4C.js} +5 -5
- package/dist/{chunk-LYXX5NSB.js → chunk-K3QVDAZW.js} +1 -1
- package/dist/{chunk-KI36MAT6.js → chunk-KEOLNHR3.js} +2 -2
- package/dist/{chunk-S3EP4B35.js → chunk-KJRALILH.js} +28 -11
- package/dist/{chunk-PHHGHHOW.js → chunk-MYP4UUFH.js} +1 -1
- package/dist/{chunk-TNS3YLFE.js → chunk-NFKVRMTM.js} +8 -8
- package/dist/{chunk-TF4IOINR.js → chunk-NTQSICPJ.js} +3 -3
- package/dist/{chunk-4FN6VV56.js → chunk-ORLJNJEO.js} +2 -2
- package/dist/{chunk-2UMNXADU.js → chunk-OSJEMXSR.js} +5 -1
- package/dist/chunk-OSSDK5RS.js +162 -0
- package/dist/{chunk-TWWLVOPB.js → chunk-P4BNYJ5Q.js} +5 -5
- package/dist/{chunk-KEMEBTCJ.js → chunk-PCGZXWGQ.js} +4 -4
- package/dist/{chunk-2GMI6JH6.js → chunk-PNNBMH4E.js} +5 -5
- package/dist/{chunk-LGXUGYUH.js → chunk-PYCQXCI5.js} +2 -2
- package/dist/{chunk-JOVWYVSR.js → chunk-SOCEY746.js} +1 -1
- package/dist/{chunk-FVKFDTN6.js → chunk-T4QY64OR.js} +19 -14
- package/dist/{chunk-R3AMKNIW.js → chunk-TFKBFQCE.js} +1 -1
- package/dist/{chunk-CRNAXFQ6.js → chunk-TIWURSLS.js} +1 -1
- package/dist/{chunk-VYUDGQM7.js → chunk-TUXFIVOH.js} +1 -1
- package/dist/{chunk-3T52B2OF.js → chunk-UQHUUZ5H.js} +1 -1
- package/dist/{chunk-TI3ZWXZG.js → chunk-USQDVBEV.js} +2 -2
- package/dist/{chunk-WEO5JCB4.js → chunk-UYDTFCHW.js} +1 -1
- package/dist/{chunk-D7ERHWYB.js → chunk-XWEONSLV.js} +1 -1
- package/dist/{chunk-GKIUEIDX.js → chunk-YQMFGWBD.js} +1 -1
- package/dist/{reapply-BAWDJTG7.js → reapply-D2TFN6XK.js} +9 -8
- package/dist/src/index.js +18 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
- Pushary now updates itself in the background. When an agent session starts, it checks at most once a day for a newer version within the same major version, installs it into the global npm folder your hooks already run from, and refreshes each agent's config the way `pushary upgrade` does. The session never waits for it. A new major version is shown in `pushary doctor` and left for you to install.
|
|
6
|
+
- Turn it off with `pushary upgrade --auto=off` (and back on with `--auto=on`), or set `PUSHARY_DISABLE_AUTOUPDATE=1` in the environment your agents start from.
|
|
7
|
+
- It does not run on Windows yet, in CI, or for a copy run through `npx`, a plugin, or the Mac app. It never uses `sudo`: if npm cannot write to the global folder, the attempt is recorded as failed and nothing changes.
|
|
8
|
+
- This only reaches machines on 1.5.0 or later. To get there, run `npx @pushary/agent-hooks@latest upgrade` once.
|
|
9
|
+
- `pushary doctor` shows whether automatic updates are on and the result of the last check, and `setup` and `doctor` tell you once when Pushary has updated itself.
|
|
10
|
+
- `pushary doctor` no longer calls a build newer than the npm release out of date.
|
|
11
|
+
- The commands the CLI prints for you to copy now say `npx @pushary/agent-hooks@latest`. Without `@latest`, npx runs whatever older version is installed globally.
|
|
12
|
+
- A failed npm install now reports npm's reason, such as a permission error, instead of a line like `syscall mkdir`.
|
|
13
|
+
|
|
14
|
+
## 1.4.2
|
|
15
|
+
|
|
16
|
+
- Setup trusts the Pushary hooks for you on Codex up to 0.155.1. It used to stop at 0.147.0, so on a newer Codex it wrote the hooks without trusting them, Codex never ran them, and setup still said it was done.
|
|
17
|
+
- On a Codex newer than the last version Pushary checked, setup says so in one line and tells you to open Codex and choose Trust for the Pushary hooks.
|
|
18
|
+
- The phone QR stops waiting 10 seconds before the pairing code expires, so the code is cancelled cleanly on a timeout.
|
|
19
|
+
- After a minute at the QR with no scan, setup offers the browser sign-in: Ctrl-C, then `npx @pushary/agent-hooks setup --connect browser`.
|
|
20
|
+
- A kill switch or standing deny on Codex now appears in your decision history, as it already did for Claude Code. If that record fails to send, it is sent again on the next matching denial.
|
|
21
|
+
- `clean --everything` also removes the sign-in session the Mac app now keeps in the keychain.
|
|
22
|
+
|
|
3
23
|
## 1.4.1
|
|
4
24
|
|
|
5
25
|
- `clean` masks credentials in shell lines it cannot rewrite, including output you might send to support.
|
package/README.md
CHANGED
|
@@ -244,6 +244,33 @@ npx @pushary/agent-hooks@latest wait 45
|
|
|
244
244
|
npx @pushary/agent-hooks@latest clean
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
+
## Updates
|
|
248
|
+
|
|
249
|
+
From 1.5.0, Pushary updates itself. When an agent session starts, the session-start
|
|
250
|
+
hook checks at most once a day whether a newer version is published. If one is, it
|
|
251
|
+
installs that version in the background into the same global npm folder your hooks
|
|
252
|
+
already run from, then refreshes each agent's config the way `pushary upgrade` does.
|
|
253
|
+
The session does not wait for it, and the new version runs from the next hook call.
|
|
254
|
+
|
|
255
|
+
- It stays within the same major version. A new major shows in `pushary doctor`, and
|
|
256
|
+
you move to it with `npx @pushary/agent-hooks@latest upgrade`.
|
|
257
|
+
- It only updates a global npm install. A copy run through `npx`, a plugin, or the Mac
|
|
258
|
+
app updates by its own route.
|
|
259
|
+
- It never uses `sudo`. If npm cannot write to the global folder, the attempt is
|
|
260
|
+
recorded as failed and nothing changes.
|
|
261
|
+
- It does not run on Windows yet, or when `CI` is set.
|
|
262
|
+
|
|
263
|
+
Turn it off with either of these:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pushary upgrade --auto=off # turn it back on with --auto=on
|
|
267
|
+
export PUSHARY_DISABLE_AUTOUPDATE=1 # in the environment your agents start from
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
`pushary doctor` shows whether it is on and the result of the last check. The state is
|
|
271
|
+
kept in `~/.pushary/auto-update.json`, and the output of recent updates in
|
|
272
|
+
`~/.pushary/logs/auto-update.log`.
|
|
273
|
+
|
|
247
274
|
## Manual MCP setup
|
|
248
275
|
|
|
249
276
|
If you only want notifications and questions (no permission gating), add Pushary to your MCP config directly:
|
|
@@ -106,7 +106,7 @@ This repository uses the `.claude-plugin/plugin.json` layout, which VS Code, Git
|
|
|
106
106
|
|
|
107
107
|
The layout is portable; this plugin is not meant to be. `hooks/hooks.json` uses VS Code's flat hook form, and the gate speaks VS Code's tool names, so treat this as a VS Code plugin that happens to sit in a portable folder shape.
|
|
108
108
|
|
|
109
|
-
Claude Code users are served by `npx @pushary/agent-hooks setup --agents claude_code`, which installs a hook built for Claude Code's own tool names and matcher format. Do not install this directory as a Claude Code plugin as well: at best it duplicates the MCP server, and the two installs would fight over the same approvals.
|
|
109
|
+
Claude Code users are served by `npx @pushary/agent-hooks@latest setup --agents claude_code`, which installs a hook built for Claude Code's own tool names and matcher format. Do not install this directory as a Claude Code plugin as well: at best it duplicates the MCP server, and the two installs would fight over the same approvals.
|
|
110
110
|
|
|
111
111
|
## Development
|
|
112
112
|
|
|
@@ -723,9 +723,9 @@ const main = async () => {
|
|
|
723
723
|
|
|
724
724
|
const apiKey = resolveApiKey()
|
|
725
725
|
if (!apiKey) {
|
|
726
|
-
diag('no API key found (PUSHARY_API_KEY, the plugin .mcp.json, or ~/.pushary/config.json). Run: npx @pushary/agent-hooks setup')
|
|
726
|
+
diag('no API key found (PUSHARY_API_KEY, the plugin .mcp.json, or ~/.pushary/config.json). Run: npx @pushary/agent-hooks@latest setup')
|
|
727
727
|
return respond(
|
|
728
|
-
unresolved(input.tool_name, 'Pushary is not configured: run `npx @pushary/agent-hooks setup` (get a key at https://pushary.com) to route this approval to your phone.')
|
|
728
|
+
unresolved(input.tool_name, 'Pushary is not configured: run `npx @pushary/agent-hooks@latest setup` (get a key at https://pushary.com) to route this approval to your phone.')
|
|
729
729
|
)
|
|
730
730
|
}
|
|
731
731
|
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DTQNDR7C.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-ORLJNJEO.js";
|
|
8
|
+
import "../chunk-NFKVRMTM.js";
|
|
9
9
|
import "../chunk-SGZJ5LYH.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-PCGZXWGQ.js";
|
|
11
|
+
import "../chunk-TFKBFQCE.js";
|
|
12
|
+
import "../chunk-K3QVDAZW.js";
|
|
13
|
+
import "../chunk-NTQSICPJ.js";
|
|
14
|
+
import "../chunk-7XT76LWT.js";
|
|
15
|
+
import "../chunk-EADZPVYW.js";
|
|
16
|
+
import "../chunk-SOCEY746.js";
|
|
17
|
+
import "../chunk-TIWURSLS.js";
|
|
18
|
+
import "../chunk-66H2QQAK.js";
|
|
19
|
+
import "../chunk-2QT3GCU4.js";
|
|
20
20
|
import "../chunk-XHKBHWLX.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-UYDTFCHW.js";
|
|
22
|
+
import "../chunk-UQHUUZ5H.js";
|
|
23
|
+
import "../chunk-DYHXOXUF.js";
|
|
24
24
|
import "../chunk-GMXKITVA.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-TI3ZWXZG.js";
|
|
25
|
+
import "../chunk-USQDVBEV.js";
|
|
27
26
|
import "../chunk-7QLSKOSU.js";
|
|
28
27
|
import "../chunk-KZERVKTD.js";
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-HU5LSYL2.js";
|
|
30
29
|
import "../chunk-T7E75EKA.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-OSJEMXSR.js";
|
|
31
|
+
import "../chunk-T4QY64OR.js";
|
|
32
|
+
import "../chunk-EA3IELHP.js";
|
|
33
|
+
import "../chunk-HWJW3CPO.js";
|
|
33
34
|
|
|
34
35
|
// bin/pushary-bell-hook.ts
|
|
35
36
|
var main = async () => {
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,38 +5,38 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-DTQNDR7C.js";
|
|
9
9
|
import {
|
|
10
10
|
addBellHooks,
|
|
11
11
|
bellInstalled,
|
|
12
12
|
removeBellHooks
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-SOCEY746.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeSettings
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-DYHXOXUF.js";
|
|
17
17
|
import {
|
|
18
18
|
createIo
|
|
19
19
|
} from "../chunk-5RUIFDTP.js";
|
|
20
20
|
import {
|
|
21
21
|
exitOnHelpFlag
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-FAH3D74E.js";
|
|
22
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
24
23
|
import {
|
|
25
24
|
parseFlags
|
|
26
25
|
} from "../chunk-GMXKITVA.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-TI3ZWXZG.js";
|
|
26
|
+
import "../chunk-USQDVBEV.js";
|
|
29
27
|
import "../chunk-7QLSKOSU.js";
|
|
30
28
|
import {
|
|
31
29
|
EXIT
|
|
32
30
|
} from "../chunk-KZERVKTD.js";
|
|
33
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-HU5LSYL2.js";
|
|
34
32
|
import {
|
|
35
33
|
readJsonSafe,
|
|
36
34
|
writeJsonAtomic
|
|
37
35
|
} from "../chunk-T7E75EKA.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-OSJEMXSR.js";
|
|
37
|
+
import "../chunk-T4QY64OR.js";
|
|
38
|
+
import "../chunk-EA3IELHP.js";
|
|
39
|
+
import "../chunk-HWJW3CPO.js";
|
|
40
40
|
|
|
41
41
|
// bin/pushary-bell.ts
|
|
42
42
|
exitOnHelpFlag("bell");
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
describeIdleWindow,
|
|
9
9
|
startProcessOwnership,
|
|
10
10
|
withSpawnProcessOwnership
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-MYP4UUFH.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer
|
|
14
14
|
} from "../chunk-YHG74UFF.js";
|
|
@@ -17,24 +17,24 @@ import {
|
|
|
17
17
|
loadSessionKey,
|
|
18
18
|
registerTranscript,
|
|
19
19
|
registeredTranscriptEnabled
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-NFKVRMTM.js";
|
|
21
21
|
import "../chunk-SGZJ5LYH.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-PCGZXWGQ.js";
|
|
23
|
+
import "../chunk-TFKBFQCE.js";
|
|
24
|
+
import "../chunk-K3QVDAZW.js";
|
|
25
|
+
import "../chunk-NTQSICPJ.js";
|
|
26
26
|
import {
|
|
27
27
|
ensureDaemonRunning
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-7XT76LWT.js";
|
|
29
|
+
import "../chunk-EADZPVYW.js";
|
|
30
|
+
import "../chunk-SOCEY746.js";
|
|
31
31
|
import {
|
|
32
32
|
encryptRecord
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-TIWURSLS.js";
|
|
34
|
+
import "../chunk-66H2QQAK.js";
|
|
35
35
|
import {
|
|
36
36
|
transcriptsEnabled
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-2QT3GCU4.js";
|
|
38
38
|
import {
|
|
39
39
|
needsShell,
|
|
40
40
|
spawnClaude
|
|
@@ -56,8 +56,8 @@ import {
|
|
|
56
56
|
reportEvent,
|
|
57
57
|
savePendingCommand,
|
|
58
58
|
scopePathFor
|
|
59
|
-
} from "../chunk-
|
|
60
|
-
import "../chunk-
|
|
59
|
+
} from "../chunk-FDHMNT24.js";
|
|
60
|
+
import "../chunk-UYDTFCHW.js";
|
|
61
61
|
import {
|
|
62
62
|
DECISION_STOP_REASON,
|
|
63
63
|
askUser,
|
|
@@ -67,29 +67,32 @@ import {
|
|
|
67
67
|
nextLongPollMs,
|
|
68
68
|
waitForAnswer,
|
|
69
69
|
withdrawQuestion
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-PYCQXCI5.js";
|
|
71
71
|
import {
|
|
72
72
|
getMachineId
|
|
73
|
-
} from "../chunk-
|
|
74
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-UQHUUZ5H.js";
|
|
74
|
+
import "../chunk-DYHXOXUF.js";
|
|
75
75
|
import "../chunk-GMXKITVA.js";
|
|
76
|
-
import "../chunk-
|
|
77
|
-
import "../chunk-
|
|
78
|
-
import "../chunk-EYRGBYZG.js";
|
|
76
|
+
import "../chunk-USQDVBEV.js";
|
|
77
|
+
import "../chunk-HETOKNIL.js";
|
|
79
78
|
import "../chunk-SAF6HGAA.js";
|
|
80
79
|
import "../chunk-7QLSKOSU.js";
|
|
81
80
|
import "../chunk-KZERVKTD.js";
|
|
82
|
-
import "../chunk-
|
|
81
|
+
import "../chunk-HU5LSYL2.js";
|
|
83
82
|
import "../chunk-T7E75EKA.js";
|
|
84
83
|
import {
|
|
85
84
|
getApiKey,
|
|
86
85
|
getBaseUrl
|
|
87
|
-
} from "../chunk-
|
|
86
|
+
} from "../chunk-OSJEMXSR.js";
|
|
88
87
|
import {
|
|
89
88
|
KILL_REASON,
|
|
90
89
|
redactSecrets,
|
|
91
90
|
resolveGate
|
|
92
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-T4QY64OR.js";
|
|
92
|
+
import {
|
|
93
|
+
NPX_LATEST_COMMAND
|
|
94
|
+
} from "../chunk-EA3IELHP.js";
|
|
95
|
+
import "../chunk-HWJW3CPO.js";
|
|
93
96
|
|
|
94
97
|
// src/wrapper/localPassthrough.ts
|
|
95
98
|
var SIGNAL_NUMBERS = {
|
|
@@ -1548,7 +1551,8 @@ var runDualMode = async (binary, args2, startingMode) => {
|
|
|
1548
1551
|
apiKey = getApiKey();
|
|
1549
1552
|
} catch {
|
|
1550
1553
|
process.stderr.write(
|
|
1551
|
-
|
|
1554
|
+
`[pushary] phone control needs an API key. Run \`${NPX_LATEST_COMMAND} setup\`. Running the normal passthrough for now.
|
|
1555
|
+
`
|
|
1552
1556
|
);
|
|
1553
1557
|
return { implemented: false };
|
|
1554
1558
|
}
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
createGuards,
|
|
8
8
|
resolveHermesPython,
|
|
9
9
|
runHermesPythonScript
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-H5LHTC5X.js";
|
|
11
11
|
import "../chunk-P32LPT2L.js";
|
|
12
12
|
import {
|
|
13
13
|
removeInstructionBlock,
|
|
14
14
|
shortenHome,
|
|
15
15
|
unregisterPluginLocation,
|
|
16
16
|
vscodeSettingsTargets
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-DLJN5XEU.js";
|
|
18
18
|
import {
|
|
19
19
|
OPENCODE_PLUGIN_SIBLING,
|
|
20
20
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
openCodePluginDir,
|
|
25
25
|
openCodePluginFile,
|
|
26
26
|
removeOpenCodeMcpServer
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TUXFIVOH.js";
|
|
28
28
|
import {
|
|
29
29
|
compatibleConfigFile,
|
|
30
30
|
compatibleInstructionsFile,
|
|
@@ -32,40 +32,40 @@ import {
|
|
|
32
32
|
compatiblePermissionRuleFile,
|
|
33
33
|
removeCompatibleHooks,
|
|
34
34
|
removeCompatibleMcpServer
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-JF736N4C.js";
|
|
36
36
|
import {
|
|
37
37
|
isClaudeMcpSnapshot,
|
|
38
38
|
removeClaudeMcpServers,
|
|
39
39
|
removePusharySettings,
|
|
40
40
|
removePusharyToolPermissions,
|
|
41
41
|
restoreClaudeMcpServer
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-J4J45VPZ.js";
|
|
43
43
|
import {
|
|
44
44
|
hookOwnerOf,
|
|
45
45
|
isHookTakeoverReceipt,
|
|
46
46
|
restoreHookTakeover,
|
|
47
47
|
restoreMcpServer
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
48
|
+
} from "../chunk-PCGZXWGQ.js";
|
|
49
|
+
import "../chunk-TFKBFQCE.js";
|
|
50
50
|
import {
|
|
51
51
|
liveBridgeProbe,
|
|
52
52
|
resolveBridgeStub
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-K3QVDAZW.js";
|
|
54
54
|
import {
|
|
55
55
|
pusharyHookExecutable
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-NTQSICPJ.js";
|
|
57
57
|
import {
|
|
58
58
|
disableDaemonService
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-7XT76LWT.js";
|
|
60
60
|
import {
|
|
61
61
|
removeGeminiSettings
|
|
62
|
-
} from "../chunk-
|
|
63
|
-
import "../chunk-
|
|
62
|
+
} from "../chunk-EADZPVYW.js";
|
|
63
|
+
import "../chunk-SOCEY746.js";
|
|
64
64
|
import "../chunk-XHKBHWLX.js";
|
|
65
|
-
import "../chunk-
|
|
66
|
-
import "../chunk-
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-FDHMNT24.js";
|
|
66
|
+
import "../chunk-UYDTFCHW.js";
|
|
67
|
+
import "../chunk-PYCQXCI5.js";
|
|
68
|
+
import "../chunk-UQHUUZ5H.js";
|
|
69
69
|
import {
|
|
70
70
|
bridgeAgentKey,
|
|
71
71
|
claudeJson,
|
|
@@ -94,29 +94,27 @@ import {
|
|
|
94
94
|
restoreCodexHookTrust,
|
|
95
95
|
vscodePluginDir,
|
|
96
96
|
vscodePluginMcp
|
|
97
|
-
} from "../chunk-
|
|
97
|
+
} from "../chunk-DYHXOXUF.js";
|
|
98
98
|
import {
|
|
99
99
|
exitOnHelpFlag
|
|
100
|
-
} from "../chunk-
|
|
101
|
-
import "../chunk-FAH3D74E.js";
|
|
100
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
102
101
|
import {
|
|
103
102
|
rejectUnknownFlags
|
|
104
103
|
} from "../chunk-GMXKITVA.js";
|
|
105
|
-
import "../chunk-DINDL2CF.js";
|
|
106
104
|
import {
|
|
107
105
|
CANDIDATE_RCS,
|
|
108
106
|
isDisabledExport,
|
|
109
107
|
removeClaudeAlias
|
|
110
|
-
} from "../chunk-
|
|
111
|
-
import "../chunk-
|
|
108
|
+
} from "../chunk-USQDVBEV.js";
|
|
109
|
+
import "../chunk-HETOKNIL.js";
|
|
112
110
|
import "../chunk-SAF6HGAA.js";
|
|
113
111
|
import "../chunk-7QLSKOSU.js";
|
|
114
112
|
import {
|
|
115
113
|
EXIT
|
|
116
114
|
} from "../chunk-KZERVKTD.js";
|
|
117
|
-
import "../chunk-
|
|
115
|
+
import "../chunk-HU5LSYL2.js";
|
|
118
116
|
import "../chunk-T7E75EKA.js";
|
|
119
|
-
import "../chunk-
|
|
117
|
+
import "../chunk-OSJEMXSR.js";
|
|
120
118
|
import {
|
|
121
119
|
CURSOR_GATE_EVENTS,
|
|
122
120
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -125,7 +123,9 @@ import {
|
|
|
125
123
|
SUPPORT_EMAIL,
|
|
126
124
|
isValidApiKey,
|
|
127
125
|
redactSecrets
|
|
128
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-T4QY64OR.js";
|
|
127
|
+
import "../chunk-EA3IELHP.js";
|
|
128
|
+
import "../chunk-HWJW3CPO.js";
|
|
129
129
|
|
|
130
130
|
// bin/pushary-clean.ts
|
|
131
131
|
import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync3 } from "fs";
|
|
@@ -187,7 +187,11 @@ var MAC_KEYCHAIN_ACCOUNTS = [
|
|
|
187
187
|
"pushary.site-api-key",
|
|
188
188
|
"pushary.site-id",
|
|
189
189
|
"clerk.device-token",
|
|
190
|
-
"clerk.session-id"
|
|
190
|
+
"clerk.session-id",
|
|
191
|
+
"clerkDeviceToken",
|
|
192
|
+
"cachedClient",
|
|
193
|
+
"cachedClientServerDate",
|
|
194
|
+
"cachedEnvironment"
|
|
191
195
|
];
|
|
192
196
|
var MAC_DEFAULTS_DOMAINS = ["com.pushary.app", "pushary-bridge", "pushary.render"];
|
|
193
197
|
var macLibraryState = (home = homedir()) => [
|
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-KEOLNHR3.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-HVBF35GT.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-
|
|
18
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-MYP4UUFH.js";
|
|
17
|
+
import "../chunk-TIWURSLS.js";
|
|
18
|
+
import "../chunk-66H2QQAK.js";
|
|
19
19
|
import {
|
|
20
20
|
transcriptsEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-2QT3GCU4.js";
|
|
22
22
|
import {
|
|
23
23
|
spawnClaude
|
|
24
24
|
} from "../chunk-XHKBHWLX.js";
|
|
25
25
|
import {
|
|
26
26
|
isDecisionStopped,
|
|
27
27
|
withdrawQuestion
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-PYCQXCI5.js";
|
|
29
29
|
import {
|
|
30
30
|
getMachineId
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-UQHUUZ5H.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveBinary
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-DYHXOXUF.js";
|
|
35
|
+
import "../chunk-USQDVBEV.js";
|
|
36
36
|
import {
|
|
37
37
|
callMcpTool
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-HETOKNIL.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-HU5LSYL2.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
44
|
import {
|
|
45
45
|
getApiKey,
|
|
46
46
|
getBaseUrl
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-OSJEMXSR.js";
|
|
48
48
|
import {
|
|
49
49
|
parseAgentQuestion,
|
|
50
50
|
parseAgentQuestionAnswers
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-T4QY64OR.js";
|
|
52
|
+
import "../chunk-EA3IELHP.js";
|
|
53
|
+
import "../chunk-HWJW3CPO.js";
|
|
52
54
|
|
|
53
55
|
// bin/pushary-codex-bridge.ts
|
|
54
56
|
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-5HYNICS7.js";
|
|
5
5
|
import {
|
|
6
6
|
blockedActionFingerprint,
|
|
7
7
|
codexCallKey,
|
|
@@ -11,31 +11,35 @@ import {
|
|
|
11
11
|
hasBlockedActionHint,
|
|
12
12
|
recordBlockedActionHint,
|
|
13
13
|
recordCodexCallDecision,
|
|
14
|
+
reportMachineDenial,
|
|
14
15
|
userScope
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-CQYHOHOK.js";
|
|
17
|
+
import {
|
|
18
|
+
triggerAutoUpdate
|
|
19
|
+
} from "../chunk-OSSDK5RS.js";
|
|
16
20
|
import {
|
|
17
21
|
isGatingMoment,
|
|
18
22
|
recordKeylessMoment
|
|
19
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-43ZDACBO.js";
|
|
20
24
|
import {
|
|
21
25
|
readHookInput
|
|
22
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-ORLJNJEO.js";
|
|
23
27
|
import {
|
|
24
28
|
denyReasonFrom,
|
|
25
29
|
isDeferAnswer
|
|
26
30
|
} from "../chunk-YHG74UFF.js";
|
|
27
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-NFKVRMTM.js";
|
|
28
32
|
import "../chunk-SGZJ5LYH.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-PCGZXWGQ.js";
|
|
34
|
+
import "../chunk-TFKBFQCE.js";
|
|
35
|
+
import "../chunk-K3QVDAZW.js";
|
|
36
|
+
import "../chunk-NTQSICPJ.js";
|
|
37
|
+
import "../chunk-7XT76LWT.js";
|
|
38
|
+
import "../chunk-EADZPVYW.js";
|
|
39
|
+
import "../chunk-SOCEY746.js";
|
|
40
|
+
import "../chunk-TIWURSLS.js";
|
|
41
|
+
import "../chunk-66H2QQAK.js";
|
|
42
|
+
import "../chunk-2QT3GCU4.js";
|
|
39
43
|
import "../chunk-XHKBHWLX.js";
|
|
40
44
|
import {
|
|
41
45
|
CODEX_AGENT,
|
|
@@ -72,8 +76,8 @@ import {
|
|
|
72
76
|
toCodexWire,
|
|
73
77
|
toPolicyLookup,
|
|
74
78
|
toPolicyLookups
|
|
75
|
-
} from "../chunk-
|
|
76
|
-
import "../chunk-
|
|
79
|
+
} from "../chunk-FDHMNT24.js";
|
|
80
|
+
import "../chunk-UYDTFCHW.js";
|
|
77
81
|
import {
|
|
78
82
|
DECISION_STOP_REASON,
|
|
79
83
|
askUser,
|
|
@@ -85,27 +89,26 @@ import {
|
|
|
85
89
|
requestGate,
|
|
86
90
|
sendNotification,
|
|
87
91
|
waitForQuestion
|
|
88
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-PYCQXCI5.js";
|
|
89
93
|
import {
|
|
90
94
|
getMachineId
|
|
91
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-UQHUUZ5H.js";
|
|
92
96
|
import {
|
|
93
97
|
canonicalJson
|
|
94
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-DYHXOXUF.js";
|
|
95
99
|
import "../chunk-GMXKITVA.js";
|
|
96
|
-
import "../chunk-
|
|
97
|
-
import "../chunk-
|
|
98
|
-
import "../chunk-EYRGBYZG.js";
|
|
100
|
+
import "../chunk-USQDVBEV.js";
|
|
101
|
+
import "../chunk-HETOKNIL.js";
|
|
99
102
|
import "../chunk-SAF6HGAA.js";
|
|
100
103
|
import "../chunk-7QLSKOSU.js";
|
|
101
104
|
import "../chunk-KZERVKTD.js";
|
|
102
|
-
import "../chunk-
|
|
105
|
+
import "../chunk-HU5LSYL2.js";
|
|
103
106
|
import {
|
|
104
107
|
writeFileAtomic
|
|
105
108
|
} from "../chunk-T7E75EKA.js";
|
|
106
109
|
import {
|
|
107
110
|
getApiKey
|
|
108
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-OSJEMXSR.js";
|
|
109
112
|
import {
|
|
110
113
|
CODEX_RESCUE_TOOL_NAME,
|
|
111
114
|
DECISION_LINE_MAX,
|
|
@@ -119,7 +122,9 @@ import {
|
|
|
119
122
|
hookWaitClamped,
|
|
120
123
|
hookWaitDeadline,
|
|
121
124
|
resolveGate
|
|
122
|
-
} from "../chunk-
|
|
125
|
+
} from "../chunk-T4QY64OR.js";
|
|
126
|
+
import "../chunk-EA3IELHP.js";
|
|
127
|
+
import "../chunk-HWJW3CPO.js";
|
|
123
128
|
|
|
124
129
|
// bin/pushary-codex-hook.ts
|
|
125
130
|
import { basename } from "path";
|
|
@@ -609,8 +614,10 @@ var decidePermissionRequest = async (input) => {
|
|
|
609
614
|
try {
|
|
610
615
|
const apiKey = getApiKey();
|
|
611
616
|
const { verdict, lookup, gateInput } = await codexGate(apiKey, input);
|
|
612
|
-
if (verdict.kind === "kill"
|
|
613
|
-
|
|
617
|
+
if (verdict.kind === "kill" || verdict.kind === "deny") {
|
|
618
|
+
await reportMachineDenial({ ...input, tool_name: lookup.tool, tool_input: lookup.input }, verdict, CODEX_AGENT);
|
|
619
|
+
return codexDeny(verdict.kind === "kill" ? KILL_REASON : verdict.reason);
|
|
620
|
+
}
|
|
614
621
|
const recorded = consumeCodexCallDecision(callKeyFor(input));
|
|
615
622
|
if (recorded?.kind === "denied") return codexDeny(recorded.reason);
|
|
616
623
|
if (recorded?.kind === "handled") return codexPass();
|
|
@@ -695,9 +702,11 @@ var decidePreToolUse = async (input) => {
|
|
|
695
702
|
}
|
|
696
703
|
try {
|
|
697
704
|
const { verdict, lookup } = await codexGate(apiKey, input);
|
|
698
|
-
if (verdict.kind === "kill"
|
|
705
|
+
if (verdict.kind === "kill" || verdict.kind === "deny") {
|
|
706
|
+
await reportMachineDenial({ ...input, tool_name: lookup.tool, tool_input: lookup.input }, verdict, CODEX_AGENT);
|
|
707
|
+
return codexDeny(verdict.kind === "kill" ? KILL_REASON : verdict.reason);
|
|
708
|
+
}
|
|
699
709
|
if (verdict.kind === "allow") return codexPass();
|
|
700
|
-
if (verdict.kind === "deny") return codexDeny(verdict.reason);
|
|
701
710
|
if (codexApprovalsReviewer(input) === "auto_review") return codexPass();
|
|
702
711
|
if (defersToNativeMode(input.permission_mode, input.tool_name ?? "")) return codexPass();
|
|
703
712
|
if (verdict.kind === "defer") return codexPass();
|
|
@@ -736,7 +745,7 @@ var decidePreToolUse = async (input) => {
|
|
|
736
745
|
};
|
|
737
746
|
var repairCodexHoldsQuietly = async () => {
|
|
738
747
|
try {
|
|
739
|
-
const { repairCodexHolds } = await import("../reapply-
|
|
748
|
+
const { repairCodexHolds } = await import("../reapply-D2TFN6XK.js");
|
|
740
749
|
repairCodexHolds();
|
|
741
750
|
} catch {
|
|
742
751
|
return;
|
|
@@ -813,6 +822,7 @@ var main = async () => {
|
|
|
813
822
|
}
|
|
814
823
|
case "SessionStart":
|
|
815
824
|
await repairCodexHoldsQuietly();
|
|
825
|
+
triggerAutoUpdate({ isSubagentStart: Boolean(input.agent_id) });
|
|
816
826
|
await reportSessionStart(input);
|
|
817
827
|
break;
|
|
818
828
|
case "SessionEnd":
|