casedev 0.67.2 → 0.68.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.
Files changed (157) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agent/agent.d.mts +0 -4
  10. package/resources/agent/agent.d.mts.map +1 -1
  11. package/resources/agent/agent.d.ts +0 -4
  12. package/resources/agent/agent.d.ts.map +1 -1
  13. package/resources/agent/agent.js +0 -4
  14. package/resources/agent/agent.js.map +1 -1
  15. package/resources/agent/agent.mjs +0 -4
  16. package/resources/agent/agent.mjs.map +1 -1
  17. package/resources/agent/index.d.mts +0 -1
  18. package/resources/agent/index.d.mts.map +1 -1
  19. package/resources/agent/index.d.ts +0 -1
  20. package/resources/agent/index.d.ts.map +1 -1
  21. package/resources/agent/index.js +3 -5
  22. package/resources/agent/index.js.map +1 -1
  23. package/resources/agent/index.mjs +0 -1
  24. package/resources/agent/index.mjs.map +1 -1
  25. package/resources/agent/v1/index.d.mts +0 -1
  26. package/resources/agent/v1/index.d.mts.map +1 -1
  27. package/resources/agent/v1/index.d.ts +0 -1
  28. package/resources/agent/v1/index.d.ts.map +1 -1
  29. package/resources/agent/v1/index.js +1 -3
  30. package/resources/agent/v1/index.js.map +1 -1
  31. package/resources/agent/v1/index.mjs +0 -1
  32. package/resources/agent/v1/index.mjs.map +1 -1
  33. package/resources/agent/v1/v1.d.mts +0 -4
  34. package/resources/agent/v1/v1.d.mts.map +1 -1
  35. package/resources/agent/v1/v1.d.ts +0 -4
  36. package/resources/agent/v1/v1.d.ts.map +1 -1
  37. package/resources/agent/v1/v1.js +0 -4
  38. package/resources/agent/v1/v1.js.map +1 -1
  39. package/resources/agent/v1/v1.mjs +0 -4
  40. package/resources/agent/v1/v1.mjs.map +1 -1
  41. package/resources/index.d.mts +1 -1
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +1 -1
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js.map +1 -1
  46. package/resources/index.mjs.map +1 -1
  47. package/resources/skills/index.d.mts +1 -1
  48. package/resources/skills/index.d.mts.map +1 -1
  49. package/resources/skills/index.d.ts +1 -1
  50. package/resources/skills/index.d.ts.map +1 -1
  51. package/resources/skills/index.js.map +1 -1
  52. package/resources/skills/index.mjs.map +1 -1
  53. package/resources/skills/skills.d.mts +67 -1
  54. package/resources/skills/skills.d.mts.map +1 -1
  55. package/resources/skills/skills.d.ts +67 -1
  56. package/resources/skills/skills.d.ts.map +1 -1
  57. package/resources/skills/skills.js +7 -0
  58. package/resources/skills/skills.js.map +1 -1
  59. package/resources/skills/skills.mjs +7 -0
  60. package/resources/skills/skills.mjs.map +1 -1
  61. package/resources/vault/objects.d.mts +10 -0
  62. package/resources/vault/objects.d.mts.map +1 -1
  63. package/resources/vault/objects.d.ts +10 -0
  64. package/resources/vault/objects.d.ts.map +1 -1
  65. package/resources/vault/vault.d.mts +10 -0
  66. package/resources/vault/vault.d.mts.map +1 -1
  67. package/resources/vault/vault.d.ts +10 -0
  68. package/resources/vault/vault.d.ts.map +1 -1
  69. package/resources/vault/vault.js.map +1 -1
  70. package/resources/vault/vault.mjs.map +1 -1
  71. package/src/client.ts +4 -0
  72. package/src/resources/agent/agent.ts +0 -6
  73. package/src/resources/agent/index.ts +0 -1
  74. package/src/resources/agent/v1/index.ts +0 -13
  75. package/src/resources/agent/v1/v1.ts +0 -30
  76. package/src/resources/index.ts +2 -0
  77. package/src/resources/skills/index.ts +2 -0
  78. package/src/resources/skills/skills.ts +104 -0
  79. package/src/resources/vault/objects.ts +12 -0
  80. package/src/resources/vault/vault.ts +12 -0
  81. package/src/version.ts +1 -1
  82. package/version.d.mts +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
  85. package/version.mjs +1 -1
  86. package/resources/agent/skills/index.d.mts +0 -3
  87. package/resources/agent/skills/index.d.mts.map +0 -1
  88. package/resources/agent/skills/index.d.ts +0 -3
  89. package/resources/agent/skills/index.d.ts.map +0 -1
  90. package/resources/agent/skills/index.js +0 -9
  91. package/resources/agent/skills/index.js.map +0 -1
  92. package/resources/agent/skills/index.mjs +0 -4
  93. package/resources/agent/skills/index.mjs.map +0 -1
  94. package/resources/agent/skills/namespaces.d.mts +0 -66
  95. package/resources/agent/skills/namespaces.d.mts.map +0 -1
  96. package/resources/agent/skills/namespaces.d.ts +0 -66
  97. package/resources/agent/skills/namespaces.d.ts.map +0 -1
  98. package/resources/agent/skills/namespaces.js +0 -84
  99. package/resources/agent/skills/namespaces.js.map +0 -1
  100. package/resources/agent/skills/namespaces.mjs +0 -80
  101. package/resources/agent/skills/namespaces.mjs.map +0 -1
  102. package/resources/agent/skills/skills.d.mts +0 -10
  103. package/resources/agent/skills/skills.d.mts.map +0 -1
  104. package/resources/agent/skills/skills.d.ts +0 -10
  105. package/resources/agent/skills/skills.d.ts.map +0 -1
  106. package/resources/agent/skills/skills.js +0 -17
  107. package/resources/agent/skills/skills.js.map +0 -1
  108. package/resources/agent/skills/skills.mjs +0 -12
  109. package/resources/agent/skills/skills.mjs.map +0 -1
  110. package/resources/agent/skills.d.mts +0 -2
  111. package/resources/agent/skills.d.mts.map +0 -1
  112. package/resources/agent/skills.d.ts +0 -2
  113. package/resources/agent/skills.d.ts.map +0 -1
  114. package/resources/agent/skills.js +0 -6
  115. package/resources/agent/skills.js.map +0 -1
  116. package/resources/agent/skills.mjs +0 -3
  117. package/resources/agent/skills.mjs.map +0 -1
  118. package/resources/agent/v1/chat/chat.d.mts +0 -163
  119. package/resources/agent/v1/chat/chat.d.mts.map +0 -1
  120. package/resources/agent/v1/chat/chat.d.ts +0 -163
  121. package/resources/agent/v1/chat/chat.d.ts.map +0 -1
  122. package/resources/agent/v1/chat/chat.js +0 -109
  123. package/resources/agent/v1/chat/chat.js.map +0 -1
  124. package/resources/agent/v1/chat/chat.mjs +0 -104
  125. package/resources/agent/v1/chat/chat.mjs.map +0 -1
  126. package/resources/agent/v1/chat/files.d.mts +0 -42
  127. package/resources/agent/v1/chat/files.d.mts.map +0 -1
  128. package/resources/agent/v1/chat/files.d.ts +0 -42
  129. package/resources/agent/v1/chat/files.d.ts.map +0 -1
  130. package/resources/agent/v1/chat/files.js +0 -33
  131. package/resources/agent/v1/chat/files.js.map +0 -1
  132. package/resources/agent/v1/chat/files.mjs +0 -29
  133. package/resources/agent/v1/chat/files.mjs.map +0 -1
  134. package/resources/agent/v1/chat/index.d.mts +0 -3
  135. package/resources/agent/v1/chat/index.d.mts.map +0 -1
  136. package/resources/agent/v1/chat/index.d.ts +0 -3
  137. package/resources/agent/v1/chat/index.d.ts.map +0 -1
  138. package/resources/agent/v1/chat/index.js +0 -9
  139. package/resources/agent/v1/chat/index.js.map +0 -1
  140. package/resources/agent/v1/chat/index.mjs +0 -4
  141. package/resources/agent/v1/chat/index.mjs.map +0 -1
  142. package/resources/agent/v1/chat.d.mts +0 -2
  143. package/resources/agent/v1/chat.d.mts.map +0 -1
  144. package/resources/agent/v1/chat.d.ts +0 -2
  145. package/resources/agent/v1/chat.d.ts.map +0 -1
  146. package/resources/agent/v1/chat.js +0 -6
  147. package/resources/agent/v1/chat.js.map +0 -1
  148. package/resources/agent/v1/chat.mjs +0 -3
  149. package/resources/agent/v1/chat.mjs.map +0 -1
  150. package/src/resources/agent/skills/index.ts +0 -4
  151. package/src/resources/agent/skills/namespaces.ts +0 -126
  152. package/src/resources/agent/skills/skills.ts +0 -19
  153. package/src/resources/agent/skills.ts +0 -3
  154. package/src/resources/agent/v1/chat/chat.ts +0 -267
  155. package/src/resources/agent/v1/chat/files.ts +0 -63
  156. package/src/resources/agent/v1/chat/index.ts +0 -16
  157. package/src/resources/agent/v1/chat.ts +0 -3
@@ -1,4 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export { Namespaces, type NamespaceCreateParams, type NamespacePublishParams } from './namespaces';
4
- export { Skills } from './skills';
@@ -1,126 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import { APIPromise } from '../../../core/api-promise';
5
- import { buildHeaders } from '../../../internal/headers';
6
- import { RequestOptions } from '../../../internal/request-options';
7
- import { path } from '../../../internal/utils/path';
8
-
9
- /**
10
- * Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
11
- */
12
- export class Namespaces extends APIResource {
13
- /**
14
- * Create a private skill namespace owned by the authenticated org and receive a
15
- * one-time bearer token used by the case-skills publisher.
16
- */
17
- create(body: NamespaceCreateParams, options?: RequestOptions): APIPromise<void> {
18
- return this._client.post('/agent/skills/namespaces', {
19
- body,
20
- ...options,
21
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
22
- });
23
- }
24
-
25
- /**
26
- * Read skill namespace
27
- */
28
- retrieve(id: string, options?: RequestOptions): APIPromise<void> {
29
- return this._client.get(path`/agent/skills/namespaces/${id}`, {
30
- ...options,
31
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
32
- });
33
- }
34
-
35
- /**
36
- * List all active skill namespaces owned by the authenticated organization.
37
- */
38
- list(options?: RequestOptions): APIPromise<void> {
39
- return this._client.get('/agent/skills/namespaces', {
40
- ...options,
41
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
42
- });
43
- }
44
-
45
- /**
46
- * Delete skill namespace
47
- */
48
- delete(id: string, options?: RequestOptions): APIPromise<void> {
49
- return this._client.delete(path`/agent/skills/namespaces/${id}`, {
50
- ...options,
51
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
52
- });
53
- }
54
-
55
- /**
56
- * Upload a tree of skill files for the namespace. Authenticated by the namespace
57
- * bearer token. Atomic at the version-bump level: a partial upload leaves the
58
- * namespace pinned to the previous version.
59
- */
60
- publish(id: string, body: NamespacePublishParams, options?: RequestOptions): APIPromise<void> {
61
- return this._client.post(path`/agent/skills/namespaces/${id}/publish`, {
62
- body,
63
- ...options,
64
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
65
- });
66
- }
67
-
68
- /**
69
- * Returns the active version's file manifest with short-lived presigned S3 URLs.
70
- * Sandboxes use this to materialize the tree at /workspace/.agents/skills/ before
71
- * opencode boots.
72
- */
73
- pull(id: string, options?: RequestOptions): APIPromise<void> {
74
- return this._client.get(path`/agent/skills/namespaces/${id}/pull`, {
75
- ...options,
76
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
77
- });
78
- }
79
-
80
- /**
81
- * Rotate skill namespace token
82
- */
83
- rotateToken(id: string, options?: RequestOptions): APIPromise<void> {
84
- return this._client.post(path`/agent/skills/namespaces/${id}/rotate-token`, {
85
- ...options,
86
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
87
- });
88
- }
89
- }
90
-
91
- export interface NamespaceCreateParams {
92
- /**
93
- * URL-safe slug, e.g. "curi" or "client-firm-abc". Lowercase alphanumeric with
94
- * single hyphens, 2-64 chars.
95
- */
96
- namespaceId: string;
97
-
98
- description?: string | null;
99
-
100
- label?: string | null;
101
-
102
- metadata?: unknown | null;
103
- }
104
-
105
- export interface NamespacePublishParams {
106
- files: Array<NamespacePublishParams.File>;
107
- }
108
-
109
- export namespace NamespacePublishParams {
110
- export interface File {
111
- content: string;
112
-
113
- encoding: 'utf8' | 'base64';
114
-
115
- path: string;
116
-
117
- contentType?: string | null;
118
- }
119
- }
120
-
121
- export declare namespace Namespaces {
122
- export {
123
- type NamespaceCreateParams as NamespaceCreateParams,
124
- type NamespacePublishParams as NamespacePublishParams,
125
- };
126
- }
@@ -1,19 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import * as NamespacesAPI from './namespaces';
5
- import { NamespaceCreateParams, NamespacePublishParams, Namespaces } from './namespaces';
6
-
7
- export class Skills extends APIResource {
8
- namespaces: NamespacesAPI.Namespaces = new NamespacesAPI.Namespaces(this._client);
9
- }
10
-
11
- Skills.Namespaces = Namespaces;
12
-
13
- export declare namespace Skills {
14
- export {
15
- Namespaces as Namespaces,
16
- type NamespaceCreateParams as NamespaceCreateParams,
17
- type NamespacePublishParams as NamespacePublishParams,
18
- };
19
- }
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './skills/index';
@@ -1,267 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../../core/resource';
4
- import * as FilesAPI from './files';
5
- import { FileDownloadParams, FileListResponse, Files } from './files';
6
- import { APIPromise } from '../../../../core/api-promise';
7
- import { Stream } from '../../../../core/streaming';
8
- import { buildHeaders } from '../../../../internal/headers';
9
- import { RequestOptions } from '../../../../internal/request-options';
10
- import { path } from '../../../../internal/utils/path';
11
-
12
- /**
13
- * Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
14
- */
15
- export class Chat extends APIResource {
16
- files: FilesAPI.Files = new FilesAPI.Files(this._client);
17
-
18
- /**
19
- * Creates a persistent chat session backed by a Daytona or Vercel runtime. Session
20
- * state is retained and can be resumed or recovered across requests.
21
- */
22
- create(
23
- body: ChatCreateParams | null | undefined = {},
24
- options?: RequestOptions,
25
- ): APIPromise<ChatCreateResponse> {
26
- return this._client.post('/agent/v1/chat', { body, ...options });
27
- }
28
-
29
- /**
30
- * Snapshots and terminates the active sandbox (if any), then marks the chat as
31
- * ended.
32
- */
33
- delete(id: string, options?: RequestOptions): APIPromise<ChatDeleteResponse> {
34
- return this._client.delete(path`/agent/v1/chat/${id}`, options);
35
- }
36
-
37
- /**
38
- * Aborts the active generation for this chat session.
39
- */
40
- cancel(id: string, options?: RequestOptions): APIPromise<ChatCancelResponse> {
41
- return this._client.post(path`/agent/v1/chat/${id}/cancel`, options);
42
- }
43
-
44
- /**
45
- * Answers a pending runtime question for the chat session bound to this agent
46
- * chat.
47
- */
48
- replyToQuestion(
49
- requestID: string,
50
- params: ChatReplyToQuestionParams,
51
- options?: RequestOptions,
52
- ): APIPromise<void> {
53
- const { id, ...body } = params;
54
- return this._client.post(path`/agent/v1/chat/${id}/question/${requestID}/reply`, {
55
- body,
56
- ...options,
57
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
58
- });
59
- }
60
-
61
- /**
62
- * Streams a single assistant turn as normalized SSE events with stable turn,
63
- * message, and part IDs. Emits events: `turn.started`, `turn.status`,
64
- * `message.created`, `message.part.updated`, `message.completed`, `session.usage`,
65
- * `turn.completed`.
66
- *
67
- * **When to use this endpoint:** Recommended for building custom chat UIs that
68
- * need real-time streaming progress. This is the primary streaming endpoint for
69
- * new integrations.
70
- *
71
- * **Alternatives:**
72
- *
73
- * - `POST /chat/:id/message` — synchronous, returns complete response as JSON
74
- * (best for server-to-server)
75
- */
76
- respond(
77
- id: string,
78
- body: ChatRespondParams,
79
- options?: RequestOptions,
80
- ): APIPromise<Stream<ChatRespondResponse>> {
81
- return this._client.post(path`/agent/v1/chat/${id}/respond`, {
82
- body,
83
- ...options,
84
- headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
85
- stream: true,
86
- }) as APIPromise<Stream<ChatRespondResponse>>;
87
- }
88
-
89
- /**
90
- * Sends a message and returns the complete response as a single JSON body. Blocks
91
- * until the agent turn completes.
92
- *
93
- * **When to use this endpoint:** Best for server-to-server integrations,
94
- * background processing, or any context where you want the full response in one
95
- * call without managing an SSE stream.
96
- *
97
- * **Alternatives:**
98
- *
99
- * - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
100
- * for custom chat UIs)
101
- */
102
- sendMessage(id: string, body: ChatSendMessageParams, options?: RequestOptions): APIPromise<void> {
103
- return this._client.post(path`/agent/v1/chat/${id}/message`, {
104
- body,
105
- ...options,
106
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
107
- });
108
- }
109
-
110
- /**
111
- * Relays runtime SSE events for this chat. Supports replay from buffered events
112
- * using Last-Event-ID.
113
- */
114
- stream(
115
- id: string,
116
- query: ChatStreamParams | undefined = {},
117
- options?: RequestOptions,
118
- ): APIPromise<Stream<ChatStreamResponse>> {
119
- return this._client.get(path`/agent/v1/chat/${id}/stream`, {
120
- query,
121
- ...options,
122
- headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
123
- stream: true,
124
- }) as APIPromise<Stream<ChatStreamResponse>>;
125
- }
126
- }
127
-
128
- export interface ChatCreateResponse {
129
- id?: string;
130
-
131
- createdAt?: string;
132
-
133
- idleTimeoutMs?: number;
134
-
135
- status?: string;
136
- }
137
-
138
- export interface ChatDeleteResponse {
139
- id?: string;
140
-
141
- cost?: number;
142
-
143
- runtimeMs?: number;
144
-
145
- snapshotImageId?: string | null;
146
-
147
- status?: string;
148
- }
149
-
150
- export interface ChatCancelResponse {
151
- id?: string;
152
-
153
- ok?: boolean;
154
- }
155
-
156
- export type ChatRespondResponse = string;
157
-
158
- export type ChatStreamResponse = string;
159
-
160
- export interface ChatCreateParams {
161
- /**
162
- * Idle timeout before session is eligible for snapshot/termination. Defaults to 15
163
- * minutes.
164
- */
165
- idleTimeoutMs?: number | null;
166
-
167
- /**
168
- * Optional model override for the chat runtime session
169
- */
170
- model?: string | null;
171
-
172
- /**
173
- * Optional human-readable session title
174
- */
175
- title?: string;
176
-
177
- /**
178
- * Restrict the chat session to specific vault IDs
179
- */
180
- vaultIds?: Array<string> | null;
181
- }
182
-
183
- export interface ChatReplyToQuestionParams {
184
- /**
185
- * Path param: Chat session ID
186
- */
187
- id: string;
188
-
189
- /**
190
- * Body param: Answer selections for each prompt element in the pending question
191
- */
192
- answers: Array<Array<string>>;
193
- }
194
-
195
- export interface ChatRespondParams {
196
- /**
197
- * Message content parts. Currently only "text" type is supported. Additional types
198
- * (e.g. file, image) may be added in future versions.
199
- */
200
- parts?: Array<ChatRespondParams.Part>;
201
- }
202
-
203
- export namespace ChatRespondParams {
204
- export interface Part {
205
- /**
206
- * The message text content
207
- */
208
- text: string;
209
-
210
- /**
211
- * Part type. Currently only "text" is supported.
212
- */
213
- type: 'text';
214
- }
215
- }
216
-
217
- export interface ChatSendMessageParams {
218
- /**
219
- * Message content parts. Currently only "text" type is supported. Additional types
220
- * (e.g. file, image) may be added in future versions.
221
- */
222
- parts?: Array<ChatSendMessageParams.Part>;
223
- }
224
-
225
- export namespace ChatSendMessageParams {
226
- export interface Part {
227
- /**
228
- * The message text content
229
- */
230
- text: string;
231
-
232
- /**
233
- * Part type. Currently only "text" is supported.
234
- */
235
- type: 'text';
236
- }
237
- }
238
-
239
- export interface ChatStreamParams {
240
- /**
241
- * Replay events after this sequence number
242
- */
243
- lastEventId?: number;
244
- }
245
-
246
- Chat.Files = Files;
247
-
248
- export declare namespace Chat {
249
- export {
250
- type ChatCreateResponse as ChatCreateResponse,
251
- type ChatDeleteResponse as ChatDeleteResponse,
252
- type ChatCancelResponse as ChatCancelResponse,
253
- type ChatRespondResponse as ChatRespondResponse,
254
- type ChatStreamResponse as ChatStreamResponse,
255
- type ChatCreateParams as ChatCreateParams,
256
- type ChatReplyToQuestionParams as ChatReplyToQuestionParams,
257
- type ChatRespondParams as ChatRespondParams,
258
- type ChatSendMessageParams as ChatSendMessageParams,
259
- type ChatStreamParams as ChatStreamParams,
260
- };
261
-
262
- export {
263
- Files as Files,
264
- type FileListResponse as FileListResponse,
265
- type FileDownloadParams as FileDownloadParams,
266
- };
267
- }
@@ -1,63 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../../core/resource';
4
- import { APIPromise } from '../../../../core/api-promise';
5
- import { buildHeaders } from '../../../../internal/headers';
6
- import { RequestOptions } from '../../../../internal/request-options';
7
- import { path } from '../../../../internal/utils/path';
8
-
9
- /**
10
- * Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
11
- */
12
- export class Files extends APIResource {
13
- /**
14
- * Lists files created by the agent in the sandbox workspace. Only available while
15
- * the sandbox is running.
16
- */
17
- list(id: string, options?: RequestOptions): APIPromise<FileListResponse> {
18
- return this._client.get(path`/agent/v1/chat/${id}/files`, options);
19
- }
20
-
21
- /**
22
- * Downloads a file from the sandbox workspace by path. Only available while the
23
- * sandbox is running.
24
- */
25
- download(filePath: string, params: FileDownloadParams, options?: RequestOptions): APIPromise<Response> {
26
- const { id } = params;
27
- return this._client.get(path`/agent/v1/chat/${id}/files/${filePath}`, {
28
- ...options,
29
- headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
30
- __binaryResponse: true,
31
- });
32
- }
33
- }
34
-
35
- export interface FileListResponse {
36
- chatId?: string;
37
-
38
- files?: Array<FileListResponse.File>;
39
- }
40
-
41
- export namespace FileListResponse {
42
- export interface File {
43
- name?: string;
44
-
45
- /**
46
- * Relative path from /workspace
47
- */
48
- path?: string;
49
-
50
- sizeBytes?: number;
51
- }
52
- }
53
-
54
- export interface FileDownloadParams {
55
- /**
56
- * Chat session ID
57
- */
58
- id: string;
59
- }
60
-
61
- export declare namespace Files {
62
- export { type FileListResponse as FileListResponse, type FileDownloadParams as FileDownloadParams };
63
- }
@@ -1,16 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export {
4
- Chat,
5
- type ChatCreateResponse,
6
- type ChatDeleteResponse,
7
- type ChatCancelResponse,
8
- type ChatRespondResponse,
9
- type ChatStreamResponse,
10
- type ChatCreateParams,
11
- type ChatReplyToQuestionParams,
12
- type ChatRespondParams,
13
- type ChatSendMessageParams,
14
- type ChatStreamParams,
15
- } from './chat';
16
- export { Files, type FileListResponse, type FileDownloadParams } from './files';
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './chat/index';