8000 V0-10: Add Ollama Cloud consent, keychain, and discovery by kiran-brahma · Pull Request #30 · kiran-brahma/nodepad-app · GitHub
[go: up one dir, main page]

Skip to content

V0-10: Add Ollama Cloud consent, keychain, and discovery - #30

Merged
kiran-brahma merged 1 commit into
mainfrom
claude/github-issue-11-d54d1a
Jul 23, 2026
Merged

kiran-brahma merged 1 commit into
mainfrom
claude/github-issue-11-d54d1a

Conversation

@kiran-brahma
Copy link
Copy Markdown
Owner

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:

  • Per-Workspace cloud_consent_at column (migration 0007), a
    set_cloud_consent workspace command, and an Accessor on
    ThinkingWorkspace. Consent is its own commit, separate from the
    Assistance Policy, so a failure on one step never leaves the other
    half inconsistent.
  • KeychainAdapter trait backed by SecurityCliKeychain (macOS
    security CLI) in production and FakeKeychain in tests. The
    contract is the only thing under test.
  • CloudOllamaProvider with bearer auth and three cloud-only failure
    codes (Unauthenticated, AuthenticationFailed, RateLimited), sharing
    the existing DiscoveryOutcome shape with the local provider so the
    UI has one set of cases.
  • Five new Tauri commands: 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_present returns a bool, never the key.
  • React: CloudConsentDialog, CloudKeySection, useCloudDiscovery
    hook, and a Cloud AI branch on the AssistanceSection. Selecting
    Cloud AI on a non-consented Workspace opens the disclosure; only accept
    flips the policy to cloud_ai. Switching to Manual or revoking
    consent drops any pending cloud responses.
  • npm run check is 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.

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.
@kiran-brahma
kiran-brahma merged commit 2fce5af into main Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V0-10: Add Ollama Cloud consent, keychain, and discovery

1 participant

0