@mastra/client-js 0.0.0-fix-multi-modal-for-cloud-20251028082043 → 0.0.0-fix-persist-session-cache-option-mcp-server-20251030171242
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 +33 -3
- package/README.md +7 -7
- package/dist/client.d.ts +35 -56
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +364 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +364 -358
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +55 -7
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +20 -25
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +5 -5
- package/dist/resources/memory-thread.d.ts +16 -8
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/tool.d.ts +4 -4
- package/dist/resources/vector.d.ts +5 -5
- package/dist/resources/workflow.d.ts +41 -41
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +35 -34
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +10 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/resources/network-memory-thread.d.ts +0 -47
- package/dist/resources/network-memory-thread.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,53 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-
|
|
3
|
+
## 0.0.0-fix-persist-session-cache-option-mcp-server-20251030171242
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
7
|
+
- Update handlers to use `listWorkflowRuns` instead of `getWorkflowRuns`. Fix type names from `StoragelistThreadsByResourceIdInput/Output` to `StorageListThreadsByResourceIdInput/Output`. ([#9507](https://github.com/mastra-ai/mastra/pull/9507))
|
|
8
|
+
|
|
9
|
+
- Replace `getThreadsByResourceIdPaginated` with `listThreadsByResourceId` across memory handlers. Update client SDK to use `listThreads()` with `offset`/`limit` parameters instead of deprecated `getMemoryThreads()`. Consolidate `/api/memory/threads` routes to single paginated endpoint. ([#9508](https://github.com/mastra-ai/mastra/pull/9508))
|
|
10
|
+
|
|
11
|
+
- Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
|
|
12
|
+
|
|
13
|
+
- Remove deprecated methods from client-js ([#9480](https://github.com/mastra-ai/mastra/pull/9480))
|
|
14
|
+
|
|
15
|
+
- Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
|
|
16
|
+
|
|
7
17
|
- Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
|
|
8
18
|
|
|
19
|
+
- Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- Add observeStream support for agent-builder template installation ([#9372](https://github.com/mastra-ai/mastra/pull/9372))
|
|
24
|
+
- Add observeStream, observeStreamVNext, observeStreamLegacy, and resumeStream methods to agent-builder client SDK
|
|
25
|
+
- Add corresponding server handlers and deployer routes for observe streaming
|
|
26
|
+
- Add tracingOptions parameter to existing agent-builder handlers for parity with workflows
|
|
27
|
+
- Update template installation processor to support both legacy and VNext streaming event formats
|
|
28
|
+
|
|
9
29
|
### Patch Changes
|
|
10
30
|
|
|
31
|
+
- Make step optional in all resume APIs ([#9454](https://github.com/mastra-ai/mastra/pull/9454))
|
|
32
|
+
|
|
11
33
|
- Add search memory in client-js ([#9326](https://github.com/mastra-ai/mastra/pull/9326))
|
|
12
34
|
|
|
13
35
|
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
14
36
|
|
|
15
37
|
- Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9144](https://github.com/mastra-ai/mastra/pull/9144))
|
|
16
38
|
|
|
39
|
+
- Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9481](https://github.com/mastra-ai/mastra/pull/9481))
|
|
40
|
+
|
|
17
41
|
- Move the enhance instruction fetch call to client-js ([#9302](https://github.com/mastra-ai/mastra/pull/9302))
|
|
18
42
|
|
|
19
|
-
-
|
|
20
|
-
|
|
43
|
+
- add client-js function to fetch model providers ([#9376](https://github.com/mastra-ai/mastra/pull/9376))
|
|
44
|
+
|
|
45
|
+
- Fix undefined runtimeContext using memory from playground ([#9328](https://github.com/mastra-ai/mastra/pull/9328))
|
|
46
|
+
|
|
47
|
+
- Make step optional in resumeStreamVNext API ([#9453](https://github.com/mastra-ai/mastra/pull/9453))
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`0e8ed46`](https://github.com/mastra-ai/mastra/commit/0e8ed467c54d6901a6a365f270ec15d6faadb36c), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`3443770`](https://github.com/mastra-ai/mastra/commit/3443770662df8eb24c9df3589b2792d78cfcb811), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`5948e6a`](https://github.com/mastra-ai/mastra/commit/5948e6a5146c83666ba3f294b2be576c82a513fb), [`8940859`](https://github.com/mastra-ai/mastra/commit/89408593658199b4ad67f7b65e888f344e64a442), [`e629310`](https://github.com/mastra-ai/mastra/commit/e629310f1a73fa236d49ec7a1d1cceb6229dc7cc), [`4c6b492`](https://github.com/mastra-ai/mastra/commit/4c6b492c4dd591c6a592520c1f6855d6e936d71f), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`71c8d6c`](https://github.com/mastra-ai/mastra/commit/71c8d6c161253207b2b9588bdadb7eed604f7253), [`6179a9b`](https://github.com/mastra-ai/mastra/commit/6179a9ba36ffac326de3cc3c43cdc8028d37c251), [`7051bf3`](https://github.com/mastra-ai/mastra/commit/7051bf38b3b122a069008f861f7bfc004a6d9f6e), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`9f4a683`](https://github.com/mastra-ai/mastra/commit/9f4a6833e88b52574665c028fd5508ad5c2f6004), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`2a90c55`](https://github.com/mastra-ai/mastra/commit/2a90c55a86a9210697d5adaab5ee94584b079adc), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`c710c16`](https://github.com/mastra-ai/mastra/commit/c710c1652dccfdc4111c8412bca7a6bb1d48b441), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`844ea5d`](https://github.com/mastra-ai/mastra/commit/844ea5dc0c248961e7bf73629ae7dcff503e853c), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`7b763e5`](https://github.com/mastra-ai/mastra/commit/7b763e52fc3eaf699c2a99f2adf418dd46e4e9a5), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`3697853`](https://github.com/mastra-ai/mastra/commit/3697853deeb72017d90e0f38a93c1e29221aeca0), [`a534e95`](https://github.com/mastra-ai/mastra/commit/a534e9591f83b3cc1ebff99c67edf4cda7bf81d3), [`9d0e7fe`](https://github.com/mastra-ai/mastra/commit/9d0e7feca8ed98de959f53476ee1456073673348), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`22f64bc`](https://github.com/mastra-ai/mastra/commit/22f64bc1d37149480b58bf2fefe35b79a1e3e7d5), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`735d8c1`](https://github.com/mastra-ai/mastra/commit/735d8c1c0d19fbc09e6f8b66cf41bc7655993838), [`c218bd3`](https://github.com/mastra-ai/mastra/commit/c218bd3759e32423735b04843a09404572631014), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`2b8893c`](https://github.com/mastra-ai/mastra/commit/2b8893cb108ef9acb72ee7835cd625610d2c1a4a), [`8e5c75b`](https://github.com/mastra-ai/mastra/commit/8e5c75bdb1d08a42d45309a4c72def4b6890230f), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
|
|
50
|
+
- @mastra/core@0.0.0-fix-persist-session-cache-option-mcp-server-20251030171242
|
|
21
51
|
|
|
22
52
|
## 0.16.4
|
|
23
53
|
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ const client = new MastraClient({
|
|
|
50
50
|
|
|
51
51
|
### Agents
|
|
52
52
|
|
|
53
|
-
- `
|
|
53
|
+
- `listAgents()`: Get all available agents
|
|
54
54
|
- `getAgent(agentId)`: Get a specific agent instance
|
|
55
55
|
- `agent.details()`: Get agent details
|
|
56
56
|
- `agent.generate(params)`: Generate a response
|
|
@@ -63,22 +63,22 @@ const client = new MastraClient({
|
|
|
63
63
|
|
|
64
64
|
### Memory
|
|
65
65
|
|
|
66
|
-
- `
|
|
66
|
+
- `listMemoryThreads(params)`: Get memory threads
|
|
67
67
|
- `createMemoryThread(params)`: Create a new memory thread
|
|
68
|
-
- `getMemoryThread(threadId)`: Get a memory thread instance
|
|
68
|
+
- `getMemoryThread({ threadId, agentId })`: Get a memory thread instance
|
|
69
69
|
- `saveMessageToMemory(params)`: Save messages to memory
|
|
70
70
|
- `getMemoryStatus()`: Get memory system status
|
|
71
71
|
|
|
72
72
|
### Tools
|
|
73
73
|
|
|
74
|
-
- `
|
|
74
|
+
- `listTools()`: Get all available tools
|
|
75
75
|
- `getTool(toolId)`: Get a tool instance
|
|
76
76
|
- `tool.details()`: Get tool details
|
|
77
77
|
- `tool.execute(params)`: Execute the tool
|
|
78
78
|
|
|
79
79
|
### Workflows
|
|
80
80
|
|
|
81
|
-
- `
|
|
81
|
+
- `listWorkflows()`: Get all workflows
|
|
82
82
|
- `getWorkflow(workflowId)`: Get a workflow instance
|
|
83
83
|
- `workflow.details()`: Get workflow details
|
|
84
84
|
- `workflow.createRunAsync()`: Create workflow run
|
|
@@ -101,9 +101,9 @@ const client = new MastraClient({
|
|
|
101
101
|
|
|
102
102
|
### Logs
|
|
103
103
|
|
|
104
|
-
- `
|
|
104
|
+
- `listLogs(params)`: Get system logs
|
|
105
105
|
- `getLog(params)`: Get specific log entry
|
|
106
|
-
- `
|
|
106
|
+
- `listLogTransports()`: Get configured Log transports
|
|
107
107
|
|
|
108
108
|
### Telemetry
|
|
109
109
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { AITraceRecord, AITracesPaginatedArg, WorkflowInfo } from '@mastra/core';
|
|
2
2
|
import type { ServerDetailInfo } from '@mastra/core/mcp';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
4
4
|
import { Agent, MemoryThread, Tool, Workflow, Vector, BaseResource, A2A, MCPTool, AgentBuilder } from './resources/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetMemoryThreadParams, GetMemoryThreadResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetNetworkMemoryThreadParams, CreateNetworkMemoryThreadParams, SaveNetworkMessageToMemoryParams, GetScorerResponse, GetScoresByScorerIdParams, GetScoresResponse, GetScoresByRunIdParams, GetScoresByEntityIdParams, GetScoresBySpanParams, SaveScoreParams, SaveScoreResponse, GetAITracesResponse, GetMemoryConfigParams, GetMemoryConfigResponse, GetMemoryThreadMessagesResponse, MemorySearchResponse } from './types.js';
|
|
5
|
+
import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetScorerResponse, GetScoresByScorerIdParams, GetScoresResponse, GetScoresByRunIdParams, GetScoresByEntityIdParams, GetScoresBySpanParams, SaveScoreParams, SaveScoreResponse, GetAITracesResponse, GetMemoryConfigParams, GetMemoryConfigResponse, GetMemoryThreadMessagesResponse, MemorySearchResponse, ListAgentsModelProvidersResponse, ListMemoryThreadsParams, ListMemoryThreadsResponse } from './types.js';
|
|
7
6
|
export declare class MastraClient extends BaseResource {
|
|
8
7
|
private observability;
|
|
9
8
|
constructor(options: ClientOptions);
|
|
10
9
|
/**
|
|
11
10
|
* Retrieves all available agents
|
|
12
|
-
* @param
|
|
11
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
13
12
|
* @returns Promise containing map of agent IDs to agent details
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
listAgents(requestContext?: RequestContext | Record<string, any>): Promise<Record<string, GetAgentResponse>>;
|
|
15
|
+
listAgentsModelProviders(): Promise<ListAgentsModelProvidersResponse>;
|
|
16
16
|
/**
|
|
17
17
|
* Gets an agent instance by ID
|
|
18
18
|
* @param agentId - ID of the agent to retrieve
|
|
@@ -20,20 +20,20 @@ export declare class MastraClient extends BaseResource {
|
|
|
20
20
|
*/
|
|
21
21
|
getAgent(agentId: string): Agent;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param params - Parameters containing
|
|
25
|
-
* @returns Promise containing array of memory threads
|
|
23
|
+
* Lists memory threads for a resource with pagination support
|
|
24
|
+
* @param params - Parameters containing resource ID, pagination options, and optional request context
|
|
25
|
+
* @returns Promise containing paginated array of memory threads with metadata
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
listMemoryThreads(params: ListMemoryThreadsParams): Promise<ListMemoryThreadsResponse>;
|
|
28
28
|
/**
|
|
29
29
|
* Retrieves memory config for a resource
|
|
30
|
-
* @param params - Parameters containing the resource ID
|
|
31
|
-
* @returns Promise containing
|
|
30
|
+
* @param params - Parameters containing the resource ID and optional request context
|
|
31
|
+
* @returns Promise containing memory configuration
|
|
32
32
|
*/
|
|
33
33
|
getMemoryConfig(params: GetMemoryConfigParams): Promise<GetMemoryConfigResponse>;
|
|
34
34
|
/**
|
|
35
35
|
* Creates a new memory thread
|
|
36
|
-
* @param params - Parameters for creating the memory thread
|
|
36
|
+
* @param params - Parameters for creating the memory thread including optional request context
|
|
37
37
|
* @returns Promise containing the created memory thread
|
|
38
38
|
*/
|
|
39
39
|
createMemoryThread(params: CreateMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
|
|
@@ -42,68 +42,44 @@ export declare class MastraClient extends BaseResource {
|
|
|
42
42
|
* @param threadId - ID of the memory thread to retrieve
|
|
43
43
|
* @returns MemoryThread instance
|
|
44
44
|
*/
|
|
45
|
-
getMemoryThread(threadId
|
|
45
|
+
getMemoryThread({ threadId, agentId }: {
|
|
46
|
+
threadId: string;
|
|
47
|
+
agentId: string;
|
|
48
|
+
}): MemoryThread;
|
|
46
49
|
getThreadMessages(threadId: string, opts?: {
|
|
47
50
|
agentId?: string;
|
|
48
51
|
networkId?: string;
|
|
52
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
49
53
|
}): Promise<GetMemoryThreadMessagesResponse>;
|
|
50
54
|
deleteThread(threadId: string, opts?: {
|
|
51
55
|
agentId?: string;
|
|
52
56
|
networkId?: string;
|
|
57
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
53
58
|
}): Promise<{
|
|
54
59
|
success: boolean;
|
|
55
60
|
message: string;
|
|
56
61
|
}>;
|
|
57
62
|
/**
|
|
58
63
|
* Saves messages to memory
|
|
59
|
-
* @param params - Parameters containing messages to save
|
|
64
|
+
* @param params - Parameters containing messages to save and optional request context
|
|
60
65
|
* @returns Promise containing the saved messages
|
|
61
66
|
*/
|
|
62
67
|
saveMessageToMemory(params: SaveMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
|
|
63
68
|
/**
|
|
64
69
|
* Gets the status of the memory system
|
|
70
|
+
* @param agentId - The agent ID
|
|
71
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
65
72
|
* @returns Promise containing memory system status
|
|
66
73
|
*/
|
|
67
|
-
getMemoryStatus(agentId: string): Promise<{
|
|
68
|
-
result: boolean;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Retrieves memory threads for a resource
|
|
72
|
-
* @param params - Parameters containing the resource ID
|
|
73
|
-
* @returns Promise containing array of memory threads
|
|
74
|
-
*/
|
|
75
|
-
getNetworkMemoryThreads(params: GetNetworkMemoryThreadParams): Promise<GetMemoryThreadResponse>;
|
|
76
|
-
/**
|
|
77
|
-
* Creates a new memory thread
|
|
78
|
-
* @param params - Parameters for creating the memory thread
|
|
79
|
-
* @returns Promise containing the created memory thread
|
|
80
|
-
*/
|
|
81
|
-
createNetworkMemoryThread(params: CreateNetworkMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
|
|
82
|
-
/**
|
|
83
|
-
* Gets a memory thread instance by ID
|
|
84
|
-
* @param threadId - ID of the memory thread to retrieve
|
|
85
|
-
* @returns MemoryThread instance
|
|
86
|
-
*/
|
|
87
|
-
getNetworkMemoryThread(threadId: string, networkId: string): NetworkMemoryThread;
|
|
88
|
-
/**
|
|
89
|
-
* Saves messages to memory
|
|
90
|
-
* @param params - Parameters containing messages to save
|
|
91
|
-
* @returns Promise containing the saved messages
|
|
92
|
-
*/
|
|
93
|
-
saveNetworkMessageToMemory(params: SaveNetworkMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
|
|
94
|
-
/**
|
|
95
|
-
* Gets the status of the memory system
|
|
96
|
-
* @returns Promise containing memory system status
|
|
97
|
-
*/
|
|
98
|
-
getNetworkMemoryStatus(networkId: string): Promise<{
|
|
74
|
+
getMemoryStatus(agentId: string, requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
99
75
|
result: boolean;
|
|
100
76
|
}>;
|
|
101
77
|
/**
|
|
102
78
|
* Retrieves all available tools
|
|
103
|
-
* @param
|
|
79
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
104
80
|
* @returns Promise containing map of tool IDs to tool details
|
|
105
81
|
*/
|
|
106
|
-
|
|
82
|
+
listTools(requestContext?: RequestContext | Record<string, any>): Promise<Record<string, GetToolResponse>>;
|
|
107
83
|
/**
|
|
108
84
|
* Gets a tool instance by ID
|
|
109
85
|
* @param toolId - ID of the tool to retrieve
|
|
@@ -112,10 +88,10 @@ export declare class MastraClient extends BaseResource {
|
|
|
112
88
|
getTool(toolId: string): Tool;
|
|
113
89
|
/**
|
|
114
90
|
* Retrieves all available workflows
|
|
115
|
-
* @param
|
|
91
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
116
92
|
* @returns Promise containing map of workflow IDs to workflow details
|
|
117
93
|
*/
|
|
118
|
-
|
|
94
|
+
listWorkflows(requestContext?: RequestContext | Record<string, any>): Promise<Record<string, GetWorkflowResponse>>;
|
|
119
95
|
/**
|
|
120
96
|
* Gets a workflow instance by ID
|
|
121
97
|
* @param workflowId - ID of the workflow to retrieve
|
|
@@ -143,7 +119,7 @@ export declare class MastraClient extends BaseResource {
|
|
|
143
119
|
* @param params - Parameters for filtering logs
|
|
144
120
|
* @returns Promise containing array of log messages
|
|
145
121
|
*/
|
|
146
|
-
|
|
122
|
+
listLogs(params: GetLogsParams): Promise<GetLogsResponse>;
|
|
147
123
|
/**
|
|
148
124
|
* Gets logs for a specific run
|
|
149
125
|
* @param params - Parameters containing run ID to retrieve
|
|
@@ -154,7 +130,7 @@ export declare class MastraClient extends BaseResource {
|
|
|
154
130
|
* List of all log transports
|
|
155
131
|
* @returns Promise containing list of log transports
|
|
156
132
|
*/
|
|
157
|
-
|
|
133
|
+
listLogTransports(): Promise<{
|
|
158
134
|
transports: string[];
|
|
159
135
|
}>;
|
|
160
136
|
/**
|
|
@@ -202,17 +178,19 @@ export declare class MastraClient extends BaseResource {
|
|
|
202
178
|
* @param resourceId - Optional ID of the resource.
|
|
203
179
|
* @returns Working memory for the specified thread or resource.
|
|
204
180
|
*/
|
|
205
|
-
getWorkingMemory({ agentId, threadId, resourceId, }: {
|
|
181
|
+
getWorkingMemory({ agentId, threadId, resourceId, requestContext, }: {
|
|
206
182
|
agentId: string;
|
|
207
183
|
threadId: string;
|
|
208
184
|
resourceId?: string;
|
|
185
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
209
186
|
}): Promise<unknown>;
|
|
210
|
-
searchMemory({ agentId, resourceId, threadId, searchQuery, memoryConfig, }: {
|
|
187
|
+
searchMemory({ agentId, resourceId, threadId, searchQuery, memoryConfig, requestContext, }: {
|
|
211
188
|
agentId: string;
|
|
212
189
|
resourceId: string;
|
|
213
190
|
threadId?: string;
|
|
214
191
|
searchQuery: string;
|
|
215
192
|
memoryConfig?: any;
|
|
193
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
216
194
|
}): Promise<MemorySearchResponse>;
|
|
217
195
|
/**
|
|
218
196
|
* Updates the working memory for a specific thread (optionally resource-scoped).
|
|
@@ -221,17 +199,18 @@ export declare class MastraClient extends BaseResource {
|
|
|
221
199
|
* @param workingMemory - The new working memory content.
|
|
222
200
|
* @param resourceId - Optional ID of the resource.
|
|
223
201
|
*/
|
|
224
|
-
updateWorkingMemory({ agentId, threadId, workingMemory, resourceId, }: {
|
|
202
|
+
updateWorkingMemory({ agentId, threadId, workingMemory, resourceId, requestContext, }: {
|
|
225
203
|
agentId: string;
|
|
226
204
|
threadId: string;
|
|
227
205
|
workingMemory: string;
|
|
228
206
|
resourceId?: string;
|
|
207
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
229
208
|
}): Promise<unknown>;
|
|
230
209
|
/**
|
|
231
210
|
* Retrieves all available scorers
|
|
232
211
|
* @returns Promise containing list of available scorers
|
|
233
212
|
*/
|
|
234
|
-
|
|
213
|
+
listScorers(): Promise<Record<string, GetScorerResponse>>;
|
|
235
214
|
/**
|
|
236
215
|
* Retrieves a scorer by ID
|
|
237
216
|
* @param scorerId - ID of the scorer to retrieve
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,GAAG,EACH,OAAO,EACP,YAAY,EAEb,MAAM,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACtF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