@pushary/agent-hooks 1.8.2 → 1.9.0
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/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +31 -31
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +13 -13
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +43 -40
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +30 -30
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +28 -28
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +27 -27
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +31 -31
- 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 +28 -28
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +53 -38
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +223 -147
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-NHCUXTEM.js → chunk-2V64X5RE.js} +1 -1
- package/dist/{chunk-ZJYJAD52.js → chunk-3OFHFVPX.js} +1 -1
- package/dist/{chunk-F6NTWZZC.js → chunk-42E4DE6C.js} +9 -9
- package/dist/{chunk-INSMZNS7.js → chunk-4GMZOGH4.js} +10 -7
- package/dist/{chunk-5YY3IJT4.js → chunk-4PCF34AB.js} +17 -0
- package/dist/{chunk-7U7ZWUTR.js → chunk-4ZXYWEEH.js} +1 -1
- package/dist/{chunk-DVW2MYCM.js → chunk-75CEJ4WP.js} +3 -3
- package/dist/{chunk-DXBS2EL7.js → chunk-7LLNRCOK.js} +1 -1
- package/dist/{chunk-I3XLHSOC.js → chunk-7TQQSQZ7.js} +6 -6
- package/dist/{chunk-KB2FTO4O.js → chunk-BG4QCOHQ.js} +4 -4
- package/dist/{chunk-XQZEIWAV.js → chunk-CFAD2LTH.js} +54 -6
- package/dist/{chunk-MOTNSXC3.js → chunk-CKPDSFY3.js} +5 -5
- package/dist/{chunk-I4HKMUZQ.js → chunk-CPBRXBLG.js} +3 -3
- package/dist/{chunk-ON5JW2HP.js → chunk-EG46RJRF.js} +1 -1
- package/dist/{chunk-DLEKCAQL.js → chunk-ET6QSY3H.js} +1 -1
- package/dist/{chunk-NOLPURUI.js → chunk-HHNFGWR5.js} +1 -1
- package/dist/{chunk-NNWQ5VDB.js → chunk-HNMMKFYN.js} +10 -10
- package/dist/{chunk-N6JJJTPH.js → chunk-HQWPMVR4.js} +3 -3
- package/dist/{chunk-UMMCHS6P.js → chunk-HSM5FIA3.js} +1 -1
- package/dist/{chunk-7ITOAMCD.js → chunk-IJJ3HHFT.js} +1 -1
- package/dist/{chunk-CHMOVJ2M.js → chunk-IQUBCAEK.js} +1 -1
- package/dist/{chunk-HVDMGDYV.js → chunk-JOQEPWDH.js} +2 -2
- package/dist/{chunk-W2LJ4O3A.js → chunk-JW7DKTT6.js} +2 -2
- package/dist/{chunk-CB23AO4D.js → chunk-K75TP4JY.js} +2 -2
- package/dist/{chunk-LK2S5XIV.js → chunk-K7DY2DQN.js} +6 -6
- package/dist/{chunk-HMNR7B2F.js → chunk-KETBIX7I.js} +1 -1
- package/dist/{chunk-EIGJYCOE.js → chunk-LQESQPIT.js} +5 -5
- package/dist/{chunk-T55H6YEP.js → chunk-MBNMO5IR.js} +2 -2
- package/dist/{chunk-72WOCX22.js → chunk-MBVV3RX3.js} +1 -1
- package/dist/{chunk-URNXU3FO.js → chunk-MGXXQHCM.js} +1 -1
- package/dist/{chunk-644AEX4T.js → chunk-MQJWO3AA.js} +3 -3
- package/dist/{chunk-XEGVVU5H.js → chunk-NAJ3UV4E.js} +3 -3
- package/dist/{chunk-YNCGXHM4.js → chunk-OLG6FJV2.js} +4 -4
- package/dist/{chunk-EESPY5DG.js → chunk-OXQKXZJ3.js} +2 -2
- package/dist/{chunk-64H5IZZD.js → chunk-P25O4K3J.js} +2 -2
- package/dist/{chunk-2SLCHCVN.js → chunk-P6VDRQF3.js} +3 -3
- package/dist/{chunk-UPLV5AJF.js → chunk-R76C43H7.js} +58 -6
- package/dist/{chunk-HOEB6AKG.js → chunk-RZXQFAWR.js} +1 -1
- package/dist/{chunk-35X5UDML.js → chunk-SDSKTRIV.js} +1 -1
- package/dist/{chunk-MYHG7PX2.js → chunk-TUZ7WKOF.js} +1 -1
- package/dist/{chunk-5Y2DY6X4.js → chunk-US3RDXK7.js} +2 -2
- package/dist/{chunk-4A3UQERT.js → chunk-VV4SBPCQ.js} +1 -1
- package/dist/{chunk-VFFHQC7W.js → chunk-VYNTRHB6.js} +1 -1
- package/dist/{chunk-DUA5O6X5.js → chunk-WFVNXGZ6.js} +8 -8
- package/dist/{chunk-BDMC5H5L.js → chunk-XGS2DHGF.js} +2 -2
- package/dist/{chunk-B3UVRGYP.js → chunk-XXVMUMKT.js} +5 -5
- package/dist/{chunk-S2UNQQQS.js → chunk-YFS4HYCI.js} +3 -3
- package/dist/{chunk-5DGNEUXK.js → chunk-YJZDIFON.js} +2 -2
- package/dist/{chunk-MMVCI6DT.js → chunk-ZMVLKPT7.js} +5 -5
- package/dist/{chunk-TJMAXQ5Q.js → chunk-ZRHA4PGN.js} +2 -2
- package/dist/{reapply-3UERAKQN.js → reapply-FYCVOWCW.js} +8 -8
- package/dist/src/index.js +20 -20
- package/package.json +1 -1
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
IDLE_PROMPT_NOTIFICATION,
|
|
15
15
|
NOTIFICATION_PUSH_TYPES,
|
|
16
16
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VYNTRHB6.js";
|
|
18
18
|
import {
|
|
19
19
|
cancelQuestion,
|
|
20
20
|
isPolicyConfig,
|
|
21
21
|
sendNotification,
|
|
22
22
|
waitForAnswer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZMVLKPT7.js";
|
|
24
24
|
import {
|
|
25
25
|
clientErrorKindOf,
|
|
26
26
|
reportClientError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BG4QCOHQ.js";
|
|
28
28
|
import {
|
|
29
29
|
withRetry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CPBRXBLG.js";
|
|
31
31
|
import {
|
|
32
32
|
getMachineId
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VV4SBPCQ.js";
|
|
34
34
|
import {
|
|
35
35
|
reportedInstallSource
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-US3RDXK7.js";
|
|
37
37
|
import {
|
|
38
38
|
canonicalJson
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-R76C43H7.js";
|
|
40
40
|
import {
|
|
41
41
|
writeFileAtomic
|
|
42
42
|
} from "./chunk-T7E75EKA.js";
|
|
43
43
|
import {
|
|
44
44
|
getApiKey,
|
|
45
45
|
getBaseUrl
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EG46RJRF.js";
|
|
47
47
|
import {
|
|
48
48
|
ACTION_BODY_MAX,
|
|
49
49
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolvePolicy,
|
|
71
71
|
toToolLookup,
|
|
72
72
|
truncateLine
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-4PCF34AB.js";
|
|
74
74
|
|
|
75
75
|
// src/policy.ts
|
|
76
76
|
import { createHash } from "crypto";
|
|
@@ -14,17 +14,18 @@ import {
|
|
|
14
14
|
} from "./chunk-U4TMAANR.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CPBRXBLG.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-US3RDXK7.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SDSKTRIV.js";
|
|
24
24
|
import {
|
|
25
|
+
NO_PAIRING_COMPUTER,
|
|
25
26
|
PAIR_TTL_SECONDS,
|
|
26
27
|
isAnswerSource
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4PCF34AB.js";
|
|
28
29
|
|
|
29
30
|
// src/reach.ts
|
|
30
31
|
var reachVerdict = (channels) => {
|
|
@@ -737,7 +738,7 @@ var PAIR_BROWSER_FALLBACK_AFTER_MS = 6e4;
|
|
|
737
738
|
var BROWSER_CONNECT_COMMAND = `${NPX_LATEST_COMMAND} setup --connect browser`;
|
|
738
739
|
var PAIR_BROWSER_FALLBACK_LINE = `Still waiting? Sign in with a browser instead: Ctrl-C, then ${BROWSER_CONNECT_COMMAND}`;
|
|
739
740
|
var SYSTEM_PAIR_CLOCK = { now: () => Date.now(), sleep };
|
|
740
|
-
var startPairing = async (cliPublicKey) => {
|
|
741
|
+
var startPairing = async (cliPublicKey, computer) => {
|
|
741
742
|
try {
|
|
742
743
|
const res = await fetch(`${apiBase()}/api/mobile/pair/start`, {
|
|
743
744
|
method: "POST",
|
|
@@ -747,7 +748,7 @@ var startPairing = async (cliPublicKey) => {
|
|
|
747
748
|
// phone that authorizes has the session and mints the key but never saw
|
|
748
749
|
// this terminal. Sending it here is what lets the minted key name its
|
|
749
750
|
// origin. An older server ignores the extra field.
|
|
750
|
-
body: JSON.stringify({ cliPublicKey, installSource: reportedInstallSource() }),
|
|
751
|
+
body: JSON.stringify({ cliPublicKey, installSource: reportedInstallSource(), ...computer }),
|
|
751
752
|
signal: AbortSignal.timeout(1e4)
|
|
752
753
|
});
|
|
753
754
|
if (!res.ok) return null;
|
|
@@ -768,6 +769,8 @@ var describePairFailure = (reason) => {
|
|
|
768
769
|
return "The app could not authorize this terminal. Re-run setup to try again";
|
|
769
770
|
case "payment_required":
|
|
770
771
|
return "Your Pushary workspace has no active subscription. Subscribe in the Pushary app or at pushary.com, then run setup again";
|
|
772
|
+
case "denied":
|
|
773
|
+
return "You denied this computer on your phone. Run setup again if that was a mistake";
|
|
771
774
|
default:
|
|
772
775
|
return "Pairing failed. Re-run setup to try again";
|
|
773
776
|
}
|
|
@@ -830,7 +833,7 @@ var connectViaAppPairing = async (options = {}) => {
|
|
|
830
833
|
const clock = options.clock ?? SYSTEM_PAIR_CLOCK;
|
|
831
834
|
const keypair = generateKeypair();
|
|
832
835
|
const requestedAt = clock.now();
|
|
833
|
-
const started = await startPairing(keypair.publicKeyB64);
|
|
836
|
+
const started = await startPairing(keypair.publicKeyB64, options.computer ?? NO_PAIRING_COMPUTER);
|
|
834
837
|
if (!started) {
|
|
835
838
|
console.log(` ${yellow("!")} Couldn't start pairing. Check your connection and try again.`);
|
|
836
839
|
return pairFailed("unreachable");
|
|
@@ -532,6 +532,18 @@ var degradedLine = (subsystem, report) => `${DEGRADED_PREFIX} ${JSON.stringify(d
|
|
|
532
532
|
|
|
533
533
|
// ../contracts/src/setup-wire.ts
|
|
534
534
|
var PAIR_TTL_SECONDS = 900;
|
|
535
|
+
var computerOsOfPlatform = (platform) => {
|
|
536
|
+
switch (platform) {
|
|
537
|
+
case "darwin":
|
|
538
|
+
return "mac";
|
|
539
|
+
case "win32":
|
|
540
|
+
return "windows";
|
|
541
|
+
case "linux":
|
|
542
|
+
return "linux";
|
|
543
|
+
default:
|
|
544
|
+
return null;
|
|
545
|
+
}
|
|
546
|
+
};
|
|
535
547
|
var SETUP_AGENT_CHOICES = [
|
|
536
548
|
"claude_code",
|
|
537
549
|
"codex",
|
|
@@ -544,6 +556,8 @@ var SETUP_AGENT_CHOICES = [
|
|
|
544
556
|
...COMPATIBLE_AGENT_TYPES,
|
|
545
557
|
"custom"
|
|
546
558
|
];
|
|
559
|
+
var isComputerAgent = (agent) => agent !== "custom";
|
|
560
|
+
var NO_PAIRING_COMPUTER = { computerName: null, os: null, agents: null };
|
|
547
561
|
var SETUP_CONNECT_MODES = ["app", "browser", "web", "none"];
|
|
548
562
|
var isSetupConnectMode = (value) => typeof value === "string" && SETUP_CONNECT_MODES.includes(value);
|
|
549
563
|
|
|
@@ -2727,7 +2741,10 @@ export {
|
|
|
2727
2741
|
isHookActivationReport,
|
|
2728
2742
|
hookActivationResult,
|
|
2729
2743
|
PAIR_TTL_SECONDS,
|
|
2744
|
+
computerOsOfPlatform,
|
|
2730
2745
|
SETUP_AGENT_CHOICES,
|
|
2746
|
+
isComputerAgent,
|
|
2747
|
+
NO_PAIRING_COMPUTER,
|
|
2731
2748
|
SETUP_CONNECT_MODES,
|
|
2732
2749
|
isSetupConnectMode,
|
|
2733
2750
|
CLIENT_REPORT_PATH,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P6VDRQF3.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-EG46RJRF.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4PCF34AB.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;
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CFAD2LTH.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-LQESQPIT.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZRHA4PGN.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VV4SBPCQ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EG46RJRF.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4PCF34AB.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } 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-P6VDRQF3.js";
|
|
8
8
|
import {
|
|
9
9
|
clientReportClaims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R76C43H7.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey,
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EG46RJRF.js";
|
|
15
15
|
import {
|
|
16
16
|
CLIENT_REPORT_PATH,
|
|
17
17
|
degradedLine
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4PCF34AB.js";
|
|
19
19
|
|
|
20
20
|
// src/client-report-claim.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -2,14 +2,18 @@ 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-R76C43H7.js";
|
|
10
14
|
import {
|
|
11
15
|
MANAGED_PROVIDERS
|
|
12
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4PCF34AB.js";
|
|
13
17
|
|
|
14
18
|
// src/setup/codex-install.ts
|
|
15
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -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
|
};
|
|
@@ -3,28 +3,28 @@ import {
|
|
|
3
3
|
addPusharyToolPermissions,
|
|
4
4
|
isPusharyHook,
|
|
5
5
|
removeClaudeMcpServers
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MQJWO3AA.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
addGeminiMcpServer,
|
|
10
10
|
removeGeminiMcpServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YFS4HYCI.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_CODE_AGENT,
|
|
14
14
|
parseApplyPatchFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-42E4DE6C.js";
|
|
16
16
|
import {
|
|
17
17
|
guardBinary,
|
|
18
18
|
holdBudgetOf,
|
|
19
19
|
registerHookEntry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-R76C43H7.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-4PCF34AB.js";
|
|
28
28
|
|
|
29
29
|
// src/compatible-config.ts
|
|
30
30
|
import { homedir } from "os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-75CEJ4WP.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P6VDRQF3.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EG46RJRF.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
activeHookSource,
|
|
3
3
|
activeIdentity
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CKPDSFY3.js";
|
|
5
5
|
import {
|
|
6
6
|
defersToNativeMode,
|
|
7
7
|
reportMachineDenial
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YJZDIFON.js";
|
|
9
9
|
import {
|
|
10
10
|
isGatingMoment,
|
|
11
11
|
recordKeylessMoment
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IJJ3HHFT.js";
|
|
13
13
|
import {
|
|
14
14
|
announceSubscriptionRequired,
|
|
15
15
|
denyReasonFrom,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
reportEvent,
|
|
40
40
|
scopePathFor,
|
|
41
41
|
settleQuestionsForToolUse
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-42E4DE6C.js";
|
|
43
43
|
import {
|
|
44
44
|
DEFAULT_SESSION
|
|
45
45
|
} from "./chunk-N6IOSZOE.js";
|
|
@@ -55,20 +55,20 @@ import {
|
|
|
55
55
|
requestGate,
|
|
56
56
|
sendNotification,
|
|
57
57
|
waitForQuestion
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-ZMVLKPT7.js";
|
|
59
59
|
import {
|
|
60
60
|
SubscriptionRequiredError
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CPBRXBLG.js";
|
|
62
62
|
import {
|
|
63
63
|
getMachineId
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-VV4SBPCQ.js";
|
|
65
65
|
import {
|
|
66
66
|
getApiKey,
|
|
67
67
|
getBaseUrl
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-EG46RJRF.js";
|
|
69
69
|
import {
|
|
70
70
|
NPX_LATEST_COMMAND
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-SDSKTRIV.js";
|
|
72
72
|
import {
|
|
73
73
|
AGENT_QUESTION_STRATEGY,
|
|
74
74
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
parseAgentQuestions,
|
|
97
97
|
resolveGate,
|
|
98
98
|
stoppedOutput
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-4PCF34AB.js";
|
|
100
100
|
|
|
101
101
|
// src/claude-permission-rules.ts
|
|
102
102
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ET6QSY3H.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SDSKTRIV.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4PCF34AB.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MGXXQHCM.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HSM5FIA3.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
codexHooksJsonIn,
|
|
7
7
|
isPusharyCodexCommand,
|
|
8
8
|
resolvePathBinary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R76C43H7.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4PCF34AB.js";
|
|
13
13
|
|
|
14
14
|
// src/codex-app-server.ts
|
|
15
15
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SDSKTRIV.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4PCF34AB.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MBNMO5IR.js";
|
|
4
4
|
import {
|
|
5
5
|
openCodeConfigDirFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HHNFGWR5.js";
|
|
7
7
|
import {
|
|
8
8
|
KEY_FILE_MODE
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZRHA4PGN.js";
|
|
10
10
|
import {
|
|
11
11
|
NpmMissingError,
|
|
12
12
|
codexHomeFrom,
|
|
13
13
|
resolvePathBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R76C43H7.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
} from "./chunk-T7E75EKA.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SDSKTRIV.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4PCF34AB.js";
|
|
26
26
|
|
|
27
27
|
// src/hermes-config.ts
|
|
28
28
|
import { execFileSync } from "child_process";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZRHA4PGN.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VV4SBPCQ.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R76C43H7.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
} from "./chunk-T7E75EKA.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EG46RJRF.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
27
27
|
getPackageVersion,
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4PCF34AB.js";
|
|
31
31
|
|
|
32
32
|
// src/daemon-lifecycle.ts
|
|
33
33
|
import { dirname, join, win32 as win32Path } from "path";
|