Repository navigation
V0-10: Add Ollama Cloud consent, keychain, and discovery - #30
Merged
Merged
Conversation
Closes #11. Adds per-Workspace Cloud AI consent, a narrow macOS keychain seam for the bearer key, and authenticated discovery against the fixed Ollama Cloud host (/api/tags). The key is read on demand and never enters the database, the React tree, a log line, or a command return value. - New migration 0007_cloud_consent.sql adds cloud_consent_at to workspaces. - New Rust module secrets.rs: KeychainAdapter trait, SecurityCliKeychain production impl, fake::FakeKeychain for tests. - New Rust module cloud.rs: CloudOllamaProvider with bearer auth and the three cloud-only failure codes; From impl bridges to DiscoveryOutcome. - WorkspaceStore.set_cloud_consent persists the moment of consent. - Five new Tauri commands: set_cloud_consent, set_cloud_api_key, delete_cloud_api_key, cloud_api_key_present, discover_cloud_models. - React: ThinkingWorkspace.cloudConsentAt, CloudConsentDialog, CloudKeySection, useCloudDiscovery hook, Cloud AI branch on the AssistanceSection. The Cloud AI button opens the disclosure on unconsented Workspaces; only accept flips the policy to cloud_ai. - Rust and React tests scan serialized state and SQLite rows for a sentinel bearer key, asserting it never lands in durable or rendered output.
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 #11.
Adds per-Workspace Cloud AI consent, a narrow macOS keychain seam for the
bearer key, and authenticated discovery against the fixed Ollama Cloud
host (/api/tags). The key is read on demand and never enters the database,
the React tree, a log line, or a command return value.
What ships in this slice:
cloud_consent_atcolumn (migration 0007), aset_cloud_consentworkspace command, and an Accessor onThinkingWorkspace. Consent is its own commit, separate from theAssistance Policy, so a failure on one step never leaves the other
half inconsistent.
KeychainAdaptertrait backed bySecurityCliKeychain(macOSsecurityCLI) in production andFakeKeychainin tests. Thecontract is the only thing under test.
CloudOllamaProviderwith bearer auth and three cloud-only failurecodes (Unauthenticated, AuthenticationFailed, RateLimited), sharing
the existing
DiscoveryOutcomeshape with the local provider so theUI has one set of cases.
set_cloud_consent,set_cloud_api_key,delete_cloud_api_key,cloud_api_key_present,discover_cloud_models. The keychain reads/writes are one-shot;cloud_api_key_presentreturns a bool, never the key.CloudConsentDialog,CloudKeySection,useCloudDiscoveryhook, and a Cloud AI branch on the
AssistanceSection. SelectingCloud AI on a non-consented Workspace opens the disclosure; only accept
flips the policy to
cloud_ai. Switching to Manual or revokingconsent drops any pending cloud responses.
npm run checkis green: 51 Rust unit tests (six new cloud tests,three new secrets tests, five new consent tests, one new sentinel-leak
test) and 108 vitest tests (eleven new Cloud consent/UI tests).
Pre-implementation audit:
docs/v0/audits/10-ollama-cloud.md.Out of scope: model organization, chat/generate, Ollama account
management, custom hosts, non-Ollama providers.