feat!: make web search Exa-only

BREAKING CHANGE: remove Tavily, Firecrawl, provider fallback,
and web-search-config. web_search and web_fetch now use
Exa-shaped inputs and return raw Exa-style details.
This commit is contained in:
pi
2026-04-12 11:11:36 +01:00
parent cfd1558522
commit 37b24694a0
31 changed files with 1101 additions and 3436 deletions

View File

@@ -1,25 +1,27 @@
# AGENTS.md
## Project overview
- `pi-web-search` is a Pi extension package that exposes `web_search` and `web_fetch`.
- `pi-web-search` is a Pi extension package that exposes Exa-backed `web_search` and `web_fetch`.
- Entry point: `index.ts`.
- Runtime/provider selection: `src/runtime.ts`.
- Config/schema: `src/config.ts`, `src/schema.ts`.
- Provider adapters and provider-specific tests: `src/providers/`.
- Runtime/config loading: `src/runtime.ts`, `src/config.ts`.
- Tool/input schemas: `src/schema.ts`.
- Exa SDK adapter helpers: `src/providers/exa.ts`.
- Tool adapters: `src/tools/`.
- Interactive config command: `src/commands/web-search-config.ts`.
- Output formatting: `src/format.ts`.
## Commands
- Install deps: `npm install`
- Run tests: `npm test`
## Working conventions
- Keep the public tool contract stable unless the current design/spec explicitly changes it.
- Add provider-specific request controls in nested blocks (for example `tavily`, `firecrawl`) instead of new top-level params.
- Normalize provider responses through `src/providers/types.ts` before formatting/output.
- The package is Exa-only. Do not reintroduce provider registries, fallback graphs, or provider-specific option blocks.
- `web_search` should stay Exa-shaped and map closely to `exa.search(query, options)`.
- `web_fetch` should stay Exa-shaped and map closely to `exa.getContents(urls, options)`.
- Keep tool `details` close to raw Exa responses; keep human-readable formatting compact in `src/format.ts`.
- Prefer focused tests next to the changed modules.
- Update `README.md`, config examples, and command flows when provider/config schema changes.
- Update `README.md` and config examples when Exa config/schema or tool parameters change.
## Docs
- Design specs live under `docs/superpowers/specs/`.
- Use `YYYY-MM-DD-<topic>-design.md` naming for design specs.
- If a new spec supersedes an older one, say that explicitly in the newer file.