skydive-cli 0.6.0-beta.15 → 0.6.0-beta.152
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 +15 -0
- package/dist/js/bin.mjs +867 -89
- package/dist/js/{boot-D5_QVvwk.mjs → boot-DBF-kU-N.mjs} +9829 -7587
- package/dist/js/client-0Q4OUb0Z.mjs +5 -0
- package/dist/js/{client-l6orYfqq.mjs → client-Cxk3khQu.mjs} +18 -4
- package/dist/js/{client-7decrdm4.mjs → client-DAYAaiX1.mjs} +67 -8
- package/dist/js/{daemon-5HHkFtaF.mjs → daemon-7pg_v8Fl.mjs} +117 -27
- package/dist/js/{daemon-CLTmAfBt.mjs → daemon-CrsVAtQW.mjs} +2 -2
- package/dist/js/daemon-client-D_OfDkUO.mjs +8 -0
- package/dist/js/{daemon-client-BdEu0TK_.mjs → daemon-client-XLZJXsa0.mjs} +29 -4
- package/dist/js/{install-Fo1riO1w.mjs → install-Z8iPRZ0W.mjs} +49 -3
- package/dist/js/{print-sWlw3B6z.mjs → print-0_WEt0la.mjs} +2 -2
- package/dist/js/{print-share-ooQ3IrUT.mjs → print-share-CGeQeURl.mjs} +1 -1
- package/dist/js/{print-C_xW32a6.mjs → print-xMH__nIq.mjs} +13 -12
- package/dist/js/{raw-pty-dndn1Kxc.mjs → raw-pty-B-WKaaE3.mjs} +1 -1
- package/dist/js/raw-pty-BJIs_xjQ.mjs +5 -0
- package/dist/js/{rest-8DCRRen0.mjs → rest-Btz-7ILg.mjs} +1 -1
- package/dist/js/{rest-Benrf1yZ.mjs → rest-CV01OUtT.mjs} +148 -15
- package/package.json +9 -8
- package/dist/js/client-Dwy-uGNl.mjs +0 -5
- package/dist/js/daemon-client-CkU1-t5_.mjs +0 -8
- package/dist/js/raw-pty-DRZuf1oW.mjs +0 -5
|
@@ -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-
|
|
17
|
+
const { PortalClient } = await import("./client-0Q4OUb0Z.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 { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-CV01OUtT.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
|
-
*
|
|
712
|
-
*
|
|
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 —
|
|
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 {
|
|
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 };
|
|
@@ -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-
|
|
2
|
+
import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-CV01OUtT.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.
|
|
9
|
+
var version = "0.6.0-beta.152";
|
|
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
|
|
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
|
|
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
|
|
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 }) =>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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({
|
|
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.
|
|
3
|
+
"version": "0.6.0-beta.152",
|
|
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.
|
|
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",
|
|
@@ -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.
|
|
64
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
64
65
|
"tsdown": "^0.20.3",
|
|
65
66
|
"typescript": "^5.9.3",
|
|
66
|
-
"vitest": "^2.
|
|
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.
|
|
75
|
-
"skydive-cli-darwin-x64": "0.6.0-beta.
|
|
76
|
-
"skydive-cli-linux-x64": "0.6.0-beta.
|
|
77
|
-
"skydive-cli-linux-arm64": "0.6.0-beta.
|
|
75
|
+
"skydive-cli-darwin-arm64": "0.6.0-beta.152",
|
|
76
|
+
"skydive-cli-darwin-x64": "0.6.0-beta.152",
|
|
77
|
+
"skydive-cli-linux-x64": "0.6.0-beta.152",
|
|
78
|
+
"skydive-cli-linux-arm64": "0.6.0-beta.152"
|
|
78
79
|
}
|
|
79
80
|
}
|