Skip to content

feat(connectors): connect web search once and every agent can search and read pages - #132

Open
naidx0 wants to merge 5 commits into
mainfrom
feat/web-search
Open

naidx0 wants to merge 5 commits into
mainfrom
feat/web-search

Conversation

@naidx0

@naidx0 naidx0 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

TL;DR

Settings > Tools gains a Web search row. Connect it once, for free, and every agent thread can search the web and read whole pages through Firecrawl, next to its own web search. Agents get three tools only: search, read a page, read a document. They are never shown, counted or allowed any other tool the service lists. Running out of free credits reads as plain words in the step, and the run goes on.

Problem

Not every agent can search the web, and the ones that can read a page as a summary, not the page. A person had no way to give every agent thread search and whole-page reading from one place.

Cause

Nova's connector catalogue had no web search service. A catalogue server was also trusted with every tool it lists. Firecrawl's server lists 34 tools once signed in, among them crawl, extract and agent tools that spend credits fast or act on their own, and 34 tools would trip the 30-tool warning.

Change

  • One catalogue row, "Web search", opt in. Its line names Firecrawl. Until it is connected, a line under it says a search can cost more than 2 of its free credits.

  • Connect signs in by browser at https://mcp.firecrawl.dev/v2/mcp-oauth: discovery, client registration and PKCE, the same sign-in Linear's row uses.

  • Advanced takes a pasted key instead. The row then moves to https://mcp.firecrawl.dev/v2/mcp, and the key goes from the credential store into an Authorization header set inside the app. Switching between the two ways forgets the old address's bridge and whatever the other way kept, so a key never rides the sign-in address.

  • Core gets an allowlist per catalogue row (connectors::allowlist). This row's list is firecrawl_search, firecrawl_scrape and firecrawl_parse, each read-only. It is enforced on all three paths:

    • what the agent is shown: the wrapper (server_line_in, relay_http) and the app's bridge (http_call);
    • a call: refusal answers a call to any other tool in a plain sentence, and it never leaves the computer;
    • the count: record_tools counts 3, whatever the server lists.

    The list fails closed: a tool the service adds later never appears by itself. Rows without a list behave as before.

  • Only the two exact addresses are vetted; a near miss is not. The list also holds on the row installed from the catalogue, wherever it points, because a list only narrows.

  • Out of credits or rate limited, whether as an HTTP 402 or 429 from the bridge or as a 200 whose result is an error about credits or the rate: the step reads "Firecrawl's free credits for this month are used up. So this search did not run. Web search in Settings > Tools has the row." The row's id rides in _meta, and none of the server's text is shown. Nothing is retried. The row reads Not working with those words until a call goes through; a rate limit clears after a minute.

  • seq-http-bridge answers 402 and 429 with two named errors. The two Firecrawl hosts are added to outbound-hosts.txt. docs/CORE-API.md describes the row.

  • Three scenes (614wc connected, 614ws waiting for its sign-in, 614wx out of credits) with scene tests, and a verify-nova script and recipe (scripts/web-search.txt, features/tools.md).

Scope

Touches the connector catalogue and core connectors, the HTTP wrapper and bridge, the Tools page row and its scenes. Leaves alone, on purpose:

  • what counts as acting after outside content: a result marks the run exactly as any connector read does, and a test asserts that;
  • approval.rs and live.rs;
  • syncing the row to other computers;
  • a mode with no key, a self-hosted address, a headless node's key, and firecrawl_map, interact and crawl.

The row sits beside each agent's own web search, and the per-agent switch every connector has applies to it.

Before and after

614
614wc
614ws
614wx
Before After
Tools has no web search. An HTTP catalogue server shows and counts every tool it lists. Tools lists Web search. Connected, agents see and call 3 tools, the count is 3, and a fourth tool is refused before anything is sent. Out of credits, the step and the row say so in Nova's words.

Verification

Each new test failed before the change it covers:

  • core: the crate's suite did not compile for want of the allowlist API;
  • seq-shell: did not compile for want of the row's key address.

A green run then caught a real gap: the count returned the server's whole list while it stored three. It is fixed and covered.

  • cargo nextest run -p sequence-core --test core_suite -E 'test(web_search) | test(d5_relay_http)': exit 0, 12 passed. Covers vetting of both addresses and near misses, a row without a list, the count, the agent's view, the refusal (no Denied card), the wrapper never sending an off-list call, both limit shapes, and the outside-content mark.
  • cargo nextest run -p seq-shell -p seq-http-bridge -E 'test(web_search_tests) | test(catalog_tests) | test(d5_tests) | test(sign_in_tests) | package(seq-http-bridge)': exit 0, 101 passed. Covers:
    • sign-in on Firecrawl-shaped metadata: discovery, registration, the code trade and a refresh, with the stored token sent as the header;
    • a pasted key on the second address, switching both ways;
    • a loopback server listing 34 tools: 3 shown, 3 counted, and a fourth never reaches it;
    • 402, 429 and a 200 error, each read as our words, once, with no server text;
    • a planted key-shaped value found in no argument list, environment, stored row, config, catalogue, address, body or file the run writes, and scrubbed from an answer that echoes it.
  • cargo nextest run --manifest-path native/Cargo.toml --workspace -E 'test(web_search_row) | test(registry) | test(scene) | test(search_fields) | test(pages_menu)': exit 0, 61 passed.
  • cargo clippy on the four touched root crates with -D warnings: exit 0. cargo fmt --all -- --check: exit 0. seq-guards outbound hosts: exit 0.
  • verify-nova run scripts/web-search.txt --run ws-1: exit 0, 12 of 12 steps, 2 shots, looked at light and dark.
  • Scenes 614, 614wc, 614ws and 614wx were shot light and dark and looked at.
  • Firecrawl's two public discovery documents, read once with plain GETs, match the fields the sign-in test's fake uses: resource on mcp.firecrawl.dev; issuer and endpoints on www.firecrawl.dev under /api/oauth/; S256; no client secret; offline_access offered.

Not verified:

  • A real sign-in, a refresh and the pasted-key path on a free Firecrawl account. Only the person can do this, before a release ships the row.
  • Whether a sign-in that asks for no scope receives a refresh token. Nova asks for none, as for Linear.
  • A real-app turn that searches through the row. Connect on any catalogue row that signs in over HTTP starts the real sign-in at once, even on a debug profile, and the app has no way to point the row at a local fake. The search path is proved by the tests above.

…three tools

One catalogue row connects a web search service once for every agent thread. Sign-in by browser uses
Firecrawl's MCP sign-in address; a key pasted under Advanced moves the connector to its key address
as a bearer header set inside the app, and switching ways forgets the old bridge and what the other
way kept.

The row has an allowlist in core: search, scrape and parse, each read. Only these are shown to the
agent (the wrapper and the app's bridge), counted (3, not 34) and called; a call to another tool is
answered in plain words and never leaves the computer. Running out of credits or into the rate limit
(an HTTP 402 or 429, or a 200 error result) is answered in Nova's words with the row's id, never the
server's text, with no retry; the row reads broken until a call goes through.
Tools draws the Web search row with a globe, its line naming Firecrawl, and under it, until it is
connected, that a search can cost more than 2 of its free credits. Scenes for the row connected,
waiting for its sign-in and out of credits, with tests for each state; a verify-nova script that
finds the row by its name and shoots it. The sign-in test's fake now carries Firecrawl's published
endpoints and scopes.
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Shots

Rendered by CI on GitHub's Windows runner, with its software renderer, at the default window size. Before is main, after is this pull request at fbe9334.

614

Before After
Light 614, light, before 614, light, after
Dark 614, dark, before 614, dark, after

614wc

Before After
Light not in the base 614wc, light, after
Dark not in the base 614wc, dark, after

614ws

Before After
Light not in the base 614ws, light, after
Dark not in the base 614ws, dark, after

614wx

Before After
Light not in the base 614wx, light, after
Dark not in the base 614wx, dark, after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant