Plugin SDK
One-line summary
The Plugin SDK is a 543-line re-export aggregation layer that provides a stable public API surface for extension authors, abstracting OpenClaw's internal implementation details.
Responsibilities
- Re-export 150+ types and functions as the stable plugin authoring API
- Provide helpers for HTTP routes, webhooks, media payloads, OAuth, file locking
- Abstract internal module boundaries so plugins don't depend on internal paths
- Enable channel plugin composition and reuse across extensions
Architecture diagram
Key source files
Key exports (categories)
How it connects to other modules
- Depends on:
channels/plugins/,plugins/,gateway/,config/,agents/(re-exports from these) - Depended by: All 38 extensions in
extensions/*/
My blind spots
- Version stability guarantees — is there a semver contract for the SDK?
- Which exports are considered stable vs experimental
- How breaking changes in internal modules propagate to the SDK
Change frequency
index.ts: Medium — new exports added as features ship; removals are rare (backward compatibility)