feat: Critical model availability system with multi-source fallback

- Add Model Guardian for critical path verification
- Implement fallback chain: GitHub → CDN → Hugging Face
- Smart detection for Docker, CI, production contexts
- Pre-download option with npm run download-models
- Runtime download with automatic fallback
- Model integrity verification (size, hash)
- Comprehensive deployment documentation

The transformer model (Xenova/all-MiniLM-L6-v2) is critical for operations.
Without it, users cannot access their data. This system ensures it's always
available through multiple redundant sources.
This commit is contained in:
David Snelling 2025-08-18 18:46:40 -07:00
parent fff35cba05
commit a9c5fd0eeb
10 changed files with 1407 additions and 1 deletions

64
.gitignore vendored Normal file
View file

@ -0,0 +1,64 @@
# Dependencies
node_modules/
.pnp
.pnp.js
# Testing
coverage/
*.lcov
.nyc_output
# Production build
dist/
# Models (downloaded at runtime)
models/
# Runtime data
brainy-data/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# OS files
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# Environment
.env
.env.local
.env.*.local
# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Cache
.npm
.eslintcache
.cache/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Temporary files
*.tmp
*.temp
/tmp/
# Test artifacts
test-results/
tests/results/