Skip to content

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

refactor(subagent_sessions): widen visibility of driver helpers

Steven Enamakele65edde41cb5
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
index 6c718b0039..8ac2e83786 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
@@ -18,7 +18,7 @@ mod driver;
pub use driver::{
cancel_driver_job_by_task, cancel_driver_job_for_observed_session,
cancel_driver_job_for_session, cancel_driver_jobs_for_thread, mark_driver_pause_cancelled,
- resolve_lifecycle_key, DriverTaskCancellation,
+ record_cancel_reason, resolve_lifecycle_key, DriverTaskCancellation,
};
pub fn normalize_task_key(input: &str) -> String {
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_driver.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_driver.rs
index 31086b7389..17f368261a 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_driver.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_driver.rs
@@ -4,11 +4,11 @@ use std::sync::{Mutex, OnceLock};
use crate::agent::subagent_host::SubagentRunStatus;
use tinyagents_session::transcript::TranscriptMessage;
-use super::types::{
+use super::*;
+use super::{
DurableSubagentSession, DurableSubagentStatus, ReuseDecision, SubagentSessionSelector,
SubagentSessionStore, SubagentSessionUpsert,
};
-use super::*;
/// Requests cancellation of driver-backed children owned by a thread being
/// removed. The TinyAgents registry owns cancellation and settlement; this
@@ -347,7 +347,7 @@ pub fn mark_driver_pause_cancelled(
/// the awaited completion callback can include it in the single cancellation
/// notice. The current task check prevents a stale cancel from annotating a
/// later reuse of the same durable session.
-fn record_cancel_reason(
+pub(super) fn record_cancel_reason(
store: &SubagentSessionStore,
observed: &DurableSubagentSession,
reason: &str,
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs
index 0513eeef9d..7fc01d2f26 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs
@@ -1,6 +1,6 @@
use super::*;
-pub(super) fn decode_driver_job_result(
+pub(crate) fn decode_driver_job_result(
tool_result: tinytools::ToolResult,
bundle: &OpenHumanDriverBundle,
task_key: &SubagentTaskKey,
@@ -22,7 +22,7 @@ pub(super) fn decode_driver_job_result(
Ok(public_id)
}
-pub(super) async fn resolve_inline_driver_outcome(
+pub(crate) async fn resolve_inline_driver_outcome(
tool_result: tinytools::ToolResult,
bundle: &OpenHumanDriverBundle,
task_key: &SubagentTaskKey,