Skip to content

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

refactor(openhuman-embed): update core module paths for moved items

Steven Enamakel5b29f1b835f6
diff --git a/crates/openhuman-embed/src/harness/access.rs b/crates/openhuman-embed/src/harness/access.rs
index dd97707de4..9c59f37bb1 100644
--- a/crates/openhuman-embed/src/harness/access.rs
+++ b/crates/openhuman-embed/src/harness/access.rs
@@ -20,7 +20,7 @@
//! expensive to diagnose. [`Access`] therefore always yields **both** halves
//! together, and they cannot be set independently.
-use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
+use openhuman_core::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
use openhuman_core::security::{AutonomyLevel, TrustedAccess, TrustedRoot};
/// The authority a harness's turns run with.
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index d76efea93e..7c64700a85 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -153,7 +153,7 @@ pub mod agent {
}
// rpc: Socket.IO run-mode toggles.
pub mod run_mode {
- pub use openhuman_core::agent::tinyagents::run_mode::{parse_mode_label, set_mode};
+ pub use openhuman_core::threads::run_mode::{parse_mode_label, set_mode};
}
}
// rpc: shutdown, plan review over Socket.IO, and the session store install.
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 3e86ad4843..b33fc4df1f 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -63,7 +63,7 @@
#![warn(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
-pub use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
+pub use openhuman_core::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
/// Complete definition accepted by [`AgentDefinitionSpec::from_base`].
pub use openhuman_core::agent_registry::host_definition::AgentDefinition;
@@ -101,7 +101,7 @@ pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};
/// Live agent-turn progress for in-process embedders.
pub mod agent_progress {
- pub use openhuman_core::agent::progress::AgentProgress;
+ pub use openhuman_core::progress::AgentProgress;
/// The bounded in-process channel an embedder supplies for one agent turn.
pub type ProgressSink = tokio::sync::mpsc::Sender<AgentProgress>;
}
diff --git a/crates/openhuman-embed/src/turn.rs b/crates/openhuman-embed/src/turn.rs
index eb73000daa..7297b7ec7d 100644
--- a/crates/openhuman-embed/src/turn.rs
+++ b/crates/openhuman-embed/src/turn.rs
@@ -22,7 +22,7 @@
//!
//! A turn reads one `tokio` task-local that no parameter can carry yet:
//!
-//! - **origin** ([`turn_origin`](openhuman_core::agent::turn_origin)) — the
+//! - **origin** ([`turn_origin`](openhuman_core::security::turn_origin)) — the
//! caller's statement of authority. The approval gate is *fail-closed*: an
//! unlabelled call gets the `Cli` default, and a caller wanting anything
//! else — a workflow's blanket automation grant, say — must scope it around
@@ -42,8 +42,8 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;
use super::error::CoreError;
-use openhuman_core::agent::progress::AgentProgress;
-use openhuman_core::agent::turn_origin::AgentTurnOrigin;
+use openhuman_core::progress::AgentProgress;
+use openhuman_core::security::turn_origin::AgentTurnOrigin;
use openhuman_core::core::runtime::CoreRuntime;
use openhuman_core::inference::INFERENCE_AGENT_CHAT as AGENT_CHAT;
diff --git a/crates/openhuman-embed/src/turn_control.rs b/crates/openhuman-embed/src/turn_control.rs
index c92bcacc5e..958ba26647 100644
--- a/crates/openhuman-embed/src/turn_control.rs
+++ b/crates/openhuman-embed/src/turn_control.rs
@@ -402,7 +402,7 @@ impl Turn {
let dispatch = dispatch(self.target, self.request, self.seed.take(), usage, options);
let reply = match self.origin {
- Some(origin) => openhuman_core::agent::turn_origin::with_origin(origin, dispatch).await,
+ Some(origin) => openhuman_core::security::turn_origin::with_origin(origin, dispatch).await,
None => dispatch.await,
}
.inspect_err(|err| {
diff --git a/crates/openhuman-embed/tests/agent_lifecycle.rs b/crates/openhuman-embed/tests/agent_lifecycle.rs
index c8cff0865a..a1e696b3a7 100644
--- a/crates/openhuman-embed/tests/agent_lifecycle.rs
+++ b/crates/openhuman-embed/tests/agent_lifecycle.rs
@@ -231,7 +231,7 @@ fn removing_an_agent_releases_everything_it_held() {
Duration::from_secs(10),
openhuman_core::core::runtime::CoreContext::scope(
old_context,
- openhuman_core::agent::turn_origin::with_origin(
+ openhuman_core::security::turn_origin::with_origin(
AgentTurnOrigin::WebChat {
thread_id: "late-lifecycle-thread".into(),
client_id: "late-lifecycle-client".into(),
diff --git a/crates/openhuman-embed/tests/cron_agents.rs b/crates/openhuman-embed/tests/cron_agents.rs
index 18beaa51a1..a0e04d81b8 100644
--- a/crates/openhuman-embed/tests/cron_agents.rs
+++ b/crates/openhuman-embed/tests/cron_agents.rs
@@ -45,7 +45,7 @@ impl Tool for Ping {
self.seen
.lock()
.unwrap()
- .push(openhuman_core::agent::turn_origin::current());
+ .push(openhuman_core::security::turn_origin::current());
Ok(tinytools::ToolResult::success("pinged"))
}
}
diff --git a/crates/openhuman-embed/tests/flow_approvals.rs b/crates/openhuman-embed/tests/flow_approvals.rs
index 603ec386e9..650350e2bd 100644
--- a/crates/openhuman-embed/tests/flow_approvals.rs
+++ b/crates/openhuman-embed/tests/flow_approvals.rs
@@ -4,7 +4,7 @@ mod common;
use std::time::Duration;
-use openhuman_core::agent::turn_origin::{self, TrustedAutomationSource};
+use openhuman_core::security::turn_origin::{self, TrustedAutomationSource};
use openhuman_core::core::events::DomainEvent;
use openhuman_core::core::runtime::{AgentContextRegistry, CoreContext};
use openhuman_core::security::approval::{ApprovalGate, ApprovalSourceContext, GateOutcome};