Skip to content

Commit 8a7f8e5

Browse files
committed
docs(doctor): clarify configured plugin repair
1 parent f7f5050 commit 8a7f8e5

12 files changed

Lines changed: 19 additions & 18 deletions

‎docs/cli/doctor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Notes:
4545
- State integrity checks now detect orphan transcript files in the sessions directory. Archiving them as `.deleted.<timestamp>` requires an interactive confirmation; `--fix`, `--yes`, and headless runs leave them in place.
4646
- Doctor also scans `~/.openclaw/cron/jobs.json` (or `cron.store`) for legacy cron job shapes and can rewrite them in place before the scheduler has to auto-normalize them at runtime.
4747
- On Linux, doctor warns when the user's crontab still runs legacy `~/.openclaw/bin/ensure-whatsapp.sh`; that script is no longer maintained and can log false WhatsApp gateway outages when cron lacks the systemd user-bus environment.
48-
- Doctor cleans legacy plugin dependency staging state created by older OpenClaw versions. It also repairs missing configured downloadable plugins when the registry can resolve them, and the 2026.5.2 doctor pass automatically installs downloadable plugins that an older config already uses before marking the config touched for that release. If the download fails, doctor reports the install error and preserves the configured plugin entry for the next repair attempt.
48+
- Doctor cleans legacy plugin dependency staging state created by older OpenClaw versions. It also repairs missing downloadable plugins that are referenced by config, such as `plugins.entries`, configured channels, configured provider/search settings, or configured agent runtimes. During package updates, doctor skips package-manager plugin repair until the package swap is complete; rerun `openclaw doctor --fix` afterward if a configured plugin still needs recovery. If the download fails, doctor reports the install error and preserves the configured plugin entry for the next repair attempt.
4949
- Doctor repairs stale plugin config by removing missing plugin ids from `plugins.allow`/`plugins.entries`, plus matching dangling channel config, heartbeat targets, and channel model overrides when plugin discovery is healthy.
5050
- Doctor quarantines invalid plugin config by disabling the affected `plugins.entries.<id>` entry and removing its invalid `config` payload. Gateway startup already skips only that bad plugin so other plugins and channels can keep running.
5151
- Set `OPENCLAW_SERVICE_REPAIR_POLICY=external` when another supervisor owns the gateway lifecycle. Doctor still reports gateway/service health and applies non-service repairs, but skips service install/start/restart/bootstrap and legacy service cleanup.

‎docs/cli/plugins.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ directory remains inert so normal packaged installs still use compiled dist.
266266

267267
For runtime hook debugging:
268268

269-
- `openclaw plugins inspect <id> --runtime --json` shows registered hooks and diagnostics from a module-loaded inspection pass. Runtime inspection never installs dependencies; use `openclaw doctor --fix` to clean legacy dependency state or install missing configured downloadable plugins.
269+
- `openclaw plugins inspect <id> --runtime --json` shows registered hooks and diagnostics from a module-loaded inspection pass. Runtime inspection never installs dependencies; use `openclaw doctor --fix` to clean legacy dependency state or recover missing downloadable plugins that are referenced by config.
270270
- `openclaw gateway status --deep --require-rpc` confirms the reachable Gateway, service/process hints, config path, and RPC health.
271271
- Non-bundled conversation hooks (`llm_input`, `llm_output`, `before_agent_finalize`, `agent_end`) require `plugins.entries.<id>.hooks.allowConversationAccess=true`.
272272

‎docs/gateway/doctor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ That stages grounded durable candidates into the short-term dreaming store while
355355
<Accordion title="7b. Plugin install cleanup">
356356
Doctor removes legacy OpenClaw-generated plugin dependency staging state in `openclaw doctor --fix` / `openclaw doctor --repair` mode. This covers stale generated dependency roots, old install-stage directories, package-local debris from earlier bundled-plugin dependency repair code, and orphaned or recovered managed npm copies of bundled `@openclaw/*` plugins that can shadow the current bundled manifest.
357357

358-
Doctor can also reinstall configured downloadable plugins when the config references them but the local plugin registry cannot find them. For the 2026.5.2 bundled-plugin externalization, doctor automatically installs downloadable plugins that the existing config already uses and then relies on `meta.lastTouchedVersion` to run that release pass only once. Gateway startup and config reload do not run package managers; plugin installs remain explicit doctor/install/update work.
358+
Doctor can also reinstall missing downloadable plugins when config references them but the local plugin registry cannot find them. Examples include material `plugins.entries`, configured channel/provider/search settings, and configured agent runtimes. During package updates, doctor avoids running package-manager plugin repair while the core package is being swapped; run `openclaw doctor --fix` again after the update if a configured plugin still needs recovery. Gateway startup and config reload do not run package managers; plugin installs remain explicit doctor/install/update work.
359359

360360
</Accordion>
361361
<Accordion title="8. Gateway service migrations and cleanup hints">

‎docs/plugins/bundles.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ dual-format packages from being partially installed as bundles.
262262
downloadable through the plugin installer. Gateway startup never runs a
263263
package manager for them.
264264
- `openclaw doctor --fix` removes legacy staged dependency directories and can
265-
install configured downloadable plugins that are missing from the local
266-
plugin index.
265+
recover downloadable plugins that are missing from the local plugin index when
266+
config references them.
267267

268268
## Security
269269

‎docs/plugins/dependency-resolution.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ openclaw plugins install <source>
8585
openclaw doctor --fix
8686
```
8787

88-
`doctor --fix` can clean legacy OpenClaw-generated dependency state and install
89-
configured downloadable plugins that are missing from the local install records.
90-
It does not repair dependencies for an already-installed local plugin.
88+
`doctor --fix` can clean legacy OpenClaw-generated dependency state and recover
89+
downloadable plugins that are missing from the local install records when config
90+
references them. Doctor does not repair dependencies for an already-installed
91+
local plugin.
9192

9293
## Bundled plugins
9394

‎src/commands/doctor/repair-sequencing.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ describe("doctor repair sequencing", () => {
363363
it("does not remove deferred configured plugins during the package update doctor pass", async () => {
364364
mocks.repairMissingConfiguredPluginInstalls.mockResolvedValueOnce({
365365
changes: [
366-
'Deferred missing configured plugin "brave" install repair until post-update doctor.',
366+
'Skipped package-manager repair for configured plugin "brave" during package update; rerun "openclaw doctor --fix" after the update completes.',
367367
],
368368
warnings: [],
369369
});
@@ -432,7 +432,7 @@ describe("doctor repair sequencing", () => {
432432
expect(result.state.candidate.plugins?.allow).toEqual(["brave"]);
433433
expect(result.state.candidate.plugins?.entries?.brave?.enabled).toBe(true);
434434
expect(result.changeNotes).toContain(
435-
'Deferred missing configured plugin "brave" install repair until post-update doctor.',
435+
'Skipped package-manager repair for configured plugin "brave" during package update; rerun "openclaw doctor --fix" after the update completes.',
436436
);
437437
});
438438

‎src/commands/doctor/shared/missing-configured-plugin-install.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ describe("repairMissingConfiguredPluginInstalls", () => {
917917
);
918918
expect(result).toEqual({
919919
changes: [
920-
'Deferred missing configured plugin "discord" install repair until post-update doctor.',
920+
'Skipped package-manager repair for configured plugin "discord" during package update; rerun "openclaw doctor --fix" after the update completes.',
921921
],
922922
warnings: [],
923923
});
@@ -969,7 +969,7 @@ describe("repairMissingConfiguredPluginInstalls", () => {
969969
);
970970
expect(result).toEqual({
971971
changes: [
972-
'Deferred missing configured plugin "discord" install repair until post-update doctor.',
972+
'Skipped package-manager repair for configured plugin "discord" during package update; rerun "openclaw doctor --fix" after the update completes.',
973973
],
974974
warnings: [],
975975
});

‎src/commands/doctor/shared/missing-configured-plugin-install.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ async function repairMissingPluginInstalls(params: {
676676
}
677677
delete nextRecords[pluginId];
678678
changes.push(
679-
`Deferred missing configured plugin "${pluginId}" install repair until post-update doctor.`,
679+
`Skipped package-manager repair for configured plugin "${pluginId}" during package update; rerun "openclaw doctor --fix" after the update completes.`,
680680
);
681681
}
682682
}

‎src/commands/doctor/shared/release-configured-plugin-installs.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ describe("configured plugin install release step", () => {
284284
it("does not stamp config during update-time deferred install repair", async () => {
285285
mocks.repairMissingPluginInstallsForIds.mockResolvedValue({
286286
changes: [
287-
'Deferred missing configured plugin "codex" install repair until post-update doctor.',
287+
'Skipped package-manager repair for configured plugin "codex" during package update; rerun "openclaw doctor --fix" after the update completes.',
288288
],
289289
warnings: [],
290290
});
@@ -313,7 +313,7 @@ describe("configured plugin install release step", () => {
313313
);
314314
expect(result).toEqual({
315315
changes: [
316-
'Deferred missing configured plugin "codex" install repair until post-update doctor.',
316+
'Skipped package-manager repair for configured plugin "codex" during package update; rerun "openclaw doctor --fix" after the update completes.',
317317
],
318318
warnings: [],
319319
completed: false,

‎src/flows/doctor-health-contributions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ export function resolveDoctorHealthContributions(): DoctorHealthContribution[] {
650650
}),
651651
createDoctorHealthContribution({
652652
id: "doctor:release-configured-plugin-installs",
653-
label: "Configured plugin installs",
653+
label: "Configured plugin repair",
654654
run: runReleaseConfiguredPluginInstallsHealth,
655655
}),
656656
createDoctorHealthContribution({

0 commit comments

Comments
 (0)