loopd: the memory block from memoryd, recall and memory as core tools

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 e167fc871b
commit 15ee4b8e3d
14 changed files with 484 additions and 87 deletions
+19
View File
@@ -173,6 +173,16 @@ pub struct Config {
pub baseline: Baseline,
#[serde(default)]
pub broker: Broker,
#[serde(default)]
pub memory: Memory,
}
/// `[memory]`: `memoryd`'s socket for `loopd` (M5a spec, section 9). An empty path means the
/// default under `home`.
#[derive(Debug, Clone, PartialEq, Eq, Default, Deserialize)]
#[serde(deny_unknown_fields, default)]
pub struct Memory {
pub socket: std::path::PathBuf,
}
#[derive(Debug)]
@@ -206,6 +216,15 @@ impl Config {
}
Ok(config)
}
/// `memoryd`'s socket for `loopd`.
pub fn memory_socket(&self) -> std::path::PathBuf {
if self.memory.socket.as_os_str().is_empty() {
self.paths.home.join("run/loop-memory/memory.sock")
} else {
self.memory.socket.clone()
}
}
pub fn channel_socket(&self) -> std::path::PathBuf {
if self.channel.socket.as_os_str().is_empty() {
self.paths.home.join("run/loop/loop.sock")