skydive-cli 0.4.0 → 0.4.1-beta.2

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,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as billingBlockedOutcomeSchema } from "./billing-blocked-CwfG1BTR.mjs";
2
+ import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
+ import { a as billingBlockedOutcomeSchema } from "./billing-blocked-2wju4gC_.mjs";
3
4
  import { z } from "zod";
4
5
  import { createParser } from "eventsource-parser";
5
6
 
@@ -17,14 +18,6 @@ function errorMessage(err) {
17
18
 
18
19
  //#endregion
19
20
  //#region src/chat/api/rest.ts
20
- var HttpError = class extends Error {
21
- constructor(status, body) {
22
- super(`HTTP ${status}: ${body.slice(0, 200)}`);
23
- this.status = status;
24
- this.body = body;
25
- this.name = "HttpError";
26
- }
27
- };
28
21
  const ERROR_DETAIL_MAX_BODY = 2e3;
29
22
  /**
30
23
  * Fullest renderable text for a thrown value. `HttpError.message` clips the
@@ -294,6 +287,10 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
294
287
  const { recap } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}/recap`, recapResponseSchema);
295
288
  return recap?.text ?? null;
296
289
  },
290
+ listSubagentTasks: async ({ conversationId }) => {
291
+ const { result } = await get(`/api/v1/trpc/v2.subagentTasks.list?input=${encodeURIComponent(JSON.stringify({ conversationId }))}`, subagentTasksResponseSchema);
292
+ return new Map(result.data.subagentTasks.map((task) => [task.id, task]));
293
+ },
297
294
  uploadAttachment: async ({ agentId, fileName, mediaType, data }) => {
298
295
  const size = data.byteLength;
299
296
  const presign = await post("/api/v1/attachments/presign", {
@@ -334,6 +331,9 @@ function createRestClient({ appUrl, sessionToken, workspaceId }) {
334
331
  setConversationArchived: async ({ conversationId, archived }) => {
335
332
  await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
336
333
  },
334
+ renameConversation: async ({ conversationId, title }) => {
335
+ await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}`, { title }, z.object({ conversation: z.object({ id: z.string() }) }), "PATCH");
336
+ },
337
337
  sendMessage: async ({ clientSurface, ...input }) => post("/api/v1/chat/send", {
338
338
  ...input,
339
339
  clientSurface
@@ -527,6 +527,14 @@ const uiMessageSchema = z.object({
527
527
  }).passthrough().optional() }).passthrough().optional()
528
528
  });
529
529
  const recapResponseSchema = z.object({ recap: z.object({ text: z.string() }).nullable() });
530
+ const subagentTaskSnapshotSchema = z.object({
531
+ id: z.string(),
532
+ status: z.string(),
533
+ title: z.string().nullable(),
534
+ createdAt: z.string(),
535
+ completedAt: z.string().nullable()
536
+ });
537
+ const subagentTasksResponseSchema = z.object({ result: z.object({ data: z.object({ subagentTasks: z.array(subagentTaskSnapshotSchema) }) }) });
530
538
  const listMessagesResponseSchema = z.object({ messages: z.array(uiMessageSchema) });
531
539
  const workspaceFileSchema = z.object({
532
540
  id: z.string(),
@@ -577,6 +585,12 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
577
585
  id: z.string(),
578
586
  title: z.string().nullable()
579
587
  }),
588
+ z.object({
589
+ kind: z.literal("agent"),
590
+ id: z.string(),
591
+ model: z.string().nullable(),
592
+ modelLocked: z.boolean()
593
+ }),
580
594
  z.object({
581
595
  kind: z.literal("run"),
582
596
  runId: z.string(),
@@ -593,4 +607,4 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
593
607
  ]);
594
608
 
595
609
  //#endregion
596
- export { errorMessage as a, sendErrorMessage as i, createRestClient as n, isRecord as o, errorDetail as r, HttpError as t };
610
+ export { isRecord as a, errorMessage as i, errorDetail as n, sendErrorMessage as r, createRestClient as t };
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { t as HttpError } from "./http-error-DzyrsLAZ.mjs";
3
+ import { n as errorDetail, r as sendErrorMessage, t as createRestClient } from "./rest-BY2nADw5.mjs";
4
+ import "./billing-blocked-2wju4gC_.mjs";
5
+
6
+ export { createRestClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1-beta.2",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",
@@ -41,6 +41,7 @@
41
41
  "react-devtools-core": "^7.0.1",
42
42
  "safe-stable-stringify": "^2.3.1",
43
43
  "semver": "^7.7.4",
44
+ "shell-quote": "1.9.0",
44
45
  "web-tree-sitter": "0.25.10",
45
46
  "ws": "^8.21.0",
46
47
  "yargs": "^17.7.2",
@@ -48,7 +49,7 @@
48
49
  "zustand": "^5.0.2"
49
50
  },
50
51
  "devDependencies": {
51
- "@createinc/anyone-portal-protocol": "0.0.0",
52
+ "@createinc/anyone-portal-daemon": "0.0.0",
52
53
  "@createinc/anyone-sandbox-stream-protocol": "0.0.0",
53
54
  "@createinc/tsconfig": "0.0.0",
54
55
  "@types/bun": "^1.3.14",
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rest-imDZZGQA.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
- import { t as PortalClient } from "./client-CKzK-12y.mjs";
5
-
6
- export { PortalClient };
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rest-imDZZGQA.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
- import "./client-CKzK-12y.mjs";
5
- import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-CaFz7Wtw.mjs";
6
-
7
- export { runPortalDaemon };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./client-D8s9vY4p.mjs";
3
- import { t as runRawPtyPassthrough } from "./raw-pty-DAmb8uqt.mjs";
4
-
5
- export { runRawPtyPassthrough };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import { i as sendErrorMessage, n as createRestClient, r as errorDetail, t as HttpError } from "./rest-imDZZGQA.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
-
5
- export { createRestClient };