skydive-cli 0.5.0-beta.2 → 0.5.0-beta.21

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/CHANGELOG.md CHANGED
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
+ - First run in a workspace with no agents now sets you up automatically: instead of dropping you on an empty agent picker, `skydive` creates your first agent for you (with a suggested name and avatar, mirroring the web onboarding flow) and then offers to have it learn how you already work — reading the other coding agents set up on your machine (Claude Code, Cursor, Codex, and more), the same import that `skydive import` runs, with a plan shown first and credentials never copied. Decline and you go straight into the new agent's chat. You can replay this flow anytime with `skydive --onboarding` (or `SKYDIVE_FORCE_ONBOARDING=1`), even in a workspace that already has agents.
13
+ - `/computer` (alias `/stats`) in the chat TUI — a snapshot of the agent's sandbox drawn as colored bar graphs: CPU load (scaled to core count), memory, swap (when present), and disk usage, plus uptime and process count. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The card keeps itself current quietly (a slow background refresh, no flicker or "updating" chrome); only the most recent card refreshes, and it silently stops while you're scrolled up (no wasted polls on a card you're not looking at) and resumes at the bottom. Stats are read over the same relay `skydive sandbox` uses, so it's gated on EDIT access to the agent like the other sandbox commands.
12
14
  - `skydive fs` — a namespace for working with the files on an agent's computer (its sandbox) from your own machine. Its first subcommand, `skydive fs edit <path>`, reads a remote file down over the same relay `skydive sandbox` uses, opens it in your local editor (`$VISUAL`/`$EDITOR`, override with `--editor`, defaults to `vi`), and writes your changes back atomically when you save and close — so you can edit a remote file as if it were local without opening the chat TUI. A path that doesn't exist yet is created on save; no changes means nothing is written. Access is gated on EDIT permission for the agent, exactly like `skydive sandbox`. (A first-class `fs` relay channel and `skydive fs mount` land in follow-ups.)
13
15
 
14
16
  ## [0.4.0] - 2026-08-07
package/README.md CHANGED
@@ -261,6 +261,16 @@ internal API. On launch it walks you through:
261
261
  formatting, collapsed reasoning, and rich rendering of tool calls
262
262
  (`bash`, `edit`/`write` diffs, `read`, `grep`/`glob`).
263
263
 
264
+ The chat TUI remembers the last agent you talked to: every conversation it
265
+ opens records that agent as your default, and the next bare `skydive chat`
266
+ drops straight into a new conversation with it — no picker. An explicit
267
+ `--agent` or `--resume` still wins for that invocation, and the conversation
268
+ it opens sets the default like any other. You can also seed or override the
269
+ default by hand with `skydive config set defaultAgent <id|slug|name>`. A
270
+ stored value that no longer matches (renamed or archived agent) falls back
271
+ to the agent picker with a notice, and picking an agent there heals it
272
+ automatically.
273
+
264
274
  You can change conversation without leaving chat. `/conversation` (aliases
265
275
  `/conversations`, `/conv`) reopens the conversation list, and
266
276
  `/conversation <id>` — an id, its `/c/<id>` link, or a pasted
@@ -463,10 +473,11 @@ skydive config path # print the config.json location
463
473
 
464
474
  Editable keys:
465
475
 
466
- | Key | Type | Effect |
467
- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
468
- | `shareMachineDefault` | boolean | When `true`, `skydive chat` (TUI and `-p`) shares this machine over the portal on launch, as if `--share-machine` were passed. An explicit `--share-machine`/`--no-share-machine` overrides it per invocation. Default `false`. |
469
- | `updateCheck` | boolean | When `false`, disables the daily background update check and its "Update available" notice. The persistent equivalent of setting `SKYDIVE_NO_UPDATE_CHECK` (or `NO_UPDATE_NOTIFIER`) in the environment. Default `true`. |
476
+ | Key | Type | Effect |
477
+ | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
478
+ | `shareMachineDefault` | boolean | When `true`, `skydive chat` (TUI and `-p`) shares this machine over the portal on launch, as if `--share-machine` were passed. An explicit `--share-machine`/`--no-share-machine` overrides it per invocation. Default `false`. |
479
+ | `updateCheck` | boolean | When `false`, disables the daily background update check and its "Update available" notice. The persistent equivalent of setting `SKYDIVE_NO_UPDATE_CHECK` (or `NO_UPDATE_NOTIFIER`) in the environment. Default `true`. |
480
+ | `defaultAgent` | string | Agent (id, slug, or name) a bare `skydive chat` opens a new conversation with, skipping the agent picker. Maintained automatically: every conversation the chat TUI opens records its agent here (last used wins). `skydive config set defaultAgent` seeds or overrides it; an explicit `--agent`/`--resume` wins per invocation; a value that no longer matches falls back to the picker. |
470
481
 
471
482
  The remaining keys (`apiKey`, `apiUrl`, `sessionToken`, `appUrl`, `themeDark`,
472
483
  `themeLight`, …) are credentials or flow-managed state — leave them to the
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
+ import { z } from "zod";
4
+
5
+ //#region ../portal-daemon/src/api.ts
6
+ /**
7
+ * The portal's session-authed REST surface, shared by `PortalClient` (the
8
+ * TUI/`portal open` connection) and the `skydive portal` management
9
+ * commands, so the endpoint contracts and response schemas live in exactly
10
+ * one place.
11
+ */
12
+ const deviceSchema = z.object({
13
+ id: z.string(),
14
+ machineName: z.string(),
15
+ friendlyName: z.string(),
16
+ connected: z.boolean(),
17
+ lastSeen: z.string().nullable(),
18
+ grantedAgentIds: z.array(z.string())
19
+ });
20
+ const devicesResponseSchema = z.object({
21
+ devices: z.array(deviceSchema),
22
+ agents: z.array(z.object({
23
+ id: z.string(),
24
+ name: z.string()
25
+ }))
26
+ });
27
+ const deviceTokenSchema = z.object({ token: z.string().min(1) });
28
+ async function portalFetch(auth, path, init) {
29
+ const res = await fetch(`${auth.appUrl}${path}`, {
30
+ method: init.method,
31
+ headers: {
32
+ authorization: `Bearer ${auth.sessionToken}`,
33
+ accept: "application/json",
34
+ ...init.body ? { "content-type": "application/json" } : {}
35
+ },
36
+ ...init.body ? { body: init.body } : {}
37
+ });
38
+ if (!res.ok) {
39
+ const body = await res.text().catch(() => "");
40
+ throw new HttpError(res.status, body);
41
+ }
42
+ return res.json();
43
+ }
44
+ async function fetchPortalDevices(auth) {
45
+ const json = await portalFetch(auth, "/api/v1/portal/devices", { method: "GET" });
46
+ return devicesResponseSchema.parse(json);
47
+ }
48
+ const registerResponseSchema = z.object({ device: z.object({ id: z.string() }) });
49
+ /**
50
+ * Register this machine's device row without connecting. Connecting registers
51
+ * as a side effect; this covers granting an agent on a machine that has never
52
+ * shared yet (the grant references the device row).
53
+ */
54
+ async function registerPortalDevice(auth, { machineName, friendlyName }) {
55
+ const json = await portalFetch(auth, "/api/v1/portal/devices", {
56
+ method: "POST",
57
+ body: JSON.stringify({
58
+ machineName,
59
+ friendlyName
60
+ })
61
+ });
62
+ return registerResponseSchema.parse(json).device;
63
+ }
64
+ /** Short-lived token the machine presents when dialing the portal WebSocket. */
65
+ async function mintPortalDeviceToken(auth) {
66
+ const json = await portalFetch(auth, "/api/v1/portal/device-token", { method: "POST" });
67
+ return deviceTokenSchema.parse(json).token;
68
+ }
69
+ const forwardTargetSchema = z.object({
70
+ daemonOrigin: z.string().min(1),
71
+ token: z.string().min(1),
72
+ expiresInSeconds: z.number()
73
+ });
74
+ /**
75
+ * Everything `portal forward` needs to dial an agent's sandbox daemon through
76
+ * the agent-webserver edge Worker: the daemon's stable public origin and a
77
+ * daemon auth token (canUse-gated server-side).
78
+ */
79
+ async function fetchForwardTarget(auth, agentId) {
80
+ const json = await portalFetch(auth, "/api/v1/portal/forward-target", {
81
+ method: "POST",
82
+ body: JSON.stringify({ agentId })
83
+ });
84
+ return forwardTargetSchema.parse(json);
85
+ }
86
+ async function grantPortalAccess(auth, { deviceId, agentId, conversationId }) {
87
+ await portalFetch(auth, `/api/v1/portal/devices/${encodeURIComponent(deviceId)}/grants`, {
88
+ method: "POST",
89
+ body: JSON.stringify({
90
+ agentId,
91
+ conversationId
92
+ })
93
+ });
94
+ }
95
+ async function revokePortalAccess(auth, { deviceId, agentId }) {
96
+ await portalFetch(auth, `/api/v1/portal/devices/${encodeURIComponent(deviceId)}/grants/${encodeURIComponent(agentId)}`, { method: "DELETE" });
97
+ }
98
+ /**
99
+ * The device row for a given machine identity. Matching is by `machineName`
100
+ * equality — the stable handle the machine registers under, not the display
101
+ * label.
102
+ */
103
+ function findThisDevice(devices, machineName) {
104
+ return devices.find((device) => device.machineName === machineName) ?? null;
105
+ }
106
+ /**
107
+ * One-time grant migration onto the merged device. Earlier CLI builds
108
+ * registered a separate `<machineName>-cli` device, so a user's existing
109
+ * approvals hang off that row; the merged device would start with zero grants
110
+ * and every already-authorized agent would ask again. Copy any grant the
111
+ * merged device is missing (the grant endpoint upserts, so re-runs are
112
+ * no-ops). The legacy row is left in place — an old CLI build may still
113
+ * connect under it. Returns how many grants were copied.
114
+ */
115
+ async function unifyLegacyCliGrants(auth, machineName) {
116
+ const { devices } = await fetchPortalDevices(auth);
117
+ const merged = findThisDevice(devices, machineName);
118
+ const legacy = findThisDevice(devices, `${machineName}-cli`);
119
+ if (!merged || !legacy) return 0;
120
+ const have = new Set(merged.grantedAgentIds);
121
+ const missing = legacy.grantedAgentIds.filter((id) => !have.has(id));
122
+ for (const agentId of missing) await grantPortalAccess(auth, {
123
+ deviceId: merged.id,
124
+ agentId,
125
+ conversationId: null
126
+ });
127
+ return missing.length;
128
+ }
129
+
130
+ //#endregion
131
+ export { mintPortalDeviceToken as a, unifyLegacyCliGrants as c, grantPortalAccess as i, fetchPortalDevices as n, registerPortalDevice as o, findThisDevice as r, revokePortalAccess as s, fetchForwardTarget as t };
package/dist/js/bin.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-y43HVmq7.mjs";
3
- import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-CbayCa87.mjs";
2
+ import { A as setActiveWorkspace, D as getActiveWorkspaceId, E as ensureActiveOrganization, M as version, O as getSessionIdentity, S as themes, T as machineOsFromPlatform, a as installCrashHandler, j as name, k as listWorkspaces, t as maybeStartProfiling, u as brandHelpArt, w as buildImportSeedPrompt } from "./profiler-Bl25cyUp.mjs";
3
+ import { A as getStoredApiKeyId, B as saveConfig, C as getDefaultAgent, E as getPromptHistoryPath, F as resolveChatAuth, I as resolveConfig, L as resolveManagementAuth, M as getUpdateCheckDisabled, P as resolveAppUrl, R as resolveSession, S as getConfigPath, T as getPreference, U as setLastSeenVersion, V as saveSession, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getStoredApiKeyWorkspaceName, k as getShareMachineDefault, v as DEFAULT_API_URL, w as getLastSeenVersion, x as deleteConfig } from "./print-OvYyj6Uk.mjs";
4
4
  import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
5
5
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
6
- import { t as createRestClient } from "./rest-BY2nADw5.mjs";
6
+ import { t as createRestClient } from "./rest-Dx6b-Nq_.mjs";
7
7
  import "./billing-blocked-2wju4gC_.mjs";
8
- import { a as registerPortalDevice, c as resolveMachineIdentity, i as grantPortalAccess, n as fetchPortalDevices, o as revokePortalAccess, r as findThisDevice } from "./client-Dd5sMXPv.mjs";
9
- import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-Bq93vOIk.mjs";
10
- import { t as SandboxStream } from "./client-Cn2af31H.mjs";
8
+ import { r as resolveMachineIdentity } from "./client-DbqRBquD.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-Dj9tGT12.mjs";
10
+ import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-DG5W6iwx.mjs";
11
+ import { t as SandboxStream } from "./client-c4c5MmgN.mjs";
11
12
  import { hideBin } from "yargs/helpers";
12
13
  import yargs from "yargs";
13
14
  import os, { hostname, tmpdir } from "node:os";
@@ -1462,19 +1463,6 @@ function ensureBunAndReexec(onProgress) {
1462
1463
 
1463
1464
  //#endregion
1464
1465
  //#region src/commands/import.ts
1465
- /**
1466
- * The first message of the import conversation, sent as the user. It hands
1467
- * the real work to the agent's `import-config` skill; this text only needs
1468
- * to establish intent, anchor the starting directory, and set the two
1469
- * expectations the user cares about most (plan first, no credentials).
1470
- */
1471
- function buildImportSeedPrompt(projectDir) {
1472
- return [
1473
- "I'm migrating from another coding agent. Import my setup from this machine.",
1474
- "",
1475
- `Use your import-config skill. I ran this from \`${projectDir}\`, so start there and in my home directory. Don't assume one tool — do the discovery sweep so you catch whatever I actually use (Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, Cline, OpenCode, Aider, and any nested AGENTS.md). Show me the plan first: everything you found, what you'll bring over, where it lands in you, and anything you're leaving out (credentials especially). Then wait for my OK before committing anything.`
1476
- ].join("\n");
1477
- }
1478
1466
  const importCommand = {
1479
1467
  command: "import",
1480
1468
  describe: "Import your existing coding-agent setup (Claude Code, Cursor, Codex, Gemini, Copilot, and more) into an agent (opens a machine-shared chat)",
@@ -1516,7 +1504,7 @@ const importCommand = {
1516
1504
  process.exit(1);
1517
1505
  }
1518
1506
  }
1519
- const { runChat } = await import("./boot-DFYFjlht.mjs");
1507
+ const { runChat } = await import("./boot-DcQhJadu.mjs");
1520
1508
  await runChat({
1521
1509
  appUrl,
1522
1510
  sessionToken: session.value.sessionToken,
@@ -1526,7 +1514,9 @@ const importCommand = {
1526
1514
  agentSelector: argv.agent ?? null,
1527
1515
  conversationId: null,
1528
1516
  newConversation: false,
1529
- seedPrompt: buildImportSeedPrompt(process.cwd())
1517
+ defaultAgentSelector: getDefaultAgent(),
1518
+ forceOnboarding: false,
1519
+ seedPrompt: buildImportSeedPrompt(process.cwd(), machineOsFromPlatform(process.platform))
1530
1520
  });
1531
1521
  }
1532
1522
  };
@@ -1543,15 +1533,15 @@ async function runImportPrintMode({ argv, appUrl }) {
1543
1533
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
1544
1534
  process.exit(1);
1545
1535
  }
1546
- const { connectMachineShare } = await import("./print-share-C1LPsgTP.mjs");
1536
+ const { connectMachineShare } = await import("./print-share-BH9gvCls.mjs");
1547
1537
  const machineShare = await connectMachineShare({
1548
1538
  appUrl,
1549
1539
  sessionToken: session.value.sessionToken,
1550
1540
  timeoutHint: "Check `skydive portal status`, then re-run."
1551
1541
  });
1552
1542
  const extra = (argv.print ?? "").trim();
1553
- const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1554
- const { runPrint } = await import("./print-ba_0hiV9.mjs");
1543
+ const prompt = buildImportSeedPrompt(process.cwd(), machineOsFromPlatform(process.platform)) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1544
+ const { runPrint } = await import("./print-C8DHKrJu.mjs");
1555
1545
  try {
1556
1546
  const result = await runPrint({
1557
1547
  appUrl,
@@ -1877,6 +1867,10 @@ const chatCommand = {
1877
1867
  type: "boolean",
1878
1868
  default: false,
1879
1869
  describe: "Start a fresh conversation instead of opening the conversation list. With --agent, opens a new conversation with that agent directly. Without --agent, opens a new conversation once you pick an agent (auto-picked if the account has only one). Ignored with --resume, which always continues the named conversation."
1870
+ }).option("onboarding", {
1871
+ type: "boolean",
1872
+ default: false,
1873
+ describe: "Force the first-run onboarding flow (auto-create a first agent, then offer the machine import) even when the workspace already has agents. Also settable via SKYDIVE_FORCE_ONBOARDING=1. Handy for replaying the new-user experience; ignored with -p, --resume, or --agent."
1880
1874
  }).option("share-machine", {
1881
1875
  type: "boolean",
1882
1876
  describe: "Share this machine with the agent over the portal so it can run commands here (default-deny; in the TUI you approve per agent, with -p the flag grants the target agent for the run). Defaults to `shareMachineDefault` in the CLI config file; --no-share-machine disables for this invocation."
@@ -1928,7 +1922,7 @@ const chatCommand = {
1928
1922
  sessionToken: auth.value.token,
1929
1923
  agentSelector: argv.agent ?? null
1930
1924
  });
1931
- const { runChat } = await import("./boot-DFYFjlht.mjs");
1925
+ const { runChat } = await import("./boot-DcQhJadu.mjs");
1932
1926
  await runChat({
1933
1927
  appUrl: auth.value.appUrl,
1934
1928
  sessionToken: auth.value.token,
@@ -1940,6 +1934,8 @@ const chatCommand = {
1940
1934
  agentSelector: argv.agent ?? null,
1941
1935
  conversationId: argv.conversation ?? null,
1942
1936
  newConversation: resolveNewConversation(argv),
1937
+ forceOnboarding: resolveForceOnboarding(argv),
1938
+ defaultAgentSelector: getDefaultAgent(),
1943
1939
  seedPrompt: null
1944
1940
  });
1945
1941
  }
@@ -1961,6 +1957,20 @@ function resolveNewConversation(argv) {
1961
1957
  return argv.new === true && !argv.conversation;
1962
1958
  }
1963
1959
  /**
1960
+ * Whether to force the first-run onboarding flow: the `--onboarding` flag or
1961
+ * `SKYDIVE_FORCE_ONBOARDING` (any non-empty, non-"0"/"false" value). Lets the
1962
+ * new-user experience be replayed in a workspace that already has agents. The
1963
+ * TUI applies it only to a bare interactive launch — an explicit
1964
+ * `--agent`/`--resume`/`--new` still takes precedence.
1965
+ */
1966
+ function resolveForceOnboarding(argv, env = process.env) {
1967
+ if (argv.onboarding === true) return true;
1968
+ const raw = env["SKYDIVE_FORCE_ONBOARDING"];
1969
+ if (raw === void 0) return false;
1970
+ const value = raw.trim().toLowerCase();
1971
+ return value !== "" && value !== "0" && value !== "false";
1972
+ }
1973
+ /**
1964
1974
  * Cross-workspace `--agent <uuid>` handling shared by the TUI and -p paths:
1965
1975
  * on a hit in another workspace, switch to it and say so on stderr (stdout
1966
1976
  * may carry the -p reply/JSON envelope); when the id matches no workspace on
@@ -1995,7 +2005,7 @@ async function runPrintMode({ argv, appUrl }) {
1995
2005
  printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
1996
2006
  process.exit(1);
1997
2007
  }
1998
- const { runPrint, readStdin } = await import("./print-ba_0hiV9.mjs");
2008
+ const { runPrint, readStdin } = await import("./print-C8DHKrJu.mjs");
1999
2009
  await ensureAgentWorkspace({
2000
2010
  appUrl,
2001
2011
  sessionToken: auth.value.token,
@@ -2020,7 +2030,7 @@ async function runPrintMode({ argv, appUrl }) {
2020
2030
  process.exit(1);
2021
2031
  }
2022
2032
  } else {
2023
- const { connectMachineShare } = await import("./print-share-C1LPsgTP.mjs");
2033
+ const { connectMachineShare } = await import("./print-share-BH9gvCls.mjs");
2024
2034
  machineShare = await connectMachineShare({
2025
2035
  appUrl: auth.value.appUrl,
2026
2036
  sessionToken: auth.value.token,
@@ -2084,7 +2094,7 @@ const getCommand$1 = {
2084
2094
  printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2085
2095
  process.exit(1);
2086
2096
  }
2087
- const { messageGet } = await import("./print-ba_0hiV9.mjs");
2097
+ const { messageGet } = await import("./print-C8DHKrJu.mjs");
2088
2098
  try {
2089
2099
  const result = await messageGet({
2090
2100
  appUrl: auth.value.appUrl,
@@ -2287,7 +2297,7 @@ const switchCommand = {
2287
2297
  printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
2288
2298
  process.exit(1);
2289
2299
  }
2290
- const { runWorkspacePicker } = await import("./boot-DFYFjlht.mjs");
2300
+ const { runWorkspacePicker } = await import("./boot-DcQhJadu.mjs");
2291
2301
  await runWorkspacePicker(session);
2292
2302
  return;
2293
2303
  }
@@ -2336,7 +2346,7 @@ const workspaceCommand = {
2336
2346
  */
2337
2347
  async function resolveGrantTarget(argv) {
2338
2348
  const session = requireSession(argv);
2339
- const [{ devices, agents }, identity] = await Promise.all([fetchPortalDevices(session), resolveMachineIdentity()]);
2349
+ const [{ devices, agents }, identity] = await Promise.all([fetchPortalDevices(session), resolveMachineIdentity(null)]);
2340
2350
  return {
2341
2351
  session,
2342
2352
  agent: resolveAgent(agents, argv.agent),
@@ -2365,8 +2375,8 @@ const openCommand = {
2365
2375
  const session = requireSession(argv);
2366
2376
  const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
2367
2377
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
2368
- const { machineName } = await resolveMachineIdentity();
2369
- const { PortalDaemonClient } = await import("./daemon-client-srAit8Fz.mjs");
2378
+ const { machineName } = await resolveMachineIdentity(null);
2379
+ const { PortalDaemonClient } = await import("./daemon-client-CgpMgM8Q.mjs");
2370
2380
  let lastLine = "";
2371
2381
  let signalConnected;
2372
2382
  const connected = new Promise((resolve) => {
@@ -2395,7 +2405,7 @@ const openCommand = {
2395
2405
  client.enable();
2396
2406
  await connected;
2397
2407
  if (agent) {
2398
- await client.grantAgent(agent.id);
2408
+ await client.grantAgent(agent.id, null);
2399
2409
  console.log(`portal: granted ${agent.name} access to this machine (persists until revoked)`);
2400
2410
  }
2401
2411
  console.log(`portal: open. granted agents can run commands on ${machineName} as your user, cwd ${cwd}. ctrl+c to close.`);
@@ -2415,7 +2425,8 @@ const grantCommand = {
2415
2425
  })).id;
2416
2426
  await grantPortalAccess(session, {
2417
2427
  deviceId,
2418
- agentId: agent.id
2428
+ agentId: agent.id,
2429
+ conversationId: null
2419
2430
  });
2420
2431
  if (argv.json) {
2421
2432
  output(argv, {
@@ -2424,7 +2435,7 @@ const grantCommand = {
2424
2435
  });
2425
2436
  return;
2426
2437
  }
2427
- console.log(`Granted ${agent.name} access to ${device?.friendlyName ?? friendlyName}. The agent can run commands here whenever its portal is open. Start with \`skydive portal open\`, or pass \`--share-machine\` on a \`chat -p\` run. Revoke with \`skydive portal revoke --agent ${agent.name}\`.`);
2438
+ console.log(`Granted ${agent.name} access to ${device?.friendlyName ?? friendlyName}. The agent can run commands here whenever its portal is open. Start with \`skydive portal open\`, or pass \`--share-machine\` on a \`chat -p\` run. Revoke with \`skydive portal revoke --agent "${agent.name}"\`.`);
2428
2439
  }
2429
2440
  };
2430
2441
  const revokeCommand = {
@@ -2464,7 +2475,7 @@ const statusCommand = {
2464
2475
  console.log("No machines registered. Run `skydive portal open` to register this one.");
2465
2476
  return;
2466
2477
  }
2467
- const { headers, rows } = buildDeviceTable(devices, agents, (await resolveMachineIdentity()).machineName);
2478
+ const { headers, rows } = buildDeviceTable(devices, agents, (await resolveMachineIdentity(null)).machineName);
2468
2479
  printTable(headers, rows);
2469
2480
  }
2470
2481
  };
@@ -2592,10 +2603,45 @@ const daemonCommand = {
2592
2603
  builder: (y) => y.command(daemonStatusCommand).command(daemonStopCommand).command(daemonStartCommand).command(daemonRestartCommand).command(daemonLogsCommand).demandCommand(1, "Specify a subcommand: status, stop, start, restart, logs"),
2593
2604
  handler: () => {}
2594
2605
  };
2606
+ const forwardCommand = {
2607
+ command: "forward <port>",
2608
+ describe: "Forward localhost:<port> to the agent sandbox's port, so a dev server running in the sandbox is reachable at http://localhost:<port> (stays in the foreground; ctrl+c to stop)",
2609
+ builder: (y) => y.positional("port", {
2610
+ type: "number",
2611
+ demandOption: true,
2612
+ describe: "Sandbox port to forward to (e.g. 3000 for a dev server)"
2613
+ }).option("agent", {
2614
+ type: "string",
2615
+ describe: "Agent, by id or name (defaults when the account has one)"
2616
+ }).option("local-port", {
2617
+ type: "number",
2618
+ describe: "Local port to listen on (default: same as <port>)"
2619
+ }),
2620
+ handler: async (argv) => {
2621
+ const session = requireSession(argv);
2622
+ const agent = resolveAgent((await fetchPortalDevices(session)).agents, argv.agent ?? null);
2623
+ const targetPort = argv.port;
2624
+ const localPort = argv["local-port"] ?? targetPort;
2625
+ const { startForward } = await import("./forward-18QoL5dO.mjs");
2626
+ const listener = await startForward({
2627
+ auth: session,
2628
+ agentId: agent.id,
2629
+ localPort,
2630
+ targetPort,
2631
+ log: (msg) => console.error(msg)
2632
+ });
2633
+ console.log(`Forwarding http://localhost:${listener.port} -> ${agent.name}'s sandbox port ${targetPort}. ctrl+c to stop.`);
2634
+ await new Promise((resolve) => {
2635
+ process.once("SIGINT", () => resolve());
2636
+ process.once("SIGTERM", () => resolve());
2637
+ });
2638
+ await listener.close();
2639
+ }
2640
+ };
2595
2641
  const portalCommand = {
2596
2642
  command: "portal",
2597
2643
  describe: "Open this machine's portal to agents and manage their access",
2598
- builder: (y) => y.command(openCommand).command(grantCommand).command(revokeCommand).command(statusCommand).command(daemonCommand).demandCommand(1, "Specify a subcommand: open, grant, revoke, status, daemon"),
2644
+ builder: (y) => y.command(openCommand).command(grantCommand).command(revokeCommand).command(statusCommand).command(forwardCommand).command(daemonCommand).demandCommand(1, "Specify a subcommand: open, grant, revoke, status, forward, daemon"),
2599
2645
  handler: () => {}
2600
2646
  };
2601
2647
 
@@ -2640,8 +2686,8 @@ const sandboxCommand = {
2640
2686
  }).example("skydive sandbox --agent grace", "Live terminal (Ctrl-] detaches)").example("skydive sandbox --agent grace -- tail -n 50 /tmp/harness.log", "One-shot command (use `--` so its flags reach the sandbox)").example("skydive sandbox --agent grace -- sh -c 'ls /tmp | wc -l'", "Shell features go through an explicit `sh -c`"),
2641
2687
  handler: async (argv) => {
2642
2688
  const session = requireSession(argv);
2643
- const { createRestClient } = await import("./rest-DADJh0bi.mjs");
2644
- const { resolveAgent } = await import("./print-ba_0hiV9.mjs");
2689
+ const { createRestClient } = await import("./rest-DW05dMMc.mjs");
2690
+ const { resolveAgent } = await import("./print-C8DHKrJu.mjs");
2645
2691
  const client = createRestClient({
2646
2692
  appUrl: session.appUrl,
2647
2693
  sessionToken: session.sessionToken
@@ -2710,7 +2756,7 @@ async function runPty({ session, agentId, agentName }) {
2710
2756
  return 1;
2711
2757
  }
2712
2758
  console.error(`Connecting to ${agentName}'s sandbox… (Ctrl-] detaches)`);
2713
- const { runRawPtyPassthrough } = await import("./raw-pty-3EkG-jjH.mjs");
2759
+ const { runRawPtyPassthrough } = await import("./raw-pty-DmdUf4_w.mjs");
2714
2760
  const result = await runRawPtyPassthrough({
2715
2761
  stdin: process.stdin,
2716
2762
  stdout: process.stdout,
@@ -2798,8 +2844,8 @@ const fsEditCommand = {
2798
2844
  handler: async (argv) => {
2799
2845
  const session = requireSession(argv);
2800
2846
  const remotePath = argv.path;
2801
- const { createRestClient } = await import("./rest-DADJh0bi.mjs");
2802
- const { resolveAgent } = await import("./print-ba_0hiV9.mjs");
2847
+ const { createRestClient } = await import("./rest-DW05dMMc.mjs");
2848
+ const { resolveAgent } = await import("./print-C8DHKrJu.mjs");
2803
2849
  const client = createRestClient({
2804
2850
  appUrl: session.appUrl,
2805
2851
  sessionToken: session.sessionToken
@@ -3680,6 +3726,11 @@ function resolvePreference(key) {
3680
3726
  }
3681
3727
  return pref;
3682
3728
  }
3729
+ /** Human rendering of a preference value; unset string preferences (null)
3730
+ * print as empty rather than the string "null". */
3731
+ function formatValue(value) {
3732
+ return value === null ? "" : String(value);
3733
+ }
3683
3734
  /** One row's worth of state for a preference, used by `list` and `get`. */
3684
3735
  function snapshot(pref) {
3685
3736
  return {
@@ -3706,7 +3757,7 @@ const listCommand = {
3706
3757
  "Description"
3707
3758
  ], rows.map((r) => [
3708
3759
  r.key,
3709
- String(r.value),
3760
+ formatValue(r.value),
3710
3761
  r.source,
3711
3762
  r.describe
3712
3763
  ]));
@@ -3727,7 +3778,7 @@ const getCommand = {
3727
3778
  output(argv, snapshot(pref));
3728
3779
  return;
3729
3780
  }
3730
- console.log(String(pref.read()));
3781
+ console.log(formatValue(pref.read()));
3731
3782
  }
3732
3783
  };
3733
3784
  const setCommand = {
@@ -3745,17 +3796,16 @@ const setCommand = {
3745
3796
  }),
3746
3797
  handler: (argv) => {
3747
3798
  const pref = resolvePreference(argv.key);
3748
- const parsed = pref.parse(argv.value ?? "");
3749
- if (parsed.isErr()) {
3750
- printError(`${pref.key}: ${parsed.error}`);
3799
+ const result = pref.set(argv.value ?? "");
3800
+ if (result.isErr()) {
3801
+ printError(`${pref.key}: ${result.error}`);
3751
3802
  process.exit(1);
3752
3803
  }
3753
- pref.write(parsed.value);
3754
3804
  if (argv.json) {
3755
3805
  output(argv, snapshot(pref));
3756
3806
  return;
3757
3807
  }
3758
- if (!argv.quiet) console.log(`Set ${pref.key} = ${String(parsed.value)}`);
3808
+ if (!argv.quiet) console.log(`Set ${pref.key} = ${formatValue(pref.read())}`);
3759
3809
  }
3760
3810
  };
3761
3811
  const unsetCommand = {
@@ -3775,7 +3825,10 @@ const unsetCommand = {
3775
3825
  output(argv, snapshot(pref));
3776
3826
  return;
3777
3827
  }
3778
- if (!argv.quiet) console.log(`Unset ${pref.key} (now ${String(pref.read())} by default)`);
3828
+ if (!argv.quiet) {
3829
+ const fallback = pref.read();
3830
+ console.log(fallback === null ? `Unset ${pref.key}` : `Unset ${pref.key} (now ${formatValue(fallback)} by default)`);
3831
+ }
3779
3832
  }
3780
3833
  };
3781
3834
  const pathCommand = {
@@ -4026,7 +4079,7 @@ function setupUpdateCheck(argv) {
4026
4079
 
4027
4080
  //#endregion
4028
4081
  //#region src/changelog.generated.ts
4029
- const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Added\n\n- `skydive fs` — a namespace for working with the files on an agent's computer (its sandbox) from your own machine. Its first subcommand, `skydive fs edit <path>`, reads a remote file down over the same relay `skydive sandbox` uses, opens it in your local editor (`$VISUAL`/`$EDITOR`, override with `--editor`, defaults to `vi`), and writes your changes back atomically when you save and close — so you can edit a remote file as if it were local without opening the chat TUI. A path that doesn't exist yet is created on save; no changes means nothing is written. Access is gated on EDIT permission for the agent, exactly like `skydive sandbox`. (A first-class `fs` relay channel and `skydive fs mount` land in follow-ups.)\n\n## [0.4.0] - 2026-08-07\n\n### Added\n\n- `skydive chat` works with API key auth: an API key alone now opens the chat TUI (and headless `chat -p`) without a browser login, using the key's pinned workspace.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n- Billing-blocked sends and runs now surface the server-authored recovery\n guidance from the typed billing outcome. The chat TUI renders it as a\n warning-toned system-notice row — live when a send is refused or a run is\n stopped at the billing boundary, and again when reopening a conversation\n that holds a persisted billing notice — instead of a generic error.\n Headless `chat -p` and `messages get` print the guidance (state, recovery\n step, and manage-billing URL) on stderr, keep any partial output already\n streamed on stdout, and exit with code `5` (distinct from the generic `1`)\n so scripted callers can tell a billing pause from a failure.\n- Syntax highlighting for 14 more languages in the chat transcript and file/review panes (python, bash, go, rust, c, cpp, java, ruby, css, html, json, yaml, and more) — previously only JavaScript/TypeScript rendered colored.\n\n### Changed\n\n- `skydive agent list` lists the full agent roster by default instead of a truncated page.\n\n### Fixed\n\n- Long multi-line bash tool-call commands (e.g. heredocs) are clamped with a `+N more · click to expand` tail instead of dumping their whole body into the scrollback.\n- Tool error output is clipped the same way as ok output, so a failing command no longer floods the transcript.\n- The TUI toast overlay has an opaque background instead of letting the transcript bleed through.\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
4082
+ const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Added\n\n- First run in a workspace with no agents now sets you up automatically: instead of dropping you on an empty agent picker, `skydive` creates your first agent for you (with a suggested name and avatar, mirroring the web onboarding flow) and then offers to have it learn how you already work — reading the other coding agents set up on your machine (Claude Code, Cursor, Codex, and more), the same import that `skydive import` runs, with a plan shown first and credentials never copied. Decline and you go straight into the new agent's chat. You can replay this flow anytime with `skydive --onboarding` (or `SKYDIVE_FORCE_ONBOARDING=1`), even in a workspace that already has agents.\n- `/computer` (alias `/stats`) in the chat TUI — a snapshot of the agent's sandbox drawn as colored bar graphs: CPU load (scaled to core count), memory, swap (when present), and disk usage, plus uptime and process count. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The card keeps itself current quietly (a slow background refresh, no flicker or \"updating\" chrome); only the most recent card refreshes, and it silently stops while you're scrolled up (no wasted polls on a card you're not looking at) and resumes at the bottom. Stats are read over the same relay `skydive sandbox` uses, so it's gated on EDIT access to the agent like the other sandbox commands.\n- `skydive fs` — a namespace for working with the files on an agent's computer (its sandbox) from your own machine. Its first subcommand, `skydive fs edit <path>`, reads a remote file down over the same relay `skydive sandbox` uses, opens it in your local editor (`$VISUAL`/`$EDITOR`, override with `--editor`, defaults to `vi`), and writes your changes back atomically when you save and close — so you can edit a remote file as if it were local without opening the chat TUI. A path that doesn't exist yet is created on save; no changes means nothing is written. Access is gated on EDIT permission for the agent, exactly like `skydive sandbox`. (A first-class `fs` relay channel and `skydive fs mount` land in follow-ups.)\n\n## [0.4.0] - 2026-08-07\n\n### Added\n\n- `skydive chat` works with API key auth: an API key alone now opens the chat TUI (and headless `chat -p`) without a browser login, using the key's pinned workspace.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n- Billing-blocked sends and runs now surface the server-authored recovery\n guidance from the typed billing outcome. The chat TUI renders it as a\n warning-toned system-notice row — live when a send is refused or a run is\n stopped at the billing boundary, and again when reopening a conversation\n that holds a persisted billing notice — instead of a generic error.\n Headless `chat -p` and `messages get` print the guidance (state, recovery\n step, and manage-billing URL) on stderr, keep any partial output already\n streamed on stdout, and exit with code `5` (distinct from the generic `1`)\n so scripted callers can tell a billing pause from a failure.\n- Syntax highlighting for 14 more languages in the chat transcript and file/review panes (python, bash, go, rust, c, cpp, java, ruby, css, html, json, yaml, and more) — previously only JavaScript/TypeScript rendered colored.\n\n### Changed\n\n- `skydive agent list` lists the full agent roster by default instead of a truncated page.\n\n### Fixed\n\n- Long multi-line bash tool-call commands (e.g. heredocs) are clamped with a `+N more · click to expand` tail instead of dumping their whole body into the scrollback.\n- Tool error output is clipped the same way as ok output, so a failing command no longer floods the transcript.\n- The TUI toast overlay has an opaque background instead of letting the transcript bleed through.\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
4030
4083
 
4031
4084
  //#endregion
4032
4085
  //#region src/whats-new.ts
@@ -4169,7 +4222,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4169
4222
  process.exit(0);
4170
4223
  }
4171
4224
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4172
- const { runPortalDaemon } = await import("./daemon-DDBIumf1.mjs");
4225
+ const { runPortalDaemon } = await import("./daemon-C6tZH1dO.mjs");
4173
4226
  runPortalDaemon(process.argv);
4174
4227
  } else runCli();
4175
4228
  function runCli() {