fix(plugins): address review feedback for Matrix recovery paths (#52899)

1. Narrow loadConfigForInstall() to catch only INVALID_CONFIG errors,
   letting real failures (fs permission, OOM) propagate.
2. Assert allow array is properly cleaned in stale-cleanup test.
3. Add comment clarifying version-resolution is already addressed via
   the shared VERSION constant.
4. Run cleanStaleMatrixPluginConfig() during install so
   persistPluginInstall() → writeConfigFile() does not fail validation
   on stale Matrix load paths.
This commit is contained in:
Catalin Lupuleti
2026-03-23 23:25:33 +02:00
committed by Peter Steinberger
parent 3ae100a8d7
commit 489797ceaf
3 changed files with 24 additions and 3 deletions

View File

@@ -184,6 +184,8 @@ export type CreatePluginRuntimeOptions = {
export function createPluginRuntime(_options: CreatePluginRuntimeOptions = {}): PluginRuntime {
const mediaUnderstanding = createRuntimeMediaUnderstandingFacade();
const runtime = {
// Sourced from the shared OpenClaw version resolver (#52899) so plugins
// always see the same version the CLI reports, avoiding API-version drift.
version: VERSION,
config: createRuntimeConfig(),
agent: createRuntimeAgent(),