Skip to content

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

fix(modules): gate tinybox behind the modules feature

Steven Enamakel46cce3c0c81e
diff --git a/crates/openhuman-core/src/modules/ops_tests.rs b/crates/openhuman-core/src/modules/ops_tests.rs
index 13e54474d6..044dfe1e8e 100644
--- a/crates/openhuman-core/src/modules/ops_tests.rs
+++ b/crates/openhuman-core/src/modules/ops_tests.rs
@@ -115,7 +115,7 @@ fn the_default_config_enables_modules_and_downloads() {
fn list_reports_every_registry_entry() {
let statuses = list(&offline_config());
assert_eq!(statuses.len(), registry::ALL.len());
- assert!(statuses.iter().any(|status| status.id == "tinydocs"));
+ assert!(statuses.iter().any(|status| status.id == "tinymcp"));
for status in &statuses {
assert!(!status.version.is_empty());
assert!(!status.bus_name.is_empty());
@@ -229,6 +229,7 @@ fn errors_never_leak_a_path_or_a_url() {
}
}
+#[cfg(feature = "documents")]
#[tokio::test]
async fn a_bounded_wait_with_nothing_cached_and_downloads_off_fails_rather_than_loading() {
// An isolated install directory: this machine's real cache may hold the
diff --git a/crates/openhuman-core/src/modules/registry.rs b/crates/openhuman-core/src/modules/registry.rs
index 404fe6247f..7c5daab35d 100644
--- a/crates/openhuman-core/src/modules/registry.rs
+++ b/crates/openhuman-core/src/modules/registry.rs
@@ -48,7 +48,9 @@ use records_computer::TINYCOMPUTER;
use records_docs_wallet::TINYDOCS;
#[cfg(feature = "web3")]
use records_docs_wallet::TINYWALLET;
-use records_extra::{TINYBOX, TINYCHANNELS};
+use records_extra::TINYCHANNELS;
+#[cfg(feature = "modules")]
+use records_extra::TINYBOX;
#[cfg(feature = "hosting")]
use records_extra::TINYHOSTS;
use records_mcp_connectors::{TINYCONNECTORS, TINYMCP};
@@ -72,6 +74,7 @@ pub const ALL: &[ModuleRecord] = &[
TINYVOICE,
TINYMCP,
TINYCONNECTORS,
+ #[cfg(feature = "modules")]
TINYBOX,
TINYCHANNELS,
#[cfg(feature = "hosting")]
diff --git a/crates/openhuman-core/src/modules/registry/records_extra.rs b/crates/openhuman-core/src/modules/registry/records_extra.rs
index 08c297318b..c6f1f4d860 100644
--- a/crates/openhuman-core/src/modules/registry/records_extra.rs
+++ b/crates/openhuman-core/src/modules/registry/records_extra.rs
@@ -3,6 +3,7 @@
use crate::modules::types::{LoadPolicy, ModuleRecord, PlatformAsset, SourceSpec};
/// The `tinybox` module, loaded on demand.
+#[cfg(feature = "modules")]
pub(crate) const TINYBOX: ModuleRecord = ModuleRecord {
id: "tinybox",
description: "Sandbox execution and lifecycle operations through TinyBox",
diff --git a/crates/openhuman-core/src/modules/registry_tests.rs b/crates/openhuman-core/src/modules/registry_tests.rs
index 69d04d7c4f..acc2c1cb41 100644
--- a/crates/openhuman-core/src/modules/registry_tests.rs
+++ b/crates/openhuman-core/src/modules/registry_tests.rs
@@ -545,7 +545,7 @@ fn a_record_publishes_for_every_host_or_for_none() {
#[test]
fn find_resolves_known_ids_only() {
- assert!(find("tinydocs").is_some());
+ assert!(find("tinymcp").is_some());
assert!(find("not-a-module").is_none());
}
@@ -757,7 +757,6 @@ fn contract_names() -> Vec<(&'static str, &'static str, &'static str)> {
tinyconnectors_bus::names::INTERFACE,
tinyconnectors_bus::names::OBJECT_PATH,
),
- ("tinybox", tinybox_bus::INTERFACE, tinybox_bus::OBJECT_PATH),
(
"tinychannels",
tinychannels_bus::names::BUS_NAME,
diff --git a/crates/openhuman-core/src/modules/source_tests.rs b/crates/openhuman-core/src/modules/source_tests.rs
index d021e780b6..2b336d03a4 100644
--- a/crates/openhuman-core/src/modules/source_tests.rs
+++ b/crates/openhuman-core/src/modules/source_tests.rs
@@ -101,13 +101,13 @@ fn an_override_with_both_path_and_source_is_ignored() {
#[test]
fn artifact_in_finds_the_built_library_by_registry_file_name() {
let dir = tempfile::tempdir().unwrap();
- let record = crate::modules::registry::find("tinydocs").unwrap();
- assert_eq!(artifact_in(dir.path(), "tinydocs"), None);
- let module_dir = dir.path().join("tinydocs");
+ let record = crate::modules::registry::find("tinymcp").unwrap();
+ assert_eq!(artifact_in(dir.path(), "tinymcp"), None);
+ let module_dir = dir.path().join("tinymcp");
std::fs::create_dir_all(&module_dir).unwrap();
let file = module_dir.join(record.source.artifact_filename());
std::fs::write(&file, b"x").unwrap();
- assert_eq!(artifact_in(dir.path(), "tinydocs"), Some(file));
+ assert_eq!(artifact_in(dir.path(), "tinymcp"), Some(file));
}
#[test]