integrations/cli/ and integrations/mcp-server/ each vendor byte-identical copies of:
runtime/protocol/openphone-runtime-tools.mjs
runtime/protocol/openphone-commands.json
integrations/adb/openphone-adb-transport.mjs
Drift is prevented only by tests/integrations/runtime-package-contract.mjs, which enforces byte-equality across copies.
Fix
Extract @openphone/runtime-protocol as a package in an npm workspace:
packages/runtime-protocol/ — the source of truth.
integrations/cli/, integrations/mcp-server/ depend on it via workspace protocol ("@openphone/runtime-protocol": "workspace:*").
prepack on the leaf packages copies or bundles the shared files so npm pack still produces self-contained tarballs (the existing contract test already proves this constraint).
Retire the byte-equality contract test in favor of a single-source dependency.
Size: M
integrations/cli/andintegrations/mcp-server/each vendor byte-identical copies of:runtime/protocol/openphone-runtime-tools.mjsruntime/protocol/openphone-commands.jsonintegrations/adb/openphone-adb-transport.mjsDrift is prevented only by
tests/integrations/runtime-package-contract.mjs, which enforces byte-equality across copies.Fix
Extract
@openphone/runtime-protocolas a package in an npm workspace:packages/runtime-protocol/— the source of truth.integrations/cli/,integrations/mcp-server/depend on it via workspace protocol ("@openphone/runtime-protocol": "workspace:*").prepackon the leaf packages copies or bundles the shared files sonpm packstill produces self-contained tarballs (the existing contract test already proves this constraint).Retire the byte-equality contract test in favor of a single-source dependency.
Size: M