skydive-cli 0.2.0-beta.595 → 0.2.0-beta.600

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as HttpError } from "./rest-BMh7CURU.mjs";
2
+ import { t as HttpError } from "./rest-vu2-Lrsa.mjs";
3
3
  import os from "node:os";
4
4
  import { z } from "zod";
5
5
 
package/dist/js/bin.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { A as getPromptHistoryPath, B as resolveSession, C as API_KEY_PREFIX, D as deleteConfig, E as DEFAULT_WEB_URL, F as getStoredApiKeyWorkspaceName, G as setLastSeenVersion, H as saveConfig, I as getUpdateCheckDisabled, L as resolveAppUrl, N as getShareMachineDefault, O as getConfigPath, P as getStoredApiKeyId, R as resolveConfig, S as API_KEY_FAMILY_PREFIX, U as saveSession, _ as getActiveWorkspaceId, b as setActiveWorkspace, g as ensureActiveOrganization, k as getLastSeenVersion, m as themes, r as brandHelpArt, v as getSessionIdentity, w as DEFAULT_API_URL, x as API_KEYS_URL, y as listWorkspaces, z as resolveManagementAuth } from "./brand-BVALAEf1.mjs";
3
3
  import { n as printError, r as printTable, t as output } from "./output-B4cW10Ph.mjs";
4
- import { n as createRestClient } from "./rest-BMh7CURU.mjs";
5
- import { i as resolveAgent } from "./print-SAL2aiGh.mjs";
6
- import { a as registerPortalDevice, c as machineIdentity, n as findThisDevice, o as revokePortalAccess, r as grantPortalAccess, t as fetchPortalDevices } from "./api-CQXTPT-p.mjs";
7
- import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
4
+ import { n as createRestClient } from "./rest-vu2-Lrsa.mjs";
5
+ import { i as resolveAgent } from "./print-DLGCpIM9.mjs";
6
+ import { a as registerPortalDevice, c as machineIdentity, n as findThisDevice, o as revokePortalAccess, r as grantPortalAccess, t as fetchPortalDevices } from "./api-Bx5VyWaC.mjs";
7
+ import { t as SandboxStream } from "./client-BVOAwU8M.mjs";
8
8
  import { hideBin } from "yargs/helpers";
9
9
  import yargs from "yargs";
10
10
  import { hostname } from "node:os";
@@ -20,7 +20,7 @@ import semver from "semver";
20
20
 
21
21
  //#region package.json
22
22
  var name = "skydive-cli";
23
- var version = "0.2.0-beta.595";
23
+ var version = "0.2.0-beta.600";
24
24
 
25
25
  //#endregion
26
26
  //#region src/types.ts
@@ -1200,7 +1200,7 @@ const importCommand = {
1200
1200
  process.exit(1);
1201
1201
  }
1202
1202
  }
1203
- const { runChat } = await import("./boot-BY_wmF2R.mjs");
1203
+ const { runChat } = await import("./boot-Dj_fZZA_.mjs");
1204
1204
  await runChat({
1205
1205
  appUrl,
1206
1206
  sessionToken: session.value.sessionToken,
@@ -1226,7 +1226,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1226
1226
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
1227
1227
  process.exit(1);
1228
1228
  }
1229
- const { connectMachineShare } = await import("./print-share-CzS5Y6De.mjs");
1229
+ const { connectMachineShare } = await import("./print-share-DPsQq2Cy.mjs");
1230
1230
  const machineShare = await connectMachineShare({
1231
1231
  appUrl,
1232
1232
  sessionToken: session.value.sessionToken,
@@ -1234,7 +1234,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1234
1234
  });
1235
1235
  const extra = (argv.print ?? "").trim();
1236
1236
  const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1237
- const { runPrint } = await import("./print-D0SpmKCV.mjs");
1237
+ const { runPrint } = await import("./print-QPPaRx38.mjs");
1238
1238
  try {
1239
1239
  const result = await runPrint({
1240
1240
  appUrl,
@@ -1511,7 +1511,7 @@ const chatCommand = {
1511
1511
  printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
1512
1512
  process.exit(1);
1513
1513
  }
1514
- const { runChat } = await import("./boot-BY_wmF2R.mjs");
1514
+ const { runChat } = await import("./boot-Dj_fZZA_.mjs");
1515
1515
  await runChat({
1516
1516
  appUrl,
1517
1517
  sessionToken: session.value.sessionToken,
@@ -1539,7 +1539,7 @@ async function runPrintMode({ argv, appUrl }) {
1539
1539
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
1540
1540
  process.exit(1);
1541
1541
  }
1542
- const { runPrint, readStdin } = await import("./print-D0SpmKCV.mjs");
1542
+ const { runPrint, readStdin } = await import("./print-QPPaRx38.mjs");
1543
1543
  let prompt = (argv.print ?? "").trim();
1544
1544
  if (!prompt) {
1545
1545
  if (process.stdin.isTTY) {
@@ -1554,7 +1554,7 @@ async function runPrintMode({ argv, appUrl }) {
1554
1554
  }
1555
1555
  let machineShare = null;
1556
1556
  if (resolveShareMachine(argv)) {
1557
- const { connectMachineShare } = await import("./print-share-CzS5Y6De.mjs");
1557
+ const { connectMachineShare } = await import("./print-share-DPsQq2Cy.mjs");
1558
1558
  machineShare = await connectMachineShare({
1559
1559
  appUrl,
1560
1560
  sessionToken: session.value.sessionToken,
@@ -1613,7 +1613,7 @@ const getCommand = {
1613
1613
  printError(`${session.error.message} Run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
1614
1614
  process.exit(1);
1615
1615
  }
1616
- const { messageGet } = await import("./print-D0SpmKCV.mjs");
1616
+ const { messageGet } = await import("./print-QPPaRx38.mjs");
1617
1617
  try {
1618
1618
  const result = await messageGet({
1619
1619
  appUrl,
@@ -1810,7 +1810,7 @@ const switchCommand = {
1810
1810
  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.");
1811
1811
  process.exit(1);
1812
1812
  }
1813
- const { runWorkspacePicker } = await import("./boot-BY_wmF2R.mjs");
1813
+ const { runWorkspacePicker } = await import("./boot-Dj_fZZA_.mjs");
1814
1814
  await runWorkspacePicker(session);
1815
1815
  return;
1816
1816
  }
@@ -1888,7 +1888,7 @@ const openCommand = {
1888
1888
  const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
1889
1889
  const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
1890
1890
  const { machineName } = machineIdentity();
1891
- const { PortalClient } = await import("./client-C9p4ta7J.mjs");
1891
+ const { PortalClient } = await import("./client-BYYp0E6M.mjs");
1892
1892
  let lastLine = "";
1893
1893
  let signalConnected;
1894
1894
  const connected = new Promise((resolve) => {
@@ -2060,8 +2060,8 @@ const sandboxCommand = {
2060
2060
  }).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`"),
2061
2061
  handler: async (argv) => {
2062
2062
  const session = requireSession(argv);
2063
- const { createRestClient } = await import("./rest-DPta4XUe.mjs");
2064
- const { resolveAgent } = await import("./print-D0SpmKCV.mjs");
2063
+ const { createRestClient } = await import("./rest-nx0AmgJy.mjs");
2064
+ const { resolveAgent } = await import("./print-QPPaRx38.mjs");
2065
2065
  const client = createRestClient({
2066
2066
  appUrl: session.appUrl,
2067
2067
  sessionToken: session.sessionToken
@@ -2130,7 +2130,7 @@ async function runPty({ session, agentId, agentName }) {
2130
2130
  return 1;
2131
2131
  }
2132
2132
  console.error(`Connecting to ${agentName}'s sandbox… (Ctrl-] detaches)`);
2133
- const { runRawPtyPassthrough } = await import("./raw-pty-2_VA1kw_.mjs");
2133
+ const { runRawPtyPassthrough } = await import("./raw-pty-pspO57gT.mjs");
2134
2134
  const result = await runRawPtyPassthrough({
2135
2135
  stdin: process.stdin,
2136
2136
  stdout: process.stdout,
@@ -1,12 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { M as getSavedTheme, O as getConfigPath, T as DEFAULT_APP_URL, V as resolveWebUrl, W as saveTheme, _ as getActiveWorkspaceId, a as applyTheme, b as setActiveWorkspace, c as noColorRequested, d as themeMode, f as themeModeFromColorFgBg, h as themesForMode, i as DEFAULT_THEME_ID, j as getReviewStateDir, l as theme, n as WORDMARK, o as findTheme, p as themeVersion, s as monoTheme, t as MARK_CELLS, u as themeForMode, w as DEFAULT_API_URL, y as listWorkspaces } from "./brand-BVALAEf1.mjs";
3
- import { n as createRestClient, r as errorDetail, t as HttpError } from "./rest-BMh7CURU.mjs";
4
- import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
5
- import { 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 } from "./print-SAL2aiGh.mjs";
6
- import "./api-CQXTPT-p.mjs";
7
- import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
8
- import { t as PortalClient } from "./client-BwMzD7Iw.mjs";
9
- import { t as runRawPtyPassthrough } from "./raw-pty-GAvxm2ol.mjs";
3
+ import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, r as errorDetail, t as HttpError } from "./rest-vu2-Lrsa.mjs";
4
+ import { 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 } from "./print-DLGCpIM9.mjs";
5
+ import "./api-Bx5VyWaC.mjs";
6
+ import { t as SandboxStream } from "./client-BVOAwU8M.mjs";
7
+ import { t as PortalClient } from "./client-BsLCAWf1.mjs";
8
+ import { t as runRawPtyPassthrough } from "./raw-pty-Dbi2kb9v.mjs";
10
9
  import * as os$1 from "node:os";
11
10
  import { homedir, platform, release, tmpdir } from "node:os";
12
11
  import path, { basename, extname, isAbsolute, join, win32 } from "node:path";
@@ -8900,7 +8899,7 @@ function ChatScreen({ agent, conversation }) {
8900
8899
  setItems((prev) => [...prev.filter((m) => m.id !== optimisticId), {
8901
8900
  kind: "error",
8902
8901
  id: crypto.randomUUID(),
8903
- text: errorDetail(err)
8902
+ text: sendErrorMessage(err)
8904
8903
  }]);
8905
8904
  if (echo) setInput((existing) => existing ? existing : trimmed);
8906
8905
  const restore = staged.filter((a) => uploadsRef.current.has(a.tempId));
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import "./rest-vu2-Lrsa.mjs";
3
+ import "./api-Bx5VyWaC.mjs";
4
+ import { t as PortalClient } from "./client-BsLCAWf1.mjs";
5
+
6
+ export { PortalClient };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as errorMessage } from "./util-CeisaZVY.mjs";
3
- import { c as machineIdentity, i as mintPortalDeviceToken, l as portalWsUrl, n as findThisDevice, r as grantPortalAccess, s as buildEnv, t as fetchPortalDevices } from "./api-CQXTPT-p.mjs";
2
+ import { a as errorMessage } from "./rest-vu2-Lrsa.mjs";
3
+ import { c as machineIdentity, i as mintPortalDeviceToken, l as portalWsUrl, n as findThisDevice, r as grantPortalAccess, s as buildEnv, t as fetchPortalDevices } from "./api-Bx5VyWaC.mjs";
4
4
  import { z } from "zod";
5
5
  import { spawn } from "node:child_process";
6
6
  import { WebSocket } from "ws";
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as createRestClient, t as HttpError } from "./rest-BMh7CURU.mjs";
3
- import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
2
+ import { a as errorMessage, i as sendErrorMessage, n as createRestClient, o as isRecord, t as HttpError } from "./rest-vu2-Lrsa.mjs";
4
3
  import stableStringify from "safe-stable-stringify";
5
4
 
6
5
  //#region src/chat/tui/chat/card.ts
@@ -355,17 +354,24 @@ async function runPrint({ appUrl, sessionToken, prompt, agentSelector, conversat
355
354
  };
356
355
  }
357
356
  /**
358
- * Turn a transport failure into an actionable CLI error. A Cloudflare edge
359
- * 5xx (502/504) on a long run otherwise leaks a raw HTML/JSON error page to
360
- * stdout, which is impossible to act on. When a messageId is known and
361
- * recoverable we point the user at `skydive messages get <messageId>` rather
362
- * than a blind retry (a retry re-executes an agent that may have write access).
357
+ * Turn a transport failure into an actionable CLI error. Two failure classes
358
+ * reach here, both of which otherwise leak a raw HTML/JSON error page to stdout:
359
+ *
360
+ * - A Cloudflare edge 5xx (502/504) on a long run. When a messageId is known
361
+ * and recoverable we point the user at `skydive messages get <messageId>`
362
+ * rather than a blind retry (a retry re-executes an agent that may have
363
+ * write access).
364
+ * - A 4xx from the send/stream endpoints (a validation 400 whose body is a raw
365
+ * Zod issues array, a billing/permission block, an expired session). These
366
+ * go through {@link sendErrorMessage} so the `-p` path prints the same plain,
367
+ * actionable copy the interactive TUI shows instead of an obtuse blob.
363
368
  */
364
369
  function toPrintError(err, messageId) {
365
370
  if (err instanceof HttpError && err.status >= 500) {
366
371
  const recovery = messageId ? ` The run may still be completing server-side. Do NOT blindly retry (it would re-run the agent). Fetch the result with: skydive messages get ${messageId}` : "";
367
372
  return /* @__PURE__ */ new Error(`The request to Skydive timed out at the edge (HTTP ${err.status}).${recovery}`);
368
373
  }
374
+ if (err instanceof HttpError) return new Error(sendErrorMessage(err));
369
375
  return err instanceof Error ? err : new Error(String(err));
370
376
  }
371
377
  /**
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./rest-BMh7CURU.mjs";
3
- import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-SAL2aiGh.mjs";
2
+ import "./rest-vu2-Lrsa.mjs";
3
+ import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-DLGCpIM9.mjs";
4
4
 
5
5
  export { messageGet, readStdin, resolveAgent, runPrint };
@@ -14,7 +14,7 @@ import { n as printError } from "./output-B4cW10Ph.mjs";
14
14
  * the reply (and to --json).
15
15
  */
16
16
  async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
17
- const { PortalClient } = await import("./client-C9p4ta7J.mjs");
17
+ const { PortalClient } = await import("./client-BYYp0E6M.mjs");
18
18
  let signalConnected;
19
19
  const connected = new Promise((resolve) => {
20
20
  signalConnected = resolve;
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
2
+ import { t as SandboxStream } from "./client-BVOAwU8M.mjs";
3
3
 
4
4
  //#region src/chat/sandbox/raw-pty.ts
5
5
  /**
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./client-BVOAwU8M.mjs";
3
+ import { t as runRawPtyPassthrough } from "./raw-pty-Dbi2kb9v.mjs";
4
+
5
+ export { runRawPtyPassthrough };
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-vu2-Lrsa.mjs";
3
+
4
+ export { createRestClient };
@@ -2,6 +2,19 @@
2
2
  import { z } from "zod";
3
3
  import { createParser } from "eventsource-parser";
4
4
 
5
+ //#region src/chat/util.ts
6
+ /** Narrowing helper for the many `unknown` payloads the chat stream and
7
+ * tool inputs/outputs carry. A type predicate (not an `as` cast), so call
8
+ * sites can read properties without asserting. */
9
+ function isRecord(value) {
10
+ return typeof value === "object" && value !== null && !Array.isArray(value);
11
+ }
12
+ /** Best-effort message from an unknown thrown value. */
13
+ function errorMessage(err) {
14
+ return err instanceof Error ? err.message : String(err);
15
+ }
16
+
17
+ //#endregion
5
18
  //#region src/chat/api/rest.ts
6
19
  var HttpError = class extends Error {
7
20
  constructor(status, body) {
@@ -25,6 +38,69 @@ function errorDetail(err) {
25
38
  }
26
39
  return err instanceof Error ? err.message : String(err);
27
40
  }
41
+ /**
42
+ * The server's human-readable line out of an error response body, or null when
43
+ * the body carries none. Two shapes reach the CLI on a failed send:
44
+ *
45
+ * - `{ error: string }` — the chat route's own errors (a ChatClientError like
46
+ * "agent not found" / "attachment not found: <id>", the 429 "Too many
47
+ * requests", the generic "send failed"). Returned verbatim; these are
48
+ * written to be shown.
49
+ * - `{ success: false, error: { issues: [{ message }, …] } }` — a Zod request
50
+ * validation failure from `zValidator` (e.g. the message-too-long copy).
51
+ * Without this the CLI printed the whole issues array as a raw JSON blob,
52
+ * which is the "obtuse 400 with no recourse" a user sees. We lift the first
53
+ * issue's message, which the schema authors wrote for humans.
54
+ *
55
+ * Anything else (a Cloudflare/ALB HTML error page, an empty body) yields null
56
+ * so the caller can fall back to a status-based line.
57
+ */
58
+ function serverErrorMessage(body) {
59
+ let parsed;
60
+ try {
61
+ parsed = JSON.parse(body);
62
+ } catch (_error) {
63
+ return null;
64
+ }
65
+ if (!isRecord(parsed)) return null;
66
+ if (typeof parsed.error === "string" && parsed.error.length > 0) return parsed.error;
67
+ if (isRecord(parsed.error) && Array.isArray(parsed.error.issues)) {
68
+ const first = parsed.error.issues.find((issue) => isRecord(issue) && typeof issue.message === "string" && !!issue.message);
69
+ if (first) return first.message;
70
+ }
71
+ return null;
72
+ }
73
+ /**
74
+ * A short, actionable line for a failed chat send, for both the interactive
75
+ * TUI error row and the headless `-p` path. The raw transport error is an
76
+ * `HTTP 400: {"success":false,"error":{"issues":[…]}}` blob that a user can do
77
+ * nothing with; this maps every send failure the server can produce to plain
78
+ * language and, where possible, a next step.
79
+ *
80
+ * Precedence: a message the SERVER wrote for humans always wins (validation
81
+ * copy, "agent not found", a billing/permission reason) — we only synthesize a
82
+ * line from the HTTP status when the body carried nothing usable. This keeps
83
+ * new server-side error copy flowing through without a CLI change, while never
84
+ * leaving the user staring at a bare status code.
85
+ */
86
+ function sendErrorMessage(err) {
87
+ if (!(err instanceof HttpError)) return `Couldn't reach Skydive (${err instanceof Error ? err.message : String(err)}). Check your connection and try again.`;
88
+ const fromServer = serverErrorMessage(err.body);
89
+ switch (err.status) {
90
+ case 401: return "Your session has expired. Run `skydive auth login --web`, then send again.";
91
+ case 403: return fromServer ?? "You don't have permission to send to this agent in the current workspace.";
92
+ case 404: return fromServer ?? "This conversation or agent no longer exists.";
93
+ case 413: return fromServer ?? "That message is too large to send. Attach it as a file instead of pasting it inline.";
94
+ case 429: return "You're sending messages too quickly. Wait a moment and try again.";
95
+ default: break;
96
+ }
97
+ if (err.status >= 500) return `Skydive had a problem sending that (HTTP ${err.status}). Wait a moment and try again.`;
98
+ if (err.status === 400) {
99
+ if (fromServer && fromServer !== "send failed") return fromServer;
100
+ return "Skydive couldn't send that message. Try again in a moment.";
101
+ }
102
+ return fromServer ?? `Send failed (HTTP ${err.status}).`;
103
+ }
28
104
  const MAX_STREAM_RECONNECTS = 5;
29
105
  function createRestClient({ appUrl, sessionToken }) {
30
106
  const baseHeaders = {
@@ -487,4 +563,4 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
487
563
  ]);
488
564
 
489
565
  //#endregion
490
- export { createRestClient as n, errorDetail as r, HttpError as t };
566
+ export { errorMessage as a, sendErrorMessage as i, createRestClient as n, isRecord as o, errorDetail as r, HttpError as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.2.0-beta.595",
3
+ "version": "0.2.0-beta.600",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -25,6 +25,7 @@
25
25
  "test:ci": "vitest run --coverage --coverage.reporter=lcovonly --reporter=default --reporter=github-actions --minWorkers=1 --maxWorkers=2 --passWithNoTests && yarn test:tui",
26
26
  "test:tui": "bun test .tui.test",
27
27
  "render:frames": "bun scripts/render-frames.tsx",
28
+ "render:send-errors": "bun scripts/render-send-errors.tsx",
28
29
  "typecheck": "tsgo --noEmit"
29
30
  },
30
31
  "dependencies": {
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rest-BMh7CURU.mjs";
3
- import "./api-CQXTPT-p.mjs";
4
- import { t as PortalClient } from "./client-BwMzD7Iw.mjs";
5
-
6
- export { PortalClient };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-CpEvH2Pq.mjs";
3
- import { t as runRawPtyPassthrough } from "./raw-pty-GAvxm2ol.mjs";
4
-
5
- export { runRawPtyPassthrough };
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { n as createRestClient, r as errorDetail, t as HttpError } from "./rest-BMh7CURU.mjs";
3
-
4
- export { createRestClient };
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- //#region src/chat/util.ts
3
- /** Narrowing helper for the many `unknown` payloads the chat stream and
4
- * tool inputs/outputs carry. A type predicate (not an `as` cast), so call
5
- * sites can read properties without asserting. */
6
- function isRecord(value) {
7
- return typeof value === "object" && value !== null && !Array.isArray(value);
8
- }
9
- /** Best-effort message from an unknown thrown value. */
10
- function errorMessage(err) {
11
- return err instanceof Error ? err.message : String(err);
12
- }
13
-
14
- //#endregion
15
- export { isRecord as n, errorMessage as t };