skydive-cli 0.6.0-beta.37 → 0.6.0-beta.40
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 +2 -0
- package/dist/js/bin.mjs +136 -37
- package/dist/js/{boot-CACQ3-zf.mjs → boot-DxKctQgF.mjs} +3947 -3703
- package/dist/js/client-DV0Su5yh.mjs +5 -0
- package/dist/js/{client-l6orYfqq.mjs → client-Dr81zuTm.mjs} +6 -2
- package/dist/js/{client-Ba9HLi2X.mjs → client-lWdOjmgQ.mjs} +1 -1
- package/dist/js/{daemon-CYjfddX6.mjs → daemon-B-_pZEic.mjs} +2 -2
- package/dist/js/{daemon-jYTvsCyl.mjs → daemon-CJ0vkUCL.mjs} +1 -1
- package/dist/js/daemon-client-BlMSyVVq.mjs +8 -0
- package/dist/js/{daemon-client-BGQuSoCe.mjs → daemon-client-CEPHWBu5.mjs} +1 -1
- package/dist/js/{install-CmReTVxP.mjs → install-DJDYwL8B.mjs} +2 -2
- package/dist/js/{print-gLfS48ET.mjs → print-CAOpxiVO.mjs} +2 -2
- package/dist/js/{print-CrsJ2_GH.mjs → print-DMyEfL8X.mjs} +12 -11
- package/dist/js/{print-share-CNxK943f.mjs → print-share-Bu-bIPqy.mjs} +1 -1
- package/dist/js/{raw-pty-dndn1Kxc.mjs → raw-pty-C323I8xG.mjs} +1 -1
- package/dist/js/raw-pty-WUHQQwTF.mjs +5 -0
- package/dist/js/{rest-ovzxN-23.mjs → rest-D57sPafI.mjs} +15 -4
- package/dist/js/{rest-AtKGRlCi.mjs → rest-RbyLx50Z.mjs} +1 -1
- package/package.json +5 -5
- package/dist/js/client-D6rhqBY_.mjs +0 -5
- package/dist/js/daemon-client-CD6mijde.mjs +0 -8
- package/dist/js/raw-pty-DRZuf1oW.mjs +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Changed
|
|
11
11
|
|
|
12
|
+
- `skydive secrets` and `skydive keys` now accept `--agent <id or name>` (the same flag every other agent-targeting command uses), resolving the name against your agent roster. They used to take only a raw `--agent-id`, so passing the name every other command accepts 404'd "agent not found" for a perfectly real agent; `--agent-id` still works.
|
|
13
|
+
|
|
12
14
|
- `/fork` in the chat TUI now works while the agent is mid-run. It used to refuse with "finish or cancel the run first"; now it copies the conversation up to the last completed message and opens the copy, while the agent keeps working on the original — reopen the original to reattach, exactly as after `esc`. This matches the web "Fork chat" menu item, which never had the restriction.
|
|
13
15
|
- The two cards pinned above the chat TUI composer — **subagents** and **plan** — can now be minimized to a single header row. Click a card's header (the `▾`/`▸` chevron shows which way it goes), or use `/subagent minimize` and `/plan minimize`; the same again, or `/plan expand`, brings the rows back. Minimized, a card keeps its label and its progress counter (`Subagents 7/10`), so a ten-task fan-out costs one row instead of ten and the rest of the terminal goes back to the transcript. `/plan expand` and `/plan collapse` keep their meaning (unfold and re-fold the completed rows the card windows away); clicking the card's _body_ still does the same, and the hints now say which surface does which.
|
|
14
16
|
- Reopening a conversation whose subagents and plan are all finished now opens both pinned cards minimized to their header row (`▸ ✔ Subagents 4/4`, `▸ Plan 5/5`) instead of spending up to ten rows above the composer on finished work. A card that opens this way pops back open by itself the moment new work goes live in that conversation (a fresh fan-out, a new in-progress step); a card you minimized yourself stays minimized, as before. Work still running when you open the conversation shows its rows, exactly as it did.
|
package/dist/js/bin.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as version, s as name, t as createRestClient } from "./rest-
|
|
3
|
-
import { A as
|
|
4
|
-
import { A as installAgentAlias, B as resolveWorkspaceId, D as machineOsFromPlatform, E as buildImportSeedPrompt, F as detectShell, I as ensureActiveOrganization, L as getActiveWorkspaceId, M as takenAliasNames, N as SUPPORTED_SHELLS, O as aliasActivationHint, P as defaultInstallEnv, R as getSessionIdentity, V as setActiveWorkspace, c as getAutomaticLogsDir, j as slugifyAliasName, k as dedupeAliasName, l as maybeStartProfiling, o as brandHelpArt, t as installCrashHandler, u as profileDir, w as themes, z as listWorkspaces } from "./install-
|
|
2
|
+
import { c as version, s as name, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
|
+
import { A as getPreference, B as resolveChatAuth, C as DEFAULT_API_URL, D as getConfigPath, E as deleteConfig, F as getStoredApiKeyId, G as saveConfig, H as resolveManagementAuth, I as getStoredApiKeyWorkspaceName, J as setLastSeenVersion, K as saveSession, L as getUpdateCheckDisabled, O as getDefaultAgent, P as getShareMachineDefault, S as API_KEY_PREFIX, T as PREFERENCES, U as resolveSession$1, V as resolveConfig, b as API_KEYS_URL, i as resolveAgent$1, j as getPromptHistoryPath, k as getLastSeenVersion, x as API_KEY_FAMILY_PREFIX, z as resolveAppUrl } from "./print-DMyEfL8X.mjs";
|
|
4
|
+
import { A as installAgentAlias, B as resolveWorkspaceId, D as machineOsFromPlatform, E as buildImportSeedPrompt, F as detectShell, I as ensureActiveOrganization, L as getActiveWorkspaceId, M as takenAliasNames, N as SUPPORTED_SHELLS, O as aliasActivationHint, P as defaultInstallEnv, R as getSessionIdentity, V as setActiveWorkspace, c as getAutomaticLogsDir, j as slugifyAliasName, k as dedupeAliasName, l as maybeStartProfiling, o as brandHelpArt, t as installCrashHandler, u as profileDir, w as themes, z as listWorkspaces } from "./install-DJDYwL8B.mjs";
|
|
5
5
|
import { n as printError, r as printTable, t as output } from "./output-C9mb3sUB.mjs";
|
|
6
6
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
7
7
|
import "./billing-blocked-D3l5kJlX.mjs";
|
|
8
|
-
import { a as resolveMachineIdentity } from "./client-
|
|
8
|
+
import { a as resolveMachineIdentity } from "./client-lWdOjmgQ.mjs";
|
|
9
9
|
import "./tls-cert-Rua2oV7n.mjs";
|
|
10
10
|
import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-BFQ4PQDA.mjs";
|
|
11
|
-
import { d as daemonPaths, i as queryDaemonStatus, n as ensureDaemonRunning, s as stopDaemon, u as PORTAL_DAEMON_FLAG } from "./daemon-
|
|
12
|
-
import { a as encodeFsRequest, i as decodeFsResponse, n as SANDBOX_STREAM_PATH, r as streamSpecToQuery, t as SandboxStream } from "./client-
|
|
11
|
+
import { d as daemonPaths, i as queryDaemonStatus, n as ensureDaemonRunning, s as stopDaemon, u as PORTAL_DAEMON_FLAG } from "./daemon-CJ0vkUCL.mjs";
|
|
12
|
+
import { a as encodeFsRequest, i as decodeFsResponse, n as SANDBOX_STREAM_PATH, r as streamSpecToQuery, t as SandboxStream } from "./client-Dr81zuTm.mjs";
|
|
13
13
|
import { hideBin } from "yargs/helpers";
|
|
14
14
|
import yargs from "yargs";
|
|
15
15
|
import { hostname, tmpdir } from "node:os";
|
|
@@ -1027,6 +1027,40 @@ function requireManagementClient(argv, opts = {}) {
|
|
|
1027
1027
|
...opts.workspaceId ? { workspaceId: opts.workspaceId } : {}
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Resolve an agent-targeting command's agent selector (id or name) against
|
|
1032
|
+
* the management roster, returning the id, or exit with the candidate list.
|
|
1033
|
+
*
|
|
1034
|
+
* `secrets` and `keys` historically took a raw `--agent-id` and hit
|
|
1035
|
+
* `/agents/<value>/...` directly, so a name 404'd "agent not found" for a
|
|
1036
|
+
* perfectly real agent, while `sandbox`/`fs`/`portal` resolved the same
|
|
1037
|
+
* string happily (ANY-8977). Reads one page (the same 100 `skydive agents
|
|
1038
|
+
* list` shows), so the error's candidates are what the user was looking at.
|
|
1039
|
+
*/
|
|
1040
|
+
async function resolveTargetAgentId(client, selector) {
|
|
1041
|
+
if (!selector) {
|
|
1042
|
+
printError("Missing --agent <id or name>. Run `skydive agents list` for candidates.");
|
|
1043
|
+
process.exit(1);
|
|
1044
|
+
}
|
|
1045
|
+
const { resolveAgent } = await import("./print-CAOpxiVO.mjs");
|
|
1046
|
+
const result = await client.listAgents({
|
|
1047
|
+
scope: "org",
|
|
1048
|
+
limit: 100
|
|
1049
|
+
});
|
|
1050
|
+
if (result.isErr()) {
|
|
1051
|
+
printError(result.error.message);
|
|
1052
|
+
process.exit(1);
|
|
1053
|
+
}
|
|
1054
|
+
try {
|
|
1055
|
+
return resolveAgent(result.value.agents.map((agent) => ({
|
|
1056
|
+
id: agent.id,
|
|
1057
|
+
name: agent.name
|
|
1058
|
+
})), selector).id;
|
|
1059
|
+
} catch (error) {
|
|
1060
|
+
printError(error instanceof Error ? error.message : String(error));
|
|
1061
|
+
process.exit(1);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1030
1064
|
/** Resolve the session (see {@link requireSession}) and build a REST client. */
|
|
1031
1065
|
function requireRestClient(argv) {
|
|
1032
1066
|
const auth = resolveChatAuth({ appUrl: resolveAppUrl({ appUrl: argv["api-url"] }) });
|
|
@@ -1586,7 +1620,7 @@ const importCommand = {
|
|
|
1586
1620
|
process.exit(1);
|
|
1587
1621
|
}
|
|
1588
1622
|
}
|
|
1589
|
-
const { runChat } = await import("./boot-
|
|
1623
|
+
const { runChat } = await import("./boot-DxKctQgF.mjs");
|
|
1590
1624
|
await runChat({
|
|
1591
1625
|
appUrl,
|
|
1592
1626
|
sessionToken: session.value.sessionToken,
|
|
@@ -1616,7 +1650,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1616
1650
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1617
1651
|
process.exit(1);
|
|
1618
1652
|
}
|
|
1619
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1653
|
+
const { connectMachineShare } = await import("./print-share-Bu-bIPqy.mjs");
|
|
1620
1654
|
const machineShare = await connectMachineShare({
|
|
1621
1655
|
appUrl,
|
|
1622
1656
|
sessionToken: session.value.sessionToken,
|
|
@@ -1624,7 +1658,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1624
1658
|
});
|
|
1625
1659
|
const extra = (argv.print ?? "").trim();
|
|
1626
1660
|
const prompt = buildImportSeedPrompt(process.cwd(), machineOsFromPlatform(process.platform)) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1627
|
-
const { runPrint } = await import("./print-
|
|
1661
|
+
const { runPrint } = await import("./print-CAOpxiVO.mjs");
|
|
1628
1662
|
try {
|
|
1629
1663
|
const result = await runPrint({
|
|
1630
1664
|
appUrl,
|
|
@@ -1652,7 +1686,9 @@ const listCommand$5 = {
|
|
|
1652
1686
|
command: "list",
|
|
1653
1687
|
describe: "List API keys for an agent",
|
|
1654
1688
|
handler: async (argv) => {
|
|
1655
|
-
const
|
|
1689
|
+
const client = requireManagementClient(argv);
|
|
1690
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1691
|
+
const result = await client.listKeys(agentId);
|
|
1656
1692
|
if (result.isErr()) {
|
|
1657
1693
|
printError(result.error.message);
|
|
1658
1694
|
process.exit(1);
|
|
@@ -1688,7 +1724,9 @@ const createCommand = {
|
|
|
1688
1724
|
describe: "Key name"
|
|
1689
1725
|
}),
|
|
1690
1726
|
handler: async (argv) => {
|
|
1691
|
-
const
|
|
1727
|
+
const client = requireManagementClient(argv);
|
|
1728
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1729
|
+
const result = await client.createKey(agentId, argv.name);
|
|
1692
1730
|
if (result.isErr()) {
|
|
1693
1731
|
printError(result.error.message);
|
|
1694
1732
|
process.exit(1);
|
|
@@ -1718,7 +1756,9 @@ const revokeCommand$1 = {
|
|
|
1718
1756
|
describe: "Key ID"
|
|
1719
1757
|
}),
|
|
1720
1758
|
handler: async (argv) => {
|
|
1721
|
-
const
|
|
1759
|
+
const client = requireManagementClient(argv);
|
|
1760
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1761
|
+
const result = await client.revokeKey(agentId, argv.id);
|
|
1722
1762
|
if (result.isErr()) {
|
|
1723
1763
|
printError(result.error.message);
|
|
1724
1764
|
process.exit(1);
|
|
@@ -1733,10 +1773,12 @@ const revokeCommand$1 = {
|
|
|
1733
1773
|
const keysCommand = {
|
|
1734
1774
|
command: "keys",
|
|
1735
1775
|
describe: "Manage API keys for an agent",
|
|
1736
|
-
builder: (y) => y.option("agent
|
|
1776
|
+
builder: (y) => y.option("agent", {
|
|
1737
1777
|
type: "string",
|
|
1738
|
-
|
|
1739
|
-
|
|
1778
|
+
describe: "Target agent, by id or name (e.g. --agent my-agent)"
|
|
1779
|
+
}).option("agent-id", {
|
|
1780
|
+
type: "string",
|
|
1781
|
+
describe: "Target agent id (legacy; prefer --agent)"
|
|
1740
1782
|
}).command(listCommand$5).command(createCommand).command(revokeCommand$1).demandCommand(1, "Specify a subcommand: list, create, revoke"),
|
|
1741
1783
|
handler: () => {}
|
|
1742
1784
|
};
|
|
@@ -1753,7 +1795,9 @@ const listCommand$4 = {
|
|
|
1753
1795
|
command: "list",
|
|
1754
1796
|
describe: "List secret names for an agent (values are never shown)",
|
|
1755
1797
|
handler: async (argv) => {
|
|
1756
|
-
const
|
|
1798
|
+
const client = requireManagementClient(argv);
|
|
1799
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1800
|
+
const result = await client.listSecrets(agentId);
|
|
1757
1801
|
if (result.isErr()) {
|
|
1758
1802
|
printError(result.error.message);
|
|
1759
1803
|
process.exit(1);
|
|
@@ -1794,7 +1838,9 @@ const setCommand$1 = {
|
|
|
1794
1838
|
printError("Empty secret value.");
|
|
1795
1839
|
process.exit(1);
|
|
1796
1840
|
}
|
|
1797
|
-
const
|
|
1841
|
+
const client = requireManagementClient(argv);
|
|
1842
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1843
|
+
const result = await client.setSecret(agentId, argv.key, value);
|
|
1798
1844
|
if (result.isErr()) {
|
|
1799
1845
|
printError(result.error.message);
|
|
1800
1846
|
process.exit(1);
|
|
@@ -1816,7 +1862,9 @@ const rmCommand = {
|
|
|
1816
1862
|
describe: "Secret name"
|
|
1817
1863
|
}),
|
|
1818
1864
|
handler: async (argv) => {
|
|
1819
|
-
const
|
|
1865
|
+
const client = requireManagementClient(argv);
|
|
1866
|
+
const agentId = await resolveTargetAgentId(client, argv.agent ?? argv["agent-id"]);
|
|
1867
|
+
const result = await client.deleteSecret(agentId, argv.key);
|
|
1820
1868
|
if (result.isErr()) {
|
|
1821
1869
|
printError(result.error.message);
|
|
1822
1870
|
process.exit(1);
|
|
@@ -1831,10 +1879,12 @@ const rmCommand = {
|
|
|
1831
1879
|
const secretsCommand = {
|
|
1832
1880
|
command: "secrets",
|
|
1833
1881
|
describe: "Manage an agent’s secrets",
|
|
1834
|
-
builder: (y) => y.option("agent
|
|
1882
|
+
builder: (y) => y.option("agent", {
|
|
1835
1883
|
type: "string",
|
|
1836
|
-
|
|
1837
|
-
|
|
1884
|
+
describe: "Target agent, by id or name (e.g. --agent my-agent)"
|
|
1885
|
+
}).option("agent-id", {
|
|
1886
|
+
type: "string",
|
|
1887
|
+
describe: "Target agent id (legacy; prefer --agent)"
|
|
1838
1888
|
}).command(listCommand$4).command(setCommand$1).command(rmCommand).demandCommand(1, "Specify a subcommand: list, set, rm"),
|
|
1839
1889
|
handler: () => {}
|
|
1840
1890
|
};
|
|
@@ -2031,7 +2081,7 @@ const chatCommand = {
|
|
|
2031
2081
|
sessionToken: auth.value.token,
|
|
2032
2082
|
agentSelector: argv.agent ?? null
|
|
2033
2083
|
});
|
|
2034
|
-
const { runChat } = await import("./boot-
|
|
2084
|
+
const { runChat } = await import("./boot-DxKctQgF.mjs");
|
|
2035
2085
|
await runChat({
|
|
2036
2086
|
appUrl: auth.value.appUrl,
|
|
2037
2087
|
sessionToken: auth.value.token,
|
|
@@ -2115,7 +2165,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
2115
2165
|
printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
2116
2166
|
process.exit(1);
|
|
2117
2167
|
}
|
|
2118
|
-
const { runPrint, readStdin } = await import("./print-
|
|
2168
|
+
const { runPrint, readStdin } = await import("./print-CAOpxiVO.mjs");
|
|
2119
2169
|
const workspaceId = await resolveWorkspaceFlag({
|
|
2120
2170
|
appUrl,
|
|
2121
2171
|
sessionToken: auth.value.token,
|
|
@@ -2145,7 +2195,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
2145
2195
|
process.exit(1);
|
|
2146
2196
|
}
|
|
2147
2197
|
} else {
|
|
2148
|
-
const { connectMachineShare } = await import("./print-share-
|
|
2198
|
+
const { connectMachineShare } = await import("./print-share-Bu-bIPqy.mjs");
|
|
2149
2199
|
machineShare = await connectMachineShare({
|
|
2150
2200
|
appUrl: auth.value.appUrl,
|
|
2151
2201
|
sessionToken: auth.value.token,
|
|
@@ -2210,7 +2260,7 @@ const getCommand$1 = {
|
|
|
2210
2260
|
printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
2211
2261
|
process.exit(1);
|
|
2212
2262
|
}
|
|
2213
|
-
const { messageGet } = await import("./print-
|
|
2263
|
+
const { messageGet } = await import("./print-CAOpxiVO.mjs");
|
|
2214
2264
|
try {
|
|
2215
2265
|
const result = await messageGet({
|
|
2216
2266
|
appUrl: auth.value.appUrl,
|
|
@@ -2413,7 +2463,7 @@ const switchCommand = {
|
|
|
2413
2463
|
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.");
|
|
2414
2464
|
process.exit(1);
|
|
2415
2465
|
}
|
|
2416
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2466
|
+
const { runWorkspacePicker } = await import("./boot-DxKctQgF.mjs");
|
|
2417
2467
|
await runWorkspacePicker(session);
|
|
2418
2468
|
return;
|
|
2419
2469
|
}
|
|
@@ -2492,7 +2542,7 @@ const openCommand = {
|
|
|
2492
2542
|
const agent = argv.agent ? resolveAgent$1((await fetchPortalDevices(session)).agents, argv.agent) : null;
|
|
2493
2543
|
const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
|
|
2494
2544
|
const { machineName } = await resolveMachineIdentity(null);
|
|
2495
|
-
const { PortalDaemonClient } = await import("./daemon-client-
|
|
2545
|
+
const { PortalDaemonClient } = await import("./daemon-client-BlMSyVVq.mjs");
|
|
2496
2546
|
let lastLine = "";
|
|
2497
2547
|
let signalConnected;
|
|
2498
2548
|
const connected = new Promise((resolve) => {
|
|
@@ -2846,11 +2896,14 @@ const sandboxCommand = {
|
|
|
2846
2896
|
type: "string",
|
|
2847
2897
|
array: true,
|
|
2848
2898
|
describe: "Command to run one-shot (streams output, exits with its exit code). Omit for a live interactive terminal. Put it after `--` if it has flags of its own."
|
|
2899
|
+
}).option("timeout", {
|
|
2900
|
+
type: "number",
|
|
2901
|
+
describe: "One-shot commands: kill the command after this many seconds. Without it the server default (~10 min) applies."
|
|
2849
2902
|
}).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`"),
|
|
2850
2903
|
handler: async (argv) => {
|
|
2851
2904
|
const session = requireSession(argv);
|
|
2852
|
-
const { createRestClient } = await import("./rest-
|
|
2853
|
-
const { resolveAgent } = await import("./print-
|
|
2905
|
+
const { createRestClient } = await import("./rest-RbyLx50Z.mjs");
|
|
2906
|
+
const { resolveAgent } = await import("./print-CAOpxiVO.mjs");
|
|
2854
2907
|
const client = createRestClient({
|
|
2855
2908
|
appUrl: session.appUrl,
|
|
2856
2909
|
sessionToken: session.sessionToken
|
|
@@ -2866,10 +2919,20 @@ const sandboxCommand = {
|
|
|
2866
2919
|
process.exit(1);
|
|
2867
2920
|
}
|
|
2868
2921
|
const command = joinCommandWords([...argv.command ?? [], ...argv["--"] ?? []]);
|
|
2922
|
+
if (argv.timeout !== void 0 && !command) {
|
|
2923
|
+
printError("--timeout applies to a one-shot command; pass one after `--`.");
|
|
2924
|
+
process.exit(1);
|
|
2925
|
+
}
|
|
2926
|
+
if (argv.timeout !== void 0 && (!Number.isFinite(argv.timeout) || argv.timeout <= 0)) {
|
|
2927
|
+
printError("--timeout must be a positive number of seconds.");
|
|
2928
|
+
process.exit(1);
|
|
2929
|
+
}
|
|
2930
|
+
const timeoutMs = argv.timeout !== void 0 ? Math.round(argv.timeout * 1e3) : void 0;
|
|
2869
2931
|
const code = command ? await runExec({
|
|
2870
2932
|
session,
|
|
2871
2933
|
agentId: agent.id,
|
|
2872
|
-
command
|
|
2934
|
+
command,
|
|
2935
|
+
timeoutMs
|
|
2873
2936
|
}) : await runPty({
|
|
2874
2937
|
session,
|
|
2875
2938
|
agentId: agent.id,
|
|
@@ -2879,18 +2942,19 @@ const sandboxCommand = {
|
|
|
2879
2942
|
}
|
|
2880
2943
|
};
|
|
2881
2944
|
/** One-shot exec: stream output to stdout, resolve to the command's exit code. */
|
|
2882
|
-
function runExec({ session, agentId, command }) {
|
|
2945
|
+
function runExec({ session, agentId, command, timeoutMs }) {
|
|
2883
2946
|
console.error("Connecting to the sandbox…");
|
|
2884
2947
|
return new Promise((resolve) => {
|
|
2885
2948
|
const finish = (code) => {
|
|
2886
2949
|
process.stdout.write("", () => resolve(code));
|
|
2887
2950
|
};
|
|
2888
|
-
SandboxStream.open({
|
|
2951
|
+
const stream = SandboxStream.open({
|
|
2889
2952
|
mode: "exec",
|
|
2890
2953
|
appUrl: session.appUrl,
|
|
2891
2954
|
sessionToken: session.sessionToken,
|
|
2892
2955
|
agentId,
|
|
2893
2956
|
command,
|
|
2957
|
+
...timeoutMs !== void 0 ? { timeoutMs } : {},
|
|
2894
2958
|
onEvent: (e) => {
|
|
2895
2959
|
switch (e.type) {
|
|
2896
2960
|
case "data":
|
|
@@ -2908,10 +2972,45 @@ function runExec({ session, agentId, command }) {
|
|
|
2908
2972
|
finish(1);
|
|
2909
2973
|
break;
|
|
2910
2974
|
}
|
|
2975
|
+
stopStdinForwarding();
|
|
2911
2976
|
}
|
|
2912
2977
|
});
|
|
2978
|
+
forwardStdinToStream({
|
|
2979
|
+
stdin: process.stdin,
|
|
2980
|
+
stream
|
|
2981
|
+
});
|
|
2913
2982
|
});
|
|
2914
2983
|
}
|
|
2984
|
+
const STDIN_EOF_INPUT = new Uint8Array(0);
|
|
2985
|
+
let forwardingStdin = null;
|
|
2986
|
+
/**
|
|
2987
|
+
* Forward the caller's stdin into the sandbox stream as INPUT frames (one per
|
|
2988
|
+
* stdin chunk; an empty payload marks end-of-stdin so the remote command gets
|
|
2989
|
+
* a real EOF — `sh -c 'cat > file'` finishes instead of hanging). Nothing is
|
|
2990
|
+
* forwarded when stdin is already closed (no pipe, nothing piped in), which
|
|
2991
|
+
* keeps the plain scripted case exactly where it was.
|
|
2992
|
+
*/
|
|
2993
|
+
function forwardStdinToStream({ stdin, stream }) {
|
|
2994
|
+
if (stdin.readableEnded || stdin.destroyed) return;
|
|
2995
|
+
const onData = (chunk) => stream.sendInput(new Uint8Array(chunk));
|
|
2996
|
+
const onEnd = () => stream.sendInput(STDIN_EOF_INPUT);
|
|
2997
|
+
forwardingStdin = {
|
|
2998
|
+
stdin,
|
|
2999
|
+
onData,
|
|
3000
|
+
onEnd
|
|
3001
|
+
};
|
|
3002
|
+
stdin.on("data", onData);
|
|
3003
|
+
stdin.once("end", onEnd);
|
|
3004
|
+
stdin.resume();
|
|
3005
|
+
}
|
|
3006
|
+
/** Stop forwarding stdin (on a terminal stream event) without killing reads. */
|
|
3007
|
+
function stopStdinForwarding() {
|
|
3008
|
+
const current = forwardingStdin;
|
|
3009
|
+
if (!current) return;
|
|
3010
|
+
forwardingStdin = null;
|
|
3011
|
+
current.stdin.off("data", current.onData);
|
|
3012
|
+
current.stdin.off("end", current.onEnd);
|
|
3013
|
+
}
|
|
2915
3014
|
/** Live terminal on the caller's real TTY. */
|
|
2916
3015
|
async function runPty({ session, agentId, agentName }) {
|
|
2917
3016
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
@@ -2919,7 +3018,7 @@ async function runPty({ session, agentId, agentName }) {
|
|
|
2919
3018
|
return 1;
|
|
2920
3019
|
}
|
|
2921
3020
|
console.error(`Connecting to ${agentName}'s sandbox… (Ctrl-] detaches)`);
|
|
2922
|
-
const { runRawPtyPassthrough } = await import("./raw-pty-
|
|
3021
|
+
const { runRawPtyPassthrough } = await import("./raw-pty-WUHQQwTF.mjs");
|
|
2923
3022
|
const result = await runRawPtyPassthrough({
|
|
2924
3023
|
stdin: process.stdin,
|
|
2925
3024
|
stdout: process.stdout,
|
|
@@ -3121,8 +3220,8 @@ const fsEditCommand = {
|
|
|
3121
3220
|
handler: async (argv) => {
|
|
3122
3221
|
const session = requireSession(argv);
|
|
3123
3222
|
const remotePath = argv.path;
|
|
3124
|
-
const { createRestClient } = await import("./rest-
|
|
3125
|
-
const { resolveAgent } = await import("./print-
|
|
3223
|
+
const { createRestClient } = await import("./rest-RbyLx50Z.mjs");
|
|
3224
|
+
const { resolveAgent } = await import("./print-CAOpxiVO.mjs");
|
|
3126
3225
|
const client = createRestClient({
|
|
3127
3226
|
appUrl: session.appUrl,
|
|
3128
3227
|
sessionToken: session.sessionToken
|
|
@@ -4433,7 +4532,7 @@ function setupUpdateCheck(argv) {
|
|
|
4433
4532
|
|
|
4434
4533
|
//#endregion
|
|
4435
4534
|
//#region src/changelog.generated.ts
|
|
4436
|
-
const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Changed\n\n- `/fork` in the chat TUI now works while the agent is mid-run. It used to refuse with \"finish or cancel the run first\"; now it copies the conversation up to the last completed message and opens the copy, while the agent keeps working on the original — reopen the original to reattach, exactly as after `esc`. This matches the web \"Fork chat\" menu item, which never had the restriction.\n- The two cards pinned above the chat TUI composer — **subagents** and **plan** — can now be minimized to a single header row. Click a card's header (the `▾`/`▸` chevron shows which way it goes), or use `/subagent minimize` and `/plan minimize`; the same again, or `/plan expand`, brings the rows back. Minimized, a card keeps its label and its progress counter (`Subagents 7/10`), so a ten-task fan-out costs one row instead of ten and the rest of the terminal goes back to the transcript. `/plan expand` and `/plan collapse` keep their meaning (unfold and re-fold the completed rows the card windows away); clicking the card's _body_ still does the same, and the hints now say which surface does which.\n- Reopening a conversation whose subagents and plan are all finished now opens both pinned cards minimized to their header row (`▸ ✔ Subagents 4/4`, `▸ Plan 5/5`) instead of spending up to ten rows above the composer on finished work. A card that opens this way pops back open by itself the moment new work goes live in that conversation (a fresh fan-out, a new in-progress step); a card you minimized yourself stays minimized, as before. Work still running when you open the conversation shows its rows, exactly as it did.\n\n- The chat TUI status bar now always shows where the portal stands, instead of only lighting up once everything already worked. It reads `portal off`, `portal connecting`, `portal on` (open on this machine, but this agent has no grant), `portal shared` (green — this agent can run commands here), `portal error`, or `portal unavailable` when you signed in with an API key and no portal is possible. Previously the badge rendered nothing in every one of those states, so \"why can't the agent reach my machine?\" had no answer on screen.\n- One word for that feature across the whole CLI: **portal**. The footer hint is now `ctrl+t portal` / `ctrl+t close portal` (was `local access` / `revoke access`), `/status` reports a `portal` row (was `local access`), and `/share` and `/portal` describe themselves as opening the portal and granting an agent access to your machine. `/portal` used to say \"access your computer\", which collided with `/computer` — that command still means the **agent's** sandbox, and \"computer\" stays reserved for it. `--share-machine` and the `shareMachineDefault` config key are unchanged.\n- `npm i -g skydive-cli` (and yarn/pnpm/bun) now installs a tiny launcher plus one prebuilt, os/cpu-matched binary that carries its own runtime — so on the common platforms `skydive chat` and `skydive import` start instantly and **do not download a Bun runtime on first use**. On any platform without a prebuilt binary (or if the optional dependency is skipped), the CLI automatically falls back to the existing behavior: it runs under your Node and provisions Bun on first `chat`, exactly as before. Nothing about the commands, flags, config, or `SKYDIVE_*` environment variables changes, and `skydive update` still upgrades npm installs via your package manager and standalone-binary installs in place.\n\n### Added\n\n- Files an agent shares into the conversation now show as a saveable row in the chat TUI. When the agent sends you a file (a report, an export, a screenshot), it appears as a `📎` row with the filename and size and a \"click to save\" hint; clicking it downloads the file to your `~/Downloads` (falling back to your home directory) and opens it with your default app, then the row shows where it landed. Clicking a saved row again re-opens it. Previously these files were only reachable in the web app — in the terminal they were invisible.\n- `platform ask` forms now render in the chat TUI. The card lists each question with lettered options (A/B/C/D plus Other); `ctrl+r` opens a full overlay picker (one question at a time, arrows + enter, Other as a typed row — the Claude Code interaction). The answer sends as a normal message. Headless `chat -p` prints the question as an `[action needed]` block instead of dropping it.\n- Every API request now reports this install's version (`x-skydive-cli-version`) so the server can refuse features the installed CLI cannot render — `platform ask` needs the #21411 canary (`0.5.0-beta.43` or newer), not 0.4.0 and not earlier 0.5.0 betas.\n- `/search` (alias `/find`) in the chat TUI — opens the conversation picker with its search field focused, so \"find a conversation\" has a discoverable command instead of being a feature you had to know the bare picker already had. Pass a query inline (`/search billing deep dive`) and the picker opens already narrowed to the matches; bare `/search` opens it ready for you to type. The search runs server-side across conversation titles, message bodies, and participant names, the same search the picker exposes.\n- First run in a workspace with no agents now sets you up automatically: instead of dropping you on an empty agent picker, `skydive` creates your first agent for you (with a suggested name and avatar, mirroring the web onboarding flow) and then offers to have it learn how you already work — reading the other coding agents set up on your machine (Claude Code, Cursor, Codex, and more), the same import that `skydive import` runs, with a plan shown first and credentials never copied. Decline and you go straight into the new agent's chat. You can replay this flow anytime with `skydive --onboarding` (or `SKYDIVE_FORCE_ONBOARDING=1`), even in a workspace that already has agents.\n- `/computer` in the chat TUI — a snapshot of the agent's sandbox drawn as colored bar graphs: CPU, memory, and disk usage. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The numbers come from the Skydive API (the same live resource sample the web computer view reads), not by connecting to the sandbox — so the card shows instantly, never waking or hanging on a box that isn't running: when the agent has no live sandbox it simply reads \"no sandbox running\". The card keeps itself current quietly (a slow background refresh, no flicker or \"updating\" chrome); only the most recent card refreshes, and it silently stops while you're scrolled up (no wasted polls on a card you're not looking at) and resumes at the bottom.\n- `/computer restart` in the chat TUI — reboot the agent's sandbox from chat. It asks a `y`/`n` confirm first (the restart stops whatever run is going and brings up a fresh box), then enqueues the same restart the web \"Restart\" control does. Available to anyone with edit access to the agent; view-only members are told they can't.\n- `skydive fs` — a namespace for working with the files on an agent's computer (its sandbox) from your own machine. Its first subcommand, `skydive fs edit <path>`, reads a remote file down over the same relay `skydive sandbox` uses, opens it in your local editor (`$VISUAL`/`$EDITOR`, override with `--editor`, defaults to `vi`), and writes your changes back atomically when you save and close — so you can edit a remote file as if it were local without opening the chat TUI. A path that doesn't exist yet is created on save; no changes means nothing is written. Access is gated on EDIT permission for the agent, exactly like `skydive sandbox`. (A first-class `fs` relay channel and `skydive fs mount` land in follow-ups.)\n\n## [0.4.0] - 2026-08-07\n\n### Added\n\n- `skydive chat` works with API key auth: an API key alone now opens the chat TUI (and headless `chat -p`) without a browser login, using the key's pinned workspace.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n- Billing-blocked sends and runs now surface the server-authored recovery\n guidance from the typed billing outcome. The chat TUI renders it as a\n warning-toned system-notice row — live when a send is refused or a run is\n stopped at the billing boundary, and again when reopening a conversation\n that holds a persisted billing notice — instead of a generic error.\n Headless `chat -p` and `messages get` print the guidance (state, recovery\n step, and manage-billing URL) on stderr, keep any partial output already\n streamed on stdout, and exit with code `5` (distinct from the generic `1`)\n so scripted callers can tell a billing pause from a failure.\n- Syntax highlighting for 14 more languages in the chat transcript and file/review panes (python, bash, go, rust, c, cpp, java, ruby, css, html, json, yaml, and more) — previously only JavaScript/TypeScript rendered colored.\n\n### Changed\n\n- `skydive agent list` lists the full agent roster by default instead of a truncated page.\n\n### Fixed\n\n- Long multi-line bash tool-call commands (e.g. heredocs) are clamped with a `+N more · click to expand` tail instead of dumping their whole body into the scrollback.\n- Tool error output is clipped the same way as ok output, so a failing command no longer floods the transcript.\n- The TUI toast overlay has an opaque background instead of letting the transcript bleed through.\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
|
|
4535
|
+
const CHANGELOG_MD = "# Changelog\n\nAll notable changes to the Skydive CLI are documented here.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Changed\n\n- `skydive secrets` and `skydive keys` now accept `--agent <id or name>` (the same flag every other agent-targeting command uses), resolving the name against your agent roster. They used to take only a raw `--agent-id`, so passing the name every other command accepts 404'd \"agent not found\" for a perfectly real agent; `--agent-id` still works.\n\n- `/fork` in the chat TUI now works while the agent is mid-run. It used to refuse with \"finish or cancel the run first\"; now it copies the conversation up to the last completed message and opens the copy, while the agent keeps working on the original — reopen the original to reattach, exactly as after `esc`. This matches the web \"Fork chat\" menu item, which never had the restriction.\n- The two cards pinned above the chat TUI composer — **subagents** and **plan** — can now be minimized to a single header row. Click a card's header (the `▾`/`▸` chevron shows which way it goes), or use `/subagent minimize` and `/plan minimize`; the same again, or `/plan expand`, brings the rows back. Minimized, a card keeps its label and its progress counter (`Subagents 7/10`), so a ten-task fan-out costs one row instead of ten and the rest of the terminal goes back to the transcript. `/plan expand` and `/plan collapse` keep their meaning (unfold and re-fold the completed rows the card windows away); clicking the card's _body_ still does the same, and the hints now say which surface does which.\n- Reopening a conversation whose subagents and plan are all finished now opens both pinned cards minimized to their header row (`▸ ✔ Subagents 4/4`, `▸ Plan 5/5`) instead of spending up to ten rows above the composer on finished work. A card that opens this way pops back open by itself the moment new work goes live in that conversation (a fresh fan-out, a new in-progress step); a card you minimized yourself stays minimized, as before. Work still running when you open the conversation shows its rows, exactly as it did.\n\n- The chat TUI status bar now always shows where the portal stands, instead of only lighting up once everything already worked. It reads `portal off`, `portal connecting`, `portal on` (open on this machine, but this agent has no grant), `portal shared` (green — this agent can run commands here), `portal error`, or `portal unavailable` when you signed in with an API key and no portal is possible. Previously the badge rendered nothing in every one of those states, so \"why can't the agent reach my machine?\" had no answer on screen.\n- One word for that feature across the whole CLI: **portal**. The footer hint is now `ctrl+t portal` / `ctrl+t close portal` (was `local access` / `revoke access`), `/status` reports a `portal` row (was `local access`), and `/share` and `/portal` describe themselves as opening the portal and granting an agent access to your machine. `/portal` used to say \"access your computer\", which collided with `/computer` — that command still means the **agent's** sandbox, and \"computer\" stays reserved for it. `--share-machine` and the `shareMachineDefault` config key are unchanged.\n- `npm i -g skydive-cli` (and yarn/pnpm/bun) now installs a tiny launcher plus one prebuilt, os/cpu-matched binary that carries its own runtime — so on the common platforms `skydive chat` and `skydive import` start instantly and **do not download a Bun runtime on first use**. On any platform without a prebuilt binary (or if the optional dependency is skipped), the CLI automatically falls back to the existing behavior: it runs under your Node and provisions Bun on first `chat`, exactly as before. Nothing about the commands, flags, config, or `SKYDIVE_*` environment variables changes, and `skydive update` still upgrades npm installs via your package manager and standalone-binary installs in place.\n\n### Added\n\n- Files an agent shares into the conversation now show as a saveable row in the chat TUI. When the agent sends you a file (a report, an export, a screenshot), it appears as a `📎` row with the filename and size and a \"click to save\" hint; clicking it downloads the file to your `~/Downloads` (falling back to your home directory) and opens it with your default app, then the row shows where it landed. Clicking a saved row again re-opens it. Previously these files were only reachable in the web app — in the terminal they were invisible.\n- `platform ask` forms now render in the chat TUI. The card lists each question with lettered options (A/B/C/D plus Other); `ctrl+r` opens a full overlay picker (one question at a time, arrows + enter, Other as a typed row — the Claude Code interaction). The answer sends as a normal message. Headless `chat -p` prints the question as an `[action needed]` block instead of dropping it.\n- Every API request now reports this install's version (`x-skydive-cli-version`) so the server can refuse features the installed CLI cannot render — `platform ask` needs the #21411 canary (`0.5.0-beta.43` or newer), not 0.4.0 and not earlier 0.5.0 betas.\n- `/search` (alias `/find`) in the chat TUI — opens the conversation picker with its search field focused, so \"find a conversation\" has a discoverable command instead of being a feature you had to know the bare picker already had. Pass a query inline (`/search billing deep dive`) and the picker opens already narrowed to the matches; bare `/search` opens it ready for you to type. The search runs server-side across conversation titles, message bodies, and participant names, the same search the picker exposes.\n- First run in a workspace with no agents now sets you up automatically: instead of dropping you on an empty agent picker, `skydive` creates your first agent for you (with a suggested name and avatar, mirroring the web onboarding flow) and then offers to have it learn how you already work — reading the other coding agents set up on your machine (Claude Code, Cursor, Codex, and more), the same import that `skydive import` runs, with a plan shown first and credentials never copied. Decline and you go straight into the new agent's chat. You can replay this flow anytime with `skydive --onboarding` (or `SKYDIVE_FORCE_ONBOARDING=1`), even in a workspace that already has agents.\n- `/computer` in the chat TUI — a snapshot of the agent's sandbox drawn as colored bar graphs: CPU, memory, and disk usage. Bars turn amber past 75%% and red past 90%% so a glance tells you whether the box is under pressure. The numbers come from the Skydive API (the same live resource sample the web computer view reads), not by connecting to the sandbox — so the card shows instantly, never waking or hanging on a box that isn't running: when the agent has no live sandbox it simply reads \"no sandbox running\". The card keeps itself current quietly (a slow background refresh, no flicker or \"updating\" chrome); only the most recent card refreshes, and it silently stops while you're scrolled up (no wasted polls on a card you're not looking at) and resumes at the bottom.\n- `/computer restart` in the chat TUI — reboot the agent's sandbox from chat. It asks a `y`/`n` confirm first (the restart stops whatever run is going and brings up a fresh box), then enqueues the same restart the web \"Restart\" control does. Available to anyone with edit access to the agent; view-only members are told they can't.\n- `skydive fs` — a namespace for working with the files on an agent's computer (its sandbox) from your own machine. Its first subcommand, `skydive fs edit <path>`, reads a remote file down over the same relay `skydive sandbox` uses, opens it in your local editor (`$VISUAL`/`$EDITOR`, override with `--editor`, defaults to `vi`), and writes your changes back atomically when you save and close — so you can edit a remote file as if it were local without opening the chat TUI. A path that doesn't exist yet is created on save; no changes means nothing is written. Access is gated on EDIT permission for the agent, exactly like `skydive sandbox`. (A first-class `fs` relay channel and `skydive fs mount` land in follow-ups.)\n\n## [0.4.0] - 2026-08-07\n\n### Added\n\n- `skydive chat` works with API key auth: an API key alone now opens the chat TUI (and headless `chat -p`) without a browser login, using the key's pinned workspace.\n- `skydive config` command to view and set the safe, hand-editable CLI preferences (`shareMachineDefault`, `updateCheck`) without opening `config.json`. `config`/`config list` shows each key, its effective value, and whether it comes from the file or the built-in default; `config get`/`set`/`unset` read and change one key; `config path` prints the config file location. It only ever touches those preference keys, never credentials or flow-managed state.\n- Billing-blocked sends and runs now surface the server-authored recovery\n guidance from the typed billing outcome. The chat TUI renders it as a\n warning-toned system-notice row — live when a send is refused or a run is\n stopped at the billing boundary, and again when reopening a conversation\n that holds a persisted billing notice — instead of a generic error.\n Headless `chat -p` and `messages get` print the guidance (state, recovery\n step, and manage-billing URL) on stderr, keep any partial output already\n streamed on stdout, and exit with code `5` (distinct from the generic `1`)\n so scripted callers can tell a billing pause from a failure.\n- Syntax highlighting for 14 more languages in the chat transcript and file/review panes (python, bash, go, rust, c, cpp, java, ruby, css, html, json, yaml, and more) — previously only JavaScript/TypeScript rendered colored.\n\n### Changed\n\n- `skydive agent list` lists the full agent roster by default instead of a truncated page.\n\n### Fixed\n\n- Long multi-line bash tool-call commands (e.g. heredocs) are clamped with a `+N more · click to expand` tail instead of dumping their whole body into the scrollback.\n- Tool error output is clipped the same way as ok output, so a failing command no longer floods the transcript.\n- The TUI toast overlay has an opaque background instead of letting the transcript bleed through.\n\n## [0.3.0] - 2026-08-04\n\n### Added\n\n**Chat TUI**\n\n- `/fork` slash command to fork a conversation at any point and continue in a new thread.\n- `/conversation` switches threads from inside a live session.\n- `/compact` triggers manual conversation compaction.\n- `/portal` and `/copy` slash commands.\n- Archive the current conversation from the chat TUI.\n- `--new` flag on `skydive chat` to start a fresh conversation.\n- Debounced server-side conversation search in the picker, with title matches ranked first.\n- File review pane orientation toggle, and review comments in the file pane.\n- Pinned plan card controls and a jump-to-latest hint.\n- Terminal title (OSC) follows the live conversation title on every screen; inside cmux the workspace is renamed too, and linked PRs are pushed to the cmux sidebar.\n- Every participating agent shows in the conversation list; connect cards each have their own identity, and ctrl+r asks which connect card to act on.\n- Colored Skydive splash art in `skydive --help` and the TUI pickers.\n- New-agent name prefilled from the server's suggestion.\n\n**CLI & platform**\n\n- `skydive update` self-updater, with an update notice when a new version is available.\n- Shell completions for bash, zsh, and fish via `completion install`.\n- Portal daemon: one connection per host with per-conversation working directories.\n- Agent-led coding-agent import (`skydive import`).\n- Per-workspace scoping on the REST client, and cross-org `--agent <uuid>` auto-switches workspace.\n- `skydive-beta` wrapper for the canary channel.\n\n### Fixed\n\n- `skydive update` no longer claims an update is available on every npm install.\n- Chat memory is bounded (payload clamps + windowed rows) with a memory watchdog and OOM diagnostic report; transcript rows are memoized so streaming stops re-rendering the whole chat.\n- Chat-send failures map to real error messages.\n- Notification and sidebar previews use the last text block of the reply and strip inline markdown.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n- Sending to non-web channel conversations is blocked in the TUI.\n- GitHub bot connect opens on the web front door, not api.skydive.com.\n- TUI activity counter times from the run, not the screen.\n\n## [0.2.0] - 2026-07-29\n\n### Added\n\n**Sandbox & machine access**\n\n- Standalone `skydive sandbox` command for direct access to an agent's sandbox.\n- `/sandbox` in the chat TUI — live PTY session and one-shot command execution.\n- Headless machine sharing via `skydive portal`, with self-registering portal grants.\n- `shareMachineDefault` config key for always-on portal sharing.\n\n**Chat TUI**\n\n- File pane (`ctrl+g`) with Changes and Files tabs: a shared file tree plus source viewer and a workspace browser, mouse-resizable and responsive to terminal size.\n- Agent todo list rendered in the chat TUI, above the composer, mirroring the web chat's todo card.\n- Fuzzy finder in the conversation and agent pickers.\n- Slash-command autocomplete menu.\n- Paste or drag-and-drop any file into the composer; paste clipboard images with Cmd+V.\n- Run local shell commands with `!` in the composer.\n- Conversation recaps, streamed live title updates, and per-agent attribution on assistant turns.\n- Working timer rolls up into minutes and hours.\n- Conversation picker paginates past 50 conversations and shows only your own conversations.\n- Esc leaves a live run; typing `exit` quits the chat.\n- Cursor Dark theme.\n- Picker rows no longer overlap when a conversation title contains a newline, tab, or control character.\n\n**Headless & scripting**\n\n- Resume a conversation by id.\n- `conversations list` and `conversations show` for transcript reads.\n- `messages get`, with run recovery keyed on message id.\n- Connect cards surface in headless `-p` mode so a driving agent never gets stuck.\n\n**Authentication**\n\n- `skydive auth login` via the browser now auto-mints an API key, so one login yields both a chat session and a usable management credential. Management commands announce the key's pinned workspace when it drives them, so a workspace mismatch is visible at use time.\n- Workspace picker on the device authorization page.\n- Account and workspace identity shown in `auth status`.\n\n**Platform**\n\n- Standalone binary builds compiling the CLI into a per-target executable.\n- Interactive workspace switcher; management commands follow the active workspace.\n- Terminal host integrations and agent notifications.\n\n### Fixed\n\n- Transcript errors collapse to one line, click to expand (REST and portal errors keep their full body).\n- Dragged/pasted image file paths attach the file instead of inserting path text, including macOS paths with literal parentheses.\n- Bare URLs in chat markdown are hyperlinked so they survive text wrap.\n- Composer draft is preserved across TUI overlays.\n- Relative connect links resolve before opening the browser.\n- Numbered markdown headings render colored in the TUI.\n- Chat transcript pages by 75% of a screen; picker rows stay on one line.\n- Run starts push to the TUI over the conversation stream.\n- Security: remediated high-severity dependency findings and cleared tar/shell-quote CVEs.\n\n## [0.1.0] - 2026-07-21\n\nInitial public release: `skydive chat` TUI, agent and conversation management,\ndevice authorization, and headless `-p` mode.\n";
|
|
4437
4536
|
|
|
4438
4537
|
//#endregion
|
|
4439
4538
|
//#region src/whats-new.ts
|
|
@@ -4576,7 +4675,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
|
|
|
4576
4675
|
process.exit(0);
|
|
4577
4676
|
}
|
|
4578
4677
|
if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
|
|
4579
|
-
const { runPortalDaemon } = await import("./daemon-
|
|
4678
|
+
const { runPortalDaemon } = await import("./daemon-B-_pZEic.mjs");
|
|
4580
4679
|
runPortalDaemon(process.argv);
|
|
4581
4680
|
} else runCli();
|
|
4582
4681
|
function runCli() {
|