Skip to content

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

fix(storage): use tinyjuice storage schema and update blob prefix

Steven Enamakel22389f55961e
diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.toml
index d13672275b..7f6f2379b1 100644
--- a/crates/openhuman-core/Cargo.toml
+++ b/crates/openhuman-core/Cargo.toml
@@ -421,7 +421,7 @@ tinyvoice-bus = { path = "../../vendor/tinyvoice/crates/tinyvoice-bus", optional
# no gate to hang off.
#
# After cloning: `git submodule update --init vendor/tinyjuice`.
-tinyjuice-bus = { path = "../../vendor/tinyjuice/crates/tinyjuice-bus" }
+tinyjuice-bus = { path = "../../vendor/tinyjuice/crates/tinyjuice-bus", features = ["storage"] }
tinyjuice-host = { path = "../../vendor/tinyjuice/crates/tinyjuice-host" }
# Transport-free vocabulary for the compiled TinyHosts provider module.
diff --git a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
index 7a9b8ae2f5..d2c1916e52 100644
--- a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
+++ b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
@@ -109,7 +109,7 @@ fn tinyjuice_reaches_only_its_blob_prefix() {
&grant,
Object::Blobs,
"Get",
- json!({"key": "tinyjuice_ccr/abc"})
+ json!({"key": "juice/ccr/abc"})
));
assert!(!allowed(
&grant,
@@ -117,4 +117,10 @@ fn tinyjuice_reaches_only_its_blob_prefix() {
"Get",
json!({"key": "other/abc"})
));
+ assert!(!allowed(
+ &grant,
+ Object::Blobs,
+ "Get",
+ json!({"key": "tinyjuice_ccr/abc"})
+ ));
}
diff --git a/crates/openhuman-core/src/storage/schema.rs b/crates/openhuman-core/src/storage/schema.rs
index 93ebfe69df..50d4b0ea71 100644
--- a/crates/openhuman-core/src/storage/schema.rs
+++ b/crates/openhuman-core/src/storage/schema.rs
@@ -49,17 +49,7 @@ pub fn owner_schemas() -> Vec<Schema> {
schemas.push(tinychannels_bus::storage::storage_schema());
schemas.push(tinyconnectors_bus::storage::storage_schema());
schemas.push(tinybox_bus::storage::storage_schema());
- schemas.push(
- Schema::new(crate::storage::schema_support::owner("juice"))
- .collection_with(
- 1,
- tinystoragedrivers::CollectionSpec::new(
- tinyjuice_bus::storage::SAVINGS_COLLECTION,
- ),
- ScopeClass::Module,
- )
- .blobs(tinyjuice_bus::storage::CCR_PREFIX, ScopeClass::Module),
- );
+ schemas.push(tinyjuice_bus::storage::storage_schema());
}
#[cfg(feature = "web3")]
schemas.push(tinywallet_bus::storage::storage_schema());