docs/plugins/compatibility.md
OpenClaw keeps older plugin contracts wired through named compatibility adapters before removing them. This protects existing bundled and external plugins while the SDK, manifest, setup, config, and agent runtime contracts evolve.
Plugin compatibility contracts are tracked in the core registry at
src/plugins/compat/registry.ts.
Each record has:
active, deprecated, removal-pending, or removedThe registry is the source for maintainer planning and future plugin inspector checks. If a plugin-facing behavior changes, add or update the compatibility record in the same change that adds the adapter.
Doctor repair and migration compatibility is tracked separately at
src/commands/doctor/shared/deprecation-compat.ts. Those records cover old
config shapes, install-ledger layouts, and repair shims that may need to stay
available after the runtime compatibility path is removed.
Release sweeps should check both registries. Do not delete a doctor migration just because the matching runtime or config compatibility record expired; first verify there is no supported upgrade path that still needs the repair. Also revalidate each replacement annotation during release planning because plugin ownership and config footprint can change as providers and channels move out of core.
The plugin inspector should live outside the core OpenClaw repo as a separate package/repository backed by the versioned compatibility and manifest contracts.
The day-one CLI should be:
openclaw-plugin-inspector ./my-plugin
It should emit:
Use --json for stable machine-readable output in CI annotations. OpenClaw
core should expose contracts and fixtures the inspector can consume, but should
not publish the inspector binary from the main openclaw package.
Use Blacksmith Testbox for the installable-package acceptance lane when validating the external inspector against OpenClaw plugin packages. Run it from a clean OpenClaw checkout after the package is built:
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
blacksmith testbox run --id <tbx_id> "pnpm install && pnpm build && npm exec --yes @openclaw/[email protected] -- ./extensions/telegram --json"
blacksmith testbox run --id <tbx_id> "npm exec --yes @openclaw/[email protected] -- ./extensions/discord --json"
blacksmith testbox run --id <tbx_id> "npm exec --yes @openclaw/[email protected] -- <clawhub-plugin-dir> --json"
blacksmith testbox stop <tbx_id>
Keep this lane opt-in for maintainers because it installs an external npm package and may inspect plugin packages cloned outside the repo. The local repo guards cover the SDK export map, compatibility registry metadata, deprecated SDK-import burn-down, and bundled extension import boundaries; Testbox inspector proof covers the package as external plugin authors consume it.
OpenClaw should not remove a documented plugin contract in the same release that introduces its replacement.
The migration sequence is:
Deprecated records must include a warning start date, replacement, docs link,
and final removal date no more than three months after the warning starts. Do
not add a deprecated compatibility path with an open-ended removal window unless
maintainers explicitly decide it is permanent compatibility and mark it active
instead.
Current compatibility records include:
openclaw/plugin-sdk/compatbefore_agent_startactivate(api) plugin entrypoints while plugins migrate to
register(api)openclaw/extension-api,
openclaw/plugin-sdk/channel-runtime, openclaw/plugin-sdk/command-auth
status builders, openclaw/plugin-sdk/test-utils (replaced by focused
openclaw/plugin-sdk/* test subpaths), and the ClawdbotConfig /
OpenClawSchemaType type aliasesapi.runtime.taskFlow,
api.runtime.subagent.getSession, api.runtime.stt, and deprecated
api.runtime.config.loadConfig() / api.runtime.config.writeConfigFile(...)registerMemoryCapabilityopenclaw/plugin-sdk/channel-routesetup-api runtime fallback while setup descriptors move to cold
setup.requiresRuntime: false metadatadiscovery hooks while provider catalog hooks move to
catalog.run(...)showConfigured / showInSetup metadata while channel packages move
to openclaw.channel.exposureagentRuntimechannelConfigs metadata landsopenclaw plugins registry --refresh and
openclaw doctor --fixplugins.entries.<plugin>.configplugins.installs authored config and bundled plugin load-path
aliases while install metadata moves into the state-managed plugin ledgerNew plugin code should prefer the replacement listed in the registry and in the specific migration guide. Existing plugins can keep using a compatibility path until the docs, diagnostics, and release notes announce a removal window.
Release notes should include upcoming plugin deprecations with target dates and
links to migration docs. That warning needs to happen before a compatibility
path moves to removal-pending or removed.