@mastra/react 0.4.1-alpha.1 → 0.4.1-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 +8 -0
- package/dist/agent/hooks.d.ts.map +1 -1
- package/dist/index.cjs +33 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -33
- package/dist/index.js.map +1 -1
- package/dist/mastra-react-provider.d.ts +1 -1
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/react
|
|
2
2
|
|
|
3
|
+
## 0.4.1-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`df1947a`](https://github.com/mastra-ai/mastra/commit/df1947affa40f742067542251fac7ca759492ef4), [`ee59b74`](https://github.com/mastra-ai/mastra/commit/ee59b743ce73ad11784b4d9c6fbba8568edee1c8), [`a97b1a0`](https://github.com/mastra-ai/mastra/commit/a97b1a0abaed83946c3519d1e0f680d0815b8a67)]:
|
|
8
|
+
- @mastra/core@1.37.0-alpha.2
|
|
9
|
+
- @mastra/client-js@1.21.0-alpha.2
|
|
10
|
+
|
|
3
11
|
## 0.4.1-alpha.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/agent/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA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;kCAiCN,MAAM;0CAgCE,MAAM;0CAgCN,MAAM;;;;oBAtmBvB,UAAU,GAAG,UAAU;;;uCAsoBT,MAAM,UAAU,MAAM;uCAiCtB,MAAM,UAAU,MAAM;;;oBApqBtC,UAAU,GAAG,UAAU;;;CA8uBxD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -69,39 +69,6 @@ var MastraReactProvider = ({
|
|
|
69
69
|
);
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
// src/agent/extractRunIdFromMessages.ts
|
|
73
|
-
var extractRunIdFromMessages = (messages) => {
|
|
74
|
-
for (const message of messages) {
|
|
75
|
-
const metadataSources = [
|
|
76
|
-
message.metadata?.pendingToolApprovals,
|
|
77
|
-
message.metadata?.requireApprovalMetadata,
|
|
78
|
-
message.metadata?.suspendedTools
|
|
79
|
-
];
|
|
80
|
-
for (const source of metadataSources) {
|
|
81
|
-
if (!source || typeof source !== "object") continue;
|
|
82
|
-
for (const suspensionData of Object.values(source)) {
|
|
83
|
-
if (suspensionData && typeof suspensionData === "object" && typeof suspensionData.runId === "string" && suspensionData.runId.length > 0) {
|
|
84
|
-
return suspensionData.runId;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return void 0;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// src/agent/signal-data.ts
|
|
93
|
-
function convertSignalDataToBase64String(content) {
|
|
94
|
-
if (typeof content === "string") {
|
|
95
|
-
return content;
|
|
96
|
-
}
|
|
97
|
-
const bytes = content instanceof ArrayBuffer ? new Uint8Array(content) : content;
|
|
98
|
-
let binary = "";
|
|
99
|
-
for (const byte of bytes) {
|
|
100
|
-
binary += String.fromCharCode(byte);
|
|
101
|
-
}
|
|
102
|
-
return btoa(binary);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
72
|
// src/lib/ai-sdk/utils/formatCompletionFeedback.ts
|
|
106
73
|
var formatBaseCompletionFeedback = (result, maxIterationReached, formatScorerHeading, incompleteMessage) => {
|
|
107
74
|
const lines = [];
|
|
@@ -1958,6 +1925,39 @@ var fromCoreUserMessageToUIMessage = (coreUserMessage) => {
|
|
|
1958
1925
|
};
|
|
1959
1926
|
};
|
|
1960
1927
|
|
|
1928
|
+
// src/agent/extractRunIdFromMessages.ts
|
|
1929
|
+
var extractRunIdFromMessages = (messages) => {
|
|
1930
|
+
for (const message of messages) {
|
|
1931
|
+
const metadataSources = [
|
|
1932
|
+
message.metadata?.pendingToolApprovals,
|
|
1933
|
+
message.metadata?.requireApprovalMetadata,
|
|
1934
|
+
message.metadata?.suspendedTools
|
|
1935
|
+
];
|
|
1936
|
+
for (const source of metadataSources) {
|
|
1937
|
+
if (!source || typeof source !== "object") continue;
|
|
1938
|
+
for (const suspensionData of Object.values(source)) {
|
|
1939
|
+
if (suspensionData && typeof suspensionData === "object" && typeof suspensionData.runId === "string" && suspensionData.runId.length > 0) {
|
|
1940
|
+
return suspensionData.runId;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
return void 0;
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
// src/agent/signal-data.ts
|
|
1949
|
+
function convertSignalDataToBase64String(content) {
|
|
1950
|
+
if (typeof content === "string") {
|
|
1951
|
+
return content;
|
|
1952
|
+
}
|
|
1953
|
+
const bytes = content instanceof ArrayBuffer ? new Uint8Array(content) : content;
|
|
1954
|
+
let binary = "";
|
|
1955
|
+
for (const byte of bytes) {
|
|
1956
|
+
binary += String.fromCharCode(byte);
|
|
1957
|
+
}
|
|
1958
|
+
return btoa(binary);
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
1961
|
// src/agent/hooks.ts
|
|
1962
1962
|
var isThreadSignalUnsupportedError = (error) => {
|
|
1963
1963
|
const candidate = error;
|