@mastra/client-js 1.23.1 → 1.23.2-alpha.0

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,29 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.23.2-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - The `/agents/:agentId/stream` and `/agents/:agentId/resume-stream` endpoints now accept an `untilIdle` field in the request body. When set, the stream stays open across background-task continuations (same behavior as the `/stream-until-idle` endpoint). The dedicated `/stream-until-idle` and `/resume-stream-until-idle` endpoints remain available but are deprecated. ([#17536](https://github.com/mastra-ai/mastra/pull/17536))
8
+
9
+ **Server example:**
10
+
11
+ ```ts
12
+ // POST /api/agents/:agentId/stream
13
+ fetch(`/api/agents/${agentId}/stream`, {
14
+ method: 'POST',
15
+ body: JSON.stringify({
16
+ messages: [{ role: 'user', content: 'Research solana for me' }],
17
+ untilIdle: true, // or { maxIdleMs: 60000 }
18
+ }),
19
+ });
20
+ ```
21
+
22
+ **Client SDK:** `streamUntilIdle()` and `resumeStreamUntilIdle()` are deprecated — use `stream(messages, { untilIdle: true })` instead.
23
+
24
+ - Updated dependencies [[`f82cc72`](https://github.com/mastra-ai/mastra/commit/f82cc72edca0ce636fe18abaf2598d89a0c6bcca), [`fcf6027`](https://github.com/mastra-ai/mastra/commit/fcf602747f6771731dda268ff3493b836f9f0ee9)]:
25
+ - @mastra/core@1.41.0-alpha.0
26
+
3
27
  ## 1.23.1
4
28
 
5
29
  ### Patch 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.23.1"
6
+ version: "1.23.2-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.23.1",
2
+ "version": "1.23.2-alpha.0",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {
5
5
  "RequestContext": {
package/dist/index.cjs CHANGED
@@ -2401,6 +2401,8 @@ var Agent = class extends BaseResource {
2401
2401
  return streamResponse;
2402
2402
  }
2403
2403
  /**
2404
+ * @deprecated Use `resumeStream(resumeData, { untilIdle: true, ... })` instead.
2405
+ *
2404
2406
  * Resumes a suspended agent stream until idle with custom resume data.
2405
2407
  * Used to continue execution after a suspension point (e.g., workflow suspend within an agent).
2406
2408
  */