2026-01-25 01:31:03 -06:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
|
|
const { spawn } = require('child_process');
|
|
|
|
|
const path = require('path');
|
2026-01-26 23:48:23 -06:00
|
|
|
const fs = require('fs');
|
2026-01-25 01:31:03 -06:00
|
|
|
const os = require('os');
|
|
|
|
|
|
|
|
|
|
const platform = os.platform();
|
2026-01-25 01:44:11 -06:00
|
|
|
const binaryName = platform === 'win32' ? 'vestige-mcp.exe' : 'vestige-mcp';
|
2026-01-26 23:48:23 -06:00
|
|
|
const binaryPath = path.join(__dirname, binaryName);
|
|
|
|
|
|
|
|
|
|
if (!fs.existsSync(binaryPath)) {
|
|
|
|
|
console.error('Error: vestige-mcp binary not found.');
|
|
|
|
|
console.error(`Expected at: ${binaryPath}`);
|
|
|
|
|
console.error('');
|
fix: v2.0.1 release — fix broken installs, CI, security, and docs
Critical fixes:
- npm postinstall.js: BINARY_VERSION '1.1.3' → '2.0.1' (every install was 404ing)
- npm package name: corrected error messages to 'vestige-mcp-server'
- README: npm install command pointed to wrong package
- MSRV: bumped from 1.85 to 1.91 (uses floor_char_boundary from 1.91)
- CI: removed stale 'develop' branch from test.yml triggers
Security hardening:
- CSP: restricted connect-src from wildcard 'ws: wss:' to localhost-only
- Added X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy headers
- Added frame-ancestors 'none', base-uri 'self', form-action 'self' to CSP
- Capped retention_distribution endpoint from 10k to 1k nodes
- Added debug logging for WebSocket connections without Origin header
Maintenance:
- All clippy warnings fixed (58 total: redundant closures, collapsible ifs, no-op casts)
- All versions harmonized to 2.0.1 across Cargo.toml and package.json
- CLAUDE.md updated to match v2.0.1 (21 tools, 29 modules, 1238 tests)
- docs/CLAUDE-SETUP.md updated deprecated function names
- License corrected to AGPL-3.0-only in root package.json
1,238 tests passing, 0 clippy warnings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 20:20:14 -06:00
|
|
|
console.error('Try reinstalling: npm install -g vestige-mcp-server');
|
2026-01-26 23:48:23 -06:00
|
|
|
process.exit(1);
|
|
|
|
|
}
|
2026-01-25 01:31:03 -06:00
|
|
|
|
|
|
|
|
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
|
|
|
stdio: 'inherit',
|
|
|
|
|
});
|
|
|
|
|
|
2026-01-26 23:48:23 -06:00
|
|
|
child.on('error', (err) => {
|
|
|
|
|
console.error('Failed to start vestige-mcp:', err.message);
|
|
|
|
|
process.exit(1);
|
|
|
|
|
});
|
|
|
|
|
|
2026-01-25 01:31:03 -06:00
|
|
|
child.on('exit', (code) => {
|
|
|
|
|
process.exit(code ?? 0);
|
|
|
|
|
});
|