Skip to main content

Module versioned

Module versioned 

Source
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. v1 or 2.

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 _meta key under which the MCP client declares the contract version it speaks.

Functions§

is_compatible
Whether a client/plugin/lens requesting requested is supported by a release implementing supported.
parse_api_version
Parse an api_version string such as "1", "v1", "1.2", or "v1.2".