@letta-ai/letta-client 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/resources/agents/agents.d.mts +167 -11
  4. package/resources/agents/agents.d.mts.map +1 -1
  5. package/resources/agents/agents.d.ts +167 -11
  6. package/resources/agents/agents.d.ts.map +1 -1
  7. package/resources/agents/agents.js.map +1 -1
  8. package/resources/agents/agents.mjs.map +1 -1
  9. package/resources/agents/messages.d.mts +29 -2
  10. package/resources/agents/messages.d.mts.map +1 -1
  11. package/resources/agents/messages.d.ts +29 -2
  12. package/resources/agents/messages.d.ts.map +1 -1
  13. package/resources/folders/files.d.mts +87 -1
  14. package/resources/folders/files.d.mts.map +1 -1
  15. package/resources/folders/files.d.ts +87 -1
  16. package/resources/folders/files.d.ts.map +1 -1
  17. package/resources/folders/files.js +7 -0
  18. package/resources/folders/files.js.map +1 -1
  19. package/resources/folders/files.mjs +7 -0
  20. package/resources/folders/files.mjs.map +1 -1
  21. package/resources/folders/folders.d.mts +2 -2
  22. package/resources/folders/folders.d.mts.map +1 -1
  23. package/resources/folders/folders.d.ts +2 -2
  24. package/resources/folders/folders.d.ts.map +1 -1
  25. package/resources/folders/folders.js.map +1 -1
  26. package/resources/folders/folders.mjs.map +1 -1
  27. package/resources/folders/index.d.mts +1 -1
  28. package/resources/folders/index.d.mts.map +1 -1
  29. package/resources/folders/index.d.ts +1 -1
  30. package/resources/folders/index.d.ts.map +1 -1
  31. package/resources/folders/index.js.map +1 -1
  32. package/resources/folders/index.mjs.map +1 -1
  33. package/resources/models/models.d.mts +3 -3
  34. package/resources/models/models.d.mts.map +1 -1
  35. package/resources/models/models.d.ts +3 -3
  36. package/resources/models/models.d.ts.map +1 -1
  37. package/resources/models/models.js.map +1 -1
  38. package/resources/models/models.mjs.map +1 -1
  39. package/resources/steps/steps.d.mts +4 -0
  40. package/resources/steps/steps.d.mts.map +1 -1
  41. package/resources/steps/steps.d.ts +4 -0
  42. package/resources/steps/steps.d.ts.map +1 -1
  43. package/resources/steps/steps.js.map +1 -1
  44. package/resources/steps/steps.mjs.map +1 -1
  45. package/src/resources/agents/agents.ts +222 -6
  46. package/src/resources/agents/messages.ts +38 -1
  47. package/src/resources/folders/files.ts +114 -0
  48. package/src/resources/folders/folders.ts +4 -0
  49. package/src/resources/folders/index.ts +2 -0
  50. package/src/resources/models/models.ts +6 -3
  51. package/src/resources/steps/steps.ts +5 -0
  52. package/src/version.ts +1 -1
  53. package/version.d.mts +1 -1
  54. package/version.d.ts +1 -1
  55. package/version.js +1 -1
  56. package/version.mjs +1 -1
@@ -10,6 +10,18 @@ import { multipartFormRequestOptions } from '../../internal/uploads';
10
10
  import { path } from '../../internal/utils/path';
11
11
 
12
12
  export class Files extends APIResource {
13
+ /**
14
+ * Retrieve a file from a folder by ID.
15
+ */
16
+ retrieve(
17
+ fileID: string,
18
+ params: FileRetrieveParams,
19
+ options?: RequestOptions,
20
+ ): APIPromise<FileRetrieveResponse> {
21
+ const { folder_id, ...query } = params;
22
+ return this._client.get(path`/v1/folders/${folder_id}/files/${fileID}`, { query, ...options });
23
+ }
24
+
13
25
  /**
14
26
  * List paginated files associated with a data folder.
15
27
  */
@@ -53,6 +65,94 @@ export class Files extends APIResource {
53
65
 
54
66
  export type FileListResponsesArrayPage = ArrayPage<FileListResponse>;
55
67
 
68
+ /**
69
+ * Representation of a single FileMetadata
70
+ */
71
+ export interface FileRetrieveResponse {
72
+ /**
73
+ * The human-friendly ID of the File
74
+ */
75
+ id: string;
76
+
77
+ /**
78
+ * @deprecated Deprecated: Use `folder_id` field instead. The unique identifier of
79
+ * the source associated with the document.
80
+ */
81
+ source_id: string;
82
+
83
+ /**
84
+ * Number of chunks that have been embedded.
85
+ */
86
+ chunks_embedded?: number | null;
87
+
88
+ /**
89
+ * Optional full-text content of the file; only populated on demand due to its
90
+ * size.
91
+ */
92
+ content?: string | null;
93
+
94
+ /**
95
+ * The creation date of the file.
96
+ */
97
+ created_at?: string | null;
98
+
99
+ /**
100
+ * Optional error message if the file failed processing.
101
+ */
102
+ error_message?: string | null;
103
+
104
+ /**
105
+ * The creation date of the file.
106
+ */
107
+ file_creation_date?: string | null;
108
+
109
+ /**
110
+ * The last modified date of the file.
111
+ */
112
+ file_last_modified_date?: string | null;
113
+
114
+ /**
115
+ * The name of the file.
116
+ */
117
+ file_name?: string | null;
118
+
119
+ /**
120
+ * The path to the file.
121
+ */
122
+ file_path?: string | null;
123
+
124
+ /**
125
+ * The size of the file in bytes.
126
+ */
127
+ file_size?: number | null;
128
+
129
+ /**
130
+ * The type of the file (MIME type).
131
+ */
132
+ file_type?: string | null;
133
+
134
+ /**
135
+ * The original name of the file as uploaded.
136
+ */
137
+ original_file_name?: string | null;
138
+
139
+ /**
140
+ * The current processing status of the file (e.g. pending, parsing, embedding,
141
+ * completed, error).
142
+ */
143
+ processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
144
+
145
+ /**
146
+ * Total number of chunks for the file.
147
+ */
148
+ total_chunks?: number | null;
149
+
150
+ /**
151
+ * The update date of the file.
152
+ */
153
+ updated_at?: string | null;
154
+ }
155
+
56
156
  /**
57
157
  * Representation of a single FileMetadata
58
158
  */
@@ -229,6 +329,18 @@ export interface FileUploadResponse {
229
329
  updated_at?: string | null;
230
330
  }
231
331
 
332
+ export interface FileRetrieveParams {
333
+ /**
334
+ * Path param: The ID of the source in the format 'source-<uuid4>'
335
+ */
336
+ folder_id: string;
337
+
338
+ /**
339
+ * Query param: Whether to include full file content
340
+ */
341
+ include_content?: boolean;
342
+ }
343
+
232
344
  export interface FileListParams extends ArrayPageParams {
233
345
  /**
234
346
  * Whether to include full file content
@@ -262,9 +374,11 @@ export interface FileUploadParams {
262
374
 
263
375
  export declare namespace Files {
264
376
  export {
377
+ type FileRetrieveResponse as FileRetrieveResponse,
265
378
  type FileListResponse as FileListResponse,
266
379
  type FileUploadResponse as FileUploadResponse,
267
380
  type FileListResponsesArrayPage as FileListResponsesArrayPage,
381
+ type FileRetrieveParams as FileRetrieveParams,
268
382
  type FileListParams as FileListParams,
269
383
  type FileDeleteParams as FileDeleteParams,
270
384
  type FileUploadParams as FileUploadParams,
@@ -9,6 +9,8 @@ import {
9
9
  FileListParams,
10
10
  FileListResponse,
11
11
  FileListResponsesArrayPage,
12
+ FileRetrieveParams,
13
+ FileRetrieveResponse,
12
14
  FileUploadParams,
13
15
  FileUploadResponse,
14
16
  Files,
@@ -207,9 +209,11 @@ export declare namespace Folders {
207
209
 
208
210
  export {
209
211
  Files as Files,
212
+ type FileRetrieveResponse as FileRetrieveResponse,
210
213
  type FileListResponse as FileListResponse,
211
214
  type FileUploadResponse as FileUploadResponse,
212
215
  type FileListResponsesArrayPage as FileListResponsesArrayPage,
216
+ type FileRetrieveParams as FileRetrieveParams,
213
217
  type FileListParams as FileListParams,
214
218
  type FileDeleteParams as FileDeleteParams,
215
219
  type FileUploadParams as FileUploadParams,
@@ -3,8 +3,10 @@
3
3
  export { Agents, type AgentListResponse, type AgentListParams } from './agents';
4
4
  export {
5
5
  Files,
6
+ type FileRetrieveResponse,
6
7
  type FileListResponse,
7
8
  type FileUploadResponse,
9
+ type FileRetrieveParams,
8
10
  type FileListParams,
9
11
  type FileDeleteParams,
10
12
  type FileUploadParams,
@@ -240,7 +240,8 @@ export interface LlmConfig {
240
240
  | 'together'
241
241
  | 'bedrock'
242
242
  | 'deepseek'
243
- | 'xai';
243
+ | 'xai'
244
+ | 'zai';
244
245
 
245
246
  /**
246
247
  * The framework compatibility type for the model.
@@ -396,7 +397,8 @@ export interface Model {
396
397
  | 'together'
397
398
  | 'bedrock'
398
399
  | 'deepseek'
399
- | 'xai';
400
+ | 'xai'
401
+ | 'zai';
400
402
 
401
403
  /**
402
404
  * The actual model name used by the provider
@@ -538,7 +540,8 @@ export type ProviderType =
538
540
  | 'openai'
539
541
  | 'together'
540
542
  | 'vllm'
541
- | 'xai';
543
+ | 'xai'
544
+ | 'zai';
542
545
 
543
546
  export type ModelListResponse = Array<Model>;
544
547
 
@@ -187,6 +187,11 @@ export interface Step {
187
187
  */
188
188
  provider_name?: string | null;
189
189
 
190
+ /**
191
+ * The API request log ID from cloud-api for correlating steps with API requests.
192
+ */
193
+ request_id?: string | null;
194
+
190
195
  /**
191
196
  * The unique identifier of the run that this step belongs to. Only included for
192
197
  * async calls.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.6.0'; // x-release-please-version
1
+ export const VERSION = '1.6.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.0";
1
+ export declare const VERSION = "1.6.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.0";
1
+ export declare const VERSION = "1.6.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.6.0'; // x-release-please-version
4
+ exports.VERSION = '1.6.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.6.0'; // x-release-please-version
1
+ export const VERSION = '1.6.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map