Skip to content

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

Rust

test(backfill): gate the Unix-only test helpers on unix

AkitaOnRailsd7625d4aabb1
diff --git a/crates/ai-memory-cli/src/commands/backfill.rs b/crates/ai-memory-cli/src/commands/backfill.rs
index 8254950e..4c5b5535 100644
--- a/crates/ai-memory-cli/src/commands/backfill.rs
+++ b/crates/ai-memory-cli/src/commands/backfill.rs
@@ -1474,6 +1474,7 @@ mod tests {
serde_json::to_string(&*posted.lock().unwrap()).unwrap()
}
+ #[cfg(unix)]
fn marked_checkout(marker: &str) -> tempfile::TempDir {
let dir = tempfile::tempdir().unwrap();
std::fs::write(dir.path().join(".ai-memory.toml"), marker).unwrap();
@@ -1536,6 +1537,7 @@ mod tests {
}
/// A Claude Code transcript record: `content` is the message content.
+ #[cfg(unix)]
fn claude_record(
sid: &str,
uuid: &str,
@@ -1550,10 +1552,12 @@ mod tests {
})
}
+ #[cfg(unix)]
fn claude_tool(name: &str, id: &str, input: serde_json::Value) -> serde_json::Value {
serde_json::json!({"type": "tool_use", "id": id, "name": name, "input": input})
}
+ #[cfg(unix)]
fn claude_output(id: &str, text: &str) -> serde_json::Value {
serde_json::json!({"type": "tool_result", "tool_use_id": id, "content": text})
}