@mastra/client-js 0.0.0-bundle-recursion-20251030002519 → 0.0.0-bundle-version-20260121091645
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 +2119 -3
- package/README.md +11 -13
- package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +820 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +8511 -0
- package/dist/client.d.ts +111 -77
- package/dist/client.d.ts.map +1 -1
- package/dist/docs/README.md +33 -0
- package/dist/docs/SKILL.md +34 -0
- package/dist/docs/SOURCE_MAP.json +6 -0
- package/dist/docs/ai-sdk/01-reference.md +358 -0
- package/dist/docs/client-js/01-reference.md +1180 -0
- package/dist/docs/server/01-mastra-client.md +256 -0
- package/dist/docs/server/02-jwt.md +99 -0
- package/dist/docs/server/03-clerk.md +143 -0
- package/dist/docs/server/04-supabase.md +128 -0
- package/dist/docs/server/05-firebase.md +286 -0
- package/dist/docs/server/06-workos.md +201 -0
- package/dist/docs/server/07-auth0.md +233 -0
- package/dist/index.cjs +2108 -993
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2106 -987
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/agent-builder.d.ts +20 -75
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +63 -51
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/index.d.ts +2 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +5 -5
- package/dist/resources/memory-thread.d.ts +31 -24
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +62 -19
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/processor.d.ts +20 -0
- package/dist/resources/processor.d.ts.map +1 -0
- package/dist/resources/run.d.ts +210 -0
- package/dist/resources/run.d.ts.map +1 -0
- package/dist/resources/stored-agent.d.ts +26 -0
- package/dist/resources/stored-agent.d.ts.map +1 -0
- package/dist/resources/tool.d.ts +4 -4
- package/dist/resources/vector.d.ts +5 -5
- package/dist/resources/workflow.d.ts +27 -234
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +299 -99
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +32 -6
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +1 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema.d.ts +9 -1
- package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
- package/package.json +20 -18
- package/dist/resources/network-memory-thread.d.ts +0 -47
- package/dist/resources/network-memory-thread.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -24,9 +24,7 @@ async function main() {
|
|
|
24
24
|
const agent = client.getAgent('your-agent-id');
|
|
25
25
|
|
|
26
26
|
// Generate a response
|
|
27
|
-
const response = await agent.generate({
|
|
28
|
-
messages: [{ role: 'user', content: "What's the weather like today?" }],
|
|
29
|
-
});
|
|
27
|
+
const response = await agent.generate([{ role: 'user', content: "What's the weather like today?" }]);
|
|
30
28
|
|
|
31
29
|
console.log(response);
|
|
32
30
|
}
|
|
@@ -50,7 +48,7 @@ const client = new MastraClient({
|
|
|
50
48
|
|
|
51
49
|
### Agents
|
|
52
50
|
|
|
53
|
-
- `
|
|
51
|
+
- `listAgents()`: Get all available agents
|
|
54
52
|
- `getAgent(agentId)`: Get a specific agent instance
|
|
55
53
|
- `agent.details()`: Get agent details
|
|
56
54
|
- `agent.generate(params)`: Generate a response
|
|
@@ -63,29 +61,29 @@ const client = new MastraClient({
|
|
|
63
61
|
|
|
64
62
|
### Memory
|
|
65
63
|
|
|
66
|
-
- `
|
|
64
|
+
- `listMemoryThreads(params)`: Get memory threads
|
|
67
65
|
- `createMemoryThread(params)`: Create a new memory thread
|
|
68
|
-
- `getMemoryThread(threadId)`: Get a memory thread instance
|
|
66
|
+
- `getMemoryThread({ threadId, agentId })`: Get a memory thread instance
|
|
69
67
|
- `saveMessageToMemory(params)`: Save messages to memory
|
|
70
68
|
- `getMemoryStatus()`: Get memory system status
|
|
69
|
+
- `getWorkingMemory({ agentId, threadId, resourceId? })`: Get working memory for a thread
|
|
70
|
+
- `updateWorkingMemory({ agentId, threadId, workingMemory, resourceId? })`: Update working memory for a thread
|
|
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
|
-
- `workflow.
|
|
85
|
-
- `workflow.createRun()`: Deprecated - use createRunAsync() instead
|
|
84
|
+
- `workflow.createRun()`: Create workflow run
|
|
86
85
|
- `workflow.startAsync(params)`: Execute the workflow and wait for execution results
|
|
87
86
|
- `workflow.resumeAsync(params)`: Resume suspended workflow step async
|
|
88
|
-
- `workflow.watch({runId},(record)=>{})`: Watch the step transitions of the workflow run
|
|
89
87
|
- `workflow.start({runId, triggerData})`: Start a workflow run sync
|
|
90
88
|
- `workflow.resume(params)`: Resume the workflow run sync
|
|
91
89
|
|
|
@@ -101,9 +99,9 @@ const client = new MastraClient({
|
|
|
101
99
|
|
|
102
100
|
### Logs
|
|
103
101
|
|
|
104
|
-
- `
|
|
102
|
+
- `listLogs(params)`: Get system logs
|
|
105
103
|
- `getLog(params)`: Get specific log entry
|
|
106
|
-
- `
|
|
104
|
+
- `listLogTransports()`: Get configured Log transports
|
|
107
105
|
|
|
108
106
|
### Telemetry
|
|
109
107
|
|