@conveno/cli 0.2.0-rc.9 → 0.2.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/README.md +3 -5
- package/dist/{acp-BVk6rmXR.js → acp-BUddItzP.js} +39 -7
- package/dist/{agy-relay-D8eZcLuc.js → agy-relay-BZ3d_-FS.js} +4 -2
- package/dist/{args-B3Cj2Ie4.js → args-CtyKPZuN.js} +29 -8
- package/dist/bin.js +16 -2
- package/dist/daemon.js +4 -3139
- package/dist/{daemonError-C05GqdhQ.js → daemonError-CDgEtvy7.js} +1 -1
- package/dist/dist-BNhTPp5p.js +4509 -0
- package/dist/{dist-BRjg9CLd.js → dist-BOwFdixw.js} +23 -50
- package/dist/{dist-DaIpdMke.js → dist-CFsDqevs.js} +51 -9
- package/dist/dist-CNdqmI3E.js +1065 -0
- package/dist/{dist-STNJjbNH.js → dist-CSSvrcKr.js} +1516 -599
- package/dist/{dist-BjdBeCHy.js → dist-D6Xoip5W.js} +63 -17
- package/dist/{dist-D_O_JLLq.js → dist-DAVtixeC.js} +19 -5
- package/dist/{dist-MK-cK1JY.js → dist-DTMnNySx.js} +39 -19
- package/dist/{hook-CDF1A8AY.js → hook-BA-tI6Oc.js} +101 -7
- package/dist/hook-entry-BwzBtAnd.js +1346 -0
- package/dist/hook-entry-Cgt5ZH1s.js +1 -0
- package/dist/{main-Kv31Qxro.js → main-kKnLA7Hj.js} +58 -21
- package/dist/{pick-DLp6w_-z.js → pick-BsMvXuDo.js} +1 -1
- package/dist/run-PQBzaHv1.js +8193 -0
- package/dist/{runtime-xjPzIGmp.js → runtime-0FMqklYn.js} +171 -119
- package/dist/{uninstall-8AHErPRN.js → uninstall-DcxkIDpk.js} +356 -56
- package/dist/{watch-D0KIPowJ.js → watch-BIepRTXJ.js} +29 -7
- package/package.json +14 -15
- package/dist/dist-CVdpCNJo.js +0 -793
- package/dist/dist-DzpERiRx.js +0 -624
- package/dist/hook-entry-BTJK7aO0.js +0 -2500
- package/dist/hook-entry-D6zup0QV.js +0 -1
- package/dist/run-BPtFUGtu.js +0 -5609
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { i as runHookEntry } from "./hook-entry-BwzBtAnd.js";
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as parseFlags, i as commandHelp, n as COMMANDS, r as COMMAND_NAMES, t as ALL_COMMAND_NAMES } from "./args-
|
|
4
|
-
import { t as daemonProblem } from "./daemonError-
|
|
1
|
+
import { K as dataPaths, Lt as parseWorkerAccess, P as cleanModelName, bn as spawnSession, f as SPAWN_CLIS, h as WORKER_ACCESS, m as SpawnError, p as SPAWN_TABLE, pn as runLaunchFile, rn as realSpawnDeps, zn as CLI_KINDS } from "./dist-CSSvrcKr.js";
|
|
2
|
+
import { A as runRelay, I as runAccount, L as runLogin, M as runDaemon, P as VERSION, R as runLogout, b as workerAccessLine, i as runDoctor, k as runDevices, m as runSetup, p as runInit, t as runUninstall } from "./uninstall-DcxkIDpk.js";
|
|
3
|
+
import { a as parseFlags, i as commandHelp, n as COMMANDS, r as COMMAND_NAMES, t as ALL_COMMAND_NAMES } from "./args-CtyKPZuN.js";
|
|
4
|
+
import { t as daemonProblem } from "./daemonError-CDgEtvy7.js";
|
|
5
5
|
import { chmod, mkdir, writeFile } from "node:fs/promises";
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
import { a as fail, c as plural, d as warnBlock, n as cmd, r as columns, s as plainError, t as closest, u as tilde } from "./fmt-C2SsP5Y0.js";
|
|
8
|
-
import { t as runHook } from "./hook-
|
|
8
|
+
import { t as runHook } from "./hook-BA-tI6Oc.js";
|
|
9
9
|
import { n as connectOpts, t as adapterEnv } from "./ctx-tYftvhz_.js";
|
|
10
|
-
import { t as findSession } from "./pick-
|
|
10
|
+
import { t as findSession } from "./pick-BsMvXuDo.js";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
12
|
-
// src/version.ts
|
|
13
|
-
const VERSION = "0.2.0-rc.9";
|
|
14
12
|
// src/errorLog.ts
|
|
15
13
|
/** The message of an unexpected error, as it is. Not the softened text `plainError` gives. */
|
|
16
14
|
function rawMessage(e) {
|
|
@@ -98,7 +96,10 @@ async function runLead(ctx, argv) {
|
|
|
98
96
|
exit: 1,
|
|
99
97
|
ref: "e_session"
|
|
100
98
|
});
|
|
101
|
-
await client["orchestrator.claim"]({
|
|
99
|
+
await client["orchestrator.claim"]({
|
|
100
|
+
sessionId: found.id,
|
|
101
|
+
via: "cli"
|
|
102
|
+
});
|
|
102
103
|
ctx.out(`${t.status("ok")} ${t.bold(found.name)} is the lead now.\n`);
|
|
103
104
|
return 0;
|
|
104
105
|
} catch (e) {
|
|
@@ -248,6 +249,13 @@ async function runSpawn(ctx, argv) {
|
|
|
248
249
|
const t = ctx.theme;
|
|
249
250
|
const spec = COMMANDS.find((c) => c.name === "spawn");
|
|
250
251
|
if (!spec) return 2;
|
|
252
|
+
if (argv.slice(0, argv.indexOf("--") === -1 ? void 0 : argv.indexOf("--")).some((a) => a === "--allow" || a.startsWith("--allow="))) return fail(ctx, {
|
|
253
|
+
what: "--allow was removed",
|
|
254
|
+
detail: ["Use --access read, edit or full."],
|
|
255
|
+
fix: `Run ${cmd(ctx.theme, "conveno spawn --help")} to see the options.`,
|
|
256
|
+
exit: 2,
|
|
257
|
+
ref: "e_usage"
|
|
258
|
+
});
|
|
251
259
|
const parsed = parseFlags(ctx, spec, argv);
|
|
252
260
|
if (typeof parsed === "number") return parsed;
|
|
253
261
|
const help = `Run ${cmd(t, "conveno spawn --help")} to see the options.`;
|
|
@@ -280,9 +288,33 @@ async function runSpawn(ctx, argv) {
|
|
|
280
288
|
if (typeof text === "number") return text;
|
|
281
289
|
task = text;
|
|
282
290
|
}
|
|
291
|
+
const accessFlag = str("access");
|
|
292
|
+
const access = accessFlag === void 0 ? void 0 : parseWorkerAccess(accessFlag);
|
|
293
|
+
if (accessFlag !== void 0 && access === void 0) return fail(ctx, {
|
|
294
|
+
what: `"${accessFlag}" is not an access preset`,
|
|
295
|
+
detail: [`Use one of: ${WORKER_ACCESS.join(", ")}.`],
|
|
296
|
+
fix: help,
|
|
297
|
+
exit: 2,
|
|
298
|
+
ref: "e_usage"
|
|
299
|
+
});
|
|
300
|
+
const model = cleanModelName(str("model"));
|
|
301
|
+
const effort = cleanModelName(str("effort"));
|
|
302
|
+
for (const [flag, given, clean] of [[
|
|
303
|
+
"model",
|
|
304
|
+
str("model"),
|
|
305
|
+
model
|
|
306
|
+
], [
|
|
307
|
+
"effort",
|
|
308
|
+
str("effort"),
|
|
309
|
+
effort
|
|
310
|
+
]]) if (given !== void 0 && clean === void 0) return fail(ctx, {
|
|
311
|
+
what: `--${flag} is empty, too long or has a line break`,
|
|
312
|
+
detail: ["Give the CLI's own name, up to 200 characters."],
|
|
313
|
+
fix: help,
|
|
314
|
+
exit: 2,
|
|
315
|
+
ref: "e_usage"
|
|
316
|
+
});
|
|
283
317
|
const window = parsed.values.window === true;
|
|
284
|
-
const allowFlag = str("allow");
|
|
285
|
-
const allow = allowFlag === void 0 ? void 0 : [allowFlag];
|
|
286
318
|
const yes = parsed.values.yes === true;
|
|
287
319
|
const adapter = ctx.adapters.find((a) => a.cli === cli);
|
|
288
320
|
if (adapter && !(await adapter.detect(adapterEnv(ctx))).installed) return fail(ctx, {
|
|
@@ -320,8 +352,6 @@ async function runSpawn(ctx, argv) {
|
|
|
320
352
|
});
|
|
321
353
|
}
|
|
322
354
|
try {
|
|
323
|
-
const { hostPid } = await ctx.ancestry(2e3);
|
|
324
|
-
const requester = hostPid === void 0 ? void 0 : (await client["session.byHost"]({ pid: hostPid }).catch(() => void 0))?.session ?? void 0;
|
|
325
355
|
const runner = ctx.spawnRunner ?? [process.execPath, process.argv[1] ?? "conveno"];
|
|
326
356
|
const deps = realSpawnDeps({
|
|
327
357
|
platform: ctx.platform,
|
|
@@ -338,8 +368,9 @@ async function runSpawn(ctx, argv) {
|
|
|
338
368
|
name: str("name"),
|
|
339
369
|
task,
|
|
340
370
|
window,
|
|
341
|
-
|
|
342
|
-
|
|
371
|
+
access,
|
|
372
|
+
model,
|
|
373
|
+
effort,
|
|
343
374
|
confineToHome: false,
|
|
344
375
|
onProgress: (line) => ctx.err(`${t.paint("quiet", line)}\n`)
|
|
345
376
|
});
|
|
@@ -431,7 +462,7 @@ function renderSessions(ctx, sessions) {
|
|
|
431
462
|
const tags = [...s.isOrchestrator ? [t.paint("entry", "lead")] : [], ...s.spawned || s.spawnedBy ? [q("spawned")] : []];
|
|
432
463
|
return [
|
|
433
464
|
`${st.glyph} ${t.bold(s.name)}${tags.length > 0 ? ` ${tags.join(" ")}` : ""}`,
|
|
434
|
-
toolName(s.cli),
|
|
465
|
+
(s.variant === "app" ? "Antigravity app" : toolName(s.cli)) + (s.model ? q(` · ${s.model.length > 30 ? `${s.model.slice(0, 29)}…` : s.model}`) : ""),
|
|
435
466
|
st.word,
|
|
436
467
|
...waiting ? [s.unreadCount ? String(s.unreadCount) : q("none")] : [],
|
|
437
468
|
...doing ? [s.statusText ?? ""] : []
|
|
@@ -459,6 +490,7 @@ function relaySummary(r) {
|
|
|
459
490
|
case "connecting": return "connecting";
|
|
460
491
|
case "disconnected": return "not connected, trying again";
|
|
461
492
|
case "revoked": return "off, this device was removed";
|
|
493
|
+
case "upgrade_required": return "off, Conveno needs an update";
|
|
462
494
|
case "unpaired": return "off, no paired devices";
|
|
463
495
|
default: return "off";
|
|
464
496
|
}
|
|
@@ -483,11 +515,16 @@ async function runStatus(ctx, argv = []) {
|
|
|
483
515
|
const projects = new Set(sessions.map((s) => s.repo?.root ?? s.cwd)).size;
|
|
484
516
|
const relay = await (async () => client["relay.status"]({}))().catch(() => void 0);
|
|
485
517
|
ctx.out(`${t.status("ok")} Conveno is running. ${plural(sessions.length, "session")} online.\n`);
|
|
518
|
+
ctx.out(` ${t.paint("quiet", workerAccessLine(ctx))}\n`);
|
|
486
519
|
if (relay && [
|
|
487
520
|
"connected",
|
|
488
521
|
"connecting",
|
|
489
522
|
"disconnected"
|
|
490
523
|
].includes(relay.state)) ctx.out(` Your other devices: ${relaySummary(relay)}\n`);
|
|
524
|
+
else if (relay?.state === "upgrade_required") {
|
|
525
|
+
ctx.out(` Your other devices: ${relaySummary(relay)}\n`);
|
|
526
|
+
if (relay.detail) ctx.out(` ${relay.detail}\n`);
|
|
527
|
+
}
|
|
491
528
|
if (sessions.length === 0) {
|
|
492
529
|
ctx.out(`\nNo sessions yet. Open an AI tool you have connected with ${cmd(t, "conveno setup")} and it appears here.\n`);
|
|
493
530
|
return 0;
|
|
@@ -572,11 +609,11 @@ async function dispatch(name, rest, ctx) {
|
|
|
572
609
|
case "rename": return runRename(ctx, rest);
|
|
573
610
|
case "lead": return runLead(ctx, rest);
|
|
574
611
|
case "spawn": return runSpawn(ctx, rest);
|
|
575
|
-
case "acp-host": return (await import("./acp-
|
|
576
|
-
case "stop": return (await import("./acp-
|
|
612
|
+
case "acp-host": return (await import("./acp-BUddItzP.js")).runAcpHostCmd(ctx, rest);
|
|
613
|
+
case "stop": return (await import("./acp-BUddItzP.js")).runStop(ctx, rest);
|
|
577
614
|
case "spawn-run": return runSpawnRun(ctx, rest);
|
|
578
|
-
case "agy-relay": return (await import("./agy-relay-
|
|
579
|
-
case "watch": return (await import("./watch-
|
|
615
|
+
case "agy-relay": return (await import("./agy-relay-BZ3d_-FS.js")).runAgyRelay(ctx, rest);
|
|
616
|
+
case "watch": return (await import("./watch-BIepRTXJ.js")).runWatch(ctx, rest);
|
|
580
617
|
case "devices": return runDevices(ctx, rest);
|
|
581
618
|
case "relay": return runRelay(ctx, rest);
|
|
582
619
|
case "doctor": return runDoctor(ctx, rest);
|
|
@@ -615,7 +652,7 @@ function opensApp(env, tty = {
|
|
|
615
652
|
async function main(argv, ctx) {
|
|
616
653
|
const [command, ...rest] = argv;
|
|
617
654
|
if (command === void 0 && opensApp(ctx.env)) try {
|
|
618
|
-
return await (await import("./run-
|
|
655
|
+
return await (await import("./run-PQBzaHv1.js")).runTui(ctx);
|
|
619
656
|
} catch (e) {
|
|
620
657
|
ctx.err(`The app could not start (${rawMessage(e)}). Showing the help instead.\n`);
|
|
621
658
|
ctx.out(helpText(ctx));
|