bxcore, loopd: TurnDone says whether the session has read untrusted content

Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
2026-09-27 19:08:42 -07:00
co-authored by ornith-1.5-35b-a3b
parent 91992b9743
commit 0d3048c3c4
12 changed files with 287 additions and 2 deletions
+4 -1
View File
@@ -187,12 +187,15 @@ pub enum TurnEvent {
},
}
// JSON: {"kind":"turn_done","body":{"content":"…","usage":{…}}}
// JSON: {"kind":"turn_done","body":{"content":"…","usage":{…},"untrusted":false}}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct TurnDone {
pub content: String,
pub usage: Usage,
/// True once the session has read untrusted content, in this turn or an earlier one (M5b
/// spec, section 9). It has no default: a frame without it is refused, never read as clean.
pub untrusted: bool,
}
// The admin messages on admin.sock. JSON: {"kind":"approvals","body":{}}