@mastra/hono 1.4.18-alpha.5 → 1.4.18-alpha.7
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 +18 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/hono
|
|
2
2
|
|
|
3
|
+
## 1.4.18-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The Hono adapter now awaits `getToolset` calls in browser-stream routes, supporting deployers that resolve agents asynchronously (such as stored agents looked up via the editor). ([#16778](https://github.com/mastra-ai/mastra/pull/16778))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0)]:
|
|
10
|
+
- @mastra/core@1.36.0-alpha.7
|
|
11
|
+
- @mastra/server@1.36.0-alpha.7
|
|
12
|
+
|
|
13
|
+
## 1.4.18-alpha.6
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`71a820b`](https://github.com/mastra-ai/mastra/commit/71a820b2353fa1406772c50760a3732058a8b337)]:
|
|
18
|
+
- @mastra/core@1.36.0-alpha.6
|
|
19
|
+
- @mastra/server@1.36.0-alpha.6
|
|
20
|
+
|
|
3
21
|
## 1.4.18-alpha.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -486,7 +486,7 @@ async function setupBrowserStream(app, config2) {
|
|
|
486
486
|
onMessage(event, _ws) {
|
|
487
487
|
const data = typeof event.data === "string" ? event.data : null;
|
|
488
488
|
if (data) {
|
|
489
|
-
browserStream.handleInputMessage(data, config2.getToolset, agentId, threadId);
|
|
489
|
+
void browserStream.handleInputMessage(data, config2.getToolset, agentId, threadId);
|
|
490
490
|
}
|
|
491
491
|
},
|
|
492
492
|
onClose(_event, ws) {
|
|
@@ -499,13 +499,13 @@ async function setupBrowserStream(app, config2) {
|
|
|
499
499
|
};
|
|
500
500
|
})
|
|
501
501
|
);
|
|
502
|
-
app.get(`${apiPrefix}/agents/:agentId/browser/session`, (c) => {
|
|
502
|
+
app.get(`${apiPrefix}/agents/:agentId/browser/session`, async (c) => {
|
|
503
503
|
const agentId = c.req.param("agentId");
|
|
504
504
|
if (!agentId) {
|
|
505
505
|
return c.json({ error: "Agent ID is required" }, 400);
|
|
506
506
|
}
|
|
507
507
|
const threadId = c.req.query("threadId");
|
|
508
|
-
const toolset = config2.getToolset(agentId);
|
|
508
|
+
const toolset = await config2.getToolset(agentId);
|
|
509
509
|
if (!toolset) {
|
|
510
510
|
return c.json({ hasSession: false, screencastAvailable: true });
|
|
511
511
|
}
|
|
@@ -517,7 +517,7 @@ async function setupBrowserStream(app, config2) {
|
|
|
517
517
|
if (!agentId) {
|
|
518
518
|
return c.json({ error: "Agent ID is required" }, 400);
|
|
519
519
|
}
|
|
520
|
-
const toolset = config2.getToolset(agentId);
|
|
520
|
+
const toolset = await config2.getToolset(agentId);
|
|
521
521
|
if (!toolset) {
|
|
522
522
|
return c.json({ error: "No browser session for this agent" }, 404);
|
|
523
523
|
}
|