feat: wire the fastCRW provider into the plugin entry #13

Merged
haylan merged 1 commits from feat/index into main 2026-10-03 17:28:06 +00:00
Owner

Step 2 (part 3) of the build order in docs/spec.md.

  • src/index.ts: Plugin.define({ id: "fastcrw.websearch" }); setup resolves config (throws on bad options), registers provider fastcrw ("fastCRW") and sets it as the default
  • tsconfig.json: rewriteRelativeImportExtensions so source imports of ./x.ts compile to ./x.js; built dist/index.js loads
  • Wiring tests with a fake plugin context (registration, default, throw-on-bad-options, end-to-end through a mocked fetch); 30 tests total; npm run check passes
  • Typings checked against @opencode/plugin 2.0.22: a result is { url, title?, content?, time: { published?: number } }, so time: {} is valid

🤖 Generated with Claude Code

Step 2 (part 3) of the build order in `docs/spec.md`. - `src/index.ts`: `Plugin.define({ id: "fastcrw.websearch" })`; `setup` resolves config (throws on bad options), registers provider `fastcrw` ("fastCRW") and sets it as the default - `tsconfig.json`: `rewriteRelativeImportExtensions` so source imports of `./x.ts` compile to `./x.js`; built `dist/index.js` loads - Wiring tests with a fake plugin context (registration, default, throw-on-bad-options, end-to-end through a mocked fetch); 30 tests total; `npm run check` passes - Typings checked against `@opencode/plugin` 2.0.22: a result is `{ url, title?, content?, time: { published?: number } }`, so `time: {}` is valid 🤖 Generated with [Claude Code](https://claude.com/claude-code)
haylan added 1 commit 2026-10-03 17:27:09 +00:00
haylan merged commit 385b454387 into main 2026-10-03 17:28:06 +00:00
haylan deleted branch feat/index 2026-10-03 17:28:07 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haylan/fastcrw-opencode-websearch#13