@letta-ai/letta-client 0.1.130 → 0.1.131

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 (208) hide show
  1. package/api/resources/agents/client/Client.js +10 -10
  2. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  3. package/api/resources/agents/resources/context/client/Client.js +1 -1
  4. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  5. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  6. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  7. package/api/resources/agents/resources/messages/client/Client.d.ts +11 -9
  8. package/api/resources/agents/resources/messages/client/Client.js +23 -15
  9. package/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.d.ts +25 -0
  10. package/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  11. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  12. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  13. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  14. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  15. package/api/resources/batches/client/Client.js +4 -4
  16. package/api/resources/blocks/client/Client.js +6 -6
  17. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  18. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  19. package/api/resources/embeddingModels/client/Client.js +1 -1
  20. package/api/resources/groups/client/Client.js +6 -6
  21. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  22. package/api/resources/health/client/Client.js +1 -1
  23. package/api/resources/identities/client/Client.js +7 -7
  24. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  25. package/api/resources/index.d.ts +1 -2
  26. package/api/resources/index.js +2 -3
  27. package/api/resources/jobs/client/Client.js +4 -4
  28. package/api/resources/messages/client/Client.js +1 -1
  29. package/api/resources/models/client/Client.js +1 -1
  30. package/api/resources/projects/client/Client.js +1 -1
  31. package/api/resources/providers/client/Client.js +5 -5
  32. package/api/resources/runs/client/Client.js +4 -4
  33. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  34. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  35. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  36. package/api/resources/sources/client/Client.js +7 -7
  37. package/api/resources/sources/resources/files/client/Client.js +3 -3
  38. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  39. package/api/resources/steps/client/Client.js +2 -2
  40. package/api/resources/tags/client/Client.js +1 -1
  41. package/api/resources/telemetry/client/Client.js +1 -1
  42. package/api/resources/templates/client/Client.js +1 -1
  43. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  44. package/api/resources/tools/client/Client.js +17 -17
  45. package/api/resources/voice/client/Client.d.ts +1 -5
  46. package/api/resources/voice/client/Client.js +3 -7
  47. package/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
  48. package/api/resources/voice/index.d.ts +0 -1
  49. package/api/resources/voice/index.js +0 -1
  50. package/api/types/BatchJob.d.ts +2 -0
  51. package/api/types/Job.d.ts +2 -0
  52. package/api/types/LettaResponse.d.ts +1 -0
  53. package/api/types/LettaStopReason.d.ts +3 -2
  54. package/api/types/McpServerType.d.ts +2 -1
  55. package/api/types/McpServerType.js +1 -0
  56. package/api/types/McpTool.d.ts +2 -0
  57. package/api/types/Run.d.ts +2 -0
  58. package/api/types/SseServerConfig.d.ts +16 -0
  59. package/{dist/api/types/LettaStopReasonStopReason.d.ts → api/types/StopReasonType.d.ts} +3 -2
  60. package/{dist/api/types/LettaStopReasonStopReason.js → api/types/StopReasonType.js} +3 -2
  61. package/api/types/ToolAnnotations.d.ts +22 -0
  62. package/api/types/index.d.ts +3 -2
  63. package/api/types/index.js +3 -2
  64. package/dist/api/resources/agents/client/Client.js +10 -10
  65. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  66. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  67. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  68. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  69. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  70. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +11 -9
  71. package/dist/api/resources/agents/resources/messages/client/Client.js +23 -15
  72. package/dist/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.d.ts +25 -0
  73. package/dist/api/resources/agents/resources/messages/client/requests/MessagesCreateAsyncRequest.js +5 -0
  74. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  75. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  76. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  77. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  78. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  79. package/dist/api/resources/batches/client/Client.js +4 -4
  80. package/dist/api/resources/blocks/client/Client.js +6 -6
  81. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  82. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  83. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  84. package/dist/api/resources/groups/client/Client.js +6 -6
  85. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  86. package/dist/api/resources/health/client/Client.js +1 -1
  87. package/dist/api/resources/identities/client/Client.js +7 -7
  88. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  89. package/dist/api/resources/index.d.ts +1 -2
  90. package/dist/api/resources/index.js +2 -3
  91. package/dist/api/resources/jobs/client/Client.js +4 -4
  92. package/dist/api/resources/messages/client/Client.js +1 -1
  93. package/dist/api/resources/models/client/Client.js +1 -1
  94. package/dist/api/resources/projects/client/Client.js +1 -1
  95. package/dist/api/resources/providers/client/Client.js +5 -5
  96. package/dist/api/resources/runs/client/Client.js +4 -4
  97. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  98. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  99. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  100. package/dist/api/resources/sources/client/Client.js +7 -7
  101. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  102. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  103. package/dist/api/resources/steps/client/Client.js +2 -2
  104. package/dist/api/resources/tags/client/Client.js +1 -1
  105. package/dist/api/resources/telemetry/client/Client.js +1 -1
  106. package/dist/api/resources/templates/client/Client.js +1 -1
  107. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  108. package/dist/api/resources/tools/client/Client.js +17 -17
  109. package/dist/api/resources/voice/client/Client.d.ts +1 -5
  110. package/dist/api/resources/voice/client/Client.js +3 -7
  111. package/dist/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
  112. package/dist/api/resources/voice/index.d.ts +0 -1
  113. package/dist/api/resources/voice/index.js +0 -1
  114. package/dist/api/types/BatchJob.d.ts +2 -0
  115. package/dist/api/types/Job.d.ts +2 -0
  116. package/dist/api/types/LettaResponse.d.ts +1 -0
  117. package/dist/api/types/LettaStopReason.d.ts +3 -2
  118. package/dist/api/types/McpServerType.d.ts +2 -1
  119. package/dist/api/types/McpServerType.js +1 -0
  120. package/dist/api/types/McpTool.d.ts +2 -0
  121. package/dist/api/types/Run.d.ts +2 -0
  122. package/dist/api/types/SseServerConfig.d.ts +16 -0
  123. package/{api/types/LettaStopReasonStopReason.d.ts → dist/api/types/StopReasonType.d.ts} +3 -2
  124. package/{api/types/LettaStopReasonStopReason.js → dist/api/types/StopReasonType.js} +3 -2
  125. package/dist/api/types/ToolAnnotations.d.ts +22 -0
  126. package/dist/api/types/ToolAnnotations.js +5 -0
  127. package/dist/api/types/index.d.ts +3 -2
  128. package/dist/api/types/index.js +3 -2
  129. package/dist/serialization/resources/index.d.ts +1 -2
  130. package/dist/serialization/resources/index.js +2 -3
  131. package/dist/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
  132. package/dist/serialization/resources/voice/{types/CreateVoiceChatCompletionsRequestBody.js → client/createVoiceChatCompletions.js} +2 -4
  133. package/dist/serialization/resources/voice/client/index.d.ts +1 -0
  134. package/dist/serialization/resources/voice/client/index.js +37 -0
  135. package/dist/serialization/resources/voice/index.d.ts +1 -1
  136. package/dist/serialization/resources/voice/index.js +1 -1
  137. package/dist/serialization/types/BatchJob.d.ts +1 -0
  138. package/dist/serialization/types/BatchJob.js +1 -0
  139. package/dist/serialization/types/Job.d.ts +1 -0
  140. package/dist/serialization/types/Job.js +1 -0
  141. package/dist/serialization/types/LettaResponse.d.ts +2 -0
  142. package/dist/serialization/types/LettaResponse.js +2 -0
  143. package/dist/serialization/types/LettaStopReason.d.ts +2 -2
  144. package/dist/serialization/types/LettaStopReason.js +2 -2
  145. package/dist/serialization/types/McpServerType.d.ts +1 -1
  146. package/dist/serialization/types/McpServerType.js +1 -1
  147. package/dist/serialization/types/McpTool.d.ts +2 -0
  148. package/dist/serialization/types/McpTool.js +2 -0
  149. package/dist/serialization/types/Run.d.ts +1 -0
  150. package/dist/serialization/types/Run.js +1 -0
  151. package/dist/serialization/types/SseServerConfig.d.ts +3 -0
  152. package/dist/serialization/types/SseServerConfig.js +3 -0
  153. package/dist/serialization/types/{LettaStopReasonStopReason.d.ts → StopReasonType.d.ts} +3 -3
  154. package/dist/serialization/types/{LettaStopReasonStopReason.js → StopReasonType.js} +2 -2
  155. package/dist/serialization/types/ToolAnnotations.d.ts +17 -0
  156. package/dist/serialization/types/ToolAnnotations.js +49 -0
  157. package/dist/serialization/types/index.d.ts +3 -2
  158. package/dist/serialization/types/index.js +3 -2
  159. package/dist/version.d.ts +1 -1
  160. package/dist/version.js +1 -1
  161. package/package.json +1 -1
  162. package/reference.md +15 -19
  163. package/serialization/resources/index.d.ts +1 -2
  164. package/serialization/resources/index.js +2 -3
  165. package/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
  166. package/serialization/resources/voice/{types/CreateVoiceChatCompletionsRequestBody.js → client/createVoiceChatCompletions.js} +2 -4
  167. package/serialization/resources/voice/client/index.d.ts +1 -0
  168. package/serialization/resources/voice/client/index.js +37 -0
  169. package/serialization/resources/voice/index.d.ts +1 -1
  170. package/serialization/resources/voice/index.js +1 -1
  171. package/serialization/types/BatchJob.d.ts +1 -0
  172. package/serialization/types/BatchJob.js +1 -0
  173. package/serialization/types/Job.d.ts +1 -0
  174. package/serialization/types/Job.js +1 -0
  175. package/serialization/types/LettaResponse.d.ts +2 -0
  176. package/serialization/types/LettaResponse.js +2 -0
  177. package/serialization/types/LettaStopReason.d.ts +2 -2
  178. package/serialization/types/LettaStopReason.js +2 -2
  179. package/serialization/types/McpServerType.d.ts +1 -1
  180. package/serialization/types/McpServerType.js +1 -1
  181. package/serialization/types/McpTool.d.ts +2 -0
  182. package/serialization/types/McpTool.js +2 -0
  183. package/serialization/types/Run.d.ts +1 -0
  184. package/serialization/types/Run.js +1 -0
  185. package/serialization/types/SseServerConfig.d.ts +3 -0
  186. package/serialization/types/SseServerConfig.js +3 -0
  187. package/serialization/types/{LettaStopReasonStopReason.d.ts → StopReasonType.d.ts} +3 -3
  188. package/serialization/types/{LettaStopReasonStopReason.js → StopReasonType.js} +2 -2
  189. package/serialization/types/ToolAnnotations.d.ts +17 -0
  190. package/serialization/types/ToolAnnotations.js +49 -0
  191. package/serialization/types/index.d.ts +3 -2
  192. package/serialization/types/index.js +3 -2
  193. package/version.d.ts +1 -1
  194. package/version.js +1 -1
  195. package/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
  196. package/api/resources/voice/types/index.d.ts +0 -1
  197. package/api/resources/voice/types/index.js +0 -17
  198. package/dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
  199. package/dist/api/resources/voice/types/index.d.ts +0 -1
  200. package/dist/api/resources/voice/types/index.js +0 -17
  201. package/dist/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
  202. package/dist/serialization/resources/voice/types/index.d.ts +0 -1
  203. package/dist/serialization/resources/voice/types/index.js +0 -17
  204. package/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
  205. package/serialization/resources/voice/types/index.d.ts +0 -1
  206. package/serialization/resources/voice/types/index.js +0 -17
  207. /package/api/resources/{voice/types/CreateVoiceChatCompletionsRequestBody.js → agents/resources/messages/client/requests/MessagesCreateAsyncRequest.js} +0 -0
  208. /package/{dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.js → api/types/ToolAnnotations.js} +0 -0
@@ -69,11 +69,7 @@ class Voice {
69
69
  * @example
70
70
  * await client.voice.createVoiceChatCompletions("agent_id", {
71
71
  * body: {
72
- * messages: [{
73
- * content: "content",
74
- * role: "developer"
75
- * }],
76
- * model: "model"
72
+ * "key": "value"
77
73
  * }
78
74
  * })
79
75
  */
@@ -84,10 +80,10 @@ class Voice {
84
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
81
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/voice-beta/${encodeURIComponent(agentId)}/chat/completions`),
86
82
  method: "POST",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.131", "User-Agent": "@letta-ai/letta-client/0.1.131", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
84
  contentType: "application/json",
89
85
  requestType: "json",
90
- body: serializers.CreateVoiceChatCompletionsRequestBody.jsonOrThrow(_body, {
86
+ body: serializers.voice.createVoiceChatCompletions.Request.jsonOrThrow(_body, {
91
87
  unrecognizedObjectKeys: "strip",
92
88
  }),
93
89
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,20 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Letta from "../../../../index";
5
4
  /**
6
5
  * @example
7
6
  * {
8
7
  * body: {
9
- * messages: [{
10
- * content: "content",
11
- * role: "developer"
12
- * }],
13
- * model: "model"
8
+ * "key": "value"
14
9
  * }
15
10
  * }
16
11
  */
17
12
  export interface CreateVoiceChatCompletionsRequest {
18
13
  userId?: string;
19
- body: Letta.CreateVoiceChatCompletionsRequestBody;
14
+ body: Record<string, unknown>;
20
15
  }
@@ -1,2 +1 @@
1
- export * from "./types";
2
1
  export * from "./client";
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
17
  __exportStar(require("./client"), exports);
@@ -24,6 +24,8 @@ export interface BatchJob {
24
24
  callbackSentAt?: Date;
25
25
  /** HTTP status code returned by the callback endpoint. */
26
26
  callbackStatusCode?: number;
27
+ /** Optional error message from attempting to POST the callback endpoint. */
28
+ callbackError?: string;
27
29
  /** The human-friendly ID of the Job */
28
30
  id?: string;
29
31
  }
@@ -35,6 +35,8 @@ export interface Job {
35
35
  callbackSentAt?: Date;
36
36
  /** HTTP status code returned by the callback endpoint. */
37
37
  callbackStatusCode?: number;
38
+ /** Optional error message from attempting to POST the callback endpoint. */
39
+ callbackError?: string;
38
40
  /** The human-friendly ID of the Job */
39
41
  id?: string;
40
42
  }
@@ -13,6 +13,7 @@ import * as Letta from "../index";
13
13
  export interface LettaResponse {
14
14
  /** The messages returned by the agent. */
15
15
  messages: Letta.LettaMessageUnion[];
16
+ stopReason: Letta.LettaStopReason;
16
17
  /** The usage statistics of the agent. */
17
18
  usage: Letta.LettaUsageStatistics;
18
19
  }
@@ -3,10 +3,11 @@
3
3
  */
4
4
  import * as Letta from "../index";
5
5
  /**
6
- * Letta provided stop reason for why agent loop ended.
6
+ * The stop reason from Letta indicating why agent loop stopped execution.
7
7
  */
8
8
  export interface LettaStopReason {
9
9
  /** The type of the message. */
10
10
  messageType?: "stop_reason";
11
- stopReason: Letta.LettaStopReasonStopReason;
11
+ /** The reason why execution stopped. */
12
+ stopReason: Letta.StopReasonType;
12
13
  }
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type McpServerType = "sse" | "stdio";
4
+ export type McpServerType = "sse" | "stdio" | "streamable_http";
5
5
  export declare const McpServerType: {
6
6
  readonly Sse: "sse";
7
7
  readonly Stdio: "stdio";
8
+ readonly StreamableHttp: "streamable_http";
8
9
  };
@@ -7,4 +7,5 @@ exports.McpServerType = void 0;
7
7
  exports.McpServerType = {
8
8
  Sse: "sse",
9
9
  Stdio: "stdio",
10
+ StreamableHttp: "streamable_http",
10
11
  };
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Letta from "../index";
4
5
  /**
5
6
  * A simple wrapper around MCP's tool definition (to avoid conflict with our own)
6
7
  */
@@ -8,6 +9,7 @@ export interface McpTool {
8
9
  name: string;
9
10
  description?: string;
10
11
  inputSchema: Record<string, unknown>;
12
+ annotations?: Letta.ToolAnnotations;
11
13
  /** Accepts any additional properties */
12
14
  [key: string]: any;
13
15
  }
@@ -35,6 +35,8 @@ export interface Run {
35
35
  callbackSentAt?: Date;
36
36
  /** HTTP status code returned by the callback endpoint. */
37
37
  callbackStatusCode?: number;
38
+ /** Optional error message from attempting to POST the callback endpoint. */
39
+ callbackError?: string;
38
40
  /** The human-friendly ID of the Run */
39
41
  id?: string;
40
42
  /** The request configuration for the run. */
@@ -2,10 +2,26 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Letta from "../index";
5
+ /**
6
+ * Configuration for an MCP server using SSE
7
+ *
8
+ * Authentication can be provided in multiple ways:
9
+ * 1. Using auth_header + auth_token: Will add a specific header with the token
10
+ * Example: auth_header="Authorization", auth_token="Bearer abc123"
11
+ *
12
+ * 2. Using the custom_headers dict: For more complex authentication scenarios
13
+ * Example: custom_headers={"X-API-Key": "abc123", "X-Custom-Header": "value"}
14
+ */
5
15
  export interface SseServerConfig {
6
16
  /** The name of the server */
7
17
  serverName: string;
8
18
  type?: Letta.McpServerType;
9
19
  /** The URL of the server (MCP SSE client will connect to this URL) */
10
20
  serverUrl: string;
21
+ /** The name of the authentication header (e.g., 'Authorization') */
22
+ authHeader?: string;
23
+ /** The authentication token or API key value */
24
+ authToken?: string;
25
+ /** Custom HTTP headers to include with SSE requests */
26
+ customHeaders?: Record<string, string | undefined>;
11
27
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type LettaStopReasonStopReason = "end_turn" | "error" | "invalid_tool_call" | "max_steps" | "no_tool_call";
5
- export declare const LettaStopReasonStopReason: {
4
+ export type StopReasonType = "end_turn" | "error" | "invalid_tool_call" | "max_steps" | "no_tool_call" | "tool_rule";
5
+ export declare const StopReasonType: {
6
6
  readonly EndTurn: "end_turn";
7
7
  readonly Error: "error";
8
8
  readonly InvalidToolCall: "invalid_tool_call";
9
9
  readonly MaxSteps: "max_steps";
10
10
  readonly NoToolCall: "no_tool_call";
11
+ readonly ToolRule: "tool_rule";
11
12
  };
@@ -3,11 +3,12 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LettaStopReasonStopReason = void 0;
7
- exports.LettaStopReasonStopReason = {
6
+ exports.StopReasonType = void 0;
7
+ exports.StopReasonType = {
8
8
  EndTurn: "end_turn",
9
9
  Error: "error",
10
10
  InvalidToolCall: "invalid_tool_call",
11
11
  MaxSteps: "max_steps",
12
12
  NoToolCall: "no_tool_call",
13
+ ToolRule: "tool_rule",
13
14
  };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Additional properties describing a Tool to clients.
6
+ *
7
+ * NOTE: all properties in ToolAnnotations are **hints**.
8
+ * They are not guaranteed to provide a faithful description of
9
+ * tool behavior (including descriptive properties like `title`).
10
+ *
11
+ * Clients should never make tool use decisions based on ToolAnnotations
12
+ * received from untrusted servers.
13
+ */
14
+ export interface ToolAnnotations {
15
+ title?: string;
16
+ readOnlyHint?: boolean;
17
+ destructiveHint?: boolean;
18
+ idempotentHint?: boolean;
19
+ openWorldHint?: boolean;
20
+ /** Accepts any additional properties */
21
+ [key: string]: any;
22
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -130,6 +130,7 @@ export * from "./LettaImage";
130
130
  export * from "./LettaRequest";
131
131
  export * from "./LettaRequestConfig";
132
132
  export * from "./LettaResponse";
133
+ export * from "./LettaStopReason";
133
134
  export * from "./LettaStreamingRequest";
134
135
  export * from "./LettaUsageStatistics";
135
136
  export * from "./LocalSandboxConfig";
@@ -185,6 +186,7 @@ export * from "./SleeptimeManagerUpdate";
185
186
  export * from "./Source";
186
187
  export * from "./StdioServerConfig";
187
188
  export * from "./Step";
189
+ export * from "./StopReasonType";
188
190
  export * from "./SupervisorManager";
189
191
  export * from "./SupervisorManagerUpdate";
190
192
  export * from "./SystemMessage";
@@ -193,6 +195,7 @@ export * from "./TerminalToolRule";
193
195
  export * from "./TextContent";
194
196
  export * from "./TextResponseFormat";
195
197
  export * from "./Tool";
198
+ export * from "./ToolAnnotations";
196
199
  export * from "./ToolCall";
197
200
  export * from "./ToolCallContent";
198
201
  export * from "./ToolCallDelta";
@@ -238,5 +241,3 @@ export * from "./LettaMessageUnion";
238
241
  export * from "./LettaMessageContentUnion";
239
242
  export * from "./ComponentsSchemasTextContent";
240
243
  export * from "./LettaUserMessageContentUnion";
241
- export * from "./LettaStopReasonStopReason";
242
- export * from "./LettaStopReason";
@@ -146,6 +146,7 @@ __exportStar(require("./LettaImage"), exports);
146
146
  __exportStar(require("./LettaRequest"), exports);
147
147
  __exportStar(require("./LettaRequestConfig"), exports);
148
148
  __exportStar(require("./LettaResponse"), exports);
149
+ __exportStar(require("./LettaStopReason"), exports);
149
150
  __exportStar(require("./LettaStreamingRequest"), exports);
150
151
  __exportStar(require("./LettaUsageStatistics"), exports);
151
152
  __exportStar(require("./LocalSandboxConfig"), exports);
@@ -201,6 +202,7 @@ __exportStar(require("./SleeptimeManagerUpdate"), exports);
201
202
  __exportStar(require("./Source"), exports);
202
203
  __exportStar(require("./StdioServerConfig"), exports);
203
204
  __exportStar(require("./Step"), exports);
205
+ __exportStar(require("./StopReasonType"), exports);
204
206
  __exportStar(require("./SupervisorManager"), exports);
205
207
  __exportStar(require("./SupervisorManagerUpdate"), exports);
206
208
  __exportStar(require("./SystemMessage"), exports);
@@ -209,6 +211,7 @@ __exportStar(require("./TerminalToolRule"), exports);
209
211
  __exportStar(require("./TextContent"), exports);
210
212
  __exportStar(require("./TextResponseFormat"), exports);
211
213
  __exportStar(require("./Tool"), exports);
214
+ __exportStar(require("./ToolAnnotations"), exports);
212
215
  __exportStar(require("./ToolCall"), exports);
213
216
  __exportStar(require("./ToolCallContent"), exports);
214
217
  __exportStar(require("./ToolCallDelta"), exports);
@@ -254,5 +257,3 @@ __exportStar(require("./LettaMessageUnion"), exports);
254
257
  __exportStar(require("./LettaMessageContentUnion"), exports);
255
258
  __exportStar(require("./ComponentsSchemasTextContent"), exports);
256
259
  __exportStar(require("./LettaUserMessageContentUnion"), exports);
257
- __exportStar(require("./LettaStopReasonStopReason"), exports);
258
- __exportStar(require("./LettaStopReason"), exports);
@@ -4,8 +4,6 @@ export * as agents from "./agents";
4
4
  export * from "./agents/types";
5
5
  export * as groups from "./groups";
6
6
  export * from "./groups/types";
7
- export * as voice from "./voice";
8
- export * from "./voice/types";
9
7
  export * as templates from "./templates";
10
8
  export * from "./templates/types";
11
9
  export * as clientSideAccessTokens from "./clientSideAccessTokens";
@@ -23,6 +21,7 @@ export * as runs from "./runs";
23
21
  export * as steps from "./steps";
24
22
  export * as tags from "./tags";
25
23
  export * as batches from "./batches";
24
+ export * as voice from "./voice";
26
25
  export * from "./tools/client/requests";
27
26
  export * from "./sources/client/requests";
28
27
  export * from "./agents/client/requests";
@@ -36,15 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.batches = exports.tags = exports.steps = exports.runs = exports.providers = exports.jobs = exports.blocks = exports.embeddingModels = exports.models = exports.identities = exports.sources = exports.projects = exports.clientSideAccessTokens = exports.templates = exports.voice = exports.groups = exports.agents = exports.tools = void 0;
39
+ exports.voice = exports.batches = exports.tags = exports.steps = exports.runs = exports.providers = exports.jobs = exports.blocks = exports.embeddingModels = exports.models = exports.identities = exports.sources = exports.projects = exports.clientSideAccessTokens = exports.templates = exports.groups = exports.agents = exports.tools = void 0;
40
40
  exports.tools = __importStar(require("./tools"));
41
41
  __exportStar(require("./tools/types"), exports);
42
42
  exports.agents = __importStar(require("./agents"));
43
43
  __exportStar(require("./agents/types"), exports);
44
44
  exports.groups = __importStar(require("./groups"));
45
45
  __exportStar(require("./groups/types"), exports);
46
- exports.voice = __importStar(require("./voice"));
47
- __exportStar(require("./voice/types"), exports);
48
46
  exports.templates = __importStar(require("./templates"));
49
47
  __exportStar(require("./templates/types"), exports);
50
48
  exports.clientSideAccessTokens = __importStar(require("./clientSideAccessTokens"));
@@ -62,6 +60,7 @@ exports.runs = __importStar(require("./runs"));
62
60
  exports.steps = __importStar(require("./steps"));
63
61
  exports.tags = __importStar(require("./tags"));
64
62
  exports.batches = __importStar(require("./batches"));
63
+ exports.voice = __importStar(require("./voice"));
65
64
  __exportStar(require("./tools/client/requests"), exports);
66
65
  __exportStar(require("./sources/client/requests"), exports);
67
66
  __exportStar(require("./agents/client/requests"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare const Request: core.serialization.Schema<serializers.voice.createVoiceChatCompletions.Request.Raw, Record<string, unknown>>;
7
+ export declare namespace Request {
8
+ type Raw = Record<string, unknown>;
9
+ }
@@ -36,8 +36,6 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.CreateVoiceChatCompletionsRequestBody = void 0;
39
+ exports.Request = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
- const CompletionCreateParamsNonStreaming_1 = require("../../../types/CompletionCreateParamsNonStreaming");
42
- const CompletionCreateParamsStreaming_1 = require("../../../types/CompletionCreateParamsStreaming");
43
- exports.CreateVoiceChatCompletionsRequestBody = core.serialization.undiscriminatedUnion([CompletionCreateParamsNonStreaming_1.CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming_1.CompletionCreateParamsStreaming]);
41
+ exports.Request = core.serialization.record(core.serialization.string(), core.serialization.unknown());
@@ -0,0 +1 @@
1
+ export * as createVoiceChatCompletions from "./createVoiceChatCompletions";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.createVoiceChatCompletions = void 0;
37
+ exports.createVoiceChatCompletions = __importStar(require("./createVoiceChatCompletions"));
@@ -1 +1 @@
1
- export * from "./types";
1
+ export * from "./client";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
17
+ __exportStar(require("./client"), exports);
@@ -20,6 +20,7 @@ export declare namespace BatchJob {
20
20
  callback_url?: string | null;
21
21
  callback_sent_at?: string | null;
22
22
  callback_status_code?: number | null;
23
+ callback_error?: string | null;
23
24
  id?: string | null;
24
25
  }
25
26
  }
@@ -52,5 +52,6 @@ exports.BatchJob = core.serialization.object({
52
52
  callbackUrl: core.serialization.property("callback_url", core.serialization.string().optional()),
53
53
  callbackSentAt: core.serialization.property("callback_sent_at", core.serialization.date().optional()),
54
54
  callbackStatusCode: core.serialization.property("callback_status_code", core.serialization.number().optional()),
55
+ callbackError: core.serialization.property("callback_error", core.serialization.string().optional()),
55
56
  id: core.serialization.string().optional(),
56
57
  });
@@ -20,6 +20,7 @@ export declare namespace Job {
20
20
  callback_url?: string | null;
21
21
  callback_sent_at?: string | null;
22
22
  callback_status_code?: number | null;
23
+ callback_error?: string | null;
23
24
  id?: string | null;
24
25
  }
25
26
  }
@@ -52,5 +52,6 @@ exports.Job = core.serialization.object({
52
52
  callbackUrl: core.serialization.property("callback_url", core.serialization.string().optional()),
53
53
  callbackSentAt: core.serialization.property("callback_sent_at", core.serialization.date().optional()),
54
54
  callbackStatusCode: core.serialization.property("callback_status_code", core.serialization.number().optional()),
55
+ callbackError: core.serialization.property("callback_error", core.serialization.string().optional()),
55
56
  id: core.serialization.string().optional(),
56
57
  });
@@ -5,11 +5,13 @@ import * as serializers from "../index";
5
5
  import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  import { LettaMessageUnion } from "./LettaMessageUnion";
8
+ import { LettaStopReason } from "./LettaStopReason";
8
9
  import { LettaUsageStatistics } from "./LettaUsageStatistics";
9
10
  export declare const LettaResponse: core.serialization.ObjectSchema<serializers.LettaResponse.Raw, Letta.LettaResponse>;
10
11
  export declare namespace LettaResponse {
11
12
  interface Raw {
12
13
  messages: LettaMessageUnion.Raw[];
14
+ stop_reason: LettaStopReason.Raw;
13
15
  usage: LettaUsageStatistics.Raw;
14
16
  }
15
17
  }
@@ -39,8 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.LettaResponse = void 0;
40
40
  const core = __importStar(require("../../core"));
41
41
  const LettaMessageUnion_1 = require("./LettaMessageUnion");
42
+ const LettaStopReason_1 = require("./LettaStopReason");
42
43
  const LettaUsageStatistics_1 = require("./LettaUsageStatistics");
43
44
  exports.LettaResponse = core.serialization.object({
44
45
  messages: core.serialization.list(LettaMessageUnion_1.LettaMessageUnion),
46
+ stopReason: core.serialization.property("stop_reason", LettaStopReason_1.LettaStopReason),
45
47
  usage: LettaUsageStatistics_1.LettaUsageStatistics,
46
48
  });
@@ -4,11 +4,11 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
- import { LettaStopReasonStopReason } from "./LettaStopReasonStopReason";
7
+ import { StopReasonType } from "./StopReasonType";
8
8
  export declare const LettaStopReason: core.serialization.ObjectSchema<serializers.LettaStopReason.Raw, Letta.LettaStopReason>;
9
9
  export declare namespace LettaStopReason {
10
10
  interface Raw {
11
11
  message_type?: "stop_reason" | null;
12
- stop_reason: LettaStopReasonStopReason.Raw;
12
+ stop_reason: StopReasonType.Raw;
13
13
  }
14
14
  }
@@ -38,8 +38,8 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.LettaStopReason = void 0;
40
40
  const core = __importStar(require("../../core"));
41
- const LettaStopReasonStopReason_1 = require("./LettaStopReasonStopReason");
41
+ const StopReasonType_1 = require("./StopReasonType");
42
42
  exports.LettaStopReason = core.serialization.object({
43
43
  messageType: core.serialization.property("message_type", core.serialization.stringLiteral("stop_reason").optional()),
44
- stopReason: core.serialization.property("stop_reason", LettaStopReasonStopReason_1.LettaStopReasonStopReason),
44
+ stopReason: core.serialization.property("stop_reason", StopReasonType_1.StopReasonType),
45
45
  });
@@ -6,5 +6,5 @@ import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
7
  export declare const McpServerType: core.serialization.Schema<serializers.McpServerType.Raw, Letta.McpServerType>;
8
8
  export declare namespace McpServerType {
9
- type Raw = "sse" | "stdio";
9
+ type Raw = "sse" | "stdio" | "streamable_http";
10
10
  }
@@ -38,4 +38,4 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.McpServerType = void 0;
40
40
  const core = __importStar(require("../../core"));
41
- exports.McpServerType = core.serialization.enum_(["sse", "stdio"]);
41
+ exports.McpServerType = core.serialization.enum_(["sse", "stdio", "streamable_http"]);
@@ -4,12 +4,14 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
+ import { ToolAnnotations } from "./ToolAnnotations";
7
8
  export declare const McpTool: core.serialization.ObjectSchema<serializers.McpTool.Raw, Letta.McpTool>;
8
9
  export declare namespace McpTool {
9
10
  interface Raw {
10
11
  name: string;
11
12
  description?: string | null;
12
13
  inputSchema: Record<string, unknown>;
14
+ annotations?: ToolAnnotations.Raw | null;
13
15
  [key: string]: any;
14
16
  }
15
17
  }
@@ -38,10 +38,12 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.McpTool = void 0;
40
40
  const core = __importStar(require("../../core"));
41
+ const ToolAnnotations_1 = require("./ToolAnnotations");
41
42
  exports.McpTool = core.serialization
42
43
  .object({
43
44
  name: core.serialization.string(),
44
45
  description: core.serialization.string().optional(),
45
46
  inputSchema: core.serialization.record(core.serialization.string(), core.serialization.unknown()),
47
+ annotations: ToolAnnotations_1.ToolAnnotations.optional(),
46
48
  })
47
49
  .passthrough();
@@ -21,6 +21,7 @@ export declare namespace Run {
21
21
  callback_url?: string | null;
22
22
  callback_sent_at?: string | null;
23
23
  callback_status_code?: number | null;
24
+ callback_error?: string | null;
24
25
  id?: string | null;
25
26
  request_config?: LettaRequestConfig.Raw | null;
26
27
  }
@@ -53,6 +53,7 @@ exports.Run = core.serialization.object({
53
53
  callbackUrl: core.serialization.property("callback_url", core.serialization.string().optional()),
54
54
  callbackSentAt: core.serialization.property("callback_sent_at", core.serialization.date().optional()),
55
55
  callbackStatusCode: core.serialization.property("callback_status_code", core.serialization.number().optional()),
56
+ callbackError: core.serialization.property("callback_error", core.serialization.string().optional()),
56
57
  id: core.serialization.string().optional(),
57
58
  requestConfig: core.serialization.property("request_config", LettaRequestConfig_1.LettaRequestConfig.optional()),
58
59
  });
@@ -11,5 +11,8 @@ export declare namespace SseServerConfig {
11
11
  server_name: string;
12
12
  type?: McpServerType.Raw | null;
13
13
  server_url: string;
14
+ auth_header?: string | null;
15
+ auth_token?: string | null;
16
+ custom_headers?: Record<string, string | null | undefined> | null;
14
17
  }
15
18
  }
@@ -43,4 +43,7 @@ exports.SseServerConfig = core.serialization.object({
43
43
  serverName: core.serialization.property("server_name", core.serialization.string()),
44
44
  type: McpServerType_1.McpServerType.optional(),
45
45
  serverUrl: core.serialization.property("server_url", core.serialization.string()),
46
+ authHeader: core.serialization.property("auth_header", core.serialization.string().optional()),
47
+ authToken: core.serialization.property("auth_token", core.serialization.string().optional()),
48
+ customHeaders: core.serialization.property("custom_headers", core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional()),
46
49
  });
@@ -4,7 +4,7 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Letta from "../../api/index";
6
6
  import * as core from "../../core";
7
- export declare const LettaStopReasonStopReason: core.serialization.Schema<serializers.LettaStopReasonStopReason.Raw, Letta.LettaStopReasonStopReason>;
8
- export declare namespace LettaStopReasonStopReason {
9
- type Raw = "end_turn" | "error" | "invalid_tool_call" | "max_steps" | "no_tool_call";
7
+ export declare const StopReasonType: core.serialization.Schema<serializers.StopReasonType.Raw, Letta.StopReasonType>;
8
+ export declare namespace StopReasonType {
9
+ type Raw = "end_turn" | "error" | "invalid_tool_call" | "max_steps" | "no_tool_call" | "tool_rule";
10
10
  }
@@ -36,6 +36,6 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.LettaStopReasonStopReason = void 0;
39
+ exports.StopReasonType = void 0;
40
40
  const core = __importStar(require("../../core"));
41
- exports.LettaStopReasonStopReason = core.serialization.enum_(["end_turn", "error", "invalid_tool_call", "max_steps", "no_tool_call"]);
41
+ exports.StopReasonType = core.serialization.enum_(["end_turn", "error", "invalid_tool_call", "max_steps", "no_tool_call", "tool_rule"]);