feat(v3): migrate workspace to API, Tauri desktop, and v3 crates; remove legacy MCP stack
Some checks failed
Secrets v3 CI / 检查 (push) Has been cancelled
Some checks failed
Secrets v3 CI / 检查 (push) Has been cancelled
- Add apps/api, desktop Tauri shell, domain/application/crypto/device-auth/infrastructure-db - Replace desktop-daemon vault integration; drop secrets-core and secrets-mcp* - Ignore apps/desktop/dist and generated Tauri icons; document icon/dist steps in AGENTS.md - Apply rustfmt; fix clippy (collapsible_if, HTTP method as str)
This commit is contained in:
23
crates/desktop-daemon/src/config.rs
Normal file
23
crates/desktop-daemon/src/config.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use anyhow::Result;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DaemonConfig {
|
||||
pub bind: String,
|
||||
}
|
||||
|
||||
pub fn load_config() -> Result<DaemonConfig> {
|
||||
let bind =
|
||||
std::env::var("SECRETS_DAEMON_BIND").unwrap_or_else(|_| "127.0.0.1:9515".to_string());
|
||||
if bind.trim().is_empty() {
|
||||
anyhow::bail!("SECRETS_DAEMON_BIND must not be empty");
|
||||
}
|
||||
Ok(DaemonConfig { bind })
|
||||
}
|
||||
|
||||
pub fn load_persisted_device_token() -> Result<Option<String>> {
|
||||
let token = std::env::var("SECRETS_DEVICE_LOGIN_TOKEN")
|
||||
.ok()
|
||||
.map(|value| value.trim().to_string())
|
||||
.filter(|value| !value.is_empty());
|
||||
Ok(token)
|
||||
}
|
||||
Reference in New Issue
Block a user