Add developer index search to the plugin - #3
Open
erikengervall wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_searchtool returning the matched passages as markdown, withquery,types(doc,issue,pull_request,readme),repos,sources,k,passagesskills/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 webid(issue:owner/repo#123),url, andlicense. Thedoc:id is dropped since it just repeats the url@opencode-ai/pluginbumped to^1.18.25; the pinned^1.0.0resolved to 1.1.53, which does not export thetoolhelperNo API key and no CLI needed: the tool works the moment the plugin loads, and
FIRECRAWL_API_KEYonly raises the rate limit.Heads up, unrelated to this PR
opencode-firecrawlis not published on npm (npm view opencode-firecrawl404s), 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)firecrawl_developer_searchregisters with the expected argsplaywright page.goto hangs service worker,types: ["issue", "pull_request"]) returns ranked results with passages, urls, and licensesreposscope returns the "not in the developer index" note rather than a bare empty resultMade with Cursor