feat(kon): add cloud-providers crate — BYOK stubs, keystore

- Keystore stub using environment variables (keyring integration deferred)
- Minimal crate ready for cloud STT provider implementations post-Stage 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jake
2026-03-16 21:01:07 +00:00
parent ec06ab07c7
commit a83eafdc82
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
/// Store an API key in the OS keychain.
/// Stub implementation using environment variables until keyring crate is added.
pub fn store_api_key(provider: &str, key: &str) {
std::env::set_var(
format!("KON_API_KEY_{}", provider.to_uppercase()),
key,
);
}
/// Retrieve an API key from the OS keychain.
/// Stub implementation using environment variables until keyring crate is added.
pub fn retrieve_api_key(provider: &str) -> Option<String> {
std::env::var(format!("KON_API_KEY_{}", provider.to_uppercase())).ok()
}

View File

@@ -1,2 +1,3 @@
// kon-cloud-providers: BYOK cloud STT provider implementations
// and OS keychain API key storage.
pub mod keystore;
pub use keystore::{retrieve_api_key, store_api_key};