docs/plugins/sdk-subpaths.md
The plugin SDK is exposed as a set of narrow subpaths under openclaw/plugin-sdk/.
This page catalogs the commonly used subpaths grouped by purpose. The generated
full list of 200+ subpaths lives in scripts/lib/plugin-sdk-entrypoints.json;
reserved bundled-plugin helper subpaths appear there but are implementation
detail unless a doc page explicitly promotes them. Maintainers can audit active
reserved helper subpaths with pnpm plugins:boundary-report:summary; unused
reserved helper exports fail the CI report instead of staying in the public SDK
as dormant compatibility debt.
For the plugin authoring guide, see Plugin SDK overview.
| Subpath | Key exports |
|---|---|
plugin-sdk/plugin-entry | definePluginEntry |
plugin-sdk/core | defineChannelPluginEntry, createChatChannelPlugin, createChannelPluginBase, defineSetupPluginEntry, buildChannelConfigSchema, buildJsonChannelConfigSchema |
plugin-sdk/config-schema | OpenClawSchema |
plugin-sdk/provider-entry | defineSingleProviderPluginEntry |
plugin-sdk/testing | Broad compatibility barrel for legacy plugin tests; prefer focused test subpaths for new extension tests |
plugin-sdk/plugin-test-api | Minimal OpenClawPluginApi mock builder for direct plugin registration unit tests |
plugin-sdk/agent-runtime-test-contracts | Native agent-runtime adapter contract fixtures for auth profiles, delivery suppression, fallback classification, tool hooks, prompt overlays, schemas, and transcript repair |
plugin-sdk/channel-test-helpers | Channel account lifecycle, directory, send-config, runtime mock, hook, bundled channel entry, envelope timestamp, pairing reply, and generic channel contract test helpers |
plugin-sdk/channel-target-testing | Shared channel target-resolution error-case test suite |
plugin-sdk/plugin-test-contracts | Plugin registration, package manifest, public artifact, runtime API, import side-effect, and direct import contract helpers |
plugin-sdk/plugin-test-runtime | Plugin runtime, registry, provider-registration, setup-wizard, and runtime task-flow fixtures for tests |
plugin-sdk/provider-test-contracts | Provider runtime, auth, discovery, onboard, catalog, media capability, replay policy, realtime STT live-audio, web-search/fetch, and wizard contract helpers |
plugin-sdk/provider-http-test-mocks | Opt-in Vitest HTTP/auth mocks for provider tests that exercise plugin-sdk/provider-http |
plugin-sdk/test-env | Test environment, fetch/network, disposable HTTP server, incoming request, live-test, temporary filesystem, and time-control fixtures |
plugin-sdk/test-fixtures | Generic CLI, sandbox, skill, agent-message, system-event, module reload, bundled plugin path, terminal, chunking, auth-token, and typed-case test fixtures |
plugin-sdk/test-node-mocks | Focused Node builtin mock helpers for use inside Vitest vi.mock("node:*") factories |
plugin-sdk/migration | Migration provider item helpers such as createMigrationItem, reason constants, item status markers, redaction helpers, and summarizeMigrationItems |
plugin-sdk/migration-runtime | Runtime migration helpers such as copyMigrationFileItem, withCachedMigrationConfigRuntime, and writeMigrationReport |