mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
a15cdfb050
Migrates the remaining two cloud browser providers to plugins:
plugins/browser/browser_use/ — dual auth (direct BROWSER_USE_API_KEY
or managed Nous gateway), idempotency-
key handling for retried managed-mode
creates, x-external-call-id capture.
plugins/browser/firecrawl/ — direct FIRECRAWL_API_KEY only;
distinct from plugins/web/firecrawl/
(same key, different endpoint).
Also drops the 'single-eligible shortcut' rule from
agent.browser_registry._resolve(). Was a copy-paste from
web_search_registry that would have introduced a real behavior change:
a user with only FIRECRAWL_API_KEY set (for web-extract) would silently
get routed to a paid Firecrawl cloud browser on a fresh install — not
matching origin/main, which only auto-detected between Browser Use and
Browserbase. Third-party browser plugins are subject to the same gate:
they require explicit `browser.cloud_provider` to take effect.
Verified end-to-end via plugin discovery:
- 3 plugins register (browser-use, browserbase, firecrawl)
- _resolve(None) with no creds: None (local mode)
- _resolve(None) with only FIRECRAWL_API_KEY: None (matches main)
- _resolve('firecrawl'): firecrawl (explicit wins)
- _resolve(None) with BU+firecrawl: browser-use (legacy walk first hit)
- _resolve(None) with all three: browser-use (legacy walk order)
17 lines
578 B
Python
17 lines
578 B
Python
"""Firecrawl cloud browser plugin — bundled, auto-loaded.
|
|
|
|
Distinct from ``plugins/web/firecrawl/`` (the web search/extract/crawl
|
|
plugin); both share the FIRECRAWL_API_KEY but speak to different endpoints
|
|
(``/v2/browser`` here vs ``/v2/search`` / ``/v2/scrape`` / ``/v2/crawl``
|
|
over there).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from plugins.browser.firecrawl.provider import FirecrawlBrowserProvider
|
|
|
|
|
|
def register(ctx) -> None:
|
|
"""Register the Firecrawl cloud-browser provider with the plugin context."""
|
|
ctx.register_browser_provider(FirecrawlBrowserProvider())
|