brokerd: memory calls to memoryd with the session's state; labels only stricter

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-25 16:41:44 -07:00
committed by kyle
parent fcfd590687
commit e167fc871b
11 changed files with 410 additions and 8 deletions
+7
View File
@@ -151,6 +151,8 @@ pub struct Decision {
request: ToolRequest,
args: ToolArgs,
matched: Matched,
/// The session's state when the call was decided; `memoryd` needs it (M5a spec, section 8).
state: SessionState,
}
/// A call the broker left for the owner: built only in this module, re-decided by `redecide`.
@@ -165,6 +167,9 @@ impl Decision {
pub fn request(&self) -> &ToolRequest {
&self.request
}
pub fn state(&self) -> SessionState {
self.state
}
pub fn args(&self) -> &ToolArgs {
&self.args
}
@@ -278,6 +283,7 @@ pub fn decide(
request,
args,
matched,
state,
}),
}
}
@@ -315,6 +321,7 @@ pub fn redecide(
request: ask.request().clone(),
args: ask.args().clone(),
matched,
state,
}),
}
}