skydive-cli 0.5.0-beta.15 → 0.5.0-beta.16

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 { 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-B97UpfHm.mjs";
2
+ import { A as version, D as listWorkspaces, E as getSessionIdentity, O as setActiveWorkspace, S as themes, T as getActiveWorkspaceId, a as installCrashHandler, k as name, t as maybeStartProfiling, u as brandHelpArt, w as ensureActiveOrganization } from "./profiler-DXusZ2OB.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, j as getStoredApiKeyWorkspaceName, k as getShareMachineDefault, v as DEFAULT_API_URL, w as getLastSeenVersion, x as deleteConfig } from "./print-riiY5Gly.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-CLrHVkxh.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-eb9dm6Ih.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-OlciVTBj.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";
@@ -1517,7 +1517,7 @@ const importCommand = {
1517
1517
  process.exit(1);
1518
1518
  }
1519
1519
  }
1520
- const { runChat } = await import("./boot-DZKl8JNI.mjs");
1520
+ const { runChat } = await import("./boot-MnSkqFnR.mjs");
1521
1521
  await runChat({
1522
1522
  appUrl,
1523
1523
  sessionToken: session.value.sessionToken,
@@ -1930,7 +1930,7 @@ const chatCommand = {
1930
1930
  sessionToken: auth.value.token,
1931
1931
  agentSelector: argv.agent ?? null
1932
1932
  });
1933
- const { runChat } = await import("./boot-DZKl8JNI.mjs");
1933
+ const { runChat } = await import("./boot-MnSkqFnR.mjs");
1934
1934
  await runChat({
1935
1935
  appUrl: auth.value.appUrl,
1936
1936
  sessionToken: auth.value.token,
@@ -2290,7 +2290,7 @@ const switchCommand = {
2290
2290
  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.");
2291
2291
  process.exit(1);
2292
2292
  }
2293
- const { runWorkspacePicker } = await import("./boot-DZKl8JNI.mjs");
2293
+ const { runWorkspacePicker } = await import("./boot-MnSkqFnR.mjs");
2294
2294
  await runWorkspacePicker(session);
2295
2295
  return;
2296
2296
  }
@@ -2369,7 +2369,7 @@ const openCommand = {
2369
2369
  const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
2370
2370
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
2371
2371
  const { machineName } = await resolveMachineIdentity(null);
2372
- const { PortalDaemonClient } = await import("./daemon-client-Bemq-pLd.mjs");
2372
+ const { PortalDaemonClient } = await import("./daemon-client-CtLwJOvc.mjs");
2373
2373
  let lastLine = "";
2374
2374
  let signalConnected;
2375
2375
  const connected = new Promise((resolve) => {
@@ -4215,7 +4215,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4215
4215
  process.exit(0);
4216
4216
  }
4217
4217
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4218
- const { runPortalDaemon } = await import("./daemon-Djei8xaW.mjs");
4218
+ const { runPortalDaemon } = await import("./daemon-DPWYOa1E.mjs");
4219
4219
  runPortalDaemon(process.argv);
4220
4220
  } else runCli();
4221
4221
  function runCli() {
@@ -1,14 +1,14 @@
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-B97UpfHm.mjs";
2
+ import { C as themesForMode, D as listWorkspaces, O as setActiveWorkspace, T as getActiveWorkspaceId, _ 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, 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 } from "./profiler-DXusZ2OB.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-riiY5Gly.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-CLrHVkxh.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-eb9dm6Ih.mjs";
8
+ import "./daemon-OlciVTBj.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-N8rvGusv.mjs";
11
+ import { t as PortalDaemonClient } from "./daemon-client-Bue4JMhq.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";
@@ -1810,13 +1810,15 @@ function WordmarkRows({ mono }) {
1810
1810
  });
1811
1811
  }
1812
1812
  /**
1813
- * Height-aware brand header for the pickers. Always shown (including while the
1814
- * list is loading / empty / erroring) so the splash is never gated on data.
1815
- * Full mark + wordmark when the terminal is tall enough; compact one-liner on
1816
- * short terminals so the list still has room.
1813
+ * Height- and width-aware brand header for the pickers. Always shown
1814
+ * (including while the list is loading / empty / erroring) so the splash is
1815
+ * never gated on data. Full mark + wordmark only when the terminal is tall
1816
+ * enough AND wide enough that the art sits on six lines; otherwise a compact
1817
+ * one-liner. Wrapping the splash would blow the 7-row budget the list
1818
+ * subtracts, and the overflow collapses the top list rows onto each other.
1817
1819
  */
1818
- function BrandHeader({ height }) {
1819
- if (height >= 24) return /* @__PURE__ */ jsxs("box", {
1820
+ function BrandHeader({ height, width }) {
1821
+ if (showFullSplash(height, width)) return /* @__PURE__ */ jsxs("box", {
1820
1822
  style: { flexDirection: "column" },
1821
1823
  children: [/* @__PURE__ */ jsx(SkydiveMark, { variant: "full" }), /* @__PURE__ */ jsx("box", { style: { height: 1 } })]
1822
1824
  });
@@ -1825,9 +1827,12 @@ function BrandHeader({ height }) {
1825
1827
  children: "✦ Skydive"
1826
1828
  });
1827
1829
  }
1830
+ function showFullSplash(height, width) {
1831
+ return height >= 24 && splashFitsWidth(width);
1832
+ }
1828
1833
  /** Row budget the BrandHeader consumes; callers subtract this from visibleRows. */
1829
- function brandHeaderRows(height) {
1830
- return height >= 24 ? 7 : 1;
1834
+ function brandHeaderRows(height, width) {
1835
+ return showFullSplash(height, width) ? 7 : 1;
1831
1836
  }
1832
1837
  function SkydiveMark({ variant = "full" }) {
1833
1838
  const mono = noColor();
@@ -1914,13 +1919,16 @@ function AgentPickerScreen() {
1914
1919
  scope,
1915
1920
  cache
1916
1921
  ]);
1917
- const { height } = useTerminalDimensions();
1922
+ const { width, height } = useTerminalDimensions();
1918
1923
  if (state.kind === "loading") return /* @__PURE__ */ jsxs("box", {
1919
1924
  style: {
1920
1925
  flexDirection: "column",
1921
1926
  flexGrow: 1
1922
1927
  },
1923
- children: [/* @__PURE__ */ jsx(BrandHeader, { height }), /* @__PURE__ */ jsx("text", {
1928
+ children: [/* @__PURE__ */ jsx(BrandHeader, {
1929
+ height,
1930
+ width
1931
+ }), /* @__PURE__ */ jsx("text", {
1924
1932
  fg: theme.muted,
1925
1933
  children: "loading agents…"
1926
1934
  })]
@@ -1930,7 +1938,10 @@ function AgentPickerScreen() {
1930
1938
  flexDirection: "column",
1931
1939
  flexGrow: 1
1932
1940
  },
1933
- children: [/* @__PURE__ */ jsx(BrandHeader, { height }), /* @__PURE__ */ jsxs("text", {
1941
+ children: [/* @__PURE__ */ jsx(BrandHeader, {
1942
+ height,
1943
+ width
1944
+ }), /* @__PURE__ */ jsxs("text", {
1934
1945
  fg: theme.error,
1935
1946
  children: ["error: ", state.message]
1936
1947
  })]
@@ -1940,7 +1951,10 @@ function AgentPickerScreen() {
1940
1951
  flexDirection: "column",
1941
1952
  flexGrow: 1
1942
1953
  },
1943
- children: [/* @__PURE__ */ jsx(BrandHeader, { height }), /* @__PURE__ */ jsx("text", {
1954
+ children: [/* @__PURE__ */ jsx(BrandHeader, {
1955
+ height,
1956
+ width
1957
+ }), /* @__PURE__ */ jsx("text", {
1944
1958
  fg: theme.muted,
1945
1959
  children: scope === "mine" ? "no agents of yours yet. press tab to see all agents, ctrl+w to switch workspace, or ctrl+n to create one." : "no agents in this workspace. press ctrl+w to switch workspace, or ctrl+n to create one."
1946
1960
  })]
@@ -1961,7 +1975,7 @@ function FilterableAgentList({ agents, scope, onPick }) {
1961
1975
  const hits = fuzzyFilter(query, agents, agentKeys);
1962
1976
  const filtered = hits.map((h) => h.item);
1963
1977
  const clamped = Math.min(highlight, Math.max(0, filtered.length - 1));
1964
- const visibleRows = Math.max(3, height - 6 - brandHeaderRows(height));
1978
+ const visibleRows = Math.max(3, height - 6 - brandHeaderRows(height, width));
1965
1979
  const start = windowStart(clamped, filtered.length, visibleRows);
1966
1980
  const windowed = hits.slice(start, start + visibleRows);
1967
1981
  useKeyboard((key) => {
@@ -1993,7 +2007,10 @@ function FilterableAgentList({ agents, scope, onPick }) {
1993
2007
  flexGrow: 1
1994
2008
  },
1995
2009
  children: [
1996
- /* @__PURE__ */ jsx(BrandHeader, { height }),
2010
+ /* @__PURE__ */ jsx(BrandHeader, {
2011
+ height,
2012
+ width
2013
+ }),
1997
2014
  /* @__PURE__ */ jsxs("box", {
1998
2015
  style: {
1999
2016
  flexDirection: "row",
@@ -2653,13 +2670,16 @@ function ConversationPickerScreen({ agent }) {
2653
2670
  cacheKey,
2654
2671
  cache
2655
2672
  ]);
2656
- const { height } = useTerminalDimensions();
2673
+ const { width, height } = useTerminalDimensions();
2657
2674
  if (state.kind === "loading") return /* @__PURE__ */ jsxs("box", {
2658
2675
  style: {
2659
2676
  flexDirection: "column",
2660
2677
  flexGrow: 1
2661
2678
  },
2662
- children: [/* @__PURE__ */ jsx(BrandHeader, { height }), /* @__PURE__ */ jsx("text", {
2679
+ children: [/* @__PURE__ */ jsx(BrandHeader, {
2680
+ height,
2681
+ width
2682
+ }), /* @__PURE__ */ jsx("text", {
2663
2683
  fg: theme.muted,
2664
2684
  children: "loading conversations…"
2665
2685
  })]
@@ -2669,7 +2689,10 @@ function ConversationPickerScreen({ agent }) {
2669
2689
  flexDirection: "column",
2670
2690
  flexGrow: 1
2671
2691
  },
2672
- children: [/* @__PURE__ */ jsx(BrandHeader, { height }), /* @__PURE__ */ jsxs("text", {
2692
+ children: [/* @__PURE__ */ jsx(BrandHeader, {
2693
+ height,
2694
+ width
2695
+ }), /* @__PURE__ */ jsxs("text", {
2673
2696
  fg: theme.error,
2674
2697
  children: ["error: ", state.message]
2675
2698
  })]
@@ -2798,7 +2821,7 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
2798
2821
  "↵ open"
2799
2822
  ], innerWidth)
2800
2823
  };
2801
- const visibleRows = Math.max(3, height - 6 - brandHeaderRows(height));
2824
+ const visibleRows = Math.max(3, height - 6 - brandHeaderRows(height, width));
2802
2825
  const start = windowStart(clamped, rows.length, visibleRows);
2803
2826
  const windowed = rows.slice(start, start + visibleRows);
2804
2827
  const open = (row) => {
@@ -2899,7 +2922,10 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
2899
2922
  flexGrow: 1
2900
2923
  },
2901
2924
  children: [
2902
- /* @__PURE__ */ jsx(BrandHeader, { height }),
2925
+ /* @__PURE__ */ jsx(BrandHeader, {
2926
+ height,
2927
+ width
2928
+ }),
2903
2929
  /* @__PURE__ */ jsxs("box", {
2904
2930
  style: {
2905
2931
  flexDirection: "row",
@@ -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-eb9dm6Ih.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-OlciVTBj.mjs";
4
4
  import "./api-DG5W6iwx.mjs";
5
5
 
6
6
  export { runPortalDaemon };
@@ -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 "1786605017";
23
+ return "1786633773";
24
24
  }
25
25
  /**
26
26
  * Whether a client carrying `mine` should replace a running daemon carrying
@@ -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-eb9dm6Ih.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-OlciVTBj.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { connect } from "node:net";
5
5
 
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import "./client-DbqRBquD.mjs";
3
+ import "./daemon-OlciVTBj.mjs";
4
+ import "./api-DG5W6iwx.mjs";
5
+ import { t as PortalDaemonClient } from "./daemon-client-Bue4JMhq.mjs";
6
+
7
+ export { PortalDaemonClient };
@@ -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.15";
11
+ var version$1 = "0.5.0-beta.16";
12
12
 
13
13
  //#endregion
14
14
  //#region src/auth/organization.ts
@@ -907,6 +907,17 @@ const WORDMARK = [
907
907
  "███████║██║ ██╗ ██║ ██████╔╝██║ ╚████╔╝ ███████╗",
908
908
  "╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚══════╝"
909
909
  ];
910
+ /** Columns between the pinwheel and the wordmark. */
911
+ const SPLASH_GAP = 3;
912
+ /** Columns the full mark + wordmark occupies (no chrome). */
913
+ const SPLASH_WIDTH = MARK_WIDTH + SPLASH_GAP + WORDMARK.reduce((max, line) => Math.max(max, line.length), 0);
914
+ /** Extra columns around the splash: `skydive --help` indents by 2, the TUI
915
+ * app pads 1 on each side. Same number, so one threshold covers both. */
916
+ const SPLASH_CHROME = 2;
917
+ /** Whether the full splash fits on one line of `columns` without wrapping. */
918
+ function splashFitsWidth(columns) {
919
+ return columns >= SPLASH_WIDTH + SPLASH_CHROME;
920
+ }
910
921
  const RESET = "\x1B[0m";
911
922
  function hexToRgb(hex) {
912
923
  const n = Number.parseInt(hex.slice(1), 16);
@@ -933,7 +944,7 @@ function markLinesAnsi() {
933
944
  function brandHelpArt(stream = process.stdout) {
934
945
  if (!stream.isTTY) return "";
935
946
  const truecolor = (typeof stream.getColorDepth === "function" ? stream.getColorDepth() : 1) >= 24;
936
- if ((stream.columns ?? 80) < 66) return truecolor ? `\n ${sgr("✦", BRAND_ACCENT)} Skydive\n` : "\n ✦ Skydive\n";
947
+ if (!splashFitsWidth(stream.columns ?? 80)) return truecolor ? `\n ${sgr("✦", BRAND_ACCENT)} Skydive\n` : "\n ✦ Skydive\n";
937
948
  if (!truecolor) return `\n${WORDMARK.map((l) => ` ${l}`).join("\n")}\n`;
938
949
  const mark = markLinesAnsi();
939
950
  const word = [...WORDMARK];
@@ -1264,4 +1275,4 @@ function maybeStartProfiling(argv, cliVersion) {
1264
1275
  }
1265
1276
 
1266
1277
  //#endregion
1267
- export { ensureActiveOrganization as C, setActiveWorkspace as D, listWorkspaces as E, name as O, themesForMode as S, getSessionIdentity as T, themeForMode as _, installCrashHandler as a, themeVersion as b, MARK_CELLS as c, DEFAULT_THEME_ID as d, applyTheme as f, theme as g, noColorRequested as h, writeArtifact as i, version$1 as k, WORDMARK as l, monoTheme as m, profilingEnabled as n, buildCrashReport as o, findTheme as p, record as r, writeCrashReport as s, maybeStartProfiling as t, brandHelpArt as u, themeMode as v, getActiveWorkspaceId as w, themes as x, themeModeFromColorFgBg as y };
1278
+ export { version$1 as A, themesForMode as C, listWorkspaces as D, getSessionIdentity as E, setActiveWorkspace as O, themes as S, getActiveWorkspaceId as T, theme as _, installCrashHandler as a, themeModeFromColorFgBg as b, MARK_CELLS as c, splashFitsWidth as d, DEFAULT_THEME_ID as f, noColorRequested as g, monoTheme as h, writeArtifact as i, name as k, WORDMARK as l, findTheme as m, profilingEnabled as n, buildCrashReport as o, applyTheme as p, record as r, writeCrashReport as s, maybeStartProfiling as t, brandHelpArt as u, themeForMode as v, ensureActiveOrganization as w, themeVersion as x, themeMode as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.5.0-beta.15",
3
+ "version": "0.5.0-beta.16",
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-eb9dm6Ih.mjs";
4
- import "./api-DG5W6iwx.mjs";
5
- import { t as PortalDaemonClient } from "./daemon-client-N8rvGusv.mjs";
6
-
7
- export { PortalDaemonClient };