pub fn build_existing_memory_dict( existing: &[(Uuid, String)], ) -> (Value, IdMapping)
Build the “existing memory” dict that gets sent to the LLM for comparison. Maps each existing memory to an integer ID for stability.