skydive-cli 0.6.0-beta.10 → 0.6.0-beta.12

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,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { c as version, s as name, t as createRestClient } from "./rest-B2bynGwY.mjs";
3
- import { B as resolveSession$1, C as deleteConfig, D as getPreference, E as getLastSeenVersion, G as setLastSeenVersion, H as saveConfig, I as resolveAppUrl, L as resolveChatAuth, M as getStoredApiKeyId, N as getStoredApiKeyWorkspaceName, O as getPromptHistoryPath, P as getUpdateCheckDisabled, R as resolveConfig, S as PREFERENCES, T as getDefaultAgent, U as saveSession, _ as API_KEYS_URL, b as DEFAULT_API_URL, i as resolveAgent$1, j as getShareMachineDefault, v as API_KEY_FAMILY_PREFIX, w as getConfigPath, y as API_KEY_PREFIX, z as resolveManagementAuth } from "./print-CPBx8690.mjs";
4
- import { A as installAgentAlias, B as resolveWorkspaceId, D as machineOsFromPlatform, E as buildImportSeedPrompt, F as detectShell, I as ensureActiveOrganization, L as getActiveWorkspaceId, M as takenAliasNames, N as SUPPORTED_SHELLS, O as aliasActivationHint, P as defaultInstallEnv, R as getSessionIdentity, V as setActiveWorkspace, c as getAutomaticLogsDir, j as slugifyAliasName, k as dedupeAliasName, l as maybeStartProfiling, o as brandHelpArt, t as installCrashHandler, u as profileDir, w as themes, z as listWorkspaces } from "./install-Bg_9I2-2.mjs";
2
+ import { c as version, s as name, t as createRestClient } from "./rest-CqBeYSq_.mjs";
3
+ import { A as getPromptHistoryPath, B as resolveConfig, D as getDefaultAgent, E as getConfigPath, F as getStoredApiKeyWorkspaceName, G as saveSession, H as resolveSession$1, I as getUpdateCheckDisabled, N as getShareMachineDefault, O as getLastSeenVersion, P as getStoredApiKeyId, R as resolveAppUrl, S as DEFAULT_API_URL, T as deleteConfig, V as resolveManagementAuth, W as saveConfig, b as API_KEY_FAMILY_PREFIX, i as resolveAgent$1, k as getPreference, q as setLastSeenVersion, w as PREFERENCES, x as API_KEY_PREFIX, y as API_KEYS_URL, z as resolveChatAuth } from "./print-DGmr1GRx.mjs";
4
+ import { A as installAgentAlias, B as resolveWorkspaceId, D as machineOsFromPlatform, E as buildImportSeedPrompt, F as detectShell, I as ensureActiveOrganization, L as getActiveWorkspaceId, M as takenAliasNames, N as SUPPORTED_SHELLS, O as aliasActivationHint, P as defaultInstallEnv, R as getSessionIdentity, V as setActiveWorkspace, c as getAutomaticLogsDir, j as slugifyAliasName, k as dedupeAliasName, l as maybeStartProfiling, o as brandHelpArt, t as installCrashHandler, u as profileDir, w as themes, z as listWorkspaces } from "./install-wydN7c6z.mjs";
5
5
  import { n as printError, r as printTable, t as output } from "./output-C9mb3sUB.mjs";
6
6
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
7
7
  import "./billing-blocked-D3l5kJlX.mjs";
8
- import { a as resolveMachineIdentity } from "./client-B-5eaVyt.mjs";
8
+ import { a as resolveMachineIdentity } from "./client-Bp64occP.mjs";
9
9
  import "./tls-cert-Rua2oV7n.mjs";
10
10
  import { i as grantPortalAccess, n as fetchPortalDevices, o as registerPortalDevice, r as findThisDevice, s as revokePortalAccess } from "./api-BFQ4PQDA.mjs";
11
- import { d as daemonPaths, i as queryDaemonStatus, n as ensureDaemonRunning, s as stopDaemon, u as PORTAL_DAEMON_FLAG } from "./daemon-CLc3zjcv.mjs";
12
- import { a as encodeFsRequest, i as decodeFsResponse, n as SANDBOX_STREAM_PATH, r as streamSpecToQuery, t as SandboxStream } from "./client-Btq6bMzX.mjs";
11
+ import { d as daemonPaths, i as queryDaemonStatus, n as ensureDaemonRunning, s as stopDaemon, u as PORTAL_DAEMON_FLAG } from "./daemon-DN-cac_x.mjs";
12
+ import { a as encodeFsRequest, i as decodeFsResponse, n as SANDBOX_STREAM_PATH, r as streamSpecToQuery, t as SandboxStream } from "./client-l6orYfqq.mjs";
13
13
  import { hideBin } from "yargs/helpers";
14
14
  import yargs from "yargs";
15
15
  import { hostname, tmpdir } from "node:os";
@@ -1584,7 +1584,7 @@ const importCommand = {
1584
1584
  process.exit(1);
1585
1585
  }
1586
1586
  }
1587
- const { runChat } = await import("./boot-BEvwMeO6.mjs");
1587
+ const { runChat } = await import("./boot-DlcxNeDq.mjs");
1588
1588
  await runChat({
1589
1589
  appUrl,
1590
1590
  sessionToken: session.value.sessionToken,
@@ -1614,7 +1614,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1614
1614
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
1615
1615
  process.exit(1);
1616
1616
  }
1617
- const { connectMachineShare } = await import("./print-share-DW5pHVDz.mjs");
1617
+ const { connectMachineShare } = await import("./print-share-KyDAt0fI.mjs");
1618
1618
  const machineShare = await connectMachineShare({
1619
1619
  appUrl,
1620
1620
  sessionToken: session.value.sessionToken,
@@ -1622,7 +1622,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1622
1622
  });
1623
1623
  const extra = (argv.print ?? "").trim();
1624
1624
  const prompt = buildImportSeedPrompt(process.cwd(), machineOsFromPlatform(process.platform)) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1625
- const { runPrint } = await import("./print-CT1G1LeA.mjs");
1625
+ const { runPrint } = await import("./print-BQS8nx3a.mjs");
1626
1626
  try {
1627
1627
  const result = await runPrint({
1628
1628
  appUrl,
@@ -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-BEvwMeO6.mjs");
2032
+ const { runChat } = await import("./boot-DlcxNeDq.mjs");
2033
2033
  await runChat({
2034
2034
  appUrl: auth.value.appUrl,
2035
2035
  sessionToken: auth.value.token,
@@ -2113,7 +2113,7 @@ async function runPrintMode({ argv, appUrl }) {
2113
2113
  printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2114
2114
  process.exit(1);
2115
2115
  }
2116
- const { runPrint, readStdin } = await import("./print-CT1G1LeA.mjs");
2116
+ const { runPrint, readStdin } = await import("./print-BQS8nx3a.mjs");
2117
2117
  const workspaceId = await resolveWorkspaceFlag({
2118
2118
  appUrl,
2119
2119
  sessionToken: auth.value.token,
@@ -2143,7 +2143,7 @@ async function runPrintMode({ argv, appUrl }) {
2143
2143
  process.exit(1);
2144
2144
  }
2145
2145
  } else {
2146
- const { connectMachineShare } = await import("./print-share-DW5pHVDz.mjs");
2146
+ const { connectMachineShare } = await import("./print-share-KyDAt0fI.mjs");
2147
2147
  machineShare = await connectMachineShare({
2148
2148
  appUrl: auth.value.appUrl,
2149
2149
  sessionToken: auth.value.token,
@@ -2208,7 +2208,7 @@ const getCommand$1 = {
2208
2208
  printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2209
2209
  process.exit(1);
2210
2210
  }
2211
- const { messageGet } = await import("./print-CT1G1LeA.mjs");
2211
+ const { messageGet } = await import("./print-BQS8nx3a.mjs");
2212
2212
  try {
2213
2213
  const result = await messageGet({
2214
2214
  appUrl: auth.value.appUrl,
@@ -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-BEvwMeO6.mjs");
2414
+ const { runWorkspacePicker } = await import("./boot-DlcxNeDq.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-pYWyRTyi.mjs");
2493
+ const { PortalDaemonClient } = await import("./daemon-client-CGuAvOyd.mjs");
2494
2494
  let lastLine = "";
2495
2495
  let signalConnected;
2496
2496
  const connected = new Promise((resolve) => {
@@ -2847,8 +2847,8 @@ const sandboxCommand = {
2847
2847
  }).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`"),
2848
2848
  handler: async (argv) => {
2849
2849
  const session = requireSession(argv);
2850
- const { createRestClient } = await import("./rest-DejyWmRu.mjs");
2851
- const { resolveAgent } = await import("./print-CT1G1LeA.mjs");
2850
+ const { createRestClient } = await import("./rest-DDxJ0ar8.mjs");
2851
+ const { resolveAgent } = await import("./print-BQS8nx3a.mjs");
2852
2852
  const client = createRestClient({
2853
2853
  appUrl: session.appUrl,
2854
2854
  sessionToken: session.sessionToken
@@ -2917,7 +2917,7 @@ async function runPty({ session, agentId, agentName }) {
2917
2917
  return 1;
2918
2918
  }
2919
2919
  console.error(`Connecting to ${agentName}'s sandbox… (Ctrl-] detaches)`);
2920
- const { runRawPtyPassthrough } = await import("./raw-pty-Ci2qFR9F.mjs");
2920
+ const { runRawPtyPassthrough } = await import("./raw-pty-DRZuf1oW.mjs");
2921
2921
  const result = await runRawPtyPassthrough({
2922
2922
  stdin: process.stdin,
2923
2923
  stdout: process.stdout,
@@ -3119,8 +3119,8 @@ const fsEditCommand = {
3119
3119
  handler: async (argv) => {
3120
3120
  const session = requireSession(argv);
3121
3121
  const remotePath = argv.path;
3122
- const { createRestClient } = await import("./rest-DejyWmRu.mjs");
3123
- const { resolveAgent } = await import("./print-CT1G1LeA.mjs");
3122
+ const { createRestClient } = await import("./rest-DDxJ0ar8.mjs");
3123
+ const { resolveAgent } = await import("./print-BQS8nx3a.mjs");
3124
3124
  const client = createRestClient({
3125
3125
  appUrl: session.appUrl,
3126
3126
  sessionToken: session.sessionToken
@@ -4573,7 +4573,7 @@ if (process.argv.includes(UPDATE_WORKER_FLAG)) {
4573
4573
  process.exit(0);
4574
4574
  }
4575
4575
  if (process.argv.includes(PORTAL_DAEMON_FLAG)) {
4576
- const { runPortalDaemon } = await import("./daemon-ClXSvjcv.mjs");
4576
+ const { runPortalDaemon } = await import("./daemon-Dhpj-i8s.mjs");
4577
4577
  runPortalDaemon(process.argv);
4578
4578
  } else runCli();
4579
4579
  function runCli() {
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { a as errorMessage, i as sendErrorMessage, n as errorDetail, o as isRecord, t as createRestClient } from "./rest-B2bynGwY.mjs";
3
- import { A as getSavedTheme, F as recordDefaultAgent, V as resolveWebUrl, W as saveTheme, b as DEFAULT_API_URL, c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, g as specKeyFor, h as parseConnectCard, i as resolveAgent, k as getReviewStateDir, l as parseExternalOauthConnectParams, m as computeSettledLabel, p as composeQuestionAnswer, s as MASK_CHAR, u as parseOauthConnectParams, w as getConfigPath, x as DEFAULT_APP_URL } from "./print-CPBx8690.mjs";
4
- import { A as installAgentAlias, C as themeVersion, D as machineOsFromPlatform, F as detectShell, L as getActiveWorkspaceId, M as takenAliasNames, O as aliasActivationHint, S as themeModeFromColorFgBg, T as themesForMode, V as setActiveWorkspace, _ as monoTheme, a as WORDMARK, b as themeForMode, d as profilingEnabled, f as record, g as findTheme, h as applyTheme, i as MARK_CELLS, j as slugifyAliasName, k as dedupeAliasName, m as DEFAULT_THEME_ID, n as buildCrashReport, p as writeArtifact, r as writeCrashReport, s as splashFitsWidth, t as installCrashHandler, v as noColorRequested, x as themeMode, y as theme, z as listWorkspaces } from "./install-Bg_9I2-2.mjs";
2
+ import { a as errorMessage, i as sendErrorMessage, n as errorDetail, o as isRecord, t as createRestClient } from "./rest-CqBeYSq_.mjs";
3
+ import { C as DEFAULT_APP_URL, E as getConfigPath, K as saveTheme, L as recordDefaultAgent, M as getSavedTheme, S as DEFAULT_API_URL, U as resolveWebUrl, _ as parseConnectCard, c as actionableCardVerb, d as parseOauthConnectParams, f as prioritizeActionableCards, g as computeSettledLabel, h as composeQuestionAnswer, i as resolveAgent, j as getReviewStateDir, l as cardActionErrorMessage, m as resolveConnectUrl, p as reconcileMaskedInput, s as MASK_CHAR, u as parseExternalOauthConnectParams, v as specKeyFor } from "./print-DGmr1GRx.mjs";
4
+ import { A as installAgentAlias, C as themeVersion, D as machineOsFromPlatform, F as detectShell, L as getActiveWorkspaceId, M as takenAliasNames, O as aliasActivationHint, S as themeModeFromColorFgBg, T as themesForMode, V as setActiveWorkspace, _ as monoTheme, a as WORDMARK, b as themeForMode, d as profilingEnabled, f as record, g as findTheme, h as applyTheme, i as MARK_CELLS, j as slugifyAliasName, k as dedupeAliasName, m as DEFAULT_THEME_ID, n as buildCrashReport, p as writeArtifact, r as writeCrashReport, s as splashFitsWidth, t as installCrashHandler, v as noColorRequested, x as themeMode, y as theme, z as listWorkspaces } from "./install-wydN7c6z.mjs";
5
5
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
6
6
  import { i as billingBlockedOutcomeFromSendResponse } from "./billing-blocked-D3l5kJlX.mjs";
7
- import { t as PortalClient } from "./client-B-5eaVyt.mjs";
7
+ import { t as PortalClient } from "./client-Bp64occP.mjs";
8
8
  import { t as defaultTlsCertSource } from "./tls-cert-Rua2oV7n.mjs";
9
9
  import "./api-BFQ4PQDA.mjs";
10
- import "./daemon-CLc3zjcv.mjs";
11
- import { t as SandboxStream } from "./client-Btq6bMzX.mjs";
12
- import { t as PortalDaemonClient } from "./daemon-client-DSIb7j28.mjs";
13
- import { t as runRawPtyPassthrough } from "./raw-pty-D5PhKZSl.mjs";
10
+ import "./daemon-DN-cac_x.mjs";
11
+ import { t as SandboxStream } from "./client-l6orYfqq.mjs";
12
+ import { t as PortalDaemonClient } from "./daemon-client-BTNwBMjn.mjs";
13
+ import { t as runRawPtyPassthrough } from "./raw-pty-dndn1Kxc.mjs";
14
14
  import * as os$1 from "node:os";
15
15
  import { homedir, platform, release, tmpdir } from "node:os";
16
16
  import path, { basename, extname, isAbsolute, join, posix, win32 } from "node:path";
@@ -7928,9 +7928,10 @@ function useCompaction({ rest, conversationId }) {
7928
7928
  //#endregion
7929
7929
  //#region src/chat/tui/chat/footer-hints.ts
7930
7930
  /** Build the chat footer copy independently of its colors and layout. */
7931
- function formatChatFooterStatus({ runKind, ctrlCArmed, portalOpen, hasPendingSteer, actionableCardCount, nonWebChannel }) {
7931
+ function formatChatFooterStatus({ runKind, ctrlCArmed, portalOpen, hasPendingSteer, actionableCardCount, actionableCardVerb, nonWebChannel }) {
7932
7932
  const portalHint = `ctrl+t ${portalOpen ? "close portal" : "portal"}`;
7933
- const connectHint = actionableCardCount > 1 ? `ctrl+r connect (${actionableCardCount}) · ` : actionableCardCount === 1 ? "ctrl+r connect · " : "";
7933
+ const verb = actionableCardVerb ?? "connect";
7934
+ const connectHint = actionableCardCount > 1 ? `ctrl+r ${verb} (${actionableCardCount}) · ` : actionableCardCount === 1 ? `ctrl+r ${verb} · ` : "";
7934
7935
  switch (runKind) {
7935
7936
  case "idle":
7936
7937
  if (ctrlCArmed) return "press ctrl+c again to quit";
@@ -13980,7 +13981,7 @@ function ChatScreen({ agent, conversation, attachRunId, parentConversationId })
13980
13981
  if (!target || target.card.settled !== null || target.status === "done") setAskPrompt(null);
13981
13982
  }, [askPrompt, items]);
13982
13983
  const promptForCards = useCallback(() => {
13983
- const targets = itemsRef.current.filter(isActionableCard);
13984
+ const targets = prioritizeActionableCards(itemsRef.current.filter(isActionableCard));
13984
13985
  const [only] = targets;
13985
13986
  if (!only) return false;
13986
13987
  if (targets.length === 1) {
@@ -15330,13 +15331,15 @@ function ChatScreen({ agent, conversation, attachRunId, parentConversationId })
15330
15331
  latestComputerId,
15331
15332
  scrolledUp
15332
15333
  ]);
15333
- const actionableCards = useMemo(() => items.filter(isActionableCard), [items]);
15334
+ const actionableCards = useMemo(() => prioritizeActionableCards(items.filter(isActionableCard)), [items]);
15335
+ const cardVerb = useMemo(() => actionableCardVerb(actionableCards), [actionableCards]);
15334
15336
  const statusText = useMemo(() => formatChatFooterStatus({
15335
15337
  runKind: run.kind,
15336
15338
  ctrlCArmed,
15337
15339
  portalOpen,
15338
15340
  hasPendingSteer,
15339
15341
  actionableCardCount: actionableCards.length,
15342
+ actionableCardVerb: cardVerb,
15340
15343
  nonWebChannel: nonWebChannel !== null
15341
15344
  }), [
15342
15345
  run.kind,
@@ -15344,6 +15347,7 @@ function ChatScreen({ agent, conversation, attachRunId, parentConversationId })
15344
15347
  portalOpen,
15345
15348
  hasPendingSteer,
15346
15349
  actionableCards.length,
15350
+ cardVerb,
15347
15351
  nonWebChannel
15348
15352
  ]);
15349
15353
  const modelHint = formatModelHint(model, effort);
@@ -160,7 +160,7 @@ function errorMessage(err) {
160
160
  * the commit time of the built tree is one monotonic clock they share.
161
161
  */
162
162
  function portalDaemonBuild() {
163
- return "1787949761";
163
+ return "1788468217";
164
164
  }
165
165
  /**
166
166
  * Whether a client carrying `mine` should replace a running daemon carrying
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { t as PortalClient } from "./client-Bp64occP.mjs";
3
+ import "./api-BFQ4PQDA.mjs";
4
+
5
+ export { PortalClient };
@@ -223,8 +223,23 @@ var SandboxStream = class SandboxStream {
223
223
  }
224
224
  });
225
225
  let failure = null;
226
+ ws.on("unexpected-response", (_request, response) => {
227
+ const chunks = [];
228
+ let bytes = 0;
229
+ response.on("data", (chunk) => {
230
+ if (bytes >= MAX_HANDSHAKE_BODY_BYTES) return;
231
+ const remaining = MAX_HANDSHAKE_BODY_BYTES - bytes;
232
+ const kept = Buffer.from(chunk).subarray(0, remaining);
233
+ chunks.push(kept);
234
+ bytes += kept.length;
235
+ });
236
+ response.on("end", () => {
237
+ failure = formatHandshakeRejection(response.statusCode, response.statusMessage, Buffer.concat(chunks).toString("utf8"));
238
+ ws.terminate();
239
+ });
240
+ });
226
241
  ws.on("error", (err) => {
227
- failure = err.message;
242
+ failure ??= err.message;
228
243
  });
229
244
  ws.on("close", () => {
230
245
  this.closed = true;
@@ -265,6 +280,12 @@ var SandboxStream = class SandboxStream {
265
280
  return new SandboxStream(new WebSocket(url.toString(), { headers: { authorization: `Bearer ${opts.sessionToken}` } }), opts.onEvent);
266
281
  }
267
282
  };
283
+ const MAX_HANDSHAKE_BODY_BYTES = 512;
284
+ function formatHandshakeRejection(statusCode, statusMessage, body) {
285
+ const status = [statusCode, statusMessage].filter(Boolean).join(" ");
286
+ const reason = Array.from(body, (char) => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127 ? " " : char).join("").replace(/\s+/g, " ").trim();
287
+ return reason ? `${status}: ${reason}` : status || "WebSocket upgrade rejected";
288
+ }
268
289
  function toBuffer(data) {
269
290
  if (Buffer.isBuffer(data)) return data;
270
291
  if (Array.isArray(data)) return Buffer.concat(data);
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-B-5eaVyt.mjs";
2
+ import { i as isRecord, n as isNewerBuild, r as portalDaemonBuild, t as PortalClient } from "./client-Bp64occP.mjs";
3
3
  import { t as defaultTlsCertSource } from "./tls-cert-Rua2oV7n.mjs";
4
4
  import os from "node:os";
5
5
  import path from "node:path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./client-B-5eaVyt.mjs";
2
+ import "./client-Bp64occP.mjs";
3
3
  import "./tls-cert-Rua2oV7n.mjs";
4
4
  import "./api-BFQ4PQDA.mjs";
5
- import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-CLc3zjcv.mjs";
5
+ import { a as runPortalDaemon, c as stopDaemonForHandoff, i as queryDaemonStatus, n as ensureDaemonRunning, o as startPortalDaemon, r as isDaemonListening, s as stopDaemon, t as PortalDaemon } from "./daemon-DN-cac_x.mjs";
6
6
 
7
7
  export { runPortalDaemon };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-CLc3zjcv.mjs";
2
+ import { d as daemonPaths, f as encodeLine, l as LOCAL_PROTOCOL_VERSION, m as parseDaemonMessage, n as ensureDaemonRunning, p as makeLineParser } from "./daemon-DN-cac_x.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { connect } from "node:net";
5
5
 
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import "./client-Bp64occP.mjs";
3
+ import "./tls-cert-Rua2oV7n.mjs";
4
+ import "./api-BFQ4PQDA.mjs";
5
+ import "./daemon-DN-cac_x.mjs";
6
+ import { t as PortalDaemonClient } from "./daemon-client-BTNwBMjn.mjs";
7
+
8
+ export { PortalDaemonClient };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { c as version$1 } from "./rest-B2bynGwY.mjs";
3
- import { w as getConfigPath } from "./print-CPBx8690.mjs";
2
+ import { c as version$1 } from "./rest-CqBeYSq_.mjs";
3
+ import { E as getConfigPath } from "./print-DGmr1GRx.mjs";
4
4
  import os from "node:os";
5
5
  import path from "node:path";
6
6
  import { err, ok } from "neverthrow";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./rest-B2bynGwY.mjs";
3
- import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-CPBx8690.mjs";
2
+ import "./rest-CqBeYSq_.mjs";
3
+ import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-DGmr1GRx.mjs";
4
4
  import "./billing-blocked-D3l5kJlX.mjs";
5
5
 
6
6
  export { messageGet, readStdin, resolveAgent, runPrint };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-B2bynGwY.mjs";
2
+ import { a as errorMessage, i as sendErrorMessage, o as isRecord, t as createRestClient } from "./rest-CqBeYSq_.mjs";
3
3
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
4
4
  import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-D3l5kJlX.mjs";
5
5
  import path from "node:path";
@@ -691,6 +691,66 @@ function reconcileMaskedInput(previousValue, displayed) {
691
691
  while (kept < displayed.length && kept < previousValue.length && displayed[kept] === MASK_CHAR) kept++;
692
692
  return previousValue.slice(0, kept) + displayed.slice(kept);
693
693
  }
694
+ /**
695
+ * Whether a card is one an agent RUN is actively blocked on until the user
696
+ * decides here: a portal-share consent (`platform portal request`), a compute
697
+ * upgrade decision (`platform compute request`), or a connect/credential card
698
+ * the run is waiting to be fulfilled. The lone non-blocking actionable card is
699
+ * `answer_question` — a `platform ask` form, whose answer is a normal user
700
+ * message (the run keeps going regardless), so it must never shadow a decision
701
+ * the agent is stalled on.
702
+ */
703
+ function isBlockingCardAction(action) {
704
+ return action.kind !== "answer_question";
705
+ }
706
+ /**
707
+ * Narrow a set of actionable cards to the ones ctrl+r (and the card picker)
708
+ * should target, prioritizing blocking cards over `platform ask` forms. When
709
+ * both a blocking card and a stale `answer_question` are waiting, ctrl+r must
710
+ * approve the thing the agent is stalled on, not re-answer an earlier ask that
711
+ * never stops being actionable (the CLI only settles it via the AskPicker, so
712
+ * an ignored or composer-answered ask lingers forever). Falls through to the
713
+ * ask forms only when they are the only actionable cards left. Preserves input
714
+ * order within a tier, so a single card and genuine multi-card cases behave
715
+ * exactly as before.
716
+ */
717
+ function prioritizeActionableCards(cards) {
718
+ const blocking = cards.filter((c) => c.card.button !== null && isBlockingCardAction(c.card.button.action));
719
+ return blocking.length > 0 ? blocking : [...cards];
720
+ }
721
+ /**
722
+ * The footer verb for a single card action. Derived from the action's own
723
+ * `kind`, not from `isBlockingCardAction` (which answers a different question —
724
+ * "is the run stalled on this" — and is right for prioritization but wrong as a
725
+ * label: it would read a portal-share or compute-approval card as "connect").
726
+ * Each blocking kind gets the verb that matches what the chord actually does:
727
+ * an OAuth/credential card connects, a portal-share card grants, a compute
728
+ * request is decided, a `platform ask` form is answered.
729
+ */
730
+ function verbForAction(action) {
731
+ switch (action.kind) {
732
+ case "open_oauth":
733
+ case "open_external_oauth":
734
+ case "open_github_app":
735
+ case "submit_credential": return "connect";
736
+ case "grant_portal": return "grant";
737
+ case "decide_compute": return "decide";
738
+ case "answer_question": return "answer";
739
+ }
740
+ }
741
+ /**
742
+ * The footer verb for the actionable cards ctrl+r would target. Reflects the
743
+ * first card's actual action so a stale ask never mislabels the footer as
744
+ * "connect", and a portal/compute card reads as "grant"/"decide" rather than
745
+ * being lumped under "connect". Pass the ALREADY-prioritized set (see
746
+ * prioritizeActionableCards) so the label matches what ctrl+r acts on; null
747
+ * when nothing is waiting.
748
+ */
749
+ function actionableCardVerb(cards) {
750
+ const [first] = cards;
751
+ if (!first || first.card.button === null) return null;
752
+ return verbForAction(first.card.button.action);
753
+ }
694
754
 
695
755
  //#endregion
696
756
  //#region src/chat/connect-cards.ts
@@ -1017,4 +1077,4 @@ async function readStdin() {
1017
1077
  }
1018
1078
 
1019
1079
  //#endregion
1020
- export { getSavedTheme as A, resolveSession as B, deleteConfig as C, getPreference as D, getLastSeenVersion as E, recordDefaultAgent as F, setLastSeenVersion as G, saveConfig as H, resolveAppUrl as I, resolveChatAuth as L, getStoredApiKeyId as M, getStoredApiKeyWorkspaceName as N, getPromptHistoryPath as O, getUpdateCheckDisabled as P, resolveConfig as R, PREFERENCES as S, getDefaultAgent as T, saveSession as U, resolveWebUrl as V, saveTheme as W, API_KEYS_URL as _, runPrint as a, DEFAULT_API_URL as b, cardActionErrorMessage as c, reconcileMaskedInput as d, resolveConnectUrl as f, specKeyFor as g, parseConnectCard as h, resolveAgent as i, getShareMachineDefault as j, getReviewStateDir as k, parseExternalOauthConnectParams as l, computeSettledLabel as m, messageGet as n, toPrintError as o, composeQuestionAnswer as p, readStdin as r, MASK_CHAR as s, collectRunText as t, parseOauthConnectParams as u, API_KEY_FAMILY_PREFIX as v, getConfigPath as w, DEFAULT_APP_URL as x, API_KEY_PREFIX as y, resolveManagementAuth as z };
1080
+ export { getPromptHistoryPath as A, resolveConfig as B, DEFAULT_APP_URL as C, getDefaultAgent as D, getConfigPath as E, getStoredApiKeyWorkspaceName as F, saveSession as G, resolveSession as H, getUpdateCheckDisabled as I, saveTheme as K, recordDefaultAgent as L, getSavedTheme as M, getShareMachineDefault as N, getLastSeenVersion as O, getStoredApiKeyId as P, resolveAppUrl as R, DEFAULT_API_URL as S, deleteConfig as T, resolveWebUrl as U, resolveManagementAuth as V, saveConfig as W, parseConnectCard as _, runPrint as a, API_KEY_FAMILY_PREFIX as b, actionableCardVerb as c, parseOauthConnectParams as d, prioritizeActionableCards as f, computeSettledLabel as g, composeQuestionAnswer as h, resolveAgent as i, getReviewStateDir as j, getPreference as k, cardActionErrorMessage as l, resolveConnectUrl as m, messageGet as n, toPrintError as o, reconcileMaskedInput as p, setLastSeenVersion as q, readStdin as r, MASK_CHAR as s, collectRunText as t, parseExternalOauthConnectParams as u, specKeyFor as v, PREFERENCES as w, API_KEY_PREFIX as x, API_KEYS_URL as y, resolveChatAuth as z };
@@ -14,7 +14,7 @@ import { n as printError } from "./output-C9mb3sUB.mjs";
14
14
  * the reply (and to --json).
15
15
  */
16
16
  async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
17
- const { PortalClient } = await import("./client-DebOAhwd.mjs");
17
+ const { PortalClient } = await import("./client-CcLvFCl0.mjs");
18
18
  const { defaultTlsCertSource } = await import("./tls-cert-BpCaD5AT.mjs");
19
19
  let signalConnected;
20
20
  const connected = new Promise((resolve) => {
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./client-l6orYfqq.mjs";
3
+ import { t as runRawPtyPassthrough } from "./raw-pty-dndn1Kxc.mjs";
4
+
5
+ export { runRawPtyPassthrough };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as SandboxStream } from "./client-Btq6bMzX.mjs";
2
+ import { t as SandboxStream } from "./client-l6orYfqq.mjs";
3
3
 
4
4
  //#region src/chat/sandbox/raw-pty.ts
5
5
  /**
@@ -6,7 +6,7 @@ import { createParser } from "eventsource-parser";
6
6
 
7
7
  //#region package.json
8
8
  var name = "skydive-cli";
9
- var version = "0.6.0-beta.10";
9
+ var version = "0.6.0-beta.12";
10
10
 
11
11
  //#endregion
12
12
  //#region src/chat/util.ts
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-B2bynGwY.mjs";
2
+ import { i as sendErrorMessage, n as errorDetail, r as filenameFromContentDisposition, t as createRestClient } from "./rest-CqBeYSq_.mjs";
3
3
  import { t as HttpError } from "./http-error-BF2NZZE3.mjs";
4
4
  import "./billing-blocked-D3l5kJlX.mjs";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.6.0-beta.10",
3
+ "version": "0.6.0-beta.12",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -71,9 +71,9 @@
71
71
  },
72
72
  "//optionalDependencies": "The per-platform binary packages (skydive-cli-<os>-<arch>) are INTENTIONALLY not committed here. They are published by release-skydive-cli-binaries.yml and injected — pinned to the exact version being published — into the published launcher's optionalDependencies at release time (scripts/prepare-platform-packages.mjs --pin-version, run in release-skydive-cli.yml). Committing them would make `yarn install` try to resolve versions that only exist post-publish, breaking local dev and CI. npm installs of a published skydive-cli still get them (os/cpu-gated); the launcher (src/launcher.ts) resolves and execs the matching one. Local dev never needs them: it runs the JS bundle or `build:binary` directly.",
73
73
  "optionalDependencies": {
74
- "skydive-cli-darwin-arm64": "0.6.0-beta.10",
75
- "skydive-cli-darwin-x64": "0.6.0-beta.10",
76
- "skydive-cli-linux-x64": "0.6.0-beta.10",
77
- "skydive-cli-linux-arm64": "0.6.0-beta.10"
74
+ "skydive-cli-darwin-arm64": "0.6.0-beta.12",
75
+ "skydive-cli-darwin-x64": "0.6.0-beta.12",
76
+ "skydive-cli-linux-x64": "0.6.0-beta.12",
77
+ "skydive-cli-linux-arm64": "0.6.0-beta.12"
78
78
  }
79
79
  }
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as PortalClient } from "./client-B-5eaVyt.mjs";
3
- import "./api-BFQ4PQDA.mjs";
4
-
5
- export { PortalClient };
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-B-5eaVyt.mjs";
3
- import "./tls-cert-Rua2oV7n.mjs";
4
- import "./api-BFQ4PQDA.mjs";
5
- import "./daemon-CLc3zjcv.mjs";
6
- import { t as PortalDaemonClient } from "./daemon-client-DSIb7j28.mjs";
7
-
8
- export { PortalDaemonClient };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-Btq6bMzX.mjs";
3
- import { t as runRawPtyPassthrough } from "./raw-pty-D5PhKZSl.mjs";
4
-
5
- export { runRawPtyPassthrough };