Expand description
Contract-version enforcement (see docs/versioning.md).
Kaptein has three independently-versioned contracts — the MCP tool schema, the
lens (view-definition) schema, and the WIT worlds. Each carries its own
api_version/schema version, bumped independently on a breaking change to that
contract. A release must refuse to load a plugin, lens, or MCP client whose
version it does not support, with a clear migration error — never silently break.
This module is wasm-pure (no kube/tokio), so the browser UI and the headless
agent share the exact same compatibility rule as the native frontends.
Structs§
- ApiVersion
- A contract’s
api_version/schema version, e.g.v1or2.
Constants§
- MCP_
API_ VERSION - The Kaptein MCP tool-schema contract version. Bump the major on an incompatible
tool change (a renamed/removed tool or a changed required argument), per
docs/versioning.md; bump the minor for an additive tool or optional argument. - MCP_
VERSION_ META_ KEY - The
_metakey under which the MCP client declares the contract version it speaks.
Functions§
- is_
compatible - Whether a client/plugin/lens requesting
requestedis supported by a release implementingsupported. - parse_
api_ version - Parse an
api_versionstring such as"1","v1","1.2", or"v1.2".