@mastra/client-js 1.15.0-alpha.3 → 1.15.0-alpha.5
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.15.0-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`28caa5b`](https://github.com/mastra-ai/mastra/commit/28caa5b032358545af2589ed90636eccb4dd9d2f), [`7d056b6`](https://github.com/mastra-ai/mastra/commit/7d056b6ecf603cacaa0f663ff1df025ed885b6c1), [`26f1f94`](https://github.com/mastra-ai/mastra/commit/26f1f9490574b864ba1ecedf2c9632e0767a23bd)]:
|
|
8
|
+
- @mastra/core@1.29.0-alpha.5
|
|
9
|
+
|
|
10
|
+
## 1.15.0-alpha.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`8a71261`](https://github.com/mastra-ai/mastra/commit/8a71261e3954ae617c6f8e25767b951f99438ab2), [`021a60f`](https://github.com/mastra-ai/mastra/commit/021a60f1f3e0135a70ef23c58be7a9b3aaffe6b4)]:
|
|
15
|
+
- @mastra/core@1.29.0-alpha.4
|
|
16
|
+
|
|
3
17
|
## 1.15.0-alpha.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -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.15.0-alpha.
|
|
6
|
+
version: "1.15.0-alpha.5"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -151,6 +151,30 @@ for await (const part of uiMessageStream) {
|
|
|
151
151
|
}
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
### `streamUntilIdle()`
|
|
155
|
+
|
|
156
|
+
Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `stream()`.
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
const response = await agent.streamUntilIdle('Research solana for me', {
|
|
160
|
+
memory: {
|
|
161
|
+
thread: 'thread-1',
|
|
162
|
+
resource: 'resource-1',
|
|
163
|
+
},
|
|
164
|
+
maxIdleMs: 5 * 60_000,
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
response.processDataStream({
|
|
168
|
+
onChunk: async chunk => {
|
|
169
|
+
if (chunk.type === 'background-task-completed') {
|
|
170
|
+
console.log('task complete:', chunk.payload.taskId)
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
})
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The stream emits the same chunk types as `stream()`, plus `background-task-*` chunks for task lifecycle events. Visit [`Agent.streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) for the full server-side API and [background task chunks](https://mastra.ai/reference/streaming/ChunkType) for the payload shapes.
|
|
177
|
+
|
|
154
178
|
### `getTool()`
|
|
155
179
|
|
|
156
180
|
Retrieve information about a specific tool available to the agent:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "1.15.0-alpha.
|
|
3
|
+
"version": "1.15.0-alpha.5",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@ai-sdk/ui-utils": "^1.2.11",
|
|
38
38
|
"@lukeed/uuid": "^2.0.1",
|
|
39
39
|
"json-schema": "^0.4.0",
|
|
40
|
-
"@mastra/
|
|
41
|
-
"@mastra/
|
|
40
|
+
"@mastra/core": "1.29.0-alpha.5",
|
|
41
|
+
"@mastra/schema-compat": "1.2.9"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"zod": "^3.25.0 || ^4.0.0"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"vitest": "4.1.5",
|
|
55
55
|
"zod": "^4.3.6",
|
|
56
|
-
"@internal/ai-sdk-v5": "0.0.33",
|
|
57
56
|
"@internal/ai-sdk-v4": "0.0.33",
|
|
57
|
+
"@internal/ai-sdk-v5": "0.0.33",
|
|
58
58
|
"@internal/lint": "0.0.86",
|
|
59
59
|
"@internal/types-builder": "0.0.61"
|
|
60
60
|
},
|