skydive-cli 0.4.0-beta.1174 → 0.4.0-beta.1324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/bin.mjs +17 -17
- package/dist/js/{boot-DFFwwXGr.mjs → boot-BmzC25Rc.mjs} +109 -17
- package/dist/js/client-GNFwd8ou.mjs +6 -0
- package/dist/js/{client-C5O0ZhxP.mjs → client-yn4bC-OV.mjs} +1 -1
- package/dist/js/{daemon-CgLbaJ9_.mjs → daemon-C0Qr2WSJ.mjs} +2 -2
- package/dist/js/{daemon-qBD3Zd-l.mjs → daemon-C_h_KgJC.mjs} +3 -3
- package/dist/js/{print-DA8WzgzH.mjs → print-BaXFFR3b.mjs} +1 -1
- package/dist/js/{print-DwQoTays.mjs → print-CvB9w4jf.mjs} +2 -2
- package/dist/js/{print-share-FHUrtd8x.mjs → print-share-mBbyQQDb.mjs} +1 -1
- package/dist/js/{profiler-TWHjJUji.mjs → profiler-pZXBjTHx.mjs} +2 -2
- package/dist/js/{rest-aXwyxWX0.mjs → rest-D4gqf1ck.mjs} +1 -1
- package/dist/js/{rest-CtEF_ZDf.mjs → rest-D89MGnWD.mjs} +6 -0
- package/package.json +1 -1
- package/dist/js/client-BhdMLYEe.mjs +0 -6
package/dist/js/bin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-
|
|
3
|
-
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-
|
|
2
|
+
import { C as ensureActiveOrganization, D as setActiveWorkspace, E as listWorkspaces, O as name, T as getSessionIdentity, a as installCrashHandler, k as version, t as maybeStartProfiling, u as brandHelpArt, w as getActiveWorkspaceId, x as themes } from "./profiler-pZXBjTHx.mjs";
|
|
3
|
+
import { A as getStoredApiKeyWorkspaceName, C as getLastSeenVersion, F as resolveManagementAuth, I as resolveSession, M as resolveAppUrl, N as resolveChatAuth, O as getShareMachineDefault, P as resolveConfig, R as saveConfig, S as getConfigPath, T as getPromptHistoryPath, V as setLastSeenVersion, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent, j as getUpdateCheckDisabled, k as getStoredApiKeyId, v as DEFAULT_API_URL, w as getPreference, x as deleteConfig, z as saveSession } from "./print-BaXFFR3b.mjs";
|
|
4
4
|
import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
|
|
5
|
-
import { n as createRestClient, t as HttpError } from "./rest-
|
|
5
|
+
import { n as createRestClient, t as HttpError } from "./rest-D89MGnWD.mjs";
|
|
6
6
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
7
|
-
import { a as registerPortalDevice, i as grantPortalAccess, n as fetchPortalDevices, o as revokePortalAccess, r as findThisDevice, s as machineIdentity } from "./client-
|
|
8
|
-
import { c as PORTAL_DAEMON_FLAG, i as queryDaemonStatus, l as daemonPaths, n as ensureDaemonRunning, o as stopDaemon } from "./daemon-
|
|
7
|
+
import { a as registerPortalDevice, i as grantPortalAccess, n as fetchPortalDevices, o as revokePortalAccess, r as findThisDevice, s as machineIdentity } from "./client-yn4bC-OV.mjs";
|
|
8
|
+
import { c as PORTAL_DAEMON_FLAG, i as queryDaemonStatus, l as daemonPaths, n as ensureDaemonRunning, o as stopDaemon } from "./daemon-C0Qr2WSJ.mjs";
|
|
9
9
|
import { t as SandboxStream } from "./client-D8s9vY4p.mjs";
|
|
10
10
|
import { hideBin } from "yargs/helpers";
|
|
11
11
|
import yargs from "yargs";
|
|
@@ -1514,7 +1514,7 @@ const importCommand = {
|
|
|
1514
1514
|
process.exit(1);
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
const { runChat } = await import("./boot-
|
|
1517
|
+
const { runChat } = await import("./boot-BmzC25Rc.mjs");
|
|
1518
1518
|
await runChat({
|
|
1519
1519
|
appUrl,
|
|
1520
1520
|
sessionToken: session.value.sessionToken,
|
|
@@ -1541,7 +1541,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1541
1541
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1542
1542
|
process.exit(1);
|
|
1543
1543
|
}
|
|
1544
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1544
|
+
const { connectMachineShare } = await import("./print-share-mBbyQQDb.mjs");
|
|
1545
1545
|
const machineShare = await connectMachineShare({
|
|
1546
1546
|
appUrl,
|
|
1547
1547
|
sessionToken: session.value.sessionToken,
|
|
@@ -1549,7 +1549,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1549
1549
|
});
|
|
1550
1550
|
const extra = (argv.print ?? "").trim();
|
|
1551
1551
|
const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1552
|
-
const { runPrint } = await import("./print-
|
|
1552
|
+
const { runPrint } = await import("./print-CvB9w4jf.mjs");
|
|
1553
1553
|
try {
|
|
1554
1554
|
const result = await runPrint({
|
|
1555
1555
|
appUrl,
|
|
@@ -1926,7 +1926,7 @@ const chatCommand = {
|
|
|
1926
1926
|
sessionToken: auth.value.token,
|
|
1927
1927
|
agentSelector: argv.agent ?? null
|
|
1928
1928
|
});
|
|
1929
|
-
const { runChat } = await import("./boot-
|
|
1929
|
+
const { runChat } = await import("./boot-BmzC25Rc.mjs");
|
|
1930
1930
|
await runChat({
|
|
1931
1931
|
appUrl: auth.value.appUrl,
|
|
1932
1932
|
sessionToken: auth.value.token,
|
|
@@ -1993,7 +1993,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1993
1993
|
printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
1994
1994
|
process.exit(1);
|
|
1995
1995
|
}
|
|
1996
|
-
const { runPrint, readStdin } = await import("./print-
|
|
1996
|
+
const { runPrint, readStdin } = await import("./print-CvB9w4jf.mjs");
|
|
1997
1997
|
await ensureAgentWorkspace({
|
|
1998
1998
|
appUrl,
|
|
1999
1999
|
sessionToken: auth.value.token,
|
|
@@ -2018,7 +2018,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
2018
2018
|
process.exit(1);
|
|
2019
2019
|
}
|
|
2020
2020
|
} else {
|
|
2021
|
-
const { connectMachineShare } = await import("./print-share-
|
|
2021
|
+
const { connectMachineShare } = await import("./print-share-mBbyQQDb.mjs");
|
|
2022
2022
|
machineShare = await connectMachineShare({
|
|
2023
2023
|
appUrl: auth.value.appUrl,
|
|
2024
2024
|
sessionToken: auth.value.token,
|
|
@@ -2082,7 +2082,7 @@ const getCommand$1 = {
|
|
|
2082
2082
|
printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
|
|
2083
2083
|
process.exit(1);
|
|
2084
2084
|
}
|
|
2085
|
-
const { messageGet } = await import("./print-
|
|
2085
|
+
const { messageGet } = await import("./print-CvB9w4jf.mjs");
|
|
2086
2086
|
try {
|
|
2087
2087
|
const result = await messageGet({
|
|
2088
2088
|
appUrl: auth.value.appUrl,
|
|
@@ -2285,7 +2285,7 @@ const switchCommand = {
|
|
|
2285
2285
|
printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
|
|
2286
2286
|
process.exit(1);
|
|
2287
2287
|
}
|
|
2288
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
2288
|
+
const { runWorkspacePicker } = await import("./boot-BmzC25Rc.mjs");
|
|
2289
2289
|
await runWorkspacePicker(session);
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
@@ -2363,7 +2363,7 @@ const openCommand = {
|
|
|
2363
2363
|
const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
|
|
2364
2364
|
const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
|
|
2365
2365
|
const { machineName } = machineIdentity();
|
|
2366
|
-
const { PortalClient } = await import("./client-
|
|
2366
|
+
const { PortalClient } = await import("./client-GNFwd8ou.mjs");
|
|
2367
2367
|
let lastLine = "";
|
|
2368
2368
|
let signalConnected;
|
|
2369
2369
|
const connected = new Promise((resolve) => {
|
|
@@ -2636,8 +2636,8 @@ const sandboxCommand = {
|
|
|
2636
2636
|
}).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`"),
|
|
2637
2637
|
handler: async (argv) => {
|
|
2638
2638
|
const session = requireSession(argv);
|
|
2639
|
-
const { createRestClient } = await import("./rest-
|
|
2640
|
-
const { resolveAgent } = await import("./print-
|
|
2639
|
+
const { createRestClient } = await import("./rest-D4gqf1ck.mjs");
|
|
2640
|
+
const { resolveAgent } = await import("./print-CvB9w4jf.mjs");
|
|
2641
2641
|
const client = createRestClient({
|
|
2642
2642
|
appUrl: session.appUrl,
|
|
2643
2643
|
sessionToken: session.sessionToken
|
|
@@ -3896,7 +3896,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
|
|
|
3896
3896
|
process.exit(0);
|
|
3897
3897
|
}
|
|
3898
3898
|
if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
|
|
3899
|
-
const { runPortalDaemon } = await import("./daemon-
|
|
3899
|
+
const { runPortalDaemon } = await import("./daemon-C_h_KgJC.mjs");
|
|
3900
3900
|
runPortalDaemon(process.argv);
|
|
3901
3901
|
} else runCli();
|
|
3902
3902
|
function runCli() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-
|
|
3
|
-
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL } from "./print-
|
|
4
|
-
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-
|
|
2
|
+
import { D as setActiveWorkspace, E as listWorkspaces, S as themesForMode, _ as themeForMode, a as installCrashHandler, b as themeVersion, c as MARK_CELLS, d as DEFAULT_THEME_ID, f as applyTheme, g as theme, h as noColorRequested, i as writeArtifact, l as WORDMARK, m as monoTheme, n as profilingEnabled, o as buildCrashReport, p as findTheme, r as record, s as writeCrashReport, v as themeMode, w as getActiveWorkspaceId, y as themeModeFromColorFgBg } from "./profiler-pZXBjTHx.mjs";
|
|
3
|
+
import { B as saveTheme, D as getSavedTheme, E as getReviewStateDir, L as resolveWebUrl, S as getConfigPath, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams, v as DEFAULT_API_URL, y as DEFAULT_APP_URL } from "./print-BaXFFR3b.mjs";
|
|
4
|
+
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-D89MGnWD.mjs";
|
|
5
5
|
import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-CwfG1BTR.mjs";
|
|
6
|
-
import { t as PortalClient } from "./client-
|
|
7
|
-
import { d as makeLineParser, f as parseDaemonMessage, l as daemonPaths, n as ensureDaemonRunning, s as LOCAL_PROTOCOL_VERSION, u as encodeLine } from "./daemon-
|
|
6
|
+
import { t as PortalClient } from "./client-yn4bC-OV.mjs";
|
|
7
|
+
import { d as makeLineParser, f as parseDaemonMessage, l as daemonPaths, n as ensureDaemonRunning, s as LOCAL_PROTOCOL_VERSION, u as encodeLine } from "./daemon-C0Qr2WSJ.mjs";
|
|
8
8
|
import { t as SandboxStream } from "./client-D8s9vY4p.mjs";
|
|
9
9
|
import { t as runRawPtyPassthrough } from "./raw-pty-DAmb8uqt.mjs";
|
|
10
10
|
import * as os$1 from "node:os";
|
|
@@ -48,6 +48,58 @@ function toastColor(variant) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/chat/tui/early-input.ts
|
|
53
|
+
/**
|
|
54
|
+
* Buffering for keystrokes typed BEFORE the chat composer exists.
|
|
55
|
+
*
|
|
56
|
+
* When the CLI boots straight into a conversation (`skydive chat --new`, or a
|
|
57
|
+
* seeded `skydive import`), it must resolve the agent roster over the network
|
|
58
|
+
* before the chat screen — and its composer — can mount. During that window
|
|
59
|
+
* the splash screen is up and there is no textarea to receive input, so a user
|
|
60
|
+
* who starts typing immediately would lose every character.
|
|
61
|
+
*
|
|
62
|
+
* These helpers accumulate that early input as plain text; the chat screen
|
|
63
|
+
* drains it into the composer on mount so nothing typed during the load is
|
|
64
|
+
* dropped. This is deliberately a text buffer, not a queue of key events: the
|
|
65
|
+
* composer is a plain single-field editor here, so replaying the resulting
|
|
66
|
+
* string (via `composer.setText`) reproduces exactly what the user meant to
|
|
67
|
+
* type, and stays trivially unit-testable without an OpenTUI renderer.
|
|
68
|
+
*/
|
|
69
|
+
/**
|
|
70
|
+
* Whether a key is an ordinary printable character we should buffer as text.
|
|
71
|
+
*
|
|
72
|
+
* Excludes anything with a modifier (ctrl/meta/super/hyper — those are
|
|
73
|
+
* shortcuts, not text) and any named non-character key (enter, arrows, tab,
|
|
74
|
+
* escape, function keys, …). A printable stroke arrives with its character in
|
|
75
|
+
* `sequence` and a `name` that is that same single character (or empty for
|
|
76
|
+
* some symbols), never a multi-letter key name like `return`/`backspace`.
|
|
77
|
+
*/
|
|
78
|
+
function isTextKey(key) {
|
|
79
|
+
if (key.ctrl || key.meta || key.super || key.hyper) return false;
|
|
80
|
+
const seq = key.sequence;
|
|
81
|
+
if (seq.length !== 1) return false;
|
|
82
|
+
const code = seq.codePointAt(0);
|
|
83
|
+
if (code === void 0) return false;
|
|
84
|
+
if (code < 32 || code === 127) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
/** Whether a key is Backspace/Delete-left (erase one buffered character). */
|
|
88
|
+
function isBackspaceKey(key) {
|
|
89
|
+
return !key.ctrl && !key.meta && key.name === "backspace";
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Fold one key into the early-input buffer. Printable characters append,
|
|
93
|
+
* backspace erases the last character, everything else (enter, arrows,
|
|
94
|
+
* shortcuts) is ignored — we only reconstruct the draft text, not caret moves
|
|
95
|
+
* or submission, which the real composer owns once it takes over.
|
|
96
|
+
*/
|
|
97
|
+
function reduceEarlyInput(buffer, key) {
|
|
98
|
+
if (isTextKey(key)) return buffer + key.sequence;
|
|
99
|
+
if (isBackspaceKey(key)) return buffer.slice(0, -1);
|
|
100
|
+
return buffer;
|
|
101
|
+
}
|
|
102
|
+
|
|
51
103
|
//#endregion
|
|
52
104
|
//#region src/chat/state/store.ts
|
|
53
105
|
const initialPortalUi = {
|
|
@@ -81,6 +133,7 @@ const useStore = create((set, get) => ({
|
|
|
81
133
|
seedPrompt: null,
|
|
82
134
|
autoGrantMachine: false,
|
|
83
135
|
newConversationIntent: false,
|
|
136
|
+
earlyInput: "",
|
|
84
137
|
goTo: (screen) => set({
|
|
85
138
|
screen,
|
|
86
139
|
chatTitle: initialChatTitle(screen)
|
|
@@ -138,7 +191,16 @@ const useStore = create((set, get) => ({
|
|
|
138
191
|
prompt
|
|
139
192
|
} })),
|
|
140
193
|
showToast: (input) => set({ toast: createToast(input) }),
|
|
141
|
-
dismissToast: (id) => set((state) => state.toast?.id === id ? { toast: null } : {})
|
|
194
|
+
dismissToast: (id) => set((state) => state.toast?.id === id ? { toast: null } : {}),
|
|
195
|
+
appendEarlyInput: (key) => set((state) => {
|
|
196
|
+
const next = reduceEarlyInput(state.earlyInput, key);
|
|
197
|
+
return next === state.earlyInput ? {} : { earlyInput: next };
|
|
198
|
+
}),
|
|
199
|
+
takeEarlyInput: () => {
|
|
200
|
+
const { earlyInput } = get();
|
|
201
|
+
if (earlyInput !== "") set({ earlyInput: "" });
|
|
202
|
+
return earlyInput;
|
|
203
|
+
}
|
|
142
204
|
}));
|
|
143
205
|
|
|
144
206
|
//#endregion
|
|
@@ -1472,7 +1534,7 @@ function StatusBar({ rightHint }) {
|
|
|
1472
1534
|
const portal = useStore((s) => s.portal);
|
|
1473
1535
|
const left = headerLeftLabel(appUrl, workspaceName);
|
|
1474
1536
|
const middle = screenLabel(screen, chatTitle);
|
|
1475
|
-
const share = portalIndicator(portal);
|
|
1537
|
+
const share = portalIndicator(portal, screenAgentId(screen));
|
|
1476
1538
|
return /* @__PURE__ */ jsxs("box", {
|
|
1477
1539
|
style: {
|
|
1478
1540
|
flexDirection: "row",
|
|
@@ -1504,23 +1566,40 @@ function StatusBar({ rightHint }) {
|
|
|
1504
1566
|
]
|
|
1505
1567
|
});
|
|
1506
1568
|
}
|
|
1507
|
-
|
|
1569
|
+
/**
|
|
1570
|
+
* The share indicator, which answers exactly one question: can the agent on
|
|
1571
|
+
* screen run commands on this machine right now? Not "is the portal
|
|
1572
|
+
* connected" — the connection is a per-machine fact, access is per agent, and
|
|
1573
|
+
* a badge that tracks the former tells a user who just declined that the agent
|
|
1574
|
+
* is in.
|
|
1575
|
+
*
|
|
1576
|
+
* So it is scoped to the current agent and shown only once that agent holds a
|
|
1577
|
+
* grant. Everything else — no agent on screen, portal off, connected but this
|
|
1578
|
+
* agent ungranted, still connecting — renders as the off state (nothing), which
|
|
1579
|
+
* is the truthful reading: this agent cannot reach the machine.
|
|
1580
|
+
*
|
|
1581
|
+
* The one exception is an error, and only for an agent that IS granted: its
|
|
1582
|
+
* access is supposed to be live and isn't, which the user needs to see.
|
|
1583
|
+
*/
|
|
1584
|
+
function portalIndicator(portal, agentId) {
|
|
1585
|
+
if (!agentId || !portal.grantedAgentIds.includes(agentId)) return null;
|
|
1508
1586
|
switch (portal.status) {
|
|
1509
|
-
case "off":
|
|
1510
|
-
case "connecting": return
|
|
1511
|
-
text: "◌ sharing…",
|
|
1512
|
-
color: theme.warning
|
|
1513
|
-
};
|
|
1587
|
+
case "off":
|
|
1588
|
+
case "connecting": return null;
|
|
1514
1589
|
case "connected": return {
|
|
1515
|
-
text: "● machine
|
|
1590
|
+
text: "● machine connected",
|
|
1516
1591
|
color: theme.success
|
|
1517
1592
|
};
|
|
1518
1593
|
case "error": return {
|
|
1519
|
-
text: "●
|
|
1594
|
+
text: "● machine error",
|
|
1520
1595
|
color: theme.error
|
|
1521
1596
|
};
|
|
1522
1597
|
}
|
|
1523
1598
|
}
|
|
1599
|
+
/** The agent whose access the indicator speaks for, if a screen names one. */
|
|
1600
|
+
function screenAgentId(screen) {
|
|
1601
|
+
return screen.kind === "chat" || screen.kind === "conversation-picker" ? screen.agent.id : null;
|
|
1602
|
+
}
|
|
1524
1603
|
/**
|
|
1525
1604
|
* The per-screen label, split into its parts: the screen's own `title` and,
|
|
1526
1605
|
* when the screen belongs to an agent, that `agentName`. Kept structured so the
|
|
@@ -10174,9 +10253,10 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10174
10253
|
hadTodosRef.current = hasTodos;
|
|
10175
10254
|
}, [todos]);
|
|
10176
10255
|
const [historyLoaded, setHistoryLoaded] = useState(initialConversationId === null);
|
|
10177
|
-
const [input, setInput] = useState(
|
|
10256
|
+
const [input, setInput] = useState(() => useStore.getState().takeEarlyInput());
|
|
10178
10257
|
const [run, setRun] = useState({ kind: "idle" });
|
|
10179
10258
|
const [model, setModel] = useState(agent.model ?? null);
|
|
10259
|
+
const [modelLocked, setModelLocked] = useState(agent.modelLocked ?? false);
|
|
10180
10260
|
const [cardPickerOpen, setCardPickerOpen] = useState(false);
|
|
10181
10261
|
const [modelPickerOpen, setModelPickerOpen] = useState(false);
|
|
10182
10262
|
const [themePickerOpen, setThemePickerOpen] = useState(false);
|
|
@@ -10475,6 +10555,12 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10475
10555
|
onCompactionEvent(event.status);
|
|
10476
10556
|
return;
|
|
10477
10557
|
}
|
|
10558
|
+
if (event.kind === "agent") {
|
|
10559
|
+
if (event.id !== agent.id) return;
|
|
10560
|
+
setModel(event.model);
|
|
10561
|
+
setModelLocked(event.modelLocked);
|
|
10562
|
+
return;
|
|
10563
|
+
}
|
|
10478
10564
|
if (event.kind === "conversation" && event.title) setChatTitle(event.title);
|
|
10479
10565
|
}
|
|
10480
10566
|
}).catch(() => {});
|
|
@@ -10484,6 +10570,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
10484
10570
|
}, [
|
|
10485
10571
|
rest,
|
|
10486
10572
|
conversationId,
|
|
10573
|
+
agent.id,
|
|
10487
10574
|
setChatTitle,
|
|
10488
10575
|
attachToRun,
|
|
10489
10576
|
onCompactionEvent
|
|
@@ -11753,7 +11840,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
11753
11840
|
if (modelPickerOpen) return /* @__PURE__ */ jsx(ModelPicker, {
|
|
11754
11841
|
agentId: agent.id,
|
|
11755
11842
|
currentModel: model,
|
|
11756
|
-
modelLocked
|
|
11843
|
+
modelLocked,
|
|
11757
11844
|
onSelected: (modelId) => {
|
|
11758
11845
|
setModel(modelId);
|
|
11759
11846
|
setModelPickerOpen(false);
|
|
@@ -12445,7 +12532,12 @@ function App({ appUrl, sessionToken, authKind, shareMachine, promptHistoryPath,
|
|
|
12445
12532
|
setClients,
|
|
12446
12533
|
fail
|
|
12447
12534
|
]);
|
|
12535
|
+
const appendEarlyInput = useStore((s) => s.appendEarlyInput);
|
|
12448
12536
|
useKeyboard((key) => {
|
|
12537
|
+
if (screen.kind === "splash" && !(key.name === "c" && key.ctrl)) {
|
|
12538
|
+
appendEarlyInput(key);
|
|
12539
|
+
return;
|
|
12540
|
+
}
|
|
12449
12541
|
if (key.name === "c" && key.ctrl && screen.kind !== "chat") {
|
|
12450
12542
|
useStore.getState().portalClient?.dispose();
|
|
12451
12543
|
agentHost.dispose();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, t as HttpError } from "./rest-
|
|
2
|
+
import { a as errorMessage, t as HttpError } from "./rest-D89MGnWD.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { o as isRecord } from "./rest-
|
|
3
|
-
import { t as PortalClient } from "./client-
|
|
2
|
+
import { o as isRecord } from "./rest-D89MGnWD.mjs";
|
|
3
|
+
import { t as PortalClient } from "./client-yn4bC-OV.mjs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./rest-
|
|
2
|
+
import "./rest-D89MGnWD.mjs";
|
|
3
3
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
4
|
-
import "./client-
|
|
5
|
-
import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-
|
|
4
|
+
import "./client-yn4bC-OV.mjs";
|
|
5
|
+
import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-C0Qr2WSJ.mjs";
|
|
6
6
|
|
|
7
7
|
export { runPortalDaemon };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, t as HttpError } from "./rest-
|
|
2
|
+
import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, t as HttpError } from "./rest-D89MGnWD.mjs";
|
|
3
3
|
import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-CwfG1BTR.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import Conf from "conf";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
3
|
-
import "./rest-
|
|
2
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-BaXFFR3b.mjs";
|
|
3
|
+
import "./rest-D89MGnWD.mjs";
|
|
4
4
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
5
5
|
|
|
6
6
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -14,7 +14,7 @@ import { n as printError } from "./output-DYzzdXYV.mjs";
|
|
|
14
14
|
* the reply (and to --json).
|
|
15
15
|
*/
|
|
16
16
|
async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
|
|
17
|
-
const { PortalClient } = await import("./client-
|
|
17
|
+
const { PortalClient } = await import("./client-GNFwd8ou.mjs");
|
|
18
18
|
let signalConnected;
|
|
19
19
|
const connected = new Promise((resolve) => {
|
|
20
20
|
signalConnected = resolve;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as getConfigPath } from "./print-
|
|
2
|
+
import { S as getConfigPath } from "./print-BaXFFR3b.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { err, ok } from "neverthrow";
|
|
@@ -8,7 +8,7 @@ import fs from "node:fs";
|
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
10
|
var name = "skydive-cli";
|
|
11
|
-
var version$1 = "0.4.0-beta.
|
|
11
|
+
var version$1 = "0.4.0-beta.1324";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/auth/organization.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-
|
|
2
|
+
import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-D89MGnWD.mjs";
|
|
3
3
|
import "./billing-blocked-CwfG1BTR.mjs";
|
|
4
4
|
|
|
5
5
|
export { createRestClient };
|
|
@@ -592,6 +592,12 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
|
|
|
592
592
|
id: z.string(),
|
|
593
593
|
title: z.string().nullable()
|
|
594
594
|
}),
|
|
595
|
+
z.object({
|
|
596
|
+
kind: z.literal("agent"),
|
|
597
|
+
id: z.string(),
|
|
598
|
+
model: z.string().nullable(),
|
|
599
|
+
modelLocked: z.boolean()
|
|
600
|
+
}),
|
|
595
601
|
z.object({
|
|
596
602
|
kind: z.literal("run"),
|
|
597
603
|
runId: z.string(),
|
package/package.json
CHANGED