skydive-cli 0.4.0-beta.1319 → 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 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-C4l07OBf.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-DA8WzgzH.mjs";
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-CtEF_ZDf.mjs";
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-C5O0ZhxP.mjs";
8
- import { c as PORTAL_DAEMON_FLAG, i as queryDaemonStatus, l as daemonPaths, n as ensureDaemonRunning, o as stopDaemon } from "./daemon-CgLbaJ9_.mjs";
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-COm0nT7p.mjs");
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-FHUrtd8x.mjs");
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-DwQoTays.mjs");
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-COm0nT7p.mjs");
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-DwQoTays.mjs");
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-FHUrtd8x.mjs");
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-DwQoTays.mjs");
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-COm0nT7p.mjs");
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-BhdMLYEe.mjs");
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-aXwyxWX0.mjs");
2640
- const { resolveAgent } = await import("./print-DwQoTays.mjs");
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-qBD3Zd-l.mjs");
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-C4l07OBf.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-DA8WzgzH.mjs";
4
- import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-CtEF_ZDf.mjs";
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-C5O0ZhxP.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-CgLbaJ9_.mjs";
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";
@@ -10256,6 +10256,7 @@ function ChatScreen({ agent, conversation }) {
10256
10256
  const [input, setInput] = useState(() => useStore.getState().takeEarlyInput());
10257
10257
  const [run, setRun] = useState({ kind: "idle" });
10258
10258
  const [model, setModel] = useState(agent.model ?? null);
10259
+ const [modelLocked, setModelLocked] = useState(agent.modelLocked ?? false);
10259
10260
  const [cardPickerOpen, setCardPickerOpen] = useState(false);
10260
10261
  const [modelPickerOpen, setModelPickerOpen] = useState(false);
10261
10262
  const [themePickerOpen, setThemePickerOpen] = useState(false);
@@ -10554,6 +10555,12 @@ function ChatScreen({ agent, conversation }) {
10554
10555
  onCompactionEvent(event.status);
10555
10556
  return;
10556
10557
  }
10558
+ if (event.kind === "agent") {
10559
+ if (event.id !== agent.id) return;
10560
+ setModel(event.model);
10561
+ setModelLocked(event.modelLocked);
10562
+ return;
10563
+ }
10557
10564
  if (event.kind === "conversation" && event.title) setChatTitle(event.title);
10558
10565
  }
10559
10566
  }).catch(() => {});
@@ -10563,6 +10570,7 @@ function ChatScreen({ agent, conversation }) {
10563
10570
  }, [
10564
10571
  rest,
10565
10572
  conversationId,
10573
+ agent.id,
10566
10574
  setChatTitle,
10567
10575
  attachToRun,
10568
10576
  onCompactionEvent
@@ -11832,7 +11840,7 @@ function ChatScreen({ agent, conversation }) {
11832
11840
  if (modelPickerOpen) return /* @__PURE__ */ jsx(ModelPicker, {
11833
11841
  agentId: agent.id,
11834
11842
  currentModel: model,
11835
- modelLocked: agent.modelLocked ?? false,
11843
+ modelLocked,
11836
11844
  onSelected: (modelId) => {
11837
11845
  setModel(modelId);
11838
11846
  setModelPickerOpen(false);
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import "./rest-D89MGnWD.mjs";
3
+ import "./billing-blocked-CwfG1BTR.mjs";
4
+ import { t as PortalClient } from "./client-yn4bC-OV.mjs";
5
+
6
+ export { PortalClient };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as errorMessage, t as HttpError } from "./rest-CtEF_ZDf.mjs";
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-CtEF_ZDf.mjs";
3
- import { t as PortalClient } from "./client-C5O0ZhxP.mjs";
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-CtEF_ZDf.mjs";
2
+ import "./rest-D89MGnWD.mjs";
3
3
  import "./billing-blocked-CwfG1BTR.mjs";
4
- import "./client-C5O0ZhxP.mjs";
5
- import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-CgLbaJ9_.mjs";
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-CtEF_ZDf.mjs";
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-DA8WzgzH.mjs";
3
- import "./rest-CtEF_ZDf.mjs";
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-BhdMLYEe.mjs");
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-DA8WzgzH.mjs";
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.1319";
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-CtEF_ZDf.mjs";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.4.0-beta.1319",
3
+ "version": "0.4.0-beta.1324",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rest-CtEF_ZDf.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
- import { t as PortalClient } from "./client-C5O0ZhxP.mjs";
5
-
6
- export { PortalClient };