Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

test(openclaw): run the all-routes fixture from its temp dir

Felipe Neves Ricardo8bfd110746ca
diff --git a/crates/ai-memory-cli/src/commands/openclaw_plugin.rs b/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
index 1491520f..c3412046 100644
--- a/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
+++ b/crates/ai-memory-cli/src/commands/openclaw_plugin.rs
@@ -826,9 +826,13 @@ mod tests {
serde_json::to_string(&cases).unwrap()
);
std::fs::write(&module, source).unwrap();
+ // A Windows cwd such as `c:/work/api/lib` is relative on Unix, so the
+ // marker walk starts in node's working directory; run it from the temp
+ // dir so a contributor's `.ai-memory.toml` in the checkout is not found.
let output = std::process::Command::new("node")
.args(["--experimental-strip-types", "--no-warnings"])
.arg(&module)
+ .current_dir(tmp.path())
.env("HOME", &home)
.env("USERPROFILE", &home)
.output()