@mastra/deployer 1.36.0-alpha.5 → 1.36.0-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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +18 -7
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +18 -7
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 1.36.0-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Browser streaming now works for stored agents. The deployer's `getToolset` first checks the runtime agent registry, then falls back to the editor's stored-agent lookup, so agents created at runtime through the editor can stream browser sessions without being pre-registered in code. ([#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.36.0-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.36.0-alpha.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-deployer
|
|
|
3
3
|
description: Documentation for @mastra/deployer. Use when working with @mastra/deployer APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/deployer"
|
|
6
|
-
version: "1.36.0-alpha.
|
|
6
|
+
version: "1.36.0-alpha.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/server/index.cjs
CHANGED
|
@@ -3201,7 +3201,7 @@ async function setupBrowserStream(app, config2) {
|
|
|
3201
3201
|
onMessage(event, _ws) {
|
|
3202
3202
|
const data = typeof event.data === "string" ? event.data : null;
|
|
3203
3203
|
if (data) {
|
|
3204
|
-
browserStream.handleInputMessage(data, config2.getToolset, agentId, threadId);
|
|
3204
|
+
void browserStream.handleInputMessage(data, config2.getToolset, agentId, threadId);
|
|
3205
3205
|
}
|
|
3206
3206
|
},
|
|
3207
3207
|
onClose(_event, ws) {
|
|
@@ -3214,13 +3214,13 @@ async function setupBrowserStream(app, config2) {
|
|
|
3214
3214
|
};
|
|
3215
3215
|
})
|
|
3216
3216
|
);
|
|
3217
|
-
app.get(`${apiPrefix}/agents/:agentId/browser/session`, (c) => {
|
|
3217
|
+
app.get(`${apiPrefix}/agents/:agentId/browser/session`, async (c) => {
|
|
3218
3218
|
const agentId = c.req.param("agentId");
|
|
3219
3219
|
if (!agentId) {
|
|
3220
3220
|
return c.json({ error: "Agent ID is required" }, 400);
|
|
3221
3221
|
}
|
|
3222
3222
|
const threadId = c.req.query("threadId");
|
|
3223
|
-
const toolset = config2.getToolset(agentId);
|
|
3223
|
+
const toolset = await config2.getToolset(agentId);
|
|
3224
3224
|
if (!toolset) {
|
|
3225
3225
|
return c.json({ hasSession: false, screencastAvailable: true });
|
|
3226
3226
|
}
|
|
@@ -3232,7 +3232,7 @@ async function setupBrowserStream(app, config2) {
|
|
|
3232
3232
|
if (!agentId) {
|
|
3233
3233
|
return c.json({ error: "Agent ID is required" }, 400);
|
|
3234
3234
|
}
|
|
3235
|
-
const toolset = config2.getToolset(agentId);
|
|
3235
|
+
const toolset = await config2.getToolset(agentId);
|
|
3236
3236
|
if (!toolset) {
|
|
3237
3237
|
return c.json({ error: "No browser session for this agent" }, 404);
|
|
3238
3238
|
}
|
|
@@ -4568,9 +4568,20 @@ async function createHonoServer(mastra, options = {
|
|
|
4568
4568
|
}
|
|
4569
4569
|
}
|
|
4570
4570
|
const browserStreamSetup = await setupBrowserStream(app, {
|
|
4571
|
-
getToolset: (agentId) => {
|
|
4572
|
-
|
|
4573
|
-
|
|
4571
|
+
getToolset: async (agentId) => {
|
|
4572
|
+
try {
|
|
4573
|
+
const runtimeAgent = mastra.getAgentById(agentId);
|
|
4574
|
+
if (runtimeAgent) {
|
|
4575
|
+
return runtimeAgent.browser;
|
|
4576
|
+
}
|
|
4577
|
+
} catch {
|
|
4578
|
+
}
|
|
4579
|
+
try {
|
|
4580
|
+
const storedAgent = await mastra.getEditor?.()?.agent.getById(agentId);
|
|
4581
|
+
return storedAgent?.browser;
|
|
4582
|
+
} catch {
|
|
4583
|
+
return void 0;
|
|
4584
|
+
}
|
|
4574
4585
|
},
|
|
4575
4586
|
apiPrefix
|
|
4576
4587
|
});
|