skydive-cli 0.5.0-beta.30 → 0.5.0-beta.32

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/js/api-DQCaztBg.mjs +315 -0
  3. package/dist/js/{billing-blocked-Dgu5-oDy.mjs → billing-blocked-SE6tySLd.mjs} +1 -1
  4. package/dist/js/bin.mjs +35 -30
  5. package/dist/js/{boot-0-dpPM1_.mjs → boot-yyXrIeVy.mjs} +110 -371
  6. package/dist/js/chunk-BbwQpWto.mjs +33 -0
  7. package/dist/js/{client-DbqRBquD.mjs → client-d6K9qm6B.mjs} +70 -2
  8. package/dist/js/client-yz3zrpAS.mjs +5 -0
  9. package/dist/js/daemon-Btd2436i.mjs +7 -0
  10. package/dist/js/{daemon-DuxaUuek.mjs → daemon-CxFxH36O.mjs} +4 -2
  11. package/dist/js/daemon-client-1Qfc_Y3J.mjs +8 -0
  12. package/dist/js/{daemon-client-C4heMWTq.mjs → daemon-client-Br1NlkRp.mjs} +1 -1
  13. package/dist/js/dist-CRtjM7ba.mjs +1750 -0
  14. package/dist/js/{forward-DL6DYqyc.mjs → forward-zwB55Bls.mjs} +25 -4
  15. package/dist/js/localhost-cert-Bn-UBUmj.mjs +67 -0
  16. package/dist/js/{print-CQkXZ02a.mjs → print-B9djx8GU.mjs} +3 -3
  17. package/dist/js/{print-DYiQC5IW.mjs → print-Clgq46GU.mjs} +3 -3
  18. package/dist/js/{print-share-BH9gvCls.mjs → print-share-BBy3OTno.mjs} +6 -2
  19. package/dist/js/{profiler-BoO7ldO0.mjs → profiler-CJMnC90G.mjs} +2 -2
  20. package/dist/js/{raw-pty-DY4KelZW.mjs → raw-pty-B9Bue8gg.mjs} +1 -1
  21. package/dist/js/raw-pty-g3kATVQe.mjs +5 -0
  22. package/dist/js/{rest-xXfqT4SX.mjs → rest-C6E4mS2A.mjs} +15 -2
  23. package/dist/js/rest-CaWUSrnH.mjs +6 -0
  24. package/dist/js/tls-cert-CLgSQALB.mjs +4 -0
  25. package/dist/js/tls-cert-CV-pwxVN.mjs +67 -0
  26. package/package.json +1 -1
  27. package/dist/js/api-DG5W6iwx.mjs +0 -131
  28. package/dist/js/client-hH2PJL8y.mjs +0 -5
  29. package/dist/js/daemon-Ce8WLdGI.mjs +0 -6
  30. package/dist/js/daemon-client-LJdnM_nE.mjs +0 -7
  31. package/dist/js/raw-pty-DmdUf4_w.mjs +0 -5
  32. package/dist/js/rest-DSpGS5XU.mjs +0 -6
  33. /package/dist/js/{billing-blocked-2wju4gC_.mjs → billing-blocked-D3l5kJlX.mjs} +0 -0
  34. /package/dist/js/{client-c4c5MmgN.mjs → client-BTQ1fwzM.mjs} +0 -0
  35. /package/dist/js/{http-error-DzyrsLAZ.mjs → http-error-UHH3mVBF.mjs} +0 -0
  36. /package/dist/js/{output-DYzzdXYV.mjs → output-wY0VQDea.mjs} +0 -0
package/CHANGELOG.md CHANGED
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  - `/search` (alias `/find`) in the chat TUI — opens the conversation picker with its search field focused, so "find a conversation" has a discoverable command instead of being a feature you had to know the bare picker already had. Pass a query inline (`/search billing deep dive`) and the picker opens already narrowed to the matches; bare `/search` opens it ready for you to type. The search runs server-side across conversation titles, message bodies, and participant names, the same search the picker exposes.
13
13
  - 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.
14
- - `/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.
14
+ - `/computer` (alias `/stats`) in the chat TUI — a snapshot of the agent's sandbox drawn as colored bar graphs: CPU, memory, and disk usage. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The numbers come from the Skydive API (the same live resource sample the web computer view reads), not by connecting to the sandbox — so the card shows instantly, never waking or hanging on a box that isn't running: when the agent has no live sandbox it simply reads "no sandbox running". 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.
15
15
  - `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.)
16
16
 
17
17
  ## [0.4.0] - 2026-08-07
@@ -0,0 +1,315 @@
1
+ #!/usr/bin/env node
2
+ import { t as HttpError } from "./http-error-UHH3mVBF.mjs";
3
+ import { z } from "zod";
4
+ import http from "node:http";
5
+ import http2 from "node:http2";
6
+
7
+ //#region ../portal-daemon/src/tls-forward.ts
8
+ const TLS_PORT_OFFSET = 1e4;
9
+ const STRIP_HEADERS = new Set([
10
+ "connection",
11
+ "keep-alive",
12
+ "proxy-authenticate",
13
+ "proxy-authorization",
14
+ "proxy-connection",
15
+ "te",
16
+ "trailer",
17
+ "transfer-encoding",
18
+ "upgrade",
19
+ "http2-settings"
20
+ ]);
21
+ /**
22
+ * The opt-in TLS+h2 origin for a forwarded/exposed port (ANY-6872, additive
23
+ * next to the plain listener — never a replacement). Browsers only negotiate
24
+ * h2 over TLS, and h2's stream multiplexing is what lifts the
25
+ * 6-connections-per-origin cap that makes unbundled dev servers crawl through
26
+ * the tunnel; each h2 stream is converted here to an h1 request over a tunnel
27
+ * from `acquireTunnel`. Used by BOTH tunnel surfaces: the CLI's
28
+ * `skydive portal forward` and the desktop daemon's `platform portal expose`.
29
+ *
30
+ * The dev server keeps seeing `Host: localhost:<port>` — the browser's
31
+ * authority is a public name it would reject (Vite 403s unknown hosts), and
32
+ * "looks exactly like localhost" is the product contract. The original
33
+ * authority travels in x-forwarded-host / x-forwarded-proto for apps that
34
+ * want it.
35
+ */
36
+ async function startTlsForward({ cert, localPort, targetPort, acquireTunnel, log }) {
37
+ const connectionShims = {
38
+ setNoDelay: () => {},
39
+ setKeepAlive: () => {},
40
+ setTimeout: () => {},
41
+ ref: () => {},
42
+ unref: () => {}
43
+ };
44
+ /**
45
+ * node's http client drives the tunnel: the agent's keep-alive free list
46
+ * gives request→request socket reuse on top of the pool's pre-paid dials,
47
+ * and a tunnel the daemon/dev-server side reaps while idle is evicted from
48
+ * the free list by its 'close' — the next request just adopts a fresh one.
49
+ * maxSockets mirrors the pool cap: every socket here holds an edge WS open,
50
+ * and ANY-6873 is the honest fix for wanting more concurrency than that.
51
+ *
52
+ * The base signature allows synchronous implementations to return the
53
+ * socket; this one is asynchronous, so it always uses the callback and
54
+ * returns undefined (the documented async contract). The agent core always
55
+ * passes the callback — the error branch below guards the contract anyway
56
+ * rather than assuming it.
57
+ */
58
+ class TunnelAgent extends http.Agent {
59
+ createConnection(_options, callback) {
60
+ if (!callback) throw new Error("TunnelAgent.createConnection requires the async callback");
61
+ (async () => {
62
+ let tunnel;
63
+ try {
64
+ tunnel = await acquireTunnel();
65
+ } catch (error) {
66
+ callback(error instanceof Error ? error : new Error(String(error)));
67
+ return;
68
+ }
69
+ Object.assign(tunnel.stream, connectionShims);
70
+ tunnel.stream.resume();
71
+ callback(null, tunnel.stream);
72
+ })();
73
+ }
74
+ }
75
+ const agent = new TunnelAgent({
76
+ keepAlive: true,
77
+ maxSockets: 16
78
+ });
79
+ const server = http2.createSecureServer({
80
+ key: cert.key,
81
+ cert: cert.cert,
82
+ allowHTTP1: true
83
+ });
84
+ const liveSessions = /* @__PURE__ */ new Set();
85
+ server.on("session", (session) => {
86
+ liveSessions.add(session);
87
+ session.once("close", () => liveSessions.delete(session));
88
+ });
89
+ server.on("secureConnection", (socket) => {
90
+ liveSessions.add(socket);
91
+ socket.once("close", () => liveSessions.delete(socket));
92
+ });
93
+ server.on("request", (req, res) => {
94
+ const headers = {};
95
+ for (const [name, value] of Object.entries(req.headers)) {
96
+ if (name.startsWith(":") || STRIP_HEADERS.has(name)) continue;
97
+ if (value !== void 0) headers[name] = value;
98
+ }
99
+ headers.host = `localhost:${targetPort}`;
100
+ headers["x-forwarded-proto"] = "https";
101
+ headers["x-forwarded-host"] = cert.hostname;
102
+ const upstream = http.request({
103
+ host: "localhost",
104
+ port: targetPort,
105
+ method: req.method,
106
+ path: req.url,
107
+ headers,
108
+ agent
109
+ }, (upstreamRes) => {
110
+ const resHeaders = {};
111
+ for (const [name, value] of Object.entries(upstreamRes.headers)) {
112
+ if (STRIP_HEADERS.has(name)) continue;
113
+ if (value !== void 0) resHeaders[name] = value;
114
+ }
115
+ res.writeHead(upstreamRes.statusCode ?? 502, resHeaders);
116
+ upstreamRes.pipe(res);
117
+ upstreamRes.on("error", () => res.destroy());
118
+ });
119
+ upstream.on("error", (err) => {
120
+ log(`forward(tls): upstream request failed: ${err.message}`);
121
+ if (!res.headersSent) {
122
+ res.writeHead(502, { "content-type": "text/plain" });
123
+ res.end("portal forward: tunnel request failed");
124
+ } else res.destroy();
125
+ });
126
+ req.pipe(upstream);
127
+ req.on("error", () => upstream.destroy());
128
+ });
129
+ server.on("upgrade", (req, socket, head) => {
130
+ socket.pause();
131
+ (async () => {
132
+ let tunnel;
133
+ try {
134
+ tunnel = await acquireTunnel();
135
+ } catch (err) {
136
+ log(`forward(tls): upgrade tunnel failed: ${err instanceof Error ? err.message : String(err)}`);
137
+ socket.destroy();
138
+ return;
139
+ }
140
+ const lines = [`${req.method} ${req.url} HTTP/1.1`];
141
+ for (let i = 0; i < req.rawHeaders.length; i += 2) {
142
+ const name = req.rawHeaders[i];
143
+ const value = name?.toLowerCase() === "host" ? `localhost:${targetPort}` : req.rawHeaders[i + 1];
144
+ lines.push(`${name}: ${value}`);
145
+ }
146
+ tunnel.stream.write(lines.join("\r\n") + "\r\n\r\n");
147
+ if (head.length > 0) tunnel.stream.write(head);
148
+ tunnel.stream.on("error", () => socket.destroy());
149
+ tunnel.stream.on("close", () => socket.destroy());
150
+ socket.on("error", () => tunnel.stream.destroy());
151
+ socket.on("close", () => tunnel.stream.destroy());
152
+ socket.pipe(tunnel.stream).pipe(socket);
153
+ socket.resume();
154
+ })();
155
+ });
156
+ server.on("tlsClientError", (err, tlsSocket) => {
157
+ tlsSocket.destroy();
158
+ log(`forward(tls): handshake failed: ${err.message}`);
159
+ });
160
+ const preferredPort = localPort + TLS_PORT_OFFSET <= 65535 ? localPort + TLS_PORT_OFFSET : 0;
161
+ return {
162
+ port: await new Promise((resolve, reject) => {
163
+ const onError = (err) => {
164
+ if (err.code === "EADDRINUSE" && preferredPort !== 0) {
165
+ server.listen(0, "127.0.0.1");
166
+ return;
167
+ }
168
+ server.removeListener("error", onError);
169
+ reject(err);
170
+ };
171
+ server.on("error", onError);
172
+ server.on("listening", () => {
173
+ server.removeListener("error", onError);
174
+ const addr = server.address();
175
+ resolve(addr && typeof addr === "object" ? addr.port : preferredPort);
176
+ });
177
+ server.listen(preferredPort, "127.0.0.1");
178
+ }),
179
+ hostname: cert.hostname,
180
+ close: () => new Promise((resolve) => {
181
+ agent.destroy();
182
+ server.close(() => resolve());
183
+ for (const live of liveSessions) live.destroy();
184
+ })
185
+ };
186
+ }
187
+
188
+ //#endregion
189
+ //#region ../portal-daemon/src/api.ts
190
+ /**
191
+ * The portal's session-authed REST surface, shared by `PortalClient` (the
192
+ * TUI/`portal open` connection) and the `skydive portal` management
193
+ * commands, so the endpoint contracts and response schemas live in exactly
194
+ * one place.
195
+ */
196
+ const deviceSchema = z.object({
197
+ id: z.string(),
198
+ machineName: z.string(),
199
+ friendlyName: z.string(),
200
+ connected: z.boolean(),
201
+ lastSeen: z.string().nullable(),
202
+ grantedAgentIds: z.array(z.string())
203
+ });
204
+ const devicesResponseSchema = z.object({
205
+ devices: z.array(deviceSchema),
206
+ agents: z.array(z.object({
207
+ id: z.string(),
208
+ name: z.string()
209
+ }))
210
+ });
211
+ const deviceTokenSchema = z.object({ token: z.string().min(1) });
212
+ async function portalFetch(auth, path, init) {
213
+ const res = await fetch(`${auth.appUrl}${path}`, {
214
+ method: init.method,
215
+ headers: {
216
+ authorization: `Bearer ${auth.sessionToken}`,
217
+ accept: "application/json",
218
+ ...init.body ? { "content-type": "application/json" } : {}
219
+ },
220
+ ...init.body ? { body: init.body } : {}
221
+ });
222
+ if (!res.ok) {
223
+ const body = await res.text().catch(() => "");
224
+ throw new HttpError(res.status, body);
225
+ }
226
+ return res.json();
227
+ }
228
+ async function fetchPortalDevices(auth) {
229
+ const json = await portalFetch(auth, "/api/v1/portal/devices", { method: "GET" });
230
+ return devicesResponseSchema.parse(json);
231
+ }
232
+ const registerResponseSchema = z.object({ device: z.object({ id: z.string() }) });
233
+ /**
234
+ * Register this machine's device row without connecting. Connecting registers
235
+ * as a side effect; this covers granting an agent on a machine that has never
236
+ * shared yet (the grant references the device row).
237
+ */
238
+ async function registerPortalDevice(auth, { machineName, friendlyName }) {
239
+ const json = await portalFetch(auth, "/api/v1/portal/devices", {
240
+ method: "POST",
241
+ body: JSON.stringify({
242
+ machineName,
243
+ friendlyName
244
+ })
245
+ });
246
+ return registerResponseSchema.parse(json).device;
247
+ }
248
+ /** Short-lived token the machine presents when dialing the portal WebSocket. */
249
+ async function mintPortalDeviceToken(auth) {
250
+ const json = await portalFetch(auth, "/api/v1/portal/device-token", { method: "POST" });
251
+ return deviceTokenSchema.parse(json).token;
252
+ }
253
+ const forwardTargetSchema = z.object({
254
+ daemonOrigin: z.string().min(1),
255
+ token: z.string().min(1),
256
+ expiresInSeconds: z.number()
257
+ });
258
+ /**
259
+ * Everything `portal forward` needs to dial an agent's sandbox daemon through
260
+ * the agent-webserver edge Worker: the daemon's stable public origin and a
261
+ * daemon auth token (canUse-gated server-side).
262
+ */
263
+ async function fetchForwardTarget(auth, agentId) {
264
+ const json = await portalFetch(auth, "/api/v1/portal/forward-target", {
265
+ method: "POST",
266
+ body: JSON.stringify({ agentId })
267
+ });
268
+ return forwardTargetSchema.parse(json);
269
+ }
270
+ async function grantPortalAccess(auth, { deviceId, agentId, conversationId }) {
271
+ await portalFetch(auth, `/api/v1/portal/devices/${encodeURIComponent(deviceId)}/grants`, {
272
+ method: "POST",
273
+ body: JSON.stringify({
274
+ agentId,
275
+ conversationId
276
+ })
277
+ });
278
+ }
279
+ async function revokePortalAccess(auth, { deviceId, agentId }) {
280
+ await portalFetch(auth, `/api/v1/portal/devices/${encodeURIComponent(deviceId)}/grants/${encodeURIComponent(agentId)}`, { method: "DELETE" });
281
+ }
282
+ /**
283
+ * The device row for a given machine identity. Matching is by `machineName`
284
+ * equality — the stable handle the machine registers under, not the display
285
+ * label.
286
+ */
287
+ function findThisDevice(devices, machineName) {
288
+ return devices.find((device) => device.machineName === machineName) ?? null;
289
+ }
290
+ /**
291
+ * One-time grant migration onto the merged device. Earlier CLI builds
292
+ * registered a separate `<machineName>-cli` device, so a user's existing
293
+ * approvals hang off that row; the merged device would start with zero grants
294
+ * and every already-authorized agent would ask again. Copy any grant the
295
+ * merged device is missing (the grant endpoint upserts, so re-runs are
296
+ * no-ops). The legacy row is left in place — an old CLI build may still
297
+ * connect under it. Returns how many grants were copied.
298
+ */
299
+ async function unifyLegacyCliGrants(auth, machineName) {
300
+ const { devices } = await fetchPortalDevices(auth);
301
+ const merged = findThisDevice(devices, machineName);
302
+ const legacy = findThisDevice(devices, `${machineName}-cli`);
303
+ if (!merged || !legacy) return 0;
304
+ const have = new Set(merged.grantedAgentIds);
305
+ const missing = legacy.grantedAgentIds.filter((id) => !have.has(id));
306
+ for (const agentId of missing) await grantPortalAccess(auth, {
307
+ deviceId: merged.id,
308
+ agentId,
309
+ conversationId: null
310
+ });
311
+ return missing.length;
312
+ }
313
+
314
+ //#endregion
315
+ export { mintPortalDeviceToken as a, unifyLegacyCliGrants as c, grantPortalAccess as i, startTlsForward as l, fetchPortalDevices as n, registerPortalDevice as o, findThisDevice as r, revokePortalAccess as s, fetchForwardTarget as t };
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { a as billingBlockedOutcomeSchema, i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError, r as billingBlockedJsonResult, t as BILLING_BLOCKED_EXIT_CODE } from "./billing-blocked-2wju4gC_.mjs";
2
+ import { a as billingBlockedOutcomeSchema, i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError, r as billingBlockedJsonResult, t as BILLING_BLOCKED_EXIT_CODE } from "./billing-blocked-D3l5kJlX.mjs";
3
3
 
4
4
  export { BILLING_BLOCKED_EXIT_CODE, BillingBlockedError, billingBlockedJsonResult };
package/dist/js/bin.mjs CHANGED
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { A as takenAliasNames, B as name, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, I as getSessionIdentity, L as listWorkspaces, M as defaultInstallEnv, N as detectShell, O as installAgentAlias, P as ensureActiveOrganization, R as resolveWorkspaceId, S as themes, T as machineOsFromPlatform, V as version, a as installCrashHandler, j as SUPPORTED_SHELLS, k as slugifyAliasName, t as maybeStartProfiling, u as brandHelpArt, w as buildImportSeedPrompt, z as setActiveWorkspace } from "./profiler-BoO7ldO0.mjs";
3
- import { A as getShareMachineDefault, C as getConfigPath, D as getPromptHistoryPath, E as getPreference, F as resolveAppUrl, H as saveSession, I as resolveChatAuth, L as resolveConfig, M as getStoredApiKeyWorkspaceName, N as getUpdateCheckDisabled, R as resolveManagementAuth, S as deleteConfig, T as getLastSeenVersion, V as saveConfig, W as setLastSeenVersion, _ as API_KEY_FAMILY_PREFIX, g as API_KEYS_URL, i as resolveAgent$1, j as getStoredApiKeyId, v as API_KEY_PREFIX, w as getDefaultAgent, x as PREFERENCES, y as DEFAULT_API_URL, z as resolveSession } from "./print-DYiQC5IW.mjs";
4
- import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
5
- import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
6
- import { t as createRestClient } from "./rest-xXfqT4SX.mjs";
7
- import "./billing-blocked-2wju4gC_.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-DuxaUuek.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";
2
+ import { A as takenAliasNames, B as name, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, I as getSessionIdentity, L as listWorkspaces, M as defaultInstallEnv, N as detectShell, O as installAgentAlias, P as ensureActiveOrganization, R as resolveWorkspaceId, S as themes, T as machineOsFromPlatform, V as version, a as installCrashHandler, j as SUPPORTED_SHELLS, k as slugifyAliasName, t as maybeStartProfiling, u as brandHelpArt, w as buildImportSeedPrompt, z as setActiveWorkspace } from "./profiler-CJMnC90G.mjs";
3
+ import { A as getShareMachineDefault, C as getConfigPath, D as getPromptHistoryPath, E as getPreference, F as resolveAppUrl, H as saveSession, I as resolveChatAuth, L as resolveConfig, M as getStoredApiKeyWorkspaceName, N as getUpdateCheckDisabled, R as resolveManagementAuth, S as deleteConfig, T as getLastSeenVersion, V as saveConfig, W as setLastSeenVersion, _ as API_KEY_FAMILY_PREFIX, g as API_KEYS_URL, i as resolveAgent$1, j as getStoredApiKeyId, v as API_KEY_PREFIX, w as getDefaultAgent, x as PREFERENCES, y as DEFAULT_API_URL, z as resolveSession } from "./print-Clgq46GU.mjs";
4
+ import { n as printError, r as printTable, t as output } from "./output-wY0VQDea.mjs";
5
+ import { t as HttpError } from "./http-error-UHH3mVBF.mjs";
6
+ import { t as createRestClient } from "./rest-C6E4mS2A.mjs";
7
+ import "./billing-blocked-D3l5kJlX.mjs";
8
+ import { r as resolveMachineIdentity } from "./client-d6K9qm6B.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-CxFxH36O.mjs";
10
+ import "./tls-cert-CV-pwxVN.mjs";
11
+ import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-DQCaztBg.mjs";
12
+ import { t as SandboxStream } from "./client-BTQ1fwzM.mjs";
12
13
  import { hideBin } from "yargs/helpers";
13
14
  import yargs from "yargs";
14
15
  import { hostname, tmpdir } from "node:os";
@@ -1584,7 +1585,7 @@ const importCommand = {
1584
1585
  process.exit(1);
1585
1586
  }
1586
1587
  }
1587
- const { runChat } = await import("./boot-0-dpPM1_.mjs");
1588
+ const { runChat } = await import("./boot-yyXrIeVy.mjs");
1588
1589
  await runChat({
1589
1590
  appUrl,
1590
1591
  sessionToken: session.value.sessionToken,
@@ -1614,7 +1615,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1614
1615
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
1615
1616
  process.exit(1);
1616
1617
  }
1617
- const { connectMachineShare } = await import("./print-share-BH9gvCls.mjs");
1618
+ const { connectMachineShare } = await import("./print-share-BBy3OTno.mjs");
1618
1619
  const machineShare = await connectMachineShare({
1619
1620
  appUrl,
1620
1621
  sessionToken: session.value.sessionToken,
@@ -1622,7 +1623,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1622
1623
  });
1623
1624
  const extra = (argv.print ?? "").trim();
1624
1625
  const prompt = buildImportSeedPrompt(process.cwd(), machineOsFromPlatform(process.platform)) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1625
- const { runPrint } = await import("./print-CQkXZ02a.mjs");
1626
+ const { runPrint } = await import("./print-B9djx8GU.mjs");
1626
1627
  try {
1627
1628
  const result = await runPrint({
1628
1629
  appUrl,
@@ -2029,7 +2030,7 @@ const chatCommand = {
2029
2030
  sessionToken: auth.value.token,
2030
2031
  agentSelector: argv.agent ?? null
2031
2032
  });
2032
- const { runChat } = await import("./boot-0-dpPM1_.mjs");
2033
+ const { runChat } = await import("./boot-yyXrIeVy.mjs");
2033
2034
  await runChat({
2034
2035
  appUrl: auth.value.appUrl,
2035
2036
  sessionToken: auth.value.token,
@@ -2113,7 +2114,7 @@ async function runPrintMode({ argv, appUrl }) {
2113
2114
  printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2114
2115
  process.exit(1);
2115
2116
  }
2116
- const { runPrint, readStdin } = await import("./print-CQkXZ02a.mjs");
2117
+ const { runPrint, readStdin } = await import("./print-B9djx8GU.mjs");
2117
2118
  const workspaceId = await resolveWorkspaceFlag({
2118
2119
  appUrl,
2119
2120
  sessionToken: auth.value.token,
@@ -2143,7 +2144,7 @@ async function runPrintMode({ argv, appUrl }) {
2143
2144
  process.exit(1);
2144
2145
  }
2145
2146
  } else {
2146
- const { connectMachineShare } = await import("./print-share-BH9gvCls.mjs");
2147
+ const { connectMachineShare } = await import("./print-share-BBy3OTno.mjs");
2147
2148
  machineShare = await connectMachineShare({
2148
2149
  appUrl: auth.value.appUrl,
2149
2150
  sessionToken: auth.value.token,
@@ -2164,7 +2165,7 @@ async function runPrintMode({ argv, appUrl }) {
2164
2165
  });
2165
2166
  if (argv.json) output(argv, result);
2166
2167
  } catch (error) {
2167
- const { BillingBlockedError, BILLING_BLOCKED_EXIT_CODE, billingBlockedJsonResult } = await import("./billing-blocked-Dgu5-oDy.mjs");
2168
+ const { BillingBlockedError, BILLING_BLOCKED_EXIT_CODE, billingBlockedJsonResult } = await import("./billing-blocked-SE6tySLd.mjs");
2168
2169
  if (error instanceof BillingBlockedError) {
2169
2170
  if (argv.json) output(argv, billingBlockedJsonResult(error, null));
2170
2171
  printError(error.message);
@@ -2208,7 +2209,7 @@ const getCommand$1 = {
2208
2209
  printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2209
2210
  process.exit(1);
2210
2211
  }
2211
- const { messageGet } = await import("./print-CQkXZ02a.mjs");
2212
+ const { messageGet } = await import("./print-B9djx8GU.mjs");
2212
2213
  try {
2213
2214
  const result = await messageGet({
2214
2215
  appUrl: auth.value.appUrl,
@@ -2218,7 +2219,7 @@ const getCommand$1 = {
2218
2219
  });
2219
2220
  if (argv.json) output(argv, result);
2220
2221
  } catch (error) {
2221
- const { BillingBlockedError, BILLING_BLOCKED_EXIT_CODE, billingBlockedJsonResult } = await import("./billing-blocked-Dgu5-oDy.mjs");
2222
+ const { BillingBlockedError, BILLING_BLOCKED_EXIT_CODE, billingBlockedJsonResult } = await import("./billing-blocked-SE6tySLd.mjs");
2222
2223
  if (error instanceof BillingBlockedError) {
2223
2224
  if (argv.json) output(argv, billingBlockedJsonResult(error, argv["message-id"]));
2224
2225
  printError(error.message);
@@ -2411,7 +2412,7 @@ const switchCommand = {
2411
2412
  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.");
2412
2413
  process.exit(1);
2413
2414
  }
2414
- const { runWorkspacePicker } = await import("./boot-0-dpPM1_.mjs");
2415
+ const { runWorkspacePicker } = await import("./boot-yyXrIeVy.mjs");
2415
2416
  await runWorkspacePicker(session);
2416
2417
  return;
2417
2418
  }
@@ -2490,7 +2491,7 @@ const openCommand = {
2490
2491
  const agent = argv.agent ? resolveAgent$1((await fetchPortalDevices(session)).agents, argv.agent) : null;
2491
2492
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
2492
2493
  const { machineName } = await resolveMachineIdentity(null);
2493
- const { PortalDaemonClient } = await import("./daemon-client-LJdnM_nE.mjs");
2494
+ const { PortalDaemonClient } = await import("./daemon-client-1Qfc_Y3J.mjs");
2494
2495
  let lastLine = "";
2495
2496
  let signalConnected;
2496
2497
  const connected = new Promise((resolve) => {
@@ -2736,15 +2737,19 @@ const forwardCommand = {
2736
2737
  const agent = resolveAgent$1((await fetchPortalDevices(session)).agents, argv.agent ?? null);
2737
2738
  const targetPort = argv.port;
2738
2739
  const localPort = argv["local-port"] ?? targetPort;
2739
- const { startForward } = await import("./forward-DL6DYqyc.mjs");
2740
+ const { startForward } = await import("./forward-zwB55Bls.mjs");
2741
+ const { defaultTlsCertSource } = await import("./tls-cert-CLgSQALB.mjs");
2742
+ const log = (msg) => console.error(msg);
2740
2743
  const listener = await startForward({
2741
2744
  auth: session,
2742
2745
  agentId: agent.id,
2743
2746
  localPort,
2744
2747
  targetPort,
2745
- log: (msg) => console.error(msg)
2748
+ tlsCertSource: defaultTlsCertSource(process.env, log),
2749
+ log
2746
2750
  });
2747
2751
  console.log(`Forwarding http://localhost:${listener.port} -> ${agent.name}'s sandbox port ${targetPort}. ctrl+c to stop.`);
2752
+ if (listener.tls) console.log(` https://${listener.tls.hostname}:${listener.tls.port} (TLS — browsers negotiate HTTP/2 here, which loads module-heavy dev servers much faster)`);
2748
2753
  await new Promise((resolve) => {
2749
2754
  process.once("SIGINT", () => resolve());
2750
2755
  process.once("SIGTERM", () => resolve());
@@ -2800,8 +2805,8 @@ const sandboxCommand = {
2800
2805
  }).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`"),
2801
2806
  handler: async (argv) => {
2802
2807
  const session = requireSession(argv);
2803
- const { createRestClient } = await import("./rest-DSpGS5XU.mjs");
2804
- const { resolveAgent } = await import("./print-CQkXZ02a.mjs");
2808
+ const { createRestClient } = await import("./rest-CaWUSrnH.mjs");
2809
+ const { resolveAgent } = await import("./print-B9djx8GU.mjs");
2805
2810
  const client = createRestClient({
2806
2811
  appUrl: session.appUrl,
2807
2812
  sessionToken: session.sessionToken
@@ -2870,7 +2875,7 @@ async function runPty({ session, agentId, agentName }) {
2870
2875
  return 1;
2871
2876
  }
2872
2877
  console.error(`Connecting to ${agentName}'s sandbox… (Ctrl-] detaches)`);
2873
- const { runRawPtyPassthrough } = await import("./raw-pty-DmdUf4_w.mjs");
2878
+ const { runRawPtyPassthrough } = await import("./raw-pty-g3kATVQe.mjs");
2874
2879
  const result = await runRawPtyPassthrough({
2875
2880
  stdin: process.stdin,
2876
2881
  stdout: process.stdout,
@@ -2958,8 +2963,8 @@ const fsEditCommand = {
2958
2963
  handler: async (argv) => {
2959
2964
  const session = requireSession(argv);
2960
2965
  const remotePath = argv.path;
2961
- const { createRestClient } = await import("./rest-DSpGS5XU.mjs");
2962
- const { resolveAgent } = await import("./print-CQkXZ02a.mjs");
2966
+ const { createRestClient } = await import("./rest-CaWUSrnH.mjs");
2967
+ const { resolveAgent } = await import("./print-B9djx8GU.mjs");
2963
2968
  const client = createRestClient({
2964
2969
  appUrl: session.appUrl,
2965
2970
  sessionToken: session.sessionToken
@@ -4193,7 +4198,7 @@ function setupUpdateCheck(argv) {
4193
4198
 
4194
4199
  //#endregion
4195
4200
  //#region src/changelog.generated.ts
4196
- 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- `/search` (alias `/find`) in the chat TUI — opens the conversation picker with its search field focused, so \"find a conversation\" has a discoverable command instead of being a feature you had to know the bare picker already had. Pass a query inline (`/search billing deep dive`) and the picker opens already narrowed to the matches; bare `/search` opens it ready for you to type. The search runs server-side across conversation titles, message bodies, and participant names, the same search the picker exposes.\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";
4201
+ 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- `/search` (alias `/find`) in the chat TUI — opens the conversation picker with its search field focused, so \"find a conversation\" has a discoverable command instead of being a feature you had to know the bare picker already had. Pass a query inline (`/search billing deep dive`) and the picker opens already narrowed to the matches; bare `/search` opens it ready for you to type. The search runs server-side across conversation titles, message bodies, and participant names, the same search the picker exposes.\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, memory, and disk usage. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The numbers come from the Skydive API (the same live resource sample the web computer view reads), not by connecting to the sandbox — so the card shows instantly, never waking or hanging on a box that isn't running: when the agent has no live sandbox it simply reads \"no sandbox running\". 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.\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";
4197
4202
 
4198
4203
  //#endregion
4199
4204
  //#region src/whats-new.ts
@@ -4336,7 +4341,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4336
4341
  process.exit(0);
4337
4342
  }
4338
4343
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4339
- const { runPortalDaemon } = await import("./daemon-Ce8WLdGI.mjs");
4344
+ const { runPortalDaemon } = await import("./daemon-Btd2436i.mjs");
4340
4345
  runPortalDaemon(process.argv);
4341
4346
  } else runCli();
4342
4347
  function runCli() {