pub struct Conversation {
pub messages: Vec<Message>,
pub taint: Taint,
pub rewritten: Vec<Vec<Message>>,
}Expand description
A conversation, and what has entered it.
The taint lives here, with the messages, because that is what it is a property of. Tracking it per run meant the lethal trifecta was defeated by pressing Enter: fetch a hostile page on one turn, read a secret and send on the next, and the interlock saw a clean slate both times — while the attacker’s text sat in the model’s context the whole while, still able to steer it. A turn boundary is not a security boundary.
Bundling the two makes the right thing the default rather than something
each caller has to remember. Keep the history and you keep the taint; start
a new conversation — a batch item, a subagent, an eval case — and you get a
clean one, because you built a new Conversation to do it.
Fields§
§messages: Vec<Message>§taint: TaintWhat has entered this conversation so far. Grows, never shrinks: there is no way to un-read a page.
rewritten: Vec<Vec<Message>>Full states of messages that an in-place rewrite replaced during the
current run, oldest first — compaction, eviction, thinning. The loop
snapshots the list before each rewrite pass and clears at run start;
Session::record_run walks these before the final state, so turns a
mid-run rewrite dropped still reach the file. Without this, a run long
enough to compact itself lost its own head: the front-end records at
run end, and the rewrite record carries only what survived.
On the conversation rather than the outcome for the same reason taint is: it is a fact about what the messages went through, and bundling it with them makes the right thing the default — the recording call receives the conversation and cannot skip what it carries.
Implementations§
Source§impl Conversation
impl Conversation
Trait Implementations§
Source§impl Clone for Conversation
impl Clone for Conversation
Source§fn clone(&self) -> Conversation
fn clone(&self) -> Conversation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more