skydive-cli 0.4.0-beta.1112 → 0.4.0-beta.1140
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 +28 -28
- package/dist/js/{boot-DDtm3bc5.mjs → boot-Dr-HUl-c.mjs} +29 -29
- package/dist/js/{print-CiaU2ygh.mjs → print-CswnhVUN.mjs} +3 -3
- package/dist/js/{print-vUf9stcK.mjs → print-LoJjA8FM.mjs} +1 -1
- package/dist/js/{print-share-DlO5RSBt.mjs → print-share-DCmeJC5e.mjs} +2 -2
- package/dist/js/{profiler-DORuJUS8.mjs → profiler-Dn361Z1u.mjs} +2 -2
- package/package.json +1 -1
package/dist/js/bin.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-
|
|
3
|
-
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-
|
|
2
|
+
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-Dn361Z1u.mjs";
|
|
3
|
+
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-CswnhVUN.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
5
|
import { n as createRestClient, t as HttpError } from "./rest-CG7VpQ56.mjs";
|
|
6
6
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
@@ -177,7 +177,7 @@ var SkydiveApiClient = class {
|
|
|
177
177
|
if (body.error && typeof body.error === "string") message = body.error;
|
|
178
178
|
else if (body.error?.message) message = body.error.message;
|
|
179
179
|
} catch {}
|
|
180
|
-
if (response.status === 401 && this.authKind === "session") message = `${message}
|
|
180
|
+
if (response.status === 401 && this.authKind === "session") message = `${message}. Your chat session may have expired. Run \`skydive auth login\`.`;
|
|
181
181
|
return err({
|
|
182
182
|
message,
|
|
183
183
|
status: response.status
|
|
@@ -531,7 +531,7 @@ async function runBrowserLogin(argv) {
|
|
|
531
531
|
appUrl,
|
|
532
532
|
sessionToken
|
|
533
533
|
})).unwrapOr(null);
|
|
534
|
-
const keyName = identity?.activeWorkspaceName ? `CLI (${hostname()})
|
|
534
|
+
const keyName = identity?.activeWorkspaceName ? `CLI (${hostname()}) for ${identity.activeWorkspaceName}` : `CLI (${hostname()})`;
|
|
535
535
|
const replaced = await revokeKeysByName({
|
|
536
536
|
appUrl,
|
|
537
537
|
sessionToken,
|
|
@@ -1468,9 +1468,9 @@ function ensureBunAndReexec(onProgress) {
|
|
|
1468
1468
|
*/
|
|
1469
1469
|
function buildImportSeedPrompt(projectDir) {
|
|
1470
1470
|
return [
|
|
1471
|
-
"I'm migrating from another coding agent
|
|
1471
|
+
"I'm migrating from another coding agent. Import my setup from this machine.",
|
|
1472
1472
|
"",
|
|
1473
|
-
`Use your import-config skill. I ran this from \`${projectDir}\`, so start there (and my home directory) when you inventory what I have. Show me the plan first
|
|
1473
|
+
`Use your import-config skill. I ran this from \`${projectDir}\`, so start there (and my home directory) when you inventory what I have. Show me the plan first: what you'll bring over, where it lands in you, and anything you're leaving out (credentials especially). Then wait for my OK before committing anything.`
|
|
1474
1474
|
].join("\n");
|
|
1475
1475
|
}
|
|
1476
1476
|
const importCommand = {
|
|
@@ -1482,7 +1482,7 @@ const importCommand = {
|
|
|
1482
1482
|
}).option("print", {
|
|
1483
1483
|
alias: "p",
|
|
1484
1484
|
type: "string",
|
|
1485
|
-
describe: "Non-interactive: send the import request as a one-shot, print the agent's plan, and exit (drivable from scripts or another coding agent). An optional value adds extra instructions to the request. The agent still waits for approval
|
|
1485
|
+
describe: "Non-interactive: send the import request as a one-shot, print the agent's plan, and exit (drivable from scripts or another coding agent). An optional value adds extra instructions to the request. The agent still waits for approval; continue the printed conversation with `skydive chat -p \"go ahead\" --resume <id> --share-machine`. Runs under Node."
|
|
1486
1486
|
}).example("skydive import", "Import from the current directory").example("skydive import --agent kit", "Import into a specific agent, skipping the picker").example("skydive import -p --agent kit", "One-shot: print the agent's import plan and exit"),
|
|
1487
1487
|
handler: async (argv) => {
|
|
1488
1488
|
const appUrl = resolveAppUrl({ appUrl: argv["api-url"] });
|
|
@@ -1514,7 +1514,7 @@ const importCommand = {
|
|
|
1514
1514
|
process.exit(1);
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
const { runChat } = await import("./boot-
|
|
1517
|
+
const { runChat } = await import("./boot-Dr-HUl-c.mjs");
|
|
1518
1518
|
await runChat({
|
|
1519
1519
|
appUrl,
|
|
1520
1520
|
sessionToken: session.value.sessionToken,
|
|
@@ -1541,7 +1541,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1541
1541
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1542
1542
|
process.exit(1);
|
|
1543
1543
|
}
|
|
1544
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1544
|
+
const { connectMachineShare } = await import("./print-share-DCmeJC5e.mjs");
|
|
1545
1545
|
const machineShare = await connectMachineShare({
|
|
1546
1546
|
appUrl,
|
|
1547
1547
|
sessionToken: session.value.sessionToken,
|
|
@@ -1549,7 +1549,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1549
1549
|
});
|
|
1550
1550
|
const extra = (argv.print ?? "").trim();
|
|
1551
1551
|
const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1552
|
-
const { runPrint } = await import("./print-
|
|
1552
|
+
const { runPrint } = await import("./print-LoJjA8FM.mjs");
|
|
1553
1553
|
try {
|
|
1554
1554
|
const result = await runPrint({
|
|
1555
1555
|
appUrl,
|
|
@@ -1631,7 +1631,7 @@ const createCommand = {
|
|
|
1631
1631
|
console.log(` Name: ${key.name}`);
|
|
1632
1632
|
console.log(` Key: ${key.key}`);
|
|
1633
1633
|
console.log("");
|
|
1634
|
-
console.log(" Save this key
|
|
1634
|
+
console.log(" Save this key. It will not be shown again.");
|
|
1635
1635
|
}
|
|
1636
1636
|
};
|
|
1637
1637
|
const revokeCommand$1 = {
|
|
@@ -1704,7 +1704,7 @@ const setCommand$1 = {
|
|
|
1704
1704
|
describe: "Secret name (uppercase letters, digits, underscores)"
|
|
1705
1705
|
}).positional("value", {
|
|
1706
1706
|
type: "string",
|
|
1707
|
-
describe: "Secret value. If omitted, read from stdin
|
|
1707
|
+
describe: "Secret value. If omitted, read from stdin, which keeps the value out of shell history."
|
|
1708
1708
|
}),
|
|
1709
1709
|
handler: async (argv) => {
|
|
1710
1710
|
let value = argv.value;
|
|
@@ -1863,7 +1863,7 @@ const chatCommand = {
|
|
|
1863
1863
|
builder: (y) => y.option("print", {
|
|
1864
1864
|
alias: "p",
|
|
1865
1865
|
type: "string",
|
|
1866
|
-
describe: "Non-interactive: send one prompt, print the reply, and exit (like `claude -p`). Reads the prompt from stdin if given no value. Runs under Node
|
|
1866
|
+
describe: "Non-interactive: send one prompt, print the reply, and exit (like `claude -p`). Reads the prompt from stdin if given no value. Runs under Node; no Bun required."
|
|
1867
1867
|
}).option("agent", {
|
|
1868
1868
|
type: "string",
|
|
1869
1869
|
describe: "Target agent, by id, slug, or name. With -p, the agent to send the one-shot prompt to. Without -p, pre-selects the agent and opens its conversation list, skipping the agent picker. Optional when the account has exactly one agent."
|
|
@@ -1926,7 +1926,7 @@ const chatCommand = {
|
|
|
1926
1926
|
sessionToken: auth.value.token,
|
|
1927
1927
|
agentSelector: argv.agent ?? null
|
|
1928
1928
|
});
|
|
1929
|
-
const { runChat } = await import("./boot-
|
|
1929
|
+
const { runChat } = await import("./boot-Dr-HUl-c.mjs");
|
|
1930
1930
|
await runChat({
|
|
1931
1931
|
appUrl: auth.value.appUrl,
|
|
1932
1932
|
sessionToken: auth.value.token,
|
|
@@ -1973,7 +1973,7 @@ async function ensureAgentWorkspace({ appUrl, sessionToken, agentSelector }) {
|
|
|
1973
1973
|
});
|
|
1974
1974
|
if (resolution.kind === "active") return;
|
|
1975
1975
|
if (resolution.kind === "switched") {
|
|
1976
|
-
console.error(`Switched workspace to ${resolution.workspace.name} (${resolution.workspace.slug})
|
|
1976
|
+
console.error(`Switched workspace to ${resolution.workspace.name} (${resolution.workspace.slug}). ${resolution.agentName} lives there.`);
|
|
1977
1977
|
return;
|
|
1978
1978
|
}
|
|
1979
1979
|
if (resolution.kind === "list-failed") {
|
|
@@ -1984,7 +1984,7 @@ async function ensureAgentWorkspace({ appUrl, sessionToken, agentSelector }) {
|
|
|
1984
1984
|
printError(`Agent found in workspace ${resolution.workspace.name}, but switching to it failed: ${resolution.message}. Run \`skydive workspace switch ${resolution.workspace.slug}\` and retry.`);
|
|
1985
1985
|
process.exit(1);
|
|
1986
1986
|
}
|
|
1987
|
-
printError(`No agent with id ${agentSelector} in any workspace on this account. It may belong to a different account
|
|
1987
|
+
printError(`No agent with id ${agentSelector} in any workspace on this account. It may belong to a different account (run \`skydive auth login\` with the right one), or the agent may have been archived.`);
|
|
1988
1988
|
process.exit(1);
|
|
1989
1989
|
}
|
|
1990
1990
|
async function runPrintMode({ argv, appUrl }) {
|
|
@@ -1993,7 +1993,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1993
1993
|
printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
1994
1994
|
process.exit(1);
|
|
1995
1995
|
}
|
|
1996
|
-
const { runPrint, readStdin } = await import("./print-
|
|
1996
|
+
const { runPrint, readStdin } = await import("./print-LoJjA8FM.mjs");
|
|
1997
1997
|
await ensureAgentWorkspace({
|
|
1998
1998
|
appUrl,
|
|
1999
1999
|
sessionToken: auth.value.token,
|
|
@@ -2018,7 +2018,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
2018
2018
|
process.exit(1);
|
|
2019
2019
|
}
|
|
2020
2020
|
} else {
|
|
2021
|
-
const { connectMachineShare } = await import("./print-share-
|
|
2021
|
+
const { connectMachineShare } = await import("./print-share-DCmeJC5e.mjs");
|
|
2022
2022
|
machineShare = await connectMachineShare({
|
|
2023
2023
|
appUrl: auth.value.appUrl,
|
|
2024
2024
|
sessionToken: auth.value.token,
|
|
@@ -2082,7 +2082,7 @@ const getCommand$1 = {
|
|
|
2082
2082
|
printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
2083
2083
|
process.exit(1);
|
|
2084
2084
|
}
|
|
2085
|
-
const { messageGet } = await import("./print-
|
|
2085
|
+
const { messageGet } = await import("./print-LoJjA8FM.mjs");
|
|
2086
2086
|
try {
|
|
2087
2087
|
const result = await messageGet({
|
|
2088
2088
|
appUrl: auth.value.appUrl,
|
|
@@ -2285,7 +2285,7 @@ const switchCommand = {
|
|
|
2285
2285
|
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.");
|
|
2286
2286
|
process.exit(1);
|
|
2287
2287
|
}
|
|
2288
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2288
|
+
const { runWorkspacePicker } = await import("./boot-Dr-HUl-c.mjs");
|
|
2289
2289
|
await runWorkspacePicker(session);
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
@@ -2375,7 +2375,7 @@ const openCommand = {
|
|
|
2375
2375
|
resolveCwd: () => cwd,
|
|
2376
2376
|
onState: (state) => {
|
|
2377
2377
|
if (state.status === "connected") signalConnected();
|
|
2378
|
-
const line = state.status === "error" ? `portal: connection error: ${state.error ?? "unknown"}
|
|
2378
|
+
const line = state.status === "error" ? `portal: connection error: ${state.error ?? "unknown"}; retrying` : `portal: ${state.status}`;
|
|
2379
2379
|
if (line === lastLine) return;
|
|
2380
2380
|
lastLine = line;
|
|
2381
2381
|
if (state.status === "error") console.error(line);
|
|
@@ -2394,7 +2394,7 @@ const openCommand = {
|
|
|
2394
2394
|
await client.grantAgent(agent.id);
|
|
2395
2395
|
console.log(`portal: granted ${agent.name} access to this machine (persists until revoked)`);
|
|
2396
2396
|
}
|
|
2397
|
-
console.log(`portal: open
|
|
2397
|
+
console.log(`portal: open. granted agents can run commands on ${machineName} as your user, cwd ${cwd}. ctrl+c to close.`);
|
|
2398
2398
|
await new Promise(() => {});
|
|
2399
2399
|
}
|
|
2400
2400
|
};
|
|
@@ -2420,7 +2420,7 @@ const grantCommand = {
|
|
|
2420
2420
|
});
|
|
2421
2421
|
return;
|
|
2422
2422
|
}
|
|
2423
|
-
console.log(`Granted ${agent.name} access to ${device?.friendlyName ?? friendlyName}. The agent can run commands here whenever its portal is open
|
|
2423
|
+
console.log(`Granted ${agent.name} access to ${device?.friendlyName ?? friendlyName}. The agent can run commands here whenever its portal is open. Start with \`skydive portal open\`, or pass \`--share-machine\` on a \`chat -p\` run. Revoke with \`skydive portal revoke --agent ${agent.name}\`.`);
|
|
2424
2424
|
}
|
|
2425
2425
|
};
|
|
2426
2426
|
const revokeCommand = {
|
|
@@ -2429,7 +2429,7 @@ const revokeCommand = {
|
|
|
2429
2429
|
builder: agentOption,
|
|
2430
2430
|
handler: async (argv) => {
|
|
2431
2431
|
const { session, agent, device } = await resolveGrantTarget(argv);
|
|
2432
|
-
if (!device) throw new Error(`this machine (${machineIdentity().machineName}) isn't registered with the portal
|
|
2432
|
+
if (!device) throw new Error(`this machine (${machineIdentity().machineName}) isn't registered with the portal, so there's nothing to revoke.`);
|
|
2433
2433
|
await revokePortalAccess(session, {
|
|
2434
2434
|
deviceId: device.id,
|
|
2435
2435
|
agentId: agent.id
|
|
@@ -2637,7 +2637,7 @@ const sandboxCommand = {
|
|
|
2637
2637
|
handler: async (argv) => {
|
|
2638
2638
|
const session = requireSession(argv);
|
|
2639
2639
|
const { createRestClient } = await import("./rest-DfpoRJ_Q.mjs");
|
|
2640
|
-
const { resolveAgent } = await import("./print-
|
|
2640
|
+
const { resolveAgent } = await import("./print-LoJjA8FM.mjs");
|
|
2641
2641
|
const client = createRestClient({
|
|
2642
2642
|
appUrl: session.appUrl,
|
|
2643
2643
|
sessionToken: session.sessionToken
|
|
@@ -2946,7 +2946,7 @@ async function downloadAndVerify(opts) {
|
|
|
2946
2946
|
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
2947
2947
|
if (bytes.byteLength === 0) throw new UpdateError(`download from ${url} was empty`);
|
|
2948
2948
|
const actual = sha256Hex(bytes);
|
|
2949
|
-
if (actual !== opts.expectedSha256) throw new UpdateError(`sha256 mismatch (expected ${opts.expectedSha256}, got ${actual})
|
|
2949
|
+
if (actual !== opts.expectedSha256) throw new UpdateError(`sha256 mismatch (expected ${opts.expectedSha256}, got ${actual}). the download may be corrupt; re-run \`skydive update\``);
|
|
2950
2950
|
return bytes;
|
|
2951
2951
|
}
|
|
2952
2952
|
/**
|
|
@@ -3321,7 +3321,7 @@ const updateCommand = {
|
|
|
3321
3321
|
});
|
|
3322
3322
|
return;
|
|
3323
3323
|
}
|
|
3324
|
-
throw new UpdateError(source === "binary" ? `couldn't reach the ${channel} release channel
|
|
3324
|
+
throw new UpdateError(source === "binary" ? `couldn't reach the ${channel} release channel; check your connection and try again.` : `couldn't reach the npm registry to look up the ${channel} release; check your connection and try again.`);
|
|
3325
3325
|
}
|
|
3326
3326
|
const plan = planUpdate({
|
|
3327
3327
|
currentVersion,
|
|
@@ -3376,7 +3376,7 @@ const updateCommand = {
|
|
|
3376
3376
|
return;
|
|
3377
3377
|
}
|
|
3378
3378
|
const selfPath = resolveSelfPath();
|
|
3379
|
-
if (!selfPath) throw new UpdateError("couldn't determine this binary's path to replace it
|
|
3379
|
+
if (!selfPath) throw new UpdateError("couldn't determine this binary's path to replace it; reinstall with the install script instead.");
|
|
3380
3380
|
console.log(describePlan(plan, channel, false));
|
|
3381
3381
|
await applyBinary(selfPath, await downloadAndVerify({
|
|
3382
3382
|
downloadBaseUrl: RELEASE_CDN_URL,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-
|
|
3
|
-
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, 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, y as DEFAULT_APP_URL } from "./print-
|
|
2
|
+
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-Dn361Z1u.mjs";
|
|
3
|
+
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, 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, y as DEFAULT_APP_URL } from "./print-CswnhVUN.mjs";
|
|
4
4
|
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-CG7VpQ56.mjs";
|
|
5
5
|
import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-CwfG1BTR.mjs";
|
|
6
6
|
import { t as PortalClient } from "./client-DiaJZQG6.mjs";
|
|
@@ -168,7 +168,7 @@ const useStore = create((set, get) => ({
|
|
|
168
168
|
async function resolveInitialScreen({ rest, agentSelector, conversationId, newConversation }) {
|
|
169
169
|
if (conversationId) {
|
|
170
170
|
const [conversation, agents] = await Promise.all([rest.getConversation({ conversationId }).catch((err) => {
|
|
171
|
-
if (err instanceof HttpError && err.status === 404) throw new Error(`No conversation with id ${conversationId}
|
|
171
|
+
if (err instanceof HttpError && err.status === 404) throw new Error(`No conversation with id ${conversationId}. It may have been deleted, or belong to another workspace.`);
|
|
172
172
|
throw err;
|
|
173
173
|
}), rest.listAgents({
|
|
174
174
|
scope: "org",
|
|
@@ -5376,7 +5376,7 @@ function useCompaction({ rest, conversationId }) {
|
|
|
5376
5376
|
}, [armIndicator, clearTimer]);
|
|
5377
5377
|
const compactConversation = useCallback(() => {
|
|
5378
5378
|
if (!rest || !conversationId) {
|
|
5379
|
-
useStore.getState().showToast({ message: "nothing to compact yet
|
|
5379
|
+
useStore.getState().showToast({ message: "nothing to compact yet; send a message first" });
|
|
5380
5380
|
return;
|
|
5381
5381
|
}
|
|
5382
5382
|
armIndicator();
|
|
@@ -5433,7 +5433,7 @@ function formatStatusInfo({ appUrl, workspaceName, agentName, conversationId, mo
|
|
|
5433
5433
|
["app", appUrl ?? "unknown"],
|
|
5434
5434
|
["workspace", workspaceName ?? "unknown"],
|
|
5435
5435
|
["agent", agentName],
|
|
5436
|
-
["conversation", conversationId ?? "new
|
|
5436
|
+
["conversation", conversationId ?? "new (created when you send the first message)"],
|
|
5437
5437
|
["model", model ?? "default"],
|
|
5438
5438
|
["local access", formatShare(share)]
|
|
5439
5439
|
];
|
|
@@ -5441,9 +5441,9 @@ function formatStatusInfo({ appUrl, workspaceName, agentName, conversationId, mo
|
|
|
5441
5441
|
return rows.map(([label, value]) => `${label.padEnd(width)} ${value}`).join("\n");
|
|
5442
5442
|
}
|
|
5443
5443
|
function formatShare(share) {
|
|
5444
|
-
if (share.status === "off") return "off
|
|
5444
|
+
if (share.status === "off") return "off (ctrl+t to share this machine)";
|
|
5445
5445
|
if (share.status !== "connected") return share.status;
|
|
5446
|
-
return share.grantedToAgent ? "shared
|
|
5446
|
+
return share.grantedToAgent ? "shared (this agent can run commands here)" : "shared (this agent is not granted)";
|
|
5447
5447
|
}
|
|
5448
5448
|
|
|
5449
5449
|
//#endregion
|
|
@@ -6160,7 +6160,7 @@ function HelpModal({ onClose }) {
|
|
|
6160
6160
|
children: [
|
|
6161
6161
|
"… ",
|
|
6162
6162
|
hidden,
|
|
6163
|
-
" more
|
|
6163
|
+
" more (search to narrow down)"
|
|
6164
6164
|
]
|
|
6165
6165
|
}) : null]
|
|
6166
6166
|
}),
|
|
@@ -6205,7 +6205,7 @@ function CompletionMenu({ items, highlight }) {
|
|
|
6205
6205
|
},
|
|
6206
6206
|
children: windowed.length === 0 ? /* @__PURE__ */ jsx("text", {
|
|
6207
6207
|
fg: theme.muted,
|
|
6208
|
-
children: "no matching command
|
|
6208
|
+
children: "no matching command (↵ sends as a message)"
|
|
6209
6209
|
}) : windowed.map((item, i) => {
|
|
6210
6210
|
const selected = start + i === highlight;
|
|
6211
6211
|
return /* @__PURE__ */ jsxs("text", {
|
|
@@ -6672,7 +6672,7 @@ function FilterableModelList({ models, currentModel, modelLocked, agentId, onSel
|
|
|
6672
6672
|
}),
|
|
6673
6673
|
modelLocked ? /* @__PURE__ */ jsx("text", {
|
|
6674
6674
|
fg: theme.warning,
|
|
6675
|
-
children: "this agent is locked to a Google-compliant model
|
|
6675
|
+
children: "this agent is locked to a Google-compliant model; changes will be rejected. disconnect Google to switch freely."
|
|
6676
6676
|
}) : null,
|
|
6677
6677
|
/* @__PURE__ */ jsxs("box", {
|
|
6678
6678
|
style: {
|
|
@@ -6813,7 +6813,7 @@ function ThemePreview() {
|
|
|
6813
6813
|
/* @__PURE__ */ jsx("text", { children: " " }),
|
|
6814
6814
|
/* @__PURE__ */ jsx("markdown", {
|
|
6815
6815
|
content: [
|
|
6816
|
-
"Wrapped it in exponential backoff
|
|
6816
|
+
"Wrapped it in exponential backoff: three attempts, then it",
|
|
6817
6817
|
"throws the last error:",
|
|
6818
6818
|
"",
|
|
6819
6819
|
"```typescript",
|
|
@@ -6949,7 +6949,7 @@ function ThemePicker({ onClose }) {
|
|
|
6949
6949
|
},
|
|
6950
6950
|
children: /* @__PURE__ */ jsx("text", {
|
|
6951
6951
|
fg: theme.muted,
|
|
6952
|
-
children: "theme is pinned (NO_COLOR, --theme, or SKYDIVE_THEME)
|
|
6952
|
+
children: "theme is pinned (NO_COLOR, --theme, or SKYDIVE_THEME). unset it to pick interactively."
|
|
6953
6953
|
})
|
|
6954
6954
|
}),
|
|
6955
6955
|
/* @__PURE__ */ jsx("text", {
|
|
@@ -6993,7 +6993,7 @@ function ThemePicker({ onClose }) {
|
|
|
6993
6993
|
}),
|
|
6994
6994
|
/* @__PURE__ */ jsxs("text", {
|
|
6995
6995
|
fg: theme.muted,
|
|
6996
|
-
children: [themeMode, " themes
|
|
6996
|
+
children: [themeMode, " themes (following the terminal background)"]
|
|
6997
6997
|
}),
|
|
6998
6998
|
placement === "right" ? /* @__PURE__ */ jsxs("box", {
|
|
6999
6999
|
style: {
|
|
@@ -8711,7 +8711,7 @@ function ReviewPane({ agentId, conversationId, items, viewportWidth, viewportHei
|
|
|
8711
8711
|
if (ok) {
|
|
8712
8712
|
persist([]);
|
|
8713
8713
|
setStatus("copied to clipboard");
|
|
8714
|
-
} else setStatus("clipboard unavailable
|
|
8714
|
+
} else setStatus("clipboard unavailable; comments kept");
|
|
8715
8715
|
});
|
|
8716
8716
|
return;
|
|
8717
8717
|
}
|
|
@@ -10063,12 +10063,12 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10063
10063
|
if (autoGrantMachine && portalClient && portalStatus === "connected" && !portalClient.isGranted(agent.id)) try {
|
|
10064
10064
|
await portalClient.grantAgent(agent.id);
|
|
10065
10065
|
useStore.getState().showToast({
|
|
10066
|
-
message: `Shared this machine with ${agent.name} for the import. The grant persists
|
|
10066
|
+
message: `Shared this machine with ${agent.name} for the import. The grant persists. Revoke anytime: skydive portal revoke --agent ${agent.name}`,
|
|
10067
10067
|
durationMs: 1e4
|
|
10068
10068
|
});
|
|
10069
10069
|
} catch (err) {
|
|
10070
10070
|
useStore.getState().showToast({
|
|
10071
|
-
message: `Couldn't grant machine access automatically (${errorMessage(err)})
|
|
10071
|
+
message: `Couldn't grant machine access automatically (${errorMessage(err)}). The agent will ask in chat instead.`,
|
|
10072
10072
|
variant: "warning"
|
|
10073
10073
|
});
|
|
10074
10074
|
}
|
|
@@ -10408,7 +10408,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10408
10408
|
setItems((prev) => [...prev, {
|
|
10409
10409
|
kind: "error",
|
|
10410
10410
|
id: crypto.randomUUID(),
|
|
10411
|
-
text: `attachment limit reached (${maxAttachments})
|
|
10411
|
+
text: `attachment limit reached (${maxAttachments}); ${fileName} skipped`
|
|
10412
10412
|
}]);
|
|
10413
10413
|
return;
|
|
10414
10414
|
}
|
|
@@ -10534,7 +10534,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10534
10534
|
const openInBrowser = useCallback(() => {
|
|
10535
10535
|
if (!appUrl) return;
|
|
10536
10536
|
if (!conversationId) {
|
|
10537
|
-
useStore.getState().showToast({ message: "no web page yet
|
|
10537
|
+
useStore.getState().showToast({ message: "no web page yet; send a message to start the conversation" });
|
|
10538
10538
|
return;
|
|
10539
10539
|
}
|
|
10540
10540
|
const url = `${resolveWebUrl(appUrl)}/c/${encodeURIComponent(conversationId)}`;
|
|
@@ -10544,7 +10544,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10544
10544
|
})).catch((err) => setItems((prev) => [...prev, {
|
|
10545
10545
|
kind: "error",
|
|
10546
10546
|
id: crypto.randomUUID(),
|
|
10547
|
-
text: `couldn't open a browser
|
|
10547
|
+
text: `couldn't open a browser; visit ${url} (${errorMessage(err)})`
|
|
10548
10548
|
}]));
|
|
10549
10549
|
}, [appUrl, conversationId]);
|
|
10550
10550
|
const forkAndContinue = useCallback(() => {
|
|
@@ -10590,7 +10590,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10590
10590
|
return;
|
|
10591
10591
|
}
|
|
10592
10592
|
if (!conversationId) {
|
|
10593
|
-
useStore.getState().showToast({ message: "nothing to archive yet
|
|
10593
|
+
useStore.getState().showToast({ message: "nothing to archive yet; send a message to start this one" });
|
|
10594
10594
|
return;
|
|
10595
10595
|
}
|
|
10596
10596
|
if (!rest) return;
|
|
@@ -10600,7 +10600,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10600
10600
|
}).then(() => {
|
|
10601
10601
|
useStore.getState().showToast({
|
|
10602
10602
|
variant: "success",
|
|
10603
|
-
message: "archived
|
|
10603
|
+
message: "archived (shift+tab in the picker shows it, ctrl+a restores)"
|
|
10604
10604
|
});
|
|
10605
10605
|
goTo({
|
|
10606
10606
|
kind: "conversation-picker",
|
|
@@ -10608,7 +10608,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10608
10608
|
});
|
|
10609
10609
|
}).catch((err) => useStore.getState().showToast({
|
|
10610
10610
|
variant: "error",
|
|
10611
|
-
message: err instanceof HttpError && err.status === 404 ? "can't archive this one
|
|
10611
|
+
message: err instanceof HttpError && err.status === 404 ? "can't archive this one; it's already gone from your list" : `couldn't archive: ${errorMessage(err)}`
|
|
10612
10612
|
}));
|
|
10613
10613
|
}, [
|
|
10614
10614
|
grantPrompt,
|
|
@@ -10632,7 +10632,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10632
10632
|
return;
|
|
10633
10633
|
}
|
|
10634
10634
|
if (!conversationId) {
|
|
10635
|
-
useStore.getState().showToast({ message: "nothing to rename yet
|
|
10635
|
+
useStore.getState().showToast({ message: "nothing to rename yet; send a message to start this one" });
|
|
10636
10636
|
return;
|
|
10637
10637
|
}
|
|
10638
10638
|
if (!rest) return;
|
|
@@ -10661,7 +10661,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10661
10661
|
const leaveForScreen = useCallback((next) => {
|
|
10662
10662
|
const current = runRef.current;
|
|
10663
10663
|
if (current.kind === "streaming") current.abort.abort();
|
|
10664
|
-
if (current.kind !== "idle") useStore.getState().showToast({ message: `${agent.name} keeps working
|
|
10664
|
+
if (current.kind !== "idle") useStore.getState().showToast({ message: `${agent.name} keeps working; reopen to reattach` });
|
|
10665
10665
|
goTo(next);
|
|
10666
10666
|
}, [agent.name, goTo]);
|
|
10667
10667
|
/**
|
|
@@ -10680,7 +10680,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10680
10680
|
setItems((prev) => [...prev, {
|
|
10681
10681
|
kind: "error",
|
|
10682
10682
|
id: crypto.randomUUID(),
|
|
10683
|
-
text: `not a conversation id: ${ref}
|
|
10683
|
+
text: `not a conversation id: ${ref}. pass an id, its /c/<id> link, or run /conversation on its own to pick from the list`
|
|
10684
10684
|
}]);
|
|
10685
10685
|
return;
|
|
10686
10686
|
}
|
|
@@ -10710,7 +10710,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10710
10710
|
]);
|
|
10711
10711
|
const toggleShare = useCallback(() => {
|
|
10712
10712
|
if (!portalClient) {
|
|
10713
|
-
useStore.getState().showToast({ message: useStore.getState().authKind === "api-key" ? "local access needs a browser session
|
|
10713
|
+
useStore.getState().showToast({ message: useStore.getState().authKind === "api-key" ? "local access needs a browser session; run `skydive auth login --web`" : "local access is unavailable in this session" });
|
|
10714
10714
|
return;
|
|
10715
10715
|
}
|
|
10716
10716
|
if (portal.status === "off") {
|
|
@@ -10753,7 +10753,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10753
10753
|
}, [agent.id, setPortalPrompt]);
|
|
10754
10754
|
const openPortalAccess = useCallback(() => {
|
|
10755
10755
|
if (!portalClient) {
|
|
10756
|
-
useStore.getState().showToast({ message: useStore.getState().authKind === "api-key" ? "local access needs a browser session
|
|
10756
|
+
useStore.getState().showToast({ message: useStore.getState().authKind === "api-key" ? "local access needs a browser session; run `skydive auth login --web`" : "local access is unavailable in this session" });
|
|
10757
10757
|
return;
|
|
10758
10758
|
}
|
|
10759
10759
|
switch (portal.status) {
|
|
@@ -10842,7 +10842,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10842
10842
|
break;
|
|
10843
10843
|
}
|
|
10844
10844
|
if (!conversationId) {
|
|
10845
|
-
useStore.getState().showToast({ message: "nothing to fork yet
|
|
10845
|
+
useStore.getState().showToast({ message: "nothing to fork yet; send a message first" });
|
|
10846
10846
|
break;
|
|
10847
10847
|
}
|
|
10848
10848
|
forkAndContinue();
|
|
@@ -11173,7 +11173,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
11173
11173
|
if (runRef.current.kind === "streaming") {
|
|
11174
11174
|
if (cancelLatestSteer()) return;
|
|
11175
11175
|
runRef.current.abort.abort();
|
|
11176
|
-
useStore.getState().showToast({ message: `${agent.name} keeps working
|
|
11176
|
+
useStore.getState().showToast({ message: `${agent.name} keeps working; reopen to reattach` });
|
|
11177
11177
|
goTo({
|
|
11178
11178
|
kind: "conversation-picker",
|
|
11179
11179
|
agent
|
|
@@ -573,7 +573,7 @@ async function runPrint({ appUrl, sessionToken, prompt, agentSelector, conversat
|
|
|
573
573
|
if (machineShare) {
|
|
574
574
|
if (!machineShare.isGranted(agent.id) && grantTargetAgent) await machineShare.grantAgent(agent.id);
|
|
575
575
|
if (machineShare.isGranted(agent.id)) console.error(`portal: shared this machine with ${agent.name} for this run (grant persists until revoked)`);
|
|
576
|
-
else console.error(`portal: this machine is shared (shareMachineDefault), but ${agent.name} has no grant
|
|
576
|
+
else console.error(`portal: this machine is shared (shareMachineDefault), but ${agent.name} has no grant. Approve its request, or run \`skydive portal grant --agent ${agent.name}\`.`);
|
|
577
577
|
}
|
|
578
578
|
let send;
|
|
579
579
|
try {
|
|
@@ -737,7 +737,7 @@ function resolveAgent(agents, selector) {
|
|
|
737
737
|
const [only, ...rest] = agents;
|
|
738
738
|
if (!only) throw new Error("No agents on this account.");
|
|
739
739
|
if (rest.length === 0) return only;
|
|
740
|
-
throw new Error(`Multiple agents on this account
|
|
740
|
+
throw new Error(`Multiple agents on this account. Pass --agent <id|slug|name>. Candidates:\n${formatCandidates(agents)}`);
|
|
741
741
|
}
|
|
742
742
|
const byId = agents.find((a) => a.id === selector);
|
|
743
743
|
if (byId) return byId;
|
|
@@ -745,7 +745,7 @@ function resolveAgent(agents, selector) {
|
|
|
745
745
|
const matches = agents.filter((a) => a.slug && a.slug.toLowerCase() === needle || a.name.toLowerCase() === needle);
|
|
746
746
|
const [firstMatch, ...restMatches] = matches;
|
|
747
747
|
if (firstMatch && restMatches.length === 0) return firstMatch;
|
|
748
|
-
if (restMatches.length > 0) throw new Error(`Multiple agents match "${selector}"
|
|
748
|
+
if (restMatches.length > 0) throw new Error(`Multiple agents match "${selector}". Pass the id instead. Candidates:\n${formatCandidates(matches)}`);
|
|
749
749
|
throw new Error(`No agent matches "${selector}". Candidates:\n${formatCandidates(agents)}`);
|
|
750
750
|
}
|
|
751
751
|
function formatCandidates(agents) {
|
|
@@ -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-
|
|
2
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-CswnhVUN.mjs";
|
|
3
3
|
import "./rest-CG7VpQ56.mjs";
|
|
4
4
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
5
5
|
|
|
@@ -25,13 +25,13 @@ async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
|
|
|
25
25
|
resolveCwd: () => process.cwd(),
|
|
26
26
|
onState: (state) => {
|
|
27
27
|
if (state.status === "connected") signalConnected();
|
|
28
|
-
if (state.status === "error") console.error(`portal: connection error: ${state.error ?? "unknown"}
|
|
28
|
+
if (state.status === "error") console.error(`portal: connection error: ${state.error ?? "unknown"}; retrying`);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
machineShare.enable();
|
|
32
32
|
if (await Promise.race([connected.then(() => false), new Promise((resolve) => setTimeout(() => resolve(true), 3e4).unref())])) {
|
|
33
33
|
machineShare.dispose();
|
|
34
|
-
printError(`Could not connect the portal within 30s
|
|
34
|
+
printError(`Could not connect the portal within 30s. Machine sharing is unavailable (network, or the portal kill switch is off). ${timeoutHint ?? "Check `skydive portal status`."}`);
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
return machineShare;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as getConfigPath } from "./print-
|
|
2
|
+
import { S as getConfigPath } from "./print-CswnhVUN.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.4.0-beta.
|
|
11
|
+
var version$1 = "0.4.0-beta.1140";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/auth/organization.ts
|