fix: use native fetch instead of node-fetch dependency

- Removed unnecessary node-fetch import from bin/brainy.js
- Removed node-fetch import from brainy-mcp-server.js
- Native fetch available since Node 18, brainy requires Node 24.4.0+
- Reduces dependencies by 6 packages
- Avoids indirect deprecation warning from boolean package
- No impact on browser compatibility (CLI is Node-only, core library unaffected)

Architecture notes:
- Brain Cloud integration remains as augmentation option
- Users can choose: local (free), Brain Cloud (9/mo), or self-host
- Clean separation maintained: brainy (MIT) vs Brain Cloud (proprietary)
- TODO: Consider extracting Brain Cloud specific URLs to config
This commit is contained in:
David Snelling 2025-08-10 11:32:59 -07:00
parent b7a4889751
commit 00d96943b6
4 changed files with 4 additions and 106 deletions

View file

@ -14,8 +14,7 @@ import { readFileSync } from 'fs'
import { dirname, join } from 'path'
import { fileURLToPath } from 'url'
// Import fetch for API calls
import fetch from 'node-fetch'
// Use native fetch (available in Node.js 18+)
const __dirname = dirname(fileURLToPath(import.meta.url))
const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'))