@pushary/agent-hooks 1.8.2 → 1.8.3
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 +5 -0
- package/dist/bin/pushary-bell-hook.js +11 -11
- package/dist/bin/pushary-bell.js +2 -2
- package/dist/bin/pushary-claude.js +15 -15
- package/dist/bin/pushary-clean.js +18 -18
- package/dist/bin/pushary-codex-bridge.js +9 -9
- package/dist/bin/pushary-codex-hook.js +18 -18
- package/dist/bin/pushary-codex.js +8 -8
- package/dist/bin/pushary-connect.js +7 -7
- package/dist/bin/pushary-daemon.js +31 -28
- package/dist/bin/pushary-disconnect.js +11 -11
- package/dist/bin/pushary-doctor.js +20 -20
- package/dist/bin/pushary-elicitation-hook.js +14 -14
- package/dist/bin/pushary-gemini-bridge.js +4 -4
- package/dist/bin/pushary-gemini-hook.js +16 -16
- package/dist/bin/pushary-hook.js +19 -19
- package/dist/bin/pushary-login.js +5 -5
- package/dist/bin/pushary-logout.js +1 -1
- package/dist/bin/pushary-mcp.js +6 -6
- package/dist/bin/pushary-mode.js +5 -5
- package/dist/bin/pushary-notification-hook.js +17 -17
- package/dist/bin/pushary-opencode-hook.js +15 -15
- package/dist/bin/pushary-permission-denied-hook.js +19 -19
- package/dist/bin/pushary-permission-hook.js +19 -19
- package/dist/bin/pushary-post-hook.js +17 -17
- package/dist/bin/pushary-prompt-hook.js +17 -17
- package/dist/bin/pushary-session-end-hook.js +17 -17
- package/dist/bin/pushary-session-start-hook.js +20 -20
- package/dist/bin/pushary-setup.js +23 -23
- package/dist/bin/pushary-status.js +9 -9
- package/dist/bin/pushary-stop-hook.js +17 -17
- package/dist/bin/pushary-stopfailure-hook.js +17 -17
- package/dist/bin/pushary-transcript-register.js +8 -8
- package/dist/bin/pushary-upgrade.js +215 -139
- package/dist/bin/pushary-wait.js +5 -5
- package/dist/bin/pushary.js +3 -3
- package/dist/{chunk-W2LJ4O3A.js → chunk-27A7L4DA.js} +1 -1
- package/dist/{chunk-I4HKMUZQ.js → chunk-34EQOFMH.js} +2 -2
- package/dist/{chunk-2SLCHCVN.js → chunk-4CW5EAOI.js} +1 -1
- package/dist/{chunk-F6NTWZZC.js → chunk-4DYHBXX4.js} +5 -5
- package/dist/{chunk-INSMZNS7.js → chunk-4SJIPHR3.js} +1 -1
- package/dist/{chunk-ZJYJAD52.js → chunk-6SS74UHS.js} +1 -1
- package/dist/{chunk-DVW2MYCM.js → chunk-6UDK5TY6.js} +1 -1
- package/dist/{chunk-MMVCI6DT.js → chunk-AKCE6ZRF.js} +3 -3
- package/dist/{chunk-BDMC5H5L.js → chunk-APURTMSW.js} +2 -2
- package/dist/{chunk-MOTNSXC3.js → chunk-CTNLP4A5.js} +4 -4
- package/dist/{chunk-B3UVRGYP.js → chunk-CXYKQAL2.js} +5 -5
- package/dist/{chunk-4A3UQERT.js → chunk-DMU5E6HJ.js} +1 -1
- package/dist/{chunk-EESPY5DG.js → chunk-E5JGQGLD.js} +2 -2
- package/dist/{chunk-644AEX4T.js → chunk-EJXEHNB5.js} +2 -2
- package/dist/{chunk-5DGNEUXK.js → chunk-FBTUF2PH.js} +1 -1
- package/dist/{chunk-EIGJYCOE.js → chunk-IEXWWAJY.js} +2 -2
- package/dist/{chunk-NNWQ5VDB.js → chunk-MSMKCO4Y.js} +6 -6
- package/dist/{chunk-I3XLHSOC.js → chunk-OLYTGVCC.js} +3 -3
- package/dist/{chunk-DUA5O6X5.js → chunk-SD6OLZJX.js} +3 -3
- package/dist/{chunk-XQZEIWAV.js → chunk-SOUJG6UY.js} +53 -5
- package/dist/{chunk-KB2FTO4O.js → chunk-UXKXGRKG.js} +2 -2
- package/dist/{chunk-T55H6YEP.js → chunk-VF3X4MDB.js} +1 -1
- package/dist/{chunk-64H5IZZD.js → chunk-VI55VXDH.js} +1 -1
- package/dist/{chunk-NHCUXTEM.js → chunk-VUP5BMOD.js} +1 -1
- package/dist/{chunk-HOEB6AKG.js → chunk-XH7UNEHO.js} +1 -1
- package/dist/{chunk-LK2S5XIV.js → chunk-XNJ4MQF3.js} +2 -2
- package/dist/{chunk-S2UNQQQS.js → chunk-YLJ26RR2.js} +1 -1
- package/dist/{chunk-XEGVVU5H.js → chunk-YOYSXLUB.js} +2 -2
- package/dist/{chunk-YNCGXHM4.js → chunk-ZOKXZ3AS.js} +2 -2
- package/dist/{chunk-UPLV5AJF.js → chunk-ZR7LIQKO.js} +57 -5
- package/dist/{reapply-3UERAKQN.js → reapply-DYOQAVUP.js} +6 -6
- package/dist/src/index.js +13 -13
- package/package.json +1 -1
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-VUP5BMOD.js";
|
|
8
8
|
import {
|
|
9
9
|
createIo
|
|
10
10
|
} from "../chunk-U4TMAANR.js";
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
rejectUnknownFlags
|
|
16
16
|
} from "../chunk-GMXKITVA.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-6UDK5TY6.js";
|
|
18
|
+
import "../chunk-4CW5EAOI.js";
|
|
19
|
+
import "../chunk-DMU5E6HJ.js";
|
|
20
20
|
import {
|
|
21
21
|
UsageError
|
|
22
22
|
} from "../chunk-7QLSKOSU.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT
|
|
25
25
|
} from "../chunk-KZERVKTD.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-ZR7LIQKO.js";
|
|
27
27
|
import "../chunk-T7E75EKA.js";
|
|
28
28
|
import {
|
|
29
29
|
getApiKey,
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-4CW5EAOI.js";
|
|
5
|
+
import "../chunk-DMU5E6HJ.js";
|
|
6
6
|
import "../chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "../chunk-KZERVKTD.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-ZR7LIQKO.js";
|
|
11
11
|
import "../chunk-T7E75EKA.js";
|
|
12
12
|
import "../chunk-ON5JW2HP.js";
|
|
13
13
|
import {
|
|
@@ -20,23 +20,23 @@ import {
|
|
|
20
20
|
isPolicyConfig,
|
|
21
21
|
sendNotification,
|
|
22
22
|
waitForAnswer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AKCE6ZRF.js";
|
|
24
24
|
import {
|
|
25
25
|
clientErrorKindOf,
|
|
26
26
|
reportClientError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UXKXGRKG.js";
|
|
28
28
|
import {
|
|
29
29
|
withRetry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-34EQOFMH.js";
|
|
31
31
|
import {
|
|
32
32
|
getMachineId
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DMU5E6HJ.js";
|
|
34
34
|
import {
|
|
35
35
|
reportedInstallSource
|
|
36
36
|
} from "./chunk-5Y2DY6X4.js";
|
|
37
37
|
import {
|
|
38
38
|
canonicalJson
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
40
40
|
import {
|
|
41
41
|
writeFileAtomic
|
|
42
42
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clientErrorKindOf,
|
|
3
3
|
reportClientError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UXKXGRKG.js";
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-34EQOFMH.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4CW5EAOI.js";
|
|
12
12
|
import {
|
|
13
13
|
getBaseUrl
|
|
14
14
|
} from "./chunk-ON5JW2HP.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YOYSXLUB.js";
|
|
4
4
|
import {
|
|
5
5
|
isProtectedByScope,
|
|
6
6
|
registerHookEntry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
8
8
|
|
|
9
9
|
// src/skills-cli.ts
|
|
10
10
|
import { execSync } from "child_process";
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
addPusharyToolPermissions,
|
|
4
4
|
isPusharyHook,
|
|
5
5
|
removeClaudeMcpServers
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EJXEHNB5.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
addGeminiMcpServer,
|
|
10
10
|
removeGeminiMcpServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YLJ26RR2.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_CODE_AGENT,
|
|
14
14
|
parseApplyPatchFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4DYHBXX4.js";
|
|
16
16
|
import {
|
|
17
17
|
guardBinary,
|
|
18
18
|
holdBudgetOf,
|
|
19
19
|
registerHookEntry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
21
21
|
import {
|
|
22
22
|
PHONE_ANSWERED_TOOLS,
|
|
23
23
|
hookCompatibleProfile,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-27A7L4DA.js";
|
|
4
4
|
import {
|
|
5
5
|
addClaudeMcpServer,
|
|
6
6
|
addPusharyHooks,
|
|
7
7
|
addPusharyToolPermissions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EJXEHNB5.js";
|
|
9
9
|
import {
|
|
10
10
|
detectClaudeVersion
|
|
11
11
|
} from "./chunk-RIVNNBEK.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
codexUnprovenHolds,
|
|
16
16
|
codexWired,
|
|
17
17
|
geminiWired
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YOYSXLUB.js";
|
|
19
19
|
import {
|
|
20
20
|
CLAUDE_HOOK_BINARY,
|
|
21
21
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
needsReregistration,
|
|
27
27
|
registrationSignatures,
|
|
28
28
|
supportedClaudeEvents
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YLJ26RR2.js";
|
|
30
30
|
import {
|
|
31
31
|
formatVersion
|
|
32
32
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
registrationHolderOf,
|
|
50
50
|
resolveGlobalBinary,
|
|
51
51
|
vscodePluginMcp
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
53
53
|
import {
|
|
54
54
|
readJsonSafe,
|
|
55
55
|
writeFileAtomic,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SD6OLZJX.js";
|
|
4
4
|
import {
|
|
5
5
|
writeDegraded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UXKXGRKG.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"];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
supportedClaudeEvents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YLJ26RR2.js";
|
|
5
5
|
import {
|
|
6
6
|
guardBinary,
|
|
7
7
|
holdBudgetOf,
|
|
8
8
|
isProtectedByScope,
|
|
9
9
|
registerHookEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_LOCATOR_BINARY,
|
|
13
13
|
withHookHoldBudget
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "./chunk-TJMAXQ5Q.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DMU5E6HJ.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
activeHookSource,
|
|
3
3
|
activeIdentity
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CTNLP4A5.js";
|
|
5
5
|
import {
|
|
6
6
|
defersToNativeMode,
|
|
7
7
|
reportMachineDenial
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FBTUF2PH.js";
|
|
9
9
|
import {
|
|
10
10
|
isGatingMoment,
|
|
11
11
|
recordKeylessMoment
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
reportEvent,
|
|
40
40
|
scopePathFor,
|
|
41
41
|
settleQuestionsForToolUse
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-4DYHBXX4.js";
|
|
43
43
|
import {
|
|
44
44
|
DEFAULT_SESSION
|
|
45
45
|
} from "./chunk-N6IOSZOE.js";
|
|
@@ -55,13 +55,13 @@ import {
|
|
|
55
55
|
requestGate,
|
|
56
56
|
sendNotification,
|
|
57
57
|
waitForQuestion
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-AKCE6ZRF.js";
|
|
59
59
|
import {
|
|
60
60
|
SubscriptionRequiredError
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-34EQOFMH.js";
|
|
62
62
|
import {
|
|
63
63
|
getMachineId
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-DMU5E6HJ.js";
|
|
65
65
|
import {
|
|
66
66
|
getApiKey,
|
|
67
67
|
getBaseUrl
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SOUJG6UY.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IEXWWAJY.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
17
|
} from "./chunk-TJMAXQ5Q.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DMU5E6HJ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
23
|
} from "./chunk-ON5JW2HP.js";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZOKXZ3AS.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDaemonRunning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IEXWWAJY.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -2,11 +2,15 @@ import {
|
|
|
2
2
|
realpath
|
|
3
3
|
} from "./chunk-RIVNNBEK.js";
|
|
4
4
|
import {
|
|
5
|
+
readGlobalPrefixAsync,
|
|
5
6
|
resolveGlobalBinary,
|
|
7
|
+
resolveGlobalBinaryAt,
|
|
6
8
|
resolveGlobalPackageVersion,
|
|
9
|
+
resolveGlobalPackageVersionAsync,
|
|
7
10
|
resolvePackageVersionFromBinary,
|
|
8
|
-
resolvePathBinary
|
|
9
|
-
|
|
11
|
+
resolvePathBinary,
|
|
12
|
+
resolvePathBinaryAsync
|
|
13
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
10
14
|
import {
|
|
11
15
|
MANAGED_PROVIDERS
|
|
12
16
|
} from "./chunk-5YY3IJT4.js";
|
|
@@ -114,7 +118,8 @@ var resolveControlPolicy = (input) => {
|
|
|
114
118
|
if (input.providerAvailable && input.managerAvailable) return "enabled";
|
|
115
119
|
return input.servicePresent ? "legacy" : "unsupported";
|
|
116
120
|
};
|
|
117
|
-
var
|
|
121
|
+
var preferGlobalProviderBinary = (platform) => platform === "win32";
|
|
122
|
+
var resolveProviderBinary = (provider, platform = process.platform) => preferGlobalProviderBinary(platform) ? resolveGlobalBinary(provider) ?? resolvePathBinary(provider, platform) : resolvePathBinary(provider, platform) ?? resolveGlobalBinary(provider);
|
|
118
123
|
var codexBinaryIsBroken = (binary) => codexInstallHealthAt(binary).kind === "binary-missing";
|
|
119
124
|
var detectCapabilities = (providers, codexCanStart) => {
|
|
120
125
|
const enabled = new Set(providers);
|
|
@@ -134,6 +139,49 @@ var detectLaunchableProviderCapabilities = (providers = MANAGED_PROVIDERS) => de
|
|
|
134
139
|
var SPAWN_CAPABILITY = "spawn";
|
|
135
140
|
var launchAdvertisement = (launchable) => hasSpawnProvider(launchable) ? [SPAWN_CAPABILITY, ...launchable] : launchable;
|
|
136
141
|
var expectedLaunchCapabilities = (providers = MANAGED_PROVIDERS) => launchAdvertisement(detectLaunchableProviderCapabilities(providers));
|
|
142
|
+
var discoverProviderInventory = async (providers, signal, platform = process.platform) => {
|
|
143
|
+
let prefix;
|
|
144
|
+
const globalBinary = async (provider) => {
|
|
145
|
+
const location = await (prefix ??= readGlobalPrefixAsync(signal));
|
|
146
|
+
return location === void 0 ? void 0 : resolveGlobalBinaryAt(provider, location, platform);
|
|
147
|
+
};
|
|
148
|
+
const findBinary = async (provider) => {
|
|
149
|
+
const binary = preferGlobalProviderBinary(platform) ? await globalBinary(provider) ?? await resolvePathBinaryAsync(provider, signal, platform) : await resolvePathBinaryAsync(provider, signal, platform) ?? await globalBinary(provider);
|
|
150
|
+
return [provider, binary];
|
|
151
|
+
};
|
|
152
|
+
const found = await Promise.all([...new Set(providers)].map(findBinary));
|
|
153
|
+
const binaries = {};
|
|
154
|
+
for (const [provider, binary] of found) {
|
|
155
|
+
if (binary !== void 0) binaries[provider] = binary;
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
binaries,
|
|
159
|
+
capabilities: providerLiveCapabilities({
|
|
160
|
+
claude: binaries.claude !== void 0,
|
|
161
|
+
codex: binaries.codex !== void 0 && !codexBinaryIsBroken(binaries.codex),
|
|
162
|
+
geminiVersion: binaries.gemini ? resolvePackageVersionFromBinary(binaries.gemini, "@google/gemini-cli") ?? await resolveGlobalPackageVersionAsync("@google/gemini-cli", signal) : void 0
|
|
163
|
+
})
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
var trackProviderInventory = async (providers, onChange) => {
|
|
167
|
+
const controller = new AbortController();
|
|
168
|
+
let current = await discoverProviderInventory(providers, controller.signal);
|
|
169
|
+
let pending;
|
|
170
|
+
const accept = (next) => {
|
|
171
|
+
if (controller.signal.aborted) return;
|
|
172
|
+
current = next;
|
|
173
|
+
onChange(current);
|
|
174
|
+
};
|
|
175
|
+
const refresh = () => {
|
|
176
|
+
if (controller.signal.aborted) return Promise.resolve();
|
|
177
|
+
return pending ??= discoverProviderInventory(providers, controller.signal).then(accept).finally(() => {
|
|
178
|
+
pending = void 0;
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
return { get current() {
|
|
182
|
+
return current;
|
|
183
|
+
}, refresh, stop: () => controller.abort() };
|
|
184
|
+
};
|
|
137
185
|
|
|
138
186
|
export {
|
|
139
187
|
checkCodexInstall,
|
|
@@ -144,7 +192,7 @@ export {
|
|
|
144
192
|
resolveProviderBinary,
|
|
145
193
|
codexBinaryIsBroken,
|
|
146
194
|
detectProviderLiveCapabilities,
|
|
147
|
-
detectLaunchableProviderCapabilities,
|
|
148
195
|
launchAdvertisement,
|
|
149
|
-
expectedLaunchCapabilities
|
|
196
|
+
expectedLaunchCapabilities,
|
|
197
|
+
trackProviderInventory
|
|
150
198
|
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-POFBE6ZY.js";
|
|
5
5
|
import {
|
|
6
6
|
isNetworkFailure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4CW5EAOI.js";
|
|
8
8
|
import {
|
|
9
9
|
clientReportClaims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey,
|
|
13
13
|
getBaseUrl
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VF3X4MDB.js";
|
|
4
4
|
import {
|
|
5
5
|
openCodeConfigDirFrom
|
|
6
6
|
} from "./chunk-NOLPURUI.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
NpmMissingError,
|
|
12
12
|
codexHomeFrom,
|
|
13
13
|
resolvePathBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YLJ26RR2.js";
|
|
6
6
|
import {
|
|
7
7
|
CODEX_HOOK_EVENTS,
|
|
8
8
|
hasCodexHooks,
|
|
9
9
|
holdBudgetOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZR7LIQKO.js";
|
|
11
11
|
import {
|
|
12
12
|
CURSOR_GATE_EVENTS,
|
|
13
13
|
HOOK_LOCATOR_BINARY,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-MYHG7PX2.js";
|
|
7
7
|
import {
|
|
8
8
|
pusharyHookExecutable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YOYSXLUB.js";
|
|
10
10
|
import {
|
|
11
11
|
BELL_HOOK_BINARY
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XH7UNEHO.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/hook-ownership.ts
|
|
15
15
|
var commandsIn = (value) => {
|