@pushary/agent-hooks 1.9.7 → 1.9.9
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 +18 -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 -24
- package/dist/bin/pushary-bell.js +13 -13
- package/dist/bin/pushary-claude.js +28 -30
- package/dist/bin/pushary-clean.js +113 -94
- package/dist/bin/pushary-codex-bridge.js +20 -20
- package/dist/bin/pushary-codex-hook.js +36 -38
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +48 -22
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +50 -40
- package/dist/bin/pushary-disconnect.js +188 -56
- package/dist/bin/pushary-doctor.js +105 -85
- package/dist/bin/pushary-elicitation-hook.js +25 -27
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +31 -33
- package/dist/bin/pushary-hook.js +36 -39
- 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 +29 -32
- package/dist/bin/pushary-opencode-hook.js +30 -32
- package/dist/bin/pushary-permission-denied-hook.js +30 -33
- package/dist/bin/pushary-permission-hook.js +33 -36
- package/dist/bin/pushary-post-hook.js +30 -33
- package/dist/bin/pushary-prompt-hook.js +29 -32
- package/dist/bin/pushary-session-end-hook.js +29 -32
- package/dist/bin/pushary-session-start-hook.js +33 -36
- package/dist/bin/pushary-setup.js +168 -160
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +65 -19
- package/dist/bin/pushary-stop-hook.js +29 -32
- package/dist/bin/pushary-stopfailure-hook.js +29 -32
- package/dist/bin/pushary-suggestions.js +19 -21
- package/dist/bin/pushary-transcript-register.js +18 -20
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +50 -26
- package/dist/bin/pushary-wait.js +23 -19
- package/dist/bin/pushary.js +15 -14
- package/dist/{chunk-4FK6RZVJ.js → chunk-462EQA6K.js} +1 -1
- package/dist/{chunk-STQRUH3S.js → chunk-5DCDQ5VW.js} +59 -15
- package/dist/{chunk-JXISQ7DT.js → chunk-5N5L6DNN.js} +3 -3
- package/dist/{chunk-QR6VE5ME.js → chunk-5RGA636G.js} +79 -17
- package/dist/{chunk-L76HTPU6.js → chunk-6AYSKVLL.js} +3 -3
- package/dist/{chunk-NIBFSARF.js → chunk-6EBGOHDJ.js} +33 -13
- package/dist/{chunk-QQ4HBXZC.js → chunk-6W5M3MSE.js} +84 -673
- package/dist/{chunk-R3YW55MY.js → chunk-AI7RMFVV.js} +29 -26
- package/dist/{chunk-AUUXS44H.js → chunk-APP43AW7.js} +1 -1
- package/dist/{chunk-RQGODFQN.js → chunk-AZOKPWVI.js} +1 -1
- package/dist/{chunk-3GNUXXDZ.js → chunk-B5NMSP3V.js} +2 -2
- package/dist/{chunk-4D2AYNSE.js → chunk-BNSKVIAW.js} +2 -2
- package/dist/chunk-BYLKCZ2G.js +367 -0
- package/dist/{chunk-X5NXPCIC.js → chunk-BZLHTMT6.js} +89 -7
- package/dist/{chunk-BTQGAXZ3.js → chunk-COQ64C4F.js} +10 -10
- package/dist/{chunk-N4EUSDKX.js → chunk-DCCSULXK.js} +14 -14
- package/dist/{chunk-JWKBDSPF.js → chunk-DP3WX7FW.js} +2 -2
- package/dist/chunk-E5HOHIUV.js +52 -0
- package/dist/{chunk-GU3EJCVV.js → chunk-EA5NWDK7.js} +4 -0
- package/dist/chunk-EIAEUG7G.js +46 -0
- package/dist/{chunk-EB4XGVBG.js → chunk-EUW7JL2K.js} +0 -32
- package/dist/{chunk-T7Y5EADL.js → chunk-F7R3SZ4Q.js} +2 -2
- package/dist/{chunk-H37L7TT3.js → chunk-G7RIDXAT.js} +2 -2
- package/dist/{chunk-W2KI5KPD.js → chunk-H5T27W7M.js} +2 -2
- package/dist/chunk-HBWYMRR5.js +94 -0
- package/dist/{chunk-CBQACHKY.js → chunk-IIVZZMSO.js} +1 -1
- package/dist/{chunk-Z6HPS67T.js → chunk-IRHABAQT.js} +1 -1
- package/dist/{chunk-QTO6HEZD.js → chunk-K545B734.js} +2 -2
- package/dist/{chunk-KYO45G5L.js → chunk-KOWFRUIT.js} +1 -1
- package/dist/{chunk-QFEM7R6T.js → chunk-KQFTBQ66.js} +11 -11
- package/dist/chunk-LENBKYRB.js +50 -0
- package/dist/{chunk-JCWZ23MJ.js → chunk-M3STIAGU.js} +3 -3
- package/dist/{chunk-6DJTDHBI.js → chunk-MD4SVNT6.js} +1 -1
- package/dist/{chunk-7264S5HZ.js → chunk-MLGIVVSG.js} +1 -1
- package/dist/{chunk-H7MMU64M.js → chunk-NGKUXZID.js} +2 -2
- package/dist/{chunk-JWQZSYCK.js → chunk-NUVGDBZC.js} +1 -1
- package/dist/{chunk-AQ55ZSSS.js → chunk-OAYWO5NP.js} +1 -1
- package/dist/chunk-Q6C6ILUS.js +49 -0
- package/dist/{chunk-MBK7N46B.js → chunk-QIOIO7VN.js} +6 -6
- package/dist/{chunk-KFKL3FHS.js → chunk-QRXPWW3M.js} +4 -3
- package/dist/{chunk-7OIWWZAD.js → chunk-QTIUJZRX.js} +3 -3
- package/dist/{chunk-XWAYAO3V.js → chunk-R5RIVOPL.js} +2 -2
- package/dist/{chunk-ADSQDYYG.js → chunk-REU2VQPH.js} +54 -5
- package/dist/{chunk-GKI6LFAV.js → chunk-RQ32ADJP.js} +2 -2
- package/dist/{chunk-VXRXFU6Q.js → chunk-SZ4Q6ZVS.js} +14 -7
- package/dist/{chunk-KT5E2RLS.js → chunk-T6ZN4TEF.js} +1 -1
- package/dist/{chunk-UFVGSEWH.js → chunk-TO3PS646.js} +2 -2
- package/dist/chunk-UAP5DS6P.js +599 -0
- package/dist/{chunk-MZPXVH4A.js → chunk-UF6RBP5V.js} +204 -28
- package/dist/{chunk-AVNKVF7N.js → chunk-UPIZSCYD.js} +4 -4
- package/dist/{chunk-3PVDOCFI.js → chunk-VHPFNLRS.js} +5 -5
- package/dist/{chunk-HPRZJKRO.js → chunk-VIIHC42X.js} +1 -1
- package/dist/{chunk-D6S5EKXA.js → chunk-WRPYCIV2.js} +8 -12
- package/dist/{chunk-ZUTU43FT.js → chunk-Z23ZBYDW.js} +6 -4
- package/dist/{chunk-SBLPHUEB.js → chunk-ZGADIZDS.js} +8 -6
- package/dist/{global-upgrade-E2HUEB4B.js → global-upgrade-H272QOGD.js} +6 -6
- package/dist/{paths-QVTEGNZV.js → paths-HMVOTFUN.js} +2 -2
- package/dist/reapply-Q5NHDTVU.js +55 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -20
- package/dist/{upgrade-lock-JCIDZMHF.js → upgrade-lock-L3GHFIRW.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4YO4T5FV.js +0 -149
- package/dist/chunk-ANEAA37E.js +0 -197
- package/dist/chunk-MNWRUGMH.js +0 -86
- package/dist/chunk-RQSOEB4S.js +0 -44
- package/dist/chunk-SD3272LS.js +0 -143
- package/dist/reapply-5QVKM6LA.js +0 -38
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NGKUXZID.js";
|
|
4
|
+
import {
|
|
5
|
+
detectClaudeVersion
|
|
6
|
+
} from "./chunk-RIVNNBEK.js";
|
|
4
7
|
import {
|
|
5
8
|
OPENCODE_HOOK_BINARY,
|
|
9
|
+
agentHookOwner,
|
|
6
10
|
installOpenCodePlugin,
|
|
11
|
+
macAppBridgeAvailable,
|
|
7
12
|
openCodeHookArgv,
|
|
8
13
|
openCodePluginDir,
|
|
9
14
|
openCodeWired
|
|
10
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BZLHTMT6.js";
|
|
11
16
|
import {
|
|
12
17
|
addClaudeMcpServer,
|
|
13
18
|
addPusharyHooks,
|
|
14
19
|
addPusharyToolPermissions
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
detectClaudeVersion
|
|
18
|
-
} from "./chunk-RIVNNBEK.js";
|
|
20
|
+
} from "./chunk-UF6RBP5V.js";
|
|
19
21
|
import {
|
|
20
22
|
claudeUnprovenHolds,
|
|
21
23
|
claudeWired,
|
|
22
24
|
codexUnprovenHolds,
|
|
23
25
|
codexWired,
|
|
24
|
-
geminiWired
|
|
25
|
-
|
|
26
|
+
geminiWired,
|
|
27
|
+
planHooks
|
|
28
|
+
} from "./chunk-BYLKCZ2G.js";
|
|
26
29
|
import {
|
|
27
30
|
CLAUDE_HOOK_BINARY,
|
|
28
31
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -33,7 +36,7 @@ import {
|
|
|
33
36
|
needsReregistration,
|
|
34
37
|
registrationSignatures,
|
|
35
38
|
supportedClaudeEvents
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-M3STIAGU.js";
|
|
37
40
|
import {
|
|
38
41
|
formatVersion
|
|
39
42
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -56,7 +59,7 @@ import {
|
|
|
56
59
|
registrationHolderOf,
|
|
57
60
|
resolveGlobalBinary,
|
|
58
61
|
vscodePluginMcp
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-Z23ZBYDW.js";
|
|
60
63
|
import {
|
|
61
64
|
readJsonSafe,
|
|
62
65
|
writeFileAtomic,
|
|
@@ -322,7 +325,19 @@ var reapplyOpenCodePlugin = (paths = {}) => {
|
|
|
322
325
|
return { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
|
|
323
326
|
}
|
|
324
327
|
};
|
|
325
|
-
var
|
|
328
|
+
var SETUP_CHOICE_BY_REAPPLY_ID = {
|
|
329
|
+
claude: "claude_code",
|
|
330
|
+
codex: "codex",
|
|
331
|
+
gemini: "gemini_cli",
|
|
332
|
+
cursor: "cursor",
|
|
333
|
+
vscode: "vscode",
|
|
334
|
+
opencode: "opencode"
|
|
335
|
+
};
|
|
336
|
+
var reapplyHookOwner = (id, appAvailable) => agentHookOwner(SETUP_CHOICE_BY_REAPPLY_ID[id], appAvailable);
|
|
337
|
+
var reapplyHolder = (id, appAvailable) => planHooks({ owner: reapplyHookOwner(id, appAvailable), takeOverHooks: false, nonInteractive: true }) === "keep" ? "app" : "cli";
|
|
338
|
+
var KEPT_FOR_APP = { configured: true, reapplied: false, hooks: false, mcp: false };
|
|
339
|
+
var FAILED_REAPPLY = { configured: false, reapplied: false, hooks: false, mcp: false, failed: true };
|
|
340
|
+
var reapplyAllAgents = (apiKey, options = {}) => {
|
|
326
341
|
const runners = [
|
|
327
342
|
{ id: "claude", label: "Claude Code", run: () => reapplyClaudeSettings(apiKey) },
|
|
328
343
|
{ id: "codex", label: "Codex", run: () => reapplyCodexSettings(apiKey) },
|
|
@@ -331,13 +346,18 @@ var reapplyAllAgents = (apiKey) => {
|
|
|
331
346
|
{ id: "vscode", label: "VS Code", run: () => reapplyVsCodePlugin(apiKey) },
|
|
332
347
|
{ id: "opencode", label: "OpenCode", run: () => reapplyOpenCodePlugin() }
|
|
333
348
|
];
|
|
349
|
+
const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
|
|
334
350
|
const done = [];
|
|
335
351
|
for (const runner of runners) {
|
|
336
352
|
try {
|
|
353
|
+
if (reapplyHolder(runner.id, appAvailable) === "app") {
|
|
354
|
+
done.push({ id: runner.id, label: runner.label, heldBy: "app", result: KEPT_FOR_APP });
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
337
357
|
const result = runner.run();
|
|
338
|
-
if (result.configured) done.push({ id: runner.id, label: runner.label, result });
|
|
358
|
+
if (result.configured) done.push({ id: runner.id, label: runner.label, heldBy: "cli", result });
|
|
339
359
|
} catch {
|
|
340
|
-
done.push({ id: runner.id, label: runner.label,
|
|
360
|
+
done.push({ id: runner.id, label: runner.label, heldBy: "cli", result: FAILED_REAPPLY });
|
|
341
361
|
}
|
|
342
362
|
}
|
|
343
363
|
return done;
|