@mastra/agent-browser 0.2.2 → 0.3.0-alpha.0

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/agent-browser
2
2
 
3
+ ## 0.3.0-alpha.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added extensibility hooks for custom browser providers (e.g. Firecrawl Browser Sandbox). ([#15724](https://github.com/mastra-ai/mastra/pull/15724))
8
+ - New `createThreadManager` config option to inject a custom thread manager factory
9
+ - Exported `AgentBrowserThreadManager` class and related types (`AgentBrowserSession`, `AgentBrowserThreadManagerConfig`, `CreateAgentBrowserThreadManager`)
10
+ - Changed several internal members from `private` to `protected` to support subclassing
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`8ace89d`](https://github.com/mastra-ai/mastra/commit/8ace89df77f762e622d3b9f7f65ad7524350d050), [`fa63872`](https://github.com/mastra-ai/mastra/commit/fa6387280954e6b667bec5714b55ba082bc627ff), [`f07b646`](https://github.com/mastra-ai/mastra/commit/f07b64604ab7d25391179790b7fd4823df9e2dff), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`40f9297`](https://github.com/mastra-ai/mastra/commit/40f9297003b921c62373d3e8d3a4bda76c9f6de3), [`0f0d1ba`](https://github.com/mastra-ai/mastra/commit/0f0d1ba67bfcb2204e571401662f1eceefc03357), [`8c31bcd`](https://github.com/mastra-ai/mastra/commit/8c31bcdb00e597880d5939b1b7d7566fbe5dacae), [`95b14cd`](https://github.com/mastra-ai/mastra/commit/95b14cdd820e86d97ac05fe568424c513a252e31), [`aa36be2`](https://github.com/mastra-ai/mastra/commit/aa36be23aa513b7dc53cb8ca16b7fab8f20e43ad), [`212c635`](https://github.com/mastra-ai/mastra/commit/212c635203e61d036ab41db8ff86c3893dc795b3), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`9aa5a73`](https://github.com/mastra-ai/mastra/commit/9aa5a73e7e110f6e9365eec69364a33d5f03bb56), [`f73c789`](https://github.com/mastra-ai/mastra/commit/f73c789e8ef21561580395d2c410119cab5848c8), [`8bd16da`](https://github.com/mastra-ai/mastra/commit/8bd16da73a4cb874d739373643dbd6a6e7f88684), [`c8630f8`](https://github.com/mastra-ai/mastra/commit/c8630f80d4f40cb5d22e60ab162b618b1907167a), [`47f71dc`](https://github.com/mastra-ai/mastra/commit/47f71dc6fbcbd12d71e21a979e676e20a02bd77d), [`50ceae2`](https://github.com/mastra-ai/mastra/commit/50ceae270878e2f8fb2b2c6c2faab09df0007c8a), [`8cdde58`](https://github.com/mastra-ai/mastra/commit/8cdde5875bbba6702d9df226f2b20232b8d75d6c), [`847ff1e`](https://github.com/mastra-ai/mastra/commit/847ff1e0d94368d94b2e173e4e0908e115568ef3), [`259d409`](https://github.com/mastra-ai/mastra/commit/259d409a514174299dbde1ff5e1121209b3ba850), [`9e16c68`](https://github.com/mastra-ai/mastra/commit/9e16c6818b6485ccb43df28aba6f3a2219d28662), [`cefca33`](https://github.com/mastra-ai/mastra/commit/cefca33ae666e69810c935fedf95a929c173d1d7), [`d00e8c5`](https://github.com/mastra-ai/mastra/commit/d00e8c50daebe5bce5bf2f48bde39c86fc3d2fe4), [`36fa7e2`](https://github.com/mastra-ai/mastra/commit/36fa7e24d14e58a1eb46147097b32f583e5b8775), [`87e9774`](https://github.com/mastra-ai/mastra/commit/87e97741c1e493cd6d62f478eb810b49bda4d57c), [`65a72e7`](https://github.com/mastra-ai/mastra/commit/65a72e70c25eedea8ff985a6624b96be2850236b), [`0f77241`](https://github.com/mastra-ai/mastra/commit/0f7724108806703799a8ba80ad0f09414afd5066), [`92ff509`](https://github.com/mastra-ai/mastra/commit/92ff5098ef8a990438ca038077021a5f7541ec1d), [`3fce5e7`](https://github.com/mastra-ai/mastra/commit/3fce5e70d011d289043e75003ef3336ed4aa43c3), [`a763592`](https://github.com/mastra-ai/mastra/commit/a763592c3db46963ef1011cfe16fe372816e775e), [`80c7737`](https://github.com/mastra-ai/mastra/commit/80c7737e32d7917b5f356957d67c169d01744fd3), [`3f1cf47`](https://github.com/mastra-ai/mastra/commit/3f1cf476f74c1e4cc2df908837e05853a5347e31)]:
15
+ - @mastra/core@1.38.0-alpha.3
16
+
3
17
  ## 0.2.2
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -576,7 +576,7 @@ var AgentBrowser = class extends browser.MastraBrowser {
576
576
  this.defaultTimeout = config.timeout;
577
577
  }
578
578
  const effectiveScope = config.cdpUrl ? config.scope ?? "shared" : config.scope ?? "thread";
579
- this.threadManager = new AgentBrowserThreadManager({
579
+ const threadManagerConfig = {
580
580
  scope: effectiveScope,
581
581
  browserConfig: { ...config, headless: this.headless },
582
582
  resolveCdpUrl: this.resolveCdpUrl.bind(this),
@@ -589,7 +589,9 @@ var AgentBrowser = class extends browser.MastraBrowser {
589
589
  onBrowserCreated: (manager, threadId) => {
590
590
  this.setupCloseListenerForThread(manager, threadId);
591
591
  }
592
- });
592
+ };
593
+ const createTm = config.createThreadManager ?? ((opts) => new AgentBrowserThreadManager(opts));
594
+ this.threadManager = createTm(threadManagerConfig);
593
595
  }
594
596
  // ---------------------------------------------------------------------------
595
597
  // Thread Scope (delegated to ThreadManager)
@@ -1687,6 +1689,7 @@ var AgentBrowser = class extends browser.MastraBrowser {
1687
1689
  };
1688
1690
 
1689
1691
  exports.AgentBrowser = AgentBrowser;
1692
+ exports.AgentBrowserThreadManager = AgentBrowserThreadManager;
1690
1693
  exports.BROWSER_TOOLS = BROWSER_TOOLS;
1691
1694
  exports.backInputSchema = backInputSchema;
1692
1695
  exports.browserSchemas = browserSchemas;