feat: modernize API architecture and deprecation handling

- Modernize BrainyInterface to only contain current API methods (add, relate, find, get)
- Update all interface consumers to use modern API patterns
- Make Brainy class implement clean modernized interface
- Update CLI commands to use add() and relate() instead of deprecated methods
- Update all source code components to use modern API consistently
- Update examples and integration tests to modern patterns
- Improve architectural consistency across the entire codebase

BREAKING: BrainyInterface no longer contains deprecated methods
Migration: Use add() instead of addNoun(), relate() instead of addVerb()
This commit is contained in:
David Snelling 2025-09-17 11:54:20 -07:00
parent e311a149df
commit 5be5ea5201
11 changed files with 89 additions and 84 deletions

View file

@ -16,9 +16,9 @@ async function main() {
await brain.init()
// 2. Add some sample data
await brain.addNoun("The quick brown fox", 'Content', { type: "sentence", category: "animals" })
await brain.addNoun("Machine learning models", 'Content', { type: "tech", category: "AI" })
await brain.addNoun("Natural language processing", 'Content', { type: "tech", category: "NLP" })
await brain.add({ data: "The quick brown fox", type: 'content', metadata: { type: "sentence", category: "animals" } })
await brain.add({ data: "Machine learning models", type: 'content', metadata: { type: "tech", category: "AI" } })
await brain.add({ data: "Natural language processing", type: 'content', metadata: { type: "tech", category: "NLP" } })
// 3. Create and register the API Server augmentation
const apiServer = new APIServerAugmentation({