zara-knowledge: add first-class Brave Search provider adapter #213

Closed
opened 2026-09-08 02:03:14 +00:00 by nsaspy · 0 comments
Owner

Parent / existing domain

Extend the provider model proposed in #18 (zara-knowledge) with a first-class Brave Search adapter rather than creating a parallel search stack.

Goal

Make Brave the preferred configurable web-search provider for Zara where the search surface supports provider selection. Zara should receive structured sourced results suitable for reasoning/citations, while interactive page operation remains the responsibility of zara-browser (#9).

Provider surface

  • web search query
  • bounded result count
  • title / URL / description-snippet / provider metadata
  • optional freshness/language/safe-search parameters where Brave's supported contract permits them
  • typed provider errors, quota/rate-limit state, timeout, and unavailable state

Configuration

  • provider preference is configurable; no hard-coded operator secret or machine path
  • API credential comes only from supported environment or mode-0600 XDG secret/config location
  • never expose the key in diagnostics, exceptions, tool results, fixtures, Nix derivations, or repository examples
  • Brave should be selectable as default while the public zara-knowledge result schema stays provider-neutral

Reliability

  • explicit connect/read timeout
  • bounded query/result/payload sizes
  • validate returned URLs before exposing/opening them
  • retain provider/source/timestamp provenance
  • do not silently relabel fallback-provider results as Brave results
  • rate-limit/quota failure is a typed failure/degraded result, not empty success

Integration

  • zara-knowledge owns search/query semantics and sourced results
  • zara-browser may open a selected URL/result but does not own search-provider policy
  • Zara core owns intent/hook routing and approval policy
  • no Zara core edits from this repository

TDD / acceptance

  • fake Brave backend test is RED before implementation
  • adapter maps Brave responses into the normalized sourced-result model from #18
  • configuration can select Brave as preferred/default provider
  • secret handling and redaction are tested
  • timeout, malformed response, rate-limit, zero-results, and fallback semantics are deterministic
  • tests are network-free
  • README documents Brave configuration and provider-selection behavior
  • registry validation passes
  • plugin tests pass
  • nix flake check passes
## Parent / existing domain Extend the provider model proposed in #18 (`zara-knowledge`) with a first-class Brave Search adapter rather than creating a parallel search stack. ## Goal Make Brave the preferred configurable web-search provider for Zara where the search surface supports provider selection. Zara should receive structured sourced results suitable for reasoning/citations, while interactive page operation remains the responsibility of `zara-browser` (#9). ## Provider surface - web search query - bounded result count - title / URL / description-snippet / provider metadata - optional freshness/language/safe-search parameters where Brave's supported contract permits them - typed provider errors, quota/rate-limit state, timeout, and unavailable state ## Configuration - provider preference is configurable; no hard-coded operator secret or machine path - API credential comes only from supported environment or mode-0600 XDG secret/config location - never expose the key in diagnostics, exceptions, tool results, fixtures, Nix derivations, or repository examples - Brave should be selectable as default while the public `zara-knowledge` result schema stays provider-neutral ## Reliability - explicit connect/read timeout - bounded query/result/payload sizes - validate returned URLs before exposing/opening them - retain provider/source/timestamp provenance - do not silently relabel fallback-provider results as Brave results - rate-limit/quota failure is a typed failure/degraded result, not empty success ## Integration - `zara-knowledge` owns search/query semantics and sourced results - `zara-browser` may open a selected URL/result but does not own search-provider policy - Zara core owns intent/hook routing and approval policy - no Zara core edits from this repository ## TDD / acceptance - [ ] fake Brave backend test is RED before implementation - [ ] adapter maps Brave responses into the normalized sourced-result model from #18 - [ ] configuration can select Brave as preferred/default provider - [ ] secret handling and redaction are tested - [ ] timeout, malformed response, rate-limit, zero-results, and fallback semantics are deterministic - [ ] tests are network-free - [ ] README documents Brave configuration and provider-selection behavior - [ ] registry validation passes - [ ] plugin tests pass - [ ] `nix flake check` passes
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#213
No description provided.