@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.
- package/CHANGELOG.md +20 -0
- package/client.d.mts +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +0 -5
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +0 -5
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +59 -69
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +59 -69
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +2 -10
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +2 -10
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/groups/groups.d.mts +7 -33
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +7 -33
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +4 -21
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +4 -21
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/identities/identities.d.mts +16 -24
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +16 -24
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js +4 -21
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs +4 -21
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +4 -0
- package/resources/mcp-servers/index.d.mts.map +1 -0
- package/resources/mcp-servers/index.d.ts +4 -0
- package/resources/mcp-servers/index.d.ts.map +1 -0
- package/resources/mcp-servers/index.js +11 -0
- package/resources/mcp-servers/index.js.map +1 -0
- package/resources/mcp-servers/index.mjs +5 -0
- package/resources/mcp-servers/index.mjs.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.mts +603 -0
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.ts +603 -0
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers/mcp-servers.js +63 -0
- package/resources/mcp-servers/mcp-servers.js.map +1 -0
- package/resources/mcp-servers/mcp-servers.mjs +58 -0
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -0
- package/resources/mcp-servers/refresh.d.mts +24 -0
- package/resources/mcp-servers/refresh.d.mts.map +1 -0
- package/resources/mcp-servers/refresh.d.ts +24 -0
- package/resources/mcp-servers/refresh.d.ts.map +1 -0
- package/resources/mcp-servers/refresh.js +27 -0
- package/resources/mcp-servers/refresh.js.map +1 -0
- package/resources/mcp-servers/refresh.mjs +23 -0
- package/resources/mcp-servers/refresh.mjs.map +1 -0
- package/resources/mcp-servers/tools.d.mts +80 -0
- package/resources/mcp-servers/tools.d.mts.map +1 -0
- package/resources/mcp-servers/tools.d.ts +80 -0
- package/resources/mcp-servers/tools.d.ts.map +1 -0
- package/resources/mcp-servers/tools.js +36 -0
- package/resources/mcp-servers/tools.js.map +1 -0
- package/resources/mcp-servers/tools.mjs +32 -0
- package/resources/mcp-servers/tools.mjs.map +1 -0
- package/resources/mcp-servers.d.mts +2 -0
- package/resources/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers.d.ts +2 -0
- package/resources/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers.js +6 -0
- package/resources/mcp-servers.js.map +1 -0
- package/resources/mcp-servers.mjs +3 -0
- package/resources/mcp-servers.mjs.map +1 -0
- package/resources/steps/steps.d.mts +10 -17
- package/resources/steps/steps.d.mts.map +1 -1
- package/resources/steps/steps.d.ts +10 -17
- package/resources/steps/steps.d.ts.map +1 -1
- package/resources/steps/steps.js +2 -11
- package/resources/steps/steps.js.map +1 -1
- package/resources/steps/steps.mjs +2 -11
- package/resources/steps/steps.mjs.map +1 -1
- package/src/client.ts +34 -0
- package/src/core/streaming.ts +0 -7
- package/src/resources/agents/agents.ts +60 -79
- package/src/resources/groups/groups.ts +9 -54
- package/src/resources/identities/identities.ts +18 -45
- package/src/resources/index.ts +11 -0
- package/src/resources/mcp-servers/index.ts +21 -0
- package/src/resources/mcp-servers/mcp-servers.ts +762 -0
- package/src/resources/mcp-servers/refresh.ts +43 -0
- package/src/resources/mcp-servers/tools.ts +110 -0
- package/src/resources/mcp-servers.ts +3 -0
- package/src/resources/steps/steps.ts +11 -28
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
+
}
|
|
@@ -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
|
-
|
|
36
|
+
query: StepListParams | null | undefined = {},
|
|
38
37
|
options?: RequestOptions,
|
|
39
38
|
): PagePromise<StepsArrayPage, Step> {
|
|
40
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
233
|
+
* Filter by feedback
|
|
244
234
|
*/
|
|
245
235
|
feedback?: 'positive' | 'negative' | null;
|
|
246
236
|
|
|
247
237
|
/**
|
|
248
|
-
*
|
|
238
|
+
* Filter by whether steps have feedback (true) or not (false)
|
|
249
239
|
*/
|
|
250
240
|
has_feedback?: boolean | null;
|
|
251
241
|
|
|
252
242
|
/**
|
|
253
|
-
*
|
|
243
|
+
* Filter by the name of the model used for the step
|
|
254
244
|
*/
|
|
255
245
|
model?: string | null;
|
|
256
246
|
|
|
257
247
|
/**
|
|
258
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
258
|
+
* Filter by tags
|
|
271
259
|
*/
|
|
272
260
|
tags?: Array<string> | null;
|
|
273
261
|
|
|
274
262
|
/**
|
|
275
|
-
*
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export const VERSION = '1.0.0-alpha.11'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|