mirror of
https://github.com/dtzp555-max/olp.git
synced 2026-07-19 09:45:07 +00:00
fix(olp-plugin): add openclaw.extensions field for modern OpenClaw v2026.5+ install (#62)
Discovered 2026-05-27 while bringing up Mac mini as OpenClaw client of
PI231 OLP server: `openclaw plugins install ./olp-plugin/` fails with
package.json missing openclaw.extensions; update the plugin package to
include openclaw.extensions (for example ["./dist/index.js"])
OpenClaw v2026.5.22 enforces a stricter plugin-manifest validation than
earlier revisions. The olp-plugin/package.json still used the legacy
schema (`type: "plugin"` + `pluginManifest`) without the new
`extensions: [./index.js]` field that modern OpenClaw requires for the
gateway plugin-discovery loop.
Workaround until this fix lands: manually `cp -R olp-plugin
~/.openclaw/extensions/olp` (symlink also works per docs Option B).
Changes:
- olp-plugin/package.json: added `extensions: ["./index.js"]` to the
openclaw block. Keeps legacy fields (`type`, `id`, `pluginManifest`)
for backwards compat with pre-2026.5 OpenClaw revisions; the modern
loader only reads `extensions`.
- docs/integrations/openclaw.md:
- § 3 Configure: rewrote example to show the modern `plugins.allow` +
`plugins.entries.olp.{enabled, config}` schema. The previous shape
(`plugins.olp.{proxyUrl, apiKey}` at top level) doesn't match what
OpenClaw actually picks up.
- § Known issues: added a paragraph documenting the
`openclaw.extensions` schema-drift event + recovery path (pull latest
OLP, or symlink fallback).
Verified post-fix: `openclaw plugins install ./olp-plugin/` succeeds on
Mac mini OpenClaw v2026.5.22.
Authority:
- Reproduced live on Mac mini 2026-05-27 during PI231-as-server topology
bring-up
- OpenClaw stock plugin format (sample: `/opt/homebrew/lib/node_modules/
openclaw/dist/extensions/anthropic/package.json` uses `extensions:
["./index.js"]`)
Co-authored-by: dtzp555 <dtzp555@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -60,16 +60,22 @@ Capture the printed plaintext token — it is shown exactly once.
|
|||||||
|
|
||||||
### 3. Configure
|
### 3. Configure
|
||||||
|
|
||||||
Edit `~/.openclaw/openclaw.json`:
|
Edit `~/.openclaw/openclaw.json` — register the plugin in both `plugins.allow` and `plugins.entries` (the modern OpenClaw schema; older revisions of this doc only listed `plugins.olp`, which is not picked up):
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
"allow": ["...", "olp"],
|
||||||
|
"entries": {
|
||||||
"olp": {
|
"olp": {
|
||||||
|
"enabled": true,
|
||||||
|
"config": {
|
||||||
"proxyUrl": "http://127.0.0.1:4567",
|
"proxyUrl": "http://127.0.0.1:4567",
|
||||||
"apiKey": "olp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
"apiKey": "olp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -87,6 +93,8 @@ The plugin is now active. Try `/olp help` in your bot's chat.
|
|||||||
plugin discovery at gateway start. `openclaw plugins reload` does not
|
plugin discovery at gateway start. `openclaw plugins reload` does not
|
||||||
guarantee a fresh import of the plugin module.
|
guarantee a fresh import of the plugin module.
|
||||||
|
|
||||||
|
- **OpenClaw v2026.5+ requires `openclaw.extensions` in `package.json`.** OpenClaw versions ≥ 2026.5.22 enforce a stricter plugin-manifest validation at `openclaw plugins install` time. If `Option A` fails with `package.json missing openclaw.extensions` despite recent OLP releases, your local `olp-plugin/package.json` may predate the v0.5.x fix that adds `"extensions": ["./index.js"]` to the `openclaw` block. Pull latest OLP main (`git pull` in your OLP clone) and retry, or fall through to `Option B` symlink which works against any plugin shape. (Original drift event: 2026-05-27, see commit history of `olp-plugin/package.json`.)
|
||||||
|
|
||||||
- **Owner key revocation kicks the plugin out immediately.** If you revoke
|
- **Owner key revocation kicks the plugin out immediately.** If you revoke
|
||||||
the bot's owner key (`npx olp-keys revoke --id=<id>`), the next `/olp
|
the bot's owner key (`npx olp-keys revoke --id=<id>`), the next `/olp
|
||||||
status` will return `401 unauthorized`. Mint a replacement key with a
|
status` will return `401 unauthorized`. Mint a replacement key with a
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"openclaw": {
|
"openclaw": {
|
||||||
"type": "plugin",
|
"type": "plugin",
|
||||||
"id": "olp",
|
"id": "olp",
|
||||||
"pluginManifest": "openclaw.plugin.json"
|
"pluginManifest": "openclaw.plugin.json",
|
||||||
|
"extensions": ["./index.js"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user