Skip to content

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

feat(core): add headless agent chat context support

Steven Enamakel9d99e1783bff
diff --git a/crates/openhuman-core/src/core/runtime/dispatch_ctx.rs b/crates/openhuman-core/src/core/runtime/dispatch_ctx.rs
index 5564c21072..73f129bc5d 100644
--- a/crates/openhuman-core/src/core/runtime/dispatch_ctx.rs
+++ b/crates/openhuman-core/src/core/runtime/dispatch_ctx.rs
@@ -144,9 +144,22 @@ impl DispatchCtx {
pub fn ambient_turn() -> Self {
Self {
core: CoreContext::scoped_for_turn(),
+ headless_agent_chat: false,
}
}
+ /// Marks this compiled one-shot call as a headless agent-chat entry point.
+ /// The marker is carried by this dispatch only; ordinary controller and
+ /// in-process chat calls remain asynchronous.
+ pub(crate) fn with_headless_agent_chat(mut self) -> Self {
+ self.headless_agent_chat = true;
+ self
+ }
+
+ pub(crate) fn is_headless_agent_chat(&self) -> bool {
+ self.headless_agent_chat
+ }
+
/// The `[components]` switches of the context this call runs under. No
/// context at all (a bare library call, pre-boot) means nothing narrowed
/// them, so every component is on.