casedev 0.55.0 → 0.56.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 +8 -0
- package/package.json +1 -1
- package/resources/agent/agent.d.mts +0 -4
- package/resources/agent/agent.d.mts.map +1 -1
- package/resources/agent/agent.d.ts +0 -4
- package/resources/agent/agent.d.ts.map +1 -1
- package/resources/agent/agent.js +0 -4
- package/resources/agent/agent.js.map +1 -1
- package/resources/agent/agent.mjs +0 -4
- package/resources/agent/agent.mjs.map +1 -1
- package/resources/agent/index.d.mts +0 -1
- package/resources/agent/index.d.mts.map +1 -1
- package/resources/agent/index.d.ts +0 -1
- package/resources/agent/index.d.ts.map +1 -1
- package/resources/agent/index.js +1 -3
- package/resources/agent/index.js.map +1 -1
- package/resources/agent/index.mjs +0 -1
- package/resources/agent/index.mjs.map +1 -1
- package/resources/webhooks/v1/deliveries.d.mts +2 -2
- package/resources/webhooks/v1/deliveries.d.ts +2 -2
- package/resources/webhooks/v1/deliveries.js +2 -2
- package/resources/webhooks/v1/deliveries.mjs +2 -2
- package/src/resources/agent/agent.ts +0 -6
- package/src/resources/agent/index.ts +0 -1
- package/src/resources/webhooks/v1/deliveries.ts +2 -2
- 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
- package/resources/agent/v2/chat/chat.d.mts +0 -196
- package/resources/agent/v2/chat/chat.d.mts.map +0 -1
- package/resources/agent/v2/chat/chat.d.ts +0 -196
- package/resources/agent/v2/chat/chat.d.ts.map +0 -1
- package/resources/agent/v2/chat/chat.js +0 -117
- package/resources/agent/v2/chat/chat.js.map +0 -1
- package/resources/agent/v2/chat/chat.mjs +0 -112
- package/resources/agent/v2/chat/chat.mjs.map +0 -1
- package/resources/agent/v2/chat/files.d.mts +0 -42
- package/resources/agent/v2/chat/files.d.mts.map +0 -1
- package/resources/agent/v2/chat/files.d.ts +0 -42
- package/resources/agent/v2/chat/files.d.ts.map +0 -1
- package/resources/agent/v2/chat/files.js +0 -33
- package/resources/agent/v2/chat/files.js.map +0 -1
- package/resources/agent/v2/chat/files.mjs +0 -29
- package/resources/agent/v2/chat/files.mjs.map +0 -1
- package/resources/agent/v2/chat/index.d.mts +0 -3
- package/resources/agent/v2/chat/index.d.mts.map +0 -1
- package/resources/agent/v2/chat/index.d.ts +0 -3
- package/resources/agent/v2/chat/index.d.ts.map +0 -1
- package/resources/agent/v2/chat/index.js +0 -9
- package/resources/agent/v2/chat/index.js.map +0 -1
- package/resources/agent/v2/chat/index.mjs +0 -4
- package/resources/agent/v2/chat/index.mjs.map +0 -1
- package/resources/agent/v2/chat.d.mts +0 -2
- package/resources/agent/v2/chat.d.mts.map +0 -1
- package/resources/agent/v2/chat.d.ts +0 -2
- package/resources/agent/v2/chat.d.ts.map +0 -1
- package/resources/agent/v2/chat.js +0 -6
- package/resources/agent/v2/chat.js.map +0 -1
- package/resources/agent/v2/chat.mjs +0 -3
- package/resources/agent/v2/chat.mjs.map +0 -1
- package/resources/agent/v2/execute.d.mts +0 -58
- package/resources/agent/v2/execute.d.mts.map +0 -1
- package/resources/agent/v2/execute.d.ts +0 -58
- package/resources/agent/v2/execute.d.ts.map +0 -1
- package/resources/agent/v2/execute.js +0 -20
- package/resources/agent/v2/execute.js.map +0 -1
- package/resources/agent/v2/execute.mjs +0 -16
- package/resources/agent/v2/execute.mjs.map +0 -1
- package/resources/agent/v2/index.d.mts +0 -5
- package/resources/agent/v2/index.d.mts.map +0 -1
- package/resources/agent/v2/index.d.ts +0 -5
- package/resources/agent/v2/index.d.ts.map +0 -1
- package/resources/agent/v2/index.js +0 -13
- package/resources/agent/v2/index.js.map +0 -1
- package/resources/agent/v2/index.mjs +0 -6
- package/resources/agent/v2/index.mjs.map +0 -1
- package/resources/agent/v2/run.d.mts +0 -73
- package/resources/agent/v2/run.d.mts.map +0 -1
- package/resources/agent/v2/run.d.ts +0 -73
- package/resources/agent/v2/run.d.ts.map +0 -1
- package/resources/agent/v2/run.js +0 -51
- package/resources/agent/v2/run.js.map +0 -1
- package/resources/agent/v2/run.mjs +0 -47
- package/resources/agent/v2/run.mjs.map +0 -1
- package/resources/agent/v2/v2.d.mts +0 -18
- package/resources/agent/v2/v2.d.mts.map +0 -1
- package/resources/agent/v2/v2.d.ts +0 -18
- package/resources/agent/v2/v2.d.ts.map +0 -1
- package/resources/agent/v2/v2.js +0 -25
- package/resources/agent/v2/v2.js.map +0 -1
- package/resources/agent/v2/v2.mjs +0 -20
- package/resources/agent/v2/v2.mjs.map +0 -1
- package/resources/agent/v2.d.mts +0 -2
- package/resources/agent/v2.d.mts.map +0 -1
- package/resources/agent/v2.d.ts +0 -2
- package/resources/agent/v2.d.ts.map +0 -1
- package/resources/agent/v2.js +0 -6
- package/resources/agent/v2.js.map +0 -1
- package/resources/agent/v2.mjs +0 -3
- package/resources/agent/v2.mjs.map +0 -1
- package/src/resources/agent/v2/chat/chat.ts +0 -314
- package/src/resources/agent/v2/chat/files.ts +0 -63
- package/src/resources/agent/v2/chat/index.ts +0 -17
- package/src/resources/agent/v2/chat.ts +0 -3
- package/src/resources/agent/v2/execute.ts +0 -91
- package/src/resources/agent/v2/index.ts +0 -28
- package/src/resources/agent/v2/run.ts +0 -137
- package/src/resources/agent/v2/v2.ts +0 -75
- package/src/resources/agent/v2.ts +0 -3
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../../core/resource.js";
|
|
2
|
-
import * as FilesAPI from "./files.js";
|
|
3
|
-
import { FileDownloadParams, FileListResponse, Files } from "./files.js";
|
|
4
|
-
import { APIPromise } from "../../../../core/api-promise.js";
|
|
5
|
-
import { Stream } from "../../../../core/streaming.js";
|
|
6
|
-
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
7
|
-
/**
|
|
8
|
-
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
9
|
-
*/
|
|
10
|
-
export declare class Chat extends APIResource {
|
|
11
|
-
files: FilesAPI.Files;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a persistent OpenCode chat session backed by a Daytona runtime. Session
|
|
14
|
-
* state is retained and can be resumed or recovered across requests.
|
|
15
|
-
*/
|
|
16
|
-
create(body?: ChatCreateParams | null | undefined, options?: RequestOptions): APIPromise<ChatCreateResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Terminates the active Daytona runtime (if any), then marks the chat as ended.
|
|
19
|
-
*/
|
|
20
|
-
delete(id: string, options?: RequestOptions): APIPromise<ChatDeleteResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Aborts the active OpenCode generation for this Daytona-backed chat session.
|
|
23
|
-
*/
|
|
24
|
-
cancel(id: string, options?: RequestOptions): APIPromise<ChatCancelResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a short-lived token that allows browser clients to connect directly to
|
|
27
|
-
* the agent chat SSE stream without exposing the underlying org API key.
|
|
28
|
-
*/
|
|
29
|
-
createStreamToken(id: string, options?: RequestOptions): APIPromise<ChatCreateStreamTokenResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* Answers a pending OpenCode question for the Daytona-backed chat session and
|
|
32
|
-
* resumes or recovers the runtime if needed.
|
|
33
|
-
*/
|
|
34
|
-
replyToQuestion(requestID: string, params: ChatReplyToQuestionParams, options?: RequestOptions): APIPromise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Streams a single assistant turn from a Daytona-backed chat runtime as normalized
|
|
37
|
-
* SSE events with stable turn, message, and part IDs. Emits events:
|
|
38
|
-
* `turn.started`, `turn.status`, `message.created`, `message.part.updated`,
|
|
39
|
-
* `message.completed`, `session.usage`, `turn.completed`.
|
|
40
|
-
*
|
|
41
|
-
* **When to use this endpoint:** Recommended for building custom chat UIs that
|
|
42
|
-
* need real-time streaming progress. This is the primary streaming endpoint for
|
|
43
|
-
* new integrations.
|
|
44
|
-
*
|
|
45
|
-
* **Alternatives:**
|
|
46
|
-
*
|
|
47
|
-
* - `POST /chat/:id/message` — synchronous, returns complete response as JSON
|
|
48
|
-
* (best for server-to-server)
|
|
49
|
-
*/
|
|
50
|
-
respond(id: string, body: ChatRespondParams, options?: RequestOptions): APIPromise<Stream<ChatRespondResponse>>;
|
|
51
|
-
/**
|
|
52
|
-
* Sends a message to a Daytona-backed chat runtime and returns the complete
|
|
53
|
-
* response as a single JSON body. Blocks until the assistant turn completes.
|
|
54
|
-
*
|
|
55
|
-
* **When to use this endpoint:** Best for server-to-server integrations,
|
|
56
|
-
* background processing, or any context where you want the full response in one
|
|
57
|
-
* call without managing an SSE stream.
|
|
58
|
-
*
|
|
59
|
-
* **Alternatives:**
|
|
60
|
-
*
|
|
61
|
-
* - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
|
|
62
|
-
* for custom chat UIs)
|
|
63
|
-
*/
|
|
64
|
-
sendMessage(id: string, body: ChatSendMessageParams, options?: RequestOptions): APIPromise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay
|
|
67
|
-
* from buffered events using Last-Event-ID and transparently reconnects stopped or
|
|
68
|
-
* archived runtimes. Accepts either Bearer token auth or a short-lived stream
|
|
69
|
-
* token via query parameter. When both are provided, Bearer auth takes precedence.
|
|
70
|
-
*/
|
|
71
|
-
stream(id: string, query?: ChatStreamParams | undefined, options?: RequestOptions): APIPromise<Stream<ChatStreamResponse>>;
|
|
72
|
-
}
|
|
73
|
-
export interface ChatCreateResponse {
|
|
74
|
-
id?: string;
|
|
75
|
-
createdAt?: string;
|
|
76
|
-
idleTimeoutMs?: number;
|
|
77
|
-
provider?: 'daytona';
|
|
78
|
-
runtimeState?: string;
|
|
79
|
-
status?: string;
|
|
80
|
-
}
|
|
81
|
-
export interface ChatDeleteResponse {
|
|
82
|
-
id?: string;
|
|
83
|
-
cost?: number;
|
|
84
|
-
provider?: string | null;
|
|
85
|
-
runtimeId?: string | null;
|
|
86
|
-
runtimeMs?: number;
|
|
87
|
-
status?: string;
|
|
88
|
-
}
|
|
89
|
-
export interface ChatCancelResponse {
|
|
90
|
-
id?: string;
|
|
91
|
-
ok?: boolean;
|
|
92
|
-
}
|
|
93
|
-
export interface ChatCreateStreamTokenResponse {
|
|
94
|
-
token: string;
|
|
95
|
-
expiresAt: string;
|
|
96
|
-
streamUrl: string;
|
|
97
|
-
}
|
|
98
|
-
export type ChatRespondResponse = string;
|
|
99
|
-
export type ChatStreamResponse = string;
|
|
100
|
-
export interface ChatCreateParams {
|
|
101
|
-
/**
|
|
102
|
-
* Idle timeout before the runtime is eligible to stop. Defaults to 15 minutes.
|
|
103
|
-
*/
|
|
104
|
-
idleTimeoutMs?: number | null;
|
|
105
|
-
/**
|
|
106
|
-
* Optional hidden app instructions merged into the chat runtime bootstrap and
|
|
107
|
-
* never exposed as a user message. Only accepted for privileged C3 system keys.
|
|
108
|
-
*/
|
|
109
|
-
instructions?: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* Optional model override for the OpenCode session
|
|
112
|
-
*/
|
|
113
|
-
model?: string | null;
|
|
114
|
-
/**
|
|
115
|
-
* Optional human-readable session title
|
|
116
|
-
*/
|
|
117
|
-
title?: string;
|
|
118
|
-
/**
|
|
119
|
-
* Restrict the chat session to specific vault IDs
|
|
120
|
-
*/
|
|
121
|
-
vaultIds?: Array<string> | null;
|
|
122
|
-
}
|
|
123
|
-
export interface ChatReplyToQuestionParams {
|
|
124
|
-
/**
|
|
125
|
-
* Path param: Chat session ID
|
|
126
|
-
*/
|
|
127
|
-
id: string;
|
|
128
|
-
/**
|
|
129
|
-
* Body param: Answer selections for each prompt element in the pending question
|
|
130
|
-
*/
|
|
131
|
-
answers: Array<Array<string>>;
|
|
132
|
-
}
|
|
133
|
-
export interface ChatRespondParams {
|
|
134
|
-
/**
|
|
135
|
-
* Optional model override. When provided, the runtime bootstrap config is updated
|
|
136
|
-
* so subsequent turns use this model. Conversation history is preserved.
|
|
137
|
-
*/
|
|
138
|
-
model?: string | null;
|
|
139
|
-
/**
|
|
140
|
-
* Message content parts. Currently only "text" type is supported. Additional types
|
|
141
|
-
* (e.g. file, image) may be added in future versions.
|
|
142
|
-
*/
|
|
143
|
-
parts?: Array<ChatRespondParams.Part>;
|
|
144
|
-
}
|
|
145
|
-
export declare namespace ChatRespondParams {
|
|
146
|
-
interface Part {
|
|
147
|
-
/**
|
|
148
|
-
* The message text content
|
|
149
|
-
*/
|
|
150
|
-
text: string;
|
|
151
|
-
/**
|
|
152
|
-
* Part type. Currently only "text" is supported.
|
|
153
|
-
*/
|
|
154
|
-
type: 'text';
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
export interface ChatSendMessageParams {
|
|
158
|
-
/**
|
|
159
|
-
* Optional model override. When provided, the runtime bootstrap config is updated
|
|
160
|
-
* so subsequent turns use this model. Conversation history is preserved.
|
|
161
|
-
*/
|
|
162
|
-
model?: string | null;
|
|
163
|
-
/**
|
|
164
|
-
* Message content parts. Currently only "text" type is supported. Additional types
|
|
165
|
-
* (e.g. file, image) may be added in future versions.
|
|
166
|
-
*/
|
|
167
|
-
parts?: Array<ChatSendMessageParams.Part>;
|
|
168
|
-
}
|
|
169
|
-
export declare namespace ChatSendMessageParams {
|
|
170
|
-
interface Part {
|
|
171
|
-
/**
|
|
172
|
-
* The message text content
|
|
173
|
-
*/
|
|
174
|
-
text: string;
|
|
175
|
-
/**
|
|
176
|
-
* Part type. Currently only "text" is supported.
|
|
177
|
-
*/
|
|
178
|
-
type: 'text';
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
export interface ChatStreamParams {
|
|
182
|
-
/**
|
|
183
|
-
* Short-lived stream token from POST /agent/v2/chat/:id/stream-token. If provided,
|
|
184
|
-
* Bearer auth is not required.
|
|
185
|
-
*/
|
|
186
|
-
token?: string;
|
|
187
|
-
/**
|
|
188
|
-
* Replay events after this sequence number
|
|
189
|
-
*/
|
|
190
|
-
lastEventId?: number;
|
|
191
|
-
}
|
|
192
|
-
export declare namespace Chat {
|
|
193
|
-
export { type ChatCreateResponse as ChatCreateResponse, type ChatDeleteResponse as ChatDeleteResponse, type ChatCancelResponse as ChatCancelResponse, type ChatCreateStreamTokenResponse as ChatCreateStreamTokenResponse, type ChatRespondResponse as ChatRespondResponse, type ChatStreamResponse as ChatStreamResponse, type ChatCreateParams as ChatCreateParams, type ChatReplyToQuestionParams as ChatReplyToQuestionParams, type ChatRespondParams as ChatRespondParams, type ChatSendMessageParams as ChatSendMessageParams, type ChatStreamParams as ChatStreamParams, };
|
|
194
|
-
export { Files as Files, type FileListResponse as FileListResponse, type FileDownloadParams as FileDownloadParams, };
|
|
195
|
-
}
|
|
196
|
-
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/chat.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,EAAE;OAC/C,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;OAGG;IACH,MAAM,CACJ,IAAI,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAIjC;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI5E;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI5E;;;OAGG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,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BAAqB,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -1,117 +0,0 @@
|
|
|
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.Chat = void 0;
|
|
5
|
-
const tslib_1 = require("../../../../internal/tslib.js");
|
|
6
|
-
const resource_1 = require("../../../../core/resource.js");
|
|
7
|
-
const FilesAPI = tslib_1.__importStar(require("./files.js"));
|
|
8
|
-
const files_1 = require("./files.js");
|
|
9
|
-
const headers_1 = require("../../../../internal/headers.js");
|
|
10
|
-
const path_1 = require("../../../../internal/utils/path.js");
|
|
11
|
-
/**
|
|
12
|
-
* Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
|
|
13
|
-
*/
|
|
14
|
-
class Chat extends resource_1.APIResource {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.files = new FilesAPI.Files(this._client);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Creates a persistent OpenCode chat session backed by a Daytona runtime. Session
|
|
21
|
-
* state is retained and can be resumed or recovered across requests.
|
|
22
|
-
*/
|
|
23
|
-
create(body = {}, options) {
|
|
24
|
-
return this._client.post('/agent/v2/chat', { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Terminates the active Daytona runtime (if any), then marks the chat as ended.
|
|
28
|
-
*/
|
|
29
|
-
delete(id, options) {
|
|
30
|
-
return this._client.delete((0, path_1.path) `/agent/v2/chat/${id}`, options);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Aborts the active OpenCode generation for this Daytona-backed chat session.
|
|
34
|
-
*/
|
|
35
|
-
cancel(id, options) {
|
|
36
|
-
return this._client.post((0, path_1.path) `/agent/v2/chat/${id}/cancel`, options);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Returns a short-lived token that allows browser clients to connect directly to
|
|
40
|
-
* the agent chat SSE stream without exposing the underlying org API key.
|
|
41
|
-
*/
|
|
42
|
-
createStreamToken(id, options) {
|
|
43
|
-
return this._client.post((0, path_1.path) `/agent/v2/chat/${id}/stream-token`, options);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Answers a pending OpenCode question for the Daytona-backed chat session and
|
|
47
|
-
* resumes or recovers the runtime if needed.
|
|
48
|
-
*/
|
|
49
|
-
replyToQuestion(requestID, params, options) {
|
|
50
|
-
const { id, ...body } = params;
|
|
51
|
-
return this._client.post((0, path_1.path) `/agent/v2/chat/${id}/question/${requestID}/reply`, {
|
|
52
|
-
body,
|
|
53
|
-
...options,
|
|
54
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Streams a single assistant turn from a Daytona-backed chat runtime as normalized
|
|
59
|
-
* SSE events with stable turn, message, and part IDs. Emits events:
|
|
60
|
-
* `turn.started`, `turn.status`, `message.created`, `message.part.updated`,
|
|
61
|
-
* `message.completed`, `session.usage`, `turn.completed`.
|
|
62
|
-
*
|
|
63
|
-
* **When to use this endpoint:** Recommended for building custom chat UIs that
|
|
64
|
-
* need real-time streaming progress. This is the primary streaming endpoint for
|
|
65
|
-
* new integrations.
|
|
66
|
-
*
|
|
67
|
-
* **Alternatives:**
|
|
68
|
-
*
|
|
69
|
-
* - `POST /chat/:id/message` — synchronous, returns complete response as JSON
|
|
70
|
-
* (best for server-to-server)
|
|
71
|
-
*/
|
|
72
|
-
respond(id, body, options) {
|
|
73
|
-
return this._client.post((0, path_1.path) `/agent/v2/chat/${id}/respond`, {
|
|
74
|
-
body,
|
|
75
|
-
...options,
|
|
76
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
77
|
-
stream: true,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Sends a message to a Daytona-backed chat runtime and returns the complete
|
|
82
|
-
* response as a single JSON body. Blocks until the assistant turn completes.
|
|
83
|
-
*
|
|
84
|
-
* **When to use this endpoint:** Best for server-to-server integrations,
|
|
85
|
-
* background processing, or any context where you want the full response in one
|
|
86
|
-
* call without managing an SSE stream.
|
|
87
|
-
*
|
|
88
|
-
* **Alternatives:**
|
|
89
|
-
*
|
|
90
|
-
* - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
|
|
91
|
-
* for custom chat UIs)
|
|
92
|
-
*/
|
|
93
|
-
sendMessage(id, body, options) {
|
|
94
|
-
return this._client.post((0, path_1.path) `/agent/v2/chat/${id}/message`, {
|
|
95
|
-
body,
|
|
96
|
-
...options,
|
|
97
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay
|
|
102
|
-
* from buffered events using Last-Event-ID and transparently reconnects stopped or
|
|
103
|
-
* archived runtimes. Accepts either Bearer token auth or a short-lived stream
|
|
104
|
-
* token via query parameter. When both are provided, Bearer auth takes precedence.
|
|
105
|
-
*/
|
|
106
|
-
stream(id, query = {}, options) {
|
|
107
|
-
return this._client.get((0, path_1.path) `/agent/v2/chat/${id}/stream`, {
|
|
108
|
-
query,
|
|
109
|
-
...options,
|
|
110
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
111
|
-
stream: true,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.Chat = Chat;
|
|
116
|
-
Chat.Files = files_1.Files;
|
|
117
|
-
//# sourceMappingURL=chat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,2DAAwD;AACxD,6DAAoC;AACpC,sCAAsE;AAGtE,6DAA4D;AAE5D,6DAAuD;AAEvD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuH3D,CAAC;IArHC;;;OAGG;IACH,MAAM,CACJ,OAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE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EAAE,OAAO,CAAC,CAAC;YAC1E,MAAM,EAAE,IAAI;SACb,CAA4C,CAAC;IAChD,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAU,EAAE,IAA2B,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,UAAU,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,QAAsC,EAAE,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,SAAS,EAAE;YACzD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC1E,MAAM,EAAE,IAAI;SACb,CAA2C,CAAC;IAC/C,CAAC;CACF;AAxHD,oBAwHC;AA6JD,IAAI,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -1,112 +0,0 @@
|
|
|
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
|
-
* Returns a short-lived token that allows browser clients to connect directly to
|
|
36
|
-
* the agent chat SSE stream without exposing the underlying org API key.
|
|
37
|
-
*/
|
|
38
|
-
createStreamToken(id, options) {
|
|
39
|
-
return this._client.post(path `/agent/v2/chat/${id}/stream-token`, options);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Answers a pending OpenCode question for the Daytona-backed chat session and
|
|
43
|
-
* resumes or recovers the runtime if needed.
|
|
44
|
-
*/
|
|
45
|
-
replyToQuestion(requestID, params, options) {
|
|
46
|
-
const { id, ...body } = params;
|
|
47
|
-
return this._client.post(path `/agent/v2/chat/${id}/question/${requestID}/reply`, {
|
|
48
|
-
body,
|
|
49
|
-
...options,
|
|
50
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Streams a single assistant turn from a Daytona-backed chat runtime as normalized
|
|
55
|
-
* SSE events with stable turn, message, and part IDs. Emits events:
|
|
56
|
-
* `turn.started`, `turn.status`, `message.created`, `message.part.updated`,
|
|
57
|
-
* `message.completed`, `session.usage`, `turn.completed`.
|
|
58
|
-
*
|
|
59
|
-
* **When to use this endpoint:** Recommended for building custom chat UIs that
|
|
60
|
-
* need real-time streaming progress. This is the primary streaming endpoint for
|
|
61
|
-
* new integrations.
|
|
62
|
-
*
|
|
63
|
-
* **Alternatives:**
|
|
64
|
-
*
|
|
65
|
-
* - `POST /chat/:id/message` — synchronous, returns complete response as JSON
|
|
66
|
-
* (best for server-to-server)
|
|
67
|
-
*/
|
|
68
|
-
respond(id, body, options) {
|
|
69
|
-
return this._client.post(path `/agent/v2/chat/${id}/respond`, {
|
|
70
|
-
body,
|
|
71
|
-
...options,
|
|
72
|
-
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
73
|
-
stream: true,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Sends a message to a Daytona-backed chat runtime and returns the complete
|
|
78
|
-
* response as a single JSON body. Blocks until the assistant turn completes.
|
|
79
|
-
*
|
|
80
|
-
* **When to use this endpoint:** Best for server-to-server integrations,
|
|
81
|
-
* background processing, or any context where you want the full response in one
|
|
82
|
-
* call without managing an SSE stream.
|
|
83
|
-
*
|
|
84
|
-
* **Alternatives:**
|
|
85
|
-
*
|
|
86
|
-
* - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
|
|
87
|
-
* for custom chat UIs)
|
|
88
|
-
*/
|
|
89
|
-
sendMessage(id, body, options) {
|
|
90
|
-
return this._client.post(path `/agent/v2/chat/${id}/message`, {
|
|
91
|
-
body,
|
|
92
|
-
...options,
|
|
93
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay
|
|
98
|
-
* from buffered events using Last-Event-ID and transparently reconnects stopped or
|
|
99
|
-
* archived runtimes. Accepts either Bearer token auth or a short-lived stream
|
|
100
|
-
* token via query parameter. When both are provided, Bearer auth takes precedence.
|
|
101
|
-
*/
|
|
102
|
-
stream(id, query = {}, options) {
|
|
103
|
-
return this._client.get(path `/agent/v2/chat/${id}/stream`, {
|
|
104
|
-
query,
|
|
105
|
-
...options,
|
|
106
|
-
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
107
|
-
stream: true,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
Chat.Files = Files;
|
|
112
|
-
//# sourceMappingURL=chat.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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;IAuH3D,CAAC;IArHC;;;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,CAA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M,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,QAAsC,EAAE,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,SAAS,EAAE;YACzD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC1E,MAAM,EAAE,IAAI;SACb,CAA2C,CAAC;IAC/C,CAAC;CACF;AA6JD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatCreateStreamTokenResponse, 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
|
|
@@ -1 +0,0 @@
|
|
|
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,6BAA6B,EAClC,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"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Chat, type ChatCreateResponse, type ChatDeleteResponse, type ChatCancelResponse, type ChatCreateStreamTokenResponse, 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
|
|
@@ -1 +0,0 @@
|
|
|
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,6BAA6B,EAClC,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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/agent/v2/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAagB;AAZd,4FAAA,IAAI,OAAA;AAaN,oCAAgF;AAAvE,8FAAA,KAAK,OAAA"}
|