Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(antigravity): compare hook script names independent of path style
4nrry3c31226213df
diff --git a/crates/ai-memory-cli/src/commands/render_shared.rs b/crates/ai-memory-cli/src/commands/render_shared.rsindex 3b0466e8..4d753513 100644--- a/crates/ai-memory-cli/src/commands/render_shared.rs+++ b/crates/ai-memory-cli/src/commands/render_shared.rs@@ -4677,7 +4677,14 @@ $payload = [Console]::In.ReadToEnd()("PreInvocation", "pre-invocation.sh"),] {let cmd = group[event][0]["command"].as_str().unwrap();- assert!(cmd.ends_with(&format!("/{script}")), "{event}: {cmd}");+ // The script path's separator and quoting follow the platform+ // (`'...\session-start.sh'` on Windows), so compare the file name.+ let file = cmd+ .trim_end_matches(['\'', '"'])+ .rsplit(['/', '\\'])+ .next()+ .unwrap();+ assert_eq!(file, script, "{event}: {cmd}");}}