skydive-cli 0.2.0-beta.626 → 0.2.0-beta.630
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 +17 -17
- package/dist/js/{boot-Bk_R-SnG.mjs → boot-DpgN_3SH.mjs} +16 -5
- package/dist/js/client-Csl6iRdd.mjs +5 -0
- package/dist/js/{client-DT9bWi1D.mjs → client-O5KfzIaB.mjs} +1 -1
- package/dist/js/{daemon-DfMgVlYE.mjs → daemon-Dk4RinJn.mjs} +2 -2
- package/dist/js/{daemon-CqhMYzpN.mjs → daemon-DxwrTG1K.mjs} +3 -3
- package/dist/js/{install-CQNnRJ0V.mjs → install-ZNL9Ss_c.mjs} +2 -2
- package/dist/js/{print-DaPpTqxu.mjs → print-BUbxOvnm.mjs} +1 -1
- package/dist/js/{print-CB6L_1YB.mjs → print-DZC3Xxnl.mjs} +2 -2
- package/dist/js/{print-share-D8Nn1qFq.mjs → print-share-BTGabspc.mjs} +1 -1
- package/dist/js/{rest-Q5yl_b2-.mjs → rest-CCyln7vx.mjs} +6 -0
- package/dist/js/{rest-CBROy0L-.mjs → rest-HIAVuPQz.mjs} +1 -1
- package/package.json +1 -1
- package/dist/js/client-CKlIpyAb.mjs +0 -5
package/dist/js/bin.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as setActiveWorkspace, S as listWorkspaces, T as version, _ as themes, b as getActiveWorkspaceId, o as brandHelpArt, t as installCrashHandler, w as name, x as getSessionIdentity, y as ensureActiveOrganization } from "./install-
|
|
3
|
-
import { A as resolveAppUrl, C as getPromptHistoryPath, D as getStoredApiKeyId, E as getShareMachineDefault, F as saveConfig, I as saveSession, M as resolveManagementAuth, N as resolveSession, O as getStoredApiKeyWorkspaceName, R as setLastSeenVersion, S as getLastSeenVersion, _ as API_KEY_PREFIX, b as deleteConfig, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as resolveConfig, k as getUpdateCheckDisabled, v as DEFAULT_API_URL, x as getConfigPath } from "./print-
|
|
2
|
+
import { C as setActiveWorkspace, S as listWorkspaces, T as version, _ as themes, b as getActiveWorkspaceId, o as brandHelpArt, t as installCrashHandler, w as name, x as getSessionIdentity, y as ensureActiveOrganization } from "./install-ZNL9Ss_c.mjs";
|
|
3
|
+
import { A as resolveAppUrl, C as getPromptHistoryPath, D as getStoredApiKeyId, E as getShareMachineDefault, F as saveConfig, I as saveSession, M as resolveManagementAuth, N as resolveSession, O as getStoredApiKeyWorkspaceName, R as setLastSeenVersion, S as getLastSeenVersion, _ as API_KEY_PREFIX, b as deleteConfig, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as resolveConfig, k as getUpdateCheckDisabled, v as DEFAULT_API_URL, x as getConfigPath } from "./print-BUbxOvnm.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
|
-
import { n as createRestClient } from "./rest-
|
|
6
|
-
import { a as registerPortalDevice, i as grantPortalAccess, n as fetchPortalDevices, o as revokePortalAccess, r as findThisDevice, s as machineIdentity } from "./client-
|
|
7
|
-
import { c as PORTAL_DAEMON_FLAG, i as queryDaemonStatus, l as daemonPaths, n as ensureDaemonRunning, o as stopDaemon } from "./daemon-
|
|
5
|
+
import { n as createRestClient } from "./rest-CCyln7vx.mjs";
|
|
6
|
+
import { a as registerPortalDevice, i as grantPortalAccess, n as fetchPortalDevices, o as revokePortalAccess, r as findThisDevice, s as machineIdentity } from "./client-O5KfzIaB.mjs";
|
|
7
|
+
import { c as PORTAL_DAEMON_FLAG, i as queryDaemonStatus, l as daemonPaths, n as ensureDaemonRunning, o as stopDaemon } from "./daemon-Dk4RinJn.mjs";
|
|
8
8
|
import { t as SandboxStream } from "./client-DfcJFEbh.mjs";
|
|
9
9
|
import { hideBin } from "yargs/helpers";
|
|
10
10
|
import yargs from "yargs";
|
|
@@ -1198,7 +1198,7 @@ const importCommand = {
|
|
|
1198
1198
|
process.exit(1);
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
const { runChat } = await import("./boot-
|
|
1201
|
+
const { runChat } = await import("./boot-DpgN_3SH.mjs");
|
|
1202
1202
|
await runChat({
|
|
1203
1203
|
appUrl,
|
|
1204
1204
|
sessionToken: session.value.sessionToken,
|
|
@@ -1225,7 +1225,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1225
1225
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1226
1226
|
process.exit(1);
|
|
1227
1227
|
}
|
|
1228
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1228
|
+
const { connectMachineShare } = await import("./print-share-BTGabspc.mjs");
|
|
1229
1229
|
const machineShare = await connectMachineShare({
|
|
1230
1230
|
appUrl,
|
|
1231
1231
|
sessionToken: session.value.sessionToken,
|
|
@@ -1233,7 +1233,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1233
1233
|
});
|
|
1234
1234
|
const extra = (argv.print ?? "").trim();
|
|
1235
1235
|
const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1236
|
-
const { runPrint } = await import("./print-
|
|
1236
|
+
const { runPrint } = await import("./print-DZC3Xxnl.mjs");
|
|
1237
1237
|
try {
|
|
1238
1238
|
const result = await runPrint({
|
|
1239
1239
|
appUrl,
|
|
@@ -1514,7 +1514,7 @@ const chatCommand = {
|
|
|
1514
1514
|
printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
|
|
1515
1515
|
process.exit(1);
|
|
1516
1516
|
}
|
|
1517
|
-
const { runChat } = await import("./boot-
|
|
1517
|
+
const { runChat } = await import("./boot-DpgN_3SH.mjs");
|
|
1518
1518
|
await runChat({
|
|
1519
1519
|
appUrl,
|
|
1520
1520
|
sessionToken: session.value.sessionToken,
|
|
@@ -1551,7 +1551,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1551
1551
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1552
1552
|
process.exit(1);
|
|
1553
1553
|
}
|
|
1554
|
-
const { runPrint, readStdin } = await import("./print-
|
|
1554
|
+
const { runPrint, readStdin } = await import("./print-DZC3Xxnl.mjs");
|
|
1555
1555
|
let prompt = (argv.print ?? "").trim();
|
|
1556
1556
|
if (!prompt) {
|
|
1557
1557
|
if (process.stdin.isTTY) {
|
|
@@ -1566,7 +1566,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
let machineShare = null;
|
|
1568
1568
|
if (resolveShareMachine(argv)) {
|
|
1569
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1569
|
+
const { connectMachineShare } = await import("./print-share-BTGabspc.mjs");
|
|
1570
1570
|
machineShare = await connectMachineShare({
|
|
1571
1571
|
appUrl,
|
|
1572
1572
|
sessionToken: session.value.sessionToken,
|
|
@@ -1625,7 +1625,7 @@ const getCommand = {
|
|
|
1625
1625
|
printError(`${session.error.message} Run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1626
1626
|
process.exit(1);
|
|
1627
1627
|
}
|
|
1628
|
-
const { messageGet } = await import("./print-
|
|
1628
|
+
const { messageGet } = await import("./print-DZC3Xxnl.mjs");
|
|
1629
1629
|
try {
|
|
1630
1630
|
const result = await messageGet({
|
|
1631
1631
|
appUrl,
|
|
@@ -1822,7 +1822,7 @@ const switchCommand = {
|
|
|
1822
1822
|
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.");
|
|
1823
1823
|
process.exit(1);
|
|
1824
1824
|
}
|
|
1825
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
1825
|
+
const { runWorkspacePicker } = await import("./boot-DpgN_3SH.mjs");
|
|
1826
1826
|
await runWorkspacePicker(session);
|
|
1827
1827
|
return;
|
|
1828
1828
|
}
|
|
@@ -1900,7 +1900,7 @@ const openCommand = {
|
|
|
1900
1900
|
const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
|
|
1901
1901
|
const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
|
|
1902
1902
|
const { machineName } = machineIdentity();
|
|
1903
|
-
const { PortalClient } = await import("./client-
|
|
1903
|
+
const { PortalClient } = await import("./client-Csl6iRdd.mjs");
|
|
1904
1904
|
let lastLine = "";
|
|
1905
1905
|
let signalConnected;
|
|
1906
1906
|
const connected = new Promise((resolve) => {
|
|
@@ -2173,8 +2173,8 @@ const sandboxCommand = {
|
|
|
2173
2173
|
}).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`"),
|
|
2174
2174
|
handler: async (argv) => {
|
|
2175
2175
|
const session = requireSession(argv);
|
|
2176
|
-
const { createRestClient } = await import("./rest-
|
|
2177
|
-
const { resolveAgent } = await import("./print-
|
|
2176
|
+
const { createRestClient } = await import("./rest-HIAVuPQz.mjs");
|
|
2177
|
+
const { resolveAgent } = await import("./print-DZC3Xxnl.mjs");
|
|
2178
2178
|
const client = createRestClient({
|
|
2179
2179
|
appUrl: session.appUrl,
|
|
2180
2180
|
sessionToken: session.sessionToken
|
|
@@ -3251,7 +3251,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
|
|
|
3251
3251
|
process.exit(0);
|
|
3252
3252
|
}
|
|
3253
3253
|
if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
|
|
3254
|
-
const { runPortalDaemon } = await import("./daemon-
|
|
3254
|
+
const { runPortalDaemon } = await import("./daemon-DxwrTG1K.mjs");
|
|
3255
3255
|
runPortalDaemon(process.argv);
|
|
3256
3256
|
} else runCli();
|
|
3257
3257
|
function runCli() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as setActiveWorkspace, S as listWorkspaces, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-
|
|
3
|
-
import { L as saveTheme, P as resolveWebUrl, T as getSavedTheme, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, w as getReviewStateDir, x as getConfigPath, y as DEFAULT_APP_URL } from "./print-
|
|
4
|
-
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-
|
|
5
|
-
import { t as PortalClient } from "./client-
|
|
6
|
-
import { d as makeLineParser, f as parseDaemonMessage, l as daemonPaths, n as ensureDaemonRunning, s as LOCAL_PROTOCOL_VERSION, u as encodeLine } from "./daemon-
|
|
2
|
+
import { C as setActiveWorkspace, S as listWorkspaces, a as WORDMARK, b as getActiveWorkspaceId, c as applyTheme, d as noColorRequested, f as theme, g as themeVersion, h as themeModeFromColorFgBg, i as MARK_CELLS, l as findTheme, m as themeMode, n as buildCrashReport, p as themeForMode, r as writeCrashReport, s as DEFAULT_THEME_ID, t as installCrashHandler, u as monoTheme, v as themesForMode } from "./install-ZNL9Ss_c.mjs";
|
|
3
|
+
import { L as saveTheme, P as resolveWebUrl, T as getSavedTheme, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, w as getReviewStateDir, x as getConfigPath, y as DEFAULT_APP_URL } from "./print-BUbxOvnm.mjs";
|
|
4
|
+
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-CCyln7vx.mjs";
|
|
5
|
+
import { t as PortalClient } from "./client-O5KfzIaB.mjs";
|
|
6
|
+
import { d as makeLineParser, f as parseDaemonMessage, l as daemonPaths, n as ensureDaemonRunning, s as LOCAL_PROTOCOL_VERSION, u as encodeLine } from "./daemon-Dk4RinJn.mjs";
|
|
7
7
|
import { t as SandboxStream } from "./client-DfcJFEbh.mjs";
|
|
8
8
|
import { t as runRawPtyPassthrough } from "./raw-pty-BcjbTjHJ.mjs";
|
|
9
9
|
import * as os$1 from "node:os";
|
|
@@ -1872,6 +1872,17 @@ function AgentCreateScreen() {
|
|
|
1872
1872
|
const fail = useStore((s) => s.fail);
|
|
1873
1873
|
const [name, setName] = useState("");
|
|
1874
1874
|
const [state, setState] = useState({ kind: "idle" });
|
|
1875
|
+
useEffect(() => {
|
|
1876
|
+
if (!rest) return;
|
|
1877
|
+
let cancelled = false;
|
|
1878
|
+
rest.suggestAgentIdentity().then((suggestion) => {
|
|
1879
|
+
if (cancelled || !suggestion) return;
|
|
1880
|
+
setName((current) => current ? current : suggestion.name);
|
|
1881
|
+
}).catch(() => {});
|
|
1882
|
+
return () => {
|
|
1883
|
+
cancelled = true;
|
|
1884
|
+
};
|
|
1885
|
+
}, [rest]);
|
|
1875
1886
|
useKeyboard((key) => {
|
|
1876
1887
|
if (key.name === "escape" && state.kind !== "creating") goTo({ kind: "agent-picker" });
|
|
1877
1888
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, t as HttpError } from "./rest-
|
|
2
|
+
import { a as errorMessage, t as HttpError } from "./rest-CCyln7vx.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { o as isRecord } from "./rest-
|
|
3
|
-
import { t as PortalClient } from "./client-
|
|
2
|
+
import { o as isRecord } from "./rest-CCyln7vx.mjs";
|
|
3
|
+
import { t as PortalClient } from "./client-O5KfzIaB.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./rest-
|
|
3
|
-
import "./client-
|
|
4
|
-
import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-
|
|
2
|
+
import "./rest-CCyln7vx.mjs";
|
|
3
|
+
import "./client-O5KfzIaB.mjs";
|
|
4
|
+
import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-Dk4RinJn.mjs";
|
|
5
5
|
|
|
6
6
|
export { runPortalDaemon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { x as getConfigPath } from "./print-
|
|
2
|
+
import { x as getConfigPath } from "./print-BUbxOvnm.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { err, ok } from "neverthrow";
|
|
@@ -8,7 +8,7 @@ import fs from "node:fs";
|
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
10
|
var name = "skydive-cli";
|
|
11
|
-
var version$1 = "0.2.0-beta.
|
|
11
|
+
var version$1 = "0.2.0-beta.630";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/auth/organization.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, t as HttpError } from "./rest-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, t as HttpError } from "./rest-CCyln7vx.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import Conf from "conf";
|
|
5
5
|
import { err, ok } from "neverthrow";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
3
|
-
import "./rest-
|
|
2
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-BUbxOvnm.mjs";
|
|
3
|
+
import "./rest-CCyln7vx.mjs";
|
|
4
4
|
|
|
5
5
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -14,7 +14,7 @@ import { n as printError } from "./output-DYzzdXYV.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-Csl6iRdd.mjs");
|
|
18
18
|
let signalConnected;
|
|
19
19
|
const connected = new Promise((resolve) => {
|
|
20
20
|
signalConnected = resolve;
|
|
@@ -214,6 +214,10 @@ function createRestClient({ appUrl, sessionToken }) {
|
|
|
214
214
|
const { agent } = await post("/api/v1/agents", { name }, createAgentResponseSchema);
|
|
215
215
|
return agent;
|
|
216
216
|
},
|
|
217
|
+
suggestAgentIdentity: async () => {
|
|
218
|
+
const { suggestion } = await get("/api/v1/agents/suggest", suggestAgentResponseSchema);
|
|
219
|
+
return suggestion;
|
|
220
|
+
},
|
|
217
221
|
getConversation: async ({ conversationId }) => {
|
|
218
222
|
const { conversation } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}`, getConversationResponseSchema);
|
|
219
223
|
return conversation;
|
|
@@ -432,6 +436,8 @@ const listAgentsResponseSchema = z.object({
|
|
|
432
436
|
totalCount: z.number().nullable().optional()
|
|
433
437
|
});
|
|
434
438
|
const createAgentResponseSchema = z.object({ agent: agentSummarySchema });
|
|
439
|
+
const agentSuggestionSchema = z.object({ name: z.string() });
|
|
440
|
+
const suggestAgentResponseSchema = z.object({ suggestion: agentSuggestionSchema.nullable() });
|
|
435
441
|
const conversationAgentSchema = z.object({
|
|
436
442
|
id: z.string().uuid(),
|
|
437
443
|
name: z.string(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-
|
|
2
|
+
import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-CCyln7vx.mjs";
|
|
3
3
|
|
|
4
4
|
export { createRestClient };
|
package/package.json
CHANGED