skydive-cli 0.4.0-beta.979 → 0.4.1-beta.1

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", {
@@ -530,6 +527,14 @@ const uiMessageSchema = z.object({
530
527
  }).passthrough().optional() }).passthrough().optional()
531
528
  });
532
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) }) }) });
533
538
  const listMessagesResponseSchema = z.object({ messages: z.array(uiMessageSchema) });
534
539
  const workspaceFileSchema = z.object({
535
540
  id: z.string(),
@@ -580,6 +585,12 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
580
585
  id: z.string(),
581
586
  title: z.string().nullable()
582
587
  }),
588
+ z.object({
589
+ kind: z.literal("agent"),
590
+ id: z.string(),
591
+ model: z.string().nullable(),
592
+ modelLocked: z.boolean()
593
+ }),
583
594
  z.object({
584
595
  kind: z.literal("run"),
585
596
  runId: z.string(),
@@ -596,4 +607,4 @@ const conversationStreamEventSchema = z.discriminatedUnion("kind", [
596
607
  ]);
597
608
 
598
609
  //#endregion
599
- 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-beta.979",
3
+ "version": "0.4.1-beta.1",
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-CG7VpQ56.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
- import { t as PortalClient } from "./client-DiaJZQG6.mjs";
5
-
6
- export { PortalClient };
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rest-CG7VpQ56.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
- import "./client-DiaJZQG6.mjs";
5
- import { a as runPortalDaemon, i as queryDaemonStatus, n as ensureDaemonRunning, o as stopDaemon, r as isDaemonListening, t as PortalDaemon } from "./daemon-BSSZpzto.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-CG7VpQ56.mjs";
3
- import "./billing-blocked-CwfG1BTR.mjs";
4
-
5
- export { createRestClient };