@pushary/agent-hooks 1.9.63 → 1.9.64
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 +1 -1
- package/dist/{api-UHUUAONF.js → api-HDLTZTVR.js} +10 -11
- package/dist/bin/pushary-bell-hook.js +27 -30
- package/dist/bin/pushary-bell.js +12 -13
- package/dist/bin/pushary-claude.js +28 -31
- package/dist/bin/pushary-clean.js +63 -43
- package/dist/bin/pushary-codex-bridge.js +22 -24
- package/dist/bin/pushary-codex-hook.js +34 -37
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -15
- package/dist/bin/pushary-connect.js +26 -29
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +39 -42
- package/dist/bin/pushary-disconnect.js +62 -43
- package/dist/bin/pushary-doctor.js +85 -44
- package/dist/bin/pushary-elicitation-hook.js +27 -30
- package/dist/bin/pushary-gemini-bridge.js +16 -18
- package/dist/bin/pushary-gemini-hook.js +29 -32
- package/dist/bin/pushary-hook.js +31 -34
- package/dist/bin/pushary-login.js +19 -20
- package/dist/bin/pushary-logout.js +26 -29
- package/dist/bin/pushary-mcp.js +11 -12
- package/dist/bin/pushary-mode.js +14 -15
- package/dist/bin/pushary-notification-hook.js +26 -29
- package/dist/bin/pushary-opencode-hook.js +28 -31
- package/dist/bin/pushary-permission-denied-hook.js +31 -34
- package/dist/bin/pushary-permission-hook.js +30 -33
- package/dist/bin/pushary-post-hook.js +26 -29
- package/dist/bin/pushary-prompt-hook.js +26 -29
- package/dist/bin/pushary-session-end-hook.js +28 -31
- package/dist/bin/pushary-session-start-hook.js +35 -38
- package/dist/bin/pushary-setup.js +108 -69
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +31 -34
- package/dist/bin/pushary-stop-hook.js +26 -29
- package/dist/bin/pushary-stopfailure-hook.js +26 -29
- package/dist/bin/pushary-suggestions.js +14 -15
- package/dist/bin/pushary-transcript-register.js +18 -21
- package/dist/bin/pushary-transcripts.js +17 -18
- package/dist/bin/pushary-upgrade.js +40 -44
- package/dist/bin/pushary-wait.js +14 -15
- package/dist/bin/pushary.js +7 -8
- package/dist/{chunk-OU3BYBJ3.js → chunk-2CEVEMJE.js} +3 -3
- package/dist/{chunk-HAIXS4OX.js → chunk-2EY4HGLG.js} +3 -3
- package/dist/{chunk-ELAK46NR.js → chunk-2KID4FK4.js} +4 -4
- package/dist/{chunk-WUOOZE5S.js → chunk-2PKHGHMA.js} +2 -2
- package/dist/{chunk-V5W3CK7F.js → chunk-2VADJ6JH.js} +2 -2
- package/dist/{chunk-KUCL7ETL.js → chunk-2YXBCZ3Z.js} +1 -1
- package/dist/{chunk-3GVV7XVT.js → chunk-2Z7I7DHT.js} +1 -1
- package/dist/{chunk-7GRQGXF4.js → chunk-3KXBRSL3.js} +1 -1
- package/dist/{chunk-T3GHXR6N.js → chunk-42PD2MQH.js} +5 -5
- package/dist/{chunk-T6XQNOZV.js → chunk-57PU5OBL.js} +12 -12
- package/dist/{chunk-4WFAP6QN.js → chunk-5NP3OJ5P.js} +9 -11
- package/dist/{chunk-5JK3DQGZ.js → chunk-5TNGBDIE.js} +2 -2
- package/dist/{chunk-OJEIS5L2.js → chunk-5TUDGSDC.js} +1 -1
- package/dist/{chunk-TMGJAFSD.js → chunk-66FRMK7V.js} +3 -3
- package/dist/{chunk-GNUARBRZ.js → chunk-6HPLEGUP.js} +4 -4
- package/dist/{chunk-BQFL2ECS.js → chunk-6QPDBD7Q.js} +3 -57
- package/dist/{chunk-GZS72NCF.js → chunk-7UBDBJTG.js} +4 -4
- package/dist/{chunk-CLABCSZC.js → chunk-A5KQXZR7.js} +5 -5
- package/dist/{chunk-L5CDGXPO.js → chunk-ADRPW7KU.js} +4 -4
- package/dist/{chunk-75ODMNOM.js → chunk-AN7C3CHH.js} +1 -1
- package/dist/{chunk-XBTWG2VL.js → chunk-AQAPPSDV.js} +5 -5
- package/dist/{chunk-6Z2VR3BA.js → chunk-BAGBCSXA.js} +1 -1
- package/dist/{chunk-IOH2T3CB.js → chunk-BLAIETMP.js} +4 -4
- package/dist/{chunk-5LOP4AVD.js → chunk-BSZIPIFA.js} +128 -26
- package/dist/{chunk-QC2W42DE.js → chunk-CCNH4PJ2.js} +12 -12
- package/dist/{chunk-FAF5AW3P.js → chunk-CJADXAJU.js} +4 -4
- package/dist/{chunk-HOIO66DU.js → chunk-DCMRNIDM.js} +4 -4
- package/dist/{chunk-QW3FRUFB.js → chunk-DVYVGBPB.js} +1 -1
- package/dist/{chunk-TBKHQWIH.js → chunk-E23RKH3T.js} +5 -5
- package/dist/{chunk-EQ26IKZM.js → chunk-E2LB6JNV.js} +6 -6
- package/dist/{chunk-VFJSVPNL.js → chunk-EEM65CGJ.js} +3 -3
- package/dist/chunk-H4BKC2GN.js +1201 -0
- package/dist/{chunk-RAJ3QEIL.js → chunk-HVOQUPSO.js} +1 -1
- package/dist/{chunk-OY6Z4IKB.js → chunk-IZTDX2MX.js} +3 -3
- package/dist/{chunk-VHZAJ6IB.js → chunk-JTOBQUIL.js} +3 -3
- package/dist/{chunk-OW6VBXXI.js → chunk-JX3DHGZX.js} +46 -34
- package/dist/{chunk-SKUSGWFK.js → chunk-KA7JIMTG.js} +6 -6
- package/dist/{chunk-LGZ545TA.js → chunk-KX3RMF6T.js} +12 -6
- package/dist/{chunk-VN7XH6TU.js → chunk-LA7CKRZN.js} +2 -2
- package/dist/{chunk-FEAGK25K.js → chunk-LMC5UPL7.js} +1 -1
- package/dist/{chunk-YK6GR4GU.js → chunk-LV6DX4P6.js} +2 -2
- package/dist/{chunk-PXAOEFJZ.js → chunk-MIPJ2VXP.js} +14 -16
- package/dist/{chunk-3QLFB2EY.js → chunk-ML2Q6WWE.js} +37 -214
- package/dist/{chunk-7NCLUA65.js → chunk-MNKIR2ZB.js} +11 -0
- package/dist/{chunk-DMNLFWGY.js → chunk-MPPTIZ2G.js} +210 -151
- package/dist/{chunk-VUFHYMSP.js → chunk-MXPOLQZH.js} +1 -1
- package/dist/{chunk-SARPHHTT.js → chunk-NOH3EJFH.js} +1 -1
- package/dist/{chunk-OP5IBEV7.js → chunk-NUEPJ5W6.js} +2 -2
- package/dist/{chunk-S2Z6VWHH.js → chunk-NYV45Q25.js} +6 -7
- package/dist/{chunk-HZ72EMJE.js → chunk-O7PCNYEY.js} +2 -2
- package/dist/{chunk-PIQ4HHA2.js → chunk-OQKSF5ST.js} +4 -6
- package/dist/{chunk-PJ34FOIV.js → chunk-PLMX3IHG.js} +5 -5
- package/dist/{chunk-KLZZI5TU.js → chunk-PMLQRB3D.js} +1 -1
- package/dist/{chunk-P6RF4RQN.js → chunk-Q6ID23SU.js} +6 -6
- package/dist/{chunk-EHHTQURL.js → chunk-QECRQWLV.js} +5 -5
- package/dist/{chunk-AB3VAQ25.js → chunk-QNATBOUH.js} +3 -3
- package/dist/{chunk-VDBXSUXP.js → chunk-QPPBH5NY.js} +7 -7
- package/dist/{chunk-BCVCUDFI.js → chunk-QSW3HAKI.js} +1 -1
- package/dist/{chunk-FVERRWDP.js → chunk-RY4EPMZX.js} +2 -2
- package/dist/{chunk-XE5N352V.js → chunk-SROWUG5W.js} +1 -1
- package/dist/{chunk-V7N5NOZV.js → chunk-TJUJAK5L.js} +1 -1
- package/dist/{chunk-KL76XWZ7.js → chunk-TR3GP5MH.js} +1 -1
- package/dist/{chunk-MRCVYYPW.js → chunk-VHKK3US3.js} +3 -3
- package/dist/{chunk-LTT54NOU.js → chunk-VNRWQCGU.js} +8 -8
- package/dist/{chunk-2MZ6ROWZ.js → chunk-XF3AWNMO.js} +6 -6
- package/dist/{chunk-XO3KAH7K.js → chunk-XJIIU36L.js} +1 -1
- package/dist/{chunk-BUQU3OPX.js → chunk-Y64JGYTB.js} +1 -1
- package/dist/{chunk-YMZOM6BD.js → chunk-YUDZCJYC.js} +10 -10
- package/dist/{codex-app-cards-switch-LXMAIOFB.js → codex-app-cards-switch-JQ6356VX.js} +11 -12
- package/dist/{codex-desktop-launch-VE5RLFUU.js → codex-desktop-launch-YUB2LOAG.js} +1 -1
- package/dist/{codex-session-launch-XZZWXCPK.js → codex-session-launch-UKMAORXS.js} +19 -21
- package/dist/{config-PPX25AV5.js → config-YY54G3CC.js} +3 -3
- package/dist/{global-upgrade-NRMHNLNU.js → global-upgrade-Y4USGPS2.js} +10 -12
- package/dist/{identity-ZFQR7JNW.js → identity-W5CYL5RC.js} +4 -5
- package/dist/{live-capabilities-SJRYRKNB.js → live-capabilities-JRNNA5EP.js} +5 -7
- package/dist/{paths-7VTVOQXJ.js → paths-4MEBINV3.js} +7 -3
- package/dist/reapply-ZN7C3CB3.js +63 -0
- package/dist/src/index.js +20 -23
- package/dist/{upgrade-lock-VAYJZVTB.js → upgrade-lock-QAWUV2DO.js} +4 -5
- package/dist/{usage-C4DIYUR6.js → usage-43C2DHDU.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6ICPEJY5.js +0 -20
- package/dist/chunk-MK4USZYQ.js +0 -615
- package/dist/chunk-QENTGE75.js +0 -86
- package/dist/chunk-VC3HFFMQ.js +0 -41
- package/dist/reapply-WOANOIRZ.js +0 -64
|
@@ -3,43 +3,43 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DVYVGBPB.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5NP3OJ5P.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KA7JIMTG.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
recordSealerFor,
|
|
18
18
|
wrapSessionKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QSW3HAKI.js";
|
|
20
20
|
import {
|
|
21
21
|
fetchTranscriptRecipients,
|
|
22
22
|
uploadTranscriptRecords
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TJUJAK5L.js";
|
|
24
24
|
import {
|
|
25
25
|
transcriptEnvironmentPreference,
|
|
26
26
|
transcriptsEnabled
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5TUDGSDC.js";
|
|
28
28
|
import {
|
|
29
29
|
readTranscriptPreference
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
writeJsonAtomic
|
|
33
|
-
} from "./chunk-QENTGE75.js";
|
|
30
|
+
} from "./chunk-BLAIETMP.js";
|
|
34
31
|
import {
|
|
35
32
|
claudeConfigDir,
|
|
36
33
|
codexHome,
|
|
37
34
|
pusharyDir
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-H4BKC2GN.js";
|
|
36
|
+
import {
|
|
37
|
+
writeJsonAtomic
|
|
38
|
+
} from "./chunk-BSZIPIFA.js";
|
|
39
39
|
import {
|
|
40
40
|
getApiKey,
|
|
41
41
|
getBaseUrl
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Y64JGYTB.js";
|
|
43
43
|
|
|
44
44
|
// src/transcript-registration.ts
|
|
45
45
|
import { createHash } from "crypto";
|
|
@@ -4,25 +4,23 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BLAIETMP.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ADRPW7KU.js";
|
|
11
|
+
import {
|
|
12
|
+
pusharyDir
|
|
13
|
+
} from "./chunk-H4BKC2GN.js";
|
|
11
14
|
import {
|
|
12
15
|
readJsonSafe,
|
|
16
|
+
resolveGlobalBinary,
|
|
13
17
|
writeFileAtomic,
|
|
14
18
|
writeJsonAtomic,
|
|
15
19
|
writeJsonAtomicDurable
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
pusharyDir
|
|
19
|
-
} from "./chunk-MK4USZYQ.js";
|
|
20
|
-
import {
|
|
21
|
-
resolveGlobalBinary
|
|
22
|
-
} from "./chunk-5LOP4AVD.js";
|
|
20
|
+
} from "./chunk-BSZIPIFA.js";
|
|
23
21
|
import {
|
|
24
22
|
getApiKey
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Y64JGYTB.js";
|
|
26
24
|
import {
|
|
27
25
|
CLI_PACKAGE_NAMES,
|
|
28
26
|
cmdShimTarget,
|
|
@@ -32,7 +30,7 @@ import {
|
|
|
32
30
|
} from "./chunk-QTOLNRET.js";
|
|
33
31
|
import {
|
|
34
32
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
36
34
|
|
|
37
35
|
// src/daemon-lifecycle.ts
|
|
38
36
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -294,7 +294,7 @@ var loadedOnce = (load) => {
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// src/codex-desktop-proxy.ts
|
|
297
|
-
var loadThePhone = () => import("./api-
|
|
297
|
+
var loadThePhone = () => import("./api-HDLTZTVR.js");
|
|
298
298
|
var theFirstCardLoadsAgain = () => {
|
|
299
299
|
};
|
|
300
300
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -827,7 +827,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
827
827
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
828
828
|
}
|
|
829
829
|
if (args[0] === APP_CARDS_FLAG) {
|
|
830
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
830
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-JQ6356VX.js");
|
|
831
831
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
832
832
|
}
|
|
833
833
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JTOBQUIL.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NYV45Q25.js";
|
|
8
8
|
import {
|
|
9
9
|
EXIT
|
|
10
10
|
} from "./chunk-KZERVKTD.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BAGBCSXA.js";
|
|
14
14
|
|
|
15
15
|
// src/setup/closing.ts
|
|
16
16
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ML2Q6WWE.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KA7JIMTG.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H4BKC2GN.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
atLeast,
|
|
3
|
-
formatVersion
|
|
4
|
-
} from "./chunk-6ICPEJY5.js";
|
|
5
|
-
import {
|
|
6
|
-
NOTIFICATION_MATCHED_TYPES,
|
|
7
|
-
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-VC3HFFMQ.js";
|
|
9
1
|
import {
|
|
10
2
|
isProtectedByScope,
|
|
11
3
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-H4BKC2GN.js";
|
|
13
5
|
import {
|
|
14
|
-
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
6
|
HOOK_BUDGETS,
|
|
16
7
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
18
9
|
|
|
19
10
|
// src/gemini-config.ts
|
|
20
11
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -115,46 +106,6 @@ var missingGeminiHookEvents = (settings) => {
|
|
|
115
106
|
}).map((definition) => definition.event);
|
|
116
107
|
};
|
|
117
108
|
|
|
118
|
-
// src/claude-events.ts
|
|
119
|
-
var MIRRORED_TOOLS = POSTTOOLUSE_MIRRORED_TOOLS.join("|");
|
|
120
|
-
var ESTABLISHED = [1, 0, 0];
|
|
121
|
-
var OBSERVED = [2, 0, 0];
|
|
122
|
-
var CLAUDE_HOOK_BINARY = "pushary-hook";
|
|
123
|
-
var CLAUDE_HOOK_EVENTS = [
|
|
124
|
-
{ event: "PreToolUse", binary: CLAUDE_HOOK_BINARY, matcher: CLAUDE_PRETOOLUSE_MATCHER, timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", since: ESTABLISHED },
|
|
125
|
-
{ event: "PostToolUse", binary: "pushary-post-hook", matcher: MIRRORED_TOOLS, timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
126
|
-
{ event: "Stop", binary: "pushary-stop-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
127
|
-
{ event: "UserPromptSubmit", binary: "pushary-prompt-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
128
|
-
{ event: "Notification", binary: "pushary-notification-hook", matcher: NOTIFICATION_MATCHED_TYPES.join("|"), timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
129
|
-
{ event: "SessionStart", binary: "pushary-session-start-hook", matcher: "startup|resume|clear", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
130
|
-
{ event: "SessionEnd", binary: "pushary-session-end-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
131
|
-
{ event: "StopFailure", binary: "pushary-stopfailure-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
132
|
-
{ event: "PermissionRequest", binary: "pushary-permission-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", since: ESTABLISHED },
|
|
133
|
-
{ event: "PermissionDenied", binary: "pushary-permission-denied-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", holds: true, since: ESTABLISHED },
|
|
134
|
-
// Observability only. Each carries session shape the island cannot get any other
|
|
135
|
-
// way, and none of them decides anything.
|
|
136
|
-
{ event: "SubagentStart", binary: "pushary-session-start-hook", timeout: 10, delivery: "telemetry", since: OBSERVED },
|
|
137
|
-
{ event: "SubagentStop", binary: "pushary-stop-hook", timeout: 10, delivery: "telemetry", since: OBSERVED },
|
|
138
|
-
{ event: "PreCompact", binary: "pushary-post-hook", matcher: "manual|auto", timeout: 10, delivery: "telemetry", since: OBSERVED },
|
|
139
|
-
{ event: "PostCompact", binary: "pushary-post-hook", matcher: "manual|auto", timeout: 10, delivery: "telemetry", since: OBSERVED },
|
|
140
|
-
{ event: "TeammateIdle", binary: "pushary-notification-hook", timeout: 10, delivery: "telemetry", since: OBSERVED },
|
|
141
|
-
// An MCP server asking the person for a value, answered from the phone rather
|
|
142
|
-
// than the terminal. No matcher: Claude Code matches this event on the MCP
|
|
143
|
-
// server's name, and we have no business preferring one server over another.
|
|
144
|
-
{ event: "Elicitation", binary: "pushary-elicitation-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", since: OBSERVED }
|
|
145
|
-
];
|
|
146
|
-
var supportedClaudeEvents = (version) => CLAUDE_HOOK_EVENTS.filter((hook) => version ? atLeast(version, hook.since) : hook.since === ESTABLISHED);
|
|
147
|
-
var registrationSignatures = (events, version) => Object.fromEntries(
|
|
148
|
-
events.map((hook) => [hook.event, `registered|${version ? formatVersion(version) : "unknown"}`])
|
|
149
|
-
);
|
|
150
|
-
var needsReregistration = (stored, version) => {
|
|
151
|
-
const expected = registrationSignatures(supportedClaudeEvents(version), version);
|
|
152
|
-
const keys = Object.keys(expected);
|
|
153
|
-
if (!stored) return true;
|
|
154
|
-
if (keys.length !== Object.keys(stored).length) return true;
|
|
155
|
-
return keys.some((event) => stored[event] !== expected[event]);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
109
|
export {
|
|
159
110
|
GEMINI_HOOK_BINARY,
|
|
160
111
|
GEMINI_HOOK_EVENTS,
|
|
@@ -163,10 +114,5 @@ export {
|
|
|
163
114
|
removeGeminiMcpServer,
|
|
164
115
|
removeGeminiSettings,
|
|
165
116
|
hasGeminiHooks,
|
|
166
|
-
missingGeminiHookEvents
|
|
167
|
-
CLAUDE_HOOK_BINARY,
|
|
168
|
-
CLAUDE_HOOK_EVENTS,
|
|
169
|
-
supportedClaudeEvents,
|
|
170
|
-
registrationSignatures,
|
|
171
|
-
needsReregistration
|
|
117
|
+
missingGeminiHookEvents
|
|
172
118
|
};
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O7PCNYEY.js";
|
|
6
6
|
import {
|
|
7
7
|
createIo
|
|
8
8
|
} from "./chunk-FO3MDD26.js";
|
|
9
9
|
import {
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BLAIETMP.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QNATBOUH.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Y64JGYTB.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readJsonSafe
|
|
3
|
-
} from "./chunk-QENTGE75.js";
|
|
4
1
|
import {
|
|
5
2
|
pusharyDir
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4BKC2GN.js";
|
|
4
|
+
import {
|
|
5
|
+
readJsonSafe
|
|
6
|
+
} from "./chunk-BSZIPIFA.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
writeFileAtomic
|
|
3
|
-
} from "./chunk-QENTGE75.js";
|
|
4
1
|
import {
|
|
5
2
|
pusharyDir
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4BKC2GN.js";
|
|
4
|
+
import {
|
|
5
|
+
writeFileAtomic
|
|
6
|
+
} from "./chunk-BSZIPIFA.js";
|
|
7
7
|
|
|
8
8
|
// src/identity.ts
|
|
9
9
|
import { randomUUID } from "crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pusharyDir
|
|
3
|
+
} from "./chunk-H4BKC2GN.js";
|
|
1
4
|
import {
|
|
2
5
|
readJsonSafe,
|
|
3
6
|
writeFileAtomic
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
pusharyDir
|
|
7
|
-
} from "./chunk-MK4USZYQ.js";
|
|
7
|
+
} from "./chunk-BSZIPIFA.js";
|
|
8
8
|
import {
|
|
9
9
|
DECLINED_AGENTS_FILE,
|
|
10
10
|
DISCONNECT_AGENT_IDS,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2VADJ6JH.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
7
7
|
writeFileAtomic,
|
|
8
8
|
writeJsonAtomic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BSZIPIFA.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y64JGYTB.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MNKIR2ZB.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -12,14 +12,91 @@ import {
|
|
|
12
12
|
ownPackageName
|
|
13
13
|
} from "./chunk-QTOLNRET.js";
|
|
14
14
|
|
|
15
|
+
// src/cli/fsx.ts
|
|
16
|
+
import { copyFileSync, lstatSync, realpathSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
17
|
+
import { dirname, join } from "path";
|
|
18
|
+
var readJsonSafe = (filePath) => {
|
|
19
|
+
let raw;
|
|
20
|
+
try {
|
|
21
|
+
raw = readFileSync(filePath, "utf-8");
|
|
22
|
+
} catch (err) {
|
|
23
|
+
const error = err;
|
|
24
|
+
if (error.code === "ENOENT") return { kind: "missing" };
|
|
25
|
+
return { kind: "unreadable", error };
|
|
26
|
+
}
|
|
27
|
+
if (raw.trim() === "") return { kind: "ok", value: {} };
|
|
28
|
+
try {
|
|
29
|
+
const value = JSON.parse(raw);
|
|
30
|
+
return { kind: "ok", value };
|
|
31
|
+
} catch (err) {
|
|
32
|
+
return { kind: "unparseable", error: err, raw };
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var isFile = (path) => {
|
|
36
|
+
try {
|
|
37
|
+
return statSync(path).isFile();
|
|
38
|
+
} catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var readFileOrMissing = (path) => {
|
|
43
|
+
try {
|
|
44
|
+
return readFileSync(path, "utf-8");
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
51
|
+
var backupFile = (filePath) => {
|
|
52
|
+
const target = `${filePath}.pushary-backup-${stamp()}`;
|
|
53
|
+
copyFileSync(filePath, target);
|
|
54
|
+
return target;
|
|
55
|
+
};
|
|
56
|
+
var writeFileAtomic = (filePath, contents, mode, encoding = "utf-8") => {
|
|
57
|
+
const target = lstatSync(filePath, { throwIfNoEntry: false })?.isSymbolicLink() ? realpathSync(filePath) : filePath;
|
|
58
|
+
const dir = dirname(target);
|
|
59
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
60
|
+
const temp = join(dir, `.${process.pid}-${stamp()}.pushary-tmp`);
|
|
61
|
+
try {
|
|
62
|
+
writeFileSync(temp, contents, mode === void 0 ? encoding : { encoding, mode });
|
|
63
|
+
const handle = openSync(temp, "r+");
|
|
64
|
+
try {
|
|
65
|
+
if (mode !== void 0) fchmodSync(handle, mode);
|
|
66
|
+
fsyncSync(handle);
|
|
67
|
+
} finally {
|
|
68
|
+
closeSync(handle);
|
|
69
|
+
}
|
|
70
|
+
renameSync(temp, target);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
try {
|
|
73
|
+
if (existsSync(temp)) unlinkSync(temp);
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
throw err;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var writeJsonAtomic = (filePath, data, mode) => writeFileAtomic(filePath, `${JSON.stringify(data, null, 2)}
|
|
80
|
+
`, mode);
|
|
81
|
+
var writeJsonAtomicDurable = (filePath, data, mode) => {
|
|
82
|
+
writeJsonAtomic(filePath, data, mode);
|
|
83
|
+
if (process.platform === "win32") return;
|
|
84
|
+
const directory = openSync(dirname(filePath), "r");
|
|
85
|
+
try {
|
|
86
|
+
fsyncSync(directory);
|
|
87
|
+
} finally {
|
|
88
|
+
closeSync(directory);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
15
92
|
// src/shell-quote.ts
|
|
16
93
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
17
94
|
|
|
18
95
|
// src/npm.ts
|
|
19
96
|
import { promisify } from "util";
|
|
20
97
|
import { exec, execFile, execFileSync, execSync } from "child_process";
|
|
21
|
-
import { existsSync, readFileSync, readlinkSync, realpathSync } from "fs";
|
|
22
|
-
import { dirname, isAbsolute, join, relative, resolve } from "path";
|
|
98
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, readlinkSync, realpathSync as realpathSync2 } from "fs";
|
|
99
|
+
import { dirname as dirname2, isAbsolute, join as join2, relative, resolve } from "path";
|
|
23
100
|
var latestReleaseUrl = (packageName) => `https://registry.npmjs.org/${packageName}/latest`;
|
|
24
101
|
var REGISTRY_TIMEOUT_MS = 5e3;
|
|
25
102
|
var LATEST_TAG = "latest";
|
|
@@ -61,8 +138,8 @@ var resolveGlobalBinary = (name) => {
|
|
|
61
138
|
return resolveGlobalBinaryAt(name, prefix);
|
|
62
139
|
};
|
|
63
140
|
var resolveGlobalBinaryAt = (name, prefix, platform = process.platform) => {
|
|
64
|
-
const candidates = platform === "win32" ? [
|
|
65
|
-
return candidates.find(
|
|
141
|
+
const candidates = platform === "win32" ? [join2(prefix, `${name}.cmd`), join2(prefix, name)] : [join2(prefix, "bin", name)];
|
|
142
|
+
return candidates.find(existsSync2);
|
|
66
143
|
};
|
|
67
144
|
var resolvePathBinary = (name, platform = process.platform) => {
|
|
68
145
|
try {
|
|
@@ -169,20 +246,20 @@ var npmInstallFailure = (err, platform = process.platform) => {
|
|
|
169
246
|
var resolveBinary = (name) => resolveGlobalBinary(name) ?? resolvePathBinary(name);
|
|
170
247
|
var resolvePackageVersionFromBinary = (binary, packageName) => {
|
|
171
248
|
try {
|
|
172
|
-
let dir =
|
|
249
|
+
let dir = dirname2(realpathSync2(binary));
|
|
173
250
|
const packagePath = packageName.split("/");
|
|
174
251
|
for (let depth = 0; depth < 8; depth++) {
|
|
175
252
|
for (const manifest of [
|
|
176
|
-
|
|
177
|
-
|
|
253
|
+
join2(dir, "package.json"),
|
|
254
|
+
join2(dir, "node_modules", ...packagePath, "package.json")
|
|
178
255
|
]) {
|
|
179
256
|
try {
|
|
180
|
-
const value = JSON.parse(
|
|
257
|
+
const value = JSON.parse(readFileSync2(manifest, "utf8"));
|
|
181
258
|
if (value.name === packageName && typeof value.version === "string") return value.version;
|
|
182
259
|
} catch {
|
|
183
260
|
}
|
|
184
261
|
}
|
|
185
|
-
const parent =
|
|
262
|
+
const parent = dirname2(dir);
|
|
186
263
|
if (parent === dir) break;
|
|
187
264
|
dir = parent;
|
|
188
265
|
}
|
|
@@ -218,11 +295,11 @@ var localImportsPresent = (entry, packageDir, seen = /* @__PURE__ */ new Set())
|
|
|
218
295
|
if (seen.has(entry)) return true;
|
|
219
296
|
seen.add(entry);
|
|
220
297
|
try {
|
|
221
|
-
const source =
|
|
298
|
+
const source = readFileSync2(entry, "utf8");
|
|
222
299
|
for (const match of source.matchAll(/\b(?:import|export)\s+(?:[^"'()]*?\s+from\s+)?["'](\.{1,2}\/[^"']+)["']|\bimport\s*\(\s*["'](\.{1,2}\/[^"']+)["']/g)) {
|
|
223
|
-
const dependency = resolve(
|
|
300
|
+
const dependency = resolve(dirname2(entry), match[1] ?? match[2]);
|
|
224
301
|
const localPath = relative(packageDir, dependency);
|
|
225
|
-
if (localPath.startsWith("..") || isAbsolute(localPath) || !
|
|
302
|
+
if (localPath.startsWith("..") || isAbsolute(localPath) || !existsSync2(dependency)) return false;
|
|
226
303
|
if (/\.[cm]?js$/.test(dependency) && !localImportsPresent(dependency, packageDir, seen)) return false;
|
|
227
304
|
}
|
|
228
305
|
return true;
|
|
@@ -232,17 +309,17 @@ var localImportsPresent = (entry, packageDir, seen = /* @__PURE__ */ new Set())
|
|
|
232
309
|
};
|
|
233
310
|
var packageBinsPresent = (packageDir, prefix, platform = process.platform, requiredFiles = []) => {
|
|
234
311
|
try {
|
|
235
|
-
const manifest = JSON.parse(
|
|
312
|
+
const manifest = JSON.parse(readFileSync2(join2(packageDir, "package.json"), "utf8"));
|
|
236
313
|
if (!manifest.bin || typeof manifest.bin !== "object" || Array.isArray(manifest.bin)) return false;
|
|
237
314
|
const bins = Object.entries(manifest.bin);
|
|
238
315
|
if (bins.length === 0) return false;
|
|
239
|
-
if (!requiredFiles.every((path) =>
|
|
316
|
+
if (!requiredFiles.every((path) => existsSync2(join2(packageDir, path)))) return false;
|
|
240
317
|
const seen = /* @__PURE__ */ new Set();
|
|
241
318
|
return bins.every(([name, target]) => {
|
|
242
319
|
if (typeof target !== "string") return false;
|
|
243
|
-
const shims = platform === "win32" ? [
|
|
244
|
-
const entry =
|
|
245
|
-
return
|
|
320
|
+
const shims = platform === "win32" ? [join2(prefix, `${name}.cmd`), join2(prefix, name)] : [join2(prefix, "bin", name)];
|
|
321
|
+
const entry = join2(packageDir, target);
|
|
322
|
+
return existsSync2(entry) && shims.some(existsSync2) && localImportsPresent(entry, packageDir, seen);
|
|
246
323
|
});
|
|
247
324
|
} catch {
|
|
248
325
|
return false;
|
|
@@ -265,16 +342,16 @@ var globalPackageBinsPresent = (name, prefix, platform) => packageBinsPresent(gl
|
|
|
265
342
|
var errorCode = (error) => typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
266
343
|
var realpathOrUndefined = (path) => {
|
|
267
344
|
try {
|
|
268
|
-
return
|
|
345
|
+
return realpathSync2(path);
|
|
269
346
|
} catch {
|
|
270
347
|
return void 0;
|
|
271
348
|
}
|
|
272
349
|
};
|
|
273
350
|
var definedPaths = (paths) => paths.filter((path) => path !== void 0);
|
|
274
351
|
var readPosixCommandLink = (prefix) => {
|
|
275
|
-
const command =
|
|
352
|
+
const command = join2(prefix, "bin", OWNERSHIP_PROBE_COMMAND);
|
|
276
353
|
try {
|
|
277
|
-
const target = resolve(
|
|
354
|
+
const target = resolve(dirname2(command), readlinkSync(command));
|
|
278
355
|
return { kind: "resolved", targets: definedPaths([target, realpathOrUndefined(command)]) };
|
|
279
356
|
} catch (error) {
|
|
280
357
|
if (errorCode(error) === "ENOENT") return { kind: "absent" };
|
|
@@ -283,9 +360,9 @@ var readPosixCommandLink = (prefix) => {
|
|
|
283
360
|
}
|
|
284
361
|
};
|
|
285
362
|
var readWindowsCommandLink = (prefix) => {
|
|
286
|
-
const shim =
|
|
363
|
+
const shim = join2(prefix, `${OWNERSHIP_PROBE_COMMAND}.cmd`);
|
|
287
364
|
try {
|
|
288
|
-
const target = cmdShimTarget(prefix,
|
|
365
|
+
const target = cmdShimTarget(prefix, readFileSync2(shim, "utf8"));
|
|
289
366
|
return target === void 0 ? { kind: "unreadable" } : { kind: "resolved", targets: [target] };
|
|
290
367
|
} catch (error) {
|
|
291
368
|
return errorCode(error) === "ENOENT" ? { kind: "absent" } : { kind: "unreadable" };
|
|
@@ -294,7 +371,7 @@ var readWindowsCommandLink = (prefix) => {
|
|
|
294
371
|
var readCommandLink = (prefix, platform) => platform === "win32" ? readWindowsCommandLink(prefix) : readPosixCommandLink(prefix);
|
|
295
372
|
var readFolderManifest = (folder) => {
|
|
296
373
|
try {
|
|
297
|
-
return { kind: "read", manifest: JSON.parse(
|
|
374
|
+
return { kind: "read", manifest: JSON.parse(readFileSync2(join2(folder, "package.json"), "utf8")) };
|
|
298
375
|
} catch {
|
|
299
376
|
return { kind: "unreadable" };
|
|
300
377
|
}
|
|
@@ -366,9 +443,9 @@ var installGlobally = (options) => {
|
|
|
366
443
|
}
|
|
367
444
|
const started = (async () => {
|
|
368
445
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
369
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
370
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
371
|
-
const { autoUpdateLock } = await import("./paths-
|
|
446
|
+
const { withUpgradeLock } = await import("./global-upgrade-Y4USGPS2.js");
|
|
447
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-QAWUV2DO.js");
|
|
448
|
+
const { autoUpdateLock } = await import("./paths-4MEBINV3.js");
|
|
372
449
|
let result = "skipped";
|
|
373
450
|
const install = async () => {
|
|
374
451
|
const platform = process.platform;
|
|
@@ -400,8 +477,33 @@ var installGlobally = (options) => {
|
|
|
400
477
|
return started;
|
|
401
478
|
};
|
|
402
479
|
|
|
480
|
+
// src/agent-version.ts
|
|
481
|
+
var parseVersion = (raw) => {
|
|
482
|
+
const match = raw.match(/(\d+)\.(\d+)\.(\d+)/);
|
|
483
|
+
return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;
|
|
484
|
+
};
|
|
485
|
+
var compareVersion = (a, b) => {
|
|
486
|
+
for (let index = 0; index < 3; index++) {
|
|
487
|
+
if (a[index] !== b[index]) return a[index] < b[index] ? -1 : 1;
|
|
488
|
+
}
|
|
489
|
+
return 0;
|
|
490
|
+
};
|
|
491
|
+
var atLeast = (version, floor) => compareVersion(version, floor) >= 0;
|
|
492
|
+
var formatVersion = (version) => version.join(".");
|
|
493
|
+
|
|
403
494
|
export {
|
|
495
|
+
readJsonSafe,
|
|
496
|
+
isFile,
|
|
497
|
+
readFileOrMissing,
|
|
498
|
+
backupFile,
|
|
499
|
+
writeFileAtomic,
|
|
500
|
+
writeJsonAtomic,
|
|
501
|
+
writeJsonAtomicDurable,
|
|
404
502
|
shellDoubleQuoted,
|
|
503
|
+
parseVersion,
|
|
504
|
+
compareVersion,
|
|
505
|
+
atLeast,
|
|
506
|
+
formatVersion,
|
|
405
507
|
LATEST_TAG,
|
|
406
508
|
cleanNpmEnv,
|
|
407
509
|
npmErrorMessage,
|