diff --git a/CHANGELOG.md b/CHANGELOG.md index b9725795c0a..72db989413a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Docs: https://docs.openclaw.ai - Plugins/CLI: make plugin install and uninstall config writes conflict-aware, clear stale denylist entries on explicit reinstall/removal, and delete managed plugin files only after config/index commit succeeds. Thanks @codex. - Plugins: fail `plugins update` when tracked plugin or hook updates error, keep bundled runtime-dependency repair behind restrictive allowlists, and reject package installs with unloadable extension entries. Thanks @codex. - Gateway/chat: keep duplicate attachment-backed `chat.send` retries with the same idempotency key on the documented in-flight path so aborts still target the real active run. Fixes #70139. Thanks @Feelw00. +- Plugins: share package entrypoint resolution between install and discovery, reject mismatched `runtimeExtensions`, and cache bundled runtime-dependency manifest reads during scans. Thanks @codex. ## 2026.4.26 diff --git a/docs/tools/plugin.md b/docs/tools/plugin.md index 822130d2a9e..4191b72ec8f 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)