Skip to content

Add developer index search to the plugin - #3

Open
erikengervall wants to merge 1 commit into
mainfrom
erik/developer-index
Open

Add developer index search to the plugin#3
erikengervall wants to merge 1 commit into
mainfrom
erik/developer-index

Conversation

@erikengervall

Copy link
Copy Markdown

Summary

Adds the Firecrawl developer index to the opencode plugin as a real tool, so the agent can answer "how does this library behave / what does this error mean / was this bug fixed" from the issue, the merged PR, or the doc page instead of from a blog post.

  • firecrawl_developer_search tool returning the matched passages as markdown, with query, types (doc, issue, pull_request, readme), repos, sources, k, passages
  • skills/firecrawl-developer-index/ teaching the agent which questions belong in the index, how to shape a query for a literal error string versus an API contract, and when to fall back to the CLI for the open web
  • Result blocks carry the citable id (issue:owner/repo#123), url, and license. The doc: id is dropped since it just repeats the url
  • A repo or source the index does not hold is reported back explicitly, so the agent stops rephrasing a query that can never match
  • @opencode-ai/plugin bumped to ^1.18.25; the pinned ^1.0.0 resolved to 1.1.53, which does not export the tool helper

No API key and no CLI needed: the tool works the moment the plugin loads, and FIRECRAWL_API_KEY only raises the rate limit.

Heads up, unrelated to this PR

opencode-firecrawl is not published on npm (npm view opencode-firecrawl 404s), but the README and opencode's ecosystem docs both tell users to add "plugin": ["opencode-firecrawl"], which opencode resolves from npm. The documented install path does not work today, so a publish is needed before this reaches anyone.

Test plan

  • npm run check (tsc, clean)
  • Loaded the plugin the way opencode does and confirmed firecrawl_developer_search registers with the expected args
  • Live query (playwright page.goto hangs service worker, types: ["issue", "pull_request"]) returns ranked results with passages, urls, and licenses
  • Bogus repos scope returns the "not in the developer index" note rather than a bare empty result
  • Install from a published build in a real opencode session

Made with Cursor

The plugin so far pointed the agent at the Firecrawl CLI for the open web,
which leaves the most common developer question (how does this library
behave, what does this error mean, was this bug fixed) answered from blog
posts and search results rather than from the issue, the merged pull
request, or the doc page that states the contract.

This registers a firecrawl_developer_search tool that returns the matched
passages from the developer index, plus a skill that teaches the agent
which questions belong in the index and how to shape a query for an error
string versus an API contract. The tool needs no API key and no CLI, so it
works the moment the plugin loads; FIRECRAWL_API_KEY only raises the rate
limit.

Unmatchable scopes are reported back explicitly. A repo or source the
index does not hold can never match, so the tool says so instead of
letting the agent burn turns rephrasing.

Co-authored-by: Cursor <cursoragent@cursor.com>
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