mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 19:41:33 +00:00
fix(plugins): preserve settings for compatibility IDs (#114521)
Honor canonical plugin identity across allowlists, denylists, and plugin mutations. Preserve and deterministically deep-merge alias configuration, and explicitly persist canonical entries in CLI enable and disable commands. Closes #114320 Co-authored-by: kevin2966n <147227108+kevin2966n@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
521f45592e
commit
dd472deab4
@@ -232,6 +232,11 @@ async function runPluginsEnableCommandUnlocked(idInput: string): Promise<void> {
|
||||
await replaceConfigFile({
|
||||
nextConfig: next,
|
||||
...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
|
||||
// Source/runtime projection must retain the explicitly merged canonical
|
||||
// entry; otherwise compatibility-only nested settings are silently lost.
|
||||
writeOptions: {
|
||||
explicitSetPaths: [["plugins", "entries", enableResult.pluginId]],
|
||||
},
|
||||
});
|
||||
await refreshPluginRegistryAfterConfigMutation({
|
||||
config: next,
|
||||
@@ -276,6 +281,11 @@ async function runPluginsDisableCommandUnlocked(idInput: string): Promise<void>
|
||||
await replaceConfigFile({
|
||||
nextConfig: next,
|
||||
...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}),
|
||||
// `id` was normalized before discovery; persist that same canonical entry
|
||||
// so alias invocations cannot lose settings during source projection.
|
||||
writeOptions: {
|
||||
explicitSetPaths: [["plugins", "entries", id]],
|
||||
},
|
||||
});
|
||||
await refreshPluginRegistryAfterConfigMutation({
|
||||
config: next,
|
||||
|
||||
Reference in New Issue
Block a user