@conveno/cli 0.2.0-rc.13 → 0.2.0-rc.15

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.
@@ -1,8 +1,8 @@
1
- import { At as pinnedAdapter, Ht as readSettings, Kt as requestDeviceCode, Lt as readAccountTokens, N as compatStatus, Nt as planSpawn, P as completeLogin, Pt as pollDeviceCode, X as findOnPath, Y as fetchAccountStatus, Yt as resolveAcpProgram, _ as adapterInstallCommand, _n as CLI_KINDS, g as acpOverrideVar, gn as writeSettings, gt as logoutAccount, p as SPAWN_TABLE, r as AccountError, v as adapterNpxCommand, z as dataPaths } from "./dist-DnNuDzEA.js";
1
+ import { Bt as readAccountTokens, Cn as CLI_KINDS, F as compatStatus, Gt as readSettings, I as completeLogin, It as planSpawn, Lt as pollDeviceCode, Nt as pinnedAdapter, Q as findOnPath, Qt as resolveAcpProgram, Sn as writeSettings, V as dataPaths, Yt as requestDeviceCode, Z as fetchAccountStatus, b as adapterNpxCommand, bn as workerAskTimeoutOf, d as SPAWN_TABLE, n as AccountError, p as WORKER_ACCESS, v as acpOverrideVar, xn as workerUnansweredOf, y as adapterInstallCommand, yn as workerAccessOf, yt as logoutAccount } from "./dist-ZL7d4_97.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
- import { a as parseFlags, n as COMMANDS } from "./args-C4rVCVXx.js";
3
+ import { a as parseFlags, n as COMMANDS } from "./args-CpAvszNY.js";
4
4
  import { n as connectOpts, t as adapterEnv } from "./ctx-tYftvhz_.js";
5
- import { t as daemonProblem } from "./daemonError-CjxG2yUl.js";
5
+ import { t as daemonProblem } from "./daemonError-Bj22X-4V.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";
@@ -141,7 +141,7 @@ async function runAccount(ctx, argv, io = {}) {
141
141
  }
142
142
  }
143
143
  // src/version.ts
144
- const VERSION = "0.2.0-rc.13";
144
+ const VERSION = "0.2.0-rc.15";
145
145
  // src/daemon.ts
146
146
  async function lockPid(ctx) {
147
147
  try {
@@ -294,7 +294,7 @@ async function replaceStaleDaemon(ctx) {
294
294
  } catch {
295
295
  return null;
296
296
  }
297
- if (running === void 0 || running === "0.2.0-rc.13") return null;
297
+ if (running === void 0 || running === "0.2.0-rc.15") return null;
298
298
  return await stopDaemon({
299
299
  ...ctx,
300
300
  out: () => void 0,
@@ -1345,6 +1345,61 @@ function saveChoice(ctx, tools, lead) {
1345
1345
  leadCli: next && tools.includes(next) ? next : null
1346
1346
  });
1347
1347
  }
1348
+ // src/worker-access.ts
1349
+ /** "1 min", "2 min", "5 min". */
1350
+ const waitText = (sec) => `${Math.round(sec / 60)} min`;
1351
+ /** Plain words for each level. */
1352
+ const ACCESS_TEXT = {
1353
+ read: {
1354
+ label: "Read only",
1355
+ hint: "read and search files, list folders"
1356
+ },
1357
+ edit: {
1358
+ label: "Read and edit",
1359
+ hint: "also edit files; commands are asked"
1360
+ },
1361
+ full: {
1362
+ label: "Everything",
1363
+ hint: "anything, no questions"
1364
+ }
1365
+ };
1366
+ const UNANSWERED_TEXT = {
1367
+ deny: {
1368
+ label: "Deny it",
1369
+ hint: "the worker is told no"
1370
+ },
1371
+ allow: {
1372
+ label: "Allow it",
1373
+ hint: "the worker goes ahead"
1374
+ }
1375
+ };
1376
+ const isWorkerAccess = (v) => WORKER_ACCESS.includes(v);
1377
+ /** The saved choices, or the defaults. */
1378
+ function readWorkerAccess(ctx) {
1379
+ const path = settingsFile(ctx);
1380
+ const s = path ? readSettings(path) : {};
1381
+ return {
1382
+ access: workerAccessOf(s),
1383
+ unanswered: workerUnansweredOf(s),
1384
+ waitSec: workerAskTimeoutOf(s)
1385
+ };
1386
+ }
1387
+ /** Save some or all. Does nothing when the settings path is not a real path (faked platform). */
1388
+ function saveWorkerAccess(ctx, patch) {
1389
+ const path = settingsFile(ctx);
1390
+ if (!path) return;
1391
+ writeSettings(path, {
1392
+ ...patch.access ? { workerAccess: patch.access } : {},
1393
+ ...patch.unanswered ? { workerUnanswered: patch.unanswered } : {},
1394
+ ...patch.waitSec ? { workerAskTimeoutSec: patch.waitSec } : {}
1395
+ });
1396
+ }
1397
+ /** One quiet line for `conveno status` and `conveno doctor`. */
1398
+ function workerAccessLine(ctx) {
1399
+ const { access, unanswered, waitSec } = readWorkerAccess(ctx);
1400
+ if (access === "full") return "Workers: full · no questions";
1401
+ return `Workers: ${access} · asks wait ${waitText(waitSec)}, then ${unanswered}`;
1402
+ }
1348
1403
  // src/init.ts
1349
1404
  const CODEX_NOTE = "Codex asks you to approve Conveno once: run /hooks inside Codex.";
1350
1405
  /** Detect every adapter. A detection that throws counts as not installed. */
@@ -1674,6 +1729,11 @@ async function runInit(ctx, argv, name = "init") {
1674
1729
  const outcome = {};
1675
1730
  const code = await initSetup(ctx, argv, outcome, name);
1676
1731
  if (code !== 0) return code;
1732
+ const access = early?.values["worker-access"];
1733
+ if (isWorkerAccess(access) && early?.values["dry-run"] !== true) {
1734
+ saveWorkerAccess(ctx, { access });
1735
+ ctx.out(`${ctx.theme.status("ok")} Workers get ${access} access.\n`);
1736
+ }
1677
1737
  if (typeof lead === "string" && early?.values["dry-run"] !== true) {
1678
1738
  writeSettings(dataPaths(ctx.platform, ctx.dataDir).settings, { leadCli: lead });
1679
1739
  const shown = ctx.adapters.find((a) => a.cli === lead)?.displayName ?? lead;
@@ -1855,7 +1915,18 @@ async function runSetup(ctx, argv) {
1855
1915
  const parsed = parseFlags(ctx, spec, argv);
1856
1916
  if (typeof parsed === "number") return parsed;
1857
1917
  const v = parsed.values;
1858
- if (ctx.interactive && v.yes !== true && v["dry-run"] !== true) return (await import("./run-BuDbmxx_.js")).runTui(ctx, { start: "setup" });
1918
+ const access = v["worker-access"];
1919
+ if (access !== void 0 && !isWorkerAccess(access)) return fail(ctx, {
1920
+ what: `Unknown worker access "${String(access)}"`,
1921
+ detail: ["Choose read, edit or full."],
1922
+ fix: `Pass ${cmd(ctx.theme, "--worker-access edit")} or leave it out.`,
1923
+ exit: 2,
1924
+ ref: "e_usage"
1925
+ });
1926
+ if (ctx.interactive && v.yes !== true && v["dry-run"] !== true) {
1927
+ if (isWorkerAccess(access)) saveWorkerAccess(ctx, { access });
1928
+ return (await import("./run-CKiYjNqx.js")).runTui(ctx, { start: "setup" });
1929
+ }
1859
1930
  return runInit(ctx, argv, "setup");
1860
1931
  }
1861
1932
  // src/doctor.ts
@@ -1975,7 +2046,7 @@ async function runDoctor(ctx, argv = []) {
1975
2046
  try {
1976
2047
  const { sessions } = await client["session.list"]({});
1977
2048
  const running = client.daemonVersion;
1978
- if (running !== void 0 && running !== "0.2.0-rc.13") {
2049
+ if (running !== void 0 && running !== "0.2.0-rc.15") {
1979
2050
  daemonLine = [` ${t.status("warn")} daemon`, `running ${running}, this is ${VERSION}`];
1980
2051
  warnings++;
1981
2052
  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.`));
@@ -2093,6 +2164,7 @@ async function runDoctor(ctx, argv = []) {
2093
2164
  ctx.out(`${columns(table).join("\n")}\n`);
2094
2165
  const acpLines = acpDoctorLines(ctx, rows.filter((r) => r.detection.installed).map((r) => r.adapter.cli));
2095
2166
  if (acpLines.length > 0) ctx.out(`${acpLines.join("\n")}\n`);
2167
+ ctx.out(`${t.paint("quiet", workerAccessLine(ctx))}\n`);
2096
2168
  if (!rows.some((r) => r.detection.installed)) {
2097
2169
  notes.push(warnBlock(t, "No supported AI coding CLI was found on PATH.", "Install Claude Code, Codex CLI or OpenCode, then run conveno init."));
2098
2170
  warnings++;
@@ -2245,4 +2317,4 @@ async function runUninstall(ctx, argv) {
2245
2317
  ctx.out(" Removed the Conveno entries. Restart open sessions to drop Conveno.\n");
2246
2318
  return 0;
2247
2319
  }
2248
- export { runAccount as A, runDevices as C, stopDaemonIfRunning as D, runDaemon as E, runLogout as M, showCode as N, VERSION as O, PAIR_TIMEOUT_MS as S, replaceStaleDaemon as T, saveChoice as _, applyOptions as a, unifiedDiff as b, collectPlans as c, refreshManifest as d, renewedApprovals as f, connectedTools as g, chosenTools as h, runDoctor as i, runLogin as j, openInBrowser as k, detectAll as l, runSetup as m, inspect as n, approvalWrites as o, runInit as p, partState as r, approvedBySetup as s, runUninstall as t, pendingOptions as u, StaleError as v, runRelay as w, warmAcpAdapters as x, applyChanges as y };
2320
+ export { runRelay as A, saveChoice as C, warmAcpAdapters as D, unifiedDiff as E, openInBrowser as F, runAccount as I, runLogin as L, runDaemon as M, stopDaemonIfRunning as N, PAIR_TIMEOUT_MS as O, VERSION as P, runLogout as R, connectedTools as S, applyChanges as T, readWorkerAccess as _, applyOptions as a, workerAccessLine as b, collectPlans as c, refreshManifest as d, renewedApprovals as f, UNANSWERED_TEXT as g, ACCESS_TEXT as h, runDoctor as i, replaceStaleDaemon as j, runDevices as k, detectAll as l, runSetup as m, inspect as n, approvalWrites as o, runInit as p, partState as r, approvedBySetup as s, runUninstall as t, pendingOptions as u, saveWorkerAccess as v, StaleError as w, chosenTools as x, waitText as y, showCode as z };
@@ -1,8 +1,8 @@
1
- import { n as isOneShotGrok } from "./dist-B14ldKRS.js";
2
- import { $t as runWaker, Gt as renderBody, ct as isFromOwner, tn as senderOf } from "./dist-DnNuDzEA.js";
1
+ import { n as isOneShotGrok } from "./dist-C4KljaIP.js";
2
+ import { Jt as renderBody, in as senderOf, lt as isFromOwner, nn as runWaker } from "./dist-ZL7d4_97.js";
3
3
  import { n as connectOpts } from "./ctx-tYftvhz_.js";
4
- import { t as daemonProblem } from "./daemonError-CjxG2yUl.js";
5
- import { t as findSession } from "./pick-Colav8Wm.js";
4
+ import { t as daemonProblem } from "./daemonError-Bj22X-4V.js";
5
+ import { t as findSession } from "./pick-DaCRjuyz.js";
6
6
  // src/watch.ts
7
7
  const CONNECT_MAX_RETRY_MS = 3e4;
8
8
  const CONNECT_GIVE_UP_MS = 3e5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conveno/cli",
3
- "version": "0.2.0-rc.13",
3
+ "version": "0.2.0-rc.15",
4
4
  "description": "Connect AI coding CLI sessions so they can message each other.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -52,18 +52,18 @@
52
52
  "zod": "4.6.7"
53
53
  },
54
54
  "devDependencies": {
55
- "@conveno/acp": "0.2.0-rc.13",
56
- "@conveno/adapter-antigravity": "0.2.0-rc.13",
57
- "@conveno/adapter-claude": "0.2.0-rc.13",
58
- "@conveno/adapter-codex": "0.2.0-rc.13",
59
- "@conveno/adapter-grok": "0.2.0-rc.13",
60
- "@conveno/adapter-opencode": "0.2.0-rc.13",
61
- "@conveno/brand": "0.2.0-rc.13",
62
- "@conveno/client": "0.2.0-rc.13",
63
- "@conveno/core": "0.2.0-rc.13",
64
- "@conveno/daemon": "0.2.0-rc.13",
65
- "@conveno/mcp": "0.2.0-rc.13",
66
- "@conveno/protocol": "0.2.0-rc.13",
55
+ "@conveno/acp": "0.2.0-rc.15",
56
+ "@conveno/adapter-antigravity": "0.2.0-rc.15",
57
+ "@conveno/adapter-claude": "0.2.0-rc.15",
58
+ "@conveno/adapter-codex": "0.2.0-rc.15",
59
+ "@conveno/adapter-grok": "0.2.0-rc.15",
60
+ "@conveno/adapter-opencode": "0.2.0-rc.15",
61
+ "@conveno/brand": "0.2.0-rc.15",
62
+ "@conveno/client": "0.2.0-rc.15",
63
+ "@conveno/core": "0.2.0-rc.15",
64
+ "@conveno/daemon": "0.2.0-rc.15",
65
+ "@conveno/mcp": "0.2.0-rc.15",
66
+ "@conveno/protocol": "0.2.0-rc.15",
67
67
  "@types/react": "19.3.0",
68
68
  "ink-testing-library": "4.0.0"
69
69
  },
@@ -1 +0,0 @@
1
- export { i as runHookEntry } from "./hook-entry-WlJSM5aD.js";