Step 2 (part 2) of the build order in docs/spec.md: src/search.ts with tests, written test-first.
search(config, query, signal, fetchFn?, timeoutMs?): POST {baseURL}/v1/search, Bearer only when a key exists, lang/tbs omitted when unset
Accepts data as an array or data.results; maps to { url, title, content: snippet || description, time: {} }; drops entries without a url
Errors: fastCRW <status> <error_code>: <error> (also for HTTP 200 with success:false), hints for 401 and 503 search_disabled, non-JSON, unreachable (cause kept), internal 30 s timeout, caller abort rethrown untouched; the token never appears in a message
fetch and the timeout are parameters so tests need no server; 15 new tests (26 total); npm run check passes
Step 2 (part 2) of the build order in `docs/spec.md`: `src/search.ts` with tests, written test-first.
- `search(config, query, signal, fetchFn?, timeoutMs?)`: `POST {baseURL}/v1/search`, Bearer only when a key exists, `lang`/`tbs` omitted when unset
- Accepts `data` as an array or `data.results`; maps to `{ url, title, content: snippet || description, time: {} }`; drops entries without a url
- Errors: `fastCRW <status> <error_code>: <error>` (also for HTTP 200 with `success:false`), hints for 401 and 503 `search_disabled`, non-JSON, unreachable (cause kept), internal 30 s timeout, caller abort rethrown untouched; the token never appears in a message
- `fetch` and the timeout are parameters so tests need no server; 15 new tests (26 total); `npm run check` passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Step 2 (part 2) of the build order in
docs/spec.md:src/search.tswith tests, written test-first.search(config, query, signal, fetchFn?, timeoutMs?):POST {baseURL}/v1/search, Bearer only when a key exists,lang/tbsomitted when unsetdataas an array ordata.results; maps to{ url, title, content: snippet || description, time: {} }; drops entries without a urlfastCRW <status> <error_code>: <error>(also for HTTP 200 withsuccess:false), hints for 401 and 503search_disabled, non-JSON, unreachable (cause kept), internal 30 s timeout, caller abort rethrown untouched; the token never appears in a messagefetchand the timeout are parameters so tests need no server; 15 new tests (26 total);npm run checkpasses🤖 Generated with Claude Code