Skip to content

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

feat(web): add queued chat acknowledgement struct

Steven Enamakel147fb8c33bf4
diff --git a/crates/openhuman-core/src/web_chat/types.rs b/crates/openhuman-core/src/web_chat/types.rs
index 5716a6a65e..81a07e2d18 100644
--- a/crates/openhuman-core/src/web_chat/types.rs
+++ b/crates/openhuman-core/src/web_chat/types.rs
@@ -2,10 +2,24 @@
//! `SessionEntry`/`SessionCacheFingerprint`, the turn result
//! (`WebChatTaskResult`), and the `channel.web_*` request param structs.
-use serde::Deserialize;
+use serde::{Deserialize, Serialize};
use crate::agent::OpenHumanSessionHost;
+/// Typed acknowledgement emitted when a web chat message enters the run queue.
+/// Attachment values are sanitized opaque references minted by the core.
+#[derive(Debug, Clone, Serialize)]
+#[serde(rename_all = "snake_case")]
+pub(super) struct QueuedChatAck {
+ pub(super) queued: bool,
+ pub(super) queue_mode: String,
+ pub(super) client_id: String,
+ pub(super) thread_id: String,
+ pub(super) request_id: String,
+ pub(super) queue_depth: usize,
+ pub(super) queued_attachments: Vec<tinychannels_bus::ContentPart>,
+}
+
/// All inputs that the cached `SessionEntry`'s `Agent` was built from,
/// captured at build time. The cache-hit predicate is a single
/// `entry.fingerprint == current_fingerprint` comparison — pulling the