Skip to content

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

Rust

test(backfill): answer the 2.7 /hook/batch shape in the capture-policy tests

AkitaOnRails3b1fe2b3a889
diff --git a/crates/ai-memory-cli/src/commands/backfill.rs b/crates/ai-memory-cli/src/commands/backfill.rs
index 8e340f36..c7134202 100644
--- a/crates/ai-memory-cli/src/commands/backfill.rs
+++ b/crates/ai-memory-cli/src/commands/backfill.rs
@@ -2100,7 +2100,10 @@ mod tests {
async move {
let accepted = items.len();
captured.lock().unwrap().extend(items);
- axum::Json(serde_json::json!({ "accepted": accepted }))
+ let results: Vec<_> = (0..accepted)
+ .map(|index| serde_json::json!({ "index": index, "outcome": "stored" }))
+ .collect();
+ axum::Json(serde_json::json!({ "accepted": accepted, "results": results }))
}
},
),
@@ -2326,7 +2329,10 @@ mod tests {
async move {
let accepted = items.len();
captured.lock().unwrap().extend(items);
- axum::Json(serde_json::json!({ "accepted": accepted }))
+ let results: Vec<_> = (0..accepted)
+ .map(|index| serde_json::json!({ "index": index, "outcome": "stored" }))
+ .collect();
+ axum::Json(serde_json::json!({ "accepted": accepted, "results": results }))
}
},
),