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

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.
@@ -6169,6 +6169,8 @@ const Session = object({
6169
6169
  name: union([SessionName, RemoteSessionName]),
6170
6170
  cli: CliKind,
6171
6171
  cliVersion: string().min(1).max(64).optional(),
6172
+ /** The model and effort a background worker runs on (`sonnet · high`), when known. Not stored. */
6173
+ model: string().min(1).max(200).optional(),
6172
6174
  /** Set when the session is a desktop app of `cli` rather than the CLI. Screens say "Antigravity app". */
6173
6175
  variant: SessionVariant.optional(),
6174
6176
  deviceId: DeviceId,
@@ -6248,6 +6250,8 @@ const RegisterParams = object({
6248
6250
  name: SessionNameInput.optional(),
6249
6251
  cli: CliKind,
6250
6252
  cliVersion: string().min(1).max(64).optional(),
6253
+ /** The worker's model and effort as a short label (`sonnet · high`), shown on its card. */
6254
+ model: string().min(1).max(200).optional(),
6251
6255
  /** The session runs in a desktop app of `cli`. See `Session.variant`. */
6252
6256
  variant: SessionVariant.optional(),
6253
6257
  cwd: string().min(1),
@@ -6316,6 +6320,21 @@ const SendResult = object({
6316
6320
  name: union([SessionName, literal("you")])
6317
6321
  })
6318
6322
  });
6323
+ /** One message between two sessions, as `message.recent` lists it for the app's activity list. */
6324
+ const RecentMessage = object({
6325
+ id: MessageId,
6326
+ from: SessionId,
6327
+ /** The sender's name when it sent the message (`<device>:<name>` for another machine's). */
6328
+ fromName: string().max(200).optional(),
6329
+ fromCli: CliKind.optional(),
6330
+ /** The session that got it. */
6331
+ to: SessionId,
6332
+ toName: string().max(200),
6333
+ toCli: CliKind.optional(),
6334
+ /** The first line of the text (or a handoff's goal), one plain line, cut. */
6335
+ text: string().max(200),
6336
+ createdAt: IsoTimestamp
6337
+ });
6319
6338
  const EVENT_NAMES = [
6320
6339
  "message.received",
6321
6340
  "session.updated",
@@ -6379,7 +6398,8 @@ const ipcMethods = {
6379
6398
  "session.heartbeat": {
6380
6399
  params: object({
6381
6400
  ...sid,
6382
- pid: number().int().positive().optional()
6401
+ pid: number().int().positive().optional(),
6402
+ model: string().min(1).max(200).optional()
6383
6403
  }),
6384
6404
  result: object({ lastSeenAt: IsoTimestamp })
6385
6405
  },
@@ -6593,6 +6613,10 @@ const ipcMethods = {
6593
6613
  }),
6594
6614
  result: object({ acked: number().int().min(0) })
6595
6615
  },
6616
+ "message.recent": {
6617
+ params: object({ limit: number().int().min(1).max(200).default(50) }),
6618
+ result: object({ messages: array(RecentMessage) })
6619
+ },
6596
6620
  "owner.send": {
6597
6621
  params: object({
6598
6622
  to: Recipient,
@@ -7190,7 +7214,9 @@ function dataPaths(platform, dir) {
7190
7214
  /** Conveno account tokens from `conveno login`, mode 0600. See account.ts. */
7191
7215
  account: p.join(dir, "account.json"),
7192
7216
  /** Choices the user made, such as whether ACP adapters may be fetched with npx. See settings.ts. */
7193
- settings: p.join(dir, "settings.json")
7217
+ settings: p.join(dir, "settings.json"),
7218
+ /** The models and effort levels each CLI offered its last worker. See worker-models.ts. */
7219
+ workerModels: p.join(dir, "worker-models.json")
7194
7220
  };
7195
7221
  }
7196
7222
  /** Best effort: deletes the markers in `dir` not touched for `ASKED_MAX_AGE_MS`. */
@@ -7566,20 +7592,20 @@ function parseCliVersion(output) {
7566
7592
  }
7567
7593
  var clis = {
7568
7594
  "claude": {
7569
- "verified": "2.1.332",
7595
+ "verified": "2.1.335",
7570
7596
  "minimum": "2.1.139"
7571
7597
  },
7572
- "codex": { "verified": "0.172.0" },
7573
- "opencode": { "verified": "2.4.3" },
7598
+ "codex": { "verified": "0.173.0" },
7599
+ "opencode": { "verified": "2.4.4" },
7574
7600
  "antigravity": {
7575
- "verified": "1.5.20",
7601
+ "verified": "1.5.22",
7576
7602
  "minimum": "1.5.8"
7577
7603
  },
7578
- "grok": { "verified": "1.0.92" }
7604
+ "grok": { "verified": "1.0.100" }
7579
7605
  };
7580
7606
  var acpAdapters = {
7581
- "@agentclientprotocol/codex-acp": "2.10.0",
7582
- "@agentclientprotocol/claude-agent-acp": "0.110.0"
7607
+ "@agentclientprotocol/codex-acp": "2.12.0",
7608
+ "@agentclientprotocol/claude-agent-acp": "0.112.0"
7583
7609
  };
7584
7610
  /**
7585
7611
  * Versions per CLI, from `compat.json`. The nightly compat workflow raises `verified` when a newer
@@ -8463,7 +8489,7 @@ function statusAfterLiveness(current, verdict) {
8463
8489
  return current;
8464
8490
  }
8465
8491
  const isOnline = (s) => s.status !== "offline";
8466
- const MAX_NAME = 64;
8492
+ const MAX_NAME$1 = 64;
8467
8493
  /** Make a directory name safe to embed in a session name: lowercase, `[a-z0-9._-]`, non-empty. */
8468
8494
  function sanitizeNamePart(raw) {
8469
8495
  const cleaned = raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[^a-z0-9]+/, "").replace(/-+$/, "");
@@ -8478,7 +8504,7 @@ function generateSessionName(cli, repoBasename, sessions) {
8478
8504
  const prefix = `${cli}@`;
8479
8505
  for (let n = 1;; n++) {
8480
8506
  const suffix = `-${n}`;
8481
- const room = MAX_NAME - prefix.length - suffix.length;
8507
+ const room = MAX_NAME$1 - prefix.length - suffix.length;
8482
8508
  const name = `${prefix}${sanitizeNamePart(repoBasename).slice(0, room)}${suffix}`;
8483
8509
  if (!taken.has(name)) return name;
8484
8510
  }
@@ -9225,6 +9251,153 @@ function accessAllows(access, call) {
9225
9251
  if (access === "full") return true;
9226
9252
  return isAllowed(accessRules(access), call) || call.kind === "execute" && isSafeReadCommand(call.title ?? "");
9227
9253
  }
9254
+ const MAX_NAME = 200;
9255
+ const CONTROL = /\p{Cc}/u;
9256
+ /**
9257
+ * A model or effort name as given by a person or an agent: trimmed, non-empty, bounded, with no
9258
+ * control characters (it ends up on a command line and in a terminal).
9259
+ */
9260
+ function cleanModelName(v) {
9261
+ if (typeof v !== "string") return void 0;
9262
+ const s = v.trim();
9263
+ return s.length > 0 && s.length <= MAX_NAME && !CONTROL.test(s) ? s : void 0;
9264
+ }
9265
+ /**
9266
+ * One item of a menu a CLI offered: a value with a control character is dropped, a name has them
9267
+ * taken out (and falls back to the value when nothing is left).
9268
+ */
9269
+ function menuItem(value, name) {
9270
+ if (typeof value !== "string" || value === "" || CONTROL.test(value)) return void 0;
9271
+ const shown = typeof name === "string" ? name.replace(/\p{Cc}+/gu, " ").trim() : "";
9272
+ return {
9273
+ value,
9274
+ name: shown === "" ? value : shown
9275
+ };
9276
+ }
9277
+ /** Parse the `workerModels` settings value; anything malformed is dropped. */
9278
+ function parseWorkerModels(v) {
9279
+ if (typeof v !== "object" || v === null || Array.isArray(v)) return {};
9280
+ const out = {};
9281
+ for (const cli of CLI_KINDS) {
9282
+ const c = v[cli];
9283
+ if (typeof c !== "object" || c === null) continue;
9284
+ const model = cleanModelName(c.model);
9285
+ const effort = cleanModelName(c.effort);
9286
+ if (model || effort) out[cli] = {
9287
+ ...model ? { model } : {},
9288
+ ...effort ? { effort } : {}
9289
+ };
9290
+ }
9291
+ return out;
9292
+ }
9293
+ /** The worker's model and effort: each field from the request, else the user's default. */
9294
+ function resolveWorkerModel(requested, defaults) {
9295
+ const model = cleanModelName(requested?.model) ?? cleanModelName(defaults?.model);
9296
+ const effort = cleanModelName(requested?.effort) ?? cleanModelName(defaults?.effort);
9297
+ return {
9298
+ ...model ? { model } : {},
9299
+ ...effort ? { effort } : {}
9300
+ };
9301
+ }
9302
+ const MODEL_IDS = ["model"];
9303
+ const EFFORT_IDS = [
9304
+ "effort",
9305
+ "reasoning_effort",
9306
+ "thought_level"
9307
+ ];
9308
+ /** The ACP session config option for `kind`: by category, else by a known id. */
9309
+ function findModelOption(options, kind) {
9310
+ if (!Array.isArray(options)) return void 0;
9311
+ const list = options;
9312
+ const category = kind === "model" ? "model" : "thought_level";
9313
+ const ids = kind === "model" ? MODEL_IDS : EFFORT_IDS;
9314
+ const o = list.find((x) => x?.category === category) ?? list.find((x) => typeof x?.id === "string" && ids.includes(x.id));
9315
+ if (!o || typeof o.id !== "string") return void 0;
9316
+ const flat = (Array.isArray(o.options) ? o.options : []).flatMap((x) => {
9317
+ const item = x;
9318
+ return Array.isArray(item?.options) ? item.options : [x];
9319
+ });
9320
+ const values = [];
9321
+ for (const x of flat) {
9322
+ const item = menuItem(x?.value, x?.name);
9323
+ if (item) values.push(item);
9324
+ }
9325
+ return {
9326
+ id: o.id,
9327
+ ...typeof o.currentValue === "string" && !CONTROL.test(o.currentValue) ? { current: o.currentValue } : {},
9328
+ values
9329
+ };
9330
+ }
9331
+ /** The menu a CLI offers, from its ACP session config options. */
9332
+ function menuFromConfigOptions(options, at) {
9333
+ const m = findModelOption(options, "model");
9334
+ const e = findModelOption(options, "effort");
9335
+ return {
9336
+ models: m?.values ?? [],
9337
+ efforts: e?.values ?? [],
9338
+ current: {
9339
+ ...m?.current ? { model: m.current } : {},
9340
+ ...e?.current ? { effort: e.current } : {}
9341
+ },
9342
+ at
9343
+ };
9344
+ }
9345
+ /** Short label for a card: `sonnet · high`, or undefined when nothing is known. */
9346
+ function modelLabel(c) {
9347
+ const parts = [c?.model, c?.effort].filter((x) => !!x);
9348
+ return parts.length > 0 ? parts.join(" · ") : void 0;
9349
+ }
9350
+ function parseItems(v) {
9351
+ if (!Array.isArray(v)) return [];
9352
+ return v.flatMap((x) => {
9353
+ if (typeof x !== "object" || x === null) return [];
9354
+ const item = menuItem(x.value, x.name);
9355
+ return item ? [item] : [];
9356
+ });
9357
+ }
9358
+ /** Read the remembered menus (`dataPaths(...).workerModels`). Missing or malformed: none. */
9359
+ function readModelMenus(path) {
9360
+ try {
9361
+ const v = JSON.parse(readFileSync(path, "utf8"));
9362
+ if (typeof v !== "object" || v === null) return {};
9363
+ const out = {};
9364
+ for (const cli of CLI_KINDS) {
9365
+ const m = v[cli];
9366
+ if (typeof m !== "object" || m === null) continue;
9367
+ const cur = m.current ?? {};
9368
+ const model = cleanModelName(cur.model);
9369
+ const effort = cleanModelName(cur.effort);
9370
+ out[cli] = {
9371
+ models: parseItems(m.models),
9372
+ efforts: parseItems(m.efforts),
9373
+ current: {
9374
+ ...model ? { model } : {},
9375
+ ...effort ? { effort } : {}
9376
+ },
9377
+ at: typeof m.at === "string" ? m.at : ""
9378
+ };
9379
+ }
9380
+ return out;
9381
+ } catch {
9382
+ return {};
9383
+ }
9384
+ }
9385
+ /** Remember the menu of one CLI. Written atomically; failures are ignored (it is a cache). */
9386
+ function writeModelMenu(path, cli, menu) {
9387
+ try {
9388
+ const all = {
9389
+ ...readModelMenus(path),
9390
+ [cli]: menu
9391
+ };
9392
+ mkdirSync(dirname(path), {
9393
+ recursive: true,
9394
+ mode: 448
9395
+ });
9396
+ const tmp = `${path}.${process.pid}.tmp`;
9397
+ writeFileSync(tmp, `${JSON.stringify(all, null, 2)}\n`, { mode: 384 });
9398
+ renameSync(tmp, path);
9399
+ } catch {}
9400
+ }
9228
9401
  const WORKER_UNANSWERED = ["deny", "allow"];
9229
9402
  /** What workers may do, with the default when it was never chosen. */
9230
9403
  function workerAccessOf(s) {
@@ -9254,7 +9427,8 @@ function readSettings(path) {
9254
9427
  ...typeof o.wakeBeforeFirstPrompt === "boolean" ? { wakeBeforeFirstPrompt: o.wakeBeforeFirstPrompt } : {},
9255
9428
  ...typeof o.workerAccess === "string" && parseWorkerAccess(o.workerAccess) ? { workerAccess: parseWorkerAccess(o.workerAccess) } : {},
9256
9429
  ...WORKER_ASK_TIMEOUT_CHOICES.includes(o.workerAskTimeoutSec) ? { workerAskTimeoutSec: o.workerAskTimeoutSec } : {},
9257
- ...WORKER_UNANSWERED.includes(o.workerUnanswered) ? { workerUnanswered: o.workerUnanswered } : {}
9430
+ ...WORKER_UNANSWERED.includes(o.workerUnanswered) ? { workerUnanswered: o.workerUnanswered } : {},
9431
+ ...Object.keys(parseWorkerModels(o.workerModels)).length > 0 ? { workerModels: parseWorkerModels(o.workerModels) } : {}
9258
9432
  };
9259
9433
  } catch {
9260
9434
  return {};
@@ -9411,6 +9585,13 @@ const recordFiles = (dataDir) => {
9411
9585
  return [];
9412
9586
  }
9413
9587
  };
9588
+ /** The record of the worker whose host registered `sessionId`, whatever its file is named. */
9589
+ function spawnRecordOfSession(dataDir, sessionId) {
9590
+ for (const path of recordFiles(dataDir)) {
9591
+ const rec = readSpawnRecord(path);
9592
+ if (rec?.sessionId === sessionId) return rec;
9593
+ }
9594
+ }
9414
9595
  /**
9415
9596
  * Records of spawned sessions that are still running. Records of sessions that ended are deleted
9416
9597
  * as they are found.
@@ -9490,7 +9671,10 @@ function decodeAcpLaunchSpec(text) {
9490
9671
  } } : {},
9491
9672
  askTimeoutMs: typeof o.askTimeoutMs === "number" && o.askTimeoutMs > 0 ? o.askTimeoutMs : 12e4,
9492
9673
  ...o.unanswered === "allow" || o.unanswered === "deny" ? { unanswered: o.unanswered } : {},
9493
- ...typeof o.setupTimeoutMs === "number" && o.setupTimeoutMs > 0 ? { setupTimeoutMs: o.setupTimeoutMs } : {}
9674
+ ...typeof o.setupTimeoutMs === "number" && o.setupTimeoutMs > 0 ? { setupTimeoutMs: o.setupTimeoutMs } : {},
9675
+ ...cleanModelName(o.model) ? { model: cleanModelName(o.model) } : {},
9676
+ ...cleanModelName(o.effort) ? { effort: cleanModelName(o.effort) } : {},
9677
+ ...typeof o.modelMenuPath === "string" && o.modelMenuPath !== "" ? { modelMenuPath: o.modelMenuPath } : {}
9494
9678
  };
9495
9679
  }
9496
9680
  /** Write an ACP launch file readable by the owner only. */
@@ -9767,6 +9951,7 @@ function realSpawnDeps(opts) {
9767
9951
  which: (name) => findOnPath(name, env, platform, platform === "win32" ? entryExists : void 0),
9768
9952
  acpNpxConsent: () => readSettings(dataPaths(platform, opts.dataDir).settings).acpAdapterNpx === true,
9769
9953
  workerAccess: () => readSettings(dataPaths(platform, opts.dataDir).settings).workerAccess,
9954
+ workerModels: () => readSettings(dataPaths(platform, opts.dataDir).settings).workerModels,
9770
9955
  workerUnanswered: () => readSettings(dataPaths(platform, opts.dataDir).settings).workerUnanswered ?? "deny",
9771
9956
  workerAskTimeoutSec: () => workerAskTimeoutOf(readSettings(dataPaths(platform, opts.dataDir).settings)),
9772
9957
  repoExists: existsSync,
@@ -9849,6 +10034,7 @@ const SPAWN_TABLE = {
9849
10034
  claude: {
9850
10035
  binaries: ["claude"],
9851
10036
  interactive: (task) => task === void 0 ? [] : [task],
10037
+ modelArgs: (c) => [...c.model ? ["--model", c.model] : [], ...c.effort ? ["--effort", c.effort] : []],
9852
10038
  interactivePrompt: true,
9853
10039
  docs: ["https://code.claude.com/docs/en/cli-reference (claude \"query\")"],
9854
10040
  acp: {
@@ -9867,6 +10053,7 @@ const SPAWN_TABLE = {
9867
10053
  codex: {
9868
10054
  binaries: ["codex"],
9869
10055
  interactive: (task) => task === void 0 ? [] : [task],
10056
+ modelArgs: (c) => [...c.model ? ["-m", c.model] : [], ...c.effort ? ["-c", `model_reasoning_effort=${c.effort}`] : []],
9870
10057
  interactivePrompt: true,
9871
10058
  docs: ["https://developers.openai.com/codex/cli/reference (codex [PROMPT])", "reference/src/codex/codex-rs/tui/src/cli.rs (the optional PROMPT argument)"],
9872
10059
  acp: {
@@ -9889,6 +10076,7 @@ const SPAWN_TABLE = {
9889
10076
  opencode: {
9890
10077
  binaries: ["opencode"],
9891
10078
  interactive: (task) => task === void 0 ? [] : ["--prompt", task],
10079
+ modelArgs: (c) => c.model ? ["-m", c.model] : [],
9892
10080
  interactivePrompt: true,
9893
10081
  docs: ["https://opencode.ai/docs/cli/ (the TUI --prompt flag)", "reference/src/opencode/packages/cli/src/commands/commands.ts at v2.4.3 (--prompt)"],
9894
10082
  acp: {
@@ -9906,6 +10094,7 @@ const SPAWN_TABLE = {
9906
10094
  antigravity: {
9907
10095
  binaries: ["agy"],
9908
10096
  interactive: () => [],
10097
+ modelArgs: (c) => [...c.model ? ["--model", c.model] : [], ...c.effort ? ["--effort", c.effort] : []],
9909
10098
  interactivePrompt: false,
9910
10099
  docs: ["https://antigravity.google/docs/cli/acp (agy)"],
9911
10100
  acp: {
@@ -9923,6 +10112,7 @@ const SPAWN_TABLE = {
9923
10112
  grok: {
9924
10113
  binaries: ["grok"],
9925
10114
  interactive: (task) => task === void 0 ? [] : [task],
10115
+ modelArgs: (c) => [...c.model ? ["-m", c.model] : [], ...c.effort ? ["--reasoning-effort", c.effort] : []],
9926
10116
  interactivePrompt: true,
9927
10117
  docs: ["reference/src/grok-build/crates/codegen/xai-grok-pager/src/app/cli.rs (prompt)"],
9928
10118
  acp: {
@@ -9945,10 +10135,10 @@ function safePrompt(task) {
9945
10135
  return task.startsWith("-") ? `Task: ${task}` : task;
9946
10136
  }
9947
10137
  /** Arguments (after the program) for a window spawn: the interactive CLI, with the first task. */
9948
- function buildCliArgs(cli, task) {
10138
+ function buildCliArgs(cli, task, choice = {}) {
9949
10139
  const spec = SPAWN_TABLE[cli];
9950
10140
  if (!spec) throw new Error(`No spawn entry for "${cli}".`);
9951
- return spec.interactive(spec.interactivePrompt && task !== void 0 ? safePrompt(task) : void 0);
10141
+ return [...spec.modelArgs?.(choice) ?? [], ...spec.interactive(spec.interactivePrompt && task !== void 0 ? safePrompt(task) : void 0)];
9952
10142
  }
9953
10143
  const NO_TERMINAL_FIX = "Run the session in the background (drop --window), or start the CLI yourself.";
9954
10144
  /** Linux terminals, in the order tried. Each says how to run a program in a directory. */
@@ -10207,7 +10397,12 @@ async function spawnSession(deps, req) {
10207
10397
  }))];
10208
10398
  const repo = await detectRepo(cwd, { exists: deps.repoExists });
10209
10399
  const name = req.name !== void 0 ? validateRename(newSessionId(), req.name, named) : generateSessionName(kind.data, repo.basename, named);
10210
- const plan = planProgram(program, window ? buildCliArgs(cli, task) : [...acpRun?.args ?? [], ...spec.acp?.args ?? []], {
10400
+ const chosen = resolveWorkerModel({
10401
+ model: req.model,
10402
+ effort: req.effort
10403
+ }, deps.workerModels?.()?.[cli]);
10404
+ if (window && [chosen.model, chosen.effort].some((v) => v?.startsWith("-"))) throw new SpawnError("A model or effort name cannot start with a dash in a window, the CLI would read it as a flag.");
10405
+ const plan = planProgram(program, window ? buildCliArgs(cli, task, chosen) : [...acpRun?.args ?? [], ...spec.acp?.args ?? []], {
10211
10406
  platform: deps.platform,
10212
10407
  env: deps.env
10213
10408
  });
@@ -10257,6 +10452,9 @@ async function spawnSession(deps, req) {
10257
10452
  },
10258
10453
  unanswered: deps.workerUnanswered?.() === "allow" ? "allow" : "deny",
10259
10454
  askTimeoutMs: (deps.workerAskTimeoutSec?.() ?? 120) * 1e3,
10455
+ ...chosen.model ? { model: chosen.model } : {},
10456
+ ...chosen.effort ? { effort: chosen.effort } : {},
10457
+ modelMenuPath: dataPaths(deps.platform, deps.dataDir).workerModels,
10260
10458
  ...acpRun?.source.startsWith("npx:") ? { setupTimeoutMs: NPX_SETUP_TIMEOUT_MS } : {}
10261
10459
  });
10262
10460
  run = await deps.launchBackground({
@@ -10384,4 +10582,4 @@ async function waitForRegistration(deps, w) {
10384
10582
  await deps.sleep(250);
10385
10583
  }
10386
10584
  }
10387
- export { formatContinuation as $, sanitizeLine as $n, resolveRecipient as $t, claimOrchestrator as A, MessageId as An, pendingHookContext as At, dataDir as B, defaultSocketPath as Bn, readAccountTokens as Bt, askedKey as C, CLI_KINDS as Cn, oneWindowPerHost as Ct, autoLimitsFromEnv as D, EVENT_NOTIFICATION_METHOD as Dn, parsePs1ShimTarget as Dt, autoCandidates as E, EVENT_NAMES as En, parseCmdShimTarget as Et, compatStatus as F, RpcResponse as Fn, planProgram as Ft, dropFromList as G, makeEventNotification as Gn, readSettings as Gt, decideAutoContinue as H, ipcMethods as Hn, readCommandLine as Ht, completeLogin as I, SESSION_ENDED_TEXT as In, planSpawn as It, endTurnContinuation as J, newMessageId as Jn, renderBody as Jt, editJson as K, makeResult as Kn, readSpawnRecord as Kt, createWmiWalker as L, SESSION_NAME_PATTERN as Ln, pollDeviceCode as Lt, clearOrchestrator as M, PROTOCOL_VERSION as Mn, pidAlive as Mt, clientProof as N, RelayPayload as Nn, pinnedAdapter as Nt, baseName as O, EventPayload as On, parseWorkerAccess as Ot, compareVersions as P, RpcErrorCode as Pn, planLauncher as Pt, findOnPath as Q, safeParse as Qn, resolveAcpProgram as Qt, currentAccessToken as R, SessionId as Rn, proofsMatch as Rt, appendHookLog as S, writeSettings as Sn, newAuthNonce as St, attachAcpSession as T, DeviceId as Tn, parseCliVersion as Tt, defaultProcessIo as U, isSocketPathTooLong as Un, readInbox as Ut, dataPaths as V, encodeFrame as Vn, readAncestry as Vt, detectRepo as W, makeError as Wn, readProcessList as Wt, existedBefore as X, parseIpcRequest as Xn, requeueEntries as Xt, evaluateLiveness as Y, newSessionId as Yn, requestDeviceCode as Yt, fetchAccountStatus as Z, parseRelayFrame as Zn, requeueMessages as Zt, ackEntries as _, waitForWork as _n, leadLogPath as _t, FROM_USER_NOTICE as a, spawnRecordPath as an, literal as ar, hookLogPath as at, adapterNpxCommand as b, workerAskTimeoutOf as bn, markDelivered as bt, ORCHESTRATOR_TASK_NOTICE as c, statusAfterLiveness as cn, string as cr, isAntigravityApp as ct, SPAWN_TABLE as d, takeWithinChars as dn, isOnline as dt, resolveWindowsCommand as en, socketPathTooLongMessage as er, formatHookContext as et, SpawnError as f, tooManyUnreadMessage as fn, jwtClaim as ft, accessAllows as g, validateRename as gn, leadLogLine as gt, WORKER_UNANSWERED as h, updateSpawnRecord as hn, launcherText as ht, ConvenoError as i, senderOf as in, discriminatedUnion as ir, hookLogLine as it, claimSpawnRecord as j, OWNER_SESSION_ID as jn, pendingTurn as jt, bindAccountDevice as k, Message as kn, pendingForInjection as kt, RESPONSE_BUDGET_BYTES as l, takeAcpLaunchFile as ln, isFromOwner as lt, WORKER_ASK_TIMEOUT_CHOICES as m, uninstallLauncher as mn, launcherPath as mt, AccountError as n, runWaker as nn, array as nr, generateSessionName as nt, HEARTBEAT_INTERVAL_MS as o, spawnSession as on, number as or, hostAlive as ot, WORKER_ACCESS as p, turnHops as pn, late as pt, effectiveHolder as q, newDeviceId as qn, realSpawnDeps as qt, CLAUDE_PENDING_TURN_FOLDER as r, sameJson as rn, boolean as rr, holderAfterDeparture as rt, NOT_FROM_USER_NOTICE as s, startTurnContext as sn, object as sr, hostPidOf as st, ACCOUNT_API as t, runLaunchFile as tn, _enum as tr, formatInbox as tt, SPAWN_CLIS as u, takeWithinBytes as un, isObject as ut, acpOverrideVar as v, waitForWorkBatch as vn, loadJson as vt, askedMarker as w, CliKind as wn, ownSession as wt, agentCommand as x, workerUnansweredOf as xn, needsQuoting as xt, adapterInstallCommand as y, workerAccessOf as yn, logoutAccount as yt, daemonProof as z, createLineDecoder as zn, putInList as zt };
10585
+ export { fetchAccountStatus as $, makeEventNotification as $n, realSpawnDeps as $t, bindAccountDevice as A, writeSettings as An, parseCliVersion as At, currentAccessToken as B, PROTOCOL_VERSION as Bn, planProgram as Bt, appendHookLog as C, validateRename as Cn, markDelivered as Ct, autoCandidates as D, workerAskTimeoutOf as Dn, newAuthNonce as Dt, attachAcpSession as E, workerAccessOf as En, needsQuoting as Et, clientProof as F, EVENT_NOTIFICATION_METHOD as Fn, pendingHookContext as Ft, defaultProcessIo as G, SESSION_NAME_PATTERN as Gn, readAccountTokens as Gt, dataDir as H, RpcErrorCode as Hn, pollDeviceCode as Ht, compareVersions as I, EventPayload as In, pendingTurn as It, editJson as J, defaultSocketPath as Jn, readInbox as Jt, detectRepo as K, SessionId as Kn, readAncestry as Kt, compatStatus as L, Message as Ln, pidAlive as Lt, claimSpawnRecord as M, CliKind as Mn, parsePs1ShimTarget as Mt, cleanModelName as N, DeviceId as Nn, parseWorkerAccess as Nt, autoLimitsFromEnv as O, workerUnansweredOf as On, oneWindowPerHost as Ot, clearOrchestrator as P, EVENT_NAMES as Pn, pendingForInjection as Pt, existedBefore as Q, makeError as Qn, readSpawnRecord as Qt, completeLogin as R, MessageId as Rn, pinnedAdapter as Rt, agentCommand as S, updateSpawnRecord as Sn, logoutAccount as St, askedMarker as T, waitForWorkBatch as Tn, modelLabel as Tt, dataPaths as U, RpcResponse as Un, proofsMatch as Ut, daemonProof as V, RelayPayload as Vn, planSpawn as Vt, decideAutoContinue as W, SESSION_ENDED_TEXT as Wn, putInList as Wt, endTurnContinuation as X, ipcMethods as Xn, readProcessList as Xt, effectiveHolder as Y, encodeFrame as Yn, readModelMenus as Yt, evaluateLiveness as Z, isSocketPathTooLong as Zn, readSettings as Zt, accessAllows as _, takeWithinBytes as _n, launcherPath as _t, FROM_USER_NOTICE as a, resolveRecipient as an, parseRelayFrame as ar, generateSessionName as at, adapterInstallCommand as b, turnHops as bn, leadLogPath as bt, NPX_SETUP_TIMEOUT_MS as c, runWaker as cn, socketPathTooLongMessage as cr, hookLogPath as ct, SPAWN_CLIS as d, spawnRecordOfSession as dn, boolean as dr, isAntigravityApp as dt, renderBody as en, makeResult as er, findModelOption as et, SPAWN_TABLE as f, spawnRecordPath as fn, discriminatedUnion as fr, isFromOwner as ft, WORKER_UNANSWERED as g, takeAcpLaunchFile as gn, string as gr, late as gt, WORKER_ASK_TIMEOUT_CHOICES as h, statusAfterLiveness as hn, object as hr, jwtClaim as ht, ConvenoError as i, resolveAcpProgram as in, parseIpcRequest as ir, formatInbox as it, claimOrchestrator as j, CLI_KINDS as jn, parseCmdShimTarget as jt, baseName as k, writeModelMenu as kn, ownSession as kt, ORCHESTRATOR_TASK_NOTICE as l, sameJson as ln, _enum as lr, hostAlive as lt, WORKER_ACCESS as m, startTurnContext as mn, number as mr, isOnline as mt, AccountError as n, requeueEntries as nn, newMessageId as nr, formatContinuation as nt, HEARTBEAT_INTERVAL_MS as o, resolveWindowsCommand as on, safeParse as or, holderAfterDeparture as ot, SpawnError as p, spawnSession as pn, literal as pr, isObject as pt, dropFromList as q, createLineDecoder as qn, readCommandLine as qt, CLAUDE_PENDING_TURN_FOLDER as r, requeueMessages as rn, newSessionId as rr, formatHookContext as rt, NOT_FROM_USER_NOTICE as s, runLaunchFile as sn, sanitizeLine as sr, hookLogLine as st, ACCOUNT_API as t, requestDeviceCode as tn, newDeviceId as tr, findOnPath as tt, RESPONSE_BUDGET_BYTES as u, senderOf as un, array as ur, hostPidOf as ut, ackEntries as v, takeWithinChars as vn, launcherText as vt, askedKey as w, waitForWork as wn, menuFromConfigOptions as wt, adapterNpxCommand as x, uninstallLauncher as xn, loadJson as xt, acpOverrideVar as y, tooManyUnreadMessage as yn, leadLogLine as yt, createWmiWalker as z, OWNER_SESSION_ID as zn, planLauncher as zt };
@@ -2,7 +2,7 @@ import { execFile, spawn } from "node:child_process";
2
2
  import { readFileSync, statSync } from "node:fs";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
- import { At as pendingHookContext, Ft as planProgram, It as planSpawn, J as endTurnContinuation, Q as findOnPath, Tt as parseCliVersion, sn as startTurnContext, wt as ownSession } from "./dist-ZL7d4_97.js";
5
+ import { At as parseCliVersion, Bt as planProgram, Ft as pendingHookContext, Vt as planSpawn, X as endTurnContinuation, kt as ownSession, mn as startTurnContext, tt as findOnPath } from "./dist-DnWOZkAu.js";
6
6
  import { n as cs, t as Za } from "./toml-patch-DGzVRdd1.js";
7
7
  // ../adapters/codex/dist/index.js
8
8
  const SERVER_NAME = "conveno";
@@ -1,6 +1,6 @@
1
1
  import { readFile, readdir } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
- import { At as pendingHookContext, B as dataDir, G as dropFromList, J as endTurnContinuation, K as editJson, P as compareVersions, Pt as planLauncher, Tt as parseCliVersion, X as existedBefore, mn as uninstallLauncher, pt as late, rn as sameJson, ut as isObject, vt as loadJson, w as askedMarker, wt as ownSession, x as agentCommand, xt as needsQuoting } from "./dist-ZL7d4_97.js";
3
+ import { At as parseCliVersion, Et as needsQuoting, Ft as pendingHookContext, H as dataDir, I as compareVersions, J as editJson, Q as existedBefore, S as agentCommand, T as askedMarker, X as endTurnContinuation, gt as late, kt as ownSession, ln as sameJson, pt as isObject, q as dropFromList, xn as uninstallLauncher, xt as loadJson, zt as planLauncher } from "./dist-DnWOZkAu.js";
4
4
  // ../adapters/antigravity/dist/index.js
5
5
  const SERVER_NAME = "conveno";
6
6
  /** The name of our entry in hooks.json. Antigravity keys hooks by an arbitrary name. */
@@ -2,7 +2,7 @@ import { randomBytes as randomBytes$1 } from "@noble/ciphers/utils.js";
2
2
  import { equalBytes } from "@noble/curves/utils.js";
3
3
  import { sha256 } from "@noble/hashes/sha2.js";
4
4
  import { bytesToHex, concatBytes, utf8ToBytes } from "@noble/hashes/utils.js";
5
- import { Tn as DeviceId, ar as literal, cr as string, ir as discriminatedUnion, nr as array, or as number, sr as object, tr as _enum } from "./dist-ZL7d4_97.js";
5
+ import { Nn as DeviceId, fr as discriminatedUnion, gr as string, hr as object, lr as _enum, mr as number, pr as literal, ur as array } from "./dist-DnWOZkAu.js";
6
6
  import { ed25519, x25519 } from "@noble/curves/ed25519.js";
7
7
  import { chacha20poly1305 } from "@noble/ciphers/chacha.js";
8
8
  import { expand, extract } from "@noble/hashes/hkdf.js";
@@ -1,5 +1,5 @@
1
1
  import { appendFileSync } from "node:fs";
2
- import { S as appendHookLog, it as hookLogLine } from "./dist-ZL7d4_97.js";
2
+ import { C as appendHookLog, st as hookLogLine } from "./dist-DnWOZkAu.js";
3
3
  import { n as connectOpts } from "./ctx-tYftvhz_.js";
4
4
  // src/hook.ts
5
5
  /**
@@ -1,13 +1,13 @@
1
1
  import { homedir } from "node:os";
2
- import { n as antigravityAdapter } from "./dist-Bv1bmmme.js";
2
+ import { n as antigravityAdapter } from "./dist-XoKXwG-y.js";
3
3
  import { isAbsolute, join } from "node:path";
4
- import { At as pendingHookContext, B as dataDir, Gt as readSettings, J as endTurnContinuation, Tt as parseCliVersion, V as dataPaths, Vt as readAncestry, Zt as requeueMessages, _n as waitForWork, at as hookLogPath, jt as pendingTurn, ot as hostAlive, r as CLAUDE_PENDING_TURN_FOLDER, sn as startTurnContext, vn as waitForWorkBatch, wt as ownSession } from "./dist-ZL7d4_97.js";
4
+ import { At as parseCliVersion, Ft as pendingHookContext, H as dataDir, It as pendingTurn, Kt as readAncestry, Tn as waitForWorkBatch, U as dataPaths, X as endTurnContinuation, Zt as readSettings, ct as hookLogPath, kt as ownSession, lt as hostAlive, mn as startTurnContext, r as CLAUDE_PENDING_TURN_FOLDER, rn as requeueMessages, wn as waitForWork } from "./dist-DnWOZkAu.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-DDzIkwf9.js";
8
- import { t as grokAdapter } from "./dist-C4KljaIP.js";
9
- import { n as connect } from "./dist-C59LTq60.js";
10
- import { t as runHook } from "./hook-BFZTvd7M.js";
7
+ import { t as codexAdapter } from "./dist-X1bpJWck.js";
8
+ import { t as grokAdapter } from "./dist-BqfYxlVP.js";
9
+ import { n as connect } from "./dist-Ch3ohbIk.js";
10
+ import { t as runHook } from "./hook-DHMu72Vf.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. */
@@ -0,0 +1 @@
1
+ export { i as runHookEntry } from "./hook-entry-CLAuy_HJ.js";
@@ -1,13 +1,13 @@
1
- import { Cn as CLI_KINDS, Ot as parseWorkerAccess, V as dataPaths, d as SPAWN_TABLE, f as SpawnError, on as spawnSession, p as WORKER_ACCESS, qt as realSpawnDeps, tn as runLaunchFile, u as SPAWN_CLIS } from "./dist-ZL7d4_97.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-DK25hyWX.js";
3
- import { a as parseFlags, i as commandHelp, n as COMMANDS, r as COMMAND_NAMES, t as ALL_COMMAND_NAMES } from "./args-CpAvszNY.js";
4
- import { t as daemonProblem } from "./daemonError-Bj22X-4V.js";
1
+ import { $t as realSpawnDeps, N as cleanModelName, Nt as parseWorkerAccess, U as dataPaths, d as SPAWN_CLIS, f as SPAWN_TABLE, jn as CLI_KINDS, m as WORKER_ACCESS, p as SpawnError, pn as spawnSession, sn as runLaunchFile } from "./dist-DnWOZkAu.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-jwneyeJm.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-DUP5zkiR.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-BFZTvd7M.js";
8
+ import { t as runHook } from "./hook-DHMu72Vf.js";
9
9
  import { n as connectOpts, t as adapterEnv } from "./ctx-tYftvhz_.js";
10
- import { t as findSession } from "./pick-DaCRjuyz.js";
10
+ import { t as findSession } from "./pick-UDFASnAn.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. */
@@ -297,6 +297,23 @@ async function runSpawn(ctx, argv) {
297
297
  exit: 2,
298
298
  ref: "e_usage"
299
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
+ });
300
317
  const window = parsed.values.window === true;
301
318
  const yes = parsed.values.yes === true;
302
319
  const adapter = ctx.adapters.find((a) => a.cli === cli);
@@ -352,6 +369,8 @@ async function runSpawn(ctx, argv) {
352
369
  task,
353
370
  window,
354
371
  access,
372
+ model,
373
+ effort,
355
374
  confineToHome: false,
356
375
  onProgress: (line) => ctx.err(`${t.paint("quiet", line)}\n`)
357
376
  });
@@ -443,7 +462,7 @@ function renderSessions(ctx, sessions) {
443
462
  const tags = [...s.isOrchestrator ? [t.paint("entry", "lead")] : [], ...s.spawned || s.spawnedBy ? [q("spawned")] : []];
444
463
  return [
445
464
  `${st.glyph} ${t.bold(s.name)}${tags.length > 0 ? ` ${tags.join(" ")}` : ""}`,
446
- s.variant === "app" ? "Antigravity app" : 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}`) : ""),
447
466
  st.word,
448
467
  ...waiting ? [s.unreadCount ? String(s.unreadCount) : q("none")] : [],
449
468
  ...doing ? [s.statusText ?? ""] : []
@@ -585,11 +604,11 @@ async function dispatch(name, rest, ctx) {
585
604
  case "rename": return runRename(ctx, rest);
586
605
  case "lead": return runLead(ctx, rest);
587
606
  case "spawn": return runSpawn(ctx, rest);
588
- case "acp-host": return (await import("./acp-DZf0zyNC.js")).runAcpHostCmd(ctx, rest);
589
- case "stop": return (await import("./acp-DZf0zyNC.js")).runStop(ctx, rest);
607
+ case "acp-host": return (await import("./acp-BtwJHwcr.js")).runAcpHostCmd(ctx, rest);
608
+ case "stop": return (await import("./acp-BtwJHwcr.js")).runStop(ctx, rest);
590
609
  case "spawn-run": return runSpawnRun(ctx, rest);
591
- case "agy-relay": return (await import("./agy-relay-DSRJtMz3.js")).runAgyRelay(ctx, rest);
592
- case "watch": return (await import("./watch-De3wbdQL.js")).runWatch(ctx, rest);
610
+ case "agy-relay": return (await import("./agy-relay-KS1DbLqD.js")).runAgyRelay(ctx, rest);
611
+ case "watch": return (await import("./watch-Cpp4Uwsd.js")).runWatch(ctx, rest);
593
612
  case "devices": return runDevices(ctx, rest);
594
613
  case "relay": return runRelay(ctx, rest);
595
614
  case "doctor": return runDoctor(ctx, rest);
@@ -628,7 +647,7 @@ function opensApp(env, tty = {
628
647
  async function main(argv, ctx) {
629
648
  const [command, ...rest] = argv;
630
649
  if (command === void 0 && opensApp(ctx.env)) try {
631
- return await (await import("./run-CKiYjNqx.js")).runTui(ctx);
650
+ return await (await import("./run-B-UMVEQs.js")).runTui(ctx);
632
651
  } catch (e) {
633
652
  ctx.err(`The app could not start (${rawMessage(e)}). Showing the help instead.\n`);
634
653
  ctx.out(helpText(ctx));
@@ -1,4 +1,4 @@
1
- import { Rn as SessionId } from "./dist-ZL7d4_97.js";
1
+ import { Kn as SessionId } from "./dist-DnWOZkAu.js";
2
2
  // src/pick.ts
3
3
  /** The online session a name or id means, or undefined when nothing matches. */
4
4
  async function findSession(client, text) {