@pushary/agent-hooks 1.9.7 → 1.9.8
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 +11 -0
- package/README.md +3 -3
- package/data/cursor-plugin/README.md +3 -7
- package/data/vscode-plugin/README.md +1 -1
- package/dist/bin/pushary-bell-hook.js +22 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +101 -79
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +32 -33
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +24 -21
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +51 -39
- package/dist/bin/pushary-disconnect.js +189 -54
- package/dist/bin/pushary-doctor.js +67 -58
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +30 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +105 -42
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +28 -31
- package/dist/bin/pushary-notification-hook.js +26 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- package/dist/bin/pushary-permission-denied-hook.js +30 -32
- package/dist/bin/pushary-permission-hook.js +29 -31
- package/dist/bin/pushary-post-hook.js +26 -28
- package/dist/bin/pushary-prompt-hook.js +26 -28
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +31 -32
- package/dist/bin/pushary-setup.js +91 -101
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -18
- package/dist/bin/pushary-stop-hook.js +26 -28
- package/dist/bin/pushary-stopfailure-hook.js +26 -28
- package/dist/bin/pushary-suggestions.js +19 -21
- package/dist/bin/pushary-transcript-register.js +18 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +55 -25
- package/dist/bin/pushary-wait.js +23 -19
- package/dist/bin/pushary.js +15 -14
- package/dist/{chunk-R3YW55MY.js → chunk-2A53H4S6.js} +17 -15
- package/dist/{chunk-4YO4T5FV.js → chunk-2QGYMY7A.js} +83 -3
- package/dist/{chunk-MBK7N46B.js → chunk-2QTO5YIT.js} +6 -6
- package/dist/{chunk-D6S5EKXA.js → chunk-2VZAALEJ.js} +5 -9
- package/dist/chunk-2WXF3QJR.js +49 -0
- package/dist/{chunk-JCWZ23MJ.js → chunk-3I6IVOZV.js} +3 -3
- package/dist/chunk-3Z3A37WD.js +77 -0
- package/dist/{chunk-Z6HPS67T.js → chunk-5QUPKDI5.js} +1 -1
- package/dist/{chunk-JWKBDSPF.js → chunk-6TE27XZR.js} +2 -2
- package/dist/{chunk-STQRUH3S.js → chunk-7DVNSQWF.js} +59 -15
- package/dist/{chunk-QTO6HEZD.js → chunk-7PT35RY2.js} +2 -2
- package/dist/{chunk-7OIWWZAD.js → chunk-B64KHETR.js} +3 -3
- package/dist/chunk-BEJRK4DF.js +94 -0
- package/dist/chunk-BXET3ALR.js +46 -0
- package/dist/{chunk-6DJTDHBI.js → chunk-CD47ZFFZ.js} +1 -1
- package/dist/{chunk-UFVGSEWH.js → chunk-CKV3UPMU.js} +2 -2
- package/dist/{chunk-4FK6RZVJ.js → chunk-CLOSJ4ES.js} +1 -1
- package/dist/{chunk-AVNKVF7N.js → chunk-DKMD6AWR.js} +4 -4
- package/dist/{chunk-SBLPHUEB.js → chunk-DL7XWKYV.js} +7 -5
- package/dist/{chunk-BTQGAXZ3.js → chunk-DPGSLWOS.js} +8 -8
- package/dist/{chunk-KYO45G5L.js → chunk-DUZVXBBU.js} +1 -1
- package/dist/{chunk-EB4XGVBG.js → chunk-EUW7JL2K.js} +0 -32
- package/dist/{chunk-4D2AYNSE.js → chunk-FQ2GORVG.js} +2 -2
- package/dist/{chunk-W2KI5KPD.js → chunk-HRULIYDU.js} +2 -2
- package/dist/{chunk-QR6VE5ME.js → chunk-I5IJRMNV.js} +58 -8
- package/dist/{chunk-T7Y5EADL.js → chunk-I6MJXLMY.js} +2 -2
- package/dist/{chunk-N4EUSDKX.js → chunk-IAD2RT4L.js} +14 -14
- package/dist/{chunk-H37L7TT3.js → chunk-IHFDPV7C.js} +2 -2
- package/dist/{chunk-3GNUXXDZ.js → chunk-IHO3YQAN.js} +2 -2
- package/dist/{chunk-JWQZSYCK.js → chunk-KF3UZLYI.js} +1 -1
- package/dist/chunk-KFF7G225.js +599 -0
- package/dist/{chunk-MZPXVH4A.js → chunk-KHNFLYJO.js} +204 -28
- package/dist/{chunk-QFEM7R6T.js → chunk-KRCR2CRQ.js} +9 -9
- package/dist/{chunk-VXRXFU6Q.js → chunk-LKLVTG3V.js} +14 -7
- package/dist/{chunk-KFKL3FHS.js → chunk-LWOO567I.js} +4 -3
- package/dist/{chunk-HPRZJKRO.js → chunk-M6BZZFVQ.js} +1 -1
- package/dist/{chunk-X5NXPCIC.js → chunk-MFF3ONG5.js} +16 -2
- package/dist/{chunk-H7MMU64M.js → chunk-MGRFDGWU.js} +2 -2
- package/dist/{chunk-L76HTPU6.js → chunk-MKTJEXZ3.js} +3 -3
- package/dist/{chunk-NIBFSARF.js → chunk-MXHTGVFZ.js} +33 -9
- package/dist/{chunk-ADSQDYYG.js → chunk-N4QSPI3B.js} +54 -5
- package/dist/{chunk-AQ55ZSSS.js → chunk-NWDG3MSW.js} +1 -1
- package/dist/chunk-OP7IHC2I.js +24 -0
- package/dist/{chunk-KT5E2RLS.js → chunk-QOLITCIP.js} +1 -1
- package/dist/{chunk-JXISQ7DT.js → chunk-TCQ43LSG.js} +3 -3
- package/dist/chunk-TCWKTUAE.js +50 -0
- package/dist/{chunk-RQGODFQN.js → chunk-V5HPPF3E.js} +1 -1
- package/dist/{chunk-7264S5HZ.js → chunk-WG3K4TCH.js} +1 -1
- package/dist/{chunk-GKI6LFAV.js → chunk-WS4H76EP.js} +2 -2
- package/dist/{chunk-XWAYAO3V.js → chunk-WWOHTTVP.js} +2 -2
- package/dist/{chunk-SD3272LS.js → chunk-YIG2R3BJ.js} +9 -7
- package/dist/{chunk-ZUTU43FT.js → chunk-ZBHUHJG6.js} +4 -4
- package/dist/{chunk-AUUXS44H.js → chunk-ZBK6E2OR.js} +1 -1
- package/dist/{chunk-QQ4HBXZC.js → chunk-ZN3C6GBG.js} +84 -673
- package/dist/{chunk-CBQACHKY.js → chunk-ZSTSEBG7.js} +1 -1
- package/dist/{chunk-3PVDOCFI.js → chunk-ZW3XZLJC.js} +5 -5
- package/dist/{global-upgrade-E2HUEB4B.js → global-upgrade-I56HNM23.js} +6 -6
- package/dist/{paths-QVTEGNZV.js → paths-AGY43CXS.js} +2 -2
- package/dist/reapply-IA5XUKWW.js +57 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -20
- package/dist/{upgrade-lock-JCIDZMHF.js → upgrade-lock-B34TAUKV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-ANEAA37E.js +0 -197
- package/dist/chunk-MNWRUGMH.js +0 -86
- package/dist/chunk-RQSOEB4S.js +0 -44
- package/dist/reapply-5QVKM6LA.js +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.8
|
|
4
|
+
|
|
5
|
+
- `pushary upgrade` and automatic updates no longer take over agents the Pushary Mac app connected. They used to replace the app's hooks with the CLI's and overwrite its MCP key for Claude Code, Codex, Gemini CLI, VS Code and OpenCode. An agent the app owns is now left exactly as the app wrote it and listed as kept for the Mac app, using the same rule setup uses. Pass `--take-over-hooks` to setup if you want the CLI to own it.
|
|
6
|
+
- `pushary clean` keeps the Mac app's wiring for Qwen Code, CodeBuddy, Qoder, Droid and Devin while the app is installed, as it already did for the other agents. `clean --everything` still removes it.
|
|
7
|
+
- `pushary disconnect cursor` removes the Cursor plugin setup installed in `~/.cursor/plugins/local/pushary`, including the `mcp.json` that held your API key, and setup's leftover copies of it. The plugin is kept, and the output says so, when the gate in `~/.cursor/hooks.json` that points into it could not be removed.
|
|
8
|
+
- `pushary disconnect` removes the Pushary block it wrote to `AGENTS.md` (Codex, OpenCode), `GEMINI.md`, `QWEN.md` and `CODEBUDDY.md`. Only the text between the Pushary markers is removed. Skills are left in place.
|
|
9
|
+
- `pushary disconnect <agent>` is no longer undone by the Mac app. It records the agent in `~/.pushary/declined-agents.json`, and Pushary.app versions that read that file leave the agent off until you connect it again from the app or with `pushary setup`.
|
|
10
|
+
- `pushary mode`, `mode clear`, `wait <seconds>` and `suggestions` no longer say "This key was rejected" when the key is fine. Keys from `pushary login`, phone pairing and the Mac app cannot change approval settings, and these commands now say so, point you to the Pushary app, your phone or the dashboard, and exit with code 2.
|
|
11
|
+
- `pushary sign-out --revoke` revokes those keys too, and then checks with pushary.com and tells you whether the key still works. Before, it could not revoke them and always said the key was still valid. `--json` adds `keyStillValid`.
|
|
12
|
+
- When the Mac app signs out of the key setup borrowed from it, the background service stops once instead of restarting every 10 seconds, and `pushary doctor`, `pushary status` and commands that report a rejected key say the key was signed out on this Mac, tell you to run `pushary login`, and name the shell profile line that still exports the old key. Pushary does not edit that line. A background service with no key at all also stops instead of restarting.
|
|
13
|
+
|
|
3
14
|
## 1.9.7
|
|
4
15
|
|
|
5
16
|
- `pushary claude` and the `pushary daemon` commands wait at most 5 seconds for the background service again. Only setup and upgrade allow the 30 seconds a cold Windows start can need, so launching Claude no longer sits silent while the service starts.
|
package/README.md
CHANGED
|
@@ -210,11 +210,11 @@ claude Run Claude Code through Pushary, reachable from your phone even whe
|
|
|
210
210
|
daemon Keep this machine reachable so your phone can START a new session
|
|
211
211
|
status One screen: which key is in force, whether the server accepts it, what can receive an approval
|
|
212
212
|
login Sign in from this terminal, no key to copy (--with-token to pipe one in)
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
sign-out Sign out: remove the key this machine stores, and say what it does not remove (also: logout)
|
|
214
|
+
pair Pair a phone without re-running setup (--app for the Pushary app; also: connect)
|
|
215
215
|
bell Free local bell when an agent finishes or needs you. No account, no key, no network
|
|
216
216
|
doctor Verify your Pushary installation is working
|
|
217
|
-
disconnect Turn off one agent (claude|codex|gemini|cursor)
|
|
217
|
+
disconnect Turn off one agent (claude|codex|gemini|cursor|opencode|qwen|codebuddy|qoder|droid|devin|fx)
|
|
218
218
|
clean Remove Pushary from this machine (--everything: the Mac app's setup too, --dry-run: preview)
|
|
219
219
|
mode Choose where approval requests appear
|
|
220
220
|
wait Show or set the "wait for your phone" ladder (pushary wait 45)
|
|
@@ -26,11 +26,7 @@ There are three things.
|
|
|
26
26
|
|
|
27
27
|
You need two things: the plugin, and an API key.
|
|
28
28
|
|
|
29
|
-
### Option 1:
|
|
30
|
-
|
|
31
|
-
Open the Marketplace panel in Cursor, search for Pushary, and click install. Then set your API key (see below).
|
|
32
|
-
|
|
33
|
-
### Option 2: CLI
|
|
29
|
+
### Option 1: CLI (recommended)
|
|
34
30
|
|
|
35
31
|
This also sets up Claude Code, Codex, and Hermes if you use them.
|
|
36
32
|
|
|
@@ -38,7 +34,7 @@ This also sets up Claude Code, Codex, and Hermes if you use them.
|
|
|
38
34
|
npx pushary@latest setup
|
|
39
35
|
```
|
|
40
36
|
|
|
41
|
-
### Option
|
|
37
|
+
### Option 2: Manual MCP
|
|
42
38
|
|
|
43
39
|
Add this to `.cursor/mcp.json` in your project, or `~/.cursor/mcp.json` for every project:
|
|
44
40
|
|
|
@@ -106,7 +102,7 @@ Then reload Cursor with Developer: Reload Window.
|
|
|
106
102
|
|
|
107
103
|
## Security
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
Your key is read at runtime from `PUSHARY_API_KEY`. The gate script has no dependencies. It sends approval and activity data to pushary.com by default; `PUSHARY_BASE_URL` can change that endpoint. Read `scripts/pushary-gate.mjs` to see exactly what it sends. See `SECURITY.md` for details.
|
|
110
106
|
|
|
111
107
|
## License
|
|
112
108
|
|
|
@@ -121,7 +121,7 @@ echo '{"hook_event_name":"PreToolUse","tool_name":"runTerminalCommand","tool_inp
|
|
|
121
121
|
|
|
122
122
|
## Security
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Your key is read at runtime from `PUSHARY_API_KEY`, the plugin `.mcp.json`, or `~/.pushary/config.json`. The gate script has no dependencies. It sends approval and activity data to pushary.com by default; `PUSHARY_BASE_URL` and `PUSHARY_API_URL` can change its API endpoints. Command text is redacted for common secret shapes before it is sent. Read `scripts/pushary-gate.mjs` to see exactly what it sends. See `SECURITY.md` for details.
|
|
125
125
|
|
|
126
126
|
## License
|
|
127
127
|
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-IHFDPV7C.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-WWOHTTVP.js";
|
|
8
|
+
import "../chunk-DPGSLWOS.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-HPRZJKRO.js";
|
|
10
|
+
import "../chunk-YIG2R3BJ.js";
|
|
11
|
+
import "../chunk-DL7XWKYV.js";
|
|
12
|
+
import "../chunk-LKLVTG3V.js";
|
|
13
|
+
import "../chunk-2QGYMY7A.js";
|
|
14
|
+
import "../chunk-3I6IVOZV.js";
|
|
15
|
+
import "../chunk-WG3K4TCH.js";
|
|
16
|
+
import "../chunk-ZBK6E2OR.js";
|
|
17
|
+
import "../chunk-CLOSJ4ES.js";
|
|
18
|
+
import "../chunk-M6BZZFVQ.js";
|
|
20
19
|
import "../chunk-XHKBHWLX.js";
|
|
21
20
|
import "../chunk-6ICPEJY5.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-CD47ZFFZ.js";
|
|
22
|
+
import "../chunk-DKMD6AWR.js";
|
|
24
23
|
import "../chunk-POFBE6ZY.js";
|
|
25
24
|
import "../chunk-GMXKITVA.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-N4QSPI3B.js";
|
|
26
|
+
import "../chunk-TCQ43LSG.js";
|
|
27
|
+
import "../chunk-DUZVXBBU.js";
|
|
29
28
|
import "../chunk-7QLSKOSU.js";
|
|
30
29
|
import "../chunk-KZERVKTD.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-FQ2GORVG.js";
|
|
31
|
+
import "../chunk-ZBHUHJG6.js";
|
|
33
32
|
import "../chunk-T7E75EKA.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-5QUPKDI5.js";
|
|
34
|
+
import "../chunk-7DVNSQWF.js";
|
|
35
|
+
import "../chunk-I5IJRMNV.js";
|
|
37
36
|
|
|
38
37
|
// bin/pushary-bell-hook.ts
|
|
39
38
|
var main = async () => {
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,37 +5,37 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-IHFDPV7C.js";
|
|
9
9
|
import {
|
|
10
10
|
addBellHooks,
|
|
11
11
|
bellInstalled,
|
|
12
12
|
removeBellHooks
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-WG3K4TCH.js";
|
|
14
14
|
import {
|
|
15
15
|
createIo
|
|
16
16
|
} from "../chunk-U4TMAANR.js";
|
|
17
17
|
import {
|
|
18
18
|
exitOnHelpFlag
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-CKV3UPMU.js";
|
|
20
20
|
import {
|
|
21
21
|
parseFlags
|
|
22
22
|
} from "../chunk-GMXKITVA.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-N4QSPI3B.js";
|
|
24
24
|
import "../chunk-7QLSKOSU.js";
|
|
25
25
|
import {
|
|
26
26
|
EXIT
|
|
27
27
|
} from "../chunk-KZERVKTD.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-FQ2GORVG.js";
|
|
29
29
|
import {
|
|
30
30
|
claudeSettings
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-ZBHUHJG6.js";
|
|
32
32
|
import {
|
|
33
33
|
readJsonSafe,
|
|
34
34
|
writeJsonAtomic
|
|
35
35
|
} from "../chunk-T7E75EKA.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-5QUPKDI5.js";
|
|
37
|
+
import "../chunk-7DVNSQWF.js";
|
|
38
|
+
import "../chunk-I5IJRMNV.js";
|
|
39
39
|
|
|
40
40
|
// bin/pushary-bell.ts
|
|
41
41
|
exitOnHelpFlag("bell");
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
describeIdleWindow,
|
|
9
9
|
startProcessOwnership,
|
|
10
10
|
withSpawnProcessOwnership
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-KF3UZLYI.js";
|
|
12
12
|
import {
|
|
13
13
|
announceSubscriptionRequired,
|
|
14
14
|
isDeferAnswer
|
|
@@ -18,24 +18,23 @@ import {
|
|
|
18
18
|
loadSessionKey,
|
|
19
19
|
registerTranscript,
|
|
20
20
|
registeredTranscriptEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-DPGSLWOS.js";
|
|
22
22
|
import "../chunk-SGZJ5LYH.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-MNWRUGMH.js";
|
|
26
|
-
import "../chunk-4YO4T5FV.js";
|
|
23
|
+
import "../chunk-YIG2R3BJ.js";
|
|
24
|
+
import "../chunk-DL7XWKYV.js";
|
|
27
25
|
import {
|
|
28
26
|
ensureDaemonRunning
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-LKLVTG3V.js";
|
|
28
|
+
import "../chunk-2QGYMY7A.js";
|
|
29
|
+
import "../chunk-3I6IVOZV.js";
|
|
30
|
+
import "../chunk-WG3K4TCH.js";
|
|
32
31
|
import {
|
|
33
32
|
encryptRecord
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-ZBK6E2OR.js";
|
|
34
|
+
import "../chunk-CLOSJ4ES.js";
|
|
36
35
|
import {
|
|
37
36
|
transcriptsEnabled
|
|
38
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-M6BZZFVQ.js";
|
|
39
38
|
import {
|
|
40
39
|
needsShell,
|
|
41
40
|
spawnClaude
|
|
@@ -51,7 +50,7 @@ import {
|
|
|
51
50
|
repoKeyFor,
|
|
52
51
|
reportEvent,
|
|
53
52
|
scopePathFor
|
|
54
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-KRCR2CRQ.js";
|
|
55
54
|
import {
|
|
56
55
|
DEFAULT_SESSION,
|
|
57
56
|
markPendingCommandDelivered,
|
|
@@ -61,10 +60,8 @@ import {
|
|
|
61
60
|
removePendingCommand,
|
|
62
61
|
savePendingCommand
|
|
63
62
|
} from "../chunk-N6IOSZOE.js";
|
|
64
|
-
import "../chunk-
|
|
63
|
+
import "../chunk-CD47ZFFZ.js";
|
|
65
64
|
import {
|
|
66
|
-
DECISION_STOP_REASON,
|
|
67
|
-
UNVERIFIABLE_APPROVAL_REASON,
|
|
68
65
|
askUser,
|
|
69
66
|
cancelQuestion,
|
|
70
67
|
isDecisionStopped,
|
|
@@ -72,36 +69,38 @@ import {
|
|
|
72
69
|
nextLongPollMs,
|
|
73
70
|
waitForAnswer,
|
|
74
71
|
withdrawQuestion
|
|
75
|
-
} from "../chunk-
|
|
76
|
-
import "../chunk-
|
|
72
|
+
} from "../chunk-2VZAALEJ.js";
|
|
73
|
+
import "../chunk-DKMD6AWR.js";
|
|
77
74
|
import "../chunk-POFBE6ZY.js";
|
|
78
75
|
import "../chunk-GMXKITVA.js";
|
|
79
|
-
import "../chunk-
|
|
76
|
+
import "../chunk-N4QSPI3B.js";
|
|
80
77
|
import {
|
|
81
78
|
SubscriptionRequiredError
|
|
82
|
-
} from "../chunk-
|
|
83
|
-
import "../chunk-
|
|
84
|
-
import "../chunk-
|
|
79
|
+
} from "../chunk-MKTJEXZ3.js";
|
|
80
|
+
import "../chunk-LWOO567I.js";
|
|
81
|
+
import "../chunk-TCQ43LSG.js";
|
|
85
82
|
import {
|
|
86
83
|
getMachineId
|
|
87
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-DUZVXBBU.js";
|
|
88
85
|
import "../chunk-7QLSKOSU.js";
|
|
89
86
|
import "../chunk-KZERVKTD.js";
|
|
90
|
-
import "../chunk-
|
|
91
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-FQ2GORVG.js";
|
|
88
|
+
import "../chunk-ZBHUHJG6.js";
|
|
92
89
|
import "../chunk-T7E75EKA.js";
|
|
93
90
|
import {
|
|
94
91
|
getApiKey,
|
|
95
92
|
getBaseUrl
|
|
96
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-5QUPKDI5.js";
|
|
97
94
|
import {
|
|
98
95
|
NPX_LATEST_COMMAND
|
|
99
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-7DVNSQWF.js";
|
|
100
97
|
import {
|
|
98
|
+
DECISION_STOP_REASON,
|
|
101
99
|
KILL_REASON,
|
|
100
|
+
UNVERIFIABLE_APPROVAL_REASON,
|
|
102
101
|
redactSecretsFromContent,
|
|
103
102
|
resolveGate
|
|
104
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-I5IJRMNV.js";
|
|
105
104
|
|
|
106
105
|
// src/wrapper/localPassthrough.ts
|
|
107
106
|
var SIGNAL_NUMBERS = {
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
appAgentKey,
|
|
4
|
+
macAppKeepsMcpEntry,
|
|
5
|
+
mcpServerBearer,
|
|
6
|
+
pusharyKey,
|
|
7
|
+
setupReceiptKey
|
|
8
|
+
} from "../chunk-OP7IHC2I.js";
|
|
2
9
|
import {
|
|
3
10
|
PUSHARY_SKILL_NAME,
|
|
4
11
|
PUSHARY_SKILL_SOURCE,
|
|
5
|
-
createGuards
|
|
12
|
+
createGuards
|
|
13
|
+
} from "../chunk-EUW7JL2K.js";
|
|
14
|
+
import {
|
|
15
|
+
isCursorPluginLeftover,
|
|
6
16
|
withoutPusharyCursorHooks
|
|
7
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-TCWKTUAE.js";
|
|
8
18
|
import {
|
|
9
19
|
HERMES_PIP_PACKAGE,
|
|
10
|
-
planFxRemoval,
|
|
11
20
|
readHermesStatus,
|
|
12
|
-
removeInstructionBlock,
|
|
13
21
|
resolveHermesPython,
|
|
14
22
|
runHermesConfigScript,
|
|
15
23
|
shortenHome,
|
|
16
24
|
unregisterPluginLocation,
|
|
17
25
|
vscodeSettingsTargets
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-W2KI5KPD.js";
|
|
26
|
+
} from "../chunk-KFF7G225.js";
|
|
20
27
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
removeCompatibleHooks,
|
|
26
|
-
removeCompatibleMcpServer
|
|
27
|
-
} from "../chunk-MZPXVH4A.js";
|
|
28
|
+
planFxRemoval,
|
|
29
|
+
removeInstructionBlock
|
|
30
|
+
} from "../chunk-ZN3C6GBG.js";
|
|
31
|
+
import "../chunk-HRULIYDU.js";
|
|
28
32
|
import {
|
|
29
33
|
OPENCODE_PLUGIN_SIBLING,
|
|
30
34
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -36,40 +40,45 @@ import {
|
|
|
36
40
|
openCodePluginDir,
|
|
37
41
|
openCodePluginFile,
|
|
38
42
|
removeOpenCodeMcpServer
|
|
39
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-MFF3ONG5.js";
|
|
40
44
|
import {
|
|
45
|
+
compatibleConfigFile,
|
|
46
|
+
compatibleInstructionsFile,
|
|
47
|
+
compatibleMcpFile,
|
|
48
|
+
compatiblePermissionRuleFile,
|
|
41
49
|
isClaudeMcpSnapshot,
|
|
42
50
|
removeClaudeMcpServers,
|
|
51
|
+
removeCompatibleHooks,
|
|
52
|
+
removeCompatibleMcpServer,
|
|
43
53
|
removePusharySettings,
|
|
44
54
|
removePusharyToolPermissions,
|
|
45
55
|
restoreClaudeMcpServer
|
|
46
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-KHNFLYJO.js";
|
|
47
57
|
import {
|
|
48
58
|
hookOwnerOf,
|
|
49
59
|
isHookTakeoverReceipt,
|
|
50
60
|
restoreHookTakeover,
|
|
51
61
|
restoreMcpServer
|
|
52
|
-
} from "../chunk-
|
|
53
|
-
import "../chunk-
|
|
62
|
+
} from "../chunk-YIG2R3BJ.js";
|
|
63
|
+
import "../chunk-DL7XWKYV.js";
|
|
64
|
+
import {
|
|
65
|
+
disableDaemonService
|
|
66
|
+
} from "../chunk-LKLVTG3V.js";
|
|
54
67
|
import {
|
|
55
68
|
liveBridgeProbe,
|
|
56
69
|
resolveBridgeStub
|
|
57
|
-
} from "../chunk-
|
|
58
|
-
import "../chunk-4YO4T5FV.js";
|
|
59
|
-
import {
|
|
60
|
-
disableDaemonService
|
|
61
|
-
} from "../chunk-VXRXFU6Q.js";
|
|
70
|
+
} from "../chunk-2QGYMY7A.js";
|
|
62
71
|
import {
|
|
63
72
|
removeGeminiSettings
|
|
64
|
-
} from "../chunk-
|
|
65
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-3I6IVOZV.js";
|
|
74
|
+
import "../chunk-WG3K4TCH.js";
|
|
66
75
|
import "../chunk-XHKBHWLX.js";
|
|
67
76
|
import "../chunk-6ICPEJY5.js";
|
|
68
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-KRCR2CRQ.js";
|
|
69
78
|
import "../chunk-N6IOSZOE.js";
|
|
70
|
-
import "../chunk-
|
|
71
|
-
import "../chunk-
|
|
72
|
-
import "../chunk-
|
|
79
|
+
import "../chunk-CD47ZFFZ.js";
|
|
80
|
+
import "../chunk-2VZAALEJ.js";
|
|
81
|
+
import "../chunk-DKMD6AWR.js";
|
|
73
82
|
import "../chunk-POFBE6ZY.js";
|
|
74
83
|
import {
|
|
75
84
|
ansiPainter,
|
|
@@ -77,7 +86,7 @@ import {
|
|
|
77
86
|
} from "../chunk-U4TMAANR.js";
|
|
78
87
|
import {
|
|
79
88
|
exitOnHelpFlag
|
|
80
|
-
} from "../chunk-
|
|
89
|
+
} from "../chunk-CKV3UPMU.js";
|
|
81
90
|
import {
|
|
82
91
|
rejectUnknownFlags
|
|
83
92
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -85,16 +94,16 @@ import {
|
|
|
85
94
|
CANDIDATE_RCS,
|
|
86
95
|
isDisabledExport,
|
|
87
96
|
removeClaudeAlias
|
|
88
|
-
} from "../chunk-
|
|
89
|
-
import "../chunk-
|
|
90
|
-
import "../chunk-
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
97
|
+
} from "../chunk-N4QSPI3B.js";
|
|
98
|
+
import "../chunk-MKTJEXZ3.js";
|
|
99
|
+
import "../chunk-LWOO567I.js";
|
|
100
|
+
import "../chunk-TCQ43LSG.js";
|
|
101
|
+
import "../chunk-DUZVXBBU.js";
|
|
93
102
|
import "../chunk-7QLSKOSU.js";
|
|
94
103
|
import {
|
|
95
104
|
EXIT
|
|
96
105
|
} from "../chunk-KZERVKTD.js";
|
|
97
|
-
import "../chunk-
|
|
106
|
+
import "../chunk-FQ2GORVG.js";
|
|
98
107
|
import {
|
|
99
108
|
bridgeAgentKey,
|
|
100
109
|
claudeJson,
|
|
@@ -132,12 +141,12 @@ import {
|
|
|
132
141
|
restoreCodexHookTrust,
|
|
133
142
|
vscodePluginDir,
|
|
134
143
|
vscodePluginMcp
|
|
135
|
-
} from "../chunk-
|
|
144
|
+
} from "../chunk-ZBHUHJG6.js";
|
|
136
145
|
import "../chunk-T7E75EKA.js";
|
|
137
|
-
import "../chunk-
|
|
146
|
+
import "../chunk-5QUPKDI5.js";
|
|
138
147
|
import {
|
|
139
148
|
NPX_LATEST_COMMAND
|
|
140
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-7DVNSQWF.js";
|
|
141
150
|
import {
|
|
142
151
|
CLI_PACKAGE_NAMES,
|
|
143
152
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -149,7 +158,7 @@ import {
|
|
|
149
158
|
globalRootFor,
|
|
150
159
|
isValidApiKey,
|
|
151
160
|
redactSecrets
|
|
152
|
-
} from "../chunk-
|
|
161
|
+
} from "../chunk-I5IJRMNV.js";
|
|
153
162
|
|
|
154
163
|
// bin/pushary-clean.ts
|
|
155
164
|
import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
|
|
@@ -526,21 +535,47 @@ var APP_OWNED_ENTRIES = [
|
|
|
526
535
|
// does the CLI. Not attributable, so it is kept whenever the app is installed
|
|
527
536
|
// rather than removed and left registered against a path that is gone.
|
|
528
537
|
"plugins",
|
|
529
|
-
"bridge-auth"
|
|
538
|
+
"bridge-auth",
|
|
539
|
+
"declined-agents.json"
|
|
530
540
|
];
|
|
531
541
|
var isAppOwned = (name) => APP_OWNED_ENTRIES.includes(name);
|
|
532
542
|
|
|
533
|
-
// src/
|
|
534
|
-
var
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
var
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
// src/compatible-clean.ts
|
|
544
|
+
var keepsMcpServer = (profile, scope, io, home) => {
|
|
545
|
+
const mcpPath = compatibleMcpFile(profile, home);
|
|
546
|
+
if (!mcpPath) return false;
|
|
547
|
+
const mcp = io.readJson(mcpPath);
|
|
548
|
+
return mcp !== null && scope.keepsMcpEntry(profile.agentType, mcpServerBearer(mcp.mcpServers));
|
|
549
|
+
};
|
|
550
|
+
var removalsByPath = (profile, removalScope2, home) => {
|
|
551
|
+
const removals = /* @__PURE__ */ new Map();
|
|
552
|
+
const add = (path, removal) => {
|
|
553
|
+
if (path) removals.set(path, [...removals.get(path) ?? [], removal]);
|
|
554
|
+
};
|
|
555
|
+
add(compatibleConfigFile(profile, home), (config) => removeCompatibleHooks(config, profile, removalScope2));
|
|
556
|
+
if (removalScope2.keepMcpServer !== true) {
|
|
557
|
+
add(compatibleMcpFile(profile, home), (config) => removeCompatibleMcpServer(config, profile));
|
|
558
|
+
add(compatiblePermissionRuleFile(profile, home), removePusharyToolPermissions);
|
|
559
|
+
}
|
|
560
|
+
return removals;
|
|
561
|
+
};
|
|
562
|
+
var cleanInstructions = (profile, scope, io, home) => {
|
|
563
|
+
const path = compatibleInstructionsFile(profile, home);
|
|
564
|
+
if (!path) return null;
|
|
565
|
+
if (scope.keepAppWiring) return { path, outcome: "kept_for_app" };
|
|
566
|
+
return { path, outcome: io.removeInstructionBlock(path) ? "removed" : "absent" };
|
|
567
|
+
};
|
|
568
|
+
var cleanCompatibleAgent = (profile, scope, io, home) => {
|
|
569
|
+
const mcpKeptForApp = keepsMcpServer(profile, scope, io, home);
|
|
570
|
+
const removalScope2 = { keepAppWiring: scope.keepAppWiring, keepMcpServer: mcpKeptForApp };
|
|
571
|
+
const files = [...removalsByPath(profile, removalScope2, home)].map(([path, removals]) => {
|
|
572
|
+
const config = io.readJson(path);
|
|
573
|
+
if (!config) return { path, outcome: "not_found" };
|
|
574
|
+
if (!removals.reduce((changed, remove) => remove(config) || changed, false)) return { path, outcome: "unchanged" };
|
|
575
|
+
io.writeJson(path, config);
|
|
576
|
+
return { path, outcome: "cleaned" };
|
|
577
|
+
});
|
|
578
|
+
return { profile, files, mcpKeptForApp, instructions: cleanInstructions(profile, scope, io, home) };
|
|
544
579
|
};
|
|
545
580
|
|
|
546
581
|
// bin/pushary-clean.ts
|
|
@@ -598,12 +633,10 @@ var wouldNote = (action, path) => {
|
|
|
598
633
|
var guards = createGuards(() => dryRun, wouldNote);
|
|
599
634
|
var guardedWrite = (path, contents) => guards.write(path, contents);
|
|
600
635
|
var guardedRemove = (path, options) => guards.remove(path, options);
|
|
601
|
-
var CURSOR_PLUGIN_STAGING = ".pushary-staging-";
|
|
602
636
|
var cursorPluginLeftovers = () => {
|
|
603
637
|
const parent = dirname(CURSOR_PLUGIN_DIR);
|
|
604
|
-
const backupPrefix = `${CURSOR_PLUGIN_DIR.split("/").pop()}.pushary-backup-`;
|
|
605
638
|
try {
|
|
606
|
-
return readdirSync4(parent).filter(
|
|
639
|
+
return readdirSync4(parent).filter(isCursorPluginLeftover).map((name) => join6(parent, name));
|
|
607
640
|
} catch {
|
|
608
641
|
return [];
|
|
609
642
|
}
|
|
@@ -1023,34 +1056,23 @@ var main = async () => {
|
|
|
1023
1056
|
} else {
|
|
1024
1057
|
console.log(` ${skip} Codex skill directory ${dim("(not found)")}`);
|
|
1025
1058
|
}
|
|
1059
|
+
const compatibleScope = { keepAppWiring: keepShared, keepsMcpEntry: macAppKeeps };
|
|
1060
|
+
const compatibleIo = { readJson, writeJson, removeInstructionBlock: guardedInstructionBlockRemoval };
|
|
1026
1061
|
for (const profile of HOOK_COMPATIBLE_PROFILES) {
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
for (const [path, edit] of edits) byPath.set(path, [...byPath.get(path) ?? [], edit]);
|
|
1034
|
-
for (const [path, removals] of byPath) {
|
|
1035
|
-
const config = readJson(path);
|
|
1036
|
-
if (!config) {
|
|
1037
|
-
console.log(` ${skip} ${profile.label} ${shortenHome(path)} ${dim("(not found)")}`);
|
|
1038
|
-
continue;
|
|
1039
|
-
}
|
|
1040
|
-
if (removals.reduce((changed, remove) => remove(config) || changed, false)) {
|
|
1041
|
-
writeJson(path, config);
|
|
1042
|
-
console.log(` ${check} ${profile.label} ${shortenHome(path)} ${dim(did("cleaned"))}`);
|
|
1043
|
-
} else {
|
|
1044
|
-
console.log(` ${skip} ${profile.label} ${shortenHome(path)} ${dim("(no pushary entries)")}`);
|
|
1045
|
-
}
|
|
1062
|
+
const report = cleanCompatibleAgent(profile, compatibleScope, compatibleIo);
|
|
1063
|
+
for (const file of report.files) {
|
|
1064
|
+
const label2 = `${profile.label} ${shortenHome(file.path)}`;
|
|
1065
|
+
if (file.outcome === "not_found") console.log(` ${skip} ${label2} ${dim("(not found)")}`);
|
|
1066
|
+
else if (file.outcome === "cleaned") console.log(` ${check} ${label2} ${dim(did("cleaned"))}`);
|
|
1067
|
+
else console.log(` ${skip} ${label2} ${dim(keepShared ? "(nothing the CLI wrote)" : "(no pushary entries)")}`);
|
|
1046
1068
|
}
|
|
1047
|
-
|
|
1069
|
+
if (report.mcpKeptForApp) console.log(` ${skip} ${profile.label} MCP server ${dim("(kept: the Mac app uses it)")}`);
|
|
1070
|
+
const instructions = report.instructions;
|
|
1048
1071
|
if (!instructions) continue;
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1072
|
+
const label = `${profile.label} ${shortenHome(instructions.path)}`;
|
|
1073
|
+
if (instructions.outcome === "kept_for_app") console.log(` ${skip} ${label} ${dim("(kept: the Mac app uses it)")}`);
|
|
1074
|
+
else if (instructions.outcome === "removed") console.log(` ${check} ${label} ${dim("(removed Pushary block)")}`);
|
|
1075
|
+
else console.log(` ${skip} ${label} ${dim("(no pushary block)")}`);
|
|
1054
1076
|
}
|
|
1055
1077
|
const geminiSettingsPath = geminiSettings();
|
|
1056
1078
|
const geminiSettings2 = readJson(geminiSettingsPath);
|