mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
feat(plugins): narrow CLI loading via activation planning (#65120)
* feat(plugins): narrow cli loading via activation planning * fix(plugins): normalize primary CLI command nullability * fix(plugins): enforce activation planner exhaustiveness
This commit is contained in:
@@ -527,6 +527,9 @@ actual behavior such as hooks, tools, commands, or provider flows.
|
||||
Optional manifest `activation` and `setup` blocks stay on the control plane.
|
||||
They are metadata-only descriptors for activation planning and setup discovery;
|
||||
they do not replace runtime registration, `register(...)`, or `setupEntry`.
|
||||
The first activation consumer now uses manifest command hints to narrow CLI
|
||||
plugin loading when a primary command is known, instead of always loading every
|
||||
CLI-capable plugin up front.
|
||||
|
||||
Setup discovery now prefers descriptor-owned ids such as `setup.providers` and
|
||||
`setup.cliBackends` to narrow candidate plugins before it falls back to
|
||||
|
||||
@@ -221,6 +221,9 @@ should activate it later.
|
||||
|
||||
This block is metadata only. It does not register runtime behavior, and it does
|
||||
not replace `register(...)`, `setupEntry`, or other runtime/plugin entrypoints.
|
||||
Current consumers use it as a narrowing hint before broader plugin loading, so
|
||||
missing activation metadata only costs performance; it should not change
|
||||
correctness.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -242,6 +245,10 @@ not replace `register(...)`, `setupEntry`, or other runtime/plugin entrypoints.
|
||||
| `onRoutes` | No | `string[]` | Route kinds that should activate this plugin. |
|
||||
| `onCapabilities` | No | `Array<"provider" \| "channel" \| "tool" \| "hook">` | Broad capability hints used by control-plane activation planning. |
|
||||
|
||||
For command-triggered planning specifically, OpenClaw still falls back to
|
||||
legacy `commandAliases[].cliCommand` or `commandAliases[].name` when a plugin
|
||||
has not added explicit `activation.onCommands` metadata yet.
|
||||
|
||||
## setup reference
|
||||
|
||||
Use `setup` when setup and onboarding surfaces need cheap plugin-owned metadata
|
||||
|
||||
Reference in New Issue
Block a user