Install and handshake @modu/contracts
The base publishes a public release tarball (repo delmore7/mesa is public; contracts are Apache-2.0):
- tag:
contracts-v0.7.0 - asset:
modu-contracts-0.7.0.tgz - sha256:
a26283a5180b4f36d5ebafe209a234d4d51abc3b637545a61d3d6a5733907895
Install
npm run contracts:install
The script resolves the release asset through the GitHub API, verifies the pinned SHA256, and runs
npm install --no-save --ignore-scripts on the verified tarball. It never follows latest and does
not modify package.json/the lockfile; *.tgz and node_modules/ are ignored.
A token is optional (MESA_CONTRACTS_TOKEN / GH_TOKEN / GITHUB_TOKEN) and only raises the GitHub
API rate limit; the release asset itself is public. The script never follows latest and always checks
the pinned SHA256.
Handshake
MESA_MODU_BIN=/path/to/modu npm run contracts:handshake
It compares:
- installed
@modu/contractsCONTRACTS_VERSION - base CLI
modu contract --json→versionandschema.pageSpec === 2
A mismatch fails closed (VERSION_MISMATCH / PAGESPEC_MISMATCH / CONTRACTS_NOT_INSTALLED) before
the MCP starts. docs/platform-adapter.md describes the same adapter.
CI
Pro CI currently runs the injected-version handshake tests without network. Integration CI that imports
the real package must first run npm run contracts:install with MESA_CONTRACTS_TOKEN; do not make
the whole CI red when the secret is absent — gate that job separately.
源文件 · mesa-pro/docs/contracts-install.md