skydive-cli 0.4.0-beta.1068 → 0.4.0-beta.1112

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,5 +1,5 @@
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-UzSfz08d.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-DORuJUS8.mjs";
3
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-CiaU2ygh.mjs";
4
4
  import { n as printError, r as printTable, t as output } from "./output-DYzzdXYV.mjs";
5
5
  import { n as createRestClient, t as HttpError } from "./rest-CG7VpQ56.mjs";
@@ -1230,6 +1230,15 @@ const PINNED_BUN_VERSION = "1.3.14";
1230
1230
  const BUN_RELEASE_BASE = process.env["SKYDIVE_BUN_RELEASE_BASE"] ?? "https://github.com/oven-sh/bun/releases/download";
1231
1231
  /** Guard env var: set on the child so a re-exec can never recurse. */
1232
1232
  const REEXEC_GUARD = "SKYDIVE_BUN_REEXEC";
1233
+ /**
1234
+ * Whether this process is the Bun child that `chat` re-exec'd itself into.
1235
+ * The parent Node process is still alive, blocked on spawnSync, and already
1236
+ * ran the per-invocation startup notices (update check, what's-new) — so the
1237
+ * child must not repeat them or the user sees each notice twice.
1238
+ */
1239
+ function isBunReexecChild(env = process.env) {
1240
+ return env[REEXEC_GUARD] === "1";
1241
+ }
1233
1242
  function isBun() {
1234
1243
  return typeof process !== "undefined" && "bun" in process.versions;
1235
1244
  }
@@ -1505,7 +1514,7 @@ const importCommand = {
1505
1514
  process.exit(1);
1506
1515
  }
1507
1516
  }
1508
- const { runChat } = await import("./boot-BLwtCROn.mjs");
1517
+ const { runChat } = await import("./boot-DDtm3bc5.mjs");
1509
1518
  await runChat({
1510
1519
  appUrl,
1511
1520
  sessionToken: session.value.sessionToken,
@@ -1917,7 +1926,7 @@ const chatCommand = {
1917
1926
  sessionToken: auth.value.token,
1918
1927
  agentSelector: argv.agent ?? null
1919
1928
  });
1920
- const { runChat } = await import("./boot-BLwtCROn.mjs");
1929
+ const { runChat } = await import("./boot-DDtm3bc5.mjs");
1921
1930
  await runChat({
1922
1931
  appUrl: auth.value.appUrl,
1923
1932
  sessionToken: auth.value.token,
@@ -2276,7 +2285,7 @@ const switchCommand = {
2276
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.");
2277
2286
  process.exit(1);
2278
2287
  }
2279
- const { runWorkspacePicker } = await import("./boot-BLwtCROn.mjs");
2288
+ const { runWorkspacePicker } = await import("./boot-DDtm3bc5.mjs");
2280
2289
  await runWorkspacePicker(session);
2281
2290
  return;
2282
2291
  }
@@ -3892,7 +3901,7 @@ if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
3892
3901
  } else runCli();
3893
3902
  function runCli() {
3894
3903
  const completionProbe = isCompletionProbe(process.argv);
3895
- if (!completionProbe) {
3904
+ if (!completionProbe && !isBunReexecChild()) {
3896
3905
  maybePrintWhatsNew();
3897
3906
  setupUpdateCheck(hideBin(process.argv));
3898
3907
  }
@@ -1,5 +1,5 @@
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-UzSfz08d.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-DORuJUS8.mjs";
3
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-CiaU2ygh.mjs";
4
4
  import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-CG7VpQ56.mjs";
5
5
  import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-CwfG1BTR.mjs";
@@ -681,9 +681,9 @@ function createCmuxWorkspaceTitleAdapter({ socket, workspaceId }) {
681
681
  //#endregion
682
682
  //#region src/chat/agent-host/adapters/cmux/sidebar-pr.ts
683
683
  /** Neutral gray — deliberately not green/purple; we don't render PR state. */
684
- const PILL_COLOR = "#8b949e";
685
- const PILL_ICON = "git-pull-request";
686
- const PILL_PRIORITY = 90;
684
+ const PILL_COLOR$1 = "#8b949e";
685
+ const PILL_ICON$1 = "git-pull-request";
686
+ const PILL_PRIORITY$1 = 90;
687
687
  /**
688
688
  * The cmux sidebar status key for a PR, derived from its repo-qualified
689
689
  * identity (`owner/repo#number`) so PRs from different repos never collide on a
@@ -712,7 +712,7 @@ function createCmuxSidebarPrAdapter({ socket, workspaceId }) {
712
712
  const runSet = async (pr) => {
713
713
  if (applied.has(pr.key)) return;
714
714
  applied.add(pr.key);
715
- const line = `set_status ${pillKey(pr.key)} ${quote(`PR #${pr.number}`)} --icon=${PILL_ICON} --color=${PILL_COLOR} --priority=${PILL_PRIORITY} --url=${pr.url} --tab=${workspaceId}`;
715
+ const line = `set_status ${pillKey(pr.key)} ${quote(`PR #${pr.number}`)} --icon=${PILL_ICON$1} --color=${PILL_COLOR$1} --priority=${PILL_PRIORITY$1} --url=${pr.url} --tab=${workspaceId}`;
716
716
  if (!await socket.command(line)) applied.delete(pr.key);
717
717
  };
718
718
  const runClear = async (prKey) => {
@@ -733,6 +733,54 @@ function createCmuxSidebarPrAdapter({ socket, workspaceId }) {
733
733
  };
734
734
  }
735
735
 
736
+ //#endregion
737
+ //#region src/chat/agent-host/adapters/cmux/run-status.ts
738
+ /**
739
+ * Our sidebar status key. One stable key means every run reuses the same pill
740
+ * rather than leaking a new one per run, and teardown clears exactly what we
741
+ * set. cmux keys are space-split tokens, so it must be a single bare token.
742
+ */
743
+ const PILL_KEY = "skydive-run";
744
+ /** The label shown on the pill while the agent is working. */
745
+ const PILL_LABEL = "Running";
746
+ /**
747
+ * `sync` is a cmux-rendered named glyph (spinning-arrows), the closest
748
+ * "in progress" affordance to the disabled loading spinner.
749
+ */
750
+ const PILL_ICON = "sync";
751
+ /** A distinct blue so "Running" reads apart from the gray PR pills. */
752
+ const PILL_COLOR = "#3b82f6";
753
+ /**
754
+ * Above the PR pills (priority 90) so the live "Running" signal sorts to the
755
+ * top of the workspace's status line while a run is in flight.
756
+ */
757
+ const PILL_PRIORITY = 100;
758
+ /** cmux renders a spinner while its `working` (working) state is on. */
759
+ function isWorking(state) {
760
+ return state === "working";
761
+ }
762
+ function createCmuxRunStatusAdapter({ socket, workspaceId }) {
763
+ let applied;
764
+ let chain = Promise.resolve();
765
+ const enqueue = (step) => {
766
+ chain = chain.then(step).catch((_error) => {});
767
+ };
768
+ const runSet = async (on) => {
769
+ if (applied === on) return;
770
+ const line = on ? `set_status ${PILL_KEY} "${PILL_LABEL}" --icon=${PILL_ICON} --color=${PILL_COLOR} --priority=${PILL_PRIORITY} --tab=${workspaceId}` : `clear_status ${PILL_KEY} --tab=${workspaceId}`;
771
+ if (await socket.command(line)) applied = on;
772
+ };
773
+ return {
774
+ transition({ state }) {
775
+ const on = isWorking(state);
776
+ enqueue(() => runSet(on));
777
+ },
778
+ dispose() {
779
+ enqueue(() => runSet(false));
780
+ }
781
+ };
782
+ }
783
+
736
784
  //#endregion
737
785
  //#region src/chat/agent-host/adapters/cmux/socket.ts
738
786
  const cmuxRpcResponseSchema = z.object({
@@ -785,6 +833,9 @@ function createCmuxSocket({ socketPath, timeoutMs = RPC_TIMEOUT_MS }) {
785
833
  `${++seq}`;
786
834
  return roundTrip(`${line}\n`, (reply) => reply.startsWith("OK") || reply === "OK", false);
787
835
  },
836
+ commandRaw(line) {
837
+ return roundTrip(`${line}\n`, (reply) => reply, null);
838
+ },
788
839
  request(method, params) {
789
840
  return new Promise((resolve) => {
790
841
  let settled = false;
@@ -1011,6 +1062,9 @@ function createAgentHost({ renderer, notifications }) {
1011
1062
  }), createCmuxSidebarPrAdapter({
1012
1063
  socket,
1013
1064
  workspaceId: cmux.workspaceId
1065
+ }), createCmuxRunStatusAdapter({
1066
+ socket,
1067
+ workspaceId: cmux.workspaceId
1014
1068
  }));
1015
1069
  }
1016
1070
  const herdr = createHerdrReporter();
@@ -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.1068";
11
+ var version$1 = "0.4.0-beta.1112";
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.4.0-beta.1068",
3
+ "version": "0.4.0-beta.1112",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",