@pushary/agent-hooks 1.6.4 → 1.7.1
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 +19 -0
- package/README.md +3 -2
- package/dist/bin/pushary-bell-hook.js +23 -24
- package/dist/bin/pushary-bell.js +10 -11
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +173 -71
- package/dist/bin/pushary-codex-bridge.js +17 -18
- package/dist/bin/pushary-codex-hook.js +30 -31
- package/dist/bin/pushary-codex.js +12 -13
- package/dist/bin/pushary-connect.js +14 -15
- package/dist/bin/pushary-cowork.js +5 -6
- package/dist/bin/pushary-daemon.js +27 -28
- package/dist/bin/pushary-disconnect.js +17 -18
- package/dist/bin/pushary-doctor.js +104 -41
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +12 -13
- package/dist/bin/pushary-gemini-hook.js +27 -28
- package/dist/bin/pushary-hook.js +31 -32
- package/dist/bin/pushary-login.js +14 -16
- package/dist/bin/pushary-logout.js +8 -9
- package/dist/bin/pushary-mcp.d.ts +1 -0
- package/dist/bin/pushary-mcp.js +56 -0
- package/dist/bin/pushary-mode.js +10 -11
- package/dist/bin/pushary-notification-hook.js +27 -28
- package/dist/bin/pushary-opencode-hook.js +26 -27
- package/dist/bin/pushary-permission-denied-hook.js +31 -32
- package/dist/bin/pushary-permission-hook.js +30 -31
- package/dist/bin/pushary-post-hook.js +27 -28
- package/dist/bin/pushary-prompt-hook.js +27 -28
- package/dist/bin/pushary-session-end-hook.js +27 -28
- package/dist/bin/pushary-session-start-hook.js +31 -32
- package/dist/bin/pushary-setup.js +235 -100
- package/dist/bin/pushary-stats.js +5 -6
- package/dist/bin/pushary-status.js +16 -17
- package/dist/bin/pushary-stop-hook.js +27 -28
- package/dist/bin/pushary-stopfailure-hook.js +27 -28
- package/dist/bin/pushary-suggestions.js +5 -5
- package/dist/bin/pushary-transcript-register.js +19 -20
- package/dist/bin/pushary-transcripts.js +7 -8
- package/dist/bin/pushary-upgrade.js +20 -21
- package/dist/bin/pushary-wait.js +10 -11
- package/dist/bin/pushary.js +6 -7
- package/dist/chunk-2FU43B5Q.js +120 -0
- package/dist/{chunk-6NLWK6ZV.js → chunk-3QE3BHBW.js} +2 -2
- package/dist/{chunk-NYMPLNV3.js → chunk-3QORH5EJ.js} +3 -3
- package/dist/{chunk-LFMOYHPY.js → chunk-3T35OE7C.js} +2 -2
- package/dist/{chunk-5U3FJ6YF.js → chunk-42XR73I2.js} +8 -8
- package/dist/{chunk-UGKDBJJX.js → chunk-43SSQCWO.js} +3 -3
- package/dist/{chunk-K32C2RGK.js → chunk-454KMJHF.js} +17 -9
- package/dist/{chunk-YUGGNZSF.js → chunk-4C4NRDIC.js} +1 -1
- package/dist/{chunk-HUB4Q35G.js → chunk-55RO62FV.js} +1 -1
- package/dist/{chunk-YQMFGWBD.js → chunk-62TEPRWQ.js} +1 -1
- package/dist/{chunk-P4BNYJ5Q.js → chunk-6PV2JQ64.js} +2 -2
- package/dist/{chunk-53DN77WB.js → chunk-6SJQ442W.js} +2 -2
- package/dist/{chunk-UAP556WK.js → chunk-7GI6QC3M.js} +2 -2
- package/dist/{chunk-D3K2FPPJ.js → chunk-7GYGVQBU.js} +8 -8
- package/dist/{chunk-OZE2TQX5.js → chunk-AAGLDXH4.js} +5 -5
- package/dist/{chunk-XJG2FUWS.js → chunk-AHWJHLG5.js} +9 -30
- package/dist/{chunk-P4UYILQK.js → chunk-BYVB3RX3.js} +2 -2
- package/dist/{chunk-EA3IELHP.js → chunk-EIZW73P5.js} +6 -2
- package/dist/{chunk-BY2CRWBO.js → chunk-H6JV44TE.js} +1 -1
- package/dist/{chunk-3LU74H52.js → chunk-IGBDOZUO.js} +1 -1
- package/dist/{chunk-N62KAMMY.js → chunk-JMBG47WV.js} +30 -1
- package/dist/{chunk-DESAUCH2.js → chunk-JTQDP4ZL.js} +4 -6
- package/dist/{chunk-LJEL7IB5.js → chunk-KBLIVEFJ.js} +5 -5
- package/dist/{chunk-VOCZHOXV.js → chunk-KSNAAMU5.js} +4 -4
- package/dist/{chunk-5UWV5GHM.js → chunk-MCNS4725.js} +1 -1
- package/dist/{chunk-I3XJATMR.js → chunk-MWVCDP64.js} +1 -1
- package/dist/chunk-NAAZCNKI.js +757 -0
- package/dist/{chunk-3VZX4NSP.js → chunk-NID4UZDN.js} +1 -1
- package/dist/{chunk-BJENQBMH.js → chunk-NQFGVAT6.js} +8 -4
- package/dist/{chunk-XOMH53NB.js → chunk-O5JD7UI5.js} +1 -1
- package/dist/{chunk-5RUIFDTP.js → chunk-O5PRIYFZ.js} +30 -2
- package/dist/{chunk-OSJEMXSR.js → chunk-OAL44FM2.js} +1 -1
- package/dist/{chunk-66H2QQAK.js → chunk-OTZHT34O.js} +1 -1
- package/dist/{chunk-DZTKLE7Q.js → chunk-P5CBNSYL.js} +1 -1
- package/dist/{chunk-GBL4BTG3.js → chunk-Q7QRR6YL.js} +2 -2
- package/dist/{chunk-YPONELWS.js → chunk-QPR33SHS.js} +6 -6
- package/dist/{chunk-LDRGVXLR.js → chunk-SNWNA3MQ.js} +1 -1
- package/dist/{chunk-5SWQZ6HY.js → chunk-SVEMF2VO.js} +4 -4
- package/dist/{chunk-VHNDE3ZD.js → chunk-UPKP67TA.js} +2 -2
- package/dist/{chunk-PJF7L7AA.js → chunk-VCMFKZON.js} +2 -2
- package/dist/{chunk-H6XU22TN.js → chunk-WM3U2RUK.js} +8 -8
- package/dist/{chunk-ZA5UXRNE.js → chunk-WSC53O7I.js} +3 -3
- package/dist/{chunk-7CLTSZOL.js → chunk-WZWXBTRF.js} +3 -3
- package/dist/{chunk-YXPGFRRW.js → chunk-XDASEYRS.js} +3 -3
- package/dist/{chunk-CAS7GFWI.js → chunk-XFNVG3OV.js} +75 -5
- package/dist/{chunk-I2YUMZLE.js → chunk-XMN37YJH.js} +1 -1
- package/dist/{chunk-LQI7W4RG.js → chunk-XPMOCJHN.js} +1 -1
- package/dist/{chunk-VA2R64I7.js → chunk-XPTCPU6V.js} +1 -1
- package/dist/{chunk-PBKEYMAO.js → chunk-Y6GKOZBT.js} +1 -1
- package/dist/{chunk-JOGA3TL2.js → chunk-YQN7S57T.js} +6 -6
- package/dist/{chunk-R4HVHTNA.js → chunk-YZKS3ME3.js} +2 -2
- package/dist/chunk-ZEMSCGDD.js +87 -0
- package/dist/{chunk-EREBZHN2.js → chunk-ZIIYTQHC.js} +4 -4
- package/dist/{reapply-4DAJKNVP.js → reapply-66GQIBXN.js} +9 -10
- package/dist/src/index.js +19 -20
- package/package.json +2 -1
- package/dist/chunk-GU3EJCVV.js +0 -43
- package/dist/chunk-HWJW3CPO.js +0 -65
- package/dist/chunk-NFH73H5B.js +0 -360
- package/dist/chunk-P32LPT2L.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JTQDP4ZL.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OAL44FM2.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XFNVG3OV.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOOK_BUDGETS,
|
|
3
3
|
HOOK_LOCATOR_BINARY,
|
|
4
|
+
isReleaseVersion,
|
|
4
5
|
withHookHoldBudget
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
isReleaseVersion
|
|
8
|
-
} from "./chunk-HWJW3CPO.js";
|
|
6
|
+
} from "./chunk-XFNVG3OV.js";
|
|
9
7
|
|
|
10
8
|
// src/npm.ts
|
|
11
9
|
import { execFileSync, execSync } from "child_process";
|
|
@@ -246,10 +244,6 @@ var guardedArgv = (target, args = [], platform = process.platform) => {
|
|
|
246
244
|
return [shell, ...shellArgs, HOOK_GUARD_SCRIPTS[guardKindOf(target)], path, ...args];
|
|
247
245
|
};
|
|
248
246
|
|
|
249
|
-
// src/removal-scope.ts
|
|
250
|
-
var namesAppLocator = (command) => command.includes(HOOK_LOCATOR_BINARY);
|
|
251
|
-
var isProtectedByScope = (command, scope) => scope?.keepAppWiring === true && namesAppLocator(command);
|
|
252
|
-
|
|
253
247
|
// src/codex-config.ts
|
|
254
248
|
import { createHash } from "crypto";
|
|
255
249
|
import { homedir } from "os";
|
|
@@ -301,6 +295,10 @@ var registerHookEntry = (existing, isOurs, entry) => {
|
|
|
301
295
|
return rewritten;
|
|
302
296
|
};
|
|
303
297
|
|
|
298
|
+
// src/removal-scope.ts
|
|
299
|
+
var namesAppLocator = (command) => command.includes(HOOK_LOCATOR_BINARY);
|
|
300
|
+
var isProtectedByScope = (command, scope) => scope?.keepAppWiring === true && namesAppLocator(command);
|
|
301
|
+
|
|
304
302
|
// src/canonical-json.ts
|
|
305
303
|
var canonicalJson = (value) => {
|
|
306
304
|
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
@@ -628,12 +626,17 @@ var autoUpdateLog = () => join3(pusharyDir(), "logs", "auto-update.log");
|
|
|
628
626
|
var clientReportClaims = () => join3(pusharyDir(), "client-reports");
|
|
629
627
|
var claudeRegistrationReceipt = () => join3(pusharyDir(), "setup", "claude-registration.json");
|
|
630
628
|
var hermesConfigReceipt = () => join3(pusharyDir(), "setup", "hermes-config.json");
|
|
629
|
+
var fxQuestionRuleReceipt = () => join3(pusharyDir(), "setup", "fx-question-rule.json");
|
|
631
630
|
var hookTakeoverReceipt = (agent) => join3(pusharyDir(), "setup", `hook-takeover-${agent}.json`);
|
|
632
631
|
var codexSkillDir2 = () => join3(codexHome(), "skills", "pushary");
|
|
633
632
|
var codexAgentsMd2 = () => join3(codexHome(), "AGENTS.md");
|
|
634
633
|
var geminiSettings = () => join3(homedir2(), ".gemini", "settings.json");
|
|
635
634
|
var geminiMd = () => join3(homedir2(), ".gemini", "GEMINI.md");
|
|
636
635
|
var pusharyConfigFile = () => join3(homedir2(), ".pushary", "config.json");
|
|
636
|
+
var fxConfigDir = () => join3(homedir2(), ".fx");
|
|
637
|
+
var fxMcpProfile = () => join3(fxConfigDir(), "mcp.json");
|
|
638
|
+
var fxSettings = () => join3(fxConfigDir(), "settings.json");
|
|
639
|
+
var fxAgentsMd = () => join3(fxConfigDir(), "AGENTS.md");
|
|
637
640
|
|
|
638
641
|
export {
|
|
639
642
|
registeredCommands,
|
|
@@ -702,10 +705,15 @@ export {
|
|
|
702
705
|
clientReportClaims,
|
|
703
706
|
claudeRegistrationReceipt,
|
|
704
707
|
hermesConfigReceipt,
|
|
708
|
+
fxQuestionRuleReceipt,
|
|
705
709
|
hookTakeoverReceipt,
|
|
706
710
|
codexSkillDir2,
|
|
707
711
|
codexAgentsMd2,
|
|
708
712
|
geminiSettings,
|
|
709
713
|
geminiMd,
|
|
710
|
-
pusharyConfigFile
|
|
714
|
+
pusharyConfigFile,
|
|
715
|
+
fxConfigDir,
|
|
716
|
+
fxMcpProfile,
|
|
717
|
+
fxSettings,
|
|
718
|
+
fxAgentsMd
|
|
711
719
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EIZW73P5.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XFNVG3OV.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
codexHooksJsonIn,
|
|
7
7
|
isPusharyCodexCommand,
|
|
8
8
|
resolvePathBinary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-454KMJHF.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XFNVG3OV.js";
|
|
13
13
|
|
|
14
14
|
// src/codex-app-server.ts
|
|
15
15
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7GYGVQBU.js";
|
|
4
4
|
import {
|
|
5
5
|
writeDegraded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KSNAAMU5.js";
|
|
7
7
|
|
|
8
8
|
// src/tool-hook-input.ts
|
|
9
9
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SVEMF2VO.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDaemonRunning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AAGLDXH4.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
wrapSessionKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O5JD7UI5.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchTranscriptRecipients,
|
|
21
21
|
uploadTranscriptRecords
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OTZHT34O.js";
|
|
23
23
|
import {
|
|
24
24
|
transcriptEnvironmentPreference,
|
|
25
25
|
transcriptsEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XPTCPU6V.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YZKS3ME3.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-454KMJHF.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-T7E75EKA.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-OAL44FM2.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YZKS3ME3.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P5CBNSYL.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-454KMJHF.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
} from "./chunk-T7E75EKA.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OAL44FM2.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XFNVG3OV.js";
|
|
27
27
|
|
|
28
28
|
// src/daemon-lifecycle.ts
|
|
29
29
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -8,21 +8,23 @@ import {
|
|
|
8
8
|
writeHuman
|
|
9
9
|
} from "./chunk-QCGNGEGE.js";
|
|
10
10
|
import {
|
|
11
|
+
clipToRow,
|
|
12
|
+
terminalColumns,
|
|
11
13
|
useColor
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O5PRIYFZ.js";
|
|
13
15
|
import {
|
|
14
16
|
callMcpTool
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NQFGVAT6.js";
|
|
16
18
|
import {
|
|
17
19
|
reportedInstallSource
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UPKP67TA.js";
|
|
21
|
+
import {
|
|
22
|
+
NPX_LATEST_COMMAND
|
|
23
|
+
} from "./chunk-EIZW73P5.js";
|
|
19
24
|
import {
|
|
20
25
|
PAIR_TTL_SECONDS,
|
|
21
26
|
isAnswerSource
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
NPX_LATEST_COMMAND
|
|
25
|
-
} from "./chunk-EA3IELHP.js";
|
|
27
|
+
} from "./chunk-XFNVG3OV.js";
|
|
26
28
|
|
|
27
29
|
// src/reach.ts
|
|
28
30
|
var reachVerdict = (channels) => {
|
|
@@ -462,29 +464,6 @@ var writeStatusLine = (text) => {
|
|
|
462
464
|
` : ` ${text}
|
|
463
465
|
`);
|
|
464
466
|
};
|
|
465
|
-
var visibleLength = (text) => text.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
466
|
-
var clipToRow = (text, columns) => {
|
|
467
|
-
const budget = columns - 4;
|
|
468
|
-
if (budget <= 1 || visibleLength(text) <= budget) return text;
|
|
469
|
-
let visible = 0;
|
|
470
|
-
let out = "";
|
|
471
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
472
|
-
const escape = /^\x1b\[[0-9;]*m/.exec(text.slice(i));
|
|
473
|
-
if (escape) {
|
|
474
|
-
out += escape[0];
|
|
475
|
-
i += escape[0].length - 1;
|
|
476
|
-
continue;
|
|
477
|
-
}
|
|
478
|
-
if (visible >= budget - 1) break;
|
|
479
|
-
out += text[i];
|
|
480
|
-
visible += 1;
|
|
481
|
-
}
|
|
482
|
-
return `${out}\u2026`;
|
|
483
|
-
};
|
|
484
|
-
var terminalColumns = () => {
|
|
485
|
-
const columns = process.stdout.columns;
|
|
486
|
-
return typeof columns === "number" && columns > 0 ? columns : 80;
|
|
487
|
-
};
|
|
488
467
|
var startSpinner = (getLabel) => {
|
|
489
468
|
if (!humanIsTty()) {
|
|
490
469
|
writeHuman(` ${getLabel()}
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-454KMJHF.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
10
10
|
} from "./chunk-T7E75EKA.js";
|
|
11
11
|
import {
|
|
12
12
|
ownPackageRoot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XFNVG3OV.js";
|
|
14
14
|
|
|
15
15
|
// src/auto-update.ts
|
|
16
16
|
import { spawn } from "child_process";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SETUP_AGENT_CHOICES
|
|
3
|
+
} from "./chunk-XFNVG3OV.js";
|
|
4
|
+
|
|
1
5
|
// src/cli/commands.ts
|
|
2
6
|
var NPX_LATEST_COMMAND = "npx @pushary/agent-hooks@latest";
|
|
3
7
|
var COMMAND_LIST = [
|
|
@@ -9,7 +13,7 @@ var COMMAND_LIST = [
|
|
|
9
13
|
{
|
|
10
14
|
name: "setup",
|
|
11
15
|
module: "pushary-setup",
|
|
12
|
-
summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, or
|
|
16
|
+
summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, OpenCode, or fx with Pushary"
|
|
13
17
|
},
|
|
14
18
|
{
|
|
15
19
|
name: "claude",
|
|
@@ -175,7 +179,7 @@ var SETUP_OPTIONS = [
|
|
|
175
179
|
["--dry-run", "Print what would be written and change nothing"],
|
|
176
180
|
["--json", "Emit one machine-readable object instead of the human report"]
|
|
177
181
|
];
|
|
178
|
-
var AGENT_IDS = "
|
|
182
|
+
var AGENT_IDS = SETUP_AGENT_CHOICES.join(", ");
|
|
179
183
|
var USAGE_EXAMPLES = [
|
|
180
184
|
"npx @pushary/agent-hooks@latest setup",
|
|
181
185
|
"npx @pushary/agent-hooks@latest setup --agents auto --yes --skip-phone",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
pusharyHookExecutable
|
|
3
|
+
} from "./chunk-XDASEYRS.js";
|
|
4
|
+
import {
|
|
5
|
+
isProtectedByScope,
|
|
6
|
+
registerHookEntry,
|
|
2
7
|
resolvePathBinary
|
|
3
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-454KMJHF.js";
|
|
4
9
|
|
|
5
10
|
// src/hermes-config.ts
|
|
6
11
|
import { execFileSync } from "child_process";
|
|
@@ -260,6 +265,28 @@ var installAgentSkill = async (request, effects) => {
|
|
|
260
265
|
return "packaged-copy";
|
|
261
266
|
};
|
|
262
267
|
|
|
268
|
+
// src/cursor-config.ts
|
|
269
|
+
var hookCommandOf = (entry) => {
|
|
270
|
+
const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
|
|
271
|
+
return typeof command === "string" ? command : "";
|
|
272
|
+
};
|
|
273
|
+
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
|
|
274
|
+
var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
|
|
275
|
+
var withoutPusharyCursorHooks = (hooks, scope) => {
|
|
276
|
+
let removed = 0;
|
|
277
|
+
const kept = {};
|
|
278
|
+
for (const [event, entries] of Object.entries(hooks)) {
|
|
279
|
+
if (!Array.isArray(entries)) {
|
|
280
|
+
kept[event] = entries;
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
const others = entries.filter((entry) => !isPusharyCursorEntry(entry) || isProtectedByScope(hookCommandOf(entry), scope));
|
|
284
|
+
removed += entries.length - others.length;
|
|
285
|
+
if (others.length > 0 || entries.length === 0) kept[event] = others;
|
|
286
|
+
}
|
|
287
|
+
return { hooks: kept, removed };
|
|
288
|
+
};
|
|
289
|
+
|
|
263
290
|
// src/cli/dry-run.ts
|
|
264
291
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
265
292
|
import { rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -302,6 +329,8 @@ export {
|
|
|
302
329
|
PUSHARY_SKILL_NAME,
|
|
303
330
|
installSkillViaSkillsCli,
|
|
304
331
|
installAgentSkill,
|
|
332
|
+
registerCursorGate,
|
|
333
|
+
withoutPusharyCursorHooks,
|
|
305
334
|
createGuards,
|
|
306
335
|
describeSetupSideEffects
|
|
307
336
|
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P5CBNSYL.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
clientContextHeaders
|
|
12
|
-
} from "./chunk-CAS7GFWI.js";
|
|
9
|
+
} from "./chunk-OAL44FM2.js";
|
|
13
10
|
import {
|
|
11
|
+
clientContextHeaders,
|
|
14
12
|
getPackageVersion
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XFNVG3OV.js";
|
|
16
14
|
|
|
17
15
|
// src/cli/net.ts
|
|
18
16
|
import { createRequire } from "module";
|
|
@@ -3,28 +3,28 @@ import {
|
|
|
3
3
|
addPusharyToolPermissions,
|
|
4
4
|
isPusharyHook,
|
|
5
5
|
removeClaudeMcpServers
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WSC53O7I.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
addGeminiMcpServer,
|
|
10
10
|
removeGeminiMcpServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WZWXBTRF.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_CODE_AGENT,
|
|
14
14
|
parseApplyPatchFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WM3U2RUK.js";
|
|
16
16
|
import {
|
|
17
17
|
guardBinary,
|
|
18
18
|
holdBudgetOf,
|
|
19
19
|
registerHookEntry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-454KMJHF.js";
|
|
21
21
|
import {
|
|
22
22
|
PHONE_ANSWERED_TOOLS,
|
|
23
23
|
hookCompatibleProfile,
|
|
24
24
|
hookCompatibleProfileBySource,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XFNVG3OV.js";
|
|
28
28
|
|
|
29
29
|
// src/compatible-config.ts
|
|
30
30
|
import { homedir } from "os";
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from "./chunk-POFBE6ZY.js";
|
|
5
5
|
import {
|
|
6
6
|
isNetworkFailure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JTQDP4ZL.js";
|
|
8
8
|
import {
|
|
9
9
|
clientReportClaims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-454KMJHF.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey,
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OAL44FM2.js";
|
|
15
15
|
import {
|
|
16
16
|
CLIENT_REPORT_PATH,
|
|
17
17
|
degradedLine
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XFNVG3OV.js";
|
|
19
19
|
|
|
20
20
|
// src/client-report-claim.ts
|
|
21
21
|
import { createHash } from "crypto";
|