skydive-cli 0.6.0-beta.39 → 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-FnZU62YK.mjs → boot-DxKctQgF.mjs} +105 -32
- package/dist/js/client-DV0Su5yh.mjs +5 -0
- package/dist/js/{client-l6orYfqq.mjs → client-Dr81zuTm.mjs} +6 -2
- package/dist/js/{client-C1r0rRmd.mjs → client-lWdOjmgQ.mjs} +1 -1
- package/dist/js/{daemon-DbtMlkm5.mjs → daemon-B-_pZEic.mjs} +2 -2
- package/dist/js/{daemon-CSAbOyRz.mjs → daemon-CJ0vkUCL.mjs} +1 -1
- package/dist/js/daemon-client-BlMSyVVq.mjs +8 -0
- package/dist/js/{daemon-client-D4WAalkV.mjs → daemon-client-CEPHWBu5.mjs} +1 -1
- package/dist/js/{install-03ApVdVv.mjs → install-DJDYwL8B.mjs} +2 -2
- package/dist/js/{print-BzjQA_4s.mjs → print-CAOpxiVO.mjs} +2 -2
- package/dist/js/{print-BPQO_UaI.mjs → print-DMyEfL8X.mjs} +12 -11
- package/dist/js/{print-share-Tdu4xDgY.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-HMJ6HYnl.mjs → rest-D57sPafI.mjs} +15 -4
- package/dist/js/{rest-BYNvZw3f.mjs → rest-RbyLx50Z.mjs} +1 -1
- package/package.json +5 -5
- package/dist/js/client-DSfF8nrb.mjs +0 -5
- package/dist/js/daemon-client-D83lfklG.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() {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, i as sendErrorMessage, n as errorDetail, o as isRecord, t as createRestClient } from "./rest-
|
|
3
|
-
import { C as
|
|
4
|
-
import { A as installAgentAlias, C as themeVersion, D as machineOsFromPlatform, F as detectShell, L as getActiveWorkspaceId, M as takenAliasNames, O as aliasActivationHint, S as themeModeFromColorFgBg, T as themesForMode, V as setActiveWorkspace, _ as monoTheme, a as WORDMARK, b as themeForMode, d as profilingEnabled, f as record, g as findTheme, h as applyTheme, i as MARK_CELLS, j as slugifyAliasName, k as dedupeAliasName, m as DEFAULT_THEME_ID, n as buildCrashReport, p as writeArtifact, r as writeCrashReport, s as splashFitsWidth, t as installCrashHandler, v as noColorRequested, x as themeMode, y as theme, z as listWorkspaces } from "./install-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, n as errorDetail, o as isRecord, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
|
+
import { C as DEFAULT_API_URL, D as getConfigPath, M as getReviewStateDir, N as getSavedTheme, R as recordDefaultAgent, W as resolveWebUrl, _ as computeSettledLabel, c as actionableCardVerb, d as parseOauthConnectParams, f as prioritizeActionableCards, g as composeQuestionAnswerEntries, h as composeQuestionAnswer, i as resolveAgent, l as cardActionErrorMessage, m as resolveConnectUrl, p as reconcileMaskedInput, q as saveTheme, s as MASK_CHAR, u as parseExternalOauthConnectParams, v as parseConnectCard, w as DEFAULT_APP_URL, y as specKeyFor } from "./print-DMyEfL8X.mjs";
|
|
4
|
+
import { A as installAgentAlias, C as themeVersion, D as machineOsFromPlatform, F as detectShell, L as getActiveWorkspaceId, M as takenAliasNames, O as aliasActivationHint, S as themeModeFromColorFgBg, T as themesForMode, V as setActiveWorkspace, _ as monoTheme, a as WORDMARK, b as themeForMode, d as profilingEnabled, f as record, g as findTheme, h as applyTheme, i as MARK_CELLS, j as slugifyAliasName, k as dedupeAliasName, m as DEFAULT_THEME_ID, n as buildCrashReport, p as writeArtifact, r as writeCrashReport, s as splashFitsWidth, t as installCrashHandler, v as noColorRequested, x as themeMode, y as theme, z as listWorkspaces } from "./install-DJDYwL8B.mjs";
|
|
5
5
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
6
6
|
import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-D3l5kJlX.mjs";
|
|
7
|
-
import { t as PortalClient } from "./client-
|
|
7
|
+
import { t as PortalClient } from "./client-lWdOjmgQ.mjs";
|
|
8
8
|
import { t as defaultTlsCertSource } from "./tls-cert-Rua2oV7n.mjs";
|
|
9
9
|
import "./api-BFQ4PQDA.mjs";
|
|
10
|
-
import "./daemon-
|
|
11
|
-
import { t as SandboxStream } from "./client-
|
|
12
|
-
import { t as PortalDaemonClient } from "./daemon-client-
|
|
13
|
-
import { t as runRawPtyPassthrough } from "./raw-pty-
|
|
10
|
+
import "./daemon-CJ0vkUCL.mjs";
|
|
11
|
+
import { t as SandboxStream } from "./client-Dr81zuTm.mjs";
|
|
12
|
+
import { t as PortalDaemonClient } from "./daemon-client-CEPHWBu5.mjs";
|
|
13
|
+
import { t as runRawPtyPassthrough } from "./raw-pty-C323I8xG.mjs";
|
|
14
14
|
import * as os$1 from "node:os";
|
|
15
15
|
import { homedir, platform, release, tmpdir } from "node:os";
|
|
16
16
|
import path, { basename, extname, isAbsolute, join, posix, win32 } from "node:path";
|
|
@@ -3873,6 +3873,7 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
3873
3873
|
]);
|
|
3874
3874
|
const [removedIds, setRemovedIds] = useState(/* @__PURE__ */ new Set());
|
|
3875
3875
|
const [archiveOverrides, setArchiveOverrides] = useState(/* @__PURE__ */ new Map());
|
|
3876
|
+
const [pinOverrides, setPinOverrides] = useState(/* @__PURE__ */ new Map());
|
|
3876
3877
|
const [confirmId, setConfirmId] = useState(null);
|
|
3877
3878
|
const [error, setError] = useState(null);
|
|
3878
3879
|
const [sending, setSending] = useState(false);
|
|
@@ -3887,7 +3888,16 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
3887
3888
|
onError: setError
|
|
3888
3889
|
});
|
|
3889
3890
|
const isArchived = (c) => archiveOverrides.get(c.id) ?? c.viewerArchivedAt != null;
|
|
3890
|
-
const
|
|
3891
|
+
const pinnedAt = (c) => pinOverrides.has(c.id) ? pinOverrides.get(c.id) ?? null : c.viewerPinnedAt ?? null;
|
|
3892
|
+
const isPinned = (c) => pinnedAt(c) !== null;
|
|
3893
|
+
const list = ((isSearching && search?.query === debouncedQuery && search.state.kind === "ready" ? search.state.conversations : null) ?? conversations).filter((c) => !removedIds.has(c.id) && (showArchived || !isArchived(c))).sort((a, b) => {
|
|
3894
|
+
const aPin = pinnedAt(a);
|
|
3895
|
+
const bPin = pinnedAt(b);
|
|
3896
|
+
if (aPin && bPin) return bPin.localeCompare(aPin);
|
|
3897
|
+
if (aPin) return -1;
|
|
3898
|
+
if (bPin) return 1;
|
|
3899
|
+
return 0;
|
|
3900
|
+
});
|
|
3891
3901
|
useEffect(() => {
|
|
3892
3902
|
setHighlight(0);
|
|
3893
3903
|
}, [showAutomated, showArchived]);
|
|
@@ -3904,6 +3914,7 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
3904
3914
|
const clamped = Math.min(highlight, Math.max(0, rows.length - 1));
|
|
3905
3915
|
const highlightRow = rows[clamped];
|
|
3906
3916
|
const highlightArchived = highlightRow?.kind === "conv" && isArchived(highlightRow.hit.item);
|
|
3917
|
+
const highlightPinned = highlightRow?.kind === "conv" && isPinned(highlightRow.hit.item);
|
|
3907
3918
|
const highlightAgentRun = highlightRow?.kind === "conv" && isAgentRunConversation(highlightRow.hit.item);
|
|
3908
3919
|
const highlightOutsider = highlightRow?.kind === "conv" && !viewerIsParticipant(highlightRow.hit.item);
|
|
3909
3920
|
const confirmConv = confirmId !== null ? list.find((c) => c.id === confirmId) : void 0;
|
|
@@ -3932,7 +3943,8 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
3932
3943
|
`tab ${showAutomated ? "hide" : "show"} agent runs`,
|
|
3933
3944
|
`shift+tab ${showArchived ? "hide" : "show"} archived`,
|
|
3934
3945
|
"↑/↓ move",
|
|
3935
|
-
"esc back"
|
|
3946
|
+
"esc back",
|
|
3947
|
+
...highlightAgentRun || highlightOutsider ? [] : [`ctrl+p ${highlightPinned ? "unpin" : "pin"}`]
|
|
3936
3948
|
].filter((segment) => segment !== ""), innerWidth)
|
|
3937
3949
|
};
|
|
3938
3950
|
const identityRows = height >= 24 ? 3 : 0;
|
|
@@ -4022,6 +4034,25 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
4022
4034
|
* reachable with archived rows shown) it restores instead — which is the
|
|
4023
4035
|
* only in-TUI way back.
|
|
4024
4036
|
*/
|
|
4037
|
+
const togglePinned = (conversation) => {
|
|
4038
|
+
if (!rest) return;
|
|
4039
|
+
const id = conversation.id;
|
|
4040
|
+
const pinned = !isPinned(conversation);
|
|
4041
|
+
const revert = pinOverrides.has(id) ? pinOverrides.get(id) : conversation.viewerPinnedAt;
|
|
4042
|
+
setPinOverrides((prev) => new Map(prev).set(id, pinned ? (/* @__PURE__ */ new Date()).toISOString() : null));
|
|
4043
|
+
rest.setConversationPinned({
|
|
4044
|
+
conversationId: id,
|
|
4045
|
+
pinned
|
|
4046
|
+
}).catch((err) => {
|
|
4047
|
+
setPinOverrides((prev) => {
|
|
4048
|
+
const next = new Map(prev);
|
|
4049
|
+
if (revert === void 0) next.delete(id);
|
|
4050
|
+
else next.set(id, revert ?? null);
|
|
4051
|
+
return next;
|
|
4052
|
+
});
|
|
4053
|
+
setError(`${pinned ? "pin" : "unpin"} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
4054
|
+
});
|
|
4055
|
+
};
|
|
4025
4056
|
const toggleArchived = (conversation) => {
|
|
4026
4057
|
if (!rest) return;
|
|
4027
4058
|
const id = conversation.id;
|
|
@@ -4075,6 +4106,21 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
4075
4106
|
setConfirmId(row.hit.item.id);
|
|
4076
4107
|
}
|
|
4077
4108
|
key.preventDefault();
|
|
4109
|
+
} else if (key.name === "p" && key.ctrl) {
|
|
4110
|
+
const row = rows[clamped];
|
|
4111
|
+
if (row?.kind === "conv") {
|
|
4112
|
+
if (isAgentRunConversation(row.hit.item)) {
|
|
4113
|
+
setError("agent runs can't be pinned");
|
|
4114
|
+
return;
|
|
4115
|
+
}
|
|
4116
|
+
if (!viewerIsParticipant(row.hit.item)) {
|
|
4117
|
+
setError("you're not in this thread, so there's nothing to pin");
|
|
4118
|
+
return;
|
|
4119
|
+
}
|
|
4120
|
+
setError(null);
|
|
4121
|
+
togglePinned(row.hit.item);
|
|
4122
|
+
}
|
|
4123
|
+
key.preventDefault();
|
|
4078
4124
|
} else if (key.name === "a" && key.ctrl) {
|
|
4079
4125
|
const row = rows[clamped];
|
|
4080
4126
|
if (row?.kind === "conv") {
|
|
@@ -4200,7 +4246,7 @@ function ConversationHome({ agent, initialQuery, conversations, showAutomated, o
|
|
|
4200
4246
|
const fg = selected ? theme.accent : theme.fg;
|
|
4201
4247
|
const marker = selected ? "› " : " ";
|
|
4202
4248
|
const archived = isArchived(row.hit.item);
|
|
4203
|
-
const { title, time } = layoutRow(`${archived ? "archived · " : ""}${singleLine(row.hit.item.title ?? "(untitled)")}`, relativeTime(row.hit.item.updatedAt), coAgentsTag(row.hit.item, agent.id), rowWidth);
|
|
4249
|
+
const { title, time } = layoutRow(`${isPinned(row.hit.item) ? "pinned · " : ""}${archived ? "archived · " : ""}${singleLine(row.hit.item.title ?? "(untitled)")}`, relativeTime(row.hit.item.updatedAt), coAgentsTag(row.hit.item, agent.id), rowWidth);
|
|
4204
4250
|
const glyph = channelGlyph(row.hit.item.channel);
|
|
4205
4251
|
const tag = coAgentsTag(row.hit.item, agent.id);
|
|
4206
4252
|
const unread = row.hit.item.unread === true;
|
|
@@ -4722,7 +4768,7 @@ function ErrorItem({ item }) {
|
|
|
4722
4768
|
|
|
4723
4769
|
//#endregion
|
|
4724
4770
|
//#region src/chat/tui/chunks/tool-call-summary.ts
|
|
4725
|
-
const
|
|
4771
|
+
const TOOL_CALL_SUMMARY_KEYS = ["skydive_summary", "__skydive_summary__"];
|
|
4726
4772
|
/**
|
|
4727
4773
|
* The model's one-line summary for a tool call, read from its arguments.
|
|
4728
4774
|
* Returns null when absent or blank; whitespace is collapsed so a stray
|
|
@@ -4730,8 +4776,8 @@ const TOOL_CALL_SUMMARY_KEY = "__skydive_summary__";
|
|
|
4730
4776
|
*/
|
|
4731
4777
|
function getToolCallSummary(input) {
|
|
4732
4778
|
if (!input || typeof input !== "object") return null;
|
|
4733
|
-
for (const [
|
|
4734
|
-
if (
|
|
4779
|
+
for (const key of TOOL_CALL_SUMMARY_KEYS) for (const [entryKey, value] of Object.entries(input)) {
|
|
4780
|
+
if (entryKey !== key) continue;
|
|
4735
4781
|
if (typeof value !== "string") return null;
|
|
4736
4782
|
return value.replace(/\s+/g, " ").trim() || null;
|
|
4737
4783
|
}
|
|
@@ -4744,8 +4790,8 @@ function getToolCallSummary(input) {
|
|
|
4744
4790
|
*/
|
|
4745
4791
|
function withoutToolCallSummary(input) {
|
|
4746
4792
|
if (!input || typeof input !== "object" || Array.isArray(input)) return input;
|
|
4747
|
-
if (!(
|
|
4748
|
-
return Object.fromEntries(Object.entries(input).filter(([key]) => key
|
|
4793
|
+
if (!TOOL_CALL_SUMMARY_KEYS.some((key) => key in input)) return input;
|
|
4794
|
+
return Object.fromEntries(Object.entries(input).filter(([key]) => !TOOL_CALL_SUMMARY_KEYS.includes(key)));
|
|
4749
4795
|
}
|
|
4750
4796
|
|
|
4751
4797
|
//#endregion
|
|
@@ -8355,6 +8401,10 @@ const keybindGroups = [
|
|
|
8355
8401
|
keys: "ctrl+x",
|
|
8356
8402
|
action: "drop the last staged image"
|
|
8357
8403
|
},
|
|
8404
|
+
{
|
|
8405
|
+
keys: "ctrl+p",
|
|
8406
|
+
action: "pin / unpin this conversation for you (again to unpin)"
|
|
8407
|
+
},
|
|
8358
8408
|
{
|
|
8359
8409
|
keys: "ctrl+a",
|
|
8360
8410
|
action: "archive conversation (hides it for you only; again to restore)"
|
|
@@ -9149,7 +9199,8 @@ function printResumeHint(write = (text) => process.stdout.write(text)) {
|
|
|
9149
9199
|
* AskUserQuestion overlay: one question at a time, a highlighted option
|
|
9150
9200
|
* list (Other is the last row), enter selects, letters jump, esc cancels.
|
|
9151
9201
|
* Multi-question forms advance after each pick and submit once every
|
|
9152
|
-
* question is answered.
|
|
9202
|
+
* question is answered. Submission carries both the normal user-message text
|
|
9203
|
+
* and a typed answer list so the transcript can settle this exact card.
|
|
9153
9204
|
*/
|
|
9154
9205
|
function AskPicker({ questions, onSubmit, onCancel }) {
|
|
9155
9206
|
const [active, setActive] = useState(0);
|
|
@@ -9173,7 +9224,7 @@ function AskPicker({ questions, onSubmit, onCancel }) {
|
|
|
9173
9224
|
function finish(nextSelected, nextOther) {
|
|
9174
9225
|
const answers = answersFor(nextSelected, nextOther);
|
|
9175
9226
|
if (answers.some((a) => a.length === 0)) return;
|
|
9176
|
-
onSubmit(composeQuestionAnswer(questions, answers));
|
|
9227
|
+
onSubmit(composeQuestionAnswer(questions, answers), composeQuestionAnswerEntries(questions, answers));
|
|
9177
9228
|
}
|
|
9178
9229
|
function advanceOrSubmit(nextSelected) {
|
|
9179
9230
|
const nextUnanswered = questions.findIndex((_, i) => i > active && !(nextSelected[i] ?? []).length);
|
|
@@ -9629,7 +9680,7 @@ function ModelPicker({ agentId, conversationId, currentModel, currentEffort, mod
|
|
|
9629
9680
|
let cancelled = false;
|
|
9630
9681
|
(async () => {
|
|
9631
9682
|
try {
|
|
9632
|
-
const [
|
|
9683
|
+
const [catalog, savedEfforts, floor] = await Promise.all([
|
|
9633
9684
|
rest.listModels(),
|
|
9634
9685
|
rest.listModelEfforts().catch(() => ({})),
|
|
9635
9686
|
loadFreeFloor(rest)
|
|
@@ -9637,9 +9688,10 @@ function ModelPicker({ agentId, conversationId, currentModel, currentEffort, mod
|
|
|
9637
9688
|
if (cancelled) return;
|
|
9638
9689
|
setState({
|
|
9639
9690
|
kind: "ready",
|
|
9640
|
-
models,
|
|
9691
|
+
models: catalog.models,
|
|
9641
9692
|
savedEfforts,
|
|
9642
|
-
floor
|
|
9693
|
+
floor,
|
|
9694
|
+
trainingOptedOut: catalog.trainingOptedOut
|
|
9643
9695
|
});
|
|
9644
9696
|
} catch (err) {
|
|
9645
9697
|
if (cancelled) return;
|
|
@@ -9671,6 +9723,7 @@ function ModelPicker({ agentId, conversationId, currentModel, currentEffort, mod
|
|
|
9671
9723
|
models: state.models,
|
|
9672
9724
|
initialSavedEfforts: state.savedEfforts,
|
|
9673
9725
|
floor: state.floor,
|
|
9726
|
+
trainingOptedOut: state.trainingOptedOut,
|
|
9674
9727
|
currentModel,
|
|
9675
9728
|
currentEffort,
|
|
9676
9729
|
modelLocked,
|
|
@@ -9708,7 +9761,7 @@ function ModelPickerFrame({ hint, children }) {
|
|
|
9708
9761
|
]
|
|
9709
9762
|
});
|
|
9710
9763
|
}
|
|
9711
|
-
function ModelSwitcher({ models, initialSavedEfforts, floor, currentModel, currentEffort, modelLocked, initialView, agentId, conversationId, onModelSelected, onEffortSelected, onCancel }) {
|
|
9764
|
+
function ModelSwitcher({ models, initialSavedEfforts, floor, trainingOptedOut, currentModel, currentEffort, modelLocked, initialView, agentId, conversationId, onModelSelected, onEffortSelected, onCancel }) {
|
|
9712
9765
|
const rest = useStore((s) => s.rest);
|
|
9713
9766
|
const [savedEfforts, setSavedEfforts] = useState(initialSavedEfforts);
|
|
9714
9767
|
const [view, setView] = useState(() => {
|
|
@@ -9736,6 +9789,10 @@ function ModelSwitcher({ models, initialSavedEfforts, floor, currentModel, curre
|
|
|
9736
9789
|
}
|
|
9737
9790
|
async function selectModel(model) {
|
|
9738
9791
|
if (!rest || saving) return;
|
|
9792
|
+
if (trainingOptedOut && !model.noTraining) {
|
|
9793
|
+
setSaveError("this workspace limits model selection to verified no-training routes");
|
|
9794
|
+
return;
|
|
9795
|
+
}
|
|
9739
9796
|
const effort = effortFor(model);
|
|
9740
9797
|
if (model.id === currentModel && effort === currentEffort) {
|
|
9741
9798
|
onCancel();
|
|
@@ -9841,6 +9898,7 @@ function ModelSwitcher({ models, initialSavedEfforts, floor, currentModel, curre
|
|
|
9841
9898
|
floor,
|
|
9842
9899
|
currentModel,
|
|
9843
9900
|
modelLocked,
|
|
9901
|
+
trainingOptedOut,
|
|
9844
9902
|
saving,
|
|
9845
9903
|
saveError,
|
|
9846
9904
|
effortFor,
|
|
@@ -9855,7 +9913,7 @@ function ModelSwitcher({ models, initialSavedEfforts, floor, currentModel, curre
|
|
|
9855
9913
|
onCancel
|
|
9856
9914
|
});
|
|
9857
9915
|
}
|
|
9858
|
-
function ModelList({ models, floor, currentModel, modelLocked, saving, saveError, effortFor, onSelect, onEditEffort, onCancel }) {
|
|
9916
|
+
function ModelList({ models, floor, currentModel, modelLocked, trainingOptedOut, saving, saveError, effortFor, onSelect, onEditEffort, onCancel }) {
|
|
9859
9917
|
const { width, height } = useTerminalDimensions();
|
|
9860
9918
|
const [query, setQuery] = useState("");
|
|
9861
9919
|
const { lock } = floor;
|
|
@@ -9887,8 +9945,8 @@ function ModelList({ models, floor, currentModel, modelLocked, saving, saveError
|
|
|
9887
9945
|
onCancel();
|
|
9888
9946
|
return;
|
|
9889
9947
|
}
|
|
9890
|
-
if (key.name === "up") setHighlight(Math.max(0,
|
|
9891
|
-
else if (key.name === "down") setHighlight(Math.min(Math.max(0, filtered.length - 1),
|
|
9948
|
+
if (key.name === "up") setHighlight((prev) => Math.max(0, Math.min(prev, filtered.length - 1) - 1));
|
|
9949
|
+
else if (key.name === "down") setHighlight((prev) => Math.min(Math.max(0, filtered.length - 1), Math.max(0, prev) + 1));
|
|
9892
9950
|
else if (key.name === "tab") {
|
|
9893
9951
|
const model = filtered[clamped];
|
|
9894
9952
|
if (model && !isLocked(model) && effortFor(model)) onEditEffort(model);
|
|
@@ -9911,6 +9969,10 @@ function ModelList({ models, floor, currentModel, modelLocked, saving, saveError
|
|
|
9911
9969
|
fg: theme.accent,
|
|
9912
9970
|
children: "switch model"
|
|
9913
9971
|
}),
|
|
9972
|
+
trainingOptedOut ? /* @__PURE__ */ jsx("text", {
|
|
9973
|
+
fg: theme.warning,
|
|
9974
|
+
children: "this workspace limits model selection to verified no-training routes."
|
|
9975
|
+
}) : null,
|
|
9914
9976
|
modelLocked ? /* @__PURE__ */ jsx("text", {
|
|
9915
9977
|
fg: theme.warning,
|
|
9916
9978
|
children: "model choice is limited while this agent uses a Google integration. models without a zero-data-retention route will be rejected."
|
|
@@ -12986,6 +13048,7 @@ function useCardActions({ rest, appUrl, portalClient, portalStatus, setPortalPro
|
|
|
12986
13048
|
if (action.kind === "answer_question") {
|
|
12987
13049
|
setAskPrompt({
|
|
12988
13050
|
cardId: item.id,
|
|
13051
|
+
durableCardId: action.cardId,
|
|
12989
13052
|
questions: item.card.questions
|
|
12990
13053
|
});
|
|
12991
13054
|
return;
|
|
@@ -14378,11 +14441,11 @@ function useChatStream({ rest, conversationId, initialConversationId, attachRunI
|
|
|
14378
14441
|
return {
|
|
14379
14442
|
markRead,
|
|
14380
14443
|
attachToRun,
|
|
14381
|
-
sendContent: useCallback(async (content, staged,
|
|
14444
|
+
sendContent: useCallback(async (content, staged, params) => {
|
|
14382
14445
|
if (!rest) return;
|
|
14383
14446
|
const trimmed = content.trim();
|
|
14384
14447
|
if (!trimmed && staged.length === 0) return;
|
|
14385
|
-
const echo =
|
|
14448
|
+
const echo = params?.echo !== false;
|
|
14386
14449
|
const optimisticId = crypto.randomUUID();
|
|
14387
14450
|
const stagedNames = staged.map((a) => a.fileName);
|
|
14388
14451
|
if (echo) setItems((prev) => [...prev, {
|
|
@@ -14414,6 +14477,7 @@ function useChatStream({ rest, conversationId, initialConversationId, attachRunI
|
|
|
14414
14477
|
conversationId,
|
|
14415
14478
|
content: trimmed,
|
|
14416
14479
|
attachmentIds,
|
|
14480
|
+
questionAnswer: params?.questionAnswer ?? null,
|
|
14417
14481
|
clientSurface: "tui"
|
|
14418
14482
|
});
|
|
14419
14483
|
releaseUploaded(rows);
|
|
@@ -15193,7 +15257,7 @@ function useExecuteLine({ agent, rest, conversationId, appUrl, goTo, history, se
|
|
|
15193
15257
|
composerRef.current?.clear();
|
|
15194
15258
|
setComposerRows(1);
|
|
15195
15259
|
clearAttachments();
|
|
15196
|
-
sendContent(content, staged);
|
|
15260
|
+
sendContent(content, staged, null);
|
|
15197
15261
|
}, [
|
|
15198
15262
|
history,
|
|
15199
15263
|
runLocalShell,
|
|
@@ -15831,7 +15895,10 @@ function useLocalCommands({ setItems, shellSessionRef, bindPortalCwd, sendConten
|
|
|
15831
15895
|
exit: 1
|
|
15832
15896
|
} : m));
|
|
15833
15897
|
}
|
|
15834
|
-
sendContent(formatShellContext(command, captured, exitCode), [], {
|
|
15898
|
+
sendContent(formatShellContext(command, captured, exitCode), [], {
|
|
15899
|
+
echo: false,
|
|
15900
|
+
questionAnswer: null
|
|
15901
|
+
});
|
|
15835
15902
|
}, [
|
|
15836
15903
|
setItems,
|
|
15837
15904
|
shellSessionRef,
|
|
@@ -16471,7 +16538,7 @@ function ChatScreen({ agent, conversation, attachRunId, parentConversationId })
|
|
|
16471
16538
|
variant: "warning"
|
|
16472
16539
|
});
|
|
16473
16540
|
}
|
|
16474
|
-
await sendContent(seedPrompt ?? "", adoptUploaded(seedAttachments));
|
|
16541
|
+
await sendContent(seedPrompt ?? "", adoptUploaded(seedAttachments), null);
|
|
16475
16542
|
})();
|
|
16476
16543
|
}, [
|
|
16477
16544
|
conversation,
|
|
@@ -16832,14 +16899,20 @@ function ChatScreen({ agent, conversation, attachRunId, parentConversationId })
|
|
|
16832
16899
|
});
|
|
16833
16900
|
if (askPrompt) return /* @__PURE__ */ jsx(AskPicker, {
|
|
16834
16901
|
questions: askPrompt.questions,
|
|
16835
|
-
onSubmit: (text) => {
|
|
16902
|
+
onSubmit: (text, answers) => {
|
|
16836
16903
|
const cardId = askPrompt.cardId;
|
|
16837
16904
|
setAskPrompt(null);
|
|
16838
16905
|
updateCard(cardId, {
|
|
16839
16906
|
status: "done",
|
|
16840
16907
|
detail: text
|
|
16841
16908
|
});
|
|
16842
|
-
sendContent(text, []
|
|
16909
|
+
sendContent(text, [], {
|
|
16910
|
+
echo: true,
|
|
16911
|
+
questionAnswer: {
|
|
16912
|
+
cardId: askPrompt.durableCardId,
|
|
16913
|
+
answers
|
|
16914
|
+
}
|
|
16915
|
+
});
|
|
16843
16916
|
},
|
|
16844
16917
|
onCancel: () => setAskPrompt(null)
|
|
16845
16918
|
});
|
|
@@ -113,6 +113,8 @@ const FRAME = {
|
|
|
113
113
|
RESIZE: 17
|
|
114
114
|
};
|
|
115
115
|
const MAX_INPUT_BYTES = 1 * 1024 * 1024;
|
|
116
|
+
/** Upper bound for an exec's `timeoutMs`; larger asks are clamped to this. */
|
|
117
|
+
const MAX_EXEC_TIMEOUT_MS = 1440 * 60 * 1e3;
|
|
116
118
|
/** Query params for the upgrade URL, from a spec. Inverse of {@link parseStreamSpec}. */
|
|
117
119
|
function streamSpecToQuery(spec) {
|
|
118
120
|
if (spec.mode === "pty") return {
|
|
@@ -124,7 +126,8 @@ function streamSpecToQuery(spec) {
|
|
|
124
126
|
if (spec.mode === "exec") return {
|
|
125
127
|
agentId: spec.agentId,
|
|
126
128
|
mode: "exec",
|
|
127
|
-
command: spec.command
|
|
129
|
+
command: spec.command,
|
|
130
|
+
...spec.timeoutMs !== void 0 ? { timeoutMs: String(spec.timeoutMs) } : {}
|
|
128
131
|
};
|
|
129
132
|
return {
|
|
130
133
|
agentId: spec.agentId,
|
|
@@ -273,7 +276,8 @@ var SandboxStream = class SandboxStream {
|
|
|
273
276
|
} : {
|
|
274
277
|
mode: "exec",
|
|
275
278
|
agentId: opts.agentId,
|
|
276
|
-
command: opts.command
|
|
279
|
+
command: opts.command,
|
|
280
|
+
...opts.timeoutMs !== void 0 ? { timeoutMs: opts.timeoutMs } : {}
|
|
277
281
|
};
|
|
278
282
|
const url = new URL(`${wsBase(opts.appUrl)}${SANDBOX_STREAM_PATH}`);
|
|
279
283
|
for (const [key, value] of Object.entries(streamSpecToQuery(spec))) url.searchParams.set(key, value);
|
|
@@ -160,7 +160,7 @@ function errorMessage(err) {
|
|
|
160
160
|
* the commit time of the built tree is one monotonic clock they share.
|
|
161
161
|
*/
|
|
162
162
|
function portalDaemonBuild() {
|
|
163
|
-
return "
|
|
163
|
+
return "1790575698";
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Whether a client carrying `mine` should replace a running daemon carrying
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./client-
|
|
2
|
+
import "./client-lWdOjmgQ.mjs";
|
|
3
3
|
import "./tls-cert-Rua2oV7n.mjs";
|
|
4
4
|
import "./api-BFQ4PQDA.mjs";
|
|
5
|
-
import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-
|
|
5
|
+
import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-CJ0vkUCL.mjs";
|
|
6
6
|
|
|
7
7
|
export { runPortalDaemon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-
|
|
2
|
+
import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-lWdOjmgQ.mjs";
|
|
3
3
|
import { t as defaultTlsCertSource } from "./tls-cert-Rua2oV7n.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-
|
|
2
|
+
import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-CJ0vkUCL.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { connect } from "node:net";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as version$1 } from "./rest-
|
|
3
|
-
import {
|
|
2
|
+
import { c as version$1 } from "./rest-D57sPafI.mjs";
|
|
3
|
+
import { D as getConfigPath } from "./print-DMyEfL8X.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { err, ok } from "neverthrow";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./rest-
|
|
3
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
2
|
+
import "./rest-D57sPafI.mjs";
|
|
3
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-DMyEfL8X.mjs";
|
|
4
4
|
import "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
|
|
6
6
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
3
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
4
4
|
import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -512,18 +512,18 @@ function readQuestionEntries(raw) {
|
|
|
512
512
|
}];
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
|
-
/**
|
|
516
|
-
* The `platform ask` form. The web renders it as an interactive picker; here
|
|
517
|
-
* it maps onto an answer_question button so ctrl+r (and letter shortcuts)
|
|
518
|
-
* open an in-TUI picker. The composed answer is sent as a normal user
|
|
519
|
-
* message — same non-blocking model as the web card. Without this the spec
|
|
520
|
-
* is not a Card, parses to null, and the question is silently dropped.
|
|
521
|
-
*/
|
|
522
515
|
/** Compose the user-message body the web card also sends. */
|
|
523
516
|
function composeQuestionAnswer(questions, answers) {
|
|
524
517
|
if (questions.length === 1) return (answers[0] ?? []).join(", ");
|
|
525
518
|
return questions.map((q, i) => `${q.question} → ${(answers[i] ?? []).join(", ")}`).join("\n");
|
|
526
519
|
}
|
|
520
|
+
/** Build the typed durable payload that settles this exact question card. */
|
|
521
|
+
function composeQuestionAnswerEntries(questions, answers) {
|
|
522
|
+
return questions.map((question, index) => ({
|
|
523
|
+
question: question.question,
|
|
524
|
+
answer: (answers[index] ?? []).join(", ")
|
|
525
|
+
}));
|
|
526
|
+
}
|
|
527
527
|
function parseQuestionCard(rootEl) {
|
|
528
528
|
const props = isRecord(rootEl.props) ? rootEl.props : {};
|
|
529
529
|
const cardId = optionalString(props.cardId);
|
|
@@ -708,8 +708,8 @@ function isBlockingCardAction(action) {
|
|
|
708
708
|
* should target, prioritizing blocking cards over `platform ask` forms. When
|
|
709
709
|
* both a blocking card and a stale `answer_question` are waiting, ctrl+r must
|
|
710
710
|
* approve the thing the agent is stalled on, not re-answer an earlier ask that
|
|
711
|
-
*
|
|
712
|
-
*
|
|
711
|
+
* can remain actionable when ignored or answered as plain composer text.
|
|
712
|
+
* Falls through to the
|
|
713
713
|
* ask forms only when they are the only actionable cards left. Preserves input
|
|
714
714
|
* order within a tier, so a single card and genuine multi-card cases behave
|
|
715
715
|
* exactly as before.
|
|
@@ -900,6 +900,7 @@ async function runPrint({ appUrl, sessionToken, workspaceId, prompt, agentSelect
|
|
|
900
900
|
conversationId,
|
|
901
901
|
content: prompt,
|
|
902
902
|
attachmentIds: [],
|
|
903
|
+
questionAnswer: null,
|
|
903
904
|
clientSurface: "cli"
|
|
904
905
|
});
|
|
905
906
|
} catch (err) {
|
|
@@ -1077,4 +1078,4 @@ async function readStdin() {
|
|
|
1077
1078
|
}
|
|
1078
1079
|
|
|
1079
1080
|
//#endregion
|
|
1080
|
-
export {
|
|
1081
|
+
export { getPreference as A, resolveChatAuth as B, DEFAULT_API_URL as C, getConfigPath as D, deleteConfig as E, getStoredApiKeyId as F, saveConfig as G, resolveManagementAuth as H, getStoredApiKeyWorkspaceName as I, setLastSeenVersion as J, saveSession as K, getUpdateCheckDisabled as L, getReviewStateDir as M, getSavedTheme as N, getDefaultAgent as O, getShareMachineDefault as P, recordDefaultAgent as R, API_KEY_PREFIX as S, PREFERENCES as T, resolveSession as U, resolveConfig as V, resolveWebUrl as W, computeSettledLabel as _, runPrint as a, API_KEYS_URL as b, actionableCardVerb as c, parseOauthConnectParams as d, prioritizeActionableCards as f, composeQuestionAnswerEntries as g, composeQuestionAnswer as h, resolveAgent as i, getPromptHistoryPath as j, getLastSeenVersion as k, cardActionErrorMessage as l, resolveConnectUrl as m, messageGet as n, toPrintError as o, reconcileMaskedInput as p, saveTheme as q, readStdin as r, MASK_CHAR as s, collectRunText as t, parseExternalOauthConnectParams as u, parseConnectCard as v, DEFAULT_APP_URL as w, API_KEY_FAMILY_PREFIX as x, specKeyFor as y, resolveAppUrl as z };
|
|
@@ -14,7 +14,7 @@ import { n as printError } from "./output-C9mb3sUB.mjs";
|
|
|
14
14
|
* the reply (and to --json).
|
|
15
15
|
*/
|
|
16
16
|
async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
|
|
17
|
-
const { PortalClient } = await import("./client-
|
|
17
|
+
const { PortalClient } = await import("./client-DV0Su5yh.mjs");
|
|
18
18
|
const { defaultTlsCertSource } = await import("./tls-cert-BpCaD5AT.mjs");
|
|
19
19
|
let signalConnected;
|
|
20
20
|
const connected = new Promise((resolve) => {
|
|
@@ -6,7 +6,7 @@ import { createParser } from "eventsource-parser";
|
|
|
6
6
|
|
|
7
7
|
//#region package.json
|
|
8
8
|
var name = "skydive-cli";
|
|
9
|
-
var version = "0.6.0-beta.
|
|
9
|
+
var version = "0.6.0-beta.40";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/chat/util.ts
|
|
@@ -270,8 +270,11 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
|
|
|
270
270
|
return conversation;
|
|
271
271
|
},
|
|
272
272
|
listModels: async () => {
|
|
273
|
-
const { models } = await get("/api/v1/models", listModelsResponseSchema);
|
|
274
|
-
return
|
|
273
|
+
const { models, trainingOptedOut } = await get("/api/v1/models", listModelsResponseSchema);
|
|
274
|
+
return {
|
|
275
|
+
models,
|
|
276
|
+
trainingOptedOut: trainingOptedOut ?? false
|
|
277
|
+
};
|
|
275
278
|
},
|
|
276
279
|
listModelEfforts: async () => {
|
|
277
280
|
const { modelConfigOverrides } = await get("/api/v1/models/preferred", modelEffortPreferencesResponseSchema);
|
|
@@ -436,6 +439,9 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
|
|
|
436
439
|
setConversationArchived: async ({ conversationId, archived }) => {
|
|
437
440
|
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
|
|
438
441
|
},
|
|
442
|
+
setConversationPinned: async ({ conversationId, pinned }) => {
|
|
443
|
+
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/pin`, { pinned }, z.object({ pinned: z.boolean() }));
|
|
444
|
+
},
|
|
439
445
|
markConversationRead: async ({ conversationId }) => {
|
|
440
446
|
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/read`, {}, z.object({ read: z.boolean() }));
|
|
441
447
|
},
|
|
@@ -555,10 +561,14 @@ const platformModelSchema = z.object({
|
|
|
555
561
|
providerDisplay: z.string().optional(),
|
|
556
562
|
reasoning: z.boolean().optional(),
|
|
557
563
|
compliant: z.boolean().optional(),
|
|
564
|
+
noTraining: z.boolean().optional(),
|
|
558
565
|
thinkingLevels: z.array(z.string()).optional(),
|
|
559
566
|
thinkingLevelLabels: z.record(z.string(), z.string()).optional()
|
|
560
567
|
}).passthrough();
|
|
561
|
-
const listModelsResponseSchema = z.object({
|
|
568
|
+
const listModelsResponseSchema = z.object({
|
|
569
|
+
models: z.array(platformModelSchema),
|
|
570
|
+
trainingOptedOut: z.boolean().optional()
|
|
571
|
+
});
|
|
562
572
|
const modelEffortPreferencesResponseSchema = z.object({ modelConfigOverrides: z.record(z.string(), z.object({ thinkingLevel: z.string().optional() })).optional() });
|
|
563
573
|
const billingSummaryResponseSchema = z.object({ result: z.object({ data: z.object({
|
|
564
574
|
planKey: z.string().nullable(),
|
|
@@ -607,6 +617,7 @@ const conversationSummarySchema = z.object({
|
|
|
607
617
|
channel: z.string().nullable(),
|
|
608
618
|
channelLabel: z.string().nullable(),
|
|
609
619
|
viewerArchivedAt: z.string().nullable().optional(),
|
|
620
|
+
viewerPinnedAt: z.string().nullable().optional(),
|
|
610
621
|
viewerParticipates: z.boolean().optional(),
|
|
611
622
|
unread: z.boolean().optional(),
|
|
612
623
|
agent: conversationAgentSchema,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-
|
|
2
|
+
import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-D57sPafI.mjs";
|
|
3
3
|
import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
|
|
4
4
|
import "./billing-blocked-D3l5kJlX.mjs";
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skydive-cli",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.40",
|
|
4
4
|
"description": "Skydive CLI — cloud agents from the command line",
|
|
5
5
|
"homepage": "https://skydive.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
"//optionalDependencies": "The per-platform binary packages (skydive-cli-<os>-<arch>) are INTENTIONALLY not committed here. They are published by release-skydive-cli-binaries.yml and injected — pinned to the exact version being published — into the published launcher's optionalDependencies at release time (scripts/prepare-platform-packages.mjs --pin-version, run in release-skydive-cli.yml). Committing them would make `yarn install` try to resolve versions that only exist post-publish, breaking local dev and CI. npm installs of a published skydive-cli still get them (os/cpu-gated); the launcher (src/launcher.ts) resolves and execs the matching one. Local dev never needs them: it runs the JS bundle or `build:binary` directly.",
|
|
73
73
|
"optionalDependencies": {
|
|
74
|
-
"skydive-cli-darwin-arm64": "0.6.0-beta.
|
|
75
|
-
"skydive-cli-darwin-x64": "0.6.0-beta.
|
|
76
|
-
"skydive-cli-linux-x64": "0.6.0-beta.
|
|
77
|
-
"skydive-cli-linux-arm64": "0.6.0-beta.
|
|
74
|
+
"skydive-cli-darwin-arm64": "0.6.0-beta.40",
|
|
75
|
+
"skydive-cli-darwin-x64": "0.6.0-beta.40",
|
|
76
|
+
"skydive-cli-linux-x64": "0.6.0-beta.40",
|
|
77
|
+
"skydive-cli-linux-arm64": "0.6.0-beta.40"
|
|
78
78
|
}
|
|
79
79
|
}
|