diff --git a/CHANGELOG.md b/CHANGELOG.md index 13b7921e8d6..c231174500e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Docs: https://docs.openclaw.ai - Plugins/startup: pass the Gateway `PluginLookUpTable` through plugin loading so auto-enable checks and startup-scope fallback reuse the same manifest registry instead of doing another manifest pass. Thanks @shakkernerd. - Plugins/startup: carry the Gateway `PluginLookUpTable` into deferred channel full-runtime reloads so post-listen startup does not rebuild manifest metadata after the provisional setup-runtime load. Thanks @shakkernerd. - Gateway/startup: extend `OPENCLAW_GATEWAY_STARTUP_TRACE=1` with per-phase event-loop delay plus plugin lookup-table timing and count metrics for installed-index, manifest, startup-plan, and owner-map work, and include the new timing fields in startup benchmark summaries. Thanks @shakkernerd. +- Plugins/channels: resolve read-only channel command defaults from one plugin index plus manifest pass instead of reloading plugin metadata while checking candidate plugin enablement. Thanks @shakkernerd. - Plugins/registry: resolve lookup-table owner maps for providers, CLI backends, setup providers, command aliases, model catalogs, channel configs, and manifest contracts while preserving setup-only CLI backend ownership. Thanks @shakkernerd. - Process/Windows: decode command stdout and stderr from raw bytes with console-codepage awareness, while preserving valid UTF-8 output and multibyte characters split across chunks. Fixes #50519. Thanks @iready, @kevinten10, @zhangyongjie1997, @knightplat-blip, @heiqishi666, and @slepybear. - Bonjour/Windows: hide the bundled mDNS advertiser's Windows ARP shell probe so Gateway startup no longer flashes command-prompt windows. Fixes #70238. Thanks @alexandre-leng, @PratikRai0101, @infinitypacific, and @tomerpeled. diff --git a/src/channels/plugins/read-only-command-defaults.ts b/src/channels/plugins/read-only-command-defaults.ts index 17ef8265ebf..470a95519d4 100644 --- a/src/channels/plugins/read-only-command-defaults.ts +++ b/src/channels/plugins/read-only-command-defaults.ts @@ -1,10 +1,9 @@ import type { OpenClawConfig } from "../../config/types.openclaw.js"; import { isBlockedObjectKey } from "../../infra/prototype-keys.js"; +import { isInstalledPluginEnabled } from "../../plugins/installed-plugin-index.js"; +import { loadPluginManifestRegistryForInstalledIndex } from "../../plugins/manifest-registry-installed.js"; import type { PluginManifestRecord } from "../../plugins/manifest-registry.js"; -import { - isPluginEnabled, - loadPluginManifestRegistryForPluginRegistry, -} from "../../plugins/plugin-registry.js"; +import { loadPluginRegistrySnapshot } from "../../plugins/plugin-registry.js"; import { normalizeOptionalString } from "../../shared/string-coerce.js"; import type { ChannelPlugin } from "./types.plugin.js"; @@ -66,11 +65,17 @@ export function resolveReadOnlyChannelCommandDefaults( if (!normalizedChannelId || !isSafeManifestChannelId(normalizedChannelId)) { return undefined; } - const registry = loadPluginManifestRegistryForPluginRegistry({ + const index = loadPluginRegistrySnapshot({ config: options.config, stateDir: options.stateDir, workspaceDir: options.workspaceDir, env: options.env ?? process.env, + }); + const registry = loadPluginManifestRegistryForInstalledIndex({ + index, + config: options.config, + workspaceDir: options.workspaceDir, + env: options.env ?? process.env, includeDisabled: true, }); for (const record of registry.plugins) { @@ -83,15 +88,7 @@ export function resolveReadOnlyChannelCommandDefaults( ) { continue; } - if ( - !isPluginEnabled({ - pluginId: record.id, - config: options.config, - stateDir: options.stateDir, - workspaceDir: options.workspaceDir, - env: options.env ?? process.env, - }) - ) { + if (!isInstalledPluginEnabled(index, record.id, options.config)) { continue; } const channelConfigValue = record.channelConfigs