@conveno/cli 0.2.0-rc.16 → 0.2.0-rc.17
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/{acp-BtwJHwcr.js → acp-C-o3rtAB.js} +3 -3
- package/dist/{agy-relay-KS1DbLqD.js → agy-relay-D17zTd_Z.js} +2 -2
- package/dist/bin.js +2 -2
- package/dist/daemon.js +71 -65
- package/dist/{daemonError-DUP5zkiR.js → daemonError-BwdtKOCy.js} +1 -1
- package/dist/{dist-fwpPA9AY.js → dist-B1pfP_d5.js} +1 -1
- package/dist/{dist-CkqMgCGl.js → dist-BOwFdixw.js} +8 -46
- package/dist/{dist-BqfYxlVP.js → dist-Bb2opAjB.js} +3 -3
- package/dist/{dist-Ch3ohbIk.js → dist-BgAfkqeX.js} +1 -1
- package/dist/{dist-XoKXwG-y.js → dist-CTw3arJP.js} +5 -5
- package/dist/{dist-X1bpJWck.js → dist-CvKAege3.js} +1 -1
- package/dist/{dist-DnWOZkAu.js → dist-Dc50_P_f.js} +323 -147
- package/dist/{dist-DVLAWfDg.js → dist-hyKfBSdF.js} +10 -5
- package/dist/{hook-DHMu72Vf.js → hook-BLSrNkFF.js} +2 -2
- package/dist/hook-entry-B1Yt2cwr.js +1 -0
- package/dist/{hook-entry-CLAuy_HJ.js → hook-entry-DYXjVztc.js} +8 -8
- package/dist/{main-DVIyOy85.js → main-CQx2xc_w.js} +15 -10
- package/dist/{pick-UDFASnAn.js → pick-iuG24FX9.js} +1 -1
- package/dist/{run-B-UMVEQs.js → run-B01nDeos.js} +73 -31
- package/dist/{runtime-CU-5JQvj.js → runtime-hZwjrEPc.js} +11 -13
- package/dist/{uninstall-jwneyeJm.js → uninstall-B-deU_wY.js} +32 -18
- package/dist/{watch-Cpp4Uwsd.js → watch-CPZ2X-yt.js} +4 -4
- package/package.json +13 -13
- package/dist/hook-entry-DY-CMxKE.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
|
-
import { n as antigravityAdapter } from "./dist-
|
|
2
|
+
import { n as antigravityAdapter } from "./dist-CTw3arJP.js";
|
|
3
3
|
import { isAbsolute, join } from "node:path";
|
|
4
|
-
import { At as parseCliVersion, Ft as pendingHookContext, H as
|
|
4
|
+
import { At as parseCliVersion, Dn as waitForWork, Ft as pendingHookContext, H as dataPaths, It as pendingTurn, Kt as readAncestry, On as waitForWorkBatch, V as dataDir, Y as endTurnContinuation, Zt as readSettings, _n as startTurnContext, ct as hostAlive, in as requeueMessages, kt as ownSession, n as CLAUDE_PENDING_TURN_FOLDER, st as hookLogPath } from "./dist-Dc50_P_f.js";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
6
6
|
import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
7
|
-
import { t as codexAdapter } from "./dist-
|
|
8
|
-
import { t as grokAdapter } from "./dist-
|
|
9
|
-
import { n as connect } from "./dist-
|
|
10
|
-
import { t as runHook } from "./hook-
|
|
7
|
+
import { t as codexAdapter } from "./dist-CvKAege3.js";
|
|
8
|
+
import { t as grokAdapter } from "./dist-Bb2opAjB.js";
|
|
9
|
+
import { n as connect } from "./dist-BgAfkqeX.js";
|
|
10
|
+
import { t as runHook } from "./hook-BLSrNkFF.js";
|
|
11
11
|
// ../adapters/claude/dist/index.js
|
|
12
12
|
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
13
13
|
/** Read a JSON object file. Missing or blank files give `{}`; anything else that is not a JSON object throws. */
|
|
@@ -176,7 +176,7 @@ function hookProgram(env, event) {
|
|
|
176
176
|
/** One hook handler as written to settings.json. The listener runs in the background (`asyncRewake`). */
|
|
177
177
|
function handlerFor(env, arg) {
|
|
178
178
|
const { command, args } = hookProgram(env, arg);
|
|
179
|
-
return arg ===
|
|
179
|
+
return arg === LISTEN_EVENT ? {
|
|
180
180
|
type: "command",
|
|
181
181
|
command,
|
|
182
182
|
args,
|
|
@@ -229,7 +229,7 @@ function hasExactHook(hooks, event, handler) {
|
|
|
229
229
|
/** Every handler Conveno wants on `event` is there, exactly. */
|
|
230
230
|
const eventComplete = (env, hooks, event) => HANDLERS[event].every((arg) => hasExactHook(hooks, event, handlerFor(env, arg)));
|
|
231
231
|
/** The name `conveno doctor --verbose` shows for one event. Start and Stop also arm the listener. */
|
|
232
|
-
const hookPartName = (e) => HANDLERS[e].includes(
|
|
232
|
+
const hookPartName = (e) => HANDLERS[e].includes(LISTEN_EVENT) ? `${e} hook and listener` : `${e} hook`;
|
|
233
233
|
const hasOurHandler = (g) => isObject(g) && Array.isArray(g.hooks) && g.hooks.some(isOurHook);
|
|
234
234
|
/** Drop our hook handlers (and groups left empty by that). */
|
|
235
235
|
function stripOurHooks(groups) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $t as realSpawnDeps,
|
|
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-
|
|
1
|
+
import { $t as realSpawnDeps, Fn as CLI_KINDS, H as dataPaths, M as cleanModelName, Nt as parseWorkerAccess, d as SPAWN_TABLE, f as SpawnError, gn as spawnSession, ln as runLaunchFile, p as WORKER_ACCESS, u as SPAWN_CLIS } from "./dist-Dc50_P_f.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-B-deU_wY.js";
|
|
3
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-
|
|
4
|
+
import { t as daemonProblem } from "./daemonError-BwdtKOCy.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-BLSrNkFF.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-iuG24FX9.js";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
12
12
|
// src/errorLog.ts
|
|
13
13
|
/** The message of an unexpected error, as it is. Not the softened text `plainError` gives. */
|
|
@@ -490,6 +490,7 @@ function relaySummary(r) {
|
|
|
490
490
|
case "connecting": return "connecting";
|
|
491
491
|
case "disconnected": return "not connected, trying again";
|
|
492
492
|
case "revoked": return "off, this device was removed";
|
|
493
|
+
case "upgrade_required": return "off, Conveno needs an update";
|
|
493
494
|
case "unpaired": return "off, no paired devices";
|
|
494
495
|
default: return "off";
|
|
495
496
|
}
|
|
@@ -520,6 +521,10 @@ async function runStatus(ctx, argv = []) {
|
|
|
520
521
|
"connecting",
|
|
521
522
|
"disconnected"
|
|
522
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
|
+
}
|
|
523
528
|
if (sessions.length === 0) {
|
|
524
529
|
ctx.out(`\nNo sessions yet. Open an AI tool you have connected with ${cmd(t, "conveno setup")} and it appears here.\n`);
|
|
525
530
|
return 0;
|
|
@@ -604,11 +609,11 @@ async function dispatch(name, rest, ctx) {
|
|
|
604
609
|
case "rename": return runRename(ctx, rest);
|
|
605
610
|
case "lead": return runLead(ctx, rest);
|
|
606
611
|
case "spawn": return runSpawn(ctx, rest);
|
|
607
|
-
case "acp-host": return (await import("./acp-
|
|
608
|
-
case "stop": return (await import("./acp-
|
|
612
|
+
case "acp-host": return (await import("./acp-C-o3rtAB.js")).runAcpHostCmd(ctx, rest);
|
|
613
|
+
case "stop": return (await import("./acp-C-o3rtAB.js")).runStop(ctx, rest);
|
|
609
614
|
case "spawn-run": return runSpawnRun(ctx, rest);
|
|
610
|
-
case "agy-relay": return (await import("./agy-relay-
|
|
611
|
-
case "watch": return (await import("./watch-
|
|
615
|
+
case "agy-relay": return (await import("./agy-relay-D17zTd_Z.js")).runAgyRelay(ctx, rest);
|
|
616
|
+
case "watch": return (await import("./watch-CPZ2X-yt.js")).runWatch(ctx, rest);
|
|
612
617
|
case "devices": return runDevices(ctx, rest);
|
|
613
618
|
case "relay": return runRelay(ctx, rest);
|
|
614
619
|
case "doctor": return runDoctor(ctx, rest);
|
|
@@ -647,7 +652,7 @@ function opensApp(env, tty = {
|
|
|
647
652
|
async function main(argv, ctx) {
|
|
648
653
|
const [command, ...rest] = argv;
|
|
649
654
|
if (command === void 0 && opensApp(ctx.env)) try {
|
|
650
|
-
return await (await import("./run-
|
|
655
|
+
return await (await import("./run-B01nDeos.js")).runTui(ctx);
|
|
651
656
|
} catch (e) {
|
|
652
657
|
ctx.err(`The app could not start (${rawMessage(e)}). Showing the help instead.\n`);
|
|
653
658
|
ctx.out(helpText(ctx));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Box, Text, render, useApp, useInput, useStdin, useStdout } from "ink";
|
|
2
2
|
import { n as connectOpts, t as adapterEnv } from "./ctx-tYftvhz_.js";
|
|
3
|
-
import { C as saveChoice, D as warmAcpAdapters, E as unifiedDiff, F as openInBrowser, N as stopDaemonIfRunning, O as PAIR_TIMEOUT_MS, S as connectedTools, T as applyChanges, _ as readWorkerAccess, a as applyOptions, c as collectPlans, d as refreshManifest, f as renewedApprovals, g as UNANSWERED_TEXT, h as ACCESS_TEXT, j as replaceStaleDaemon, l as detectAll, n as inspect, o as approvalWrites, r as partState, s as approvedBySetup, t as runUninstall, u as pendingOptions, v as saveWorkerAccess, w as StaleError, x as chosenTools, y as waitText, z as showCode$1 } from "./uninstall-
|
|
4
|
-
import { t as daemonProblem } from "./daemonError-
|
|
3
|
+
import { C as saveChoice, D as warmAcpAdapters, E as unifiedDiff, F as openInBrowser, N as stopDaemonIfRunning, O as PAIR_TIMEOUT_MS, S as connectedTools, T as applyChanges, _ as readWorkerAccess, a as applyOptions, c as collectPlans, d as refreshManifest, f as renewedApprovals, g as UNANSWERED_TEXT, h as ACCESS_TEXT, j as replaceStaleDaemon, l as detectAll, n as inspect, o as approvalWrites, r as partState, s as approvedBySetup, t as runUninstall, u as pendingOptions, v as saveWorkerAccess, w as StaleError, x as chosenTools, y as waitText, z as showCode$1 } from "./uninstall-B-deU_wY.js";
|
|
4
|
+
import { t as daemonProblem } from "./daemonError-BwdtKOCy.js";
|
|
5
5
|
import { a as fail, n as cmd, s as plainError, u as tilde } from "./fmt-C2SsP5Y0.js";
|
|
6
6
|
import { createContext, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
7
|
-
import { $ as
|
|
8
|
-
import { i as tokens, n as detectColorLevel, r as detectUnicode } from "./dist-
|
|
7
|
+
import { $t as realSpawnDeps, Gt as readAccountTokens, H as dataPaths, Ht as pollDeviceCode, I as compatStatus, L as completeLogin, Mn as writeModelMenu, Pn as writeSettings, Q as fetchAccountStatus, St as logoutAccount, Tt as modelLabel, Vt as planSpawn, W as defaultProcessIo, Xn as SESSION_NAME_PATTERN, Xt as readProcessList, Yt as readModelMenus, Zt as readSettings, d as SPAWN_TABLE, et as findOnPath, fr as sanitizeLine, gn as spawnSession, h as WORKER_UNANSWERED, m as WORKER_ASK_TIMEOUT_CHOICES, nn as requestDeviceCode, p as WORKER_ACCESS, pn as signedInAccountApi, t as AccountError, xt as loginAccountApi } from "./dist-Dc50_P_f.js";
|
|
8
|
+
import { i as tokens, n as detectColorLevel, r as detectUnicode } from "./dist-BOwFdixw.js";
|
|
9
9
|
import stringWidth from "string-width";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { readFileSync, statSync } from "node:fs";
|
|
@@ -13,7 +13,7 @@ import { Readable } from "node:stream";
|
|
|
13
13
|
import { basename, posix, win32 } from "node:path";
|
|
14
14
|
import { spawn } from "node:child_process";
|
|
15
15
|
import { homedir } from "node:os";
|
|
16
|
-
import { n as probeModelMenu } from "./dist-
|
|
16
|
+
import { n as probeModelMenu } from "./dist-hyKfBSdF.js";
|
|
17
17
|
// src/tui/home/deps.ts
|
|
18
18
|
/**
|
|
19
19
|
* What home does outside the store: sign in and out, and take Conveno away. Real in the app, fake
|
|
@@ -24,7 +24,7 @@ const showCode = (code) => /^[A-Za-z0-9]{8}$/.test(code) ? `${code.slice(0, 4)}-
|
|
|
24
24
|
const strip = (text) => text.replace(/\u001b\[[0-9;]*m/g, "");
|
|
25
25
|
function createHomeDeps(ctx) {
|
|
26
26
|
const io = () => ({
|
|
27
|
-
apiBase: ctx.env
|
|
27
|
+
apiBase: loginAccountApi(ctx.env),
|
|
28
28
|
now: () => ctx.now().getTime()
|
|
29
29
|
});
|
|
30
30
|
const tokenFile = () => dataPaths(ctx.platform, ctx.dataDir).account;
|
|
@@ -742,6 +742,21 @@ function KeyBar({ keys, width }) {
|
|
|
742
742
|
}, h.k + h.label))
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
|
+
// src/tui/kit/overlay.tsx
|
|
746
|
+
/**
|
|
747
|
+
* Drawing over the screen, and the size of the detail panel.
|
|
748
|
+
*
|
|
749
|
+
* `Overlay` puts its children at a position over whatever is drawn under it (Ink 8 has
|
|
750
|
+
* `position="absolute"`) and blanks the cells it covers first, so nothing shows through.
|
|
751
|
+
*
|
|
752
|
+
* The detail panel is docked on the right at `xwide` (the screen gives it a column); below that
|
|
753
|
+
* it opens as a dialog.
|
|
754
|
+
*/
|
|
755
|
+
/**
|
|
756
|
+
* A background colour Ink does not know. Ink fills the box with plain spaces for it and emits no
|
|
757
|
+
* colour code, which blanks the area even with colour off.
|
|
758
|
+
*/
|
|
759
|
+
const BLANK = "blank";
|
|
745
760
|
function Overlay({ top, left, width, height, maxHeight, background, children }) {
|
|
746
761
|
return /* @__PURE__ */ jsx(Box, {
|
|
747
762
|
position: "absolute",
|
|
@@ -750,7 +765,7 @@ function Overlay({ top, left, width, height, maxHeight, background, children })
|
|
|
750
765
|
width,
|
|
751
766
|
flexDirection: "column",
|
|
752
767
|
overflow: "hidden",
|
|
753
|
-
...background === "none" ? {} : { backgroundColor: background ??
|
|
768
|
+
...background === "none" ? {} : { backgroundColor: background ?? BLANK },
|
|
754
769
|
...height !== void 0 ? { height } : {},
|
|
755
770
|
...maxHeight !== void 0 ? { maxHeight } : {},
|
|
756
771
|
children
|
|
@@ -929,6 +944,8 @@ function TitledBox({ width, height, grow, title, label, focused, boxed = true, c
|
|
|
929
944
|
*/
|
|
930
945
|
const TOO_NARROW = "Make the window a bit wider";
|
|
931
946
|
const TOO_SHORT = "Make the window a bit taller";
|
|
947
|
+
const DEFAULT_COLUMNS = 80;
|
|
948
|
+
const DEFAULT_ROWS = 24;
|
|
932
949
|
const known = (n) => typeof n === "number" && Number.isFinite(n) && n > 0;
|
|
933
950
|
/**
|
|
934
951
|
* Read the terminal's size. A window that is not sized yet reports 0 or nothing: that is "unknown",
|
|
@@ -936,7 +953,7 @@ const known = (n) => typeof n === "number" && Number.isFinite(n) && n > 0;
|
|
|
936
953
|
*/
|
|
937
954
|
function readSize(tty, prev) {
|
|
938
955
|
return {
|
|
939
|
-
columns: known(tty.columns) ? Math.floor(tty.columns) : prev?.columns ??
|
|
956
|
+
columns: known(tty.columns) ? Math.floor(tty.columns) : prev?.columns ?? DEFAULT_COLUMNS,
|
|
940
957
|
rows: known(tty.rows) ? Math.floor(tty.rows) : prev?.rows,
|
|
941
958
|
known: known(tty.columns) && known(tty.rows)
|
|
942
959
|
};
|
|
@@ -998,7 +1015,7 @@ function useViewport() {
|
|
|
998
1015
|
const { columns, rows } = useTerminalSize();
|
|
999
1016
|
return {
|
|
1000
1017
|
columns,
|
|
1001
|
-
rows: rows ??
|
|
1018
|
+
rows: rows ?? DEFAULT_ROWS,
|
|
1002
1019
|
breakpoint: breakpointOf(columns)
|
|
1003
1020
|
};
|
|
1004
1021
|
}
|
|
@@ -1678,10 +1695,18 @@ function HeaderBar({ width, middle, counts = [], keep = 2 }) {
|
|
|
1678
1695
|
]
|
|
1679
1696
|
});
|
|
1680
1697
|
}
|
|
1698
|
+
// src/tui/kit/ticker.tsx
|
|
1699
|
+
/**
|
|
1700
|
+
* One shared clock for every animation in the kit. A ticker is a tiny store (`get`, `subscribe`).
|
|
1701
|
+
* The real one fires every 80 ms and only runs while something listens. Tests pass a manual one
|
|
1702
|
+
* and call `step()`. With motion off, `useTick` returns `FINAL_TICK` so every animation shows its
|
|
1703
|
+
* last frame and nothing re-renders.
|
|
1704
|
+
*/
|
|
1705
|
+
const TICK_MS = 80;
|
|
1681
1706
|
/** What `useTick` returns when motion is off. Animations clamp to their own last frame. */
|
|
1682
1707
|
const FINAL_TICK = 1e9;
|
|
1683
1708
|
/** The real clock: one interval shared by everything, started by the first listener. */
|
|
1684
|
-
function createIntervalTicker(ms =
|
|
1709
|
+
function createIntervalTicker(ms = TICK_MS) {
|
|
1685
1710
|
let n = 0;
|
|
1686
1711
|
let timer;
|
|
1687
1712
|
const subs = /* @__PURE__ */ new Set();
|
|
@@ -2023,8 +2048,23 @@ function Steps({ rows, width }) {
|
|
|
2023
2048
|
})
|
|
2024
2049
|
});
|
|
2025
2050
|
}
|
|
2051
|
+
// src/tui/kit/table.tsx
|
|
2052
|
+
/**
|
|
2053
|
+
* A one-row-per-item table. Columns have a minimum and an ideal width and a priority: when the
|
|
2054
|
+
* width is short, the column with the highest `drop` number goes first, then the rest share what
|
|
2055
|
+
* is left (ideal widths first, `eager` columns before the rest, then `grow` columns take the
|
|
2056
|
+
* remainder). Cells are cut with `…` by
|
|
2057
|
+
* terminal cells, so wide characters line up. The selected row gets a `›` marker and the
|
|
2058
|
+
* highlight. Heading rows (`heading(row)` returns text) span the whole width, for groups like
|
|
2059
|
+
* `this computer`. A click selects a row, a click on the selected row or a double-click opens it,
|
|
2060
|
+
* and the wheel moves the selection.
|
|
2061
|
+
*/
|
|
2062
|
+
/** Cells between columns. */
|
|
2063
|
+
const COL_GAP = 2;
|
|
2064
|
+
/** Cells of the `› ` marker in front of every row. */
|
|
2065
|
+
const MARKER_W = 2;
|
|
2026
2066
|
/** Which columns show at `width`, and how wide each one is. The widths plus gaps fit exactly. */
|
|
2027
|
-
function placeColumns(columns, width, gap =
|
|
2067
|
+
function placeColumns(columns, width, gap = COL_GAP) {
|
|
2028
2068
|
let cols = [...columns];
|
|
2029
2069
|
const need = (cs) => cs.reduce((a, c) => a + c.min, 0) + gap * Math.max(0, cs.length - 1);
|
|
2030
2070
|
while (cols.length > 1 && need(cols) > width) {
|
|
@@ -2138,12 +2178,12 @@ function flattenTree(items, idOf, parentOf) {
|
|
|
2138
2178
|
}
|
|
2139
2179
|
function Table({ columns, rows, width, height, selected = -1, keyOf, heading, heads = true, marker = true, onSelect, onActivate, isActive }) {
|
|
2140
2180
|
const k = useKit();
|
|
2141
|
-
const mw = marker ?
|
|
2181
|
+
const mw = marker ? MARKER_W : 0;
|
|
2142
2182
|
const placed = placeColumns(columns, Math.max(1, width - mw));
|
|
2143
2183
|
const showHeads = heads && placed.some((p) => p.col.head);
|
|
2144
2184
|
const bodyH = Math.max(1, (height ?? rows.length + 1) - (showHeads ? 1 : 0));
|
|
2145
2185
|
const pointer = k.ascii ? ">" : "›";
|
|
2146
|
-
const line = (cells) => /* @__PURE__ */ jsx(Fragment, { children: cells.map((c, i) => /* @__PURE__ */ jsxs(Text, { children: [i > 0 ? " ".repeat(
|
|
2186
|
+
const line = (cells) => /* @__PURE__ */ jsx(Fragment, { children: cells.map((c, i) => /* @__PURE__ */ jsxs(Text, { children: [i > 0 ? " ".repeat(COL_GAP) : "", c] }, i)) });
|
|
2147
2187
|
const renderRow = (row, isSel) => {
|
|
2148
2188
|
const head = heading?.(row);
|
|
2149
2189
|
const bg = isSel && k.c.select ? { backgroundColor: k.c.select } : {};
|
|
@@ -2193,7 +2233,7 @@ function Table({ columns, rows, width, height, selected = -1, keyOf, heading, he
|
|
|
2193
2233
|
children: [" ".repeat(mw), placed.map(({ col, width: w }) => padCells((col.head ?? "").toUpperCase(), w, {
|
|
2194
2234
|
ascii: k.ascii,
|
|
2195
2235
|
align: col.align ?? "left"
|
|
2196
|
-
})).join(" ".repeat(
|
|
2236
|
+
})).join(" ".repeat(COL_GAP))]
|
|
2197
2237
|
}) : null, /* @__PURE__ */ jsx(ScrollList, {
|
|
2198
2238
|
items: [...rows],
|
|
2199
2239
|
selected,
|
|
@@ -2253,7 +2293,7 @@ function Toast({ text, tone, width, onDone }) {
|
|
|
2253
2293
|
});
|
|
2254
2294
|
}
|
|
2255
2295
|
// src/tui/names.ts
|
|
2256
|
-
const TOOL_NAMES
|
|
2296
|
+
const TOOL_NAMES = {
|
|
2257
2297
|
claude: "Claude Code",
|
|
2258
2298
|
codex: "Codex",
|
|
2259
2299
|
opencode: "OpenCode",
|
|
@@ -2261,7 +2301,7 @@ const TOOL_NAMES$1 = {
|
|
|
2261
2301
|
grok: "Grok Build"
|
|
2262
2302
|
};
|
|
2263
2303
|
/** "Claude Code" for `claude`. An unknown id shows as it is. */
|
|
2264
|
-
const toolName$1 = (cli) => TOOL_NAMES
|
|
2304
|
+
const toolName$1 = (cli) => TOOL_NAMES[cli] ?? cli;
|
|
2265
2305
|
/** The tool a session runs in: "Antigravity app" for the desktop app, else `toolName`. */
|
|
2266
2306
|
const sessionTool = (s) => s.variant === "app" && s.cli === "antigravity" ? "Antigravity app" : toolName$1(s.cli);
|
|
2267
2307
|
/** The session's own name without the computer it runs on (`laptop:api-fix` is `api-fix`). */
|
|
@@ -3238,6 +3278,11 @@ function ComputersScreen({ store, deps, onBack }) {
|
|
|
3238
3278
|
})
|
|
3239
3279
|
})
|
|
3240
3280
|
}),
|
|
3281
|
+
state.relay?.state === "upgrade_required" ? /* @__PURE__ */ jsx(Text, {
|
|
3282
|
+
wrap: "wrap",
|
|
3283
|
+
color: k.c.error,
|
|
3284
|
+
children: state.relay.detail ?? "Update Conveno to keep using your other computers."
|
|
3285
|
+
}) : null,
|
|
3241
3286
|
state.devices?.conflict ? /* @__PURE__ */ jsx(Text, {
|
|
3242
3287
|
wrap: "wrap",
|
|
3243
3288
|
color: k.c.error,
|
|
@@ -4698,7 +4743,7 @@ function Home({ store, deps, size, onSetup, onQuit }) {
|
|
|
4698
4743
|
...remote > 0 ? [{ text: `${remote} on other computers` }] : []
|
|
4699
4744
|
];
|
|
4700
4745
|
const relay = state.relay?.state;
|
|
4701
|
-
const middle = state.connection === "daemon-down" ? "reconnecting…" : state.connection === "connecting" ? "connecting…" : state.connection === "error" ? "can't reach Conveno" : relay === "connected" ? "running · other computers connected" : relay === "connecting" || relay === "disconnected" ? "running · reaching other computers…" : "running";
|
|
4746
|
+
const middle = state.connection === "daemon-down" ? "reconnecting…" : state.connection === "connecting" ? "connecting…" : state.connection === "error" ? "can't reach Conveno" : relay === "connected" ? "running · other computers connected" : relay === "connecting" || relay === "disconnected" ? "running · reaching other computers…" : relay === "upgrade_required" ? "running · update Conveno to reach other computers" : "running";
|
|
4702
4747
|
const keys = empty ? [
|
|
4703
4748
|
{
|
|
4704
4749
|
k: "a",
|
|
@@ -5051,6 +5096,7 @@ function depthOf(node) {
|
|
|
5051
5096
|
for (let p = node.parentNode; p; p = p.parentNode) d++;
|
|
5052
5097
|
return d;
|
|
5053
5098
|
}
|
|
5099
|
+
const DOUBLE_CLICK_MS = 400;
|
|
5054
5100
|
const ENABLE_SEQ = "\x1B[?1000h\x1B[?1006h";
|
|
5055
5101
|
const DISABLE_SEQ = "\x1B[?1006l\x1B[?1002l\x1B[?1000l";
|
|
5056
5102
|
/** Hit testing and dispatch. One per running app. */
|
|
@@ -5149,7 +5195,7 @@ var MouseHub = class {
|
|
|
5149
5195
|
let double = false;
|
|
5150
5196
|
if (e.button === "left") {
|
|
5151
5197
|
const t = this.now();
|
|
5152
|
-
double = this.last !== void 0 && this.last.x === e.x && this.last.y === e.y && t - this.last.t <=
|
|
5198
|
+
double = this.last !== void 0 && this.last.x === e.x && this.last.y === e.y && t - this.last.t <= DOUBLE_CLICK_MS;
|
|
5153
5199
|
this.last = double ? void 0 : {
|
|
5154
5200
|
x: e.x,
|
|
5155
5201
|
y: e.y,
|
|
@@ -5268,7 +5314,7 @@ function createMouseInput(ctx, real = process.stdin, out = process.stdout) {
|
|
|
5268
5314
|
if (!usable) return {
|
|
5269
5315
|
stdin: real,
|
|
5270
5316
|
hub,
|
|
5271
|
-
dispose: () =>
|
|
5317
|
+
dispose: () => {}
|
|
5272
5318
|
};
|
|
5273
5319
|
stream = new FilteredStdin(real, out, hub);
|
|
5274
5320
|
const restore = () => {
|
|
@@ -5771,7 +5817,11 @@ async function loadSetup(ctx) {
|
|
|
5771
5817
|
const relay = await client["relay.status"]({}).catch(() => void 0);
|
|
5772
5818
|
if (relay) {
|
|
5773
5819
|
if (relay.state === "connected") sync = "online";
|
|
5774
|
-
else if (
|
|
5820
|
+
else if ([
|
|
5821
|
+
"connecting",
|
|
5822
|
+
"disconnected",
|
|
5823
|
+
"upgrade_required"
|
|
5824
|
+
].includes(relay.state)) sync = "offline";
|
|
5775
5825
|
}
|
|
5776
5826
|
} finally {
|
|
5777
5827
|
await client.close().catch(() => void 0);
|
|
@@ -5906,14 +5956,6 @@ function setHelpers(ctx, on) {
|
|
|
5906
5956
|
writeSettings(dataPaths(ctx.platform, ctx.dataDir).settings, { acpAdapterNpx: on });
|
|
5907
5957
|
}
|
|
5908
5958
|
// src/tui/onboarding/copy.ts
|
|
5909
|
-
/** Display names. */
|
|
5910
|
-
const TOOL_NAMES = {
|
|
5911
|
-
claude: "Claude Code",
|
|
5912
|
-
codex: "Codex",
|
|
5913
|
-
opencode: "OpenCode",
|
|
5914
|
-
antigravity: "Antigravity",
|
|
5915
|
-
grok: "Grok Build"
|
|
5916
|
-
};
|
|
5917
5959
|
/** The order the tools are listed in. */
|
|
5918
5960
|
const TOOL_ORDER = [
|
|
5919
5961
|
"claude",
|
|
@@ -6058,7 +6100,7 @@ async function changeTool(ctx, cli, fixId, failed, io) {
|
|
|
6058
6100
|
}
|
|
6059
6101
|
const tokenFile = (ctx) => dataPaths(ctx.platform, ctx.dataDir).account;
|
|
6060
6102
|
const accountIo = (ctx) => ({
|
|
6061
|
-
apiBase: ctx.env
|
|
6103
|
+
apiBase: loginAccountApi(ctx.env),
|
|
6062
6104
|
now: () => ctx.now().getTime()
|
|
6063
6105
|
});
|
|
6064
6106
|
const PROCESS_NAMES = {
|
|
@@ -7892,7 +7934,7 @@ async function createStore(ctx, opts = {}) {
|
|
|
7892
7934
|
set({ account: { signedIn: true } });
|
|
7893
7935
|
try {
|
|
7894
7936
|
const s = await fetchAccountStatus(tokens.refreshToken, {
|
|
7895
|
-
apiBase: ctx.env
|
|
7937
|
+
apiBase: signedInAccountApi(file, ctx.env),
|
|
7896
7938
|
now: () => ctx.now().getTime()
|
|
7897
7939
|
});
|
|
7898
7940
|
set({ account: {
|
|
@@ -8095,7 +8137,7 @@ async function createStore(ctx, opts = {}) {
|
|
|
8095
8137
|
writeModelMenu(dataPaths(ctx.platform, ctx.dataDir).workerModels, cli, menu);
|
|
8096
8138
|
},
|
|
8097
8139
|
async openAccountPage() {
|
|
8098
|
-
const base = ctx.
|
|
8140
|
+
const base = signedInAccountApi(dataPaths(ctx.platform, ctx.dataDir).account, ctx.env);
|
|
8099
8141
|
openInBrowser(ctx.platform, `${base}/account`);
|
|
8100
8142
|
},
|
|
8101
8143
|
async refreshAccount() {
|
|
@@ -4,18 +4,18 @@ import { homedir } from "node:os";
|
|
|
4
4
|
import { delimiter, join, win32 } from "node:path";
|
|
5
5
|
import { createInterface } from "node:readline";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { n as antigravityAdapter } from "./dist-
|
|
8
|
-
import { a as opencodeAdapter, o as claudeAdapter, r as readAllStdin } from "./hook-entry-
|
|
9
|
-
import { t as codexAdapter } from "./dist-
|
|
10
|
-
import { t as grokAdapter } from "./dist-
|
|
11
|
-
import { t as createTheme } from "./dist-
|
|
12
|
-
import { n as connect$1 } from "./dist-
|
|
13
|
-
import { $t as realSpawnDeps,
|
|
14
|
-
import "./dist-
|
|
7
|
+
import { n as antigravityAdapter } from "./dist-CTw3arJP.js";
|
|
8
|
+
import { a as opencodeAdapter, o as claudeAdapter, r as readAllStdin } from "./hook-entry-DYXjVztc.js";
|
|
9
|
+
import { t as codexAdapter } from "./dist-CvKAege3.js";
|
|
10
|
+
import { t as grokAdapter } from "./dist-Bb2opAjB.js";
|
|
11
|
+
import { t as createTheme } from "./dist-BOwFdixw.js";
|
|
12
|
+
import { n as connect$1 } from "./dist-BgAfkqeX.js";
|
|
13
|
+
import { $t as realSpawnDeps, En as validateRename, Et as needsQuoting, Fn as CLI_KINDS, G as detectRepo, H as dataPaths, Hn as MessageId, It as pendingTurn, Kt as readAncestry, Lt as pidAlive, Mt as parsePs1ShimTarget, O as baseName, T as attachAcpSession, Un as OWNER_SESSION_ID, V as dataDir, Vt as planSpawn, Yt as readModelMenus, Zn as SessionId, _t as launcherText, a as HEARTBEAT_INTERVAL_MS, f as SpawnError, gn as spawnSession, gr as boolean, gt as launcherPath, hr as array, j as claimSpawnRecord, jt as parseCmdShimTarget, mr as _enum, o as NOT_FROM_USER_NOTICE, qn as RpcErrorCode, qt as readCommandLine, r as ConvenoError, rt as formatInbox, sn as resolveWindowsCommand, u as SPAWN_CLIS, ut as isAntigravityApp, xr as string, yr as number } from "./dist-Dc50_P_f.js";
|
|
14
|
+
import "./dist-B1pfP_d5.js";
|
|
15
15
|
import { access } from "node:fs/promises";
|
|
16
16
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
17
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
18
|
-
// ../daemon/dist/server-
|
|
18
|
+
// ../daemon/dist/server-B-6PHvmV.js
|
|
19
19
|
/** `kill(pid, 0)` liveness: EPERM means the process exists but belongs to someone else. */
|
|
20
20
|
function defaultIsAlive(pid) {
|
|
21
21
|
try {
|
|
@@ -28,7 +28,7 @@ function defaultIsAlive(pid) {
|
|
|
28
28
|
`${OWNER_SESSION_ID}`;
|
|
29
29
|
SessionId.parse("0".repeat(26));
|
|
30
30
|
// ../mcp/dist/index.js
|
|
31
|
-
const SERVER_VERSION = "0.2.0-rc.
|
|
31
|
+
const SERVER_VERSION = "0.2.0-rc.17";
|
|
32
32
|
const MENU_NAMES_MAX = 12;
|
|
33
33
|
/**
|
|
34
34
|
* One sentence for the spawn_session description: the models and efforts each CLI offered the
|
|
@@ -175,7 +175,6 @@ function createServer(opts) {
|
|
|
175
175
|
const parentGone = () => opts.parentPid !== void 0 && !isAlive(opts.parentPid);
|
|
176
176
|
const register = async () => {
|
|
177
177
|
const repo = await detectRepo(cwd, { exists: pathExists });
|
|
178
|
-
const cliVersion = process.env.CONVENO_CLI_VERSION?.trim().slice(0, 64);
|
|
179
178
|
const { hostPid, hostPids, variant } = await host;
|
|
180
179
|
const record = claimSpawnRecord(spawnDataDir, cli, hostPids);
|
|
181
180
|
if (record?.acp) {
|
|
@@ -189,7 +188,6 @@ function createServer(opts) {
|
|
|
189
188
|
pid: process.pid,
|
|
190
189
|
...hostPid !== void 0 ? { hostPid } : {},
|
|
191
190
|
...hostPids.length > 0 ? { hostPids: hostPids.slice(0, 8) } : {},
|
|
192
|
-
...cliVersion ? { cliVersion } : {},
|
|
193
191
|
...variant ? { variant } : {},
|
|
194
192
|
...repo.root ? { repo: { root: repo.root } } : {},
|
|
195
193
|
...spawnedBy.success ? { spawnedBy: spawnedBy.data } : {},
|
|
@@ -844,4 +842,4 @@ function createRuntimeCtx() {
|
|
|
844
842
|
hookTimeoutMs: 2e3
|
|
845
843
|
};
|
|
846
844
|
}
|
|
847
|
-
export { ask,
|
|
845
|
+
export { ask, convenoCommand, convenoLauncher, createRuntimeCtx, resolveDaemonEntry, windowsShortPath };
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as workerAskTimeoutOf, Fn as CLI_KINDS, Gt as readAccountTokens, H as dataPaths, Ht as pollDeviceCode, I as compatStatus, L as completeLogin, Pn as writeSettings, Q as fetchAccountStatus, Rt as pinnedAdapter, St as logoutAccount, Vt as planSpawn, Zt as readSettings, an as resolveAcpProgram, b as adapterNpxCommand, d as SPAWN_TABLE, et as findOnPath, jn as workerUnansweredOf, kn as workerAccessOf, nn as requestDeviceCode, p as WORKER_ACCESS, pn as signedInAccountApi, t as AccountError, v as acpOverrideVar, xt as loginAccountApi, y as adapterInstallCommand } from "./dist-Dc50_P_f.js";
|
|
2
2
|
import { a as fail, c as plural, d as warnBlock, i as errorBlock, l as seconds, n as cmd, o as localStamp, r as columns, s as plainError, t as closest, u as tilde } from "./fmt-C2SsP5Y0.js";
|
|
3
3
|
import { a as parseFlags, n as COMMANDS } from "./args-CtyKPZuN.js";
|
|
4
4
|
import { n as connectOpts, t as adapterEnv } from "./ctx-tYftvhz_.js";
|
|
5
|
-
import { t as daemonProblem } from "./daemonError-
|
|
5
|
+
import { t as daemonProblem } from "./daemonError-BwdtKOCy.js";
|
|
6
6
|
import { basename, dirname, isAbsolute, join } from "node:path";
|
|
7
7
|
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { access, chmod, mkdir, open, readFile, readdir, realpath, rename as rename$1, rm, rmdir, stat, writeFile } from "node:fs/promises";
|
|
9
9
|
import { createHash, randomBytes } from "node:crypto";
|
|
10
10
|
// src/account.ts
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const tokenFile = (ctx) => dataPaths(ctx.platform, ctx.dataDir).account;
|
|
12
|
+
/** The account server of the saved login, the one its tokens may be sent to. */
|
|
13
|
+
const accountServer = (ctx) => signedInAccountApi(tokenFile(ctx), ctx.env);
|
|
14
|
+
const accountIo = (ctx, io, apiBase = accountServer(ctx)) => ({
|
|
15
|
+
apiBase,
|
|
13
16
|
now: () => ctx.now().getTime(),
|
|
14
17
|
...io.fetch ? { fetch: io.fetch } : {}
|
|
15
18
|
});
|
|
16
|
-
const tokenFile = (ctx) => dataPaths(ctx.platform, ctx.dataDir).account;
|
|
17
19
|
/** Show the code as ABCD-1234, the way the page asks for it. */
|
|
18
20
|
const showCode = (code) => /^[A-Za-z0-9]{8}$/.test(code) ? `${code.slice(0, 4)}-${code.slice(4)}` : code;
|
|
19
21
|
/** Open a page with the system's own opener. No shell is involved, so the URL is one argument. */
|
|
@@ -65,7 +67,7 @@ async function runLogin(ctx, argv, io = {}) {
|
|
|
65
67
|
const parsed = parseFlags(ctx, spec, argv);
|
|
66
68
|
if (typeof parsed === "number") return parsed;
|
|
67
69
|
const t = ctx.theme;
|
|
68
|
-
const aio = accountIo(ctx, io);
|
|
70
|
+
const aio = accountIo(ctx, io, loginAccountApi(ctx.env));
|
|
69
71
|
try {
|
|
70
72
|
const code = await requestDeviceCode(aio);
|
|
71
73
|
ctx.err([
|
|
@@ -98,13 +100,14 @@ async function runLogout(ctx, argv, io = {}) {
|
|
|
98
100
|
if (!spec) return 2;
|
|
99
101
|
const parsed = parseFlags(ctx, spec, argv);
|
|
100
102
|
if (typeof parsed === "number") return parsed;
|
|
101
|
-
const
|
|
103
|
+
const server = accountServer(ctx);
|
|
104
|
+
const r = await logoutAccount(tokenFile(ctx), accountIo(ctx, io, server));
|
|
102
105
|
if (!r.hadLogin) {
|
|
103
106
|
ctx.out("You were not signed in.\n");
|
|
104
107
|
return 0;
|
|
105
108
|
}
|
|
106
109
|
ctx.out(`${ctx.theme.status("ok")} Signed out.\n`);
|
|
107
|
-
if (!r.revoked) ctx.err(`${ctx.theme.status("warn")} The account server could not be reached, so the login was only removed from this machine. Sign out everywhere at
|
|
110
|
+
if (!r.revoked) ctx.err(`${ctx.theme.status("warn")} The account server could not be reached, so the login was only removed from this machine. Sign out everywhere at ${server}/account.\n`);
|
|
108
111
|
return 0;
|
|
109
112
|
}
|
|
110
113
|
/** `conveno account`: plan and trial. */
|
|
@@ -123,7 +126,8 @@ async function runAccount(ctx, argv, io = {}) {
|
|
|
123
126
|
ref: "e_account_not_logged_in"
|
|
124
127
|
});
|
|
125
128
|
try {
|
|
126
|
-
const
|
|
129
|
+
const server = accountServer(ctx);
|
|
130
|
+
const s = await fetchAccountStatus(tokens.refreshToken, accountIo(ctx, io, server));
|
|
127
131
|
const rows = [["Account", s.user.name], ["Plan", planLine(ctx, s)]];
|
|
128
132
|
if (s.status === "trialing" && s.trialEnd !== null) {
|
|
129
133
|
const left = s.trialDaysLeft ?? 0;
|
|
@@ -132,8 +136,8 @@ async function runAccount(ctx, argv, io = {}) {
|
|
|
132
136
|
if (s.paymentFailed) rows.push(["Billing", t.paint("warn", "last payment failed")]);
|
|
133
137
|
const width = Math.max(...rows.map(([k]) => k.length)) + 2;
|
|
134
138
|
const lines = rows.map(([k, v]) => `${t.paint("quiet", k.padEnd(width))}${v}`);
|
|
135
|
-
if (s.plan === "free") lines.push("", `Upgrade or start the 14-day trial at ${t.bold(
|
|
136
|
-
else if (s.status === "trialing") lines.push("",
|
|
139
|
+
if (s.plan === "free") lines.push("", `Upgrade or start the 14-day trial at ${t.bold(`${server}/account`)}.`);
|
|
140
|
+
else if (s.status === "trialing") lines.push("", `No card is on file. Add one at ${server}/account to keep Pro.`);
|
|
137
141
|
ctx.out(`${lines.join("\n")}\n`);
|
|
138
142
|
return 0;
|
|
139
143
|
} catch (e) {
|
|
@@ -141,7 +145,7 @@ async function runAccount(ctx, argv, io = {}) {
|
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
// src/version.ts
|
|
144
|
-
const VERSION = "0.2.0-rc.
|
|
148
|
+
const VERSION = "0.2.0-rc.17";
|
|
145
149
|
// src/daemon.ts
|
|
146
150
|
async function lockPid(ctx) {
|
|
147
151
|
try {
|
|
@@ -294,7 +298,7 @@ async function replaceStaleDaemon(ctx) {
|
|
|
294
298
|
} catch {
|
|
295
299
|
return null;
|
|
296
300
|
}
|
|
297
|
-
if (running === void 0 || running ===
|
|
301
|
+
if (running === void 0 || running === VERSION) return null;
|
|
298
302
|
return await stopDaemon({
|
|
299
303
|
...ctx,
|
|
300
304
|
out: () => void 0,
|
|
@@ -395,6 +399,7 @@ function listLine(ctx, list) {
|
|
|
395
399
|
function conflictBlock(ctx, c) {
|
|
396
400
|
if (!c) return "";
|
|
397
401
|
const t = ctx.theme;
|
|
402
|
+
const account = signedInAccountApi(dataPaths(ctx.platform, ctx.dataDir).account, ctx.env);
|
|
398
403
|
const head = (l) => l ? `${l.head.slice(0, 16)} ${t.paint("quiet", `(${plural(l.length, "entry", "entries")})`)}` : "none";
|
|
399
404
|
const why = c.kind === "split_view" ? [` ${c.peer?.name ?? "Another device"} signed a message with a device list this device does not hold.`, " The relay may be showing your devices different lists, for example to hide a revocation."] : [" The relay holds a device list that this device's list is not part of.", " Someone changed the list in a way this device cannot follow, or the relay is lying."];
|
|
400
405
|
return `${[
|
|
@@ -411,7 +416,7 @@ function conflictBlock(ctx, c) {
|
|
|
411
416
|
" If it lists only devices you recognize, type the head it shows (the full 64 characters) here:",
|
|
412
417
|
` ${cmd(t, "conveno devices accept <head>")}. Then revoke any device you do not recognize.`,
|
|
413
418
|
" If no device you trust is left, or you did not reset the devices yourself, reset them at",
|
|
414
|
-
`
|
|
419
|
+
` ${account}/account. After a reset, run ${cmd(t, "conveno devices reset")} here and pair again.`,
|
|
415
420
|
""
|
|
416
421
|
].join("\n")}\n`;
|
|
417
422
|
}
|
|
@@ -638,7 +643,8 @@ const STATE_TEXT = {
|
|
|
638
643
|
connecting: "connecting",
|
|
639
644
|
connected: "connected",
|
|
640
645
|
disconnected: "disconnected, retrying",
|
|
641
|
-
revoked: "off, this device was revoked"
|
|
646
|
+
revoked: "off, this device was revoked",
|
|
647
|
+
upgrade_required: "off, Conveno needs an update"
|
|
642
648
|
};
|
|
643
649
|
async function runRelay(ctx, argv) {
|
|
644
650
|
const t = ctx.theme;
|
|
@@ -787,6 +793,9 @@ ${missing.map((m) => ` ${pinnedAdapter(m.pkg) ?? m.pkg}\n`).join("")}`);
|
|
|
787
793
|
printManual(ctx, missing);
|
|
788
794
|
}
|
|
789
795
|
}
|
|
796
|
+
// src/acp-warm.ts
|
|
797
|
+
/** Longest a download may take. */
|
|
798
|
+
const WARM_TIMEOUT_MS = 3e5;
|
|
790
799
|
function realWarmRunner(ctx) {
|
|
791
800
|
return { run: (file, args, timeoutMs) => {
|
|
792
801
|
const plan = planSpawn(file, args);
|
|
@@ -851,7 +860,7 @@ async function warmAcpAdapters(ctx, clis, opts = {}) {
|
|
|
851
860
|
opts.onLine?.(`$ npm ${args.join(" ")}`);
|
|
852
861
|
let code = null;
|
|
853
862
|
try {
|
|
854
|
-
code = await runner.run("npm", args, opts.timeoutMs ??
|
|
863
|
+
code = await runner.run("npm", args, opts.timeoutMs ?? WARM_TIMEOUT_MS);
|
|
855
864
|
} catch {
|
|
856
865
|
code = null;
|
|
857
866
|
}
|
|
@@ -1925,7 +1934,7 @@ async function runSetup(ctx, argv) {
|
|
|
1925
1934
|
});
|
|
1926
1935
|
if (ctx.interactive && v.yes !== true && v["dry-run"] !== true) {
|
|
1927
1936
|
if (isWorkerAccess(access)) saveWorkerAccess(ctx, { access });
|
|
1928
|
-
return (await import("./run-
|
|
1937
|
+
return (await import("./run-B01nDeos.js")).runTui(ctx, { start: "setup" });
|
|
1929
1938
|
}
|
|
1930
1939
|
return runInit(ctx, argv, "setup");
|
|
1931
1940
|
}
|
|
@@ -2045,8 +2054,13 @@ async function runDoctor(ctx, argv = []) {
|
|
|
2045
2054
|
const client = await ctx.connect(connectOpts(ctx, false));
|
|
2046
2055
|
try {
|
|
2047
2056
|
const { sessions } = await client["session.list"]({});
|
|
2057
|
+
const relay = await (async () => client["relay.status"]({}))().catch(() => void 0);
|
|
2058
|
+
if (relay?.state === "upgrade_required") {
|
|
2059
|
+
warnings++;
|
|
2060
|
+
notes.push(warnBlock(t, "The relay no longer accepts this version of Conveno.", relay.detail ?? "Update Conveno to keep using your other computers.", "Your other computers cannot be reached until Conveno is updated."));
|
|
2061
|
+
}
|
|
2048
2062
|
const running = client.daemonVersion;
|
|
2049
|
-
if (running !== void 0 && running !==
|
|
2063
|
+
if (running !== void 0 && running !== VERSION) {
|
|
2050
2064
|
daemonLine = [` ${t.status("warn")} daemon`, `running ${running}, this is ${VERSION}`];
|
|
2051
2065
|
warnings++;
|
|
2052
2066
|
notes.push(warnBlock(t, "Conveno's background service is from an older version.", `Run ${cmd(t, "conveno")} to restart it, or ${cmd(t, "conveno daemon stop")} and open your AI tools again.`, `The service running now is ${running}; this install is ${VERSION}. ${cmd(t, "conveno")} and ${cmd(t, "conveno setup")} restart it for you.`));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as isOneShotGrok } from "./dist-
|
|
2
|
-
import {
|
|
1
|
+
import { n as isOneShotGrok } from "./dist-Bb2opAjB.js";
|
|
2
|
+
import { dt as isFromOwner, fn as senderOf, tn as renderBody, un as runWaker } from "./dist-Dc50_P_f.js";
|
|
3
3
|
import { n as connectOpts } from "./ctx-tYftvhz_.js";
|
|
4
|
-
import { t as daemonProblem } from "./daemonError-
|
|
5
|
-
import { t as findSession } from "./pick-
|
|
4
|
+
import { t as daemonProblem } from "./daemonError-BwdtKOCy.js";
|
|
5
|
+
import { t as findSession } from "./pick-iuG24FX9.js";
|
|
6
6
|
// src/watch.ts
|
|
7
7
|
const CONNECT_MAX_RETRY_MS = 3e4;
|
|
8
8
|
const CONNECT_GIVE_UP_MS = 3e5;
|