@letta-ai/letta-client 1.3.3 → 1.4.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 (38) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/resources/agents/agents.d.mts +149 -1
  4. package/resources/agents/agents.d.mts.map +1 -1
  5. package/resources/agents/agents.d.ts +149 -1
  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 +9 -0
  10. package/resources/agents/messages.d.mts.map +1 -1
  11. package/resources/agents/messages.d.ts +9 -0
  12. package/resources/agents/messages.d.ts.map +1 -1
  13. package/resources/messages.d.mts +83 -2
  14. package/resources/messages.d.mts.map +1 -1
  15. package/resources/messages.d.ts +83 -2
  16. package/resources/messages.d.ts.map +1 -1
  17. package/resources/messages.js.map +1 -1
  18. package/resources/messages.mjs.map +1 -1
  19. package/resources/models/models.d.mts +2 -2
  20. package/resources/models/models.d.mts.map +1 -1
  21. package/resources/models/models.d.ts +2 -2
  22. package/resources/models/models.d.ts.map +1 -1
  23. package/resources/runs/runs.d.mts +1 -1
  24. package/resources/runs/runs.d.mts.map +1 -1
  25. package/resources/runs/runs.d.ts +1 -1
  26. package/resources/runs/runs.d.ts.map +1 -1
  27. package/resources/runs/runs.js.map +1 -1
  28. package/resources/runs/runs.mjs.map +1 -1
  29. package/src/resources/agents/agents.ts +206 -1
  30. package/src/resources/agents/messages.ts +9 -0
  31. package/src/resources/messages.ts +102 -12
  32. package/src/resources/models/models.ts +2 -2
  33. package/src/resources/runs/runs.ts +3 -1
  34. package/src/version.ts +1 -1
  35. package/version.d.mts +1 -1
  36. package/version.d.ts +1 -1
  37. package/version.js +1 -1
  38. package/version.mjs +1 -1
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as ToolsAPI from './tools';
5
4
  import * as AgentsMessagesAPI from './agents/messages';
6
5
  import { APIPromise } from '../core/api-promise';
7
6
  import { RequestOptions } from '../internal/request-options';
@@ -88,19 +87,110 @@ export interface MessageSearchResult {
88
87
  export type MessageListResponse = Array<AgentsMessagesAPI.Message>;
89
88
 
90
89
  export type MessageSearchResponse = Array<
91
- | AgentsMessagesAPI.SystemMessage
92
- | AgentsMessagesAPI.UserMessage
93
- | AgentsMessagesAPI.ReasoningMessage
94
- | AgentsMessagesAPI.HiddenReasoningMessage
95
- | AgentsMessagesAPI.ToolCallMessage
96
- | ToolsAPI.ToolReturnMessage
97
- | AgentsMessagesAPI.AssistantMessage
98
- | AgentsMessagesAPI.ApprovalRequestMessage
99
- | AgentsMessagesAPI.ApprovalResponseMessage
100
- | AgentsMessagesAPI.SummaryMessage
101
- | AgentsMessagesAPI.EventMessage
90
+ | MessageSearchResponse.SystemMessageListResult
91
+ | MessageSearchResponse.UserMessageListResult
92
+ | MessageSearchResponse.ReasoningMessageListResult
93
+ | MessageSearchResponse.AssistantMessageListResult
102
94
  >;
103
95
 
96
+ export namespace MessageSearchResponse {
97
+ /**
98
+ * System message list result with agent context.
99
+ *
100
+ * Shape is identical to UpdateSystemMessage but includes the owning agent_id.
101
+ */
102
+ export interface SystemMessageListResult {
103
+ /**
104
+ * The message content sent by the system (can be a string or an array of
105
+ * multi-modal content parts)
106
+ */
107
+ content: string;
108
+
109
+ /**
110
+ * The time the message was created in ISO format.
111
+ */
112
+ created_at: string;
113
+
114
+ /**
115
+ * The unique identifier of the agent that owns the message.
116
+ */
117
+ agent_id?: string | null;
118
+
119
+ message_type?: 'system_message';
120
+ }
121
+
122
+ /**
123
+ * User message list result with agent context.
124
+ *
125
+ * Shape is identical to UpdateUserMessage but includes the owning agent_id.
126
+ */
127
+ export interface UserMessageListResult {
128
+ /**
129
+ * The message content sent by the user (can be a string or an array of multi-modal
130
+ * content parts)
131
+ */
132
+ content: Array<AgentsMessagesAPI.LettaUserMessageContentUnion> | string;
133
+
134
+ /**
135
+ * The time the message was created in ISO format.
136
+ */
137
+ created_at: string;
138
+
139
+ /**
140
+ * The unique identifier of the agent that owns the message.
141
+ */
142
+ agent_id?: string | null;
143
+
144
+ message_type?: 'user_message';
145
+ }
146
+
147
+ /**
148
+ * Reasoning message list result with agent context.
149
+ *
150
+ * Shape is identical to UpdateReasoningMessage but includes the owning agent_id.
151
+ */
152
+ export interface ReasoningMessageListResult {
153
+ /**
154
+ * The time the message was created in ISO format.
155
+ */
156
+ created_at: string;
157
+
158
+ reasoning: string;
159
+
160
+ /**
161
+ * The unique identifier of the agent that owns the message.
162
+ */
163
+ agent_id?: string | null;
164
+
165
+ message_type?: 'reasoning_message';
166
+ }
167
+
168
+ /**
169
+ * Assistant message list result with agent context.
170
+ *
171
+ * Shape is identical to UpdateAssistantMessage but includes the owning agent_id.
172
+ */
173
+ export interface AssistantMessageListResult {
174
+ /**
175
+ * The message content sent by the assistant (can be a string or an array of
176
+ * content parts)
177
+ */
178
+ content: Array<AgentsMessagesAPI.LettaAssistantMessageContentUnion> | string;
179
+
180
+ /**
181
+ * The time the message was created in ISO format.
182
+ */
183
+ created_at: string;
184
+
185
+ /**
186
+ * The unique identifier of the agent that owns the message.
187
+ */
188
+ agent_id?: string | null;
189
+
190
+ message_type?: 'assistant_message';
191
+ }
192
+ }
193
+
104
194
  export interface MessageListParams {
105
195
  /**
106
196
  * Message ID cursor for pagination. Returns messages that come after this message
@@ -325,7 +325,7 @@ export interface LlmConfig {
325
325
  /**
326
326
  * The reasoning effort to use when generating text reasoning models
327
327
  */
328
- reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | null;
328
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
329
329
 
330
330
  /**
331
331
  * The response format for the model's output. Supports text, json_object, and
@@ -490,7 +490,7 @@ export interface Model {
490
490
  * @deprecated Deprecated: The reasoning effort to use when generating text
491
491
  * reasoning models.
492
492
  */
493
- reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | null;
493
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
494
494
 
495
495
  /**
496
496
  * The response format for the model's output. Supports text, json_object, and
@@ -140,10 +140,12 @@ export type StopReasonType =
140
140
  | 'invalid_llm_response'
141
141
  | 'invalid_tool_call'
142
142
  | 'max_steps'
143
+ | 'max_tokens_exceeded'
143
144
  | 'no_tool_call'
144
145
  | 'tool_rule'
145
146
  | 'cancelled'
146
- | 'requires_approval';
147
+ | 'requires_approval'
148
+ | 'context_window_overflow_in_system_prompt';
147
149
 
148
150
  export interface RunListParams extends ArrayPageParams {
149
151
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.3.3'; // x-release-please-version
1
+ export const VERSION = '1.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.3.3";
1
+ export declare const VERSION = "1.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.3.3";
1
+ export declare const VERSION = "1.4.0";
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.3.3'; // x-release-please-version
4
+ exports.VERSION = '1.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.3.3'; // x-release-please-version
1
+ export const VERSION = '1.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map