@mastra/client-js 1.8.0-alpha.0 → 1.8.0-alpha.2

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.8.0-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1d0a8a8`](https://github.com/mastra-ai/mastra/commit/1d0a8a8acf33203d5744fc429b090ad8598aa8ed)]:
8
+ - @mastra/core@1.11.0-alpha.2
9
+
10
+ ## 1.8.0-alpha.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`866cc2c`](https://github.com/mastra-ai/mastra/commit/866cc2cb1f0e3b314afab5194f69477fada745d1), [`6bcbf8a`](https://github.com/mastra-ai/mastra/commit/6bcbf8a6774d5a53b21d61db8a45ce2593ca1616), [`18c3a90`](https://github.com/mastra-ai/mastra/commit/18c3a90c9e48cf69500e308affeb8eba5860b2af), [`f35487b`](https://github.com/mastra-ai/mastra/commit/f35487bb2d46c636e22aa71d90025613ae38235a), [`6dc2192`](https://github.com/mastra-ai/mastra/commit/6dc21921aef0f0efab15cd0805fa3d18f277a76f), [`eeb3a3f`](https://github.com/mastra-ai/mastra/commit/eeb3a3f43aca10cf49479eed2a84b7d9ecea02ba), [`05f8d90`](https://github.com/mastra-ai/mastra/commit/05f8d9009290ce6aa03428b3add635268615db85), [`4b8da97`](https://github.com/mastra-ai/mastra/commit/4b8da97a5ce306e97869df6c39535d9069e563db), [`256df35`](https://github.com/mastra-ai/mastra/commit/256df3571d62beb3ad4971faa432927cc140e603)]:
15
+ - @mastra/core@1.11.0-alpha.1
16
+
3
17
  ## 1.8.0-alpha.0
4
18
 
5
19
  ### Minor Changes
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.8.0-alpha.0"
6
+ version: "1.8.0-alpha.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -16,13 +16,13 @@ Read the individual reference documents for detailed explanations and code examp
16
16
 
17
17
  ### Docs
18
18
 
19
- - [MastraAuthAuth0 Class](references/docs-server-auth-auth0.md) - Documentation for the MastraAuthAuth0 class, which authenticates Mastra applications using Auth0 authentication.
20
- - [MastraAuthClerk Class](references/docs-server-auth-clerk.md) - Documentation for the MastraAuthClerk class, which authenticates Mastra applications using Clerk authentication.
21
- - [MastraAuthFirebase Class](references/docs-server-auth-firebase.md) - Documentation for the MastraAuthFirebase class, which authenticates Mastra applications using Firebase Authentication.
22
- - [MastraJwtAuth Class](references/docs-server-auth-jwt.md) - Documentation for the MastraJwtAuth class, which authenticates Mastra applications using JSON Web Tokens.
23
- - [MastraAuthSupabase Class](references/docs-server-auth-supabase.md) - Documentation for the MastraAuthSupabase class, which authenticates Mastra applications using Supabase Auth.
24
- - [MastraAuthWorkos Class](references/docs-server-auth-workos.md) - Documentation for the MastraAuthWorkos class, which authenticates Mastra applications using WorkOS authentication.
25
- - [Mastra Client SDK](references/docs-server-mastra-client.md) - Learn how to set up and use the Mastra Client SDK
19
+ - [MastraAuthAuth0 class](references/docs-server-auth-auth0.md) - Documentation for the MastraAuthAuth0 class, which authenticates Mastra applications using Auth0 authentication.
20
+ - [MastraAuthClerk class](references/docs-server-auth-clerk.md) - Documentation for the MastraAuthClerk class, which authenticates Mastra applications using Clerk authentication.
21
+ - [MastraAuthFirebase class](references/docs-server-auth-firebase.md) - Documentation for the MastraAuthFirebase class, which authenticates Mastra applications using Firebase Authentication.
22
+ - [MastraJwtAuth class](references/docs-server-auth-jwt.md) - Documentation for the MastraJwtAuth class, which authenticates Mastra applications using JSON Web Tokens.
23
+ - [MastraAuthSupabase class](references/docs-server-auth-supabase.md) - Documentation for the MastraAuthSupabase class, which authenticates Mastra applications using Supabase Auth.
24
+ - [MastraAuthWorkos class](references/docs-server-auth-workos.md) - Documentation for the MastraAuthWorkos class, which authenticates Mastra applications using WorkOS authentication.
25
+ - [Mastra client SDK](references/docs-server-mastra-client.md) - Learn how to set up and use the Mastra Client SDK
26
26
 
27
27
  ### Reference
28
28
 
@@ -30,9 +30,9 @@ Read the individual reference documents for detailed explanations and code examp
30
30
  - [Reference: toAISdkV4Messages()](references/reference-ai-sdk-to-ai-sdk-v4-messages.md) - API reference for toAISdkV4Messages(), a function to convert Mastra messages to AI SDK v4 UI messages.
31
31
  - [Reference: toAISdkV5Messages()](references/reference-ai-sdk-to-ai-sdk-v5-messages.md) - API reference for toAISdkV5Messages(), a function to convert Mastra messages to AI SDK v5 UI messages.
32
32
  - [Reference: Agents API](references/reference-client-js-agents.md) - Learn how to interact with Mastra AI agents, including generating responses, streaming interactions, and managing agent tools using the client-js SDK.
33
- - [Reference: Error Handling](references/reference-client-js-error-handling.md) - Learn about the built-in retry mechanism and error handling capabilities in the Mastra client-js SDK.
33
+ - [Reference: Error handling](references/reference-client-js-error-handling.md) - Learn about the built-in retry mechanism and error handling capabilities in the Mastra client-js SDK.
34
34
  - [Reference: Logs API](references/reference-client-js-logs.md) - Learn how to access and query system logs and debugging information in Mastra using the client-js SDK.
35
- - [Reference: Mastra Client SDK](references/reference-client-js-mastra-client.md) - Learn how to interact with Mastra using the client-js SDK.
35
+ - [Reference: Mastra client SDK](references/reference-client-js-mastra-client.md) - Learn how to interact with Mastra using the client-js SDK.
36
36
  - [Reference: Memory API](references/reference-client-js-memory.md) - Learn how to manage conversation threads and message history in Mastra using the client-js SDK.
37
37
  - [Reference: Observability API](references/reference-client-js-observability.md) - Learn how to retrieve traces, monitor application performance, and score traces using the client-js SDK.
38
38
  - [Reference: Telemetry API](references/reference-client-js-telemetry.md) - Learn how to retrieve and analyze traces from your Mastra application for monitoring and debugging using the client-js SDK.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.0-alpha.0",
2
+ "version": "1.8.0-alpha.2",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -1,4 +1,4 @@
1
- # MastraAuthAuth0 Class
1
+ # MastraAuthAuth0 class
2
2
 
3
3
  The `MastraAuthAuth0` class provides authentication for Mastra using Auth0. It verifies incoming requests using Auth0-issued JWT tokens and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -1,4 +1,4 @@
1
- # MastraAuthClerk Class
1
+ # MastraAuthClerk class
2
2
 
3
3
  The `MastraAuthClerk` class provides authentication for Mastra using Clerk. It verifies incoming requests using Clerk's authentication system and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -1,4 +1,4 @@
1
- # MastraAuthFirebase Class
1
+ # MastraAuthFirebase class
2
2
 
3
3
  The `MastraAuthFirebase` class provides authentication for Mastra using Firebase Authentication. It verifies incoming requests using Firebase ID tokens and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -66,7 +66,7 @@ export const mastra = new Mastra({
66
66
 
67
67
  The `MastraAuthFirebase` class can be configured through constructor options or environment variables.
68
68
 
69
- ### Environment Variables
69
+ ### Environment variables
70
70
 
71
71
  - `FIREBASE_SERVICE_ACCOUNT`: Path to Firebase service account JSON file
72
72
  - `FIRESTORE_DATABASE_ID` or `FIREBASE_DATABASE_ID`: Firestore database ID
@@ -1,4 +1,4 @@
1
- # MastraJwtAuth Class
1
+ # MastraJwtAuth class
2
2
 
3
3
  The `MastraJwtAuth` class provides a lightweight authentication mechanism for Mastra using JSON Web Tokens (JWTs). It verifies incoming requests based on a shared secret and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -1,4 +1,4 @@
1
- # MastraAuthSupabase Class
1
+ # MastraAuthSupabase class
2
2
 
3
3
  The `MastraAuthSupabase` class provides authentication for Mastra using Supabase Auth. It verifies incoming requests using Supabase's authentication system and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -1,4 +1,4 @@
1
- # MastraAuthWorkos Class
1
+ # MastraAuthWorkos class
2
2
 
3
3
  The `MastraAuthWorkos` class provides authentication for Mastra using WorkOS. It verifies incoming requests using WorkOS access tokens and integrates with the Mastra server using the `auth` option.
4
4
 
@@ -1,4 +1,4 @@
1
- # Mastra Client SDK
1
+ # Mastra client SDK
2
2
 
3
3
  The Mastra Client SDK provides a concise and type-safe interface for interacting with your [Mastra Server](https://mastra.ai/docs/server/mastra-server) from your client environment.
4
4
 
@@ -152,7 +152,7 @@ export async function POST(req: Request) {
152
152
  }
153
153
  ```
154
154
 
155
- ### Using messageMetadata
155
+ ### Using `messageMetadata`
156
156
 
157
157
  ```typescript
158
158
  import { mastra } from '../../mastra'
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Agents API provides methods to interact with Mastra AI agents, including generating responses, streaming interactions, and managing agent tools.
4
4
 
5
- ## Getting All Agents
5
+ ## Getting all agents
6
6
 
7
7
  Retrieve a list of all available agents:
8
8
 
@@ -12,7 +12,7 @@ const agents = await mastraClient.listAgents()
12
12
 
13
13
  Returns a record of agent IDs to their serialized agent configurations.
14
14
 
15
- ## Working with a Specific Agent
15
+ ## Working with a specific agent
16
16
 
17
17
  Get an instance of a specific agent by its ID:
18
18
 
@@ -26,9 +26,9 @@ export const myAgent = new Agent({
26
26
  const agent = mastraClient.getAgent('my-agent')
27
27
  ```
28
28
 
29
- ## Agent Methods
29
+ ## Agent methods
30
30
 
31
- ### details()
31
+ ### `details()`
32
32
 
33
33
  Retrieve detailed information about an agent:
34
34
 
@@ -36,7 +36,7 @@ Retrieve detailed information about an agent:
36
36
  const details = await agent.details()
37
37
  ```
38
38
 
39
- ### generate()
39
+ ### `generate()`
40
40
 
41
41
  Generate a response from the agent:
42
42
 
@@ -69,7 +69,7 @@ const response = await agent.generate('Hello, how are you?', {
69
69
  })
70
70
  ```
71
71
 
72
- ### stream()
72
+ ### `stream()`
73
73
 
74
74
  Stream responses from the agent for real-time interactions:
75
75
 
@@ -151,7 +151,7 @@ for await (const part of uiMessageStream) {
151
151
  }
152
152
  ```
153
153
 
154
- ### getTool()
154
+ ### `getTool()`
155
155
 
156
156
  Retrieve information about a specific tool available to the agent:
157
157
 
@@ -159,7 +159,7 @@ Retrieve information about a specific tool available to the agent:
159
159
  const tool = await agent.getTool('tool-id')
160
160
  ```
161
161
 
162
- ### executeTool()
162
+ ### `executeTool()`
163
163
 
164
164
  Execute a specific tool for the agent:
165
165
 
@@ -169,7 +169,7 @@ const result = await agent.executeTool('tool-id', {
169
169
  })
170
170
  ```
171
171
 
172
- ### network()
172
+ ### `network()`
173
173
 
174
174
  Stream responses from an agent network for multi-agent interactions:
175
175
 
@@ -183,7 +183,7 @@ response.processDataStream({
183
183
  })
184
184
  ```
185
185
 
186
- ### approveToolCall()
186
+ ### `approveToolCall()`
187
187
 
188
188
  Approve a pending tool call that requires human confirmation:
189
189
 
@@ -200,7 +200,7 @@ response.processDataStream({
200
200
  })
201
201
  ```
202
202
 
203
- ### declineToolCall()
203
+ ### `declineToolCall()`
204
204
 
205
205
  Decline a pending tool call that requires human confirmation:
206
206
 
@@ -217,7 +217,7 @@ response.processDataStream({
217
217
  })
218
218
  ```
219
219
 
220
- ### approveToolCallGenerate()
220
+ ### `approveToolCallGenerate()`
221
221
 
222
222
  Approve a pending tool call when using `generate()` (non-streaming). Returns the complete response:
223
223
 
@@ -236,7 +236,7 @@ if (output.finishReason === 'suspended') {
236
236
  }
237
237
  ```
238
238
 
239
- ### declineToolCallGenerate()
239
+ ### `declineToolCallGenerate()`
240
240
 
241
241
  Decline a pending tool call when using `generate()` (non-streaming). Returns the complete response:
242
242
 
@@ -255,7 +255,7 @@ if (output.finishReason === 'suspended') {
255
255
  }
256
256
  ```
257
257
 
258
- ## Client Tools
258
+ ## Client tools
259
259
 
260
260
  Client-side tools allow you to execute custom functions on the client side when the agent requests them.
261
261
 
@@ -306,11 +306,11 @@ response.processDataStream({
306
306
  })
307
307
  ```
308
308
 
309
- ## Stored Agents
309
+ ## Stored agents
310
310
 
311
311
  Stored agents are agent configurations stored in a database that can be created, updated, and deleted at runtime. They reference primitives (tools, workflows, other agents, memory, scorers) by key, which are resolved from the Mastra registry when the agent is instantiated.
312
312
 
313
- ### listStoredAgents()
313
+ ### `listStoredAgents()`
314
314
 
315
315
  Retrieve a paginated list of all stored agents:
316
316
 
@@ -333,7 +333,7 @@ const result = await mastraClient.listStoredAgents({
333
333
  })
334
334
  ```
335
335
 
336
- ### createStoredAgent()
336
+ ### `createStoredAgent()`
337
337
 
338
338
  Create a new stored agent:
339
339
 
@@ -380,7 +380,7 @@ const agent = await mastraClient.createStoredAgent({
380
380
  })
381
381
  ```
382
382
 
383
- ### getStoredAgent()
383
+ ### `getStoredAgent()`
384
384
 
385
385
  Get an instance of a specific stored agent:
386
386
 
@@ -388,9 +388,9 @@ Get an instance of a specific stored agent:
388
388
  const storedAgent = mastraClient.getStoredAgent('my-agent')
389
389
  ```
390
390
 
391
- ## Stored Agent Methods
391
+ ## Stored agent methods
392
392
 
393
- ### details()
393
+ ### `details()`
394
394
 
395
395
  Retrieve the stored agent configuration:
396
396
 
@@ -401,7 +401,7 @@ console.log(details.instructions)
401
401
  console.log(details.model)
402
402
  ```
403
403
 
404
- ### update()
404
+ ### `update()`
405
405
 
406
406
  Update specific fields of a stored agent. All fields are optional:
407
407
 
@@ -427,7 +427,7 @@ await storedAgent.update({
427
427
  })
428
428
  ```
429
429
 
430
- ### delete()
430
+ ### `delete()`
431
431
 
432
432
  Delete a stored agent:
433
433
 
@@ -1,8 +1,8 @@
1
- # Error Handling
1
+ # Error handling
2
2
 
3
3
  The Mastra Client SDK includes built-in retry mechanism and error handling capabilities.
4
4
 
5
- ## Error Handling
5
+ ## Error handling
6
6
 
7
7
  All API methods can throw errors that you can catch and handle:
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Logs API provides methods to access and query system logs and debugging information in Mastra.
4
4
 
5
- ## Getting Logs
5
+ ## Getting logs
6
6
 
7
7
  Retrieve system logs with optional filtering:
8
8
 
@@ -12,7 +12,7 @@ const logs = await mastraClient.listLogs({
12
12
  })
13
13
  ```
14
14
 
15
- ## Getting Logs for a Specific Run
15
+ ## Getting logs for a specific run
16
16
 
17
17
  Retrieve logs for a specific execution run:
18
18
 
@@ -1,4 +1,4 @@
1
- # Mastra Client SDK
1
+ # Mastra client SDK
2
2
 
3
3
  The Mastra Client SDK provides a type-safe interface for interacting with your [Mastra Server](https://mastra.ai/docs/deployment/mastra-server) from your client environment.
4
4
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Memory API provides methods to manage conversation threads and message history in Mastra.
4
4
 
5
- ## Get All Threads
5
+ ## Get all threads
6
6
 
7
7
  Retrieve all memory threads for a specific resource:
8
8
 
@@ -15,7 +15,7 @@ const threads = await mastraClient.getMemoryThreads({
15
15
 
16
16
  When `agentId` is omitted and storage is configured on the server, threads will be retrieved using storage directly. This is useful when multiple agents share the same threads (e.g., in workflows with multiple agent steps).
17
17
 
18
- ## Create a New Thread
18
+ ## Create a new thread
19
19
 
20
20
  Create a new memory thread:
21
21
 
@@ -28,7 +28,7 @@ const thread = await mastraClient.createMemoryThread({
28
28
  })
29
29
  ```
30
30
 
31
- ## Working with a Specific Thread
31
+ ## Working with a specific thread
32
32
 
33
33
  Get an instance of a specific memory thread:
34
34
 
@@ -36,7 +36,7 @@ Get an instance of a specific memory thread:
36
36
  const thread = mastraClient.getMemoryThread({ threadId: 'thread-id', agentId: 'agent-id' })
37
37
  ```
38
38
 
39
- ## Thread Methods
39
+ ## Thread methods
40
40
 
41
41
  ### Get Thread Details
42
42
 
@@ -105,7 +105,7 @@ The clone response includes:
105
105
  - `thread`: The newly created cloned thread with clone metadata
106
106
  - `clonedMessages`: Array of the cloned messages with new IDs
107
107
 
108
- ## Message Operations
108
+ ## Message operations
109
109
 
110
110
  ### Save Messages
111
111
 
@@ -168,7 +168,7 @@ const result = await thread.deleteMessages(['message-1', 'message-2', 'message-3
168
168
  // Returns: { success: true, message: "Message deleted successfully" }
169
169
  ```
170
170
 
171
- ## Working Memory
171
+ ## Working memory
172
172
 
173
173
  Working memory allows agents to maintain persistent information about users across interactions. It can be scoped to either a specific thread or across all threads for a resource (user).
174
174
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Observability API provides methods to retrieve traces, monitor your application's performance, and score traces for evaluation. This helps you understand how your AI agents and workflows are performing.
4
4
 
5
- ## Getting a Specific Trace
5
+ ## Getting a specific trace
6
6
 
7
7
  Retrieve a specific trace by its ID, including all its spans and details:
8
8
 
@@ -10,7 +10,7 @@ Retrieve a specific trace by its ID, including all its spans and details:
10
10
  const trace = await mastraClient.getTrace('trace-id-123')
11
11
  ```
12
12
 
13
- ## Getting Traces with Filtering
13
+ ## Getting traces with filtering
14
14
 
15
15
  Retrieve a paginated list of trace root spans with optional filtering:
16
16
 
@@ -39,7 +39,7 @@ console.log(`Total pages: ${traces.pagination.totalPages}`)
39
39
  const completeTrace = await mastraClient.getTrace(traces.spans[0].traceId)
40
40
  ```
41
41
 
42
- ## Scoring Traces
42
+ ## Scoring traces
43
43
 
44
44
  Score specific traces using registered scorers for evaluation:
45
45
 
@@ -53,7 +53,7 @@ const result = await mastraClient.score({
53
53
  })
54
54
  ```
55
55
 
56
- ## Getting Scores by Span
56
+ ## Getting scores by span
57
57
 
58
58
  Retrieve scores for a specific span within a trace:
59
59
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Telemetry API provides methods to retrieve and analyze traces from your Mastra application. This helps you monitor and debug your application's behavior and performance.
4
4
 
5
- ## Getting Traces
5
+ ## Getting traces
6
6
 
7
7
  Retrieve traces with optional filtering and pagination:
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Tools API provides methods to interact with and execute tools available in the Mastra platform.
4
4
 
5
- ## Getting All Tools
5
+ ## Getting all tools
6
6
 
7
7
  Retrieve a list of all available tools:
8
8
 
@@ -10,7 +10,7 @@ Retrieve a list of all available tools:
10
10
  const tools = await mastraClient.listTools()
11
11
  ```
12
12
 
13
- ## Working with a Specific Tool
13
+ ## Working with a specific tool
14
14
 
15
15
  Get an instance of a specific tool:
16
16
 
@@ -18,7 +18,7 @@ Get an instance of a specific tool:
18
18
  const tool = mastraClient.getTool('tool-id')
19
19
  ```
20
20
 
21
- ## Tool Methods
21
+ ## Tool methods
22
22
 
23
23
  ### Get Tool Details
24
24
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Vectors API provides methods to work with vector embeddings for semantic search and similarity matching in Mastra.
4
4
 
5
- ## Working with Vectors
5
+ ## Working with vectors
6
6
 
7
7
  Get an instance of a vector store:
8
8
 
@@ -10,7 +10,7 @@ Get an instance of a vector store:
10
10
  const vector = mastraClient.getVector('vector-name')
11
11
  ```
12
12
 
13
- ## Vector Methods
13
+ ## Vector methods
14
14
 
15
15
  ### Get Vector Index Details
16
16
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Workflows API provides methods to interact with and execute automated workflows in Mastra.
4
4
 
5
- ## Getting All Workflows
5
+ ## Getting all workflows
6
6
 
7
7
  Retrieve a list of all available workflows:
8
8
 
@@ -10,7 +10,7 @@ Retrieve a list of all available workflows:
10
10
  const workflows = await mastraClient.listWorkflows()
11
11
  ```
12
12
 
13
- ## Working with a Specific Workflow
13
+ ## Working with a specific workflow
14
14
 
15
15
  Get an instance of a specific workflow by its ID:
16
16
 
@@ -24,9 +24,9 @@ export const testWorkflow = createWorkflow({
24
24
  const workflow = mastraClient.getWorkflow('city-workflow')
25
25
  ```
26
26
 
27
- ## Workflow Methods
27
+ ## Workflow methods
28
28
 
29
- ### details()
29
+ ### `details()`
30
30
 
31
31
  Retrieve detailed information about a workflow:
32
32
 
@@ -34,7 +34,7 @@ Retrieve detailed information about a workflow:
34
34
  const details = await workflow.details()
35
35
  ```
36
36
 
37
- ### createRun()
37
+ ### `createRun()`
38
38
 
39
39
  Create a new workflow run instance:
40
40
 
@@ -53,7 +53,7 @@ const run = await workflow.createRun({
53
53
 
54
54
  The `resourceId` parameter associates the workflow run with a specific resource (e.g., user ID, tenant ID). This value is persisted with the run and can be used for filtering and querying runs later.
55
55
 
56
- ### startAsync()
56
+ ### `startAsync()`
57
57
 
58
58
  Start a workflow run and await the full result:
59
59
 
@@ -95,7 +95,7 @@ const result = await run.startAsync({
95
95
  })
96
96
  ```
97
97
 
98
- ### start()
98
+ ### `start()`
99
99
 
100
100
  Start a workflow run without waiting for completion:
101
101
 
@@ -114,7 +114,7 @@ const result = await workflow.runById(run.runId)
114
114
 
115
115
  This is useful for long-running workflows where you want to start execution and check results later.
116
116
 
117
- ### resumeAsync()
117
+ ### `resumeAsync()`
118
118
 
119
119
  Resume a suspended workflow step and await the full result:
120
120
 
@@ -127,7 +127,7 @@ const result = await run.resumeAsync({
127
127
  })
128
128
  ```
129
129
 
130
- ### resume()
130
+ ### `resume()`
131
131
 
132
132
  Resume a suspended workflow step without waiting for completion:
133
133
 
@@ -140,7 +140,7 @@ await run.resume({
140
140
  })
141
141
  ```
142
142
 
143
- ### cancel()
143
+ ### `cancel()`
144
144
 
145
145
  Cancel a running workflow:
146
146
 
@@ -155,7 +155,7 @@ This method stops any running steps and prevents subsequent steps from executing
155
155
 
156
156
  See the [Run.cancel()](https://mastra.ai/reference/workflows/run-methods/cancel) reference for detailed information about how cancellation works and how to write steps that respond to cancellation.
157
157
 
158
- ### stream()
158
+ ### `stream()`
159
159
 
160
160
  Stream workflow execution for real-time updates:
161
161
 
@@ -173,7 +173,7 @@ for await (const chunk of stream) {
173
173
  }
174
174
  ```
175
175
 
176
- ### runById()
176
+ ### `runById()`
177
177
 
178
178
  Get the execution result for a workflow run:
179
179
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.8.0-alpha.2",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -36,8 +36,8 @@
36
36
  "dependencies": {
37
37
  "@lukeed/uuid": "^2.0.1",
38
38
  "json-schema": "^0.4.0",
39
- "@mastra/schema-compat": "1.2.0-alpha.0",
40
- "@mastra/core": "1.11.0-alpha.0"
39
+ "@mastra/core": "1.11.0-alpha.2",
40
+ "@mastra/schema-compat": "1.2.0-alpha.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "zod": "^3.25.0 || ^4.0.0"
@@ -53,10 +53,10 @@
53
53
  "typescript": "^5.9.3",
54
54
  "vitest": "4.0.18",
55
55
  "zod": "^4.3.6",
56
- "@internal/ai-sdk-v5": "0.0.13",
57
56
  "@internal/lint": "0.0.66",
58
- "@internal/types-builder": "0.0.41",
59
- "@internal/ai-sdk-v4": "0.0.13"
57
+ "@internal/ai-sdk-v4": "0.0.13",
58
+ "@internal/ai-sdk-v5": "0.0.13",
59
+ "@internal/types-builder": "0.0.41"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=22.13.0"