@mastra/deployer 1.64.0-alpha.4 → 1.64.0-alpha.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAmB5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoBnD,KAAK,QAAQ,GAAG,YAAY,CAAC;AAE7B,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,OAAO,EAAE,GAAG,CAAC;QAAE,UAAU,EAAE,+BAA+B,CAAA;KAAE,CAAC,CAAC;CAC/D,CAAC;AA8CF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,wCAmB/D;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAER;cAegC,QAAQ;eAAa,SAAS;2CAmbhE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAiLlG"}
|
package/dist/server/index.js
CHANGED
|
@@ -4520,12 +4520,21 @@ async function createHonoServer(mastra, options = { tools: {} }) {
|
|
|
4520
4520
|
if (serverMiddleware && serverMiddleware.length > 0) for (const m of serverMiddleware) app.use(m.path, skipIfFrameworkPublic(m.handler));
|
|
4521
4521
|
const browserStreamSetup = options.browserStream === false ? null : await setupBrowserStream(app, {
|
|
4522
4522
|
getToolset: async (agentId) => {
|
|
4523
|
+
const resolveBrowser = async (agent) => {
|
|
4524
|
+
if (!agent) return void 0;
|
|
4525
|
+
if (agent.browser) return agent.browser;
|
|
4526
|
+
try {
|
|
4527
|
+
return (await agent.getWorkspace())?.browser;
|
|
4528
|
+
} catch {
|
|
4529
|
+
return;
|
|
4530
|
+
}
|
|
4531
|
+
};
|
|
4523
4532
|
try {
|
|
4524
4533
|
const runtimeAgent = mastra.getAgentById(agentId);
|
|
4525
|
-
if (runtimeAgent) return runtimeAgent
|
|
4534
|
+
if (runtimeAgent) return await resolveBrowser(runtimeAgent);
|
|
4526
4535
|
} catch {}
|
|
4527
4536
|
try {
|
|
4528
|
-
return (await mastra.getEditor?.()?.agent.getById(agentId))
|
|
4537
|
+
return await resolveBrowser(await mastra.getEditor?.()?.agent.getById(agentId));
|
|
4529
4538
|
} catch {
|
|
4530
4539
|
return;
|
|
4531
4540
|
}
|