Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
fix(mcp): declare top-level type: string on FeedbackKind schema for Moonshot/strict parsers
evanmaranzano54e5b628d9fa
diff --git a/crates/ai-memory-core/src/page.rs b/crates/ai-memory-core/src/page.rsindex e4f6a4fc..6b97c966 100644--- a/crates/ai-memory-core/src/page.rs+++ b/crates/ai-memory-core/src/page.rs@@ -394,6 +394,7 @@ impl Tier {/// report rather than deleting anything — an agent's judgement lowers/// confidence, it does not destroy memory.#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, schemars::JsonSchema)]+#[schemars(extend("type" = "string"))]#[serde(rename_all = "snake_case")]pub enum FeedbackKind {/// The page answered the question it surfaced for.diff --git a/crates/ai-memory-mcp/src/server.rs b/crates/ai-memory-mcp/src/server.rsindex 0cb15c58..867ada9b 100644--- a/crates/ai-memory-mcp/src/server.rs+++ b/crates/ai-memory-mcp/src/server.rs@@ -6220,6 +6220,10 @@ mod tests {.as_str().and_then(|reference| reference.strip_prefix("#/$defs/")).map_or(signal, |name| &schema["$defs"][name]);+ assert_eq!(+ signal_schema["type"], "string",+ "signal schema must have top-level type: string to satisfy moonshot flavored json schema"+ );for expected in ["helpful", "not_helpful", "stale", "wrong"] {let in_enum = signal_schema["enum"].as_array()