Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
fix(hooks): refuse redirects in the generated TS spool drain
João Matheus2b0ad9d59daa
diff --git a/crates/ai-memory-cli/src/commands/render_shared.rs b/crates/ai-memory-cli/src/commands/render_shared.rsindex 77444485..bfc47321 100644--- a/crates/ai-memory-cli/src/commands/render_shared.rs+++ b/crates/ai-memory-cli/src/commands/render_shared.rs@@ -3123,8 +3123,11 @@ async function drainHookSpool(): Promise<void> {if (entry.token) headers["Authorization"] = `Bearer ${entry.token}`;// Bun reads HTTP(S)_PROXY and ALL_PROXY even for a loopback URL;// `proxy: false` connects directly. Node's fetch ignores the key.+ // A redirect is refused, not followed: a gateway's login page answers+ // 200, and the entry would be deleted as delivered.const resp = await fetch(entry.url, {proxy: false,+ redirect: "error",method: "POST",headers,body: entry.body,