Skip to content

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

chore(core): remove unused modules module

Steven Enamakel31fbffb8f316
diff --git a/crates/openhuman-core/src/modules/mod.rs b/crates/openhuman-core/src/modules/mod.rs
index 096fe118c6..9a02edbf72 100644
--- a/crates/openhuman-core/src/modules/mod.rs
+++ b/crates/openhuman-core/src/modules/mod.rs
@@ -271,17 +271,18 @@ where
/// Imports the connector module's legacy preference and trigger-archive files
/// under `state_dir` into its storage, once per directory. Never fails the
/// caller: an error is logged and the import is retried at the next call.
-pub async fn import_legacy_connectors(state_dir: &std::path::Path) {
+pub async fn import_legacy_connectors(ctx: &crate::core::runtime::DispatchCtx, state_dir: &std::path::Path) {
#[cfg(feature = "modules")]
import_once(
+ ctx,
"connectors",
storage_grant_tinyconnectors::MODULE_ID,
state_dir,
- storage_import_tinyconnectors::import_legacy(state_dir),
+ storage_import_tinyconnectors::import_legacy(ctx, state_dir),
)
.await;
#[cfg(not(feature = "modules"))]
- let _ = state_dir;
+ let _ = (ctx, state_dir);
}
/// Imports the x402 ledger's legacy `payments.jsonl` under `workspace_dir`
@@ -289,18 +290,19 @@ pub async fn import_legacy_connectors(state_dir: &std::path::Path) {
/// caller: an error is logged and the import is retried at the next call. Returns
/// false when the import failed, so the caller can refuse to open a ledger that
/// would ignore the legacy payments.
-pub async fn import_legacy_x402(workspace_dir: &std::path::Path) -> bool {
+pub async fn import_legacy_x402(ctx: &crate::core::runtime::DispatchCtx, workspace_dir: &std::path::Path) -> bool {
#[cfg(all(feature = "modules", feature = "web3"))]
return import_once(
+ ctx,
"x402",
storage_grant_tinywallet::MODULE_ID,
workspace_dir,
- storage_import_tinywallet::import_legacy(workspace_dir),
+ storage_import_tinywallet::import_legacy(ctx, workspace_dir),
)
.await;
#[cfg(not(all(feature = "modules", feature = "web3")))]
{
- let _ = workspace_dir;
+ let _ = (ctx, workspace_dir);
true
}
}
@@ -308,17 +310,18 @@ pub async fn import_legacy_x402(workspace_dir: &std::path::Path) -> bool {
/// Imports the legacy jail registry index under `<workspace_dir>/jails` into
/// the tinybox module's storage, once. Never fails the caller: an error is
/// logged and the import is retried at the next call.
-pub async fn import_legacy_tinybox(workspace_dir: &std::path::Path) {
+pub async fn import_legacy_tinybox(ctx: &crate::core::runtime::DispatchCtx, workspace_dir: &std::path::Path) {
#[cfg(feature = "modules")]
import_once(
+ ctx,
"tinybox",
storage_grant_tinybox::MODULE_ID,
workspace_dir,
- storage_import_tinybox::import_legacy(workspace_dir),
+ storage_import_tinybox::import_legacy(ctx, workspace_dir),
)
.await;
#[cfg(not(feature = "modules"))]
- let _ = workspace_dir;
+ let _ = (ctx, workspace_dir);
}
/// Scopes, under the current tenant, that hold expiring blobs written by
@@ -377,17 +380,22 @@ pub(crate) fn expiring_blob_module_scopes(
/// module's blob storage, once per directory. `ttl` is the configured original
/// lifetime. Never fails the caller: an error is logged and the import is
/// retried at the next install.
-pub async fn import_legacy_tinyjuice(root: &std::path::Path, ttl: Option<std::time::Duration>) {
+pub async fn import_legacy_tinyjuice(
+ ctx: &crate::core::runtime::DispatchCtx,
+ root: &std::path::Path,
+ ttl: Option<std::time::Duration>,
+) {
#[cfg(feature = "modules")]
import_once(
+ ctx,
"tinyjuice",
storage_grant_tinyjuice::MODULE_ID,
root,
- storage_import_tinyjuice::import_legacy(root, ttl),
+ storage_import_tinyjuice::import_legacy(ctx, root, ttl),
)
.await;
#[cfg(not(feature = "modules"))]
- let _ = (root, ttl);
+ let _ = (ctx, root, ttl);
}
#[cfg(all(test, feature = "modules"))]