Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Merge upstream main into storage-secrets

Steven Enamakelc8002d3d80ba
diff --cc crates/openhuman-cli/Cargo.toml
index e831530df8,37ffda3cf9..381892fc38
--- a/crates/openhuman-cli/Cargo.toml
+++ b/crates/openhuman-cli/Cargo.toml
@@@ -122,12 -83,12 +83,18 @@@ path = "../../tests/cost_cap_removed.rs
name = "storage_approvals_e2e"
path = "../../tests/storage_approvals_e2e.rs"
+ [[test]]
+ # Its own binary for the same reason as storage_approvals_e2e: it installs a
+ # storage backend into the process-wide slot.
+ name = "storage_domains_e2e"
+ path = "../../tests/storage_domains_e2e.rs"
+
+[[test]]
+# Its own binary: it installs a storage backend into the process-wide slot and
+# sets the keyring master-key environment.
+name = "storage_secrets_e2e"
+path = "../../tests/storage_secrets_e2e.rs"
+
[[test]]
name = "embedded_server_shutdown_e2e"
path = "../../tests/embedded_server_shutdown_e2e.rs"
diff --cc crates/openhuman-core/Cargo.toml
index bf311e2d1a,5cc6c825d1..4988aec33a
--- a/crates/openhuman-core/Cargo.toml
+++ b/crates/openhuman-core/Cargo.toml
@@@ -152,9 -152,10 +152,10 @@@ tinyagents-registry = { path = "../../v
tinyagents-session = { path = "../../vendor/tinyagents/crates/tinyagents-session", features = ["storage-drivers"] }
# The storage ports and the URL-to-backend facade (`storage` domain). No driver
# by default: the `storage-*` features below add them.
-tinystoragedrivers = { path = "../../vendor/tinyagents/vendor/tinystoragedrivers/crates/tinystoragedrivers", default-features = false, features = ["blocking"] }
+tinystoragedrivers = { path = "../../vendor/tinyagents/vendor/tinystoragedrivers/crates/tinystoragedrivers", default-features = false, features = ["blocking", "secrets"] }
tinyagents-runtime = { path = "../../vendor/tinyagents/crates/tinyagents-runtime" }
tinyagents-orchestration = { path = "../../vendor/tinyagents/crates/tinyagents-orchestration" }
+ tinyagents-tasks = { path = "../../vendor/tinyagents/crates/tinyagents-tasks" }
tinyinference-core = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }
tinyinference-embeddings = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-embeddings" }
tinyinference-llm = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-llm" }
diff --cc crates/openhuman-core/src/storage/README.md
index 244c2a8984,af7526a703..7f17ebd280
--- a/crates/openhuman-core/src/storage/README.md
+++ b/crates/openhuman-core/src/storage/README.md
@@@ -38,15 -47,11 +47,20 @@@ on `storage-mongodb`
- The session store: `openhuman_rpc::session_store::install_for_host` opens
the configured backend before boot and installs `DriverSessionStores`
over it. See that module's README.
+ - Domain stores that switch to the document port when a backend is
+ installed, each in a `store_documents.rs` beside its SQLite `store.rs`:
+ approvals (`security::approval`), paired devices (`security::devices`),
+ notifications (`desktop::notifications`) and task sources
+ (`integrations::task_sources`).
+- Approvals (`security::approval`), through `store_documents.rs`.
+- Secrets (`storage::secrets`): the keyring's user secrets
+ (`security::keyring::get` / `set` / `delete`) and the credential stores'
+ files (`auth-profiles.json`, `http-credentials.json`) become encrypted
+ documents (`DocumentSecrets`, `enc2:`) in the acting agent's scope. Each
+ scope's data key is derived with HKDF-SHA256 from the keyring master key
+ (`OPENHUMAN_KEYRING_MASTER_KEY` / `_FILE`, else the OS keychain); with no
+ master key they fail closed. The config encryption key stays on the
+ process keyring, because `config.toml` is loaded before any agent acts.
## Boundaries
diff --cc crates/openhuman-core/src/storage/mod.rs
index 32708a751e,52109954df..aa71abea31
--- a/crates/openhuman-core/src/storage/mod.rs
+++ b/crates/openhuman-core/src/storage/mod.rs
@@@ -18,7 -18,7 +18,8 @@@
//! driver the build does not carry fails at [`open`] naming the feature, so a
//! misconfigured deployment stops at boot instead of at its first write.
+pub mod secrets;
+ pub mod documents;
use std::future::Future;
use std::sync::{Arc, LazyLock, OnceLock, RwLock};
diff --cc scripts/ci/check-dep-sim-calibration.sh
index 2a94d1283b,f9602712f0..017a9f7d1b
--- a/scripts/ci/check-dep-sim-calibration.sh
+++ b/scripts/ci/check-dep-sim-calibration.sh
@@@ -101,11 -101,11 +101,14 @@@ cd "$(dirname "$0")/../..
# dependencies into the flows graph.
# 320 -> 313 on 2026-10-09: the tinyagents and tinyflows mains shed seven
# names from the flows graph.
- # 313 -> 314 on 2026-10-09: secrets on the storage backend add the
+ # 313 -> 314 on 2026-10-09: the config loader names the failing field path
+ # through `serde_path_to_error` (pure Rust, no dependencies; already in the
+ # product graph through axum).
-# This matches the current `flows:336:314:2` entry in
++# 314 -> 315 on 2026-10-09: secrets on the storage backend add the
+# first-party tinystoragedrivers-secrets crate (its crypto deps were already
+# in the graph).
- # This matches the current `flows:336:314:2` entry in
++# This matches the current `flows:337:315:2` entry in
# scripts/kernel-floor.limits; its preceding entries are historical.
--EXPECTED_NAMES=314
++EXPECTED_NAMES=315
exec python3 scripts/dep-sim.py --cut-nothing --expect-names "${EXPECTED_NAMES}"
diff --cc scripts/kernel-floor.limits
index a96aba5121,1f467e44c6..2e05796738
--- a/scripts/kernel-floor.limits
+++ b/scripts/kernel-floor.limits
@@@ -663,6 -663,4 +663,6 @@@
# not add a native build dependency.
# 332/311/3 2026-10-04 Memory lifecycle refresh removed five packages/names
# from the Linux flows graph; native builds remain at 3.
- # 336/314/2 2026-10-09 secrets on the storage backend add the first-party
-flows:336:314:2
++# 337/315/2 2026-10-09 secrets on the storage backend add the first-party
+# tinystoragedrivers-secrets crate (one package, one name).
- flows:336:314:2
++flows:337:315:2