Contract tests (plugin and channel shape)

Contract tests verify that every registered plugin and channel conforms to its interface contract. They iterate over all discovered plugins and run a suite of shape and behavior assertions. The default pnpm test unit lane intentionally skips these shared seam and smoke files; run the contract commands explicitly when you touch shared channel or provider surfaces.

Commands

Channel contracts

Located in src/messaging/channels/plugins/contracts/*.contract.test.ts. Current top-level categories:

Inbound dispatch-capture and outbound-payload harness helpers used by these suites are exposed internally through src/plugin-sdk/channel-contract-testing.ts (npm-excluded, not a public SDK subpath); there is no standalone inbound.contract.test.ts file in this directory.

Provider contracts

Located in src/extensibility/plugins/contracts/*.contract.test.ts. Current categories include:

When to run

Contract tests run in CI and do not require real API keys.