@letta-ai/letta-client 1.0.0-alpha.13 → 1.0.0-alpha.14

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 (57) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +7 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +7 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -2
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +1 -1
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +1 -1
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +6 -6
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +6 -6
  17. package/core/pagination.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/agents/agents.d.mts +2 -2
  20. package/resources/agents/agents.d.mts.map +1 -1
  21. package/resources/agents/agents.d.ts +2 -2
  22. package/resources/agents/agents.d.ts.map +1 -1
  23. package/resources/agents/agents.js.map +1 -1
  24. package/resources/agents/agents.mjs.map +1 -1
  25. package/resources/agents/files.d.mts +39 -79
  26. package/resources/agents/files.d.mts.map +1 -1
  27. package/resources/agents/files.d.ts +39 -79
  28. package/resources/agents/files.d.ts.map +1 -1
  29. package/resources/agents/files.js +5 -1
  30. package/resources/agents/files.js.map +1 -1
  31. package/resources/agents/files.mjs +5 -1
  32. package/resources/agents/files.mjs.map +1 -1
  33. package/resources/agents/index.d.mts +1 -1
  34. package/resources/agents/index.d.mts.map +1 -1
  35. package/resources/agents/index.d.ts +1 -1
  36. package/resources/agents/index.d.ts.map +1 -1
  37. package/resources/agents/index.js.map +1 -1
  38. package/resources/agents/index.mjs.map +1 -1
  39. package/resources/templates/agents.d.mts +9 -14
  40. package/resources/templates/agents.d.mts.map +1 -1
  41. package/resources/templates/agents.d.ts +9 -14
  42. package/resources/templates/agents.d.ts.map +1 -1
  43. package/resources/templates/agents.js +2 -3
  44. package/resources/templates/agents.js.map +1 -1
  45. package/resources/templates/agents.mjs +2 -3
  46. package/resources/templates/agents.mjs.map +1 -1
  47. package/src/client.ts +13 -1
  48. package/src/core/pagination.ts +7 -7
  49. package/src/resources/agents/agents.ts +2 -0
  50. package/src/resources/agents/files.ts +47 -90
  51. package/src/resources/agents/index.ts +1 -0
  52. package/src/resources/templates/agents.ts +14 -17
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -1,11 +1,12 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import { APIPromise } from "../../core/api-promise.js";
3
+ import { NextFilesPage, type NextFilesPageParams, PagePromise } from "../../core/pagination.js";
3
4
  import { RequestOptions } from "../../internal/request-options.js";
4
5
  export declare class Files extends APIResource {
5
6
  /**
6
7
  * Get the files attached to an agent with their open/closed status.
7
8
  */
8
- list(agentID: string, query?: FileListParams | null | undefined, options?: RequestOptions): APIPromise<FileListResponse>;
9
+ list(agentID: string, query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileListResponsesNextFilesPage, FileListResponse>;
9
10
  /**
10
11
  * Closes a specific file for a given agent.
11
12
  *
@@ -29,106 +30,65 @@ export declare class Files extends APIResource {
29
30
  */
30
31
  open(fileID: string, params: FileOpenParams, options?: RequestOptions): APIPromise<FileOpenResponse>;
31
32
  }
33
+ export type FileListResponsesNextFilesPage = NextFilesPage<FileListResponse>;
32
34
  /**
33
- * Paginated response for agent files
35
+ * Response model for agent file attachments showing file status in agent context
34
36
  */
35
37
  export interface FileListResponse {
36
38
  /**
37
- * List of file attachments for the agent
39
+ * Unique identifier of the file-agent relationship
38
40
  */
39
- files: Array<FileListResponse.File>;
41
+ id: string;
40
42
  /**
41
- * Whether more results exist after this page
43
+ * Unique identifier of the file
42
44
  */
43
- has_more: boolean;
45
+ file_id: string;
44
46
  /**
45
- * Cursor for fetching the next page (file-agent relationship ID)
47
+ * Name of the file
46
48
  */
47
- next_cursor?: string | null;
48
- }
49
- export declare namespace FileListResponse {
50
- /**
51
- * Response model for agent file attachments showing file status in agent context
52
- */
53
- interface File {
54
- /**
55
- * Unique identifier of the file-agent relationship
56
- */
57
- id: string;
58
- /**
59
- * Unique identifier of the file
60
- */
61
- file_id: string;
62
- /**
63
- * Name of the file
64
- */
65
- file_name: string;
66
- /**
67
- * Unique identifier of the folder/source
68
- */
69
- folder_id: string;
70
- /**
71
- * Name of the folder/source
72
- */
73
- folder_name: string;
74
- /**
75
- * Whether the file is currently open in the agent's context
76
- */
77
- is_open: boolean;
78
- /**
79
- * Ending line number if file was opened with line range
80
- */
81
- end_line?: number | null;
82
- /**
83
- * Timestamp of last access by the agent
84
- */
85
- last_accessed_at?: string | null;
86
- /**
87
- * Starting line number if file was opened with line range
88
- */
89
- start_line?: number | null;
90
- /**
91
- * Portion of the file visible to the agent if open
92
- */
93
- visible_content?: string | null;
94
- }
95
- }
96
- export type FileCloseResponse = unknown;
97
- export type FileCloseAllResponse = Array<string>;
98
- export type FileOpenResponse = Array<string>;
99
- export interface FileListParams {
49
+ file_name: string;
100
50
  /**
101
- * File ID cursor for pagination. Returns files that come after this file ID in the
102
- * specified sort order
51
+ * Unique identifier of the folder/source
103
52
  */
104
- after?: string | null;
53
+ folder_id: string;
105
54
  /**
106
- * File ID cursor for pagination. Returns files that come before this file ID in
107
- * the specified sort order
55
+ * Name of the folder/source
108
56
  */
109
- before?: string | null;
57
+ folder_name: string;
110
58
  /**
111
- * @deprecated Pagination cursor from previous response (deprecated, use
112
- * before/after)
59
+ * Whether the file is currently open in the agent's context
113
60
  */
114
- cursor?: string | null;
61
+ is_open: boolean;
115
62
  /**
116
- * Filter by open status (true for open files, false for closed files)
63
+ * Ending line number if file was opened with line range
117
64
  */
118
- is_open?: boolean | null;
65
+ end_line?: number | null;
119
66
  /**
120
- * Maximum number of files to return
67
+ * Timestamp of last access by the agent
121
68
  */
122
- limit?: number | null;
69
+ last_accessed_at?: string | null;
123
70
  /**
124
- * Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest
125
- * first
71
+ * Starting line number if file was opened with line range
126
72
  */
127
- order?: 'asc' | 'desc';
73
+ start_line?: number | null;
128
74
  /**
129
- * Field to sort by
75
+ * Portion of the file visible to the agent if open
130
76
  */
131
- order_by?: 'created_at';
77
+ visible_content?: string | null;
78
+ }
79
+ export type FileCloseResponse = unknown;
80
+ export type FileCloseAllResponse = Array<string>;
81
+ export type FileOpenResponse = Array<string>;
82
+ export interface FileListParams extends NextFilesPageParams {
83
+ /**
84
+ * @deprecated Pagination cursor from previous response (deprecated, use
85
+ * before/after)
86
+ */
87
+ cursor?: string | null;
88
+ /**
89
+ * Filter by open status (true for open files, false for closed files)
90
+ */
91
+ is_open?: boolean | null;
132
92
  }
133
93
  export interface FileCloseParams {
134
94
  /**
@@ -143,6 +103,6 @@ export interface FileOpenParams {
143
103
  agent_id: string;
144
104
  }
145
105
  export declare namespace Files {
146
- export { type FileListResponse as FileListResponse, type FileCloseResponse as FileCloseResponse, type FileCloseAllResponse as FileCloseAllResponse, type FileOpenResponse as FileOpenResponse, type FileListParams as FileListParams, type FileCloseParams as FileCloseParams, type FileOpenParams as FileOpenParams, };
106
+ export { type FileListResponse as FileListResponse, type FileCloseResponse as FileCloseResponse, type FileCloseAllResponse as FileCloseAllResponse, type FileOpenResponse as FileOpenResponse, type FileListResponsesNextFilesPage as FileListResponsesNextFilesPage, type FileListParams as FileListParams, type FileCloseParams as FileCloseParams, type FileOpenParams as FileOpenParams, };
147
107
  }
148
108
  //# sourceMappingURL=files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/agents/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH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,IAAI,CAAC;IAEjC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAExC,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAE7C,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -3,13 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Files = void 0;
5
5
  const resource_1 = require("../../core/resource.js");
6
+ const pagination_1 = require("../../core/pagination.js");
6
7
  const path_1 = require("../../internal/utils/path.js");
7
8
  class Files extends resource_1.APIResource {
8
9
  /**
9
10
  * Get the files attached to an agent with their open/closed status.
10
11
  */
11
12
  list(agentID, query = {}, options) {
12
- return this._client.get((0, path_1.path) `/v1/agents/${agentID}/files`, { query, ...options });
13
+ return this._client.getAPIList((0, path_1.path) `/v1/agents/${agentID}/files`, (pagination_1.NextFilesPage), {
14
+ query,
15
+ ...options,
16
+ });
13
17
  }
14
18
  /**
15
19
  * Closes a specific file for a given agent.
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/agents/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAc,EAAE,MAAuB,EAAE,OAAwB;QACrE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,UAAU,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,MAAsB,EAAE,OAAwB;QACnE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,UAAU,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;CACF;AA5CD,sBA4CC"}
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/agents/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA6F;AAE7F,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,QAAQ,EAAE,CAAA,0BAA+B,CAAA,EAAE;YACjG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAc,EAAE,MAAuB,EAAE,OAAwB;QACrE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,UAAU,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,MAAsB,EAAE,OAAwB;QACnE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,UAAU,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;CACF;AA/CD,sBA+CC"}
@@ -1,12 +1,16 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
+ import { NextFilesPage } from "../../core/pagination.mjs";
3
4
  import { path } from "../../internal/utils/path.mjs";
4
5
  export class Files extends APIResource {
5
6
  /**
6
7
  * Get the files attached to an agent with their open/closed status.
7
8
  */
8
9
  list(agentID, query = {}, options) {
9
- return this._client.get(path `/v1/agents/${agentID}/files`, { query, ...options });
10
+ return this._client.getAPIList(path `/v1/agents/${agentID}/files`, (NextFilesPage), {
11
+ query,
12
+ ...options,
13
+ });
10
14
  }
11
15
  /**
12
16
  * Closes a specific file for a given agent.
@@ -1 +1 @@
1
- {"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/agents/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,OAAe,EACf,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,OAAO,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAc,EAAE,MAAuB,EAAE,OAAwB;QACrE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,cAAc,QAAQ,UAAU,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,cAAc,OAAO,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,MAAsB,EAAE,OAAwB;QACnE,MAAM,EAAE,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O,CAAC,CAAC;IACxF,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  export { Agents, type AgentEnvironmentVariable, type AgentState, type AgentType, type ChildToolRule, type ConditionalToolRule, type ContinueToolRule, type InitToolRule, type JsonObjectResponseFormat, type JsonSchemaResponseFormat, type LettaMessageContentUnion, type MaxCountPerStepToolRule, type MessageCreate, type ParentToolRule, type RequiredBeforeExitToolRule, type RequiresApprovalToolRule, type TerminalToolRule, type TextResponseFormat, type AgentDeleteResponse, type AgentCountResponse, type AgentExportFileResponse, type AgentImportFileResponse, type AgentCreateParams, type AgentRetrieveParams, type AgentListParams, type AgentExportFileParams, type AgentImportFileParams, type AgentModifyParams, type AgentStatesArrayPage, } from "./agents.mjs";
2
2
  export { Blocks, type Block, type BlockModify, type BlockRetrieveParams, type BlockListParams, type BlockAttachParams, type BlockDetachParams, type BlockModifyParams, } from "./blocks.mjs";
3
- export { Files, type FileListResponse, type FileCloseResponse, type FileCloseAllResponse, type FileOpenResponse, type FileListParams, type FileCloseParams, type FileOpenParams, } from "./files.mjs";
3
+ export { Files, type FileListResponse, type FileCloseResponse, type FileCloseAllResponse, type FileOpenResponse, type FileListParams, type FileCloseParams, type FileOpenParams, type FileListResponsesNextFilesPage, } from "./files.mjs";
4
4
  export { Folders, type FolderListResponse, type FolderListParams, type FolderAttachParams, type FolderDetachParams, } from "./folders.mjs";
5
5
  export { Groups, type GroupListParams } from "./groups.mjs";
6
6
  export { Messages, type ApprovalCreate, type ApprovalRequestMessage, type ApprovalResponseMessage, type AssistantMessage, type HiddenReasoningMessage, type ImageContent, type JobStatus, type JobType, type LettaAssistantMessageContentUnion, type LettaMessageUnion, type LettaRequest, type LettaResponse, type LettaStreamingRequest, type LettaStreamingResponse, type LettaUserMessageContentUnion, type Message, type MessageRole, type MessageType, type OmittedReasoningContent, type ReasoningContent, type ReasoningMessage, type RedactedReasoningContent, type Run, type SystemMessage, type TextContent, type ToolCall, type ToolCallContent, type ToolCallDelta, type ToolCallMessage, type ToolReturn, type ToolReturnContent, type UpdateAssistantMessage, type UpdateReasoningMessage, type UpdateSystemMessage, type UpdateUserMessage, type UserMessage, type MessageCancelResponse, type MessageModifyResponse, type MessageListParams, type MessageCancelParams, type MessageModifyParams, type MessageResetParams, type MessageSendParams, type MessageSendAsyncParams, type MessageStreamParams, type LettaMessageUnionsArrayPage, } from "./messages.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB;OACM,EACL,OAA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jB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,iCAAiC,EACtC,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B"}
@@ -1,6 +1,6 @@
1
1
  export { Agents, type AgentEnvironmentVariable, type AgentState, type AgentType, type ChildToolRule, type ConditionalToolRule, type ContinueToolRule, type InitToolRule, type JsonObjectResponseFormat, type JsonSchemaResponseFormat, type LettaMessageContentUnion, type MaxCountPerStepToolRule, type MessageCreate, type ParentToolRule, type RequiredBeforeExitToolRule, type RequiresApprovalToolRule, type TerminalToolRule, type TextResponseFormat, type AgentDeleteResponse, type AgentCountResponse, type AgentExportFileResponse, type AgentImportFileResponse, type AgentCreateParams, type AgentRetrieveParams, type AgentListParams, type AgentExportFileParams, type AgentImportFileParams, type AgentModifyParams, type AgentStatesArrayPage, } from "./agents.js";
2
2
  export { Blocks, type Block, type BlockModify, type BlockRetrieveParams, type BlockListParams, type BlockAttachParams, type BlockDetachParams, type BlockModifyParams, } from "./blocks.js";
3
- export { Files, type FileListResponse, type FileCloseResponse, type FileCloseAllResponse, type FileOpenResponse, type FileListParams, type FileCloseParams, type FileOpenParams, } from "./files.js";
3
+ export { Files, type FileListResponse, type FileCloseResponse, type FileCloseAllResponse, type FileOpenResponse, type FileListParams, type FileCloseParams, type FileOpenParams, type FileListResponsesNextFilesPage, } from "./files.js";
4
4
  export { Folders, type FolderListResponse, type FolderListParams, type FolderAttachParams, type FolderDetachParams, } from "./folders.js";
5
5
  export { Groups, type GroupListParams } from "./groups.js";
6
6
  export { Messages, type ApprovalCreate, type ApprovalRequestMessage, type ApprovalResponseMessage, type AssistantMessage, type HiddenReasoningMessage, type ImageContent, type JobStatus, type JobType, type LettaAssistantMessageContentUnion, type LettaMessageUnion, type LettaRequest, type LettaResponse, type LettaStreamingRequest, type LettaStreamingResponse, type LettaUserMessageContentUnion, type Message, type MessageRole, type MessageType, type OmittedReasoningContent, type ReasoningContent, type ReasoningMessage, type RedactedReasoningContent, type Run, type SystemMessage, type TextContent, type ToolCall, type ToolCallContent, type ToolCallDelta, type ToolCallMessage, type ToolReturn, type ToolReturnContent, type UpdateAssistantMessage, type UpdateReasoningMessage, type UpdateSystemMessage, type UpdateUserMessage, type UserMessage, type MessageCancelResponse, type MessageModifyResponse, type MessageListParams, type MessageCancelParams, type MessageModifyParams, type MessageResetParams, type MessageSendParams, type MessageSendAsyncParams, type MessageStreamParams, type LettaMessageUnionsArrayPage, } from "./messages.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,wBAAwB,EAC7B,KAAK,U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KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,K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B,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC;OACM,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCA8BkB;AA7BhB,gGAAA,MAAM,OAAA;AA8BR,sCASkB;AARhB,gGAAA,MAAM,OAAA;AASR,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,sCAAwD;AAA/C,gGAAA,MAAM,OAAA;AACf,0CAgDoB;AA/ClB,oGAAA,QAAQ,OAAA;AAgDV,oCAOiB;AANf,8FAAA,KAAK,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCA8BkB;AA7BhB,gGAAA,MAAM,OAAA;AA8BR,sCASkB;AARhB,gGAAA,MAAM,OAAA;AASR,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,sCAAwD;AAA/C,gGAAA,MAAM,OAAA;AACf,0CAgDoB;AA/ClB,oGAAA,QAAQ,OAAA;AAgDV,oCAOiB;AANf,8FAAA,KAAK,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GA6BP;OACM,EACL,MAAM,GAQP;OACM,EACL,KAAK,GAQN;OACM,EACL,OAAO,GAKR;OACM,EAAE,MAAM,EAAwB;OAChC,EACL,QAAQ,GA+CT;OACM,EACL,KAAK,GAMN"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/agents/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GA6BP;OACM,EACL,MAAM,GAQP;OACM,EACL,KAAK,GASN;OACM,EACL,OAAO,GAKR;OACM,EAAE,MAAM,EAAwB;OAChC,EACL,QAAQ,GA+CT;OACM,EACL,KAAK,GAMN"}
@@ -5,40 +5,35 @@ export declare class Agents extends APIResource {
5
5
  /**
6
6
  * Creates an Agent or multiple Agents from a template
7
7
  */
8
- create(templateVersion: string, params: AgentCreateParams, options?: RequestOptions): APIPromise<void>;
8
+ create(templateVersion: string, body?: AgentCreateParams | null | undefined, options?: RequestOptions): APIPromise<void>;
9
9
  }
10
10
  export interface AgentCreateParams {
11
11
  /**
12
- * Path param: The project id
13
- */
14
- project_id: string;
15
- /**
16
- * Body param: The name of the agent, optional otherwise a random one will be
17
- * assigned
12
+ * The name of the agent, optional otherwise a random one will be assigned
18
13
  */
19
14
  agent_name?: string;
20
15
  /**
21
- * Body param: The identity ids to assign to the agent
16
+ * The identity ids to assign to the agent
22
17
  */
23
18
  identity_ids?: Array<string>;
24
19
  /**
25
- * Body param: Set an initial sequence of messages, if not provided, the agent will
26
- * start with the default message sequence, if an empty array is provided, the
27
- * agent will start with no messages
20
+ * Set an initial sequence of messages, if not provided, the agent will start with
21
+ * the default message sequence, if an empty array is provided, the agent will
22
+ * start with no messages
28
23
  */
29
24
  initial_message_sequence?: Array<AgentCreateParams.InitialMessageSequence>;
30
25
  /**
31
- * Body param: The memory variables to assign to the agent
26
+ * The memory variables to assign to the agent
32
27
  */
33
28
  memory_variables?: {
34
29
  [key: string]: string;
35
30
  };
36
31
  /**
37
- * Body param: The tags to assign to the agent
32
+ * The tags to assign to the agent
38
33
  */
39
34
  tags?: Array<string>;
40
35
  /**
41
- * Body param: The tool variables to assign to the agent
36
+ * The tool variables to assign to the agent
42
37
  */
43
38
  tool_variables?: {
44
39
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAQvG;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;IAE3E;;OAEG;IACH,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE7C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,yBAAiB,iBAAiB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;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,sBAAsB;QACrC,OAAO,EAAE,MAAM,CAAC;QAEhB,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;QAEtC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE9B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -5,40 +5,35 @@ export declare class Agents extends APIResource {
5
5
  /**
6
6
  * Creates an Agent or multiple Agents from a template
7
7
  */
8
- create(templateVersion: string, params: AgentCreateParams, options?: RequestOptions): APIPromise<void>;
8
+ create(templateVersion: string, body?: AgentCreateParams | null | undefined, options?: RequestOptions): APIPromise<void>;
9
9
  }
10
10
  export interface AgentCreateParams {
11
11
  /**
12
- * Path param: The project id
13
- */
14
- project_id: string;
15
- /**
16
- * Body param: The name of the agent, optional otherwise a random one will be
17
- * assigned
12
+ * The name of the agent, optional otherwise a random one will be assigned
18
13
  */
19
14
  agent_name?: string;
20
15
  /**
21
- * Body param: The identity ids to assign to the agent
16
+ * The identity ids to assign to the agent
22
17
  */
23
18
  identity_ids?: Array<string>;
24
19
  /**
25
- * Body param: Set an initial sequence of messages, if not provided, the agent will
26
- * start with the default message sequence, if an empty array is provided, the
27
- * agent will start with no messages
20
+ * Set an initial sequence of messages, if not provided, the agent will start with
21
+ * the default message sequence, if an empty array is provided, the agent will
22
+ * start with no messages
28
23
  */
29
24
  initial_message_sequence?: Array<AgentCreateParams.InitialMessageSequence>;
30
25
  /**
31
- * Body param: The memory variables to assign to the agent
26
+ * The memory variables to assign to the agent
32
27
  */
33
28
  memory_variables?: {
34
29
  [key: string]: string;
35
30
  };
36
31
  /**
37
- * Body param: The tags to assign to the agent
32
+ * The tags to assign to the agent
38
33
  */
39
34
  tags?: Array<string>;
40
35
  /**
41
- * Body param: The tool variables to assign to the agent
36
+ * The tool variables to assign to the agent
42
37
  */
43
38
  tool_variables?: {
44
39
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAQvG;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;IAE3E;;OAEG;IACH,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE7C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,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AAC,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,sBAAsB;QACrC,OAAO,EAAE,MAAM,CAAC;QAEhB,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;QAEtC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE9B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -9,9 +9,8 @@ class Agents extends resource_1.APIResource {
9
9
  /**
10
10
  * Creates an Agent or multiple Agents from a template
11
11
  */
12
- create(templateVersion, params, options) {
13
- const { project_id, ...body } = params;
14
- return this._client.post((0, path_1.path) `/v1/templates/${project_id}/${templateVersion}/agents`, {
12
+ create(templateVersion, body = {}, options) {
13
+ return this._client.post((0, path_1.path) `/v1/templates/${templateVersion}/agents`, {
15
14
  body,
16
15
  ...options,
17
16
  headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,MAAM,CAAC,eAAuB,EAAE,MAAyB,EAAE,OAAwB;QACjF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,UAAU,IAAI,eAAe,SAAS,EAAE;YACpF,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;CACF;AAZD,wBAYC"}
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,MAAM,CACJ,eAAuB,EACvB,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,eAAe,SAAS,EAAE;YACtE,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;CACF;AAfD,wBAeC"}
@@ -6,9 +6,8 @@ export class Agents extends APIResource {
6
6
  /**
7
7
  * Creates an Agent or multiple Agents from a template
8
8
  */
9
- create(templateVersion, params, options) {
10
- const { project_id, ...body } = params;
11
- return this._client.post(path `/v1/templates/${project_id}/${templateVersion}/agents`, {
9
+ create(templateVersion, body = {}, options) {
10
+ return this._client.post(path `/v1/templates/${templateVersion}/agents`, {
12
11
  body,
13
12
  ...options,
14
13
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -1 +1 @@
1
- {"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,eAAuB,EAAE,MAAyB,EAAE,OAAwB;QACjF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,UAAU,IAAI,eAAe,SAAS,EAAE;YACpF,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;CACF"}
1
+ {"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../../src/resources/templates/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CACJ,eAAuB,EACvB,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,eAAe,SAAS,EAAE;YACtE,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;CACF"}
package/src/client.ts CHANGED
@@ -196,6 +196,11 @@ export interface ClientOptions {
196
196
 
197
197
  projectID?: string | null | undefined;
198
198
 
199
+ /**
200
+ * Deprecated, please use project_id instead.
201
+ */
202
+ project?: string | null | undefined;
203
+
199
204
  /**
200
205
  * Specifies the environment to use for the API.
201
206
  *
@@ -280,6 +285,7 @@ export interface ClientOptions {
280
285
  export class Letta {
281
286
  apiKey: string;
282
287
  projectID: string | null;
288
+ project: string | null;
283
289
 
284
290
  baseURL: string;
285
291
  maxRetries: number;
@@ -298,6 +304,7 @@ export class Letta {
298
304
  *
299
305
  * @param {string | undefined} [opts.apiKey=process.env['LETTA_API_KEY'] ?? undefined]
300
306
  * @param {string | null | undefined} [opts.projectID]
307
+ * @param {string | null | undefined} [opts.project]
301
308
  * @param {Environment} [opts.environment=cloud] - Specifies the environment URL to use for the API.
302
309
  * @param {string} [opts.baseURL=process.env['LETTA_BASE_URL'] ?? https://api.letta.com] - Override the default base URL for the API.
303
310
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
@@ -311,6 +318,7 @@ export class Letta {
311
318
  baseURL = readEnv('LETTA_BASE_URL'),
312
319
  apiKey = readEnv('LETTA_API_KEY'),
313
320
  projectID = null,
321
+ project = null,
314
322
  ...opts
315
323
  }: ClientOptions = {}) {
316
324
  if (apiKey === undefined) {
@@ -322,6 +330,7 @@ export class Letta {
322
330
  const options: ClientOptions = {
323
331
  apiKey,
324
332
  projectID,
333
+ project,
325
334
  ...opts,
326
335
  baseURL,
327
336
  environment: opts.environment ?? 'cloud',
@@ -352,6 +361,7 @@ export class Letta {
352
361
 
353
362
  this.apiKey = apiKey;
354
363
  this.projectID = projectID;
364
+ this.project = project;
355
365
  }
356
366
 
357
367
  /**
@@ -370,6 +380,7 @@ export class Letta {
370
380
  fetchOptions: this.fetchOptions,
371
381
  apiKey: this.apiKey,
372
382
  projectID: this.projectID,
383
+ project: this.project,
373
384
  ...options,
374
385
  });
375
386
  return client;
@@ -840,7 +851,8 @@ export class Letta {
840
851
  'X-Stainless-Retry-Count': String(retryCount),
841
852
  ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
842
853
  ...getPlatformHeaders(),
843
- 'X-Project': this.projectID,
854
+ 'X-Project-Id': this.projectID,
855
+ 'X-Project': this.project,
844
856
  },
845
857
  await this.authHeaders(options),
846
858
  this._options.defaultHeaders,
@@ -264,7 +264,7 @@ export interface NextFilesPageParams {
264
264
  order_by?: string | null;
265
265
  }
266
266
 
267
- export class NextFilesPage<Item extends { next_cursor: string | null }>
267
+ export class NextFilesPage<Item extends { id: string }>
268
268
  extends AbstractPage<Item>
269
269
  implements NextFilesPageResponse<Item>
270
270
  {
@@ -304,8 +304,8 @@ export class NextFilesPage<Item extends { next_cursor: string | null }>
304
304
 
305
305
  const isForwards = !(typeof this.options.query === 'object' && 'before' in (this.options.query || {}));
306
306
  if (isForwards) {
307
- const nextCursor = files[files.length - 1]?.next_cursor;
308
- if (!nextCursor) {
307
+ const id = files[files.length - 1]?.id;
308
+ if (!id) {
309
309
  return null;
310
310
  }
311
311
 
@@ -313,13 +313,13 @@ export class NextFilesPage<Item extends { next_cursor: string | null }>
313
313
  ...this.options,
314
314
  query: {
315
315
  ...maybeObj(this.options.query),
316
- after: nextCursor,
316
+ after: id,
317
317
  },
318
318
  };
319
319
  }
320
320
 
321
- const nextCursor = files[0]?.next_cursor;
322
- if (!nextCursor) {
321
+ const id = files[0]?.id;
322
+ if (!id) {
323
323
  return null;
324
324
  }
325
325
 
@@ -327,7 +327,7 @@ export class NextFilesPage<Item extends { next_cursor: string | null }>
327
327
  ...this.options,
328
328
  query: {
329
329
  ...maybeObj(this.options.query),
330
- before: nextCursor,
330
+ before: id,
331
331
  },
332
332
  };
333
333
  }
@@ -22,6 +22,7 @@ import {
22
22
  FileCloseResponse,
23
23
  FileListParams,
24
24
  FileListResponse,
25
+ FileListResponsesNextFilesPage,
25
26
  FileOpenParams,
26
27
  FileOpenResponse,
27
28
  Files,
@@ -1709,6 +1710,7 @@ export declare namespace Agents {
1709
1710
  type FileCloseResponse as FileCloseResponse,
1710
1711
  type FileCloseAllResponse as FileCloseAllResponse,
1711
1712
  type FileOpenResponse as FileOpenResponse,
1713
+ type FileListResponsesNextFilesPage as FileListResponsesNextFilesPage,
1712
1714
  type FileListParams as FileListParams,
1713
1715
  type FileCloseParams as FileCloseParams,
1714
1716
  type FileOpenParams as FileOpenParams,