Repository navigation
feat(search): add Keenable as an optional keyed search provider - #28
Open
KGKallasmaa wants to merge 1 commit into
Open
KGKallasmaa wants to merge 1 commit into
KGKallasmaa wants to merge 1 commit into
Conversation
Keenable joins Brave and Tavily as an optional provider in Settings > Web search. The keyless DuckDuckGo/Bing path stays the default; nothing changes unless the user picks Keenable and saves a key. Keyed only: there is no keyless Keenable path. - Provider enum, config schema and key storage follow the Brave/Tavily shape: the key is stored through SecretStore and never logged or sent to the renderer. - SearchService sends POST https://api.keenable.ai/v1/search with X-API-Key and X-Keenable-Title: Pi Bot, only on Keenable requests; the result text is read from snippet (description is always empty). - search-run maps 429, 401/403, 402 and other HTTP errors to a message that says what to do (switch provider or fix the key) instead of an empty result. SearchStatusError carries the status from searchJson; other providers' messages are unchanged. - UI text in packages/i18n (zh and en); the settings copy says Keenable logs requests under its default data policy and that a key does not turn logging off. - docs/privacy and docs/guide updated in both languages. - Offline tests cover the default staying keyless, the request shape, no header leakage to other providers, key removal and the error messages. Signed-off-by: KGKallasmaa <29797627+KGKallasmaa@users.noreply.github.com>
Owner
|
Thanks — this matches every point from #13: keyed-only, keyless DuckDuckGo/Bing still the default, the key handled like Brave/Tavily, the logging wording in both languages, actionable 429/401/403/402 messages, and the header scoped to Keenable requests. Putting the status mapping in We're in a release freeze for v0.0.4, so this will land right after that release, in v0.0.5. CI is approved to run now. |
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.
Closes #13. Disclosure: I work with Keenable.
Following your points on #13, this adds Keenable as an optional provider next to Brave, Tavily and SearXNG. It is keyed only: there is no keyless Keenable path in this PR, so no permission for a distributed app to use the public endpoint is claimed or needed. Keyless can be a separate follow-up if you want it.
What changes
SecretStorelike the Brave/Tavily keys and never logged or sent to the renderer. Choosing the card is the consent, as for the others. UI text is inpackages/i18nin zh and en.docs/privacy(both languages) and the settings copy say Keenable logs search requests under its default data policy, and that adding a key does not turn logging off. Only an Enterprise zero-data-retention agreement differs (docs.keenable.ai/data-privacy).search-run.tsto a message that says what to do (switch provider, or fix or replace the key), never an empty result.searchJsonnow throws aSearchStatusErrorthat carries the status; other providers' messages are unchanged (tested). One note:search-circuit.tsonly tracks the keyless DuckDuckGo route, so I put the mapping in the existing failure handling insearch-run.tsrather than the circuit. Tell me if you'd rather it live elsewhere.X-Keenable-Title: Pi Botis sent only on Keenable requests, with no user or device information (tested, including that Tavily requests don't get it).packages/brain/src/integrations/search/; tests are offline (HTTP layer replaced) insearch-service.keenable.test.ts. Every commit is signed off (git commit -s).Keenable's search is
POST https://api.keenable.ai/v1/searchwithX-API-Key; results usesnippetfor the page text (descriptionis always empty).If #12 lands first and touches the same provider enum, I'll merge
maininto this branch.Checks run
vitestfor the new test file: 9 tests pass.pnpm lint: passes.pnpm typecheck: the project build and semantics passes were all green, but the extratsconfig.ui/devprojects were killed by memory pressure on my shared machine (SIGKILL, not a type error), so those did not finish. I did not runpnpm verify. CI is the authority.