skydive-cli 0.1.0-beta.73 → 0.1.0-beta.87

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
@@ -13,7 +13,7 @@ import fs from "node:fs";
13
13
  import zlib from "node:zlib";
14
14
 
15
15
  //#region package.json
16
- var version$1 = "0.1.0-beta.73";
16
+ var version$1 = "0.1.0-beta.87";
17
17
 
18
18
  //#endregion
19
19
  //#region src/types.ts
@@ -2046,7 +2046,7 @@ const chatCommand = {
2046
2046
  printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
2047
2047
  process.exit(1);
2048
2048
  }
2049
- const { runChat } = await import("./boot-VqbPkft1.mjs");
2049
+ const { runChat } = await import("./boot-DTUbLzPt.mjs");
2050
2050
  await runChat({
2051
2051
  appUrl,
2052
2052
  sessionToken: session.value.sessionToken,
@@ -2163,7 +2163,7 @@ const switchCommand = {
2163
2163
  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.");
2164
2164
  process.exit(1);
2165
2165
  }
2166
- const { runWorkspacePicker } = await import("./boot-VqbPkft1.mjs");
2166
+ const { runWorkspacePicker } = await import("./boot-DTUbLzPt.mjs");
2167
2167
  await runWorkspacePicker(session);
2168
2168
  return;
2169
2169
  }
@@ -3728,6 +3728,27 @@ function safeUrl(url) {
3728
3728
  return null;
3729
3729
  }
3730
3730
  }
3731
+ /**
3732
+ * Resolve a connect URL to an absolute one the OS can open in a browser.
3733
+ *
3734
+ * The server builds lazy connect links as server-relative paths (e.g.
3735
+ * `/api/v1/oauth/start/slack?connect_session_token=...`). The web client
3736
+ * resolves these against its own origin implicitly; the TUI runs outside a
3737
+ * browser, so `open()` on a scheme-less path is a silent no-op — the browser
3738
+ * never launches and the connect card sits in `launched` forever (the Slack
3739
+ * channel-connect deadlock). Resolve against `appUrl` first, mirroring the
3740
+ * `open_github_app` / `fulfillCredential` branches, so both the browser we
3741
+ * launch and the URL shown on the card are absolute. An already-absolute URL
3742
+ * passes through unchanged; if `appUrl` is missing we return the input as-is.
3743
+ */
3744
+ function resolveConnectUrl(url, appUrl) {
3745
+ if (!appUrl) return url;
3746
+ try {
3747
+ return new URL(url, appUrl).toString();
3748
+ } catch (_error) {
3749
+ return url;
3750
+ }
3751
+ }
3731
3752
  function parseOauthConnectParams(url) {
3732
3753
  const parsed = safeUrl(url);
3733
3754
  if (!parsed) return null;
@@ -5202,27 +5223,29 @@ function ChatScreen({ agent, conversation }) {
5202
5223
  const params = parseOauthConnectParams(action.url);
5203
5224
  if (!params) throw new Error("this connect link is missing required parameters");
5204
5225
  const { connectLink } = await rest.oauthConnect(params);
5205
- await openUrlInBrowser(connectLink);
5226
+ const oauthUrl = resolveConnectUrl(connectLink, appUrl);
5227
+ await openUrlInBrowser(oauthUrl);
5206
5228
  updateCard(item.id, {
5207
5229
  status: "launched",
5208
- detail: connectLink
5230
+ detail: oauthUrl
5209
5231
  });
5210
5232
  } else if (action.kind === "open_external_oauth") {
5211
5233
  const params = parseExternalOauthConnectParams(action.url);
5212
5234
  if (!params) throw new Error("this connect link is missing required parameters");
5213
5235
  const { authorizationUrl } = await rest.externalOauthConnect(params);
5214
5236
  if (authorizationUrl) {
5215
- await openUrlInBrowser(authorizationUrl);
5237
+ const externalUrl = resolveConnectUrl(authorizationUrl, appUrl);
5238
+ await openUrlInBrowser(externalUrl);
5216
5239
  updateCard(item.id, {
5217
5240
  status: "launched",
5218
- detail: authorizationUrl
5241
+ detail: externalUrl
5219
5242
  });
5220
5243
  } else updateCard(item.id, {
5221
5244
  status: "done",
5222
5245
  detail: "already connected"
5223
5246
  });
5224
5247
  } else if (action.kind === "open_github_app") {
5225
- const url = appUrl ? new URL(action.url, appUrl).toString() : action.url;
5248
+ const url = resolveConnectUrl(action.url, appUrl);
5226
5249
  await openUrlInBrowser(url);
5227
5250
  updateCard(item.id, {
5228
5251
  status: "launched",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.1.0-beta.73",
3
+ "version": "0.1.0-beta.87",
4
4
  "description": "Skydive CLI — manage AI agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "react": "^19.0.0",
38
38
  "react-devtools-core": "^7.0.1",
39
39
  "web-tree-sitter": "0.25.10",
40
- "ws": "^8.18.0",
40
+ "ws": "^8.21.0",
41
41
  "yargs": "^17.7.2",
42
42
  "zod": "^3.24.1",
43
43
  "zustand": "^5.0.2"