@letta-ai/letta-client 1.0.0-alpha.10 → 1.0.0-alpha.11

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 (113) hide show
  1. package/CHANGELOG.md +20 -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 +9 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -1
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.d.mts.map +1 -1
  11. package/core/streaming.d.ts.map +1 -1
  12. package/core/streaming.js +0 -5
  13. package/core/streaming.js.map +1 -1
  14. package/core/streaming.mjs +0 -5
  15. package/core/streaming.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/agents/agents.d.mts +59 -69
  18. package/resources/agents/agents.d.mts.map +1 -1
  19. package/resources/agents/agents.d.ts +59 -69
  20. package/resources/agents/agents.d.ts.map +1 -1
  21. package/resources/agents/agents.js +2 -10
  22. package/resources/agents/agents.js.map +1 -1
  23. package/resources/agents/agents.mjs +2 -10
  24. package/resources/agents/agents.mjs.map +1 -1
  25. package/resources/groups/groups.d.mts +7 -33
  26. package/resources/groups/groups.d.mts.map +1 -1
  27. package/resources/groups/groups.d.ts +7 -33
  28. package/resources/groups/groups.d.ts.map +1 -1
  29. package/resources/groups/groups.js +4 -21
  30. package/resources/groups/groups.js.map +1 -1
  31. package/resources/groups/groups.mjs +4 -21
  32. package/resources/groups/groups.mjs.map +1 -1
  33. package/resources/identities/identities.d.mts +16 -24
  34. package/resources/identities/identities.d.mts.map +1 -1
  35. package/resources/identities/identities.d.ts +16 -24
  36. package/resources/identities/identities.d.ts.map +1 -1
  37. package/resources/identities/identities.js +4 -21
  38. package/resources/identities/identities.js.map +1 -1
  39. package/resources/identities/identities.mjs +4 -21
  40. package/resources/identities/identities.mjs.map +1 -1
  41. package/resources/index.d.mts +1 -0
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +1 -0
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +3 -1
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +1 -0
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/mcp-servers/index.d.mts +4 -0
  50. package/resources/mcp-servers/index.d.mts.map +1 -0
  51. package/resources/mcp-servers/index.d.ts +4 -0
  52. package/resources/mcp-servers/index.d.ts.map +1 -0
  53. package/resources/mcp-servers/index.js +11 -0
  54. package/resources/mcp-servers/index.js.map +1 -0
  55. package/resources/mcp-servers/index.mjs +5 -0
  56. package/resources/mcp-servers/index.mjs.map +1 -0
  57. package/resources/mcp-servers/mcp-servers.d.mts +603 -0
  58. package/resources/mcp-servers/mcp-servers.d.mts.map +1 -0
  59. package/resources/mcp-servers/mcp-servers.d.ts +603 -0
  60. package/resources/mcp-servers/mcp-servers.d.ts.map +1 -0
  61. package/resources/mcp-servers/mcp-servers.js +63 -0
  62. package/resources/mcp-servers/mcp-servers.js.map +1 -0
  63. package/resources/mcp-servers/mcp-servers.mjs +58 -0
  64. package/resources/mcp-servers/mcp-servers.mjs.map +1 -0
  65. package/resources/mcp-servers/refresh.d.mts +24 -0
  66. package/resources/mcp-servers/refresh.d.mts.map +1 -0
  67. package/resources/mcp-servers/refresh.d.ts +24 -0
  68. package/resources/mcp-servers/refresh.d.ts.map +1 -0
  69. package/resources/mcp-servers/refresh.js +27 -0
  70. package/resources/mcp-servers/refresh.js.map +1 -0
  71. package/resources/mcp-servers/refresh.mjs +23 -0
  72. package/resources/mcp-servers/refresh.mjs.map +1 -0
  73. package/resources/mcp-servers/tools.d.mts +80 -0
  74. package/resources/mcp-servers/tools.d.mts.map +1 -0
  75. package/resources/mcp-servers/tools.d.ts +80 -0
  76. package/resources/mcp-servers/tools.d.ts.map +1 -0
  77. package/resources/mcp-servers/tools.js +36 -0
  78. package/resources/mcp-servers/tools.js.map +1 -0
  79. package/resources/mcp-servers/tools.mjs +32 -0
  80. package/resources/mcp-servers/tools.mjs.map +1 -0
  81. package/resources/mcp-servers.d.mts +2 -0
  82. package/resources/mcp-servers.d.mts.map +1 -0
  83. package/resources/mcp-servers.d.ts +2 -0
  84. package/resources/mcp-servers.d.ts.map +1 -0
  85. package/resources/mcp-servers.js +6 -0
  86. package/resources/mcp-servers.js.map +1 -0
  87. package/resources/mcp-servers.mjs +3 -0
  88. package/resources/mcp-servers.mjs.map +1 -0
  89. package/resources/steps/steps.d.mts +10 -17
  90. package/resources/steps/steps.d.mts.map +1 -1
  91. package/resources/steps/steps.d.ts +10 -17
  92. package/resources/steps/steps.d.ts.map +1 -1
  93. package/resources/steps/steps.js +2 -11
  94. package/resources/steps/steps.js.map +1 -1
  95. package/resources/steps/steps.mjs +2 -11
  96. package/resources/steps/steps.mjs.map +1 -1
  97. package/src/client.ts +34 -0
  98. package/src/core/streaming.ts +0 -7
  99. package/src/resources/agents/agents.ts +60 -79
  100. package/src/resources/groups/groups.ts +9 -54
  101. package/src/resources/identities/identities.ts +18 -45
  102. package/src/resources/index.ts +11 -0
  103. package/src/resources/mcp-servers/index.ts +21 -0
  104. package/src/resources/mcp-servers/mcp-servers.ts +762 -0
  105. package/src/resources/mcp-servers/refresh.ts +43 -0
  106. package/src/resources/mcp-servers/tools.ts +110 -0
  107. package/src/resources/mcp-servers.ts +3 -0
  108. package/src/resources/steps/steps.ts +11 -28
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
@@ -0,0 +1,43 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Refresh extends APIResource {
9
+ /**
10
+ * Refresh tools for an MCP server by:
11
+ *
12
+ * 1. Fetching current tools from the MCP server
13
+ * 2. Deleting tools that no longer exist on the server
14
+ * 3. Updating schemas for existing tools
15
+ * 4. Adding new tools from the server
16
+ *
17
+ * Returns a summary of changes made.
18
+ */
19
+ trigger(
20
+ mcpServerID: string,
21
+ params: RefreshTriggerParams | null | undefined = {},
22
+ options?: RequestOptions,
23
+ ): APIPromise<unknown> {
24
+ const { agent_id } = params ?? {};
25
+ return this._client.patch(path`/v1/mcp-servers/${mcpServerID}/refresh`, {
26
+ query: { agent_id },
27
+ ...options,
28
+ });
29
+ }
30
+ }
31
+
32
+ export type RefreshTriggerResponse = unknown;
33
+
34
+ export interface RefreshTriggerParams {
35
+ agent_id?: string | null;
36
+ }
37
+
38
+ export declare namespace Refresh {
39
+ export {
40
+ type RefreshTriggerResponse as RefreshTriggerResponse,
41
+ type RefreshTriggerParams as RefreshTriggerParams,
42
+ };
43
+ }
@@ -0,0 +1,110 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ToolsAPI from '../tools';
5
+ import * as AgentsAPI from '../agents/agents';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ export class Tools extends APIResource {
11
+ /**
12
+ * Get a specific MCP tool by its ID
13
+ */
14
+ retrieve(toolID: string, params: ToolRetrieveParams, options?: RequestOptions): APIPromise<ToolsAPI.Tool> {
15
+ const { mcp_server_id } = params;
16
+ return this._client.get(path`/v1/mcp-servers/${mcp_server_id}/tools/${toolID}`, options);
17
+ }
18
+
19
+ /**
20
+ * Get a list of all tools for a specific MCP server
21
+ */
22
+ list(mcpServerID: string, options?: RequestOptions): APIPromise<ToolListResponse> {
23
+ return this._client.get(path`/v1/mcp-servers/${mcpServerID}/tools`, options);
24
+ }
25
+
26
+ /**
27
+ * Execute a specific MCP tool
28
+ *
29
+ * The request body should contain the tool arguments in the MCPToolExecuteRequest
30
+ * format.
31
+ */
32
+ run(toolID: string, params: ToolRunParams, options?: RequestOptions): APIPromise<ToolRunResponse> {
33
+ const { mcp_server_id, ...body } = params;
34
+ return this._client.post(path`/v1/mcp-servers/${mcp_server_id}/tools/${toolID}/run`, {
35
+ body,
36
+ ...options,
37
+ });
38
+ }
39
+ }
40
+
41
+ export type ToolListResponse = Array<ToolsAPI.Tool>;
42
+
43
+ export interface ToolRunResponse {
44
+ /**
45
+ * The status of the tool execution and return object
46
+ */
47
+ status: 'success' | 'error';
48
+
49
+ /**
50
+ * Representation of an agent's state. This is the state of the agent at a given
51
+ * time, and is persisted in the DB backend. The state has all the information
52
+ * needed to recreate a persisted agent.
53
+ *
54
+ * Parameters: id (str): The unique identifier of the agent. name (str): The name
55
+ * of the agent (must be unique to the user). created_at (datetime): The datetime
56
+ * the agent was created. message_ids (List[str]): The ids of the messages in the
57
+ * agent's in-context memory. memory (Memory): The in-context memory of the agent.
58
+ * tools (List[str]): The tools used by the agent. This includes any memory editing
59
+ * functions specified in `memory`. system (str): The system prompt used by the
60
+ * agent. llm_config (LLMConfig): The LLM configuration used by the agent.
61
+ * embedding_config (EmbeddingConfig): The embedding configuration used by the
62
+ * agent.
63
+ */
64
+ agent_state?: AgentsAPI.AgentState | null;
65
+
66
+ /**
67
+ * The function return object
68
+ */
69
+ func_return?: unknown;
70
+
71
+ /**
72
+ * The fingerprint of the config for the sandbox
73
+ */
74
+ sandbox_config_fingerprint?: string | null;
75
+
76
+ /**
77
+ * Captured stderr from the function invocation
78
+ */
79
+ stderr?: Array<string> | null;
80
+
81
+ /**
82
+ * Captured stdout (prints, logs) from function invocation
83
+ */
84
+ stdout?: Array<string> | null;
85
+ }
86
+
87
+ export interface ToolRetrieveParams {
88
+ mcp_server_id: string;
89
+ }
90
+
91
+ export interface ToolRunParams {
92
+ /**
93
+ * Path param:
94
+ */
95
+ mcp_server_id: string;
96
+
97
+ /**
98
+ * Body param: Arguments to pass to the MCP tool
99
+ */
100
+ args?: { [key: string]: unknown };
101
+ }
102
+
103
+ export declare namespace Tools {
104
+ export {
105
+ type ToolListResponse as ToolListResponse,
106
+ type ToolRunResponse as ToolRunResponse,
107
+ type ToolRetrieveParams as ToolRetrieveParams,
108
+ type ToolRunParams as ToolRunParams,
109
+ };
110
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './mcp-servers/index';
@@ -13,7 +13,6 @@ import * as TraceAPI from './trace';
13
13
  import { Trace } from './trace';
14
14
  import { APIPromise } from '../../core/api-promise';
15
15
  import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
16
- import { buildHeaders } from '../../internal/headers';
17
16
  import { RequestOptions } from '../../internal/request-options';
18
17
  import { path } from '../../internal/utils/path';
19
18
 
@@ -34,18 +33,10 @@ export class Steps extends APIResource {
34
33
  * List steps with optional pagination and date filters.
35
34
  */
36
35
  list(
37
- params: StepListParams | null | undefined = {},
36
+ query: StepListParams | null | undefined = {},
38
37
  options?: RequestOptions,
39
38
  ): PagePromise<StepsArrayPage, Step> {
40
- const { 'X-Project': xProject, ...query } = params ?? {};
41
- return this._client.getAPIList('/v1/steps/', ArrayPage<Step>, {
42
- query,
43
- ...options,
44
- headers: buildHeaders([
45
- { ...(xProject != null ? { 'X-Project': xProject } : undefined) },
46
- options?.headers,
47
- ]),
48
- });
39
+ return this._client.getAPIList('/v1/steps/', ArrayPage<Step>, { query, ...options });
49
40
  }
50
41
  }
51
42
 
@@ -229,57 +220,49 @@ export interface Step {
229
220
 
230
221
  export interface StepListParams extends ArrayPageParams {
231
222
  /**
232
- * Query param: Filter by the ID of the agent that performed the step
223
+ * Filter by the ID of the agent that performed the step
233
224
  */
234
225
  agent_id?: string | null;
235
226
 
236
227
  /**
237
- * Query param: Return steps before this ISO datetime (e.g.
238
- * "2025-01-29T15:01:19-08:00")
228
+ * Return steps before this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
239
229
  */
240
230
  end_date?: string | null;
241
231
 
242
232
  /**
243
- * Query param: Filter by feedback
233
+ * Filter by feedback
244
234
  */
245
235
  feedback?: 'positive' | 'negative' | null;
246
236
 
247
237
  /**
248
- * Query param: Filter by whether steps have feedback (true) or not (false)
238
+ * Filter by whether steps have feedback (true) or not (false)
249
239
  */
250
240
  has_feedback?: boolean | null;
251
241
 
252
242
  /**
253
- * Query param: Filter by the name of the model used for the step
243
+ * Filter by the name of the model used for the step
254
244
  */
255
245
  model?: string | null;
256
246
 
257
247
  /**
258
- * Query param: Filter by the project ID that is associated with the step (cloud
259
- * only).
248
+ * Filter by the project ID that is associated with the step (cloud only).
260
249
  */
261
250
  project_id?: string | null;
262
251
 
263
252
  /**
264
- * Query param: Return steps after this ISO datetime (e.g.
265
- * "2025-01-29T15:01:19-08:00")
253
+ * Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
266
254
  */
267
255
  start_date?: string | null;
268
256
 
269
257
  /**
270
- * Query param: Filter by tags
258
+ * Filter by tags
271
259
  */
272
260
  tags?: Array<string> | null;
273
261
 
274
262
  /**
275
- * Query param: Filter by trace ids returned by the server
263
+ * Filter by trace ids returned by the server
276
264
  */
277
265
  trace_ids?: Array<string> | null;
278
-
279
- /**
280
- * Header param: Filter by project slug to associate with the group (cloud only).
281
- */
282
- 'X-Project'?: string;
283
266
  }
284
267
 
285
268
  Steps.Metrics = Metrics;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.0-alpha.10'; // x-release-please-version
1
+ export const VERSION = '1.0.0-alpha.11'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0-alpha.10";
1
+ export declare const VERSION = "1.0.0-alpha.11";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0-alpha.10";
1
+ export declare const VERSION = "1.0.0-alpha.11";
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.0.0-alpha.10'; // x-release-please-version
4
+ exports.VERSION = '1.0.0-alpha.11'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.0.0-alpha.10'; // x-release-please-version
1
+ export const VERSION = '1.0.0-alpha.11'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map