refactor: move plugin setup and memory capabilities to registries

This commit is contained in:
Peter Steinberger
2026-04-05 14:43:29 +01:00
parent 695c9c887b
commit 629baf5fa7
76 changed files with 1300 additions and 298 deletions

View File

@@ -26,6 +26,9 @@ export type BuildPluginApiParams = {
| "registerCli"
| "registerService"
| "registerCliBackend"
| "registerConfigMigration"
| "registerLegacyConfigMigration"
| "registerAutoEnableProbe"
| "registerProvider"
| "registerSpeechProvider"
| "registerRealtimeTranscriptionProvider"
@@ -56,6 +59,10 @@ const noopRegisterGatewayMethod: OpenClawPluginApi["registerGatewayMethod"] = ()
const noopRegisterCli: OpenClawPluginApi["registerCli"] = () => {};
const noopRegisterService: OpenClawPluginApi["registerService"] = () => {};
const noopRegisterCliBackend: OpenClawPluginApi["registerCliBackend"] = () => {};
const noopRegisterConfigMigration: OpenClawPluginApi["registerConfigMigration"] = () => {};
const noopRegisterLegacyConfigMigration: OpenClawPluginApi["registerLegacyConfigMigration"] =
() => {};
const noopRegisterAutoEnableProbe: OpenClawPluginApi["registerAutoEnableProbe"] = () => {};
const noopRegisterProvider: OpenClawPluginApi["registerProvider"] = () => {};
const noopRegisterSpeechProvider: OpenClawPluginApi["registerSpeechProvider"] = () => {};
const noopRegisterRealtimeTranscriptionProvider: OpenClawPluginApi["registerRealtimeTranscriptionProvider"] =
@@ -104,6 +111,10 @@ export function buildPluginApi(params: BuildPluginApiParams): OpenClawPluginApi
registerCli: handlers.registerCli ?? noopRegisterCli,
registerService: handlers.registerService ?? noopRegisterService,
registerCliBackend: handlers.registerCliBackend ?? noopRegisterCliBackend,
registerConfigMigration: handlers.registerConfigMigration ?? noopRegisterConfigMigration,
registerLegacyConfigMigration:
handlers.registerLegacyConfigMigration ?? noopRegisterLegacyConfigMigration,
registerAutoEnableProbe: handlers.registerAutoEnableProbe ?? noopRegisterAutoEnableProbe,
registerProvider: handlers.registerProvider ?? noopRegisterProvider,
registerSpeechProvider: handlers.registerSpeechProvider ?? noopRegisterSpeechProvider,
registerRealtimeTranscriptionProvider: