casedev 0.67.1 → 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 +20 -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,163 +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 chat session backed by a Daytona or Vercel 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
- * Snapshots and terminates the active sandbox (if any), then marks the chat as
19
- * ended.
20
- */
21
- delete(id: string, options?: RequestOptions): APIPromise<ChatDeleteResponse>;
22
- /**
23
- * Aborts the active generation for this chat session.
24
- */
25
- cancel(id: string, options?: RequestOptions): APIPromise<ChatCancelResponse>;
26
- /**
27
- * Answers a pending runtime question for the chat session bound to this agent
28
- * chat.
29
- */
30
- replyToQuestion(requestID: string, params: ChatReplyToQuestionParams, options?: RequestOptions): APIPromise<void>;
31
- /**
32
- * Streams a single assistant turn as normalized SSE events with stable turn,
33
- * message, and part IDs. Emits events: `turn.started`, `turn.status`,
34
- * `message.created`, `message.part.updated`, `message.completed`, `session.usage`,
35
- * `turn.completed`.
36
- *
37
- * **When to use this endpoint:** Recommended for building custom chat UIs that
38
- * need real-time streaming progress. This is the primary streaming endpoint for
39
- * new integrations.
40
- *
41
- * **Alternatives:**
42
- *
43
- * - `POST /chat/:id/message` — synchronous, returns complete response as JSON
44
- * (best for server-to-server)
45
- */
46
- respond(id: string, body: ChatRespondParams, options?: RequestOptions): APIPromise<Stream<ChatRespondResponse>>;
47
- /**
48
- * Sends a message and returns the complete response as a single JSON body. Blocks
49
- * until the agent turn completes.
50
- *
51
- * **When to use this endpoint:** Best for server-to-server integrations,
52
- * background processing, or any context where you want the full response in one
53
- * call without managing an SSE stream.
54
- *
55
- * **Alternatives:**
56
- *
57
- * - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
58
- * for custom chat UIs)
59
- */
60
- sendMessage(id: string, body: ChatSendMessageParams, options?: RequestOptions): APIPromise<void>;
61
- /**
62
- * Relays runtime SSE events for this chat. Supports replay from buffered events
63
- * using Last-Event-ID.
64
- */
65
- stream(id: string, query?: ChatStreamParams | undefined, options?: RequestOptions): APIPromise<Stream<ChatStreamResponse>>;
66
- }
67
- export interface ChatCreateResponse {
68
- id?: string;
69
- createdAt?: string;
70
- idleTimeoutMs?: number;
71
- status?: string;
72
- }
73
- export interface ChatDeleteResponse {
74
- id?: string;
75
- cost?: number;
76
- runtimeMs?: number;
77
- snapshotImageId?: string | null;
78
- status?: string;
79
- }
80
- export interface ChatCancelResponse {
81
- id?: string;
82
- ok?: boolean;
83
- }
84
- export type ChatRespondResponse = string;
85
- export type ChatStreamResponse = string;
86
- export interface ChatCreateParams {
87
- /**
88
- * Idle timeout before session is eligible for snapshot/termination. Defaults to 15
89
- * minutes.
90
- */
91
- idleTimeoutMs?: number | null;
92
- /**
93
- * Optional model override for the chat runtime session
94
- */
95
- model?: string | null;
96
- /**
97
- * Optional human-readable session title
98
- */
99
- title?: string;
100
- /**
101
- * Restrict the chat session to specific vault IDs
102
- */
103
- vaultIds?: Array<string> | null;
104
- }
105
- export interface ChatReplyToQuestionParams {
106
- /**
107
- * Path param: Chat session ID
108
- */
109
- id: string;
110
- /**
111
- * Body param: Answer selections for each prompt element in the pending question
112
- */
113
- answers: Array<Array<string>>;
114
- }
115
- export interface ChatRespondParams {
116
- /**
117
- * Message content parts. Currently only "text" type is supported. Additional types
118
- * (e.g. file, image) may be added in future versions.
119
- */
120
- parts?: Array<ChatRespondParams.Part>;
121
- }
122
- export declare namespace ChatRespondParams {
123
- interface Part {
124
- /**
125
- * The message text content
126
- */
127
- text: string;
128
- /**
129
- * Part type. Currently only "text" is supported.
130
- */
131
- type: 'text';
132
- }
133
- }
134
- export interface ChatSendMessageParams {
135
- /**
136
- * Message content parts. Currently only "text" type is supported. Additional types
137
- * (e.g. file, image) may be added in future versions.
138
- */
139
- parts?: Array<ChatSendMessageParams.Part>;
140
- }
141
- export declare namespace ChatSendMessageParams {
142
- interface Part {
143
- /**
144
- * The message text content
145
- */
146
- text: string;
147
- /**
148
- * Part type. Currently only "text" is supported.
149
- */
150
- type: 'text';
151
- }
152
- }
153
- export interface ChatStreamParams {
154
- /**
155
- * Replay events after this sequence number
156
- */
157
- lastEventId?: number;
158
- }
159
- export declare namespace Chat {
160
- export { type ChatCreateResponse as ChatCreateResponse, type ChatDeleteResponse as ChatDeleteResponse, type ChatCancelResponse as ChatCancelResponse, 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, };
161
- export { Files as Files, type FileListResponse as FileListResponse, type FileDownloadParams as FileDownloadParams, };
162
- }
163
- //# sourceMappingURL=chat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/resources/agent/v1/chat/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,EAAE,mBAAgB;AACtE,OAAO,EAAE,UAAU,EAAE,wCAAqC;AAC1D,OAAO,EAAE,MAAM,EAAE,sCAAmC;AAEpD,OAAO,EAAE,cAAc,EAAE,gDAA6C;AAGtE;;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,E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gB;IAC/B;;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,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,109 +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 chat session backed by a Daytona or Vercel 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/v1/chat', { body, ...options });
25
- }
26
- /**
27
- * Snapshots and terminates the active sandbox (if any), then marks the chat as
28
- * ended.
29
- */
30
- delete(id, options) {
31
- return this._client.delete((0, path_1.path) `/agent/v1/chat/${id}`, options);
32
- }
33
- /**
34
- * Aborts the active generation for this chat session.
35
- */
36
- cancel(id, options) {
37
- return this._client.post((0, path_1.path) `/agent/v1/chat/${id}/cancel`, options);
38
- }
39
- /**
40
- * Answers a pending runtime question for the chat session bound to this agent
41
- * chat.
42
- */
43
- replyToQuestion(requestID, params, options) {
44
- const { id, ...body } = params;
45
- return this._client.post((0, path_1.path) `/agent/v1/chat/${id}/question/${requestID}/reply`, {
46
- body,
47
- ...options,
48
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
49
- });
50
- }
51
- /**
52
- * Streams a single assistant turn as normalized SSE events with stable turn,
53
- * message, and part IDs. Emits events: `turn.started`, `turn.status`,
54
- * `message.created`, `message.part.updated`, `message.completed`, `session.usage`,
55
- * `turn.completed`.
56
- *
57
- * **When to use this endpoint:** Recommended for building custom chat UIs that
58
- * need real-time streaming progress. This is the primary streaming endpoint for
59
- * new integrations.
60
- *
61
- * **Alternatives:**
62
- *
63
- * - `POST /chat/:id/message` — synchronous, returns complete response as JSON
64
- * (best for server-to-server)
65
- */
66
- respond(id, body, options) {
67
- return this._client.post((0, path_1.path) `/agent/v1/chat/${id}/respond`, {
68
- body,
69
- ...options,
70
- headers: (0, headers_1.buildHeaders)([{ Accept: 'text/event-stream' }, options?.headers]),
71
- stream: true,
72
- });
73
- }
74
- /**
75
- * Sends a message and returns the complete response as a single JSON body. Blocks
76
- * until the agent turn completes.
77
- *
78
- * **When to use this endpoint:** Best for server-to-server integrations,
79
- * background processing, or any context where you want the full response in one
80
- * call without managing an SSE stream.
81
- *
82
- * **Alternatives:**
83
- *
84
- * - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
85
- * for custom chat UIs)
86
- */
87
- sendMessage(id, body, options) {
88
- return this._client.post((0, path_1.path) `/agent/v1/chat/${id}/message`, {
89
- body,
90
- ...options,
91
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
92
- });
93
- }
94
- /**
95
- * Relays runtime SSE events for this chat. Supports replay from buffered events
96
- * using Last-Event-ID.
97
- */
98
- stream(id, query = {}, options) {
99
- return this._client.get((0, path_1.path) `/agent/v1/chat/${id}/stream`, {
100
- query,
101
- ...options,
102
- headers: (0, headers_1.buildHeaders)([{ Accept: 'text/event-stream' }, options?.headers]),
103
- stream: true,
104
- });
105
- }
106
- }
107
- exports.Chat = Chat;
108
- Chat.Files = files_1.Files;
109
- //# sourceMappingURL=chat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../src/resources/agent/v1/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;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;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,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,IAAA,WAAI,EAAA,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;I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,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;AA/GD,oBA+GC;AAwHD,IAAI,CAAC,KAAK,GAAG,aAAK,CAAC"}
@@ -1,104 +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 chat session backed by a Daytona or Vercel 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/v1/chat', { body, ...options });
21
- }
22
- /**
23
- * Snapshots and terminates the active sandbox (if any), then marks the chat as
24
- * ended.
25
- */
26
- delete(id, options) {
27
- return this._client.delete(path `/agent/v1/chat/${id}`, options);
28
- }
29
- /**
30
- * Aborts the active generation for this chat session.
31
- */
32
- cancel(id, options) {
33
- return this._client.post(path `/agent/v1/chat/${id}/cancel`, options);
34
- }
35
- /**
36
- * Answers a pending runtime question for the chat session bound to this agent
37
- * chat.
38
- */
39
- replyToQuestion(requestID, params, options) {
40
- const { id, ...body } = params;
41
- return this._client.post(path `/agent/v1/chat/${id}/question/${requestID}/reply`, {
42
- body,
43
- ...options,
44
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
45
- });
46
- }
47
- /**
48
- * Streams a single assistant turn as normalized SSE events with stable turn,
49
- * message, and part IDs. Emits events: `turn.started`, `turn.status`,
50
- * `message.created`, `message.part.updated`, `message.completed`, `session.usage`,
51
- * `turn.completed`.
52
- *
53
- * **When to use this endpoint:** Recommended for building custom chat UIs that
54
- * need real-time streaming progress. This is the primary streaming endpoint for
55
- * new integrations.
56
- *
57
- * **Alternatives:**
58
- *
59
- * - `POST /chat/:id/message` — synchronous, returns complete response as JSON
60
- * (best for server-to-server)
61
- */
62
- respond(id, body, options) {
63
- return this._client.post(path `/agent/v1/chat/${id}/respond`, {
64
- body,
65
- ...options,
66
- headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
67
- stream: true,
68
- });
69
- }
70
- /**
71
- * Sends a message and returns the complete response as a single JSON body. Blocks
72
- * until the agent turn completes.
73
- *
74
- * **When to use this endpoint:** Best for server-to-server integrations,
75
- * background processing, or any context where you want the full response in one
76
- * call without managing an SSE stream.
77
- *
78
- * **Alternatives:**
79
- *
80
- * - `POST /chat/:id/respond` — streaming SSE with normalized events (recommended
81
- * for custom chat UIs)
82
- */
83
- sendMessage(id, body, options) {
84
- return this._client.post(path `/agent/v1/chat/${id}/message`, {
85
- body,
86
- ...options,
87
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
88
- });
89
- }
90
- /**
91
- * Relays runtime SSE events for this chat. Supports replay from buffered events
92
- * using Last-Event-ID.
93
- */
94
- stream(id, query = {}, options) {
95
- return this._client.get(path `/agent/v1/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
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../../src/resources/agent/v1/chat/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,KAAK,QAAQ,oBAAgB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AAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,UAAU,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,OAAO,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,IAAI,CAAA,kBAAkB,EAAE,UAAU,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;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;AAwHD,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 sandbox workspace. Only available while
10
- * the sandbox is running.
11
- */
12
- list(id: string, options?: RequestOptions): APIPromise<FileListResponse>;
13
- /**
14
- * Downloads a file from the sandbox workspace by path. Only available while the
15
- * sandbox is running.
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/v1/chat/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,yCAAqC;AAE1D,OAAO,EAAE,cAAc,EAAE,iDAA6C;AAGtE;;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 sandbox workspace. Only available while
10
- * the sandbox is running.
11
- */
12
- list(id: string, options?: RequestOptions): APIPromise<FileListResponse>;
13
- /**
14
- * Downloads a file from the sandbox workspace by path. Only available while the
15
- * sandbox is running.
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/v1/chat/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,wCAAqC;AAE1D,OAAO,EAAE,cAAc,EAAE,gDAA6C;AAGtE;;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 sandbox workspace. Only available while
14
- * the sandbox is running.
15
- */
16
- list(id, options) {
17
- return this._client.get((0, path_1.path) `/agent/v1/chat/${id}/files`, options);
18
- }
19
- /**
20
- * Downloads a file from the sandbox workspace by path. Only available while the
21
- * sandbox is running.
22
- */
23
- download(filePath, params, options) {
24
- const { id } = params;
25
- return this._client.get((0, path_1.path) `/agent/v1/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/v1/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 sandbox workspace. Only available while
11
- * the sandbox is running.
12
- */
13
- list(id, options) {
14
- return this._client.get(path `/agent/v1/chat/${id}/files`, options);
15
- }
16
- /**
17
- * Downloads a file from the sandbox workspace by path. Only available while the
18
- * sandbox is running.
19
- */
20
- download(filePath, params, options) {
21
- const { id } = params;
22
- return this._client.get(path `/agent/v1/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/v1/chat/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AAExD,OAAO,EAAE,YAAY,EAAE,yCAAqC;AAE5D,OAAO,EAAE,IAAI,EAAE,4CAAwC;AAEvD;;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 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/v1/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,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,mBAAe;AAChB,OAAO,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,oBAAgB"}
@@ -1,3 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/agent/v1/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,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,kBAAe;AAChB,OAAO,EAAE,KAAK,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,mBAAgB"}
@@ -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/v1/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAYgB;AAXd,4FAAA,IAAI,OAAA;AAYN,oCAAgF;AAAvE,8FAAA,KAAK,OAAA"}
@@ -1,4 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { Chat, } from "./chat.mjs";
3
- export { Files } from "./files.mjs";
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/agent/v1/chat/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,IAAI,GAWL,mBAAe;AAChB,OAAO,EAAE,KAAK,EAAkD,oBAAgB"}
@@ -1,2 +0,0 @@
1
- export * from "./chat/index.mjs";
2
- //# sourceMappingURL=chat.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../../src/resources/agent/v1/chat.ts"],"names":[],"mappings":"AAEA,iCAA6B"}
@@ -1,2 +0,0 @@
1
- export * from "./chat/index.js";
2
- //# sourceMappingURL=chat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/resources/agent/v1/chat.ts"],"names":[],"mappings":"AAEA,gCAA6B"}
@@ -1,6 +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
- const tslib_1 = require("../../../internal/tslib.js");
5
- tslib_1.__exportStar(require("./chat/index.js"), exports);
6
- //# sourceMappingURL=chat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../src/resources/agent/v1/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export * from "./chat/index.mjs";
3
- //# sourceMappingURL=chat.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../src/resources/agent/v1/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,iCAA6B"}