@mastra/client-js 1.18.0-alpha.14 → 1.18.0-alpha.16
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 +23 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts +1 -1
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/utils/process-a2a-stream.d.ts +1 -1
- package/dist/utils/process-a2a-stream.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 1.18.0-alpha.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`105e454`](https://github.com/mastra-ai/mastra/commit/105e454c95af06a7c741c15969d8f9b0f02463a7)]:
|
|
8
|
+
- @mastra/core@1.33.0-alpha.15
|
|
9
|
+
|
|
10
|
+
## 1.18.0-alpha.15
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Added client, React, and Studio support for Agent signals in threaded chat. Threaded user messages now send through Agent signals, stream output is consumed from the thread subscription, echoed user messages are deduped by signal ID, file and image message contents are preserved, Studio can send follow-ups while a response is streaming, Studio subscribes to open threads so additional tabs can observe active streams, and the Studio stop button aborts the active thread subscription. React chat also falls back to legacy threaded streaming when it connects to a server or core version that does not support signal routes yet. ([#16338](https://github.com/mastra-ai/mastra/pull/16338))
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
const { sendMessage } = useChat({ agentId, resourceId, threadId });
|
|
18
|
+
await sendMessage({ message: 'Follow up while streaming', threadId });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies:
|
|
24
|
+
- @mastra/core@1.33.0-alpha.14
|
|
25
|
+
|
|
3
26
|
## 1.18.0-alpha.14
|
|
4
27
|
|
|
5
28
|
### 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.18.0-alpha.
|
|
6
|
+
version: "1.18.0-alpha.16"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var error = require('@mastra/core/error');
|
|
|
6
6
|
var schema = require('@mastra/schema-compat/schema');
|
|
7
7
|
var requestContext = require('@mastra/core/request-context');
|
|
8
8
|
var zodToJson = require('@mastra/schema-compat/zod-to-json');
|
|
9
|
-
var
|
|
9
|
+
var client = require('@mastra/core/a2a/client');
|
|
10
10
|
var canonicalize = require('canonicalize');
|
|
11
11
|
var jose = require('jose');
|
|
12
12
|
|
|
@@ -2982,7 +2982,7 @@ async function verifyAgentCardSignatureIfPresent(agentCard, options) {
|
|
|
2982
2982
|
function createA2AJsonRpcError(response) {
|
|
2983
2983
|
const error = response.error;
|
|
2984
2984
|
const message = error?.message ?? "Unknown A2A JSON-RPC error";
|
|
2985
|
-
return typeof error?.code === "number" ? new
|
|
2985
|
+
return typeof error?.code === "number" ? new client.MastraA2AError(error.code, message, error.data) : new MastraClientError(200, "OK", `A2A JSON-RPC error - ${message}`, error);
|
|
2986
2986
|
}
|
|
2987
2987
|
function unwrapA2AResult(response) {
|
|
2988
2988
|
if ("error" in response && response.error) {
|