mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 23:10:11 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b01bfecb48 | ||
|
|
940c182fea | ||
|
|
654bda9239 | ||
|
|
13cde37722 | ||
|
|
f5123055b5 |
@@ -28,3 +28,4 @@ trace_*.json
|
||||
|
||||
# Local Claude Code settings (machine-specific, should not be committed)
|
||||
.claude/settings.local.json
|
||||
rust_out
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ async fn save_servers(
|
||||
}
|
||||
}
|
||||
|
||||
/// Initialize and return the secrets store.
|
||||
/// Get the secrets store for MCP authentication operations.
|
||||
async fn get_secrets_store() -> anyhow::Result<Arc<dyn SecretsStore + Send + Sync>> {
|
||||
let config = Config::from_env().await?;
|
||||
|
||||
|
||||
+20
-7
@@ -77,7 +77,7 @@ pub async fn connect_from_config(
|
||||
Ok(Arc::new(backend))
|
||||
}
|
||||
#[cfg(feature = "postgres")]
|
||||
_ => {
|
||||
crate::config::DatabaseBackend::Postgres => {
|
||||
let pg = postgres::PgBackend::new(config)
|
||||
.await
|
||||
.map_err(|e| DatabaseError::Pool(e.to_string()))?;
|
||||
@@ -85,9 +85,16 @@ pub async fn connect_from_config(
|
||||
Ok(Arc::new(pg))
|
||||
}
|
||||
#[cfg(not(feature = "postgres"))]
|
||||
_ => Err(DatabaseError::Pool(
|
||||
"No database backend available. Enable 'postgres' or 'libsql' feature.".to_string(),
|
||||
crate::config::DatabaseBackend::Postgres => Err(DatabaseError::Pool(
|
||||
"No postgres backend available. Rebuild with --features postgres.".to_string(),
|
||||
)),
|
||||
// Catches LibSql in postgres-only builds (libsql arm compiled out)
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => Err(DatabaseError::Pool(format!(
|
||||
"Database backend {:?} not available in this build. \
|
||||
Set DATABASE_BACKEND to a compiled-in backend, or rebuild with the matching feature flag.",
|
||||
config.backend
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +137,7 @@ pub async fn create_secrets_store(
|
||||
)))
|
||||
}
|
||||
#[cfg(feature = "postgres")]
|
||||
_ => {
|
||||
crate::config::DatabaseBackend::Postgres => {
|
||||
let pg = postgres::PgBackend::new(config)
|
||||
.await
|
||||
.map_err(|e| DatabaseError::Pool(e.to_string()))?;
|
||||
@@ -142,10 +149,16 @@ pub async fn create_secrets_store(
|
||||
)))
|
||||
}
|
||||
#[cfg(not(feature = "postgres"))]
|
||||
_ => Err(DatabaseError::Pool(
|
||||
"No database backend available for secrets. Enable 'postgres' or 'libsql' feature."
|
||||
.to_string(),
|
||||
crate::config::DatabaseBackend::Postgres => Err(DatabaseError::Pool(
|
||||
"No postgres backend available. Rebuild with --features postgres.".to_string(),
|
||||
)),
|
||||
// Catches LibSql in postgres-only builds (libsql arm compiled out)
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => Err(DatabaseError::Pool(format!(
|
||||
"Database backend {:?} not available in this build. \
|
||||
Set DATABASE_BACKEND to a compiled-in backend, or rebuild with the matching feature flag.",
|
||||
config.backend
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user