skydive-cli 0.6.0-beta.13 → 0.6.0-beta.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { c as version$1 } from "./rest-BL0LvgFv.mjs";
3
- import { E as getConfigPath } from "./print-Cy646pv0.mjs";
2
+ import { c as version$1 } from "./rest-nLyqK_lO.mjs";
3
+ import { D as getConfigPath } from "./print-C0ldGGYB.mjs";
4
4
  import os from "node:os";
5
5
  import path from "node:path";
6
6
  import { err, ok } from "neverthrow";
@@ -1547,6 +1547,51 @@ function formatMb(bytes) {
1547
1547
  return `${(bytes / MB).toFixed(1)} MB`;
1548
1548
  }
1549
1549
 
1550
+ //#endregion
1551
+ //#region src/chat/tui/autowrap.ts
1552
+ /**
1553
+ * Why the TUI turns the terminal's autowrap off for its lifetime.
1554
+ *
1555
+ * OpenTUI's incremental cell-diff emitter positions every run with an
1556
+ * absolute cursor move — it never relies on the terminal to advance the
1557
+ * cursor — but it leaves the terminal's autowrap (DECAWM) enabled. When a
1558
+ * run reaches the last column, the host terminal wraps its cursor to column
1559
+ * 1 of the next row and paints the run's tail there, into cells owned by a
1560
+ * different element. The diff buffer then records the *intended* cells, so
1561
+ * those stray bytes are never repainted and unrelated text smears together
1562
+ * until a full repaint (a resize). Filed upstream with a repro and root
1563
+ * cause: https://github.com/anomalyco/opentui/issues/1187 — unfixed there,
1564
+ * the consumer-side fix (verified in numux#115) is to disable DECAWM while
1565
+ * the renderer runs. Pane content still wraps, inside OpenTUI's own grid.
1566
+ */
1567
+ const AUTOWRAP_OFF = "\x1B[?7l";
1568
+ const AUTOWRAP_ON = "\x1B[?7h";
1569
+ /** Escape hatch: if any surface turns out to depend on host autowrap. */
1570
+ const keepAutowrap = () => Boolean(process.env["SKYDIVE_TUI_AUTOWRAP"]);
1571
+ let disabledBy = false;
1572
+ /**
1573
+ * Disable host autowrap so the diff emitter's runs can never wrap onto the
1574
+ * next row. No-op when stdout is not a terminal (piped output, tests) and
1575
+ * under `SKYDIVE_TUI_AUTOWRAP`.
1576
+ */
1577
+ function disableTerminalAutowrap(stdout = process.stdout) {
1578
+ if (!stdout.isTTY || keepAutowrap() || disabledBy) return;
1579
+ disabledBy = true;
1580
+ stdout.write(AUTOWRAP_OFF);
1581
+ }
1582
+ /**
1583
+ * Restore host autowrap. The terminal mode is a property of the host, so
1584
+ * every teardown path must run this even when the renderer cannot finish
1585
+ * its own teardown: the renderer's `onDestroy` hook covers renderer-driven
1586
+ * exits, and the forced-fallback reset in `hard-exit.ts` carries the
1587
+ * restore for a teardown that never got there. Idempotent.
1588
+ */
1589
+ function restoreTerminalAutowrap(stdout = process.stdout) {
1590
+ if (!disabledBy) return;
1591
+ disabledBy = false;
1592
+ stdout.write(AUTOWRAP_ON);
1593
+ }
1594
+
1550
1595
  //#endregion
1551
1596
  //#region src/crash/install.ts
1552
1597
  let installed = false;
@@ -1566,6 +1611,7 @@ function installCrashHandler(opts = {}) {
1566
1611
  if (installed) return;
1567
1612
  installed = true;
1568
1613
  process.on("uncaughtException", (error) => {
1614
+ restoreTerminalAutowrap();
1569
1615
  const memory = safeMemory();
1570
1616
  printFatalNotice(writeCrashReport(buildCrashReport({
1571
1617
  reason: "uncaughtException",
@@ -1594,4 +1640,4 @@ function printFatalNotice(file, memory) {
1594
1640
  }
1595
1641
 
1596
1642
  //#endregion
1597
- export { installAgentAlias as A, resolveWorkspaceId as B, themeVersion as C, machineOsFromPlatform as D, buildImportSeedPrompt as E, detectShell as F, ensureActiveOrganization as I, getActiveWorkspaceId as L, takenAliasNames as M, SUPPORTED_SHELLS as N, aliasActivationHint as O, defaultInstallEnv as P, getSessionIdentity as R, themeModeFromColorFgBg as S, themesForMode as T, setActiveWorkspace as V, monoTheme as _, WORDMARK as a, themeForMode as b, getAutomaticLogsDir as c, profilingEnabled as d, record as f, findTheme as g, applyTheme as h, MARK_CELLS as i, slugifyAliasName as j, dedupeAliasName as k, maybeStartProfiling as l, DEFAULT_THEME_ID as m, buildCrashReport as n, brandHelpArt as o, writeArtifact as p, writeCrashReport as r, splashFitsWidth as s, installCrashHandler as t, profileDir as u, noColorRequested as v, themes as w, themeMode as x, theme as y, listWorkspaces as z };
1643
+ export { aliasActivationHint as A, getSessionIdentity as B, themeMode as C, themesForMode as D, themes as E, SUPPORTED_SHELLS as F, resolveWorkspaceId as H, defaultInstallEnv as I, detectShell as L, installAgentAlias as M, slugifyAliasName as N, buildImportSeedPrompt as O, takenAliasNames as P, ensureActiveOrganization as R, themeForMode as S, themeVersion as T, setActiveWorkspace as U, listWorkspaces as V, applyTheme as _, writeCrashReport as a, noColorRequested as b, brandHelpArt as c, maybeStartProfiling as d, profileDir as f, DEFAULT_THEME_ID as g, writeArtifact as h, buildCrashReport as i, dedupeAliasName as j, machineOsFromPlatform as k, splashFitsWidth as l, record as m, disableTerminalAutowrap as n, MARK_CELLS as o, profilingEnabled as p, restoreTerminalAutowrap as r, WORDMARK as s, installCrashHandler as t, getAutomaticLogsDir as u, findTheme as v, themeModeFromColorFgBg as w, theme as x, monoTheme as y, getActiveWorkspaceId as z };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./rest-BL0LvgFv.mjs";
3
- import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-Cy646pv0.mjs";
2
+ import "./rest-nLyqK_lO.mjs";
3
+ import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-C0ldGGYB.mjs";
4
4
  import "./billing-blocked-D3l5kJlX.mjs";
5
5
 
6
6
  export { messageGet, readStdin, resolveAgent, runPrint };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-BL0LvgFv.mjs";
2
+ import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-nLyqK_lO.mjs";
3
3
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
4
4
  import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-D3l5kJlX.mjs";
5
5
  import path from "node:path";
@@ -512,18 +512,18 @@ function readQuestionEntries(raw) {
512
512
  }];
513
513
  });
514
514
  }
515
- /**
516
- * The `platform ask` form. The web renders it as an interactive picker; here
517
- * it maps onto an answer_question button so ctrl+r (and letter shortcuts)
518
- * open an in-TUI picker. The composed answer is sent as a normal user
519
- * message — same non-blocking model as the web card. Without this the spec
520
- * is not a Card, parses to null, and the question is silently dropped.
521
- */
522
515
  /** Compose the user-message body the web card also sends. */
523
516
  function composeQuestionAnswer(questions, answers) {
524
517
  if (questions.length === 1) return (answers[0] ?? []).join(", ");
525
518
  return questions.map((q, i) => `${q.question} → ${(answers[i] ?? []).join(", ")}`).join("\n");
526
519
  }
520
+ /** Build the typed durable payload that settles this exact question card. */
521
+ function composeQuestionAnswerEntries(questions, answers) {
522
+ return questions.map((question, index) => ({
523
+ question: question.question,
524
+ answer: (answers[index] ?? []).join(", ")
525
+ }));
526
+ }
527
527
  function parseQuestionCard(rootEl) {
528
528
  const props = isRecord(rootEl.props) ? rootEl.props : {};
529
529
  const cardId = optionalString(props.cardId);
@@ -708,8 +708,8 @@ function isBlockingCardAction(action) {
708
708
  * should target, prioritizing blocking cards over `platform ask` forms. When
709
709
  * both a blocking card and a stale `answer_question` are waiting, ctrl+r must
710
710
  * approve the thing the agent is stalled on, not re-answer an earlier ask that
711
- * never stops being actionable (the CLI only settles it via the AskPicker, so
712
- * an ignored or composer-answered ask lingers forever). Falls through to the
711
+ * can remain actionable when ignored or answered as plain composer text.
712
+ * Falls through to the
713
713
  * ask forms only when they are the only actionable cards left. Preserves input
714
714
  * order within a tier, so a single card and genuine multi-card cases behave
715
715
  * exactly as before.
@@ -823,7 +823,7 @@ function summarizeConnectCard(card, appUrl) {
823
823
  }
824
824
  /**
825
825
  * Parse a `data-anyone-render-spec` stream chunk into a connect-card summary,
826
- * or null if the chunk isn't a connect card (other render specs — training,
826
+ * or null if the chunk isn't a connect card (other render specs — e.g.
827
827
  * deep-learn — parse to null, same as the TUI). A card that arrives already
828
828
  * settled (a compute request's decided re-emission) is an FYI, not an action,
829
829
  * so it stays out of the "[action needed]" stream too.
@@ -900,6 +900,7 @@ async function runPrint({ appUrl, sessionToken, workspaceId, prompt, agentSelect
900
900
  conversationId,
901
901
  content: prompt,
902
902
  attachmentIds: [],
903
+ questionAnswer: null,
903
904
  clientSurface: "cli"
904
905
  });
905
906
  } catch (err) {
@@ -1077,4 +1078,4 @@ async function readStdin() {
1077
1078
  }
1078
1079
 
1079
1080
  //#endregion
1080
- export { getPromptHistoryPath as A, resolveConfig as B, DEFAULT_APP_URL as C, getDefaultAgent as D, getConfigPath as E, getStoredApiKeyWorkspaceName as F, saveSession as G, resolveSession as H, getUpdateCheckDisabled as I, saveTheme as K, recordDefaultAgent as L, getSavedTheme as M, getShareMachineDefault as N, getLastSeenVersion as O, getStoredApiKeyId as P, resolveAppUrl as R, DEFAULT_API_URL as S, deleteConfig as T, resolveWebUrl as U, resolveManagementAuth as V, saveConfig as W, parseConnectCard as _, runPrint as a, API_KEY_FAMILY_PREFIX as b, actionableCardVerb as c, parseOauthConnectParams as d, prioritizeActionableCards as f, computeSettledLabel as g, composeQuestionAnswer as h, resolveAgent as i, getReviewStateDir as j, getPreference as k, cardActionErrorMessage as l, resolveConnectUrl as m, messageGet as n, toPrintError as o, reconcileMaskedInput as p, setLastSeenVersion as q, readStdin as r, MASK_CHAR as s, collectRunText as t, parseExternalOauthConnectParams as u, specKeyFor as v, PREFERENCES as w, API_KEY_PREFIX as x, API_KEYS_URL as y, resolveChatAuth as z };
1081
+ export { getPreference as A, resolveChatAuth as B, DEFAULT_API_URL as C, getConfigPath as D, deleteConfig as E, getStoredApiKeyId as F, saveConfig as G, resolveManagementAuth as H, getStoredApiKeyWorkspaceName as I, setLastSeenVersion as J, saveSession as K, getUpdateCheckDisabled as L, getReviewStateDir as M, getSavedTheme as N, getDefaultAgent as O, getShareMachineDefault as P, recordDefaultAgent as R, API_KEY_PREFIX as S, PREFERENCES as T, resolveSession as U, resolveConfig as V, resolveWebUrl as W, computeSettledLabel as _, runPrint as a, API_KEYS_URL as b, actionableCardVerb as c, parseOauthConnectParams as d, prioritizeActionableCards as f, composeQuestionAnswerEntries as g, composeQuestionAnswer as h, resolveAgent as i, getPromptHistoryPath as j, getLastSeenVersion as k, cardActionErrorMessage as l, resolveConnectUrl as m, messageGet as n, toPrintError as o, reconcileMaskedInput as p, saveTheme as q, readStdin as r, MASK_CHAR as s, collectRunText as t, parseExternalOauthConnectParams as u, parseConnectCard as v, DEFAULT_APP_URL as w, API_KEY_FAMILY_PREFIX as x, specKeyFor as y, resolveAppUrl as z };
@@ -14,7 +14,7 @@ import { n as printError } from "./output-C9mb3sUB.mjs";
14
14
  * the reply (and to --json).
15
15
  */
16
16
  async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
17
- const { PortalClient } = await import("./client-D0FfDGC9.mjs");
17
+ const { PortalClient } = await import("./client-D5QIXVx0.mjs");
18
18
  const { defaultTlsCertSource } = await import("./tls-cert-BpCaD5AT.mjs");
19
19
  let signalConnected;
20
20
  const connected = new Promise((resolve) => {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as SandboxStream } from "./client-l6orYfqq.mjs";
2
+ import { t as SandboxStream } from "./client-Cxk3khQu.mjs";
3
3
 
4
4
  //#region src/chat/sandbox/raw-pty.ts
5
5
  /**
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./client-Cxk3khQu.mjs";
3
+ import { t as runRawPtyPassthrough } from "./raw-pty-B-WKaaE3.mjs";
4
+
5
+ export { runRawPtyPassthrough };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-BL0LvgFv.mjs";
2
+ import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-nLyqK_lO.mjs";
3
3
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
4
4
  import "./billing-blocked-D3l5kJlX.mjs";
5
5
 
@@ -6,7 +6,7 @@ import { createParser } from "eventsource-parser";
6
6
 
7
7
  //#region package.json
8
8
  var name = "skydive-cli";
9
- var version = "0.6.0-beta.13";
9
+ var version = "0.6.0-beta.133";
10
10
 
11
11
  //#endregion
12
12
  //#region src/chat/util.ts
@@ -122,6 +122,49 @@ function sendErrorMessage(err) {
122
122
  return fromServer ?? `Send failed (HTTP ${err.status}).`;
123
123
  }
124
124
  const MAX_STREAM_RECONNECTS = 5;
125
+ const GATEWAY_RETRY_STATUSES = new Set([502, 503]);
126
+ const MAX_GATEWAY_RETRIES = 3;
127
+ const MAX_GATEWAY_BACKOFF_MS = 4e3;
128
+ function retryAfterMs(res) {
129
+ const header = res.headers.get("retry-after");
130
+ if (!header) return null;
131
+ const seconds = Number(header);
132
+ if (Number.isFinite(seconds) && seconds >= 0) return Math.ceil(seconds) * 1e3;
133
+ const dateMs = Date.parse(header);
134
+ if (Number.isNaN(dateMs)) return null;
135
+ return Math.max(0, dateMs - Date.now());
136
+ }
137
+ /**
138
+ * First path segment after /api/v1/ — a route resource name ('conversations'),
139
+ * never a user id or user content.
140
+ */
141
+ function gatewayPathGroup(url) {
142
+ return url.match(/\/api\/v1\/([^/?]+)/)?.[1] ?? "other";
143
+ }
144
+ /**
145
+ * Fetch wrapper for the JSON endpoints: idempotent requests (GET/DELETE)
146
+ * retry on 502/503 with short backoff, honoring Retry-After. Non-idempotent
147
+ * methods hard-fail on the first gateway error — a retried POST can
148
+ * double-apply a side effect the upstream already committed before the
149
+ * proxy saw its response.
150
+ */
151
+ async function fetchWithGatewayRetry(url, init) {
152
+ const idempotent = init.method === void 0 || init.method === "GET" || init.method === "DELETE" || init.method === "HEAD";
153
+ for (let attempt = 0;; attempt++) {
154
+ const res = await fetch(url, init);
155
+ if (res.ok || !idempotent || attempt >= MAX_GATEWAY_RETRIES || !GATEWAY_RETRY_STATUSES.has(res.status)) return res;
156
+ const backoff = Math.min(250 * 2 ** attempt, MAX_GATEWAY_BACKOFF_MS);
157
+ const waitMs = retryAfterMs(res) ?? backoff;
158
+ init.onGatewayRetry?.({
159
+ status: res.status,
160
+ attempt: attempt + 1,
161
+ retryAfterMs: waitMs,
162
+ pathGroup: gatewayPathGroup(url)
163
+ });
164
+ await res.text().catch(() => "");
165
+ await sleep(waitMs);
166
+ }
167
+ }
125
168
  function createRestClient({ appUrl, sessionToken, workspaceId }) {
126
169
  const baseHeaders = {
127
170
  authorization: `Bearer ${sessionToken}`,
@@ -130,7 +173,13 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
130
173
  };
131
174
  if (workspaceId) baseHeaders["x-workspace-id"] = workspaceId;
132
175
  async function get(path, schema) {
133
- const res = await fetch(`${appUrl}${path}`, { headers: baseHeaders });
176
+ const res = await fetchWithGatewayRetry(`${appUrl}${path}`, {
177
+ headers: baseHeaders,
178
+ onGatewayRetry: (info) => trackGatewayRetry({
179
+ ...info,
180
+ method: "GET"
181
+ })
182
+ });
134
183
  if (!res.ok) throw new HttpError(res.status, await res.text().catch(() => ""));
135
184
  return schema.parse(await res.json());
136
185
  }
@@ -146,6 +195,12 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
146
195
  if (!res.ok) throw new HttpError(res.status, await res.text().catch(() => ""));
147
196
  return schema.parse(await res.json());
148
197
  }
198
+ const trackGatewayRetry = (properties) => {
199
+ post("/api/v1/cli-analytics/track", {
200
+ event: "CLI Rest Gateway Retry",
201
+ properties
202
+ }, z.object({ ok: z.boolean() })).catch(() => {});
203
+ };
149
204
  /**
150
205
  * The agent PATCH is a merge: only the keys present are written, so each
151
206
  * caller sends exactly the settings it means to change.
@@ -154,9 +209,13 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
154
209
  return post(`/api/v1/agents/${encodeURIComponent(agentId)}`, body, updateAgentResponseSchema, "PATCH");
155
210
  }
156
211
  async function del(path) {
157
- const res = await fetch(`${appUrl}${path}`, {
212
+ const res = await fetchWithGatewayRetry(`${appUrl}${path}`, {
158
213
  method: "DELETE",
159
- headers: baseHeaders
214
+ headers: baseHeaders,
215
+ onGatewayRetry: (info) => trackGatewayRetry({
216
+ ...info,
217
+ method: "DELETE"
218
+ })
160
219
  });
161
220
  if (!res.ok) throw new HttpError(res.status, await res.text().catch(() => ""));
162
221
  }
@@ -270,8 +329,11 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
270
329
  return conversation;
271
330
  },
272
331
  listModels: async () => {
273
- const { models } = await get("/api/v1/models", listModelsResponseSchema);
274
- return models;
332
+ const { models, trainingOptedOut } = await get("/api/v1/models", listModelsResponseSchema);
333
+ return {
334
+ models,
335
+ trainingOptedOut: trainingOptedOut ?? false
336
+ };
275
337
  },
276
338
  listModelEfforts: async () => {
277
339
  const { modelConfigOverrides } = await get("/api/v1/models/preferred", modelEffortPreferencesResponseSchema);
@@ -279,6 +341,14 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
279
341
  for (const [modelId, config] of Object.entries(modelConfigOverrides ?? {})) if (config.thinkingLevel) efforts[modelId] = config.thinkingLevel;
280
342
  return efforts;
281
343
  },
344
+ getBillingSummary: async () => {
345
+ const { result } = await get("/api/v1/trpc/v2.billing.getBillingOrgSummary", billingSummaryResponseSchema);
346
+ return result.data;
347
+ },
348
+ getFreeFloorState: async () => {
349
+ const { result } = await get("/api/v1/trpc/v2.billing.freeFloorState", freeFloorStateResponseSchema);
350
+ return result.data;
351
+ },
282
352
  setModelEffort: async ({ modelId, thinkingLevel }) => {
283
353
  await post("/api/v1/models/config", {
284
354
  modelId,
@@ -295,11 +365,17 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
295
365
  thinkingLevel: agent.thinkingLevel ?? null
296
366
  };
297
367
  },
298
- setConversationModel: async ({ conversationId, agentId, model, thinkingLevel }) => post(`/api/v1/conversations/${conversationId}/model`, {
299
- agentId,
300
- model,
301
- thinkingLevel
302
- }, conversationModelResponseSchema),
368
+ setConversationModel: async ({ conversationId, agentId, model, thinkingLevel }) => {
369
+ const settled = await post(`/api/v1/conversations/${conversationId}/model`, {
370
+ agentId,
371
+ model,
372
+ thinkingLevel
373
+ }, conversationModelResponseSchema);
374
+ return {
375
+ ...settled,
376
+ scope: settled.scope ?? null
377
+ };
378
+ },
303
379
  updateAgentEffort: async ({ agentId, thinkingLevel }) => {
304
380
  const { agent } = await patchAgent(agentId, { thinkingLevel });
305
381
  return { thinkingLevel: agent.thinkingLevel ?? null };
@@ -360,6 +436,10 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
360
436
  const { recap } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}/recap`, recapResponseSchema);
361
437
  return recap?.text ?? null;
362
438
  },
439
+ getConversationUsage: async ({ conversationId }) => {
440
+ const { usage } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}/usage`, conversationUsageResponseSchema);
441
+ return usage;
442
+ },
363
443
  listSubagentTasks: async ({ conversationId }) => {
364
444
  const { result } = await get(`/api/v1/trpc/v2.subagentTasks.list?input=${encodeURIComponent(JSON.stringify({ conversationId }))}`, subagentTasksResponseSchema);
365
445
  return new Map(result.data.subagentTasks.map((task) => [task.id, task]));
@@ -422,9 +502,13 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
422
502
  setConversationArchived: async ({ conversationId, archived }) => {
423
503
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
424
504
  },
505
+ setConversationPinned: async ({ conversationId, pinned }) => {
506
+ await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/pin`, { pinned }, z.object({ pinned: z.boolean() }));
507
+ },
425
508
  markConversationRead: async ({ conversationId }) => {
426
509
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/read`, {}, z.object({ read: z.boolean() }));
427
510
  },
511
+ trackAnalyticsEvent: async (input) => post("/api/v1/cli-analytics/track", input, z.object({ ok: z.boolean() })),
428
512
  renameConversation: async ({ conversationId, title }) => {
429
513
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}`, { title }, z.object({ conversation: z.object({ id: z.string() }) }), "PATCH");
430
514
  },
@@ -541,14 +625,34 @@ const platformModelSchema = z.object({
541
625
  providerDisplay: z.string().optional(),
542
626
  reasoning: z.boolean().optional(),
543
627
  compliant: z.boolean().optional(),
628
+ noTraining: z.boolean().optional(),
544
629
  thinkingLevels: z.array(z.string()).optional(),
545
- thinkingLevelLabels: z.record(z.string(), z.string()).optional()
630
+ thinkingLevelLabels: z.record(z.string(), z.string()).optional(),
631
+ signals: z.object({
632
+ intelligence: z.number().int().min(1).max(6).nullable(),
633
+ speed: z.number().int().min(1).max(6).nullable(),
634
+ cost: z.number().int().min(1).max(6).nullable()
635
+ }).optional()
546
636
  }).passthrough();
547
- const listModelsResponseSchema = z.object({ models: z.array(platformModelSchema) });
637
+ const listModelsResponseSchema = z.object({
638
+ models: z.array(platformModelSchema),
639
+ trainingOptedOut: z.boolean().optional()
640
+ });
548
641
  const modelEffortPreferencesResponseSchema = z.object({ modelConfigOverrides: z.record(z.string(), z.object({ thinkingLevel: z.string().optional() })).optional() });
642
+ const billingSummaryResponseSchema = z.object({ result: z.object({ data: z.object({
643
+ planKey: z.string().nullable(),
644
+ blockReason: z.string().nullable(),
645
+ billingEnforcementEnabled: z.boolean()
646
+ }) }) });
647
+ const freeFloorStateResponseSchema = z.object({ result: z.object({ data: z.object({
648
+ available: z.boolean(),
649
+ models: z.array(z.string()),
650
+ resetsAt: z.string().nullable()
651
+ }).nullable() }) });
549
652
  const conversationModelResponseSchema = z.object({
550
653
  model: z.string().nullable(),
551
- thinkingLevel: z.string().nullable()
654
+ thinkingLevel: z.string().nullable(),
655
+ scope: z.enum(["agent", "conversation"]).nullish()
552
656
  });
553
657
  const updateAgentResponseSchema = z.object({ agent: z.object({
554
658
  model: z.string().nullable().optional(),
@@ -582,7 +686,10 @@ const conversationSummarySchema = z.object({
582
686
  channel: z.string().nullable(),
583
687
  channelLabel: z.string().nullable(),
584
688
  viewerArchivedAt: z.string().nullable().optional(),
689
+ viewerPinnedAt: z.string().nullable().optional(),
690
+ viewerParticipates: z.boolean().optional(),
585
691
  unread: z.boolean().optional(),
692
+ activeRun: z.boolean().optional(),
586
693
  agent: conversationAgentSchema,
587
694
  agents: z.array(conversationAgentSchema).optional()
588
695
  });
@@ -636,6 +743,31 @@ const uiMessageSchema = z.object({
636
743
  agentName: z.string().nullish()
637
744
  }).passthrough().optional() }).passthrough().optional()
638
745
  });
746
+ const conversationUsageModelSchema = z.object({
747
+ model: z.string().nullable(),
748
+ promptTokens: z.number(),
749
+ completionTokens: z.number(),
750
+ cacheCreationTokens: z.number(),
751
+ cacheReadTokens: z.number(),
752
+ cents: z.number()
753
+ });
754
+ const conversationUsageSchema = z.object({
755
+ own: z.object({
756
+ inferenceCents: z.number(),
757
+ byModel: z.array(conversationUsageModelSchema)
758
+ }),
759
+ children: z.object({
760
+ inferenceCents: z.number(),
761
+ conversationCount: z.number()
762
+ }),
763
+ compute: z.object({
764
+ cents: z.number(),
765
+ vcpuSeconds: z.number()
766
+ }),
767
+ unpriced: z.array(z.string()),
768
+ totalCents: z.number()
769
+ });
770
+ const conversationUsageResponseSchema = z.object({ usage: conversationUsageSchema.nullable() });
639
771
  const recapResponseSchema = z.object({ recap: z.object({ text: z.string() }).nullable() });
640
772
  const subagentTaskSnapshotSchema = z.object({
641
773
  id: z.string(),
@@ -718,7 +850,8 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
718
850
  id: z.string(),
719
851
  model: z.string().nullable(),
720
852
  modelLocked: z.boolean(),
721
- thinkingLevel: z.string().nullish()
853
+ thinkingLevel: z.string().nullish(),
854
+ agentModel: z.string().nullish()
722
855
  }),
723
856
  z.object({
724
857
  kind: z.literal("run"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.6.0-beta.13",
3
+ "version": "0.6.0-beta.133",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsgo --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@opentui/react": "0.5.8",
34
+ "@opentui/react": "0.6.6",
35
35
  "conf": "^13.0.1",
36
36
  "diff": "9.0.0",
37
37
  "eventsource-parser": "^3.0.8",
@@ -39,7 +39,7 @@
39
39
  "fuzzysort": "^3.1.0",
40
40
  "neverthrow": "^8.2.0",
41
41
  "open": "^10.1.0",
42
- "react": "^19.2.0",
42
+ "react": "^19.0.0",
43
43
  "react-devtools-core": "^7.0.1",
44
44
  "safe-stable-stringify": "^2.3.1",
45
45
  "semver": "^7.7.4",
@@ -51,6 +51,7 @@
51
51
  "zustand": "^5.0.2"
52
52
  },
53
53
  "devDependencies": {
54
+ "@createinc/anyone-agents": "^0.0.0",
54
55
  "@createinc/anyone-portal-daemon": "0.0.0",
55
56
  "@createinc/anyone-sandbox-stream-protocol": "0.0.0",
56
57
  "@createinc/tsconfig": "0.0.0",
@@ -60,10 +61,10 @@
60
61
  "@types/semver": "^7.7.1",
61
62
  "@types/yargs": "^17.0.33",
62
63
  "@typescript/native-preview": "^7.0.0-dev.20260113.1",
63
- "@vitest/coverage-v8": "^2.1.8",
64
+ "@vitest/coverage-v8": "^3.2.4",
64
65
  "tsdown": "^0.20.3",
65
66
  "typescript": "^5.9.3",
66
- "vitest": "^2.1.8"
67
+ "vitest": "^3.2.4"
67
68
  },
68
69
  "engines": {
69
70
  "bun": ">=1.3.14",
@@ -71,9 +72,9 @@
71
72
  },
72
73
  "//optionalDependencies": "The per-platform binary packages (skydive-cli-<os>-<arch>) are INTENTIONALLY not committed here. They are published by release-skydive-cli-binaries.yml and injected — pinned to the exact version being published — into the published launcher's optionalDependencies at release time (scripts/prepare-platform-packages.mjs --pin-version, run in release-skydive-cli.yml). Committing them would make `yarn install` try to resolve versions that only exist post-publish, breaking local dev and CI. npm installs of a published skydive-cli still get them (os/cpu-gated); the launcher (src/launcher.ts) resolves and execs the matching one. Local dev never needs them: it runs the JS bundle or `build:binary` directly.",
73
74
  "optionalDependencies": {
74
- "skydive-cli-darwin-arm64": "0.6.0-beta.13",
75
- "skydive-cli-darwin-x64": "0.6.0-beta.13",
76
- "skydive-cli-linux-x64": "0.6.0-beta.13",
77
- "skydive-cli-linux-arm64": "0.6.0-beta.13"
75
+ "skydive-cli-darwin-arm64": "0.6.0-beta.133",
76
+ "skydive-cli-darwin-x64": "0.6.0-beta.133",
77
+ "skydive-cli-linux-x64": "0.6.0-beta.133",
78
+ "skydive-cli-linux-arm64": "0.6.0-beta.133"
78
79
  }
79
80
  }
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as PortalClient } from "./client-JCeJ0RAt.mjs";
3
- import "./api-BFQ4PQDA.mjs";
4
-
5
- export { PortalClient };
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-JCeJ0RAt.mjs";
3
- import "./tls-cert-Rua2oV7n.mjs";
4
- import "./api-BFQ4PQDA.mjs";
5
- import "./daemon-LnRwTN3W.mjs";
6
- import { t as PortalDaemonClient } from "./daemon-client-BoLMCnVn.mjs";
7
-
8
- export { PortalDaemonClient };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-l6orYfqq.mjs";
3
- import { t as runRawPtyPassthrough } from "./raw-pty-dndn1Kxc.mjs";
4
-
5
- export { runRawPtyPassthrough };