2026-02-21 14:00:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
|
|
|
cd "$PROJECT_ROOT"
|
|
|
|
|
|
2026-02-21 14:04:07 +00:00
|
|
|
# Load .env if present
|
|
|
|
|
if [ -f .env ]; then
|
|
|
|
|
set -a; source .env; set +a
|
|
|
|
|
fi
|
2026-02-21 14:00:24 +00:00
|
|
|
|
feat: implement v2 3-tier architecture (mcpctl → mcplocal → mcpd)
- Rename local-proxy to mcplocal with HTTP server, LLM pipeline, mcpd discovery
- Add LLM pre-processing: token estimation, filter cache, metrics, Gemini CLI + DeepSeek providers
- Add mcpd auth (login/logout) and MCP proxy endpoints
- Update CLI: dual URLs (mcplocalUrl/mcpdUrl), auth commands, --direct flag
- Add tiered health monitoring, shell completions, e2e integration tests
- 57 test files, 597 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:42:06 +00:00
|
|
|
# Ensure tools are on PATH
|
|
|
|
|
export PATH="$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH"
|
|
|
|
|
|
2026-02-21 14:00:24 +00:00
|
|
|
echo "==> Building TypeScript..."
|
|
|
|
|
pnpm build
|
|
|
|
|
|
2026-02-22 22:24:35 +00:00
|
|
|
echo "==> Bundling standalone binaries..."
|
2026-02-21 14:00:24 +00:00
|
|
|
mkdir -p dist
|
2026-02-22 22:24:35 +00:00
|
|
|
rm -f dist/mcpctl dist/mcpctl-local dist/mcpctl-*.rpm
|
2026-02-25 23:56:23 +00:00
|
|
|
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl --external react-devtools-core
|
2026-02-22 22:24:35 +00:00
|
|
|
bun build src/mcplocal/src/main.ts --compile --outfile dist/mcpctl-local
|
2026-02-21 14:00:24 +00:00
|
|
|
|
|
|
|
|
echo "==> Packaging RPM..."
|
|
|
|
|
nfpm pkg --packager rpm --target dist/
|
|
|
|
|
|
|
|
|
|
RPM_FILE=$(ls dist/mcpctl-*.rpm 2>/dev/null | head -1)
|
|
|
|
|
echo "==> Built: $RPM_FILE"
|
|
|
|
|
echo " Size: $(du -h "$RPM_FILE" | cut -f1)"
|
|
|
|
|
rpm -qpi "$RPM_FILE"
|