From 55cdf2e8f8af2dd3feebb4bb7d44c9cb7e23b384 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 11 May 2026 16:13:17 +0300 Subject: fix: stabilize integration agent state reports --- src/api/schema.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/api/schema.rs') diff --git a/src/api/schema.rs b/src/api/schema.rs index e7534465..fb7177f7 100644 --- a/src/api/schema.rs +++ b/src/api/schema.rs @@ -201,6 +201,8 @@ pub struct PaneReportAgentParams { pub state: PaneAgentState, #[serde(default, skip_serializing_if = "Option::is_none")] pub message: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub seq: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -208,6 +210,8 @@ pub struct PaneClearAgentAuthorityParams { pub pane_id: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub source: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub seq: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -215,6 +219,8 @@ pub struct PaneReleaseAgentParams { pub pane_id: String, pub source: String, pub agent: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub seq: Option, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] @@ -717,6 +723,7 @@ mod tests { agent: "pi".into(), state: PaneAgentState::Working, message: Some("thinking".into()), + seq: Some(42), }), }; @@ -732,6 +739,7 @@ mod tests { method: Method::PaneClearAgentAuthority(PaneClearAgentAuthorityParams { pane_id: "1-1".into(), source: Some("herdr:pi".into()), + seq: Some(42), }), }; @@ -748,6 +756,7 @@ mod tests { pane_id: "1-1".into(), source: "herdr:pi".into(), agent: "pi".into(), + seq: Some(42), }), }; -- cgit v1.2.3