mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:40:44 +00:00
feat(onboarding): auto-install missing provider and channel plugins
Squash-merge PR 70012.
This commit is contained in:
@@ -559,13 +559,27 @@ Important examples:
|
||||
| `openclaw.install.npmSpec` / `openclaw.install.localPath` | Install/update hints for bundled and externally published plugins. |
|
||||
| `openclaw.install.defaultChoice` | Preferred install path when multiple install sources are available. |
|
||||
| `openclaw.install.minHostVersion` | Minimum supported OpenClaw host version, using a semver floor like `>=2026.3.22`. |
|
||||
| `openclaw.install.expectedIntegrity` | Expected npm dist integrity string such as `sha512-...`; install and update flows verify the fetched artifact against it. |
|
||||
| `openclaw.install.allowInvalidConfigRecovery` | Allows a narrow bundled-plugin reinstall recovery path when config is invalid. |
|
||||
| `openclaw.startup.deferConfiguredChannelFullLoadUntilAfterListen` | Lets setup-only channel surfaces load before the full channel plugin during startup. |
|
||||
|
||||
Manifest metadata decides which provider/channel/setup choices appear in
|
||||
onboarding before runtime loads. `package.json#openclaw.install` tells
|
||||
onboarding how to fetch or enable that plugin when the user picks one of those
|
||||
choices. Do not move install hints into `openclaw.plugin.json`.
|
||||
|
||||
`openclaw.install.minHostVersion` is enforced during install and manifest
|
||||
registry loading. Invalid values are rejected; newer-but-valid values skip the
|
||||
plugin on older hosts.
|
||||
|
||||
Exact npm version pinning already lives in `npmSpec`, for example
|
||||
`"npmSpec": "@wecom/wecom-openclaw-plugin@1.2.3"`. Pair that with
|
||||
`expectedIntegrity` when you want update flows to fail closed if the fetched
|
||||
npm artifact no longer matches the pinned release. Interactive onboarding only
|
||||
offers npm install choices from trusted catalog metadata when `npmSpec` is an
|
||||
exact version and `expectedIntegrity` is present; otherwise it falls back to a
|
||||
local source or skip.
|
||||
|
||||
Channel plugins should provide `openclaw.setupEntry` when status, channel list,
|
||||
or SecretRef scans need to identify configured accounts without loading the full
|
||||
runtime. The setup entry should expose channel metadata plus setup-safe config,
|
||||
|
||||
@@ -70,14 +70,14 @@ fields are required. The canonical publish snippets live in
|
||||
|
||||
### `openclaw` fields
|
||||
|
||||
| Field | Type | Description |
|
||||
| ------------ | ---------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| `extensions` | `string[]` | Entry point files (relative to package root) |
|
||||
| `setupEntry` | `string` | Lightweight setup-only entry (optional) |
|
||||
| `channel` | `object` | Channel catalog metadata for setup, picker, quickstart, and status surfaces |
|
||||
| `providers` | `string[]` | Provider ids registered by this plugin |
|
||||
| `install` | `object` | Install hints: `npmSpec`, `localPath`, `defaultChoice`, `minHostVersion`, `allowInvalidConfigRecovery` |
|
||||
| `startup` | `object` | Startup behavior flags |
|
||||
| Field | Type | Description |
|
||||
| ------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `extensions` | `string[]` | Entry point files (relative to package root) |
|
||||
| `setupEntry` | `string` | Lightweight setup-only entry (optional) |
|
||||
| `channel` | `object` | Channel catalog metadata for setup, picker, quickstart, and status surfaces |
|
||||
| `providers` | `string[]` | Provider ids registered by this plugin |
|
||||
| `install` | `object` | Install hints: `npmSpec`, `localPath`, `defaultChoice`, `minHostVersion`, `expectedIntegrity`, `allowInvalidConfigRecovery` |
|
||||
| `startup` | `object` | Startup behavior flags |
|
||||
|
||||
### `openclaw.channel`
|
||||
|
||||
@@ -155,11 +155,37 @@ Example:
|
||||
| `localPath` | `string` | Local development or bundled install path. |
|
||||
| `defaultChoice` | `"npm"` \| `"local"` | Preferred install source when both are available. |
|
||||
| `minHostVersion` | `string` | Minimum supported OpenClaw version in the form `>=x.y.z`. |
|
||||
| `expectedIntegrity` | `string` | Expected npm dist integrity string, usually `sha512-...`, for pinned installs. |
|
||||
| `allowInvalidConfigRecovery` | `boolean` | Lets bundled-plugin reinstall flows recover from specific stale-config failures. |
|
||||
|
||||
Interactive onboarding also uses `openclaw.install` for install-on-demand
|
||||
surfaces. If your plugin exposes provider auth choices or channel setup/catalog
|
||||
metadata before runtime loads, onboarding can show that choice, prompt for npm
|
||||
vs local install, install or enable the plugin, then continue the selected
|
||||
flow. Npm onboarding choices require trusted catalog metadata with an exact
|
||||
`npmSpec` version and `expectedIntegrity`; unpinned package names and dist-tags
|
||||
are not offered for automatic onboarding installs. Keep the "what to show"
|
||||
metadata in `openclaw.plugin.json` and the "how to install it" metadata in
|
||||
`package.json`.
|
||||
|
||||
If `minHostVersion` is set, install and manifest-registry loading both enforce
|
||||
it. Older hosts skip the plugin; invalid version strings are rejected.
|
||||
|
||||
For pinned npm installs, keep the exact version in `npmSpec` and add the
|
||||
expected artifact integrity:
|
||||
|
||||
```json
|
||||
{
|
||||
"openclaw": {
|
||||
"install": {
|
||||
"npmSpec": "@wecom/wecom-openclaw-plugin@1.2.3",
|
||||
"expectedIntegrity": "sha512-REPLACE_WITH_NPM_DIST_INTEGRITY",
|
||||
"defaultChoice": "npm"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`allowInvalidConfigRecovery` is not a general bypass for broken configs. It is
|
||||
for narrow bundled-plugin recovery only, so reinstall/setup can repair known
|
||||
upgrade leftovers like a missing bundled plugin path or stale `channels.<id>`
|
||||
|
||||
Reference in New Issue
Block a user