The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(storage): add pluggable storage driver backends
Steven Enamakel61416f0802f9
diff --git a/Cargo.lock b/Cargo.lockindex e977d508c7..cf429de06d 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -72,6 +72,19 @@ dependencies = ["subtle",]+[[package]]+name = "ahash"+version = "0.8.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"+dependencies = [+ "cfg-if",+ "getrandom 0.3.4",+ "once_cell",+ "version_check",+ "zerocopy",+]+[[package]]name = "aho-corasick"version = "1.1.5"@@ -629,6 +642,29 @@ dependencies = ["tinyvec",]+[[package]]+name = "bson"+version = "2.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7969a9ba84b0ff843813e7249eed1678d9b6607ce5a3b8f0a47af3fcf7978e6e"+dependencies = [+ "ahash",+ "base64 0.22.1",+ "bitvec",+ "getrandom 0.2.17",+ "getrandom 0.3.4",+ "hex",+ "indexmap",+ "js-sys",+ "once_cell",+ "rand 0.9.5",+ "serde",+ "serde_bytes",+ "serde_json",+ "time",+ "uuid",+]+[[package]]name = "bstr"version = "1.13.1"@@ -1038,7 +1074,7 @@ dependencies = ["getrandom 0.2.17","getrandom 0.3.4","hmac 0.12.1",- "pbkdf2",+ "pbkdf2 0.12.2","rand 0.9.5","sha2 0.10.9","thiserror 1.0.69",@@ -1156,6 +1192,26 @@ version = "0.10.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"+[[package]]+name = "const-random"+version = "0.1.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"+dependencies = [+ "const-random-macro",+]++[[package]]+name = "const-random-macro"+version = "0.1.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"+dependencies = [+ "getrandom 0.2.17",+ "once_cell",+ "tiny-keccak",+]+[[package]]name = "convert_case"version = "0.10.0"@@ -1394,6 +1450,15 @@ dependencies = ["crossbeam-utils",]+[[package]]+name = "crossbeam-epoch"+version = "0.9.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"+dependencies = [+ "crossbeam-utils",+]+[[package]]name = "crossbeam-utils"version = "0.8.23"@@ -1677,6 +1742,28 @@ version = "0.5.8"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"+[[package]]+name = "derive-syn-parse"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "derive-where"+version = "1.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2e2b94854e8576378ccda7c8de8a66ed8b4e8acbd2c50ec3418ea6c8aaf4b567"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.6",+]+[[package]]name = "derive_arbitrary"version = "1.4.2"@@ -1708,6 +1795,7 @@ dependencies = ["quote","rustc_version","syn 2.0.119",+ "unicode-xid",][[package]]@@ -2627,6 +2715,76 @@ version = "0.4.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"+[[package]]+name = "hickory-net"+version = "0.26.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c480823ed7c2c5d0f09c41020cb6b7c28029ce60ec42dc942158dcf22f8e0a4d"+dependencies = [+ "async-trait",+ "cfg-if",+ "data-encoding",+ "futures-channel",+ "futures-io",+ "futures-util",+ "hickory-proto",+ "idna",+ "ipnet",+ "jni",+ "rand 0.10.2",+ "thiserror 2.0.20",+ "tinyvec",+ "tokio",+ "tracing",+ "url",+]++[[package]]+name = "hickory-proto"+version = "0.26.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "12b92608f679a6fa515dd1d15c1ff89443026e391200a2c840c7afcba482893d"+dependencies = [+ "data-encoding",+ "idna",+ "ipnet",+ "jni",+ "once_cell",+ "prefix-trie",+ "rand 0.10.2",+ "ring",+ "thiserror 2.0.20",+ "tinyvec",+ "tracing",+ "url",+]++[[package]]+name = "hickory-resolver"+version = "0.26.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f3da5255c95d5a716857d54b5b8f4e8d67c3484d3beaaaae2ce25063b3ba981"+dependencies = [+ "cfg-if",+ "futures-util",+ "hickory-net",+ "hickory-proto",+ "ipconfig",+ "ipnet",+ "jni",+ "moka",+ "ndk-context",+ "once_cell",+ "parking_lot",+ "rand 0.10.2",+ "resolv-conf",+ "smallvec",+ "system-configuration",+ "thiserror 2.0.20",+ "tokio",+ "tracing",+]+[[package]]name = "hifijson"version = "0.5.0"@@ -3042,11 +3200,27 @@ version = "3.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96"+[[package]]+name = "ipconfig"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222"+dependencies = [+ "socket2",+ "widestring",+ "windows-registry",+ "windows-result 0.4.1",+ "windows-sys 0.61.2",+]+[[package]]name = "ipnet"version = "2.12.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0"+dependencies = [+ "serde",+][[package]]name = "is_terminal_polyfill"@@ -3455,7 +3629,7 @@ dependencies = ["indexmap","itoa","log",- "md-5",+ "md-5 0.10.6","nom 8.0.0","rand 0.10.2","rangemap",@@ -3503,6 +3677,54 @@ version = "0.7.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b0d28e293f2b8c9d2b2d1c0193bd3c1cbdc0d2cf396888dc01162f7cf9d6c3f3"+[[package]]+name = "macro_magic"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d"+dependencies = [+ "macro_magic_core",+ "macro_magic_macros",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "macro_magic_core"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150"+dependencies = [+ "const-random",+ "derive-syn-parse",+ "macro_magic_core_macros",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "macro_magic_core_macros"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "macro_magic_macros"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869"+dependencies = [+ "macro_magic_core",+ "quote",+ "syn 2.0.119",+]+[[package]]name = "mail-parser"version = "0.11.9"@@ -3552,6 +3774,16 @@ dependencies = ["digest 0.10.7",]+[[package]]+name = "md-5"+version = "0.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98"+dependencies = [+ "cfg-if",+ "digest 0.11.3",+]+[[package]]name = "md5"version = "0.8.1"@@ -3648,6 +3880,99 @@ dependencies = ["windows-sys 0.61.2",]+[[package]]+name = "moka"+version = "0.12.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4293f18e7567a1caf3c584855554377025c65e0aa445344d04171f5ad63d19b9"+dependencies = [+ "crossbeam-channel",+ "crossbeam-epoch",+ "crossbeam-utils",+ "equivalent",+ "parking_lot",+ "portable-atomic",+ "smallvec",+ "tagptr",+ "uuid",+]++[[package]]+name = "mongocrypt"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8426a875ded61430d4a811dbfda7633b6b8af0225c547fc6c28b8b0aa7d79a13"+dependencies = [+ "bson",+ "mongocrypt-sys",+ "once_cell",+ "serde",+]++[[package]]+name = "mongocrypt-sys"+version = "0.1.6+1.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "851fac73f7fe22f6a3ab87f720ce509cae7c9fd08e7dd27866cc232dee07ccf4"++[[package]]+name = "mongodb"+version = "3.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af84443ae9878f59a6818686f339064479f42cdf293c4c637d8fc9c0a8c5eed6"+dependencies = [+ "base64 0.22.1",+ "bitflags 2.13.2",+ "bson",+ "derive-where",+ "derive_more",+ "futures-core",+ "futures-io",+ "futures-util",+ "hex",+ "hickory-net",+ "hickory-proto",+ "hickory-resolver",+ "hmac 0.13.0",+ "macro_magic",+ "md-5 0.11.0",+ "mongocrypt",+ "mongodb-internal-macros",+ "pbkdf2 0.13.0",+ "percent-encoding",+ "rand 0.9.5",+ "rustc_version_runtime",+ "rustls",+ "serde",+ "serde_bytes",+ "serde_with",+ "sha1 0.11.0",+ "sha2 0.11.0",+ "socket2",+ "stringprep",+ "strsim",+ "take_mut",+ "thiserror 2.0.20",+ "tokio",+ "tokio-rustls",+ "tokio-util",+ "typed-builder",+ "uuid",+ "webpki-roots 1.0.9",+]++[[package]]+name = "mongodb-internal-macros"+version = "3.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "504024bbb83ab1bf1512007f7288b54d3a6343043f3f619c26a153346773598d"+dependencies = [+ "macro_magic",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]+[[package]]name = "moxcms"version = "0.8.1"@@ -4210,6 +4535,10 @@ name = "once_cell"version = "1.21.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"+dependencies = [+ "critical-section",+ "portable-atomic",+][[package]]name = "once_cell_polyfill"@@ -4316,6 +4645,7 @@ dependencies = ["tinyruntime-pyserver","tinysearch-bus","tinyskills",+ "tinystoragedrivers","tinytools","tinytools-agent","tinytools-std",@@ -4678,6 +5008,15 @@ dependencies = ["hmac 0.12.1",]+[[package]]+name = "pbkdf2"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629"+dependencies = [+ "digest 0.11.3",+]+[[package]]name = "pdf-extract"version = "0.12.1"@@ -4972,6 +5311,17 @@ dependencies = ["zerocopy",]+[[package]]+name = "prefix-trie"+version = "0.8.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4cf6e3177f0684016a5c209b00882e15f8bdd3f3bb48f0491df10cd102d0c6e7"+dependencies = [+ "either",+ "ipnet",+ "num-traits",+]+[[package]]name = "prettyplease"version = "0.2.37"@@ -5517,6 +5867,12 @@ dependencies = ["webpki-roots 1.0.9",]+[[package]]+name = "resolv-conf"+version = "0.7.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7"+[[package]]name = "rfc6979"version = "0.4.0"@@ -5611,6 +5967,16 @@ dependencies = ["semver",]+[[package]]+name = "rustc_version_runtime"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d"+dependencies = [+ "rustc_version",+ "semver",+]+[[package]]name = "rustix"version = "1.1.5"@@ -5967,6 +6333,16 @@ dependencies = ["serde",]+[[package]]+name = "serde_bytes"+version = "0.11.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"+dependencies = [+ "serde",+ "serde_core",+]+[[package]]name = "serde_core"version = "1.0.229"@@ -6004,6 +6380,7 @@ version = "1.0.151"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"dependencies = [+ "indexmap","itoa","memchr","serde",@@ -6043,6 +6420,28 @@ dependencies = ["serde",]+[[package]]+name = "serde_with"+version = "3.24.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f"+dependencies = [+ "serde_core",+ "serde_with_macros",+]++[[package]]+name = "serde_with_macros"+version = "3.24.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49"+dependencies = [+ "darling",+ "proc-macro2",+ "quote",+ "syn 3.0.6",+]+[[package]]name = "serde_yaml"version = "0.9.34+deprecated"@@ -6487,6 +6886,39 @@ dependencies = ["windows 0.54.0",]+[[package]]+name = "system-configuration"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"+dependencies = [+ "bitflags 2.13.2",+ "core-foundation 0.9.4",+ "system-configuration-sys",+]++[[package]]+name = "system-configuration-sys"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"+dependencies = [+ "core-foundation-sys 0.8.7",+ "libc",+]++[[package]]+name = "tagptr"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"++[[package]]+name = "take_mut"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"+[[package]]name = "tap"version = "1.0.1"@@ -6694,6 +7126,15 @@ dependencies = ["time-core",]+[[package]]+name = "tiny-keccak"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"+dependencies = [+ "crunchy",+]+[[package]]name = "tinyagents-definition"version = "2.1.3"@@ -6748,6 +7189,7 @@ dependencies = ["tinyinference-image","tinyinference-llm","tinyinference-video",+ "tinystoragedrivers-core","tinytools","tinytools-agent","tokio",@@ -6842,6 +7284,7 @@ dependencies = ["thiserror 2.0.20","tinyagents-harness","tinyagents-tasks",+ "tinystoragedrivers-core","tinystoragedrivers-sqlite","tinytools-agent","tokio",@@ -7495,6 +7938,16 @@ dependencies = ["url",]+[[package]]+name = "tinystoragedrivers"+version = "0.4.0"+dependencies = [+ "tinystoragedrivers-core",+ "tinystoragedrivers-file",+ "tinystoragedrivers-mongodb",+ "tinystoragedrivers-sqlite",+]+[[package]]name = "tinystoragedrivers-core"version = "0.4.0"@@ -7503,6 +7956,30 @@ dependencies = ["serde","serde_json","thiserror 2.0.20",+ "tokio",+]++[[package]]+name = "tinystoragedrivers-file"+version = "0.4.0"+dependencies = [+ "async-trait",+ "libc",+ "serde",+ "serde_json",+ "tinystoragedrivers-core",+ "tokio",+]++[[package]]+name = "tinystoragedrivers-mongodb"+version = "0.4.0"+dependencies = [+ "async-trait",+ "futures-util",+ "mongodb",+ "serde_json",+ "tinystoragedrivers-core",][[package]]@@ -7804,6 +8281,7 @@ checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"dependencies = ["bytes","futures-core",+ "futures-io","futures-sink","futures-util","libc",@@ -8084,6 +8562,26 @@ version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"+[[package]]+name = "typed-builder"+version = "0.22.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "398a3a3c918c96de527dc11e6e846cd549d4508030b8a33e1da12789c856b81a"+dependencies = [+ "typed-builder-macro",+]++[[package]]+name = "typed-builder-macro"+version = "0.22.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e48cea23f68d1f78eb7bc092881b6bb88d3d6b5b7e6234f6f9c911da1ffb221"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]+[[package]]name = "typed-path"version = "0.12.3"@@ -8173,6 +8671,12 @@ version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"+[[package]]+name = "unicode-xid"+version = "0.2.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"+[[package]]name = "universal-hash"version = "0.5.1"@@ -8802,6 +9306,12 @@ dependencies = ["wacore",]+[[package]]+name = "widestring"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471"+[[package]]name = "winapi"version = "0.3.9"@@ -8981,6 +9491,17 @@ dependencies = ["windows-link",]+[[package]]+name = "windows-registry"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"+dependencies = [+ "windows-link",+ "windows-result 0.4.1",+ "windows-strings 0.5.1",+]+[[package]]name = "windows-result"version = "0.1.2"diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.tomlindex bef4275f5e..daedb2d542 100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@ -149,7 +149,10 @@ tinyagents-graph = { path = "../../vendor/tinyagents/crates/tinyagents-graph", f"sqlite",] }tinyagents-registry = { path = "../../vendor/tinyagents/crates/tinyagents-registry" }-tinyagents-session = { path = "../../vendor/tinyagents/crates/tinyagents-session" }+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 }tinyagents-runtime = { path = "../../vendor/tinyagents/crates/tinyagents-runtime" }tinyagents-orchestration = { path = "../../vendor/tinyagents/crates/tinyagents-orchestration" }tinyinference-core = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference-core" }@@ -665,6 +668,12 @@ tokio = { version = "1", features = ["test-util"] }proptest = "1"[features]+# Storage drivers for `[storage] url` / `OPENHUMAN_STORAGE_URL` (see the+# `storage` domain). Memory is always available. Off in the product until a+# desktop domain moves onto the ports; a cloud build turns on `storage-mongodb`.+storage-sqlite = ["tinystoragedrivers/sqlite"]+storage-mongodb = ["tinystoragedrivers/mongodb"]+storage-file = ["tinystoragedrivers/file"]# THE CONTRIBUTOR SET — not the product set.## This list is what a bare `cargo check`, `cargo test` and rust-analyzerdiff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rsindex 929054a663..5ed3189ee4 100644--- a/crates/openhuman-core/src/lib.rs+++ b/crates/openhuman-core/src/lib.rs@@ -79,6 +79,7 @@ pub mod sandbox;pub mod search;pub mod security;pub mod skills;+pub mod storage;#[cfg(feature = "e2e-test-support")]pub mod test_support;pub mod threads;