skydive-cli 0.5.0-beta.24 → 0.5.0-beta.26

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,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { A as takenAliasNames, B as name, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, I as getSessionIdentity, L as listWorkspaces, M as defaultInstallEnv, N as detectShell, O as installAgentAlias, P as ensureActiveOrganization, R as resolveWorkspaceId, S as themes, T as machineOsFromPlatform, V as version, a as installCrashHandler, j as SUPPORTED_SHELLS, k as slugifyAliasName, t as maybeStartProfiling, u as brandHelpArt, w as buildImportSeedPrompt, z as setActiveWorkspace } from "./profiler-DxmQ_Xqv.mjs";
2
+ import { A as takenAliasNames, B as name, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, I as getSessionIdentity, L as listWorkspaces, M as defaultInstallEnv, N as detectShell, O as installAgentAlias, P as ensureActiveOrganization, R as resolveWorkspaceId, S as themes, T as machineOsFromPlatform, V as version, a as installCrashHandler, j as SUPPORTED_SHELLS, k as slugifyAliasName, t as maybeStartProfiling, u as brandHelpArt, w as buildImportSeedPrompt, z as setActiveWorkspace } from "./profiler-PXG4pjU6.mjs";
3
3
  import { A as getStoredApiKeyId, B as saveConfig, C as getDefaultAgent, E as getPromptHistoryPath, F as resolveChatAuth, I as resolveConfig, L as resolveManagementAuth, M as getUpdateCheckDisabled, P as resolveAppUrl, R as resolveSession, S as getConfigPath, T as getPreference, U as setLastSeenVersion, V as saveSession, _ as API_KEY_PREFIX, b as PREFERENCES, g as API_KEY_FAMILY_PREFIX, h as API_KEYS_URL, i as resolveAgent$1, j as getStoredApiKeyWorkspaceName, k as getShareMachineDefault, v as DEFAULT_API_URL, w as getLastSeenVersion, x as deleteConfig } from "./print-DQtIEVHh.mjs";
4
4
  import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
5
5
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
6
6
  import { t as createRestClient } from "./rest-Dx6b-Nq_.mjs";
7
7
  import "./billing-blocked-2wju4gC_.mjs";
8
8
  import { r as resolveMachineIdentity } from "./client-DbqRBquD.mjs";
9
- import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-BBeAB5SM.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-r91-81wJ.mjs";
10
10
  import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-DG5W6iwx.mjs";
11
11
  import { t as SandboxStream } from "./client-c4c5MmgN.mjs";
12
12
  import { hideBin } from "yargs/helpers";
@@ -1584,7 +1584,7 @@ const importCommand = {
1584
1584
  process.exit(1);
1585
1585
  }
1586
1586
  }
1587
- const { runChat } = await import("./boot-BPzsuEQF.mjs");
1587
+ const { runChat } = await import("./boot-CAktTbtz.mjs");
1588
1588
  await runChat({
1589
1589
  appUrl,
1590
1590
  sessionToken: session.value.sessionToken,
@@ -2029,7 +2029,7 @@ const chatCommand = {
2029
2029
  sessionToken: auth.value.token,
2030
2030
  agentSelector: argv.agent ?? null
2031
2031
  });
2032
- const { runChat } = await import("./boot-BPzsuEQF.mjs");
2032
+ const { runChat } = await import("./boot-CAktTbtz.mjs");
2033
2033
  await runChat({
2034
2034
  appUrl: auth.value.appUrl,
2035
2035
  sessionToken: auth.value.token,
@@ -2411,7 +2411,7 @@ const switchCommand = {
2411
2411
  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.");
2412
2412
  process.exit(1);
2413
2413
  }
2414
- const { runWorkspacePicker } = await import("./boot-BPzsuEQF.mjs");
2414
+ const { runWorkspacePicker } = await import("./boot-CAktTbtz.mjs");
2415
2415
  await runWorkspacePicker(session);
2416
2416
  return;
2417
2417
  }
@@ -2490,7 +2490,7 @@ const openCommand = {
2490
2490
  const agent = argv.agent ? resolveAgent$1((await fetchPortalDevices(session)).agents, argv.agent) : null;
2491
2491
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
2492
2492
  const { machineName } = await resolveMachineIdentity(null);
2493
- const { PortalDaemonClient } = await import("./daemon-client-DXXLCfAg.mjs");
2493
+ const { PortalDaemonClient } = await import("./daemon-client-CH2Cy874.mjs");
2494
2494
  let lastLine = "";
2495
2495
  let signalConnected;
2496
2496
  const connected = new Promise((resolve) => {
@@ -4336,7 +4336,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4336
4336
  process.exit(0);
4337
4337
  }
4338
4338
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4339
- const { runPortalDaemon } = await import("./daemon-BM8EJU8-.mjs");
4339
+ const { runPortalDaemon } = await import("./daemon-Ciwk5Ilc.mjs");
4340
4340
  runPortalDaemon(process.argv);
4341
4341
  } else runCli();
4342
4342
  function runCli() {
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { A as takenAliasNames, C as themesForMode, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, L as listWorkspaces, N as detectShell, O as installAgentAlias, T as machineOsFromPlatform, _ as theme, a as installCrashHandler, b as themeModeFromColorFgBg, c as MARK_CELLS, d as splashFitsWidth, f as DEFAULT_THEME_ID, g as noColorRequested, h as monoTheme, i as writeArtifact, k as slugifyAliasName, l as WORDMARK, m as findTheme, n as profilingEnabled, o as buildCrashReport, p as applyTheme, r as record, s as writeCrashReport, v as themeForMode, x as themeVersion, y as themeMode, z as setActiveWorkspace } from "./profiler-DxmQ_Xqv.mjs";
2
+ import { A as takenAliasNames, C as themesForMode, D as dedupeAliasName, E as aliasActivationHint, F as getActiveWorkspaceId, L as listWorkspaces, N as detectShell, O as installAgentAlias, T as machineOsFromPlatform, _ as theme, a as installCrashHandler, b as themeModeFromColorFgBg, c as MARK_CELLS, d as splashFitsWidth, f as DEFAULT_THEME_ID, g as noColorRequested, h as monoTheme, i as writeArtifact, k as slugifyAliasName, l as WORDMARK, m as findTheme, n as profilingEnabled, o as buildCrashReport, p as applyTheme, r as record, s as writeCrashReport, v as themeForMode, x as themeVersion, y as themeMode, z as setActiveWorkspace } from "./profiler-PXG4pjU6.mjs";
3
3
  import { D as getReviewStateDir, H as saveTheme, N as recordDefaultAgent, O as getSavedTheme, 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, z as resolveWebUrl } from "./print-DQtIEVHh.mjs";
4
4
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
5
5
  import { a as isRecord, i as errorMessage, n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-Dx6b-Nq_.mjs";
6
6
  import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-2wju4gC_.mjs";
7
7
  import { t as PortalClient } from "./client-DbqRBquD.mjs";
8
- import "./daemon-BBeAB5SM.mjs";
8
+ import "./daemon-r91-81wJ.mjs";
9
9
  import "./api-DG5W6iwx.mjs";
10
10
  import { t as SandboxStream } from "./client-c4c5MmgN.mjs";
11
- import { t as PortalDaemonClient } from "./daemon-client-CJrRjvat.mjs";
11
+ import { t as PortalDaemonClient } from "./daemon-client-DfieDaV3.mjs";
12
12
  import { t as runRawPtyPassthrough } from "./raw-pty-DY4KelZW.mjs";
13
13
  import * as os$1 from "node:os";
14
14
  import { homedir, platform, release, tmpdir } from "node:os";
@@ -4949,7 +4949,7 @@ function headerLabel(rows) {
4949
4949
  * failed poll is skipped silently (the next tick retries; stale rows beat an
4950
4950
  * error row in the scrollback).
4951
4951
  */
4952
- function ToolSubagent({ item }) {
4952
+ function ToolSubagent({ item, pinned = false, onLiveChange }) {
4953
4953
  const { rest, conversationId } = useConversationContext();
4954
4954
  const titles = subagentTaskTitles(item.input);
4955
4955
  const ids = item.output?.kind === "ok" ? queuedSubagentTaskIds(item.output.value) : [];
@@ -4961,6 +4961,9 @@ function ToolSubagent({ item }) {
4961
4961
  fetched
4962
4962
  });
4963
4963
  const live = rows.length === 0 || rows.some((row) => isLiveStatus(row.status));
4964
+ useEffect(() => {
4965
+ onLiveChange?.(live);
4966
+ }, [live, onLiveChange]);
4964
4967
  useEffect(() => {
4965
4968
  if (!rest || !conversationId || idsKey.length === 0 || !live) return;
4966
4969
  let cancelled = false;
@@ -4991,6 +4994,7 @@ function ToolSubagent({ item }) {
4991
4994
  fg: theme.tool,
4992
4995
  children: "Delegating to subagents…"
4993
4996
  })] });
4997
+ if (pinned && !live) return null;
4994
4998
  return /* @__PURE__ */ jsxs("box", {
4995
4999
  style: { flexDirection: "column" },
4996
5000
  children: [/* @__PURE__ */ jsxs("text", { children: [
@@ -6890,6 +6894,42 @@ function TodoCardView({ todos, isActive }) {
6890
6894
  });
6891
6895
  }
6892
6896
 
6897
+ //#endregion
6898
+ //#region src/chat/tui/chat/subagent-card.tsx
6899
+ /**
6900
+ * Live delegated work pinned above the plan. Each batch owns its polling in
6901
+ * ToolSubagent; settled batches remove themselves here and remain visible only
6902
+ * at their original transcript position.
6903
+ */
6904
+ function SubagentCardView({ items, onHeightChange }) {
6905
+ const [liveById, setLiveById] = useState({});
6906
+ const setBatchLive = useCallback((id, live) => {
6907
+ setLiveById((current) => current[id] === live ? current : {
6908
+ ...current,
6909
+ [id]: live
6910
+ });
6911
+ }, []);
6912
+ const liveItems = useMemo(() => items.filter((item) => liveById[item.id] ?? true), [items, liveById]);
6913
+ const height = liveItems.length === 0 ? 0 : 1 + liveItems.reduce((rows, item) => rows + 1 + subagentTaskTitles(item.input).length, 0) + (liveItems.length - 1);
6914
+ useEffect(() => onHeightChange?.(height), [height, onHeightChange]);
6915
+ if (liveItems.length === 0) return null;
6916
+ return /* @__PURE__ */ jsx("box", {
6917
+ style: {
6918
+ flexDirection: "column",
6919
+ flexShrink: 0,
6920
+ marginTop: 1,
6921
+ paddingLeft: 1,
6922
+ paddingRight: 1,
6923
+ gap: 1
6924
+ },
6925
+ children: liveItems.map((item) => /* @__PURE__ */ jsx(ToolSubagent, {
6926
+ item,
6927
+ pinned: true,
6928
+ onLiveChange: (live) => setBatchLive(item.id, live)
6929
+ }, item.id))
6930
+ });
6931
+ }
6932
+
6893
6933
  //#endregion
6894
6934
  //#region src/chat/tui/chat/pr-links.tsx
6895
6935
  /**
@@ -11330,6 +11370,7 @@ function ChatScreen({ agent, conversation }) {
11330
11370
  const [items, setItems] = useState([]);
11331
11371
  const [todos, setTodos] = useState(null);
11332
11372
  const [planHidden, setPlanHidden] = useState(false);
11373
+ const [subagentRows, setSubagentRows] = useState(0);
11333
11374
  const [scrolledUp, setScrolledUp] = useState(false);
11334
11375
  const hadTodosRef = useRef(false);
11335
11376
  useEffect(() => {
@@ -11469,9 +11510,10 @@ function ChatScreen({ agent, conversation }) {
11469
11510
  const menuRows = menuOpen ? completionMenuHeight(menuCommands.length) : 0;
11470
11511
  const todoCardVisible = !credPrompt && !planHidden && !!todos && todos.length > 0;
11471
11512
  const todoRows = todoCardVisible ? todoCardHeight(todos) : 0;
11513
+ const subagentItems = useMemo(() => items.filter((item) => item.kind === "tool" && item.toolName === "subagent"), [items]);
11472
11514
  const jumpHintVisible = scrolledUp && !credPrompt;
11473
11515
  const jumpHintRows = jumpHintVisible ? 1 : 0;
11474
- const scrollHeight = Math.max(3, chatHeight - 2 - bottomBoxHeight - pendingRows - inlineReviewHeight - menuRows - jumpHintRows - todoRows);
11516
+ const scrollHeight = Math.max(3, chatHeight - 2 - bottomBoxHeight - pendingRows - inlineReviewHeight - menuRows - jumpHintRows - subagentRows - todoRows);
11475
11517
  useEffect(() => {
11476
11518
  if (reviewOpen && reviewFocused) {
11477
11519
  const composer = composerRef.current;
@@ -13197,6 +13239,10 @@ function ChatScreen({ agent, conversation }) {
13197
13239
  children: [" ", "end"]
13198
13240
  })]
13199
13241
  }) : null,
13242
+ /* @__PURE__ */ jsx(SubagentCardView, {
13243
+ items: subagentItems,
13244
+ onHeightChange: setSubagentRows
13245
+ }),
13200
13246
  todoCardVisible && todos ? /* @__PURE__ */ jsx(TodoCardView, {
13201
13247
  todos,
13202
13248
  isActive: run.kind !== "idle"
@@ -13585,13 +13631,16 @@ function ToastView() {
13585
13631
  return () => clearTimeout(handle);
13586
13632
  }, [toast, dismissToast]);
13587
13633
  if (!toast) return null;
13634
+ const cap = Math.min(60, Math.max(20, width - 6));
13635
+ const chrome = 4;
13636
+ const contentWidth = Math.max(...toast.message.split("\n").map((line) => Bun.stringWidth(line)));
13588
13637
  return /* @__PURE__ */ jsx("box", {
13589
13638
  style: {
13590
13639
  position: "absolute",
13591
13640
  top: 1,
13592
13641
  right: 1,
13593
13642
  zIndex: 100,
13594
- maxWidth: Math.min(60, Math.max(20, width - 6)),
13643
+ width: Math.min(cap, contentWidth + chrome),
13595
13644
  border: true,
13596
13645
  borderColor: toastColor(toast.variant),
13597
13646
  backgroundColor: theme.surface ?? "#1a1a1a",
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./client-DbqRBquD.mjs";
3
- import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-BBeAB5SM.mjs";
3
+ import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-r91-81wJ.mjs";
4
4
  import "./api-DG5W6iwx.mjs";
5
5
 
6
6
  export { runPortalDaemon };
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import "./client-DbqRBquD.mjs";
3
+ import "./daemon-r91-81wJ.mjs";
4
+ import "./api-DG5W6iwx.mjs";
5
+ import { t as PortalDaemonClient } from "./daemon-client-DfieDaV3.mjs";
6
+
7
+ export { PortalDaemonClient };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as LOCAL_PROTOCOL_VERSION, d as encodeLine, f as makeLineParser, n as ensureDaemonRunning, p as parseDaemonMessage, u as daemonPaths } from "./daemon-BBeAB5SM.mjs";
2
+ import { c as LOCAL_PROTOCOL_VERSION, d as encodeLine, f as makeLineParser, n as ensureDaemonRunning, p as parseDaemonMessage, u as daemonPaths } from "./daemon-r91-81wJ.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { connect } from "node:net";
5
5
 
@@ -20,7 +20,7 @@ import { access, appendFile, mkdir, readFile, unlink, writeFile } from "node:fs/
20
20
  * the commit time of the built tree is one monotonic clock they share.
21
21
  */
22
22
  function portalDaemonBuild() {
23
- return "1786727732";
23
+ return "1786734228";
24
24
  }
25
25
  /**
26
26
  * Whether a client carrying `mine` should replace a running daemon carrying
@@ -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.5.0-beta.24";
11
+ var version$1 = "0.5.0-beta.26";
12
12
 
13
13
  //#endregion
14
14
  //#region src/auth/organization.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.5.0-beta.24",
3
+ "version": "0.5.0-beta.26",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-DbqRBquD.mjs";
3
- import "./daemon-BBeAB5SM.mjs";
4
- import "./api-DG5W6iwx.mjs";
5
- import { t as PortalDaemonClient } from "./daemon-client-CJrRjvat.mjs";
6
-
7
- export { PortalDaemonClient };