feat: add complete silent mode for TUI applications

- Add silent option to BrainyConfig to suppress ALL console output
- Override console methods (log, info, warn, error) when silent=true
- Add LogLevel.SILENT to Logger for proper silent mode support
- Propagate silent mode to all augmentations automatically
- Update augmentation configs to support silent property
- Restore console methods properly on brain.close()
- Perfect for terminal UI applications that need clean output

Usage:
```javascript
const brain = new Brainy({
  storage: { type: 'filesystem', path: './data' },
  silent: true  // Complete silence - zero console output
})
```

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
David Snelling 2025-09-16 13:18:49 -07:00
parent 4d3e21a0f7
commit 27fb3ef905
6 changed files with 74 additions and 10 deletions

View file

@ -18,6 +18,7 @@ export interface CacheConfig {
ttl?: number
enabled?: boolean
invalidateOnWrite?: boolean
silent?: boolean // Silent mode support
}
/**
@ -80,6 +81,11 @@ export class CacheAugmentation extends BaseAugmentation {
type: 'boolean',
default: true,
description: 'Automatically invalidate cache on data modifications'
},
silent: {
type: 'boolean',
default: false,
description: 'Suppress all console output'
}
},
additionalProperties: false