diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e0bae7c8..d3a69256 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -26,7 +26,7 @@ agentfs-sdk = { path = "../sdk/rust" } tokio = { version = "1", features = ["full"] } clap = { version = "4", features = ["derive"] } anyhow = "1.0" -turso = { version = "0.4.0", features = ["sync"] } +turso = { version = "0.4.3", features = ["sync"] } serde = { version = "1.0", features = ["derive"] } parking_lot = "0.12.5" clap_complete = { version = "=4.5.61", features = ["unstable-dynamic"] } diff --git a/cli/src/cmd/init.rs b/cli/src/cmd/init.rs index 4a4ab44f..644dd61d 100644 --- a/cli/src/cmd/init.rs +++ b/cli/src/cmd/init.rs @@ -24,6 +24,9 @@ pub async fn open_agentfs( if let Ok(auth_token) = std::env::var("TURSO_DB_AUTH_TOKEN") { builder = builder.with_auth_token(auth_token); } + if let Ok(encryption_key) = std::env::var("TURSO_REMOTE_ENCRYPTION_KEY") { + builder = builder.with_remote_encryption_key(encryption_key); + } let db = builder.build().await?; let conn = db.connect().await?; let agent = AgentFS::open_with(conn) @@ -42,6 +45,9 @@ pub async fn create_agentfs( if let Ok(auth_token) = std::env::var("TURSO_DB_AUTH_TOKEN") { builder = builder.with_auth_token(auth_token); } + if let Ok(encryption_key) = std::env::var("TURSO_REMOTE_ENCRYPTION_KEY") { + builder = builder.with_remote_encryption_key(encryption_key); + } let mut partial_sync = PartialSyncOpts { bootstrap_strategy: Some(PartialBootstrapStrategy::Prefix { length: 128 * 1024 }), prefetch: false, diff --git a/sdk/rust/Cargo.toml b/sdk/rust/Cargo.toml index b33edf36..f7a28bc7 100644 --- a/sdk/rust/Cargo.toml +++ b/sdk/rust/Cargo.toml @@ -6,7 +6,7 @@ description = "AgentFS SDK for Rust" license = "MIT" [dependencies] -turso = { version = "0.4.0", features = ["sync"] } +turso = { version = "0.4.3", features = ["sync"] } tokio = { version = "1", features = ["full"] } async-trait = "0.1" serde = { version = "1.0", features = ["derive"] }