diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 6789cd7c4..a0a55bd64 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "dc05c93c024c652c410fb1fb430da4cb7442151b", - "syncedAt": "2026-04-26T10:06:38.964Z" + "sha": "4b2056fcc1e0918b47373614a47fe91b2674edf0", + "syncedAt": "2026-04-26T10:13:11.974Z" } diff --git a/docs/tools/plugin.md b/docs/tools/plugin.md index 822130d2a..4191b72ec 100644 --- a/docs/tools/plugin.md +++ b/docs/tools/plugin.md @@ -90,6 +90,28 @@ Both show up under `openclaw plugins list`. See [Plugin Bundles](/plugins/bundle If you are writing a native plugin, start with [Building Plugins](/plugins/building-plugins) and the [Plugin SDK Overview](/plugins/sdk-overview). +## Package Entrypoints + +Native plugin npm packages must declare `openclaw.extensions` in `package.json`. +Each entry must stay inside the package directory and resolve to a readable +runtime file, or to a TypeScript source file with an inferred built JavaScript +peer such as `src/index.ts` to `dist/index.js`. + +Use `openclaw.runtimeExtensions` when published runtime files do not live at the +same paths as the source entries. When present, `runtimeExtensions` must contain +exactly one entry for every `extensions` entry. Mismatched lists fail install and +plugin discovery rather than silently falling back to source paths. + +```json +{ + "name": "@acme/openclaw-plugin", + "openclaw": { + "extensions": ["./src/index.ts"], + "runtimeExtensions": ["./dist/index.js"] + } +} +``` + ## Official plugins ### Installable (npm)