Repository navigation
feat(#293): structured memory — JSON content support (schema v6) - #331
Merged
Merged
Conversation
- Auto-detect JSON content in remember() — sets content_type='json'
- Schema v6: content_type TEXT NOT NULL DEFAULT 'text'
- Flatten JSON for embedding: {"name":"Alice"} → "name: Alice"
- CLI: --where key=value filters JSON memories by field
- CLI: --content-format json pretty-prints JSON in output
- remember_json() validated wrapper method
- Backward compatible: existing text memories get content_type='text'
- 12 new tests (JSON detection, flattening, storage, migration)
Closes #293
🔍 Cora AI Code Review❌ Blocked — critical issues found. 🔴 Error (2)
Review powered by cora-cli · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Aug 13, 2026
- Auto-detect JSON content in remember() — sets content_type='json'
- Schema v6: content_type TEXT NOT NULL DEFAULT 'text'
- Flatten JSON for embedding: {"name":"Alice"} → "name: Alice"
- CLI: --where key=value filters JSON memories by field
- CLI: --content-format json pretty-prints JSON in output
- remember_json() validated wrapper method
- Backward compatible: existing text memories get content_type='text'
- 12 new tests (JSON detection, flattening, storage, migration)
Closes #293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #293
Changes
Schema v6
content_type TEXT NOT NULL DEFAULT 'text'JSON content support
remember()detects JSON input (starts with{or[), setscontent_type='json'{"name":"Alice","role":"CTO"}→"name: Alice, role: CTO"for semantic searchCLI flags
--where key=value: filter JSON memories by field (supports string, number, bool, null)--content-format json: pretty-print JSON content in outputBackward compatible
content_type='text'Tests
cargo test --workspace✅ (146 passed, 5 ignored for ONNX)cargo clippy --workspace -- -D warnings✅cargo fmt --all✅