skydive-cli 0.2.0-beta.422 → 0.2.0
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/dist/js/bin.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { A as getShareMachineDefault, B as saveSession, C as DEFAULT_WEB_URL, D as getPromptHistoryPath, E as getLastSeenVersion, F as resolveConfig, H as setLastSeenVersion, I as resolveManagementAuth, L as resolveSession, M as getStoredApiKeyWorkspaceName, N as getUpdateCheckDisabled, P as resolveAppUrl, T as getConfigPath, _ as setActiveWorkspace, b as API_KEY_PREFIX, d as themes, g as listWorkspaces, h as getSessionIdentity, j as getStoredApiKeyId, m as getActiveWorkspaceId, p as ensureActiveOrganization, v as API_KEYS_URL, w as deleteConfig, x as DEFAULT_API_URL, y as API_KEY_FAMILY_PREFIX, z as saveConfig } from "./theme-CuQhvqzN.mjs";
|
|
3
3
|
import { n as printError, r as printTable, t as output } from "./output-B4cW10Ph.mjs";
|
|
4
4
|
import { n as createRestClient } from "./rest-CamHVOce.mjs";
|
|
5
|
-
import { i as resolveAgent } from "./print-
|
|
5
|
+
import { i as resolveAgent } from "./print-Bin4u16d.mjs";
|
|
6
6
|
import { a as registerPortalDevice, c as machineIdentity, n as findThisDevice, o as revokePortalAccess, r as grantPortalAccess, t as fetchPortalDevices } from "./api-CDTKq_5Q.mjs";
|
|
7
7
|
import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
|
|
8
8
|
import { hideBin } from "yargs/helpers";
|
|
@@ -20,7 +20,7 @@ import semver from "semver";
|
|
|
20
20
|
|
|
21
21
|
//#region package.json
|
|
22
22
|
var name = "skydive-cli";
|
|
23
|
-
var version = "0.2.0
|
|
23
|
+
var version = "0.2.0";
|
|
24
24
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/types.ts
|
|
@@ -1200,7 +1200,7 @@ const importCommand = {
|
|
|
1200
1200
|
process.exit(1);
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
const { runChat } = await import("./boot-
|
|
1203
|
+
const { runChat } = await import("./boot-CGaXUEer.mjs");
|
|
1204
1204
|
await runChat({
|
|
1205
1205
|
appUrl,
|
|
1206
1206
|
sessionToken: session.value.sessionToken,
|
|
@@ -1234,7 +1234,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1234
1234
|
});
|
|
1235
1235
|
const extra = (argv.print ?? "").trim();
|
|
1236
1236
|
const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1237
|
-
const { runPrint } = await import("./print-
|
|
1237
|
+
const { runPrint } = await import("./print-BZH0b3KB.mjs");
|
|
1238
1238
|
try {
|
|
1239
1239
|
const result = await runPrint({
|
|
1240
1240
|
appUrl,
|
|
@@ -1511,7 +1511,7 @@ const chatCommand = {
|
|
|
1511
1511
|
printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
|
|
1512
1512
|
process.exit(1);
|
|
1513
1513
|
}
|
|
1514
|
-
const { runChat } = await import("./boot-
|
|
1514
|
+
const { runChat } = await import("./boot-CGaXUEer.mjs");
|
|
1515
1515
|
await runChat({
|
|
1516
1516
|
appUrl,
|
|
1517
1517
|
sessionToken: session.value.sessionToken,
|
|
@@ -1539,7 +1539,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1539
1539
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1540
1540
|
process.exit(1);
|
|
1541
1541
|
}
|
|
1542
|
-
const { runPrint, readStdin } = await import("./print-
|
|
1542
|
+
const { runPrint, readStdin } = await import("./print-BZH0b3KB.mjs");
|
|
1543
1543
|
let prompt = (argv.print ?? "").trim();
|
|
1544
1544
|
if (!prompt) {
|
|
1545
1545
|
if (process.stdin.isTTY) {
|
|
@@ -1613,7 +1613,7 @@ const getCommand = {
|
|
|
1613
1613
|
printError(`${session.error.message} Run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1614
1614
|
process.exit(1);
|
|
1615
1615
|
}
|
|
1616
|
-
const { messageGet } = await import("./print-
|
|
1616
|
+
const { messageGet } = await import("./print-BZH0b3KB.mjs");
|
|
1617
1617
|
try {
|
|
1618
1618
|
const result = await messageGet({
|
|
1619
1619
|
appUrl,
|
|
@@ -1810,7 +1810,7 @@ const switchCommand = {
|
|
|
1810
1810
|
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.");
|
|
1811
1811
|
process.exit(1);
|
|
1812
1812
|
}
|
|
1813
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
1813
|
+
const { runWorkspacePicker } = await import("./boot-CGaXUEer.mjs");
|
|
1814
1814
|
await runWorkspacePicker(session);
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
@@ -2061,7 +2061,7 @@ const sandboxCommand = {
|
|
|
2061
2061
|
handler: async (argv) => {
|
|
2062
2062
|
const session = requireSession(argv);
|
|
2063
2063
|
const { createRestClient } = await import("./rest-COkLEZOB.mjs");
|
|
2064
|
-
const { resolveAgent } = await import("./print-
|
|
2064
|
+
const { resolveAgent } = await import("./print-BZH0b3KB.mjs");
|
|
2065
2065
|
const client = createRestClient({
|
|
2066
2066
|
appUrl: session.appUrl,
|
|
2067
2067
|
sessionToken: session.sessionToken
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { O as getReviewStateDir, R as resolveWebUrl, S as DEFAULT_APP_URL, T as getConfigPath, V as saveTheme, _ as setActiveWorkspace, a as noColorRequested, c as themeMode, f as themesForMode, g as listWorkspaces, i as monoTheme, k as getSavedTheme, l as themeModeFromColorFgBg, m as getActiveWorkspaceId, n as applyTheme, o as theme, r as findTheme, s as themeForMode, t as DEFAULT_THEME_ID, u as themeVersion, x as DEFAULT_API_URL } from "./theme-CuQhvqzN.mjs";
|
|
3
3
|
import { n as createRestClient, r as errorDetail, t as HttpError } from "./rest-CamHVOce.mjs";
|
|
4
4
|
import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
|
|
5
|
-
import { c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams,
|
|
5
|
+
import { c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams } from "./print-Bin4u16d.mjs";
|
|
6
6
|
import "./api-CDTKq_5Q.mjs";
|
|
7
7
|
import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
|
|
8
8
|
import { t as PortalClient } from "./client-B3ZhhF7e.mjs";
|
|
@@ -3412,19 +3412,17 @@ function applyChunk(items, chunk, agentName = null) {
|
|
|
3412
3412
|
if (!isRecord(data)) return [...items];
|
|
3413
3413
|
const card = parseConnectCard(data.spec);
|
|
3414
3414
|
if (!card) return [...items];
|
|
3415
|
-
const
|
|
3416
|
-
const
|
|
3417
|
-
if (items.some((m) => m.kind === "card" && m.toolCallId === toolCallId && m.specKey === specKey)) return [...items];
|
|
3418
|
-
return [...items, {
|
|
3415
|
+
const id = (typeof data.toolCallId === "string" ? data.toolCallId : null) ?? cryptoId();
|
|
3416
|
+
const next = {
|
|
3419
3417
|
kind: "card",
|
|
3420
|
-
id
|
|
3421
|
-
toolCallId,
|
|
3422
|
-
specKey,
|
|
3418
|
+
id,
|
|
3423
3419
|
card,
|
|
3424
3420
|
status: "idle",
|
|
3425
3421
|
detail: null,
|
|
3426
3422
|
agentName
|
|
3427
|
-
}
|
|
3423
|
+
};
|
|
3424
|
+
if (items.some((m) => m.kind === "card" && m.id === id)) return items.map((m) => m.kind === "card" && m.id === id ? next : m);
|
|
3425
|
+
return [...items, next];
|
|
3428
3426
|
}
|
|
3429
3427
|
case "data-anyone-conversation-started": return [...items];
|
|
3430
3428
|
default: return [...items];
|
|
@@ -3527,12 +3525,6 @@ function directiveIdsFrom(data) {
|
|
|
3527
3525
|
function cryptoId() {
|
|
3528
3526
|
return crypto.randomUUID();
|
|
3529
3527
|
}
|
|
3530
|
-
/** Distinct id per card, so cards from one tool call stay independently
|
|
3531
|
-
* addressable (status updates and the React key both go by `id`). */
|
|
3532
|
-
function nextCardId(items, toolCallId) {
|
|
3533
|
-
if (!toolCallId) return cryptoId();
|
|
3534
|
-
return `${toolCallId}#c${items.filter((m) => m.kind === "card" && m.toolCallId === toolCallId).length}`;
|
|
3535
|
-
}
|
|
3536
3528
|
|
|
3537
3529
|
//#endregion
|
|
3538
3530
|
//#region src/chat/tui/chat/attribution.ts
|
|
@@ -3646,16 +3638,11 @@ function uiMessagesToItems(messages) {
|
|
|
3646
3638
|
if (part.type === "data-anyone-render-spec") {
|
|
3647
3639
|
const data = isRecord(part) && isRecord(part.data) ? part.data : null;
|
|
3648
3640
|
const card = data ? parseConnectCard(data.spec) : null;
|
|
3649
|
-
if (card
|
|
3650
|
-
const toolCallId = typeof data.toolCallId === "string" ? data.toolCallId : null;
|
|
3651
|
-
const specKey = specKeyFor(data.spec);
|
|
3652
|
-
if (out.some((item) => item.kind === "card" && item.toolCallId === toolCallId && item.specKey === specKey)) continue;
|
|
3653
|
-
const ordinal = out.filter((item) => item.kind === "card" && item.toolCallId === toolCallId).length;
|
|
3641
|
+
if (card) {
|
|
3642
|
+
const toolCallId = data && typeof data.toolCallId === "string" ? data.toolCallId : null;
|
|
3654
3643
|
out.push({
|
|
3655
3644
|
kind: "card",
|
|
3656
|
-
id: toolCallId
|
|
3657
|
-
toolCallId,
|
|
3658
|
-
specKey,
|
|
3645
|
+
id: toolCallId ?? `${m.id}#c${textIdx++}`,
|
|
3659
3646
|
card,
|
|
3660
3647
|
status: "idle",
|
|
3661
3648
|
detail: null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./rest-CamHVOce.mjs";
|
|
3
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
3
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-Bin4u16d.mjs";
|
|
4
4
|
|
|
5
5
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as createRestClient, t as HttpError } from "./rest-CamHVOce.mjs";
|
|
3
3
|
import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
|
|
4
|
-
import stableStringify from "safe-stable-stringify";
|
|
5
4
|
|
|
6
5
|
//#region src/chat/tui/chat/card.ts
|
|
7
6
|
const urlActionKinds = [
|
|
@@ -56,23 +55,6 @@ function parseButton(element) {
|
|
|
56
55
|
primary
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Content identity for a card's spec, which is what separates a re-delivery of
|
|
61
|
-
* one card from two distinct cards: the same card reaches us twice (live on the
|
|
62
|
-
* run stream and again as the persisted message part when history is loaded for
|
|
63
|
-
* an in-flight run), while a single tool call can legitimately post SEVERAL
|
|
64
|
-
* different cards — `platform` subprocesses chained in one bash command all
|
|
65
|
-
* read the same TOOL_CALL_ID, so `toolCallId` alone identifies neither. Applies
|
|
66
|
-
* the same identity rule as the web client (web/src/features/chat-v2/turn-segments.ts).
|
|
67
|
-
*
|
|
68
|
-
* The serialization has to be key-order-independent, because the persisted copy
|
|
69
|
-
* of a spec comes back through a jsonb round-trip that can reorder keys and
|
|
70
|
-
* order-sensitive `JSON.stringify` would read that as a different card.
|
|
71
|
-
* `safe-stable-stringify` sorts keys and tolerates cycles.
|
|
72
|
-
*/
|
|
73
|
-
function specKeyFor(spec) {
|
|
74
|
-
return stableStringify(spec) ?? crypto.randomUUID();
|
|
75
|
-
}
|
|
76
58
|
function parseConnectCard(spec) {
|
|
77
59
|
if (!isRecord(spec)) return null;
|
|
78
60
|
const { root, elements } = spec;
|
|
@@ -481,4 +463,4 @@ async function readStdin() {
|
|
|
481
463
|
}
|
|
482
464
|
|
|
483
465
|
//#endregion
|
|
484
|
-
export { runPrint as a, cardActionErrorMessage as c, reconcileMaskedInput as d, resolveConnectUrl as f, resolveAgent as i, parseExternalOauthConnectParams as l,
|
|
466
|
+
export { runPrint as a, cardActionErrorMessage as c, reconcileMaskedInput as d, resolveConnectUrl as f, resolveAgent as i, parseExternalOauthConnectParams as l, messageGet as n, toPrintError as o, parseConnectCard as p, readStdin as r, MASK_CHAR as s, collectRunText as t, parseOauthConnectParams as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skydive-cli",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Skydive CLI — cloud agents from the command line",
|
|
5
5
|
"homepage": "https://skydive.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"open": "^10.1.0",
|
|
39
39
|
"react": "^19.0.0",
|
|
40
40
|
"react-devtools-core": "^7.0.1",
|
|
41
|
-
"safe-stable-stringify": "^2.3.1",
|
|
42
41
|
"semver": "^7.7.4",
|
|
43
42
|
"web-tree-sitter": "0.25.10",
|
|
44
43
|
"ws": "^8.21.0",
|