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
+18
View File
@@ -53,6 +53,14 @@ pub struct Gateway {
pub socket: PathBuf,
}
/// `[memory]`: where `memoryd` takes the decided `recall` and `memory` calls. The memory tools are
/// always on, so the section is optional; an empty path means the default under `home`.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Default)]
#[serde(deny_unknown_fields, default)]
pub struct Memory {
pub socket: PathBuf,
}
fn default_podman() -> PathBuf {
PathBuf::from("podman")
}
@@ -141,6 +149,8 @@ pub struct Config {
pub runner: Option<Runner>,
#[serde(default)]
pub gateway: Option<Gateway>,
#[serde(default)]
pub memory: Memory,
}
/// The longest an approval may wait: a day, the longest `loopd` waits after a pending frame.
@@ -283,6 +293,14 @@ impl Config {
Some(gateway.socket.clone())
}
}
/// `memoryd`'s socket for `brokerd`.
pub fn memory_socket(&self) -> PathBuf {
if self.memory.socket.as_os_str().is_empty() {
self.paths.home.join("run/broker-memory/memory.sock")
} else {
self.memory.socket.clone()
}
}
pub fn audit_dir(&self) -> PathBuf {
self.paths.home.join("audit")
}