skydive-cli 0.5.0-beta.11 → 0.5.0-beta.13

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,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
+ - `/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
13
  - `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
14
 
14
15
  ## [0.4.0] - 2026-08-07
package/dist/js/bin.mjs CHANGED
@@ -1,12 +1,12 @@
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-BXdrd1D4.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-ClPkgR9z.mjs";
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-0_q2DHpq.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-riiY5Gly.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-I3imNduB.mjs";
6
+ import { t as createRestClient } from "./rest-CLrHVkxh.mjs";
7
7
  import "./billing-blocked-2wju4gC_.mjs";
8
8
  import { r as resolveMachineIdentity } from "./client-DabRpc_T.mjs";
9
- import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-DfeT8rGL.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-ShOaDbZe.mjs";
10
10
  import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-DG5W6iwx.mjs";
11
11
  import { t as SandboxStream } from "./client-c4c5MmgN.mjs";
12
12
  import { hideBin } from "yargs/helpers";
@@ -1517,7 +1517,7 @@ const importCommand = {
1517
1517
  process.exit(1);
1518
1518
  }
1519
1519
  }
1520
- const { runChat } = await import("./boot-BWOK3tCN.mjs");
1520
+ const { runChat } = await import("./boot-C4OHQUCg.mjs");
1521
1521
  await runChat({
1522
1522
  appUrl,
1523
1523
  sessionToken: session.value.sessionToken,
@@ -1553,7 +1553,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1553
1553
  });
1554
1554
  const extra = (argv.print ?? "").trim();
1555
1555
  const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1556
- const { runPrint } = await import("./print-Bo06tvfV.mjs");
1556
+ const { runPrint } = await import("./print-DTx2HyDY.mjs");
1557
1557
  try {
1558
1558
  const result = await runPrint({
1559
1559
  appUrl,
@@ -1930,7 +1930,7 @@ const chatCommand = {
1930
1930
  sessionToken: auth.value.token,
1931
1931
  agentSelector: argv.agent ?? null
1932
1932
  });
1933
- const { runChat } = await import("./boot-BWOK3tCN.mjs");
1933
+ const { runChat } = await import("./boot-C4OHQUCg.mjs");
1934
1934
  await runChat({
1935
1935
  appUrl: auth.value.appUrl,
1936
1936
  sessionToken: auth.value.token,
@@ -1998,7 +1998,7 @@ async function runPrintMode({ argv, appUrl }) {
1998
1998
  printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
1999
1999
  process.exit(1);
2000
2000
  }
2001
- const { runPrint, readStdin } = await import("./print-Bo06tvfV.mjs");
2001
+ const { runPrint, readStdin } = await import("./print-DTx2HyDY.mjs");
2002
2002
  await ensureAgentWorkspace({
2003
2003
  appUrl,
2004
2004
  sessionToken: auth.value.token,
@@ -2087,7 +2087,7 @@ const getCommand$1 = {
2087
2087
  printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2088
2088
  process.exit(1);
2089
2089
  }
2090
- const { messageGet } = await import("./print-Bo06tvfV.mjs");
2090
+ const { messageGet } = await import("./print-DTx2HyDY.mjs");
2091
2091
  try {
2092
2092
  const result = await messageGet({
2093
2093
  appUrl: auth.value.appUrl,
@@ -2290,7 +2290,7 @@ const switchCommand = {
2290
2290
  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.");
2291
2291
  process.exit(1);
2292
2292
  }
2293
- const { runWorkspacePicker } = await import("./boot-BWOK3tCN.mjs");
2293
+ const { runWorkspacePicker } = await import("./boot-C4OHQUCg.mjs");
2294
2294
  await runWorkspacePicker(session);
2295
2295
  return;
2296
2296
  }
@@ -2369,7 +2369,7 @@ const openCommand = {
2369
2369
  const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
2370
2370
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
2371
2371
  const { machineName } = await resolveMachineIdentity();
2372
- const { PortalDaemonClient } = await import("./daemon-client-CAkZTO_6.mjs");
2372
+ const { PortalDaemonClient } = await import("./daemon-client-D_MeDMpn.mjs");
2373
2373
  let lastLine = "";
2374
2374
  let signalConnected;
2375
2375
  const connected = new Promise((resolve) => {
@@ -2679,8 +2679,8 @@ const sandboxCommand = {
2679
2679
  }).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`"),
2680
2680
  handler: async (argv) => {
2681
2681
  const session = requireSession(argv);
2682
- const { createRestClient } = await import("./rest-D29qNkto.mjs");
2683
- const { resolveAgent } = await import("./print-Bo06tvfV.mjs");
2682
+ const { createRestClient } = await import("./rest-DsdPAE8K.mjs");
2683
+ const { resolveAgent } = await import("./print-DTx2HyDY.mjs");
2684
2684
  const client = createRestClient({
2685
2685
  appUrl: session.appUrl,
2686
2686
  sessionToken: session.sessionToken
@@ -2837,8 +2837,8 @@ const fsEditCommand = {
2837
2837
  handler: async (argv) => {
2838
2838
  const session = requireSession(argv);
2839
2839
  const remotePath = argv.path;
2840
- const { createRestClient } = await import("./rest-D29qNkto.mjs");
2841
- const { resolveAgent } = await import("./print-Bo06tvfV.mjs");
2840
+ const { createRestClient } = await import("./rest-DsdPAE8K.mjs");
2841
+ const { resolveAgent } = await import("./print-DTx2HyDY.mjs");
2842
2842
  const client = createRestClient({
2843
2843
  appUrl: session.appUrl,
2844
2844
  sessionToken: session.sessionToken
@@ -4072,7 +4072,7 @@ function setupUpdateCheck(argv) {
4072
4072
 
4073
4073
  //#endregion
4074
4074
  //#region src/changelog.generated.ts
4075
- 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";
4075
+ 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- `/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";
4076
4076
 
4077
4077
  //#endregion
4078
4078
  //#region src/whats-new.ts
@@ -4215,7 +4215,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4215
4215
  process.exit(0);
4216
4216
  }
4217
4217
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4218
- const { runPortalDaemon } = await import("./daemon-CJNMbWMJ.mjs");
4218
+ const { runPortalDaemon } = await import("./daemon-BfqJZ_M4.mjs");
4219
4219
  runPortalDaemon(process.argv);
4220
4220
  } else runCli();
4221
4221
  function runCli() {
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-BXdrd1D4.mjs";
3
- import { D as getReviewStateDir, H as saveTheme, N as recordDefaultAgent, O as getSavedTheme, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL, z as resolveWebUrl } from "./print-ClPkgR9z.mjs";
2
+ import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-0_q2DHpq.mjs";
3
+ import { D as getReviewStateDir, H as saveTheme, N as recordDefaultAgent, O as getSavedTheme, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL, z as resolveWebUrl } from "./print-riiY5Gly.mjs";
4
4
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
5
- import { a as isRecord, i as errorMessage, n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
5
+ import { a as isRecord, i as errorMessage, n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-CLrHVkxh.mjs";
6
6
  import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-2wju4gC_.mjs";
7
7
  import { t as PortalClient } from "./client-DabRpc_T.mjs";
8
- import "./daemon-DfeT8rGL.mjs";
8
+ import "./daemon-ShOaDbZe.mjs";
9
9
  import "./api-DG5W6iwx.mjs";
10
10
  import { t as SandboxStream } from "./client-c4c5MmgN.mjs";
11
- import { t as PortalDaemonClient } from "./daemon-client-eBSEPljJ.mjs";
11
+ import { t as PortalDaemonClient } from "./daemon-client-BVAlyN7x.mjs";
12
12
  import { t as runRawPtyPassthrough } from "./raw-pty-DY4KelZW.mjs";
13
13
  import * as os$1 from "node:os";
14
14
  import { homedir, platform, release, tmpdir } from "node:os";
@@ -2841,15 +2841,20 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
2841
2841
  children: [marker, truncate("+ new conversation", rowWidth)]
2842
2842
  }, "new");
2843
2843
  const archived = isArchived(row.hit.item);
2844
+ const unread = row.hit.item.unread === true;
2844
2845
  const { title, detail, tag } = fitRowText(singleLine(row.hit.item.title ?? "(untitled)"), `${archived ? "archived · " : ""}${previewLine(row.hit.item)}`, rowWidth, coAgentsTag(row.hit.item, agent.id));
2846
+ const titleText = /* @__PURE__ */ jsx(FuzzyText, {
2847
+ text: title,
2848
+ indexes: row.hit.item.title ? row.hit.highlights[0] : null
2849
+ });
2845
2850
  return /* @__PURE__ */ jsxs("text", {
2846
2851
  fg: archived && !selected ? theme.dim : fg,
2847
2852
  children: [
2848
- marker,
2849
- /* @__PURE__ */ jsx(FuzzyText, {
2850
- text: title,
2851
- indexes: row.hit.item.title ? row.hit.highlights[0] : null
2852
- }),
2853
+ !selected && unread ? /* @__PURE__ */ jsx("span", {
2854
+ fg: theme.accent,
2855
+ children: "● "
2856
+ }) : marker,
2857
+ unread ? /* @__PURE__ */ jsx("b", { children: titleText }) : titleText,
2853
2858
  tag ? /* @__PURE__ */ jsxs("span", {
2854
2859
  fg: theme.muted,
2855
2860
  children: [" ", tag]
@@ -4235,7 +4240,10 @@ function parseMatches(output) {
4235
4240
  //#region src/chat/tui/chat/conversation-context.tsx
4236
4241
  const ConversationContext = createContext({
4237
4242
  rest: null,
4238
- conversationId: null
4243
+ conversationId: null,
4244
+ collectSandboxStats: null,
4245
+ latestComputerId: null,
4246
+ scrolledUp: false
4239
4247
  });
4240
4248
  function useConversationContext() {
4241
4249
  return useContext(ConversationContext);
@@ -4555,6 +4563,329 @@ function ShellLocalItem({ item }) {
4555
4563
  });
4556
4564
  }
4557
4565
 
4566
+ //#endregion
4567
+ //#region src/chat/tui/chat/sandbox-stats.ts
4568
+ /**
4569
+ * `/computer`: a live snapshot of the agent's sandbox as a set of bar graphs.
4570
+ *
4571
+ * The CLI runs on the USER's machine, so it can't read the sandbox's `/proc`
4572
+ * directly — it runs one small, portable shell command over the sandbox-exec
4573
+ * stream (`SandboxStream`, mode `exec`) and parses the output here. Everything
4574
+ * in this module is pure so the parse + layout are unit-testable without a
4575
+ * sandbox or a renderer.
4576
+ *
4577
+ * The command reads `/proc` and `df` only (no tools that might be missing from
4578
+ * a minimal image), emitting a tagged, tab-separated block. The leading
4579
+ * `SKYDIVE_STATS_V1` sentinel lets the parser find the block even when a shell
4580
+ * rc file prints a banner first, and versions the wire shape.
4581
+ */
4582
+ const SANDBOX_STATS_SENTINEL = "SKYDIVE_STATS_V1";
4583
+ /**
4584
+ * How often the live `/computer` card refreshes its snapshot, in ms.
4585
+ * Deliberately slow: the card is a background health readout, not a `top`, so
4586
+ * it refreshes quietly every 30s rather than flickering every second.
4587
+ */
4588
+ const COMPUTER_POLL_INTERVAL_MS = 3e4;
4589
+ /**
4590
+ * Whether a `/computer` card should refresh right now. Pure so the gating is
4591
+ * unit-testable. A card refreshes only when it is the most recent `/computer`
4592
+ * in the transcript (`isLatest`), the session can reach the sandbox
4593
+ * (`canCollect`), and the transcript is at the bottom (`!scrolledUp`) — while
4594
+ * you're scrolled up reading something else it quietly stops (no wasted polls),
4595
+ * and resumes when you scroll back down. Older cards freeze regardless, so a
4596
+ * scrolled-up history of runs isn't a fleet of background pollers. The pause is
4597
+ * silent: nothing about it is rendered.
4598
+ */
4599
+ function shouldPollComputer(opts) {
4600
+ return opts.isLatest && opts.canCollect && !opts.scrolledUp;
4601
+ }
4602
+ /**
4603
+ * The command run in the sandbox to collect the snapshot. `sh`-portable, reads
4604
+ * only `/proc` and `df`. Each metric is one `key<TAB>value` line so the parser
4605
+ * never has to positionally align anything.
4606
+ */
4607
+ const SANDBOX_STATS_COMMAND = [
4608
+ `printf '${SANDBOX_STATS_SENTINEL}\\n'`,
4609
+ `printf 'nproc\\t%s\\n' "$(nproc 2>/dev/null || echo 1)"`,
4610
+ `printf 'loadavg\\t%s\\n' "$(cut -d' ' -f1-3 /proc/loadavg)"`,
4611
+ `printf 'uptime\\t%s\\n' "$(cut -d' ' -f1 /proc/uptime)"`,
4612
+ `awk '/^MemTotal:/{t=$2}/^MemAvailable:/{a=$2}END{printf "mem_total_kb\\t%d\\nmem_avail_kb\\t%d\\n",t,a}' /proc/meminfo`,
4613
+ `awk '/^SwapTotal:/{t=$2}/^SwapFree:/{f=$2}END{printf "swap_total_kb\\t%d\\nswap_free_kb\\t%d\\n",t,f}' /proc/meminfo`,
4614
+ `df -Pk / | awk 'NR==2{printf "disk_total_kb\\t%d\\ndisk_used_kb\\t%d\\n",$2,$3}'`,
4615
+ `printf 'procs\\t%s\\n' "$(ls -1 /proc 2>/dev/null | grep -c '^[0-9]\\+$')"`
4616
+ ].join(" ; ");
4617
+ const KB = 1024;
4618
+ /**
4619
+ * Parse the collector's output into `SandboxStats`, or return null when the
4620
+ * block is absent or malformed (so the caller can show the raw output as an
4621
+ * error instead of a broken graph). Tolerant of extra lines before the
4622
+ * sentinel (shell banners) and of a missing swap section (swap totals default
4623
+ * to 0, which the renderer treats as "no swap").
4624
+ */
4625
+ function parseSandboxStats(raw) {
4626
+ const start = raw.indexOf(SANDBOX_STATS_SENTINEL);
4627
+ if (start === -1) return null;
4628
+ const fields = /* @__PURE__ */ new Map();
4629
+ for (const line of raw.slice(start).split("\n")) {
4630
+ const tab = line.indexOf(" ");
4631
+ if (tab === -1) continue;
4632
+ fields.set(line.slice(0, tab).trim(), line.slice(tab + 1).trim());
4633
+ }
4634
+ const num = (key) => {
4635
+ const v = fields.get(key);
4636
+ if (v === void 0) return null;
4637
+ const n = Number(v);
4638
+ return Number.isFinite(n) ? n : null;
4639
+ };
4640
+ const load = (fields.get("loadavg") ?? "").split(/\s+/).map(Number).filter((n) => Number.isFinite(n));
4641
+ const nproc = num("nproc");
4642
+ const uptime = num("uptime");
4643
+ const memTotal = num("mem_total_kb");
4644
+ const memAvail = num("mem_avail_kb");
4645
+ const diskTotal = num("disk_total_kb");
4646
+ const diskUsed = num("disk_used_kb");
4647
+ const procs = num("procs");
4648
+ const [load1, load5, load15] = load;
4649
+ if (nproc === null || uptime === null || memTotal === null || memAvail === null || diskTotal === null || diskUsed === null || procs === null || load1 === void 0 || load5 === void 0 || load15 === void 0) return null;
4650
+ return {
4651
+ nproc: Math.max(1, Math.round(nproc)),
4652
+ loadavg: [
4653
+ load1,
4654
+ load5,
4655
+ load15
4656
+ ],
4657
+ uptimeSeconds: uptime,
4658
+ memTotalBytes: memTotal * KB,
4659
+ memAvailBytes: memAvail * KB,
4660
+ swapTotalBytes: (num("swap_total_kb") ?? 0) * KB,
4661
+ swapFreeBytes: (num("swap_free_kb") ?? 0) * KB,
4662
+ diskTotalBytes: diskTotal * KB,
4663
+ diskUsedBytes: diskUsed * KB,
4664
+ procs: Math.round(procs)
4665
+ };
4666
+ }
4667
+ function severityFor(fraction) {
4668
+ if (fraction >= .9) return "crit";
4669
+ if (fraction >= .75) return "warn";
4670
+ return "ok";
4671
+ }
4672
+ const GiB = 1024 * 1024 * 1024;
4673
+ function gb(bytes) {
4674
+ return (bytes / GiB).toFixed(1);
4675
+ }
4676
+ /** `120050` seconds -> `1d 9h 20m`. Always at least `0m`. */
4677
+ function formatUptime(seconds) {
4678
+ const total = Math.max(0, Math.floor(seconds));
4679
+ const d = Math.floor(total / 86400);
4680
+ const h = Math.floor(total % 86400 / 3600);
4681
+ const m = Math.floor(total % 3600 / 60);
4682
+ const parts = [];
4683
+ if (d > 0) parts.push(`${d}d`);
4684
+ if (h > 0 || d > 0) parts.push(`${h}h`);
4685
+ parts.push(`${m}m`);
4686
+ return parts.join(" ");
4687
+ }
4688
+ /**
4689
+ * Reduce a snapshot to the ordered list of gauges the `/computer` card draws:
4690
+ * CPU load (normalized to core count), memory, swap (only when the box has
4691
+ * any), and disk. Load can exceed 1.0 (oversubscribed CPU) — the bar clamps
4692
+ * but the caption shows the true number so that's still legible.
4693
+ */
4694
+ function toGauges(stats) {
4695
+ const gauges = [];
4696
+ const load1 = stats.loadavg[0];
4697
+ const loadFraction = load1 / stats.nproc;
4698
+ gauges.push({
4699
+ label: "cpu load",
4700
+ fraction: loadFraction,
4701
+ detail: `${load1.toFixed(2)} / ${stats.nproc} cores`,
4702
+ severity: severityFor(loadFraction)
4703
+ });
4704
+ const memUsed = Math.max(0, stats.memTotalBytes - stats.memAvailBytes);
4705
+ const memFraction = stats.memTotalBytes > 0 ? memUsed / stats.memTotalBytes : 0;
4706
+ gauges.push({
4707
+ label: "memory",
4708
+ fraction: memFraction,
4709
+ detail: `${gb(memUsed)} / ${gb(stats.memTotalBytes)} GB`,
4710
+ severity: severityFor(memFraction)
4711
+ });
4712
+ if (stats.swapTotalBytes > 0) {
4713
+ const swapUsed = Math.max(0, stats.swapTotalBytes - stats.swapFreeBytes);
4714
+ const swapFraction = swapUsed / stats.swapTotalBytes;
4715
+ gauges.push({
4716
+ label: "swap",
4717
+ fraction: swapFraction,
4718
+ detail: `${gb(swapUsed)} / ${gb(stats.swapTotalBytes)} GB`,
4719
+ severity: severityFor(swapFraction)
4720
+ });
4721
+ }
4722
+ const diskFraction = stats.diskTotalBytes > 0 ? stats.diskUsedBytes / stats.diskTotalBytes : 0;
4723
+ gauges.push({
4724
+ label: "disk",
4725
+ fraction: diskFraction,
4726
+ detail: `${gb(stats.diskUsedBytes)} / ${gb(stats.diskTotalBytes)} GB`,
4727
+ severity: severityFor(diskFraction)
4728
+ });
4729
+ return gauges;
4730
+ }
4731
+ /**
4732
+ * A single-line horizontal bar of `width` cells filled to `fraction`
4733
+ * (clamped 0..1), using block glyphs. The last partial cell uses one of the
4734
+ * eighth-block glyphs so a 37%% bar reads differently from a 40%% one even in a
4735
+ * narrow width. Pure string, so the renderer just colors it.
4736
+ */
4737
+ function renderBar(fraction, width) {
4738
+ const cells = Math.max(1, width);
4739
+ const exact = Math.min(1, Math.max(0, fraction)) * cells;
4740
+ const full = Math.floor(exact);
4741
+ const remainder = exact - full;
4742
+ const eighths = [
4743
+ "",
4744
+ "▏",
4745
+ "▎",
4746
+ "▍",
4747
+ "▌",
4748
+ "▋",
4749
+ "▊",
4750
+ "▉"
4751
+ ];
4752
+ const partialIndex = Math.round(remainder * 8);
4753
+ const partial = full < cells ? eighths[partialIndex] : "";
4754
+ const filled = "█".repeat(Math.min(full, cells)) + partial;
4755
+ return (filled + "░".repeat(Math.max(0, cells - filled.length))).slice(0, cells);
4756
+ }
4757
+
4758
+ //#endregion
4759
+ //#region src/chat/tui/chunks/computer.tsx
4760
+ /**
4761
+ * Renders the `/computer` card: a snapshot of the agent's sandbox as a stack of
4762
+ * colored bar graphs (cpu load, memory, swap, disk) plus a footer of scalar
4763
+ * facts (uptime, process count).
4764
+ *
4765
+ * The card keeps itself current in place rather than making the user re-run the
4766
+ * command — but quietly: it refreshes on a slow interval with no "updating"
4767
+ * chrome, so the numbers just stay fresh without any flicker. Only the most
4768
+ * recent `/computer` card refreshes (older ones freeze at their last snapshot),
4769
+ * and the latest one silently stops while the transcript is scrolled up (no
4770
+ * wasted polls on a card you're not looking at) and resumes at the bottom — the
4771
+ * pause is never rendered. The refresh uses the same sandbox-exec relay
4772
+ * `/sandbox` uses, injected via context; the parse/layout math lives in
4773
+ * `sandbox-stats.ts` and this component only draws.
4774
+ */
4775
+ function ComputerItem({ item }) {
4776
+ const { collectSandboxStats, latestComputerId, scrolledUp } = useConversationContext();
4777
+ const live = shouldPollComputer({
4778
+ isLatest: latestComputerId === item.id,
4779
+ canCollect: collectSandboxStats !== null,
4780
+ scrolledUp
4781
+ });
4782
+ const [stats, setStats] = useState(item.stats);
4783
+ const [error, setError] = useState(item.error);
4784
+ const hasStats = useRef(item.stats !== null);
4785
+ useEffect(() => {
4786
+ if (!live || !collectSandboxStats) return;
4787
+ let cancelled = false;
4788
+ let timer = null;
4789
+ let inFlight = null;
4790
+ const tick = async () => {
4791
+ const collection = collectSandboxStats();
4792
+ inFlight = collection;
4793
+ const result = await collection.result;
4794
+ inFlight = null;
4795
+ if (cancelled) return;
4796
+ if (result.ok) {
4797
+ hasStats.current = true;
4798
+ setStats(result.stats);
4799
+ setError(null);
4800
+ } else if (!("aborted" in result)) {
4801
+ if (!hasStats.current) setError(result.error);
4802
+ }
4803
+ if (!cancelled) timer = setTimeout(tick, COMPUTER_POLL_INTERVAL_MS);
4804
+ };
4805
+ tick();
4806
+ return () => {
4807
+ cancelled = true;
4808
+ if (timer !== null) clearTimeout(timer);
4809
+ inFlight?.abort();
4810
+ };
4811
+ }, [live, collectSandboxStats]);
4812
+ if (stats === null && error === null) return /* @__PURE__ */ jsx(Shell, { children: /* @__PURE__ */ jsx("text", {
4813
+ fg: theme.dim,
4814
+ children: "reading sandbox stats…"
4815
+ }) });
4816
+ if (stats === null) return /* @__PURE__ */ jsx(Shell, { children: /* @__PURE__ */ jsxs("text", {
4817
+ fg: theme.error,
4818
+ children: ["couldn't read sandbox stats", error ? `: ${error}` : ""]
4819
+ }) });
4820
+ const gauges = toGauges(stats);
4821
+ const labelWidth = Math.max(...gauges.map((g) => g.label.length));
4822
+ const barWidth = 24;
4823
+ return /* @__PURE__ */ jsxs(Shell, { children: [gauges.map((g) => /* @__PURE__ */ jsx(GaugeRow, {
4824
+ gauge: g,
4825
+ labelWidth,
4826
+ barWidth
4827
+ }, g.label)), /* @__PURE__ */ jsxs("text", {
4828
+ fg: theme.dim,
4829
+ children: [
4830
+ `${"uptime".padEnd(labelWidth)} `,
4831
+ /* @__PURE__ */ jsx("span", {
4832
+ fg: theme.muted,
4833
+ children: formatUptime(stats.uptimeSeconds)
4834
+ }),
4835
+ /* @__PURE__ */ jsx("span", {
4836
+ fg: theme.dim,
4837
+ children: ` · ${stats.procs} processes`
4838
+ })
4839
+ ]
4840
+ })] });
4841
+ }
4842
+ /** The card frame: a bold `computer` title over the graph rows. */
4843
+ function Shell({ children }) {
4844
+ return /* @__PURE__ */ jsxs("box", {
4845
+ style: { flexDirection: "column" },
4846
+ children: [/* @__PURE__ */ jsxs("text", {
4847
+ fg: theme.muted,
4848
+ children: [/* @__PURE__ */ jsx("b", { children: "computer" }), /* @__PURE__ */ jsx("span", {
4849
+ fg: theme.dim,
4850
+ children: " · agent sandbox"
4851
+ })]
4852
+ }), children]
4853
+ });
4854
+ }
4855
+ function severityColor(severity) {
4856
+ switch (severity) {
4857
+ case "ok": return theme.success;
4858
+ case "warn": return theme.warning;
4859
+ case "crit": return theme.error;
4860
+ default: {
4861
+ const exhaustive = severity;
4862
+ throw new Error(`unhandled severity: ${String(exhaustive)}`);
4863
+ }
4864
+ }
4865
+ }
4866
+ function GaugeRow({ gauge, labelWidth, barWidth }) {
4867
+ const color = severityColor(gauge.severity);
4868
+ const pct = `${Math.round(Math.min(1, Math.max(0, gauge.fraction)) * 100)}%`;
4869
+ return /* @__PURE__ */ jsxs("text", { children: [
4870
+ /* @__PURE__ */ jsx("span", {
4871
+ fg: theme.muted,
4872
+ children: `${gauge.label.padEnd(labelWidth)} `
4873
+ }),
4874
+ /* @__PURE__ */ jsx("span", {
4875
+ fg: color,
4876
+ children: renderBar(gauge.fraction, barWidth)
4877
+ }),
4878
+ /* @__PURE__ */ jsx("span", {
4879
+ fg: color,
4880
+ children: ` ${pct.padStart(4)}`
4881
+ }),
4882
+ /* @__PURE__ */ jsx("span", {
4883
+ fg: theme.dim,
4884
+ children: ` ${gauge.detail}`
4885
+ })
4886
+ ] });
4887
+ }
4888
+
4558
4889
  //#endregion
4559
4890
  //#region src/chat/tui/chunks/index.tsx
4560
4891
  /**
@@ -4653,6 +4984,10 @@ function RenderItem({ item }) {
4653
4984
  })]
4654
4985
  })
4655
4986
  });
4987
+ case "computer": return /* @__PURE__ */ jsx(Row, {
4988
+ barColor: null,
4989
+ children: /* @__PURE__ */ jsx(ComputerItem, { item })
4990
+ });
4656
4991
  case "recap": return /* @__PURE__ */ jsx(Row, {
4657
4992
  barColor: null,
4658
4993
  children: /* @__PURE__ */ jsxs("text", {
@@ -6035,6 +6370,65 @@ function formatShare(share) {
6035
6370
  return share.grantedToAgent ? "shared (this agent can run commands here)" : "shared (this agent is not granted)";
6036
6371
  }
6037
6372
 
6373
+ //#endregion
6374
+ //#region src/chat/sandbox/collect-stats.ts
6375
+ function collectSandboxStats(cfg) {
6376
+ const open = cfg.open ?? SandboxStream.open;
6377
+ const dec = new TextDecoder();
6378
+ let buffer = "";
6379
+ let settled = false;
6380
+ let stream = null;
6381
+ let resolveRef = null;
6382
+ return {
6383
+ result: new Promise((resolve) => {
6384
+ resolveRef = resolve;
6385
+ const settle = (r) => {
6386
+ if (settled) return;
6387
+ settled = true;
6388
+ resolve(r);
6389
+ };
6390
+ stream = open({
6391
+ mode: "exec",
6392
+ appUrl: cfg.appUrl,
6393
+ sessionToken: cfg.sessionToken,
6394
+ agentId: cfg.agentId,
6395
+ command: SANDBOX_STATS_COMMAND,
6396
+ onEvent: (e) => {
6397
+ if (e.type === "data") buffer += dec.decode(e.bytes);
6398
+ else if (e.type === "error") settle({
6399
+ ok: false,
6400
+ error: e.message
6401
+ });
6402
+ else if (e.type === "exit") {
6403
+ const stats = parseSandboxStats(buffer);
6404
+ if (stats) settle({
6405
+ ok: true,
6406
+ stats
6407
+ });
6408
+ else settle({
6409
+ ok: false,
6410
+ error: e.code === 0 ? "unexpected output from the sandbox" : `sandbox command exited ${e.code}`
6411
+ });
6412
+ } else if (e.type === "close") settle({
6413
+ ok: false,
6414
+ error: e.failure ?? "connection closed before the snapshot finished"
6415
+ });
6416
+ }
6417
+ });
6418
+ }),
6419
+ abort: () => {
6420
+ if (settled) return;
6421
+ settled = true;
6422
+ stream?.close();
6423
+ resolveRef?.({
6424
+ ok: false,
6425
+ aborted: true,
6426
+ error: "aborted"
6427
+ });
6428
+ }
6429
+ };
6430
+ }
6431
+
6038
6432
  //#endregion
6039
6433
  //#region src/chat/notification-preview.ts
6040
6434
  const MAX_NOTIFICATION_PREVIEW_CHARS = 240;
@@ -6891,6 +7285,13 @@ const slashCommands = [
6891
7285
  description: "show connection and session status",
6892
7286
  action: { kind: "status" }
6893
7287
  },
7288
+ {
7289
+ name: "computer",
7290
+ aliases: ["stats"],
7291
+ argsHint: null,
7292
+ description: "show the agent sandbox's cpu, memory, and disk",
7293
+ action: { kind: "computer" }
7294
+ },
6894
7295
  {
6895
7296
  name: "plan",
6896
7297
  aliases: ["todos", "todo"],
@@ -10085,6 +10486,7 @@ function routeInput(raw) {
10085
10486
  case "model-picker":
10086
10487
  case "theme-picker":
10087
10488
  case "status":
10489
+ case "computer":
10088
10490
  case "share":
10089
10491
  case "browser":
10090
10492
  case "connect":
@@ -10341,6 +10743,8 @@ function ChatScreen({ agent, conversation }) {
10341
10743
  const menuHighlightClamped = Math.min(menuHighlight, Math.max(0, menuCommands.length - 1));
10342
10744
  const runRef = useRef(run);
10343
10745
  runRef.current = run;
10746
+ const conversationIdRef = useRef(conversationId);
10747
+ conversationIdRef.current = conversationId;
10344
10748
  const itemsRef = useRef(items);
10345
10749
  itemsRef.current = items;
10346
10750
  const attachmentsRef = useRef(attachments);
@@ -10510,6 +10914,15 @@ function ChatScreen({ agent, conversation }) {
10510
10914
  initialConversationId,
10511
10915
  agentHost
10512
10916
  ]);
10917
+ const markRead = useCallback(() => {
10918
+ const id = conversationIdRef.current;
10919
+ if (!rest || !id) return;
10920
+ rest.markConversationRead({ conversationId: id }).catch(() => {});
10921
+ }, [rest]);
10922
+ useEffect(() => {
10923
+ if (!conversationId) return;
10924
+ markRead();
10925
+ }, [conversationId, markRead]);
10513
10926
  const attachToRun = useCallback((runId, runAgentName, runStartedAtMs) => {
10514
10927
  if (!rest) return;
10515
10928
  seenRunsRef.current.add(runId);
@@ -10562,6 +10975,7 @@ function ChatScreen({ agent, conversation }) {
10562
10975
  attachments: m.attachments
10563
10976
  } : m));
10564
10977
  setRun({ kind: "idle" });
10978
+ markRead();
10565
10979
  agentHost.transition({
10566
10980
  state: "idle",
10567
10981
  notification: {
@@ -10583,7 +10997,8 @@ function ChatScreen({ agent, conversation }) {
10583
10997
  }, [
10584
10998
  rest,
10585
10999
  agent.name,
10586
- agentHost
11000
+ agentHost,
11001
+ markRead
10587
11002
  ]);
10588
11003
  const multiAgent = useMemo(() => conversationAgentNames(items, agent.name), [items, agent.name]).size > 1;
10589
11004
  const transcriptWindow = useMemo(() => windowItems(items), [items]);
@@ -11035,6 +11450,16 @@ function ChatScreen({ agent, conversation }) {
11035
11450
  sessionToken,
11036
11451
  agent.id
11037
11452
  ]);
11453
+ const runComputerStats = useCallback(() => {
11454
+ if (!appUrl || !sessionToken) return;
11455
+ setItems((prev) => [...prev, {
11456
+ kind: "computer",
11457
+ id: crypto.randomUUID(),
11458
+ state: "loading",
11459
+ stats: null,
11460
+ error: null
11461
+ }]);
11462
+ }, [appUrl, sessionToken]);
11038
11463
  const runSandboxPty = useCallback(async () => {
11039
11464
  if (!appUrl || !sessionToken) return;
11040
11465
  const result = await runPtySession({
@@ -11575,6 +12000,9 @@ function ChatScreen({ agent, conversation }) {
11575
12000
  })
11576
12001
  }]);
11577
12002
  break;
12003
+ case "computer":
12004
+ runComputerStats();
12005
+ break;
11578
12006
  case "plan": {
11579
12007
  if (!(!!todos && todos.length > 0)) {
11580
12008
  useStore.getState().showToast({ message: "no plan to show yet" });
@@ -11627,6 +12055,7 @@ function ChatScreen({ agent, conversation }) {
11627
12055
  history,
11628
12056
  runLocalShell,
11629
12057
  runSandboxExec,
12058
+ runComputerStats,
11630
12059
  runSandboxPty,
11631
12060
  archiveConversation,
11632
12061
  renameConversation,
@@ -11893,10 +12322,38 @@ function ChatScreen({ agent, conversation }) {
11893
12322
  }
11894
12323
  });
11895
12324
  const hasPendingSteer = items.some((m) => m.kind === "pending-steer");
12325
+ const latestComputerId = useMemo(() => {
12326
+ for (let i = items.length - 1; i >= 0; i--) {
12327
+ const item = items[i];
12328
+ if (item && item.kind === "computer") return item.id;
12329
+ }
12330
+ return null;
12331
+ }, [items]);
12332
+ const boundCollectSandboxStats = useMemo(() => {
12333
+ if (!appUrl || !sessionToken) return null;
12334
+ return () => collectSandboxStats({
12335
+ appUrl,
12336
+ sessionToken,
12337
+ agentId: agent.id
12338
+ });
12339
+ }, [
12340
+ appUrl,
12341
+ sessionToken,
12342
+ agent.id
12343
+ ]);
11896
12344
  const conversationContext = useMemo(() => ({
11897
12345
  rest,
11898
- conversationId
11899
- }), [rest, conversationId]);
12346
+ conversationId,
12347
+ collectSandboxStats: boundCollectSandboxStats,
12348
+ latestComputerId,
12349
+ scrolledUp
12350
+ }), [
12351
+ rest,
12352
+ conversationId,
12353
+ boundCollectSandboxStats,
12354
+ latestComputerId,
12355
+ scrolledUp
12356
+ ]);
11900
12357
  const actionableCards = useMemo(() => items.filter(isActionableCard), [items]);
11901
12358
  const statusText = useMemo(() => formatChatFooterStatus({
11902
12359
  runKind: run.kind,
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./client-DabRpc_T.mjs";
3
- import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-DfeT8rGL.mjs";
3
+ import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-ShOaDbZe.mjs";
4
4
  import "./api-DG5W6iwx.mjs";
5
5
 
6
6
  export { runPortalDaemon };
@@ -20,7 +20,7 @@ import { access, appendFile, mkdir, readFile, unlink, writeFile } from "node:fs/
20
20
  * the commit time of the built tree is one monotonic clock they share.
21
21
  */
22
22
  function portalDaemonBuild() {
23
- return "1786600334";
23
+ return "1786601366";
24
24
  }
25
25
  /**
26
26
  * Whether a client carrying `mine` should replace a running daemon carrying
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as LOCAL_PROTOCOL_VERSION, d as encodeLine, f as makeLineParser, n as ensureDaemonRunning, p as parseDaemonMessage, u as daemonPaths } from "./daemon-DfeT8rGL.mjs";
2
+ import { c as LOCAL_PROTOCOL_VERSION, d as encodeLine, f as makeLineParser, n as ensureDaemonRunning, p as parseDaemonMessage, u as daemonPaths } from "./daemon-ShOaDbZe.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { connect } from "node:net";
5
5
 
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import "./client-DabRpc_T.mjs";
3
+ import "./daemon-ShOaDbZe.mjs";
4
+ import "./api-DG5W6iwx.mjs";
5
+ import { t as PortalDaemonClient } from "./daemon-client-BVAlyN7x.mjs";
6
+
7
+ export { PortalDaemonClient };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-ClPkgR9z.mjs";
3
- import "./rest-I3imNduB.mjs";
2
+ import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-riiY5Gly.mjs";
3
+ import "./rest-CLrHVkxh.mjs";
4
4
  import "./billing-blocked-2wju4gC_.mjs";
5
5
 
6
6
  export { messageGet, readStdin, resolveAgent, runPrint };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
- import { a as isRecord, i as errorMessage, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
3
+ import { a as isRecord, i as errorMessage, r as sendErrorMessage, t as createRestClient } from "./rest-CLrHVkxh.mjs";
4
4
  import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-2wju4gC_.mjs";
5
5
  import path from "node:path";
6
6
  import Conf from "conf";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { S as getConfigPath } from "./print-ClPkgR9z.mjs";
2
+ import { S as getConfigPath } from "./print-riiY5Gly.mjs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { err, ok } from "neverthrow";
@@ -8,7 +8,7 @@ import fs from "node:fs";
8
8
 
9
9
  //#region package.json
10
10
  var name = "skydive-cli";
11
- var version$1 = "0.5.0-beta.11";
11
+ var version$1 = "0.5.0-beta.13";
12
12
 
13
13
  //#endregion
14
14
  //#region src/auth/organization.ts
@@ -329,6 +329,9 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
329
329
  setConversationArchived: async ({ conversationId, archived }) => {
330
330
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
331
331
  },
332
+ markConversationRead: async ({ conversationId }) => {
333
+ await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/read`, {}, z.object({ read: z.boolean() }));
334
+ },
332
335
  renameConversation: async ({ conversationId, title }) => {
333
336
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}`, { title }, z.object({ conversation: z.object({ id: z.string() }) }), "PATCH");
334
337
  },
@@ -469,6 +472,7 @@ const conversationSummarySchema = z.object({
469
472
  channel: z.string().nullable(),
470
473
  channelLabel: z.string().nullable(),
471
474
  viewerArchivedAt: z.string().nullable().optional(),
475
+ unread: z.boolean().optional(),
472
476
  agent: conversationAgentSchema,
473
477
  agents: z.array(conversationAgentSchema).optional()
474
478
  });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
- import { n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
3
+ import { n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-CLrHVkxh.mjs";
4
4
  import "./billing-blocked-2wju4gC_.mjs";
5
5
 
6
6
  export { createRestClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.5.0-beta.11",
3
+ "version": "0.5.0-beta.13",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-DabRpc_T.mjs";
3
- import "./daemon-DfeT8rGL.mjs";
4
- import "./api-DG5W6iwx.mjs";
5
- import { t as PortalDaemonClient } from "./daemon-client-eBSEPljJ.mjs";
6
-
7
- export { PortalDaemonClient };