@pushary/agent-hooks 0.89.4 → 0.89.6
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/dist/bin/pushary-bell-hook.js +2 -2
- package/dist/bin/pushary-bell.js +4 -4
- package/dist/bin/pushary-claude.js +1 -1
- package/dist/bin/pushary-clean.js +5 -8
- package/dist/bin/pushary-codex-bridge.js +1 -1
- package/dist/bin/pushary-connect.js +3 -3
- package/dist/bin/pushary-daemon.js +64 -31
- package/dist/bin/pushary-disconnect.js +2 -2
- package/dist/bin/pushary-doctor.js +51 -24
- package/dist/bin/pushary-hook.js +2 -2
- package/dist/bin/pushary-login.js +3 -3
- package/dist/bin/pushary-logout.js +3 -3
- package/dist/bin/pushary-mode.js +2 -2
- package/dist/bin/pushary-setup.js +116 -21
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +3 -3
- package/dist/bin/pushary-suggestions.js +2 -2
- package/dist/bin/pushary-upgrade.js +68 -199
- package/dist/bin/pushary-wait.js +2 -2
- package/dist/bin/pushary.js +1 -1
- package/dist/{chunk-GPNOHKFO.js → chunk-3XTFX4CL.js} +1 -0
- package/dist/chunk-5TASNKRX.js +210 -0
- package/dist/{chunk-W6NPWHBJ.js → chunk-L3YUHEB6.js} +13 -1
- package/dist/{chunk-KJ57OPCC.js → chunk-LURY4WNF.js} +1 -1
- package/dist/chunk-NKHEHEUM.js +56 -0
- package/dist/{chunk-NLMSSKES.js → chunk-NQNCSPEH.js} +72 -9
- package/dist/{chunk-7IJYOBHL.js → chunk-WQGMUIDW.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-FWUEYXSD.js +0 -29
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-WQGMUIDW.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
7
|
} from "../chunk-6CUUA7HO.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-L3YUHEB6.js";
|
|
9
9
|
import "../chunk-BC3VCZ3E.js";
|
|
10
10
|
import "../chunk-OFRNZWC4.js";
|
|
11
11
|
import "../chunk-6MTNS63X.js";
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-WQGMUIDW.js";
|
|
9
9
|
import {
|
|
10
10
|
guardBinary
|
|
11
11
|
} from "../chunk-AIGDBRIJ.js";
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
createIo
|
|
18
18
|
} from "../chunk-5RUIFDTP.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-L3YUHEB6.js";
|
|
20
20
|
import {
|
|
21
21
|
parseFlags
|
|
22
22
|
} from "../chunk-GMXKITVA.js";
|
|
23
23
|
import {
|
|
24
24
|
exitOnHelpFlag
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-LURY4WNF.js";
|
|
26
|
+
import "../chunk-3XTFX4CL.js";
|
|
27
27
|
import "../chunk-BC3VCZ3E.js";
|
|
28
28
|
import "../chunk-DINDL2CF.js";
|
|
29
29
|
import "../chunk-OFRNZWC4.js";
|
|
@@ -14,9 +14,8 @@ import {
|
|
|
14
14
|
import "../chunk-ATBKJNWS.js";
|
|
15
15
|
import "../chunk-AIGDBRIJ.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "../chunk-NLMSSKES.js";
|
|
17
|
+
disableDaemonService
|
|
18
|
+
} from "../chunk-NQNCSPEH.js";
|
|
20
19
|
import "../chunk-XHKBHWLX.js";
|
|
21
20
|
import {
|
|
22
21
|
execNpm
|
|
@@ -48,8 +47,8 @@ import {
|
|
|
48
47
|
} from "../chunk-GMXKITVA.js";
|
|
49
48
|
import {
|
|
50
49
|
exitOnHelpFlag
|
|
51
|
-
} from "../chunk-
|
|
52
|
-
import "../chunk-
|
|
50
|
+
} from "../chunk-LURY4WNF.js";
|
|
51
|
+
import "../chunk-3XTFX4CL.js";
|
|
53
52
|
import {
|
|
54
53
|
removeClaudeAlias
|
|
55
54
|
} from "../chunk-BC3VCZ3E.js";
|
|
@@ -148,9 +147,7 @@ var guardedDaemonRemoval = async () => {
|
|
|
148
147
|
wouldNote("stop and uninstall", "Pushary background service");
|
|
149
148
|
return true;
|
|
150
149
|
}
|
|
151
|
-
|
|
152
|
-
const detached = await stopDaemonRunning();
|
|
153
|
-
return service.kind === "ok" && detached.kind !== "unavailable";
|
|
150
|
+
return (await disableDaemonService()).kind === "ok";
|
|
154
151
|
};
|
|
155
152
|
var guardedInstructionBlockRemoval = (path) => {
|
|
156
153
|
if (!dryRun) return removeInstructionBlock(path);
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
} from "../chunk-5RUIFDTP.js";
|
|
17
17
|
import {
|
|
18
18
|
readKeySource
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-L3YUHEB6.js";
|
|
20
20
|
import {
|
|
21
21
|
parseFlags
|
|
22
22
|
} from "../chunk-GMXKITVA.js";
|
|
23
23
|
import {
|
|
24
24
|
exitOnHelpFlag
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-LURY4WNF.js";
|
|
26
|
+
import "../chunk-3XTFX4CL.js";
|
|
27
27
|
import "../chunk-BC3VCZ3E.js";
|
|
28
28
|
import "../chunk-DINDL2CF.js";
|
|
29
29
|
import "../chunk-BSZYIAZL.js";
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
inspectConfiguredManagedProviders
|
|
4
|
+
} from "../chunk-5TASNKRX.js";
|
|
5
|
+
import "../chunk-475T3XIO.js";
|
|
2
6
|
import {
|
|
3
7
|
HEARTBEAT_INTERVAL_MS,
|
|
4
8
|
sendHeartbeat
|
|
5
9
|
} from "../chunk-VP7SDXYG.js";
|
|
10
|
+
import "../chunk-OBI4YMCT.js";
|
|
11
|
+
import "../chunk-7TS2G4QG.js";
|
|
12
|
+
import "../chunk-ATBKJNWS.js";
|
|
13
|
+
import "../chunk-AIGDBRIJ.js";
|
|
6
14
|
import {
|
|
7
15
|
DAEMON_LEASE_RENEW_INTERVAL_MS,
|
|
8
16
|
acquireDaemonLease,
|
|
17
|
+
daemonServiceManagerAvailable,
|
|
9
18
|
ensureDaemonRunning,
|
|
19
|
+
hasDaemonServiceDefinition,
|
|
10
20
|
manageDaemonService,
|
|
11
21
|
parseDaemonAction,
|
|
12
22
|
readDaemonStatus,
|
|
13
23
|
replaceDaemonService,
|
|
14
24
|
requestDaemonHandoff,
|
|
15
25
|
stopDaemonRunning
|
|
16
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-NQNCSPEH.js";
|
|
17
27
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
geminiLiveCapabilities
|
|
23
|
-
} from "../chunk-FWUEYXSD.js";
|
|
28
|
+
detectProviderLiveCapabilities,
|
|
29
|
+
hasSpawnProvider,
|
|
30
|
+
resolveControlPolicy
|
|
31
|
+
} from "../chunk-NKHEHEUM.js";
|
|
24
32
|
import {
|
|
25
33
|
findLiveProcessBySpawnId,
|
|
26
34
|
ownsLiveProcess
|
|
@@ -29,19 +37,22 @@ import {
|
|
|
29
37
|
spawnClaude
|
|
30
38
|
} from "../chunk-XHKBHWLX.js";
|
|
31
39
|
import {
|
|
32
|
-
resolveBinary
|
|
33
|
-
resolveGlobalPackageVersion,
|
|
34
|
-
resolvePackageVersionFromBinary
|
|
40
|
+
resolveBinary
|
|
35
41
|
} from "../chunk-PZA7G4CN.js";
|
|
36
42
|
import {
|
|
37
43
|
getMachineId
|
|
38
44
|
} from "../chunk-2HYPZLYY.js";
|
|
39
45
|
import "../chunk-V37ZXMH3.js";
|
|
46
|
+
import {
|
|
47
|
+
readControlMode
|
|
48
|
+
} from "../chunk-L3YUHEB6.js";
|
|
40
49
|
import {
|
|
41
50
|
exitOnHelpFlag
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
51
|
+
} from "../chunk-LURY4WNF.js";
|
|
52
|
+
import "../chunk-3XTFX4CL.js";
|
|
53
|
+
import "../chunk-BC3VCZ3E.js";
|
|
44
54
|
import "../chunk-DINDL2CF.js";
|
|
55
|
+
import "../chunk-OFRNZWC4.js";
|
|
45
56
|
import {
|
|
46
57
|
EXIT
|
|
47
58
|
} from "../chunk-KZERVKTD.js";
|
|
@@ -174,8 +185,17 @@ var isAuthFailure = (err) => {
|
|
|
174
185
|
if (candidate.name !== "DrainError") return false;
|
|
175
186
|
return candidate.status === 401 || candidate.status === 403;
|
|
176
187
|
};
|
|
177
|
-
var
|
|
178
|
-
|
|
188
|
+
var normalizeLaunchAgent = (requestedAgent) => {
|
|
189
|
+
if (requestedAgent === void 0 || requestedAgent === "claude") return "claude";
|
|
190
|
+
if (requestedAgent === "codex" || requestedAgent === "gemini") return requestedAgent;
|
|
191
|
+
return null;
|
|
192
|
+
};
|
|
193
|
+
var providerLaunchError = (requestedAgent, binaries, configuredProviders) => {
|
|
194
|
+
const agent = normalizeLaunchAgent(requestedAgent);
|
|
195
|
+
if (!agent) return `Unsupported agent provider: ${requestedAgent}`;
|
|
196
|
+
if (configuredProviders && !configuredProviders.includes(agent)) {
|
|
197
|
+
return `${agent === "claude" ? "Claude Code" : agent === "codex" ? "Codex" : "Gemini"} is not configured for Pushary on this machine`;
|
|
198
|
+
}
|
|
179
199
|
if (binaries[agent]) return null;
|
|
180
200
|
return agent === "claude" ? "Claude Code is not installed on this machine" : `${agent === "codex" ? "Codex" : "Gemini"} CLI is not installed on this machine`;
|
|
181
201
|
};
|
|
@@ -200,7 +220,8 @@ var resolveSpawnDirectory = (requested, options = {}) => {
|
|
|
200
220
|
var isFlagShapedPrompt = (prompt) => prompt.trimStart().startsWith("-");
|
|
201
221
|
var buildSpawnLaunch = (req, opts) => {
|
|
202
222
|
if (isFlagShapedPrompt(req.prompt)) return null;
|
|
203
|
-
const agent = req.agent
|
|
223
|
+
const agent = normalizeLaunchAgent(req.agent);
|
|
224
|
+
if (!agent) return null;
|
|
204
225
|
const model = typeof req.model === "string" && req.model.length > 0 ? ["--model", req.model] : [];
|
|
205
226
|
if (agent === "claude") {
|
|
206
227
|
const claudeArgs = ["claude", "--remote", ...model, "-p", req.prompt];
|
|
@@ -239,12 +260,8 @@ var runSpawnDaemon = async () => {
|
|
|
239
260
|
const machineId = getMachineId();
|
|
240
261
|
const baseUrl = getBaseUrl();
|
|
241
262
|
const pusharyBin = resolveBinary("pushary") ?? "pushary";
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
const geminiBin = resolveBinary("gemini");
|
|
245
|
-
const geminiCapabilities = geminiBin ? geminiLiveCapabilities(
|
|
246
|
-
resolvePackageVersionFromBinary(geminiBin, "@google/gemini-cli") ?? resolveGlobalPackageVersion("@google/gemini-cli")
|
|
247
|
-
) : [];
|
|
263
|
+
const configuredProviders = inspectConfiguredManagedProviders();
|
|
264
|
+
const providerCapabilities = detectProviderLiveCapabilities(configuredProviders);
|
|
248
265
|
const siblingEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary.js") : "";
|
|
249
266
|
const codexBridgeEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary-codex-bridge.js") : "pushary-codex-bridge";
|
|
250
267
|
const geminiBridgeEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary-gemini-bridge.js") : "pushary-gemini-bridge";
|
|
@@ -294,13 +311,14 @@ var runSpawnDaemon = async () => {
|
|
|
294
311
|
}
|
|
295
312
|
const directory = resolveSpawnDirectory(req.cwd);
|
|
296
313
|
if (!directory.ok) return Promise.reject(new Error(directory.message));
|
|
297
|
-
const agent = req.agent
|
|
314
|
+
const agent = normalizeLaunchAgent(req.agent);
|
|
315
|
+
if (!agent) return Promise.reject(new Error(`Unsupported agent provider: ${req.agent}`));
|
|
298
316
|
const providerBin = resolveBinary(agent);
|
|
299
317
|
const unavailable = providerLaunchError(req.agent, {
|
|
300
318
|
claude: agent === "claude" ? providerBin ?? null : null,
|
|
301
319
|
codex: agent === "codex" ? providerBin ?? null : null,
|
|
302
320
|
gemini: agent === "gemini" ? providerBin ?? null : null
|
|
303
|
-
});
|
|
321
|
+
}, configuredProviders);
|
|
304
322
|
if (unavailable) return Promise.reject(new Error(unavailable));
|
|
305
323
|
spawnTimestamps.push(Date.now());
|
|
306
324
|
const cwd = directory.cwd;
|
|
@@ -542,12 +560,10 @@ var runSpawnDaemon = async () => {
|
|
|
542
560
|
const result = await sendHeartbeat(apiKey, {
|
|
543
561
|
repoKey: basename(process.cwd()),
|
|
544
562
|
capabilities: [
|
|
545
|
-
"spawn",
|
|
563
|
+
...hasSpawnProvider(providerCapabilities) ? ["spawn"] : [],
|
|
546
564
|
STOP_CAPABILITY,
|
|
547
565
|
STOP_ACK_CAPABILITY,
|
|
548
|
-
...
|
|
549
|
-
...codexBin ? [CODEX_BRIDGE_CAPABILITY, CODEX_RESUME_CAPABILITY] : [],
|
|
550
|
-
...geminiCapabilities
|
|
566
|
+
...providerCapabilities
|
|
551
567
|
]
|
|
552
568
|
});
|
|
553
569
|
if (result.kind === "ok") daemonLease.recordSuccessfulHeartbeat();
|
|
@@ -563,10 +579,9 @@ var runSpawnDaemon = async () => {
|
|
|
563
579
|
versionWatch = setInterval(() => {
|
|
564
580
|
if (daemonLease.shouldYield()) finish();
|
|
565
581
|
}, VERSION_CHECK_INTERVAL_MS);
|
|
566
|
-
stderr(
|
|
567
|
-
|
|
568
|
-
`
|
|
569
|
-
);
|
|
582
|
+
stderr(hasSpawnProvider(providerCapabilities) ? `[pushary] daemon online \u2014 this machine (${machineId}) can now be sent a new session from your phone. Ctrl-C to stop.
|
|
583
|
+
` : `[pushary] daemon online \u2014 no supported Claude, Codex, or Gemini CLI was found, so phone-start is unavailable. Ctrl-C to stop.
|
|
584
|
+
`);
|
|
570
585
|
timer = setTimeout(tick, FAST_POLL_MS);
|
|
571
586
|
const signals = daemonSignals();
|
|
572
587
|
await new Promise((resolve) => {
|
|
@@ -603,6 +618,24 @@ var main = async () => {
|
|
|
603
618
|
`);
|
|
604
619
|
return status.kind === "running" ? EXIT.OK : EXIT.UNREACHABLE;
|
|
605
620
|
}
|
|
621
|
+
if (action === "install" || action === "start" || action === "restart") {
|
|
622
|
+
if (!getApiKey()) {
|
|
623
|
+
process.stderr.write("[pushary] daemon service has no readable API key; re-run setup.\n");
|
|
624
|
+
return EXIT.FAILED;
|
|
625
|
+
}
|
|
626
|
+
const status = readDaemonStatus();
|
|
627
|
+
const controlPolicy = resolveControlPolicy({
|
|
628
|
+
mode: readControlMode() ?? (action === "install" ? "on" : null),
|
|
629
|
+
providerAvailable: hasSpawnProvider(detectProviderLiveCapabilities(inspectConfiguredManagedProviders())),
|
|
630
|
+
managerAvailable: daemonServiceManagerAvailable(),
|
|
631
|
+
servicePresent: status.kind !== "absent" || hasDaemonServiceDefinition()
|
|
632
|
+
});
|
|
633
|
+
if (controlPolicy !== "enabled") {
|
|
634
|
+
process.stderr.write(`[pushary] daemon service is ${controlPolicy}; run setup with --control on to configure phone-start safely.
|
|
635
|
+
`);
|
|
636
|
+
return EXIT.FAILED;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
606
639
|
if (action === "install") {
|
|
607
640
|
const installed = await replaceDaemonService();
|
|
608
641
|
if (installed.kind !== "ok") {
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
} from "../chunk-V37ZXMH3.js";
|
|
33
33
|
import {
|
|
34
34
|
exitOnHelpFlag
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import "../chunk-
|
|
35
|
+
} from "../chunk-LURY4WNF.js";
|
|
36
|
+
import "../chunk-3XTFX4CL.js";
|
|
37
37
|
import "../chunk-DINDL2CF.js";
|
|
38
38
|
import "../chunk-KZERVKTD.js";
|
|
39
39
|
import "../chunk-L4C2JXJS.js";
|
|
@@ -31,8 +31,15 @@ import {
|
|
|
31
31
|
import "../chunk-ATBKJNWS.js";
|
|
32
32
|
import "../chunk-AIGDBRIJ.js";
|
|
33
33
|
import {
|
|
34
|
+
daemonServiceManagerAvailable,
|
|
35
|
+
hasDaemonServiceDefinition,
|
|
34
36
|
readDaemonStatus
|
|
35
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-NQNCSPEH.js";
|
|
38
|
+
import {
|
|
39
|
+
detectProviderLiveCapabilities,
|
|
40
|
+
hasSpawnProvider,
|
|
41
|
+
resolveControlPolicy
|
|
42
|
+
} from "../chunk-NKHEHEUM.js";
|
|
36
43
|
import "../chunk-XHKBHWLX.js";
|
|
37
44
|
import {
|
|
38
45
|
execNpm
|
|
@@ -81,15 +88,16 @@ import {
|
|
|
81
88
|
} from "../chunk-5RUIFDTP.js";
|
|
82
89
|
import {
|
|
83
90
|
keyPrefix,
|
|
91
|
+
readControlMode,
|
|
84
92
|
readKeySource
|
|
85
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-L3YUHEB6.js";
|
|
86
94
|
import {
|
|
87
95
|
parseFlags
|
|
88
96
|
} from "../chunk-GMXKITVA.js";
|
|
89
97
|
import {
|
|
90
98
|
exitOnHelpFlag
|
|
91
|
-
} from "../chunk-
|
|
92
|
-
import "../chunk-
|
|
99
|
+
} from "../chunk-LURY4WNF.js";
|
|
100
|
+
import "../chunk-3XTFX4CL.js";
|
|
93
101
|
import "../chunk-BC3VCZ3E.js";
|
|
94
102
|
import {
|
|
95
103
|
getPackageVersion
|
|
@@ -354,23 +362,6 @@ var main = async () => {
|
|
|
354
362
|
break;
|
|
355
363
|
}
|
|
356
364
|
}
|
|
357
|
-
const daemon = readDaemonStatus();
|
|
358
|
-
const daemonOk = daemon.kind === "running";
|
|
359
|
-
const daemonFailure = daemonOk ? null : `local state is ${daemon.kind}`;
|
|
360
|
-
const daemonDetail = daemonFailure ? `${daemonFailure}; run \`pushary daemon install\` to install or repair the background service` : null;
|
|
361
|
-
check(
|
|
362
|
-
daemonOk,
|
|
363
|
-
"Remote-control daemon",
|
|
364
|
-
[
|
|
365
|
-
daemonDetail,
|
|
366
|
-
daemon.kind,
|
|
367
|
-
`pid ${daemon.pid ?? "none"}`,
|
|
368
|
-
`daemon ${daemon.daemonVersion ?? "none"}`,
|
|
369
|
-
`installed ${daemon.installedVersion}`,
|
|
370
|
-
`machine ${daemon.machineId ?? "none"}`,
|
|
371
|
-
`heartbeat ${daemon.lastSuccessfulHeartbeatAt ?? "none yet"}`
|
|
372
|
-
].filter((value) => value !== null).join(" \xB7 ")
|
|
373
|
-
);
|
|
374
365
|
const CLAUDE_JSON = claudeJson();
|
|
375
366
|
const claudeInPlay = claudeWired({
|
|
376
367
|
claudeJson: readJson(CLAUDE_JSON),
|
|
@@ -438,11 +429,12 @@ var main = async () => {
|
|
|
438
429
|
codexParsed = parseTOML(codexConfig);
|
|
439
430
|
} catch {
|
|
440
431
|
}
|
|
441
|
-
|
|
432
|
+
const codexInPlay = codexWired({
|
|
442
433
|
config: codexParsed,
|
|
443
434
|
hooks: codexHooksConfig,
|
|
444
435
|
skillExists: existsSync(join(codexSkillDir(), "SKILL.md"))
|
|
445
|
-
})
|
|
436
|
+
});
|
|
437
|
+
if (codexInPlay) {
|
|
446
438
|
checking("Codex");
|
|
447
439
|
const codexMcp = codexParsed.mcp_servers?.pushary;
|
|
448
440
|
const codexTransport = !!codexMcp && (typeof codexMcp.url === "string" || typeof codexMcp.command === "string");
|
|
@@ -517,7 +509,8 @@ var main = async () => {
|
|
|
517
509
|
}
|
|
518
510
|
const geminiSettingsPath = geminiSettings();
|
|
519
511
|
const geminiSettings2 = readJson(geminiSettingsPath);
|
|
520
|
-
|
|
512
|
+
const geminiInPlay = geminiSettings2 !== null && geminiWired({ settings: geminiSettings2 });
|
|
513
|
+
if (geminiInPlay) {
|
|
521
514
|
checking("Gemini CLI");
|
|
522
515
|
const geminiServers = geminiSettings2.mcpServers ?? {};
|
|
523
516
|
const geminiPushary = geminiServers.pushary;
|
|
@@ -560,6 +553,40 @@ var main = async () => {
|
|
|
560
553
|
} else {
|
|
561
554
|
skipped("Gemini CLI", installed("gemini_cli") ? "installed, but Pushary is not set up for it" : "not installed");
|
|
562
555
|
}
|
|
556
|
+
const configuredManagedProviders = [
|
|
557
|
+
...claudeInPlay ? ["claude"] : [],
|
|
558
|
+
...codexInPlay ? ["codex"] : [],
|
|
559
|
+
...geminiInPlay ? ["gemini"] : []
|
|
560
|
+
];
|
|
561
|
+
const controlSupported = hasSpawnProvider(detectProviderLiveCapabilities(configuredManagedProviders));
|
|
562
|
+
const controlMode = readControlMode();
|
|
563
|
+
const daemon = readDaemonStatus();
|
|
564
|
+
const serviceDefined = hasDaemonServiceDefinition();
|
|
565
|
+
const managerAvailable = daemonServiceManagerAvailable();
|
|
566
|
+
const controlPolicy = resolveControlPolicy({
|
|
567
|
+
mode: controlMode,
|
|
568
|
+
providerAvailable: controlSupported,
|
|
569
|
+
managerAvailable,
|
|
570
|
+
servicePresent: serviceDefined || daemon.kind !== "absent"
|
|
571
|
+
});
|
|
572
|
+
const controlRequired = controlPolicy === "enabled";
|
|
573
|
+
const controlUnsupported = controlMode === "on" && controlPolicy !== "enabled";
|
|
574
|
+
const daemonOk = controlUnsupported ? false : controlPolicy === "disabled" ? daemon.kind === "absent" && !serviceDefined : controlPolicy === "enabled" ? daemon.kind === "running" : controlPolicy === "legacy" ? false : daemon.kind === "absent" && !serviceDefined;
|
|
575
|
+
const daemonFailure = daemonOk ? null : controlUnsupported ? "control is required but no usable provider/service-manager pair is available" : controlPolicy === "disabled" ? `control is disabled but ${serviceDefined ? "the service definition remains" : `local state is ${daemon.kind}`}` : controlPolicy === "legacy" ? "a legacy service exists without a usable provider/service-manager pair" : `local state is ${daemon.kind}`;
|
|
576
|
+
const daemonDetail = daemonFailure ? controlUnsupported ? `${daemonFailure}; re-run setup with \`--control off\`, or restore both requirements` : controlPolicy === "disabled" ? `${daemonFailure}; re-run setup with \`--control off\`` : controlPolicy === "legacy" ? `${daemonFailure}; run setup with \`--control off\`, or restore both requirements` : `${daemonFailure}; run \`pushary daemon install\` to install or repair the background service` : controlPolicy === "disabled" ? "disabled by setup" : controlPolicy === "preserve-absent" ? "legacy absence preserved" : !controlRequired && daemon.kind === "absent" ? "managed control is unsupported on this provider or operating-system session" : null;
|
|
577
|
+
check(
|
|
578
|
+
daemonOk,
|
|
579
|
+
"Remote-control daemon",
|
|
580
|
+
[
|
|
581
|
+
daemonDetail,
|
|
582
|
+
daemon.kind,
|
|
583
|
+
`pid ${daemon.pid ?? "none"}`,
|
|
584
|
+
`daemon ${daemon.daemonVersion ?? "none"}`,
|
|
585
|
+
`installed ${daemon.installedVersion}`,
|
|
586
|
+
`machine ${daemon.machineId ?? "none"}`,
|
|
587
|
+
`heartbeat ${daemon.lastSuccessfulHeartbeatAt ?? "none yet"}`
|
|
588
|
+
].filter((value) => value !== null).join(" \xB7 ")
|
|
589
|
+
);
|
|
563
590
|
const cursorPluginDir2 = cursorPluginDir();
|
|
564
591
|
if (existsSync(cursorPluginDir2)) {
|
|
565
592
|
checking("Cursor");
|
package/dist/bin/pushary-hook.js
CHANGED
|
@@ -15,8 +15,8 @@ import "../chunk-2HYPZLYY.js";
|
|
|
15
15
|
import "../chunk-V37ZXMH3.js";
|
|
16
16
|
import {
|
|
17
17
|
exitOnHelpFlag
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-LURY4WNF.js";
|
|
19
|
+
import "../chunk-3XTFX4CL.js";
|
|
20
20
|
import "../chunk-DINDL2CF.js";
|
|
21
21
|
import "../chunk-BSZYIAZL.js";
|
|
22
22
|
import "../chunk-SAF6HGAA.js";
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
readKeySource,
|
|
15
15
|
writeKey
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-L3YUHEB6.js";
|
|
17
17
|
import {
|
|
18
18
|
parseFlags
|
|
19
19
|
} from "../chunk-GMXKITVA.js";
|
|
20
20
|
import {
|
|
21
21
|
exitOnHelpFlag
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
} from "../chunk-LURY4WNF.js";
|
|
23
|
+
import "../chunk-3XTFX4CL.js";
|
|
24
24
|
import "../chunk-BC3VCZ3E.js";
|
|
25
25
|
import {
|
|
26
26
|
getPackageVersion
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
clearKey,
|
|
13
13
|
readKeySource
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-L3YUHEB6.js";
|
|
15
15
|
import {
|
|
16
16
|
parseFlags
|
|
17
17
|
} from "../chunk-GMXKITVA.js";
|
|
18
18
|
import {
|
|
19
19
|
exitOnHelpFlag
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-LURY4WNF.js";
|
|
21
|
+
import "../chunk-3XTFX4CL.js";
|
|
22
22
|
import "../chunk-BC3VCZ3E.js";
|
|
23
23
|
import "../chunk-DINDL2CF.js";
|
|
24
24
|
import "../chunk-OFRNZWC4.js";
|
package/dist/bin/pushary-mode.js
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from "../chunk-GMXKITVA.js";
|
|
12
12
|
import {
|
|
13
13
|
exitOnHelpFlag
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-LURY4WNF.js";
|
|
15
|
+
import "../chunk-3XTFX4CL.js";
|
|
16
16
|
import "../chunk-DINDL2CF.js";
|
|
17
17
|
import "../chunk-SAF6HGAA.js";
|
|
18
18
|
import {
|