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-03-03 19:07:39 +00:00
|
|
|
echo "==> Running unit tests..."
|
|
|
|
|
pnpm test:run
|
|
|
|
|
echo ""
|
|
|
|
|
|
2026-02-21 14:00:24 +00:00
|
|
|
echo "==> Building TypeScript..."
|
|
|
|
|
pnpm build
|
|
|
|
|
|
2026-02-27 17:05:05 +00:00
|
|
|
echo "==> Generating shell completions..."
|
|
|
|
|
pnpm completions:generate
|
|
|
|
|
|
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-26 00:06:31 +00:00
|
|
|
|
|
|
|
|
# Ink optionally imports react-devtools-core which isn't installed.
|
|
|
|
|
# Provide a no-op stub so bun can bundle it (it's only invoked when DEV=true).
|
|
|
|
|
if [ ! -e node_modules/react-devtools-core ]; then
|
|
|
|
|
ln -s ../src/cli/stubs/react-devtools-core node_modules/react-devtools-core
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl
|
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"
|