skydive-cli 0.5.0-beta.12 → 0.5.0-beta.13

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-CZIaF_t9.mjs";
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-ClPkgR9z.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-0_q2DHpq.mjs";
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
- import { t as createRestClient } from "./rest-I3imNduB.mjs";
6
+ import { t as createRestClient } from "./rest-CLrHVkxh.mjs";
7
7
  import "./billing-blocked-2wju4gC_.mjs";
8
8
  import { r as resolveMachineIdentity } from "./client-DabRpc_T.mjs";
9
- import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-DLY2NmVU.mjs";
9
+ import { i as queryDaemonStatus, l as PORTAL_DAEMON_FLAG, n as ensureDaemonRunning, s as stopDaemon, u as daemonPaths } from "./daemon-ShOaDbZe.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-DNe3CikP.mjs");
1520
+ const { runChat } = await import("./boot-C4OHQUCg.mjs");
1521
1521
  await runChat({
1522
1522
  appUrl,
1523
1523
  sessionToken: session.value.sessionToken,
@@ -1553,7 +1553,7 @@ async function runImportPrintMode({ argv, appUrl }) {
1553
1553
  });
1554
1554
  const extra = (argv.print ?? "").trim();
1555
1555
  const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
1556
- const { runPrint } = await import("./print-Bo06tvfV.mjs");
1556
+ const { runPrint } = await import("./print-DTx2HyDY.mjs");
1557
1557
  try {
1558
1558
  const result = await runPrint({
1559
1559
  appUrl,
@@ -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-DNe3CikP.mjs");
1933
+ const { runChat } = await import("./boot-C4OHQUCg.mjs");
1934
1934
  await runChat({
1935
1935
  appUrl: auth.value.appUrl,
1936
1936
  sessionToken: auth.value.token,
@@ -1998,7 +1998,7 @@ async function runPrintMode({ argv, appUrl }) {
1998
1998
  printError(`${auth.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
1999
1999
  process.exit(1);
2000
2000
  }
2001
- const { runPrint, readStdin } = await import("./print-Bo06tvfV.mjs");
2001
+ const { runPrint, readStdin } = await import("./print-DTx2HyDY.mjs");
2002
2002
  await ensureAgentWorkspace({
2003
2003
  appUrl,
2004
2004
  sessionToken: auth.value.token,
@@ -2087,7 +2087,7 @@ const getCommand$1 = {
2087
2087
  printError(`${auth.error.message} Run \`skydive auth login\` first, or set SKYDIVE_API_KEY / SKYDIVE_SESSION_TOKEN.`);
2088
2088
  process.exit(1);
2089
2089
  }
2090
- const { messageGet } = await import("./print-Bo06tvfV.mjs");
2090
+ const { messageGet } = await import("./print-DTx2HyDY.mjs");
2091
2091
  try {
2092
2092
  const result = await messageGet({
2093
2093
  appUrl: auth.value.appUrl,
@@ -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-DNe3CikP.mjs");
2293
+ const { runWorkspacePicker } = await import("./boot-C4OHQUCg.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();
2372
- const { PortalDaemonClient } = await import("./daemon-client-DnhKkk1Y.mjs");
2372
+ const { PortalDaemonClient } = await import("./daemon-client-D_MeDMpn.mjs");
2373
2373
  let lastLine = "";
2374
2374
  let signalConnected;
2375
2375
  const connected = new Promise((resolve) => {
@@ -2679,8 +2679,8 @@ const sandboxCommand = {
2679
2679
  }).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`"),
2680
2680
  handler: async (argv) => {
2681
2681
  const session = requireSession(argv);
2682
- const { createRestClient } = await import("./rest-D29qNkto.mjs");
2683
- const { resolveAgent } = await import("./print-Bo06tvfV.mjs");
2682
+ const { createRestClient } = await import("./rest-DsdPAE8K.mjs");
2683
+ const { resolveAgent } = await import("./print-DTx2HyDY.mjs");
2684
2684
  const client = createRestClient({
2685
2685
  appUrl: session.appUrl,
2686
2686
  sessionToken: session.sessionToken
@@ -2837,8 +2837,8 @@ const fsEditCommand = {
2837
2837
  handler: async (argv) => {
2838
2838
  const session = requireSession(argv);
2839
2839
  const remotePath = argv.path;
2840
- const { createRestClient } = await import("./rest-D29qNkto.mjs");
2841
- const { resolveAgent } = await import("./print-Bo06tvfV.mjs");
2840
+ const { createRestClient } = await import("./rest-DsdPAE8K.mjs");
2841
+ const { resolveAgent } = await import("./print-DTx2HyDY.mjs");
2842
2842
  const client = createRestClient({
2843
2843
  appUrl: session.appUrl,
2844
2844
  sessionToken: session.sessionToken
@@ -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-BuAxg1_H.mjs");
4218
+ const { runPortalDaemon } = await import("./daemon-BfqJZ_M4.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-CZIaF_t9.mjs";
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-ClPkgR9z.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-0_q2DHpq.mjs";
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
- import { a as isRecord, i as errorMessage, n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
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-DabRpc_T.mjs";
8
- import "./daemon-DLY2NmVU.mjs";
8
+ import "./daemon-ShOaDbZe.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-CG6KWbdI.mjs";
11
+ import { t as PortalDaemonClient } from "./daemon-client-BVAlyN7x.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";
@@ -2841,15 +2841,20 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
2841
2841
  children: [marker, truncate("+ new conversation", rowWidth)]
2842
2842
  }, "new");
2843
2843
  const archived = isArchived(row.hit.item);
2844
+ const unread = row.hit.item.unread === true;
2844
2845
  const { title, detail, tag } = fitRowText(singleLine(row.hit.item.title ?? "(untitled)"), `${archived ? "archived · " : ""}${previewLine(row.hit.item)}`, rowWidth, coAgentsTag(row.hit.item, agent.id));
2846
+ const titleText = /* @__PURE__ */ jsx(FuzzyText, {
2847
+ text: title,
2848
+ indexes: row.hit.item.title ? row.hit.highlights[0] : null
2849
+ });
2845
2850
  return /* @__PURE__ */ jsxs("text", {
2846
2851
  fg: archived && !selected ? theme.dim : fg,
2847
2852
  children: [
2848
- marker,
2849
- /* @__PURE__ */ jsx(FuzzyText, {
2850
- text: title,
2851
- indexes: row.hit.item.title ? row.hit.highlights[0] : null
2852
- }),
2853
+ !selected && unread ? /* @__PURE__ */ jsx("span", {
2854
+ fg: theme.accent,
2855
+ children: "● "
2856
+ }) : marker,
2857
+ unread ? /* @__PURE__ */ jsx("b", { children: titleText }) : titleText,
2853
2858
  tag ? /* @__PURE__ */ jsxs("span", {
2854
2859
  fg: theme.muted,
2855
2860
  children: [" ", tag]
@@ -10738,6 +10743,8 @@ function ChatScreen({ agent, conversation }) {
10738
10743
  const menuHighlightClamped = Math.min(menuHighlight, Math.max(0, menuCommands.length - 1));
10739
10744
  const runRef = useRef(run);
10740
10745
  runRef.current = run;
10746
+ const conversationIdRef = useRef(conversationId);
10747
+ conversationIdRef.current = conversationId;
10741
10748
  const itemsRef = useRef(items);
10742
10749
  itemsRef.current = items;
10743
10750
  const attachmentsRef = useRef(attachments);
@@ -10907,6 +10914,15 @@ function ChatScreen({ agent, conversation }) {
10907
10914
  initialConversationId,
10908
10915
  agentHost
10909
10916
  ]);
10917
+ const markRead = useCallback(() => {
10918
+ const id = conversationIdRef.current;
10919
+ if (!rest || !id) return;
10920
+ rest.markConversationRead({ conversationId: id }).catch(() => {});
10921
+ }, [rest]);
10922
+ useEffect(() => {
10923
+ if (!conversationId) return;
10924
+ markRead();
10925
+ }, [conversationId, markRead]);
10910
10926
  const attachToRun = useCallback((runId, runAgentName, runStartedAtMs) => {
10911
10927
  if (!rest) return;
10912
10928
  seenRunsRef.current.add(runId);
@@ -10959,6 +10975,7 @@ function ChatScreen({ agent, conversation }) {
10959
10975
  attachments: m.attachments
10960
10976
  } : m));
10961
10977
  setRun({ kind: "idle" });
10978
+ markRead();
10962
10979
  agentHost.transition({
10963
10980
  state: "idle",
10964
10981
  notification: {
@@ -10980,7 +10997,8 @@ function ChatScreen({ agent, conversation }) {
10980
10997
  }, [
10981
10998
  rest,
10982
10999
  agent.name,
10983
- agentHost
11000
+ agentHost,
11001
+ markRead
10984
11002
  ]);
10985
11003
  const multiAgent = useMemo(() => conversationAgentNames(items, agent.name), [items, agent.name]).size > 1;
10986
11004
  const transcriptWindow = useMemo(() => windowItems(items), [items]);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./client-DabRpc_T.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-DLY2NmVU.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-ShOaDbZe.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 "1786600530";
23
+ return "1786601366";
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-DLY2NmVU.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-ShOaDbZe.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-DabRpc_T.mjs";
3
+ import "./daemon-ShOaDbZe.mjs";
4
+ import "./api-DG5W6iwx.mjs";
5
+ import { t as PortalDaemonClient } from "./daemon-client-BVAlyN7x.mjs";
6
+
7
+ export { PortalDaemonClient };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-ClPkgR9z.mjs";
3
- import "./rest-I3imNduB.mjs";
2
+ import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-riiY5Gly.mjs";
3
+ import "./rest-CLrHVkxh.mjs";
4
4
  import "./billing-blocked-2wju4gC_.mjs";
5
5
 
6
6
  export { messageGet, readStdin, resolveAgent, runPrint };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
- import { a as isRecord, i as errorMessage, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
3
+ import { a as isRecord, i as errorMessage, r as sendErrorMessage, t as createRestClient } from "./rest-CLrHVkxh.mjs";
4
4
  import { i as billingBlockedOutcomeFromSendResponse, n as BillingBlockedError } from "./billing-blocked-2wju4gC_.mjs";
5
5
  import path from "node:path";
6
6
  import Conf from "conf";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { S as getConfigPath } from "./print-ClPkgR9z.mjs";
2
+ import { S as getConfigPath } from "./print-riiY5Gly.mjs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { err, ok } from "neverthrow";
@@ -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.12";
11
+ var version$1 = "0.5.0-beta.13";
12
12
 
13
13
  //#endregion
14
14
  //#region src/auth/organization.ts
@@ -329,6 +329,9 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
329
329
  setConversationArchived: async ({ conversationId, archived }) => {
330
330
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
331
331
  },
332
+ markConversationRead: async ({ conversationId }) => {
333
+ await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/read`, {}, z.object({ read: z.boolean() }));
334
+ },
332
335
  renameConversation: async ({ conversationId, title }) => {
333
336
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}`, { title }, z.object({ conversation: z.object({ id: z.string() }) }), "PATCH");
334
337
  },
@@ -469,6 +472,7 @@ const conversationSummarySchema = z.object({
469
472
  channel: z.string().nullable(),
470
473
  channelLabel: z.string().nullable(),
471
474
  viewerArchivedAt: z.string().nullable().optional(),
475
+ unread: z.boolean().optional(),
472
476
  agent: conversationAgentSchema,
473
477
  agents: z.array(conversationAgentSchema).optional()
474
478
  });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
- import { n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-I3imNduB.mjs";
3
+ import { n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-CLrHVkxh.mjs";
4
4
  import "./billing-blocked-2wju4gC_.mjs";
5
5
 
6
6
  export { createRestClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.5.0-beta.12",
3
+ "version": "0.5.0-beta.13",
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-DabRpc_T.mjs";
3
- import "./daemon-DLY2NmVU.mjs";
4
- import "./api-DG5W6iwx.mjs";
5
- import { t as PortalDaemonClient } from "./daemon-client-CG6KWbdI.mjs";
6
-
7
- export { PortalDaemonClient };