Skip to content

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

build(cli): register storage_schema_dump example

Steven Enamakel4e73f9267578
diff --git a/crates/openhuman-cli/Cargo.toml b/crates/openhuman-cli/Cargo.toml
index d8c1a64df5..b713131b85 100644
--- a/crates/openhuman-cli/Cargo.toml
+++ b/crates/openhuman-cli/Cargo.toml
@@ -74,6 +74,10 @@ required-features = ["http-server", "bin-tools"]
# files. #5021 is still the right fix for symbols named in the middle of an
# otherwise gate-free target — required-features is the blunt instrument, and
# it costs the whole target when the gate is off.
+[[example]]
+name = "storage_schema_dump"
+path = "../../examples/storage_schema_dump.rs"
+
[[test]]
# Loads the tinydocs module from the linked executable and calls GenerateDocx
# end to end. Local only: needs `--features linked-modules,documents`.
diff --git a/examples/storage_schema_dump.rs b/examples/storage_schema_dump.rs
index 3c42439028..2f4f1a2ef8 100644
--- a/examples/storage_schema_dump.rs
+++ b/examples/storage_schema_dump.rs
@@ -10,7 +10,7 @@
use openhuman_core::storage::schema::owner_schemas;
use serde_json::{json, Value};
-use tinystoragedrivers::schema::{Item, ScopeClass};
+use tinystoragedrivers_core::schema::{Item, ScopeClass};
fn scope(class: ScopeClass) -> &'static str {
match class {
@@ -59,7 +59,11 @@ fn main() {
"owner": schema.owner.as_str(),
"items": schema.items.iter().map(item).collect::<Vec<_>>(),
"steps": schema.steps.iter().map(|step| json!({
- "id": step.id(),
+ "id": step.id,
+ "item": step.item,
+ "from": step.from,
+ "to": step.to,
+ "source": step.source,
})).collect::<Vec<_>>(),
})
})