Files
openclaw/src/config/plugin-auto-enable.types.ts
Jack Storment bdd68a75ea fix(doctor): repair configured missing plugins
Fixes #76872.

Doctor now repairs configured-but-missing official plugins during update/doctor recovery, auto-enables the plugin after a successful repair, and preserves config when the download cannot complete. The plugin auto-enable path also honors disabled web search and only enables configured providers/channels when a manifest declares the matching capability.

Verification:
- git diff --check
- fallback-only Korean i18n check
- focused plugin auto-enable/config/doctor Vitest suite
- Crabbox published upgrade-survivor configured-plugin-installs E2E
- CI green on PR head 67ba8ac002

Co-authored-by: Jack Storment <crazycoder131@gmail.com>
2026-05-03 22:44:21 +01:00

57 lines
1.2 KiB
TypeScript

import type { OpenClawConfig } from "./types.openclaw.js";
export type PluginAutoEnableCandidate =
| {
pluginId: string;
kind: "channel-configured";
channelId: string;
}
| {
pluginId: string;
kind: "provider-auth-configured";
providerId: string;
}
| {
pluginId: string;
kind: "provider-model-configured";
modelRef: string;
}
| {
pluginId: string;
kind: "agent-harness-runtime-configured";
runtime: string;
}
| {
pluginId: string;
kind: "web-search-provider-selected";
providerId: string;
}
| {
pluginId: string;
kind: "web-fetch-provider-selected";
providerId: string;
}
| {
pluginId: string;
kind: "plugin-web-search-configured";
}
| {
pluginId: string;
kind: "plugin-web-fetch-configured";
}
| {
pluginId: string;
kind: "plugin-tool-configured";
}
| {
pluginId: string;
kind: "setup-auto-enable";
reason: string;
};
export type PluginAutoEnableResult = {
config: OpenClawConfig;
changes: string[];
autoEnabledReasons: Record<string, string[]>;
};