Skip to content

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

refactor(http_host): replace crate-internal paths with openhuman_core

Steven Enamakel33b359852ed8
diff --git a/crates/openhuman-rpc/src/http_host/auth.rs b/crates/openhuman-rpc/src/http_host/auth.rs
index 462f67caf3..f7baf13c39 100644
--- a/crates/openhuman-rpc/src/http_host/auth.rs
+++ b/crates/openhuman-rpc/src/http_host/auth.rs
@@ -3,10 +3,10 @@ use axum::response::{IntoResponse, Response};
use base64::Engine as _;
use rand::RngExt as _;
-use crate::config;
+use openhuman_core::config;
use crate::http_host::types::HostedDirAuth;
use crate::http_host::LOG_PREFIX;
-use crate::security::credentials::session_support;
+use openhuman_core::security::credentials::session_support;
pub(crate) fn ensure_authorized(headers: &HeaderMap, auth: &HostedDirAuth) -> Result<(), Response> {
if !auth.enabled {
diff --git a/crates/openhuman-rpc/src/http_host/ops.rs b/crates/openhuman-rpc/src/http_host/ops.rs
index 10c92f59f1..6c7fe6208d 100644
--- a/crates/openhuman-rpc/src/http_host/ops.rs
+++ b/crates/openhuman-rpc/src/http_host/ops.rs
@@ -273,7 +273,7 @@ pub async fn stop_all_hosted_dir_servers() {
fn register_shutdown_hook_once() {
SHUTDOWN_HOOK_REGISTERED.get_or_init(|| {
- crate::core::shutdown::register(|| async {
+ openhuman_core::core::shutdown::register(|| async {
stop_all_hosted_dir_servers().await;
});
});
diff --git a/crates/openhuman-rpc/src/http_host/rpc.rs b/crates/openhuman-rpc/src/http_host/rpc.rs
index a1af3d5278..9a82b982a9 100644
--- a/crates/openhuman-rpc/src/http_host/rpc.rs
+++ b/crates/openhuman-rpc/src/http_host/rpc.rs
@@ -1,6 +1,6 @@
//! RPC adapters for the `http_host` domain.
-use crate::core::Outcome;
+use openhuman_core::core::Outcome;
use crate::http_host::ops;
use crate::http_host::types::{
HostedDirGetResult, HostedDirListResult, HostedDirLookupParams, HostedDirStartResult,
diff --git a/crates/openhuman-rpc/src/http_host/schemas.rs b/crates/openhuman-rpc/src/http_host/schemas.rs
index 52b5b5f6d1..c632081368 100644
--- a/crates/openhuman-rpc/src/http_host/schemas.rs
+++ b/crates/openhuman-rpc/src/http_host/schemas.rs
@@ -3,8 +3,8 @@
use serde::de::DeserializeOwned;
use serde_json::{Map, Value};
-use crate::core::all::{ControllerFuture, RegisteredController};
-use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
+use openhuman_core::core::all::{ControllerFuture, RegisteredController};
+use openhuman_core::core::{ControllerSchema, FieldSchema, TypeSchema};
use super::types::{HostedDirLookupParams, StartHostedDirParams};