fix(channels): resolve cold channel presence from registry

This commit is contained in:
Vincent Koc
2026-04-25 18:52:56 -07:00
parent 94316334fe
commit e4199379ff
4 changed files with 61 additions and 21 deletions

View File

@@ -538,6 +538,7 @@ describe("listReadOnlyChannelPluginsForConfig", () => {
{
env: { ...process.env },
includePersistedAuthState: false,
includeSetupRuntimeFallback: true,
},
);
@@ -715,6 +716,7 @@ describe("listReadOnlyChannelPluginsForConfig", () => {
{
env: { ...process.env },
includePersistedAuthState: false,
includeSetupRuntimeFallback: true,
},
);

View File

@@ -7,10 +7,9 @@ import {
resolveDiscoverableScopedChannelPluginIds,
} from "../../plugins/channel-plugin-ids.js";
import { loadOpenClawPlugins } from "../../plugins/loader.js";
import {
loadPluginManifestRegistry,
type PluginManifestRecord,
} from "../../plugins/manifest-registry.js";
import { loadPluginManifestRegistryForInstalledIndex } from "../../plugins/manifest-registry-installed.js";
import type { PluginManifestRecord } from "../../plugins/manifest-registry.js";
import { loadPluginRegistrySnapshot } from "../../plugins/plugin-registry.js";
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../routing/session-key.js";
import { sanitizeForLog } from "../../terminal/ansi.js";
import { getBundledChannelSetupPlugin } from "./bundled.js";
@@ -491,6 +490,7 @@ function resolveExternalReadOnlyChannelPluginIds(params: {
workspaceDir: params.workspaceDir,
env: params.env,
cache: params.cache,
manifestRecords: params.records,
});
if (candidatePluginIds.length === 0) {
return [];
@@ -521,11 +521,18 @@ export function resolveReadOnlyChannelPluginsForConfig(
): ReadOnlyChannelPluginResolution {
const env = options.env ?? process.env;
const workspaceDir = resolveReadOnlyWorkspaceDir(cfg, options);
const manifestRecords = loadPluginManifestRegistry({
const pluginIndex = loadPluginRegistrySnapshot({
config: cfg,
workspaceDir,
env,
cache: options.cache,
});
const manifestRecords = loadPluginManifestRegistryForInstalledIndex({
index: pluginIndex,
config: cfg,
workspaceDir,
env,
includeDisabled: true,
}).plugins;
const externalManifestRecords = listExternalChannelManifestRecords(manifestRecords);
const configuredChannelIds = [