casedev 0.31.3 → 0.32.0
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 +16 -0
- package/package.json +1 -1
- package/resources/agent/agent.d.mts +4 -0
- package/resources/agent/agent.d.mts.map +1 -1
- package/resources/agent/agent.d.ts +4 -0
- package/resources/agent/agent.d.ts.map +1 -1
- package/resources/agent/agent.js +4 -0
- package/resources/agent/agent.js.map +1 -1
- package/resources/agent/agent.mjs +4 -0
- package/resources/agent/agent.mjs.map +1 -1
- package/resources/agent/index.d.mts +1 -0
- package/resources/agent/index.d.mts.map +1 -1
- package/resources/agent/index.d.ts +1 -0
- package/resources/agent/index.d.ts.map +1 -1
- package/resources/agent/index.js +3 -1
- package/resources/agent/index.js.map +1 -1
- package/resources/agent/index.mjs +1 -0
- package/resources/agent/index.mjs.map +1 -1
- package/resources/agent/v2/chat/chat.d.mts +165 -0
- package/resources/agent/v2/chat/chat.d.mts.map +1 -0
- package/resources/agent/v2/chat/chat.d.ts +165 -0
- package/resources/agent/v2/chat/chat.d.ts.map +1 -0
- package/resources/agent/v2/chat/chat.js +109 -0
- package/resources/agent/v2/chat/chat.js.map +1 -0
- package/resources/agent/v2/chat/chat.mjs +104 -0
- package/resources/agent/v2/chat/chat.mjs.map +1 -0
- package/resources/agent/v2/chat/files.d.mts +42 -0
- package/resources/agent/v2/chat/files.d.mts.map +1 -0
- package/resources/agent/v2/chat/files.d.ts +42 -0
- package/resources/agent/v2/chat/files.d.ts.map +1 -0
- package/resources/agent/v2/chat/files.js +33 -0
- package/resources/agent/v2/chat/files.js.map +1 -0
- package/resources/agent/v2/chat/files.mjs +29 -0
- package/resources/agent/v2/chat/files.mjs.map +1 -0
- package/resources/agent/v2/chat/index.d.mts +3 -0
- package/resources/agent/v2/chat/index.d.mts.map +1 -0
- package/resources/agent/v2/chat/index.d.ts +3 -0
- package/resources/agent/v2/chat/index.d.ts.map +1 -0
- package/resources/agent/v2/chat/index.js +9 -0
- package/resources/agent/v2/chat/index.js.map +1 -0
- package/resources/agent/v2/chat/index.mjs +4 -0
- package/resources/agent/v2/chat/index.mjs.map +1 -0
- package/resources/agent/v2/chat.d.mts +2 -0
- package/resources/agent/v2/chat.d.mts.map +1 -0
- package/resources/agent/v2/chat.d.ts +2 -0
- package/resources/agent/v2/chat.d.ts.map +1 -0
- package/resources/agent/v2/chat.js +6 -0
- package/resources/agent/v2/chat.js.map +1 -0
- package/resources/agent/v2/chat.mjs +3 -0
- package/resources/agent/v2/chat.mjs.map +1 -0
- package/resources/agent/v2/execute.d.mts +42 -0
- package/resources/agent/v2/execute.d.mts.map +1 -0
- package/resources/agent/v2/execute.d.ts +42 -0
- package/resources/agent/v2/execute.d.ts.map +1 -0
- package/resources/agent/v2/execute.js +19 -0
- package/resources/agent/v2/execute.js.map +1 -0
- package/resources/agent/v2/execute.mjs +15 -0
- package/resources/agent/v2/execute.mjs.map +1 -0
- package/resources/agent/v2/index.d.mts +5 -0
- package/resources/agent/v2/index.d.mts.map +1 -0
- package/resources/agent/v2/index.d.ts +5 -0
- package/resources/agent/v2/index.d.ts.map +1 -0
- package/resources/agent/v2/index.js +13 -0
- package/resources/agent/v2/index.js.map +1 -0
- package/resources/agent/v2/index.mjs +6 -0
- package/resources/agent/v2/index.mjs.map +1 -0
- package/resources/agent/v2/run.d.mts +73 -0
- package/resources/agent/v2/run.d.mts.map +1 -0
- package/resources/agent/v2/run.d.ts +73 -0
- package/resources/agent/v2/run.d.ts.map +1 -0
- package/resources/agent/v2/run.js +51 -0
- package/resources/agent/v2/run.js.map +1 -0
- package/resources/agent/v2/run.mjs +47 -0
- package/resources/agent/v2/run.mjs.map +1 -0
- package/resources/agent/v2/v2.d.mts +18 -0
- package/resources/agent/v2/v2.d.mts.map +1 -0
- package/resources/agent/v2/v2.d.ts +18 -0
- package/resources/agent/v2/v2.d.ts.map +1 -0
- package/resources/agent/v2/v2.js +25 -0
- package/resources/agent/v2/v2.js.map +1 -0
- package/resources/agent/v2/v2.mjs +20 -0
- package/resources/agent/v2/v2.mjs.map +1 -0
- package/resources/agent/v2.d.mts +2 -0
- package/resources/agent/v2.d.mts.map +1 -0
- package/resources/agent/v2.d.ts +2 -0
- package/resources/agent/v2.d.ts.map +1 -0
- package/resources/agent/v2.js +6 -0
- package/resources/agent/v2.js.map +1 -0
- package/resources/agent/v2.mjs +3 -0
- package/resources/agent/v2.mjs.map +1 -0
- package/resources/vault/objects.d.mts +4 -0
- package/resources/vault/objects.d.mts.map +1 -1
- package/resources/vault/objects.d.ts +4 -0
- package/resources/vault/objects.d.ts.map +1 -1
- package/src/resources/agent/agent.ts +6 -0
- package/src/resources/agent/index.ts +1 -0
- package/src/resources/agent/v2/chat/chat.ts +272 -0
- package/src/resources/agent/v2/chat/files.ts +63 -0
- package/src/resources/agent/v2/chat/index.ts +16 -0
- package/src/resources/agent/v2/chat.ts +3 -0
- package/src/resources/agent/v2/execute.ts +67 -0
- package/src/resources/agent/v2/index.ts +27 -0
- package/src/resources/agent/v2/run.ts +137 -0
- package/src/resources/agent/v2/v2.ts +73 -0
- package/src/resources/agent/v2.ts +3 -0
- package/src/resources/vault/objects.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
|
+
import * as FilesAPI from "./files.mjs";
|
|
4
|
+
import { Files } from "./files.mjs";
|
|
5
|
+
import { buildHeaders } from "../../../../internal/headers.mjs";
|
|
6
|
+
import { path } from "../../../../internal/utils/path.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
9
|
+
*/
|
|
10
|
+
export class Chat extends APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.files = new FilesAPI.Files(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a persistent OpenCode chat session backed by a Daytona runtime. Session
|
|
17
|
+
* state is retained and can be resumed or recovered across requests.
|
|
18
|
+
*/
|
|
19
|
+
create(body = {}, options) {
|
|
20
|
+
return this._client.post('/agent/v2/chat', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Terminates the active Daytona runtime (if any), then marks the chat as ended.
|
|
24
|
+
*/
|
|
25
|
+
delete(id, options) {
|
|
26
|
+
return this._client.delete(path `/agent/v2/chat/${id}`, options);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Aborts the active OpenCode generation for this Daytona-backed chat session.
|
|
30
|
+
*/
|
|
31
|
+
cancel(id, options) {
|
|
32
|
+
return this._client.post(path `/agent/v2/chat/${id}/cancel`, options);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Answers a pending OpenCode question for the Daytona-backed chat session and
|
|
36
|
+
* resumes or recovers the runtime if needed.
|
|
37
|
+
*/
|
|
38
|
+
replyToQuestion(requestID, params, options) {
|
|
39
|
+
const { id, ...body } = params;
|
|
40
|
+
return this._client.post(path `/agent/v2/chat/${id}/question/${requestID}/reply`, {
|
|
41
|
+
body,
|
|
42
|
+
...options,
|
|
43
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Streams a single assistant turn from a Daytona-backed chat runtime as normalized
|
|
48
|
+
* SSE events with stable turn, message, and part IDs. Emits events:
|
|
49
|
+
* `turn.started`, `turn.status`, `message.created`, `message.part.updated`,
|
|
50
|
+
* `message.completed`, `session.usage`, `turn.completed`.
|
|
51
|
+
*
|
|
52
|
+
* **When to use this endpoint:** Recommended for building custom chat UIs that
|
|
53
|
+
* need real-time streaming progress. This is the primary streaming endpoint for
|
|
54
|
+
* new integrations.
|
|
55
|
+
*
|
|
56
|
+
* **Alternatives:**
|
|
57
|
+
*
|
|
58
|
+
* - `POST /chat/:id/message` — synchronous, returns complete response as JSON
|
|
59
|
+
* (best for server-to-server)
|
|
60
|
+
*/
|
|
61
|
+
respond(id, body, options) {
|
|
62
|
+
return this._client.post(path `/agent/v2/chat/${id}/respond`, {
|
|
63
|
+
body,
|
|
64
|
+
...options,
|
|
65
|
+
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
66
|
+
stream: true,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Sends a message to a Daytona-backed chat runtime and returns the complete
|
|
71
|
+
* response as a single JSON body. Blocks until the assistant turn completes.
|
|
72
|
+
*
|
|
73
|
+
* **When to use this endpoint:** Best for server-to-server integrations,
|
|
74
|
+
* background processing, or any context where you want the full response in one
|
|
75
|
+
* call without managing an SSE stream.
|
|
76
|
+
*
|
|
77
|
+
* **Alternatives:**
|
|
78
|
+
*
|
|
79
|
+
* - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
|
|
80
|
+
* for custom chat UIs)
|
|
81
|
+
*/
|
|
82
|
+
sendMessage(id, body, options) {
|
|
83
|
+
return this._client.post(path `/agent/v2/chat/${id}/message`, {
|
|
84
|
+
body,
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay
|
|
91
|
+
* from buffered events using Last-Event-ID and transparently reconnects stopped or
|
|
92
|
+
* archived runtimes.
|
|
93
|
+
*/
|
|
94
|
+
stream(id, query = {}, options) {
|
|
95
|
+
return this._client.get(path `/agent/v2/chat/${id}/stream`, {
|
|
96
|
+
query,
|
|
97
|
+
...options,
|
|
98
|
+
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
99
|
+
stream: true,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
Chat.Files = Files;
|
|
104
|
+
//# sourceMappingURL=chat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAwC,KAAK,EAAE;OAG/C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA8G3D,CAAC;IA5GC;;;OAGG;IACH,MAAM,CACJ,OAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACH,eAAe,CACb,SAAiB,EACjB,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,aAAa,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AG,KAAK,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
6
|
+
*/
|
|
7
|
+
export declare class Files extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Lists files created by the agent in the Daytona runtime workspace. Stopped or
|
|
10
|
+
* archived runtimes are transparently resumed or recovered.
|
|
11
|
+
*/
|
|
12
|
+
list(id: string, options?: RequestOptions): APIPromise<FileListResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Downloads a file from the Daytona runtime workspace by path. Stopped or archived
|
|
15
|
+
* runtimes are transparently resumed or recovered.
|
|
16
|
+
*/
|
|
17
|
+
download(filePath: string, params: FileDownloadParams, options?: RequestOptions): APIPromise<Response>;
|
|
18
|
+
}
|
|
19
|
+
export interface FileListResponse {
|
|
20
|
+
chatId?: string;
|
|
21
|
+
files?: Array<FileListResponse.File>;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace FileListResponse {
|
|
24
|
+
interface File {
|
|
25
|
+
name?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Relative path from /workspace
|
|
28
|
+
*/
|
|
29
|
+
path?: string;
|
|
30
|
+
sizeBytes?: number;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export interface FileDownloadParams {
|
|
34
|
+
/**
|
|
35
|
+
* Chat session ID
|
|
36
|
+
*/
|
|
37
|
+
id: string;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Files {
|
|
40
|
+
export { type FileListResponse as FileListResponse, type FileDownloadParams as FileDownloadParams };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=files.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIxE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CAQvG;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACrG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
6
|
+
*/
|
|
7
|
+
export declare class Files extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Lists files created by the agent in the Daytona runtime workspace. Stopped or
|
|
10
|
+
* archived runtimes are transparently resumed or recovered.
|
|
11
|
+
*/
|
|
12
|
+
list(id: string, options?: RequestOptions): APIPromise<FileListResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Downloads a file from the Daytona runtime workspace by path. Stopped or archived
|
|
15
|
+
* runtimes are transparently resumed or recovered.
|
|
16
|
+
*/
|
|
17
|
+
download(filePath: string, params: FileDownloadParams, options?: RequestOptions): APIPromise<Response>;
|
|
18
|
+
}
|
|
19
|
+
export interface FileListResponse {
|
|
20
|
+
chatId?: string;
|
|
21
|
+
files?: Array<FileListResponse.File>;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace FileListResponse {
|
|
24
|
+
interface File {
|
|
25
|
+
name?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Relative path from /workspace
|
|
28
|
+
*/
|
|
29
|
+
path?: string;
|
|
30
|
+
sizeBytes?: number;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export interface FileDownloadParams {
|
|
34
|
+
/**
|
|
35
|
+
* Chat session ID
|
|
36
|
+
*/
|
|
37
|
+
id: string;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Files {
|
|
40
|
+
export { type FileListResponse as FileListResponse, type FileDownloadParams as FileDownloadParams };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIxE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CAQvG;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACrG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Files = void 0;
|
|
5
|
+
const resource_1 = require("../../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
10
|
+
*/
|
|
11
|
+
class Files extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Lists files created by the agent in the Daytona runtime workspace. Stopped or
|
|
14
|
+
* archived runtimes are transparently resumed or recovered.
|
|
15
|
+
*/
|
|
16
|
+
list(id, options) {
|
|
17
|
+
return this._client.get((0, path_1.path) `/agent/v2/chat/${id}/files`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Downloads a file from the Daytona runtime workspace by path. Stopped or archived
|
|
21
|
+
* runtimes are transparently resumed or recovered.
|
|
22
|
+
*/
|
|
23
|
+
download(filePath, params, options) {
|
|
24
|
+
const { id } = params;
|
|
25
|
+
return this._client.get((0, path_1.path) `/agent/v2/chat/${id}/files/${filePath}`, {
|
|
26
|
+
...options,
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
28
|
+
__binaryResponse: true,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Files = Files;
|
|
33
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAwD;AAExD,6DAA4D;AAE5D,6DAAuD;AAEvD;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,QAAgB,EAAE,MAA0B,EAAE,OAAwB;QAC7E,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,UAAU,QAAQ,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AArBD,sBAqBC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../../../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
7
|
+
*/
|
|
8
|
+
export class Files extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Lists files created by the agent in the Daytona runtime workspace. Stopped or
|
|
11
|
+
* archived runtimes are transparently resumed or recovered.
|
|
12
|
+
*/
|
|
13
|
+
list(id, options) {
|
|
14
|
+
return this._client.get(path `/agent/v2/chat/${id}/files`, options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Downloads a file from the Daytona runtime workspace by path. Stopped or archived
|
|
18
|
+
* runtimes are transparently resumed or recovered.
|
|
19
|
+
*/
|
|
20
|
+
download(filePath, params, options) {
|
|
21
|
+
const { id } = params;
|
|
22
|
+
return this._client.get(path `/agent/v2/chat/${id}/files/${filePath}`, {
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
25
|
+
__binaryResponse: true,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=files.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,QAAgB,EAAE,MAA0B,EAAE,OAAwB;QAC7E,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,UAAU,QAAQ,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatRespondResponse, type ChatStreamResponse, type ChatCreateParams, type ChatReplyToQuestionParams, type ChatRespondParams, type ChatSendMessageParams, type ChatStreamParams, } from "./chat.mjs";
|
|
2
|
+
export { Files, type FileListResponse, type FileDownloadParams } from "./files.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB;OACM,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatRespondResponse, type ChatStreamResponse, type ChatCreateParams, type ChatReplyToQuestionParams, type ChatRespondParams, type ChatSendMessageParams, type ChatStreamParams, } from "./chat.js";
|
|
2
|
+
export { Files, type FileListResponse, type FileDownloadParams } from "./files.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB;OACM,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Files = exports.Chat = void 0;
|
|
5
|
+
var chat_1 = require("./chat.js");
|
|
6
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return chat_1.Chat; } });
|
|
7
|
+
var files_1 = require("./files.js");
|
|
8
|
+
Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAYgB;AAXd,4FAAA,IAAI,OAAA;AAYN,oCAAgF;AAAvE,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAWL;OACM,EAAE,KAAK,EAAkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../../src/resources/agent/v2/chat.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/resources/agent/v2/chat.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./chat/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=chat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../src/resources/agent/v2/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../src/resources/agent/v2/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
6
|
+
*/
|
|
7
|
+
export declare class Execute extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an ephemeral agent and immediately executes a v2 run on the Daytona
|
|
10
|
+
* runtime.
|
|
11
|
+
*/
|
|
12
|
+
create(body: ExecuteCreateParams, options?: RequestOptions): APIPromise<ExecuteCreateResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface ExecuteCreateResponse {
|
|
15
|
+
agentId?: string;
|
|
16
|
+
message?: string;
|
|
17
|
+
provider?: 'daytona';
|
|
18
|
+
runId?: string;
|
|
19
|
+
runtimeState?: 'running';
|
|
20
|
+
status?: 'running';
|
|
21
|
+
}
|
|
22
|
+
export interface ExecuteCreateParams {
|
|
23
|
+
prompt: string;
|
|
24
|
+
disabledTools?: Array<string> | null;
|
|
25
|
+
enabledTools?: Array<string> | null;
|
|
26
|
+
guidance?: string | null;
|
|
27
|
+
instructions?: string;
|
|
28
|
+
model?: string;
|
|
29
|
+
objectIds?: Array<string> | null;
|
|
30
|
+
sandbox?: ExecuteCreateParams.Sandbox | null;
|
|
31
|
+
vaultIds?: Array<string> | null;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace ExecuteCreateParams {
|
|
34
|
+
interface Sandbox {
|
|
35
|
+
cpu?: number;
|
|
36
|
+
memoryMiB?: number;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Execute {
|
|
40
|
+
export { type ExecuteCreateResponse as ExecuteCreateResponse, type ExecuteCreateParams as ExecuteCreateParams, };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=execute.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.mts","sourceRoot":"","sources":["../../../src/resources/agent/v2/execute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,C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promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
6
|
+
*/
|
|
7
|
+
export declare class Execute extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an ephemeral agent and immediately executes a v2 run on the Daytona
|
|
10
|
+
* runtime.
|
|
11
|
+
*/
|
|
12
|
+
create(body: ExecuteCreateParams, options?: RequestOptions): APIPromise<ExecuteCreateResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface ExecuteCreateResponse {
|
|
15
|
+
agentId?: string;
|
|
16
|
+
message?: string;
|
|
17
|
+
provider?: 'daytona';
|
|
18
|
+
runId?: string;
|
|
19
|
+
runtimeState?: 'running';
|
|
20
|
+
status?: 'running';
|
|
21
|
+
}
|
|
22
|
+
export interface ExecuteCreateParams {
|
|
23
|
+
prompt: string;
|
|
24
|
+
disabledTools?: Array<string> | null;
|
|
25
|
+
enabledTools?: Array<string> | null;
|
|
26
|
+
guidance?: string | null;
|
|
27
|
+
instructions?: string;
|
|
28
|
+
model?: string;
|
|
29
|
+
objectIds?: Array<string> | null;
|
|
30
|
+
sandbox?: ExecuteCreateParams.Sandbox | null;
|
|
31
|
+
vaultIds?: Array<string> | null;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace ExecuteCreateParams {
|
|
34
|
+
interface Sandbox {
|
|
35
|
+
cpu?: number;
|
|
36
|
+
memoryMiB?: number;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Execute {
|
|
40
|
+
export { type ExecuteCreateResponse as ExecuteCreateResponse, type ExecuteCreateParams as ExecuteCreateParams, };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/resources/agent/v2/execute.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,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I,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Execute = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
8
|
+
*/
|
|
9
|
+
class Execute extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Creates an ephemeral agent and immediately executes a v2 run on the Daytona
|
|
12
|
+
* runtime.
|
|
13
|
+
*/
|
|
14
|
+
create(body, options) {
|
|
15
|
+
return this._client.post('/agent/v2/execute', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Execute = Execute;
|
|
19
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/resources/agent/v2/execute.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AARD,0BAQC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
5
|
+
*/
|
|
6
|
+
export class Execute extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an ephemeral agent and immediately executes a v2 run on the Daytona
|
|
9
|
+
* runtime.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/agent/v2/execute', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=execute.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.mjs","sourceRoot":"","sources":["../../../src/resources/agent/v2/execute.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatRespondResponse, type ChatStreamResponse, type ChatCreateParams, type ChatReplyToQuestionParams, type ChatRespondParams, type ChatSendMessageParams, type ChatStreamParams, } from "./chat/index.mjs";
|
|
2
|
+
export { Execute, type ExecuteCreateResponse, type ExecuteCreateParams } from "./execute.mjs";
|
|
3
|
+
export { Run, type RunCreateResponse, type RunEventsResponse, type RunExecResponse, type RunGetDetailsResponse, type RunGetStatusResponse, type RunCreateParams, type RunEventsParams, } from "./run.mjs";
|
|
4
|
+
export { V2 } from "./v2.mjs";
|
|
5
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/agent/v2/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB;OACM,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE;OACjE,EACL,GAAG,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatRespondResponse, type ChatStreamResponse, type ChatCreateParams, type ChatReplyToQuestionParams, type ChatRespondParams, type ChatSendMessageParams, type ChatStreamParams, } from "./chat/index.js";
|
|
2
|
+
export { Execute, type ExecuteCreateResponse, type ExecuteCreateParams } from "./execute.js";
|
|
3
|
+
export { Run, type RunCreateResponse, type RunEventsResponse, type RunExecResponse, type RunGetDetailsResponse, type RunGetStatusResponse, type RunCreateParams, type RunEventsParams, } from "./run.js";
|
|
4
|
+
export { V2 } from "./v2.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/agent/v2/index.ts"],"names":[],"mappings":"OAEO,EACL,IAAI,EACJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB;OACM,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE;OACjE,EACL,GAAG,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OACM,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.V2 = exports.Run = exports.Execute = exports.Chat = void 0;
|
|
5
|
+
var index_1 = require("./chat/index.js");
|
|
6
|
+
Object.defineProperty(exports, "Chat", { enumerable: true, get: function () { return index_1.Chat; } });
|
|
7
|
+
var execute_1 = require("./execute.js");
|
|
8
|
+
Object.defineProperty(exports, "Execute", { enumerable: true, get: function () { return execute_1.Execute; } });
|
|
9
|
+
var run_1 = require("./run.js");
|
|
10
|
+
Object.defineProperty(exports, "Run", { enumerable: true, get: function () { return run_1.Run; } });
|
|
11
|
+
var v2_1 = require("./v2.js");
|
|
12
|
+
Object.defineProperty(exports, "V2", { enumerable: true, get: function () { return v2_1.V2; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/agent/v2/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,yCAYsB;AAXpB,6FAAA,IAAI,OAAA;AAYN,wCAA0F;AAAjF,kGAAA,OAAO,OAAA;AAChB,gCASe;AARb,0FAAA,GAAG,OAAA;AASL,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Chat, } from "./chat/index.mjs";
|
|
3
|
+
export { Execute } from "./execute.mjs";
|
|
4
|
+
export { Run, } from "./run.mjs";
|
|
5
|
+
export { V2 } from "./v2.mjs";
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/agent/v2/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,IAAI,GAWL;OACM,EAAE,OAAO,EAAwD;OACjE,EACL,GAAG,GAQJ;OACM,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { Stream } from "../../../core/streaming.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
7
|
+
*/
|
|
8
|
+
export declare class Run extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a v2 run in queued state. Call POST /agent/v2/run/:id/exec to start
|
|
11
|
+
* execution on the Daytona runtime.
|
|
12
|
+
*/
|
|
13
|
+
create(body: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Streams real-time v2 run events over SSE with replay support.
|
|
16
|
+
*/
|
|
17
|
+
events(id: string, query?: RunEventsParams | undefined, options?: RequestOptions): APIPromise<Stream<RunEventsResponse>>;
|
|
18
|
+
/**
|
|
19
|
+
* Starts execution of a queued v2 run. The agent runs in a durable workflow on a
|
|
20
|
+
* Daytona runtime.
|
|
21
|
+
*/
|
|
22
|
+
exec(id: string, options?: RequestOptions): APIPromise<RunExecResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Full audit trail for a v2 run, with provider-neutral runtime metadata.
|
|
25
|
+
*/
|
|
26
|
+
getDetails(id: string, options?: RequestOptions): APIPromise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Lightweight status poll for a v2 run including neutral runtime metadata.
|
|
29
|
+
*/
|
|
30
|
+
getStatus(id: string, options?: RequestOptions): APIPromise<RunGetStatusResponse>;
|
|
31
|
+
}
|
|
32
|
+
export interface RunCreateResponse {
|
|
33
|
+
id?: string;
|
|
34
|
+
agentId?: string;
|
|
35
|
+
createdAt?: string;
|
|
36
|
+
objectIds?: Array<string> | null;
|
|
37
|
+
status?: 'queued';
|
|
38
|
+
}
|
|
39
|
+
export type RunEventsResponse = string;
|
|
40
|
+
export interface RunExecResponse {
|
|
41
|
+
id?: string;
|
|
42
|
+
message?: string;
|
|
43
|
+
provider?: 'daytona';
|
|
44
|
+
runtimeState?: 'running';
|
|
45
|
+
status?: 'running';
|
|
46
|
+
workflowId?: string;
|
|
47
|
+
}
|
|
48
|
+
export type RunGetDetailsResponse = unknown;
|
|
49
|
+
export interface RunGetStatusResponse {
|
|
50
|
+
id?: string;
|
|
51
|
+
completedAt?: string | null;
|
|
52
|
+
durationMs?: number | null;
|
|
53
|
+
provider?: string | null;
|
|
54
|
+
runtimeId?: string | null;
|
|
55
|
+
runtimeState?: string | null;
|
|
56
|
+
startedAt?: string | null;
|
|
57
|
+
status?: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
58
|
+
}
|
|
59
|
+
export interface RunCreateParams {
|
|
60
|
+
agentId: string;
|
|
61
|
+
prompt: string;
|
|
62
|
+
callbackUrl?: string | null;
|
|
63
|
+
guidance?: string | null;
|
|
64
|
+
model?: string | null;
|
|
65
|
+
objectIds?: Array<string> | null;
|
|
66
|
+
}
|
|
67
|
+
export interface RunEventsParams {
|
|
68
|
+
lastEventId?: number;
|
|
69
|
+
}
|
|
70
|
+
export declare namespace Run {
|
|
71
|
+
export { type RunCreateResponse as RunCreateResponse, type RunEventsResponse as RunEventsResponse, type RunExecResponse as RunExecResponse, type RunGetDetailsResponse as RunGetDetailsResponse, type RunGetStatusResponse as RunGetStatusResponse, type RunCreateParams as RunCreateParams, type RunEventsParams as RunEventsParams, };
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=run.d.mts.map
|