@pushary/agent-hooks 1.9.55 → 1.9.56
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 +12 -0
- package/dist/{api-K6ZROHYB.js → api-JHBUZ7CV.js} +11 -11
- package/dist/bin/pushary-bell-hook.js +29 -29
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-claude.js +31 -30
- package/dist/bin/pushary-clean.js +35 -34
- package/dist/bin/pushary-codex-bridge.js +23 -22
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +27 -27
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +40 -39
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-doctor.js +41 -39
- package/dist/bin/pushary-elicitation-hook.js +29 -29
- package/dist/bin/pushary-gemini-bridge.js +17 -16
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +33 -33
- package/dist/bin/pushary-login.js +14 -14
- package/dist/bin/pushary-logout.js +27 -27
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +30 -30
- package/dist/bin/pushary-permission-denied-hook.js +33 -33
- package/dist/bin/pushary-permission-hook.js +32 -32
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +30 -29
- package/dist/bin/pushary-session-start-hook.js +36 -35
- package/dist/bin/pushary-setup.js +46 -43
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +31 -30
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +20 -20
- package/dist/bin/pushary-transcripts.js +9 -9
- package/dist/bin/pushary-upgrade.js +37 -36
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-EK7SZJ4K.js → chunk-32MSOGMD.js} +3 -3
- package/dist/{chunk-LIESRXK5.js → chunk-4OXULVUA.js} +1 -1
- package/dist/{chunk-FV34HT35.js → chunk-4US3BCQJ.js} +1 -1
- package/dist/{chunk-OML4YFBN.js → chunk-57EOP757.js} +2 -2
- package/dist/{chunk-NSY2V7XU.js → chunk-5HMYW5W2.js} +1 -1
- package/dist/{chunk-L5YTS2BP.js → chunk-5HRXOANL.js} +3 -3
- package/dist/{chunk-IHUFRAHB.js → chunk-6PUHW2FP.js} +4 -4
- package/dist/{chunk-FCMWUYIE.js → chunk-6U3L4K57.js} +2 -2
- package/dist/{chunk-U2L42GVI.js → chunk-724266XT.js} +10 -10
- package/dist/{chunk-Q7OXI6VS.js → chunk-74DKFWU2.js} +5 -5
- package/dist/{chunk-RIVNNBEK.js → chunk-7QAL23TB.js} +27 -12
- package/dist/{chunk-RL7EOD6I.js → chunk-AKBFNTJF.js} +11 -11
- package/dist/{chunk-56ZTIY6D.js → chunk-AKFTQT7P.js} +3 -3
- package/dist/{chunk-JOWF4Y4P.js → chunk-DFZTZRKL.js} +4 -4
- package/dist/{chunk-BL3WAGIK.js → chunk-DUACX6E3.js} +7 -7
- package/dist/{chunk-2LEH5IGX.js → chunk-DWV3LTUH.js} +28 -14
- package/dist/{chunk-LGTF7AZX.js → chunk-ECQNBLPS.js} +4 -4
- package/dist/{chunk-H57DXSHR.js → chunk-FBFPQLJG.js} +3 -3
- package/dist/{chunk-VQPSWD3A.js → chunk-FFGW45DJ.js} +10 -10
- package/dist/{chunk-NECZKPJN.js → chunk-FJ7ZMR4N.js} +5 -5
- package/dist/{chunk-7CLLWDCP.js → chunk-FLUKEZMH.js} +1 -1
- package/dist/{chunk-PQ4K74WL.js → chunk-FVERRWDP.js} +15 -12
- package/dist/{chunk-5463UUO2.js → chunk-FXW3FW4A.js} +1 -1
- package/dist/{chunk-3RPN7AAT.js → chunk-G63LBV4Y.js} +1 -1
- package/dist/{chunk-MTKV4RUQ.js → chunk-GWQ6T6JV.js} +6 -6
- package/dist/{chunk-NHVEQLQC.js → chunk-HR3DJWP2.js} +2 -2
- package/dist/{chunk-ZWOWEXCV.js → chunk-HTN7SMKB.js} +10 -7
- package/dist/{chunk-RH6KR6EH.js → chunk-I6OGFHJT.js} +5 -5
- package/dist/{chunk-XDCXTDHH.js → chunk-ILQARYXK.js} +5 -5
- package/dist/{chunk-ZMPR436Z.js → chunk-J5HQNZXQ.js} +5 -5
- package/dist/{chunk-NELH25J7.js → chunk-JPTFFZWY.js} +11 -11
- package/dist/{chunk-XSUJ2PQY.js → chunk-JSS5RG65.js} +3 -3
- package/dist/{chunk-K23WMLPY.js → chunk-JTQHC3RV.js} +6 -6
- package/dist/{chunk-EPOD7QHT.js → chunk-KWAOOXSD.js} +12 -9
- package/dist/{chunk-S6RNS4UL.js → chunk-L66VPBS5.js} +1 -1
- package/dist/{chunk-46TC24ET.js → chunk-LTCNAIY2.js} +2 -2
- package/dist/{chunk-GCN73COS.js → chunk-LW4ZEC3A.js} +1 -1
- package/dist/{chunk-UVT6B6XN.js → chunk-M6DTXZQK.js} +2 -2
- package/dist/{chunk-FI73DGNB.js → chunk-M7ZXKMVX.js} +1 -1
- package/dist/{chunk-JPABKXK6.js → chunk-MVW5WS6F.js} +6 -6
- package/dist/{chunk-LD4MWJMD.js → chunk-MW3DD3S5.js} +6 -6
- package/dist/{chunk-CQ5JGRML.js → chunk-MWBFB7WA.js} +1 -1
- package/dist/{chunk-63IQRYVP.js → chunk-OCYOOGXW.js} +4 -4
- package/dist/{chunk-ONCWYACA.js → chunk-OX5EYBOC.js} +1 -1
- package/dist/{chunk-ALZZVC3E.js → chunk-PI2WWZQQ.js} +3 -3
- package/dist/{chunk-AQFEP65J.js → chunk-QENTGE75.js} +10 -1
- package/dist/{chunk-DWQYCOPI.js → chunk-QW3FRUFB.js} +1 -1
- package/dist/{chunk-QKU46TK5.js → chunk-QWUWQBIJ.js} +3 -3
- package/dist/{chunk-T5L5NWT3.js → chunk-RZF2GIPI.js} +2 -2
- package/dist/{chunk-JBT3ZSJS.js → chunk-S3CQBNUU.js} +1 -1
- package/dist/{chunk-DHJSBK63.js → chunk-SM2DT5KP.js} +1 -1
- package/dist/{chunk-T6RIKJUO.js → chunk-SMMDQXI2.js} +2 -2
- package/dist/{chunk-MC4VY5LK.js → chunk-T4IAMIX4.js} +1 -1
- package/dist/{chunk-XUW2DRAQ.js → chunk-T6GEEMVC.js} +3 -3
- package/dist/{chunk-6SWMKF5E.js → chunk-V2AMLVMD.js} +2 -2
- package/dist/{chunk-MHQB62K5.js → chunk-VRPDHJGB.js} +5 -5
- package/dist/chunk-VUFHYMSP.js +32 -0
- package/dist/{chunk-6C4S3QYD.js → chunk-VZ3YPEMG.js} +3 -3
- package/dist/{chunk-P2546BBI.js → chunk-WCPN3GVW.js} +3 -3
- package/dist/{chunk-N77BH7H2.js → chunk-WNVQPGLH.js} +4 -4
- package/dist/{chunk-4QQEUJL4.js → chunk-WW266XKU.js} +2 -2
- package/dist/{chunk-ZOP3I2GQ.js → chunk-X5FHQMUL.js} +3 -3
- package/dist/{chunk-VYBH6D4X.js → chunk-YBE2KH2U.js} +4 -4
- package/dist/{chunk-BUXDR6US.js → chunk-ZMRO6ESW.js} +1 -1
- package/dist/{codex-app-cards-switch-P4RVJNRV.js → codex-app-cards-switch-7UIGMEUE.js} +12 -12
- package/dist/{codex-desktop-launch-RIBIFXSF.js → codex-desktop-launch-66LZ6R4Y.js} +1 -1
- package/dist/{codex-session-launch-KLH2FSSJ.js → codex-session-launch-3TGHFR7R.js} +20 -19
- package/dist/{config-HX6ZNOIL.js → config-OBDZ2CL3.js} +3 -3
- package/dist/{global-upgrade-AZN3BPI3.js → global-upgrade-6M2UXUUL.js} +8 -8
- package/dist/{identity-AQIMUWYN.js → identity-WJUPU3AK.js} +5 -5
- package/dist/{live-capabilities-4IIFAMHU.js → live-capabilities-GACO2VB6.js} +8 -4
- package/dist/{paths-X4IPV2WJ.js → paths-5PWAQF63.js} +3 -3
- package/dist/{reapply-CXODG53B.js → reapply-EYPT5EP2.js} +28 -27
- package/dist/src/index.js +22 -22
- package/dist/{upgrade-lock-AHISGKER.js → upgrade-lock-G2ZPV7ZO.js} +5 -5
- package/dist/{usage-ZC6BKIE3.js → usage-PXBMEKSA.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-LF3TLC7B.js → chunk-WACFIQYA.js} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G63LBV4Y.js";
|
|
6
6
|
import {
|
|
7
7
|
repoKeyFor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S3CQBNUU.js";
|
|
9
9
|
import {
|
|
10
10
|
cancelQuestion,
|
|
11
11
|
clientErrorKindOf,
|
|
@@ -13,26 +13,26 @@ import {
|
|
|
13
13
|
reportClientError,
|
|
14
14
|
sendNotification,
|
|
15
15
|
waitForAnswer
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J5HQNZXQ.js";
|
|
17
17
|
import {
|
|
18
18
|
withRetry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WCPN3GVW.js";
|
|
20
20
|
import {
|
|
21
21
|
getMachineId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SMMDQXI2.js";
|
|
23
23
|
import {
|
|
24
24
|
reportedInstallSource
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WW266XKU.js";
|
|
26
26
|
import {
|
|
27
27
|
canonicalJson
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-57EOP757.js";
|
|
29
29
|
import {
|
|
30
30
|
writeFileAtomic
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QENTGE75.js";
|
|
32
32
|
import {
|
|
33
33
|
getApiKey,
|
|
34
34
|
getBaseUrl
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MWBFB7WA.js";
|
|
36
36
|
import {
|
|
37
37
|
ACTION_BODY_MAX,
|
|
38
38
|
AGENTS,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
toToolLookup,
|
|
67
67
|
truncateLine,
|
|
68
68
|
unansweredRefusalReason
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WACFIQYA.js";
|
|
70
70
|
|
|
71
71
|
// ../hook-mapping/src/describe.ts
|
|
72
72
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VZ3YPEMG.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZMRO6ESW.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4OXULVUA.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-57EOP757.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WACFIQYA.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findNativeClaudeInstall
|
|
3
|
+
} from "./chunk-VUFHYMSP.js";
|
|
1
4
|
import {
|
|
2
5
|
parseVersion
|
|
3
6
|
} from "./chunk-6ICPEJY5.js";
|
|
7
|
+
import {
|
|
8
|
+
isRecord
|
|
9
|
+
} from "./chunk-WACFIQYA.js";
|
|
4
10
|
|
|
5
11
|
// src/setup/agent-probe.ts
|
|
6
12
|
import { execSync } from "child_process";
|
|
@@ -12,20 +18,28 @@ var versionFromInstallPath = (path) => {
|
|
|
12
18
|
const name = basename(path);
|
|
13
19
|
return /^\d+\.\d+\.\d+$/.test(name) ? parseVersion(name) : null;
|
|
14
20
|
};
|
|
21
|
+
var CLAUDE_CODE_PACKAGE = "@anthropic-ai/claude-code";
|
|
22
|
+
var CLAUDE_CODE_PLATFORM_PACKAGE_PREFIX = `${CLAUDE_CODE_PACKAGE}-`;
|
|
23
|
+
var MANIFEST_FOLDERS_SEARCHED = 4;
|
|
24
|
+
var isClaudeCodePackage = (name) => typeof name === "string" && (name === CLAUDE_CODE_PACKAGE || name.startsWith(CLAUDE_CODE_PLATFORM_PACKAGE_PREFIX));
|
|
25
|
+
var parsedManifest = (raw) => {
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(raw);
|
|
28
|
+
} catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var claudeCodeManifestVersion = (raw) => {
|
|
33
|
+
const manifest = parsedManifest(raw);
|
|
34
|
+
if (!isRecord(manifest) || !isClaudeCodePackage(manifest.name)) return null;
|
|
35
|
+
return typeof manifest.version === "string" ? parseVersion(manifest.version) : null;
|
|
36
|
+
};
|
|
15
37
|
var versionFromManifest = (probe, binPath) => {
|
|
16
38
|
let dir = dirname(binPath);
|
|
17
|
-
for (let depth = 0; depth <
|
|
39
|
+
for (let depth = 0; depth < MANIFEST_FOLDERS_SEARCHED; depth++) {
|
|
18
40
|
const raw = probe.readFile(join(dir, "package.json"));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const { version } = JSON.parse(raw);
|
|
22
|
-
if (typeof version === "string") {
|
|
23
|
-
const parsed = parseVersion(version);
|
|
24
|
-
if (parsed) return parsed;
|
|
25
|
-
}
|
|
26
|
-
} catch {
|
|
27
|
-
}
|
|
28
|
-
}
|
|
41
|
+
const version = raw ? claudeCodeManifestVersion(raw) : null;
|
|
42
|
+
if (version) return version;
|
|
29
43
|
const parent = dirname(dir);
|
|
30
44
|
if (parent === dir) break;
|
|
31
45
|
dir = parent;
|
|
@@ -63,7 +77,8 @@ var readFile = (path) => {
|
|
|
63
77
|
return null;
|
|
64
78
|
}
|
|
65
79
|
};
|
|
66
|
-
var
|
|
80
|
+
var claudeOnPathElseInItsOwnInstallFolder = () => onPath("claude") ?? findNativeClaudeInstall() ?? null;
|
|
81
|
+
var detectClaudeVersion = () => readClaudeVersion({ resolveOnPath: claudeOnPathElseInItsOwnInstallFolder, realpath, readFile });
|
|
67
82
|
|
|
68
83
|
export {
|
|
69
84
|
realpath,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6U3L4K57.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_INSTRUCTIONS_LABEL,
|
|
6
6
|
GEMINI_INSTRUCTIONS_LABEL,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
macAppFxBridge,
|
|
12
12
|
refreshInstructionBlock,
|
|
13
13
|
renderAgentInstructions
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GWQ6T6JV.js";
|
|
15
15
|
import {
|
|
16
16
|
OPENCODE_HOOK_BINARY,
|
|
17
17
|
agentHookOwner,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
openCodeInstructionsFile,
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodeWired
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JTQHC3RV.js";
|
|
25
25
|
import {
|
|
26
26
|
detectClaudeVersion
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7QAL23TB.js";
|
|
28
28
|
import {
|
|
29
29
|
addClaudeMcpServer,
|
|
30
30
|
addCompatibleHooks,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
compatibleConfigFile,
|
|
34
34
|
compatibleInstructionsFile,
|
|
35
35
|
hasCompatibleHooks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WNVQPGLH.js";
|
|
37
37
|
import {
|
|
38
38
|
claudeUnprovenHolds,
|
|
39
39
|
claudeWired,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
codexWired,
|
|
42
42
|
geminiWired,
|
|
43
43
|
planHooks
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-74DKFWU2.js";
|
|
45
45
|
import {
|
|
46
46
|
CLAUDE_HOOK_BINARY,
|
|
47
47
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
needsReregistration,
|
|
53
53
|
registrationSignatures,
|
|
54
54
|
supportedClaudeEvents
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-VZ3YPEMG.js";
|
|
56
56
|
import {
|
|
57
57
|
formatVersion
|
|
58
58
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -80,21 +80,21 @@ import {
|
|
|
80
80
|
registeredCommands,
|
|
81
81
|
registrationHolderOf,
|
|
82
82
|
vscodePluginMcp
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-57EOP757.js";
|
|
84
84
|
import {
|
|
85
85
|
resolveGlobalBinDir,
|
|
86
86
|
resolveGlobalBinary
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-T6GEEMVC.js";
|
|
88
88
|
import {
|
|
89
89
|
readJsonSafe,
|
|
90
90
|
writeFileAtomic,
|
|
91
91
|
writeJsonAtomic
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-QENTGE75.js";
|
|
93
93
|
import {
|
|
94
94
|
HOOK_COMPATIBLE_PROFILES,
|
|
95
95
|
isCompatibleAgentType,
|
|
96
96
|
isRecord
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-WACFIQYA.js";
|
|
98
98
|
|
|
99
99
|
// src/reapply.ts
|
|
100
100
|
import { dirname, join } from "path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-57EOP757.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QENTGE75.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WACFIQYA.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-V2AMLVMD.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-YBE2KH2U.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5HRXOANL.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-MWBFB7WA.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -4,25 +4,25 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YBE2KH2U.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SMMDQXI2.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-57EOP757.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T6GEEMVC.js";
|
|
17
17
|
import {
|
|
18
18
|
readJsonSafe,
|
|
19
19
|
writeFileAtomic,
|
|
20
20
|
writeJsonAtomic,
|
|
21
21
|
writeJsonAtomicDurable
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QENTGE75.js";
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MWBFB7WA.js";
|
|
26
26
|
import {
|
|
27
27
|
CLI_PACKAGE_NAMES,
|
|
28
28
|
cmdShimTarget,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-QTOLNRET.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WACFIQYA.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QAL23TB.js";
|
|
4
|
+
import {
|
|
5
|
+
findNativeClaudeInstall
|
|
6
|
+
} from "./chunk-VUFHYMSP.js";
|
|
4
7
|
import {
|
|
5
8
|
readGlobalPrefixAsync,
|
|
6
9
|
resolveGlobalBinary,
|
|
@@ -10,10 +13,13 @@ import {
|
|
|
10
13
|
resolvePackageVersionFromBinary,
|
|
11
14
|
resolvePathBinary,
|
|
12
15
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T6GEEMVC.js";
|
|
14
17
|
import {
|
|
15
18
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WACFIQYA.js";
|
|
20
|
+
|
|
21
|
+
// src/live-capabilities.ts
|
|
22
|
+
import { homedir } from "os";
|
|
17
23
|
|
|
18
24
|
// src/setup/codex-install-probe.ts
|
|
19
25
|
import { existsSync, readdirSync, statSync } from "fs";
|
|
@@ -125,13 +131,19 @@ var missingControlPrerequisite = (input) => {
|
|
|
125
131
|
if (!input.managerAvailable) return "service-manager";
|
|
126
132
|
return null;
|
|
127
133
|
};
|
|
134
|
+
var WHAT_REQUIRED_PHONE_START_LACKS = {
|
|
135
|
+
provider: "install and configure a supported Claude Code, Codex or Gemini provider",
|
|
136
|
+
"service-manager": "no native background-service manager is available in this OS session"
|
|
137
|
+
};
|
|
138
|
+
var describeMissingControlPrerequisite = (missing) => WHAT_REQUIRED_PHONE_START_LACKS[missing];
|
|
128
139
|
var phoneStartIsRequired = (input) => input.mode === "on" || input.policy === "legacy" || input.lifecycleFailed;
|
|
129
140
|
var preferGlobalProviderBinary = (platform) => platform === "win32";
|
|
130
|
-
var
|
|
141
|
+
var nativeInstallOf = (provider, platform, home) => provider === "claude" ? findNativeClaudeInstall(home, platform) : void 0;
|
|
142
|
+
var resolveProviderBinary = (provider, platform = process.platform, home = homedir()) => (preferGlobalProviderBinary(platform) ? resolveGlobalBinary(provider) ?? resolvePathBinary(provider, platform) : resolvePathBinary(provider, platform) ?? resolveGlobalBinary(provider)) ?? nativeInstallOf(provider, platform, home);
|
|
131
143
|
var codexBinaryIsBroken = (binary) => codexInstallHealthAt(binary).kind === "binary-missing";
|
|
132
|
-
var detectCapabilities = (providers, codexCanStart) => {
|
|
144
|
+
var detectCapabilities = (providers, codexCanStart, home) => {
|
|
133
145
|
const enabled = new Set(providers);
|
|
134
|
-
const binaryFor = (provider) => enabled.has(provider) ? resolveProviderBinary(provider) : void 0;
|
|
146
|
+
const binaryFor = (provider) => enabled.has(provider) ? resolveProviderBinary(provider, process.platform, home) : void 0;
|
|
135
147
|
const codexBin = binaryFor("codex");
|
|
136
148
|
const geminiBin = binaryFor("gemini");
|
|
137
149
|
return providerLiveCapabilities({
|
|
@@ -142,12 +154,12 @@ var detectCapabilities = (providers, codexCanStart) => {
|
|
|
142
154
|
};
|
|
143
155
|
var anyInstalledCodex = () => true;
|
|
144
156
|
var codexWithItsProgram = (binary) => !codexBinaryIsBroken(binary);
|
|
145
|
-
var detectProviderLiveCapabilities = (providers = MANAGED_PROVIDERS) => detectCapabilities(providers, anyInstalledCodex);
|
|
146
|
-
var detectLaunchableProviderCapabilities = (providers = MANAGED_PROVIDERS) => detectCapabilities(providers, codexWithItsProgram);
|
|
157
|
+
var detectProviderLiveCapabilities = (providers = MANAGED_PROVIDERS, home = homedir()) => detectCapabilities(providers, anyInstalledCodex, home);
|
|
158
|
+
var detectLaunchableProviderCapabilities = (providers = MANAGED_PROVIDERS, home = homedir()) => detectCapabilities(providers, codexWithItsProgram, home);
|
|
147
159
|
var SPAWN_CAPABILITY = "spawn";
|
|
148
160
|
var launchAdvertisement = (launchable) => hasSpawnProvider(launchable) ? [SPAWN_CAPABILITY, ...launchable] : launchable;
|
|
149
|
-
var expectedLaunchCapabilities = (providers = MANAGED_PROVIDERS) => launchAdvertisement(detectLaunchableProviderCapabilities(providers));
|
|
150
|
-
var discoverProviderInventory = async (providers, signal, platform = process.platform) => {
|
|
161
|
+
var expectedLaunchCapabilities = (providers = MANAGED_PROVIDERS, home = homedir()) => launchAdvertisement(detectLaunchableProviderCapabilities(providers, home));
|
|
162
|
+
var discoverProviderInventory = async (providers, signal, platform = process.platform, home = homedir()) => {
|
|
151
163
|
let prefix;
|
|
152
164
|
const globalBinary = async (provider) => {
|
|
153
165
|
const location = await (prefix ??= readGlobalPrefixAsync(signal));
|
|
@@ -155,7 +167,7 @@ var discoverProviderInventory = async (providers, signal, platform = process.pla
|
|
|
155
167
|
};
|
|
156
168
|
const findBinary = async (provider) => {
|
|
157
169
|
const binary = preferGlobalProviderBinary(platform) ? await globalBinary(provider) ?? await resolvePathBinaryAsync(provider, signal, platform) : await resolvePathBinaryAsync(provider, signal, platform) ?? await globalBinary(provider);
|
|
158
|
-
return [provider, binary];
|
|
170
|
+
return [provider, binary ?? nativeInstallOf(provider, platform, home)];
|
|
159
171
|
};
|
|
160
172
|
const found = await Promise.all([...new Set(providers)].map(findBinary));
|
|
161
173
|
const binaries = {};
|
|
@@ -171,9 +183,10 @@ var discoverProviderInventory = async (providers, signal, platform = process.pla
|
|
|
171
183
|
})
|
|
172
184
|
};
|
|
173
185
|
};
|
|
174
|
-
var trackProviderInventory = async (providers, onChange) => {
|
|
186
|
+
var trackProviderInventory = async (providers, onChange, home = homedir()) => {
|
|
175
187
|
const controller = new AbortController();
|
|
176
|
-
|
|
188
|
+
const discover = () => discoverProviderInventory(providers, controller.signal, process.platform, home);
|
|
189
|
+
let current = await discover();
|
|
177
190
|
let pending;
|
|
178
191
|
const accept = (next) => {
|
|
179
192
|
if (controller.signal.aborted) return;
|
|
@@ -182,7 +195,7 @@ var trackProviderInventory = async (providers, onChange) => {
|
|
|
182
195
|
};
|
|
183
196
|
const refresh = () => {
|
|
184
197
|
if (controller.signal.aborted) return Promise.resolve();
|
|
185
|
-
return pending ??=
|
|
198
|
+
return pending ??= discover().then(accept).finally(() => {
|
|
186
199
|
pending = void 0;
|
|
187
200
|
});
|
|
188
201
|
};
|
|
@@ -206,6 +219,7 @@ export {
|
|
|
206
219
|
hasSpawnProvider,
|
|
207
220
|
resolveControlPolicy,
|
|
208
221
|
missingControlPrerequisite,
|
|
222
|
+
describeMissingControlPrerequisite,
|
|
209
223
|
phoneStartIsRequired,
|
|
210
224
|
resolveProviderBinary,
|
|
211
225
|
codexBinaryIsBroken,
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WCPN3GVW.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WW266XKU.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-T4IAMIX4.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
27
|
classifyConfirmResponse,
|
|
28
28
|
isAnswerSource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WACFIQYA.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-57EOP757.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-T6GEEMVC.js";
|
|
8
8
|
import {
|
|
9
9
|
writeJsonAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QENTGE75.js";
|
|
11
11
|
|
|
12
12
|
// src/upgrade-lock.ts
|
|
13
13
|
import { fork } from "child_process";
|
|
@@ -3,41 +3,41 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QW3FRUFB.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DUACX6E3.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-74DKFWU2.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
wrapSessionKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FXW3FW4A.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchTranscriptRecipients,
|
|
21
21
|
uploadTranscriptRecords
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LW4ZEC3A.js";
|
|
23
23
|
import {
|
|
24
24
|
transcriptEnvironmentPreference,
|
|
25
25
|
transcriptsEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4US3BCQJ.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YBE2KH2U.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-57EOP757.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QENTGE75.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-MWBFB7WA.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FBFPQLJG.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QWUWQBIJ.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
autoUpdateLock,
|
|
23
23
|
autoUpdateLog,
|
|
24
24
|
autoUpdateState
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-57EOP757.js";
|
|
26
26
|
import {
|
|
27
27
|
execNpm,
|
|
28
28
|
fetchLatestPublishedVersion,
|
|
29
29
|
npmErrorMessage,
|
|
30
30
|
readGlobalCliInstallAt,
|
|
31
31
|
readGlobalPrefix
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-T6GEEMVC.js";
|
|
33
33
|
import {
|
|
34
34
|
NPX_LATEST_COMMAND
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-T4IAMIX4.js";
|
|
36
36
|
import {
|
|
37
37
|
commandsPackage,
|
|
38
38
|
globalUpgradeEntry,
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findNativeClaudeInstall
|
|
3
|
+
} from "./chunk-VUFHYMSP.js";
|
|
4
|
+
import {
|
|
5
|
+
isFile
|
|
6
|
+
} from "./chunk-QENTGE75.js";
|
|
7
|
+
|
|
1
8
|
// src/wrapper/claudeBinary.ts
|
|
2
|
-
import {
|
|
9
|
+
import { homedir } from "os";
|
|
3
10
|
import { join, delimiter } from "path";
|
|
4
11
|
var WRAPPER_ACTIVE_ENV = "PUSHARY_WRAPPER_ACTIVE";
|
|
5
|
-
var
|
|
6
|
-
try {
|
|
7
|
-
return statSync(path).isFile();
|
|
8
|
-
} catch {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var findClaudeBinary = () => {
|
|
13
|
-
const override = process.env.PUSHARY_CLAUDE_BIN?.trim();
|
|
14
|
-
if (override) return isFile(override) ? override : null;
|
|
12
|
+
var firstClaudeOnPath = () => {
|
|
15
13
|
const pathVar = process.env.PATH ?? "";
|
|
16
14
|
const exts = process.platform === "win32" ? [".cmd", ".exe", ".bat", ""] : [""];
|
|
17
15
|
for (const dir of pathVar.split(delimiter)) {
|
|
@@ -21,7 +19,12 @@ var findClaudeBinary = () => {
|
|
|
21
19
|
if (isFile(candidate)) return candidate;
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
|
-
return
|
|
22
|
+
return void 0;
|
|
23
|
+
};
|
|
24
|
+
var findClaudeBinary = (home = homedir()) => {
|
|
25
|
+
const override = process.env.PUSHARY_CLAUDE_BIN?.trim();
|
|
26
|
+
if (override) return isFile(override) ? override : null;
|
|
27
|
+
return firstClaudeOnPath() ?? findNativeClaudeInstall(home) ?? null;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
export {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LTCNAIY2.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YBE2KH2U.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmInstallError,
|
|
9
9
|
NpmMissingError,
|
|
10
10
|
NpmPermissionError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-T6GEEMVC.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeFileAtomic,
|
|
15
15
|
writeJsonAtomic
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QENTGE75.js";
|
|
17
17
|
import {
|
|
18
18
|
NPX_LATEST_COMMAND
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-T4IAMIX4.js";
|
|
20
20
|
import {
|
|
21
21
|
readSetupAgentFailures
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WACFIQYA.js";
|
|
23
23
|
|
|
24
24
|
// src/instruction-file.ts
|
|
25
25
|
import { accessSync, constants, existsSync, readFileSync, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|