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.
- package/CHANGELOG.md +4 -0
- package/README.md +51 -0
- package/dist/js/{billing-blocked-euid6MN9.mjs → billing-blocked-Dgu5-oDy.mjs} +1 -1
- package/dist/js/bin.mjs +333 -51
- package/dist/js/{boot-on5ucI_Z.mjs → boot-DZYbTxev.mjs} +988 -259
- package/dist/js/{client-CKzK-12y.mjs → client-Cf7cvftg.mjs} +19 -6
- package/dist/js/client-CneLVPei.mjs +4 -0
- package/dist/js/{daemon-CaFz7Wtw.mjs → daemon-DaUaCMwC.mjs} +22 -5
- package/dist/js/daemon-client-CJxbCLOb.mjs +168 -0
- package/dist/js/daemon-client-DlblQIR9.mjs +6 -0
- package/dist/js/daemon-imLBqTGg.mjs +5 -0
- package/dist/js/http-error-DzyrsLAZ.mjs +20 -0
- package/dist/js/{print-X2N5wJ5l.mjs → print-CbayCa87.mjs} +6 -5
- package/dist/js/{print-BXNq9UxE.mjs → print-ba_0hiV9.mjs} +3 -3
- package/dist/js/{print-share-D72CfWJk.mjs → print-share-CT4ltX7u.mjs} +3 -3
- package/dist/js/{install-Ba-UTi-l.mjs → profiler-BA-c3-gP.mjs} +210 -3
- package/dist/js/raw-pty-3EkG-jjH.mjs +5 -0
- package/dist/js/{raw-pty-DAmb8uqt.mjs → raw-pty-B6mAroiI.mjs} +1 -1
- package/dist/js/{rest-imDZZGQA.mjs → rest-BY2nADw5.mjs} +24 -10
- package/dist/js/rest-DADJh0bi.mjs +6 -0
- package/package.json +3 -2
- package/dist/js/client-D6apKmV0.mjs +0 -6
- package/dist/js/daemon-BADmpJAs.mjs +0 -7
- package/dist/js/raw-pty-t5DC-e1T.mjs +0 -5
- package/dist/js/rest-Br2eFTlj.mjs +0 -5
- /package/dist/js/{billing-blocked-CwfG1BTR.mjs → billing-blocked-2wju4gC_.mjs} +0 -0
- /package/dist/js/{client-D8s9vY4p.mjs → client-Cn2af31H.mjs} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
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 {
|
|
610
|
+
export { isRecord as a, errorMessage as i, errorDetail as n, sendErrorMessage as r, createRestClient as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skydive-cli",
|
|
3
|
-
"version": "0.4.
|
|
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-
|
|
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,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 };
|
|
File without changes
|
|
File without changes
|