feat(mcp): scaffold Go module under mcp/ for Claude Desktop bundle
Add a new top-level mcp/ Go module that will host the Claude Desktop MCPB server. U1 of the Claude Desktop .mcpb bundle plan: scaffold only, no behavior yet. - mcp/go.mod targets Go 1.22+ with mark3labs/mcp-go as the planned dependency (added in U3 when the server wiring lands). - mcp/scripts/sync-engine.sh mirrors skills/last30days/scripts/ into mcp/vendored/ before each build, keeping the Code skill and Desktop bundle on the same engine source. - Root .gitignore excludes mcp/vendored/ and mcp/build/ so the engine mirror and cross-compiled binaries stay local.
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Mirrors skills/last30days/scripts/{last30days.py,lib/} into mcp/vendored/
|
||||
# so the Go binary's embed.FS captures the engine at build time.
|
||||
#
|
||||
# Source of truth: skills/last30days/scripts/. Never edit mcp/vendored/ directly.
|
||||
# Run before `go build` locally and in CI before `printing-press bundle`.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
MCP_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
REPO_ROOT="$(cd "${MCP_DIR}/.." && pwd)"
|
||||
ENGINE_SRC="${REPO_ROOT}/skills/last30days/scripts"
|
||||
VENDORED="${MCP_DIR}/vendored"
|
||||
|
||||
if [ ! -f "${ENGINE_SRC}/last30days.py" ]; then
|
||||
echo "sync-engine: ${ENGINE_SRC}/last30days.py not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf "${VENDORED}"
|
||||
mkdir -p "${VENDORED}"
|
||||
|
||||
# Copy the entry script and the lib/ tree (modules + lib/vendor/).
|
||||
cp "${ENGINE_SRC}/last30days.py" "${VENDORED}/last30days.py"
|
||||
cp -R "${ENGINE_SRC}/lib" "${VENDORED}/lib"
|
||||
|
||||
# Strip caches so the embed.FS stays deterministic.
|
||||
find "${VENDORED}" -type d -name "__pycache__" -prune -exec rm -rf {} +
|
||||
find "${VENDORED}" -type f -name "*.pyc" -delete
|
||||
|
||||
echo "sync-engine: vendored engine at ${VENDORED}"
|
||||
Reference in New Issue
Block a user