惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
P
Proofpoint News Feed
D
DataBreaches.Net
C
Check Point Blog
L
LangChain Blog
量子位
美团技术团队
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
腾讯CDC
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: constrain channel setup catalog resolution · opencla...
jesse-merhi · 2026-04-29 · via Recent Commits to openclaw:main

@@ -1,14 +1,12 @@

11

import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";

22

import {

3-

getChannelPluginCatalogEntry,

43

listChannelPluginCatalogEntries,

54

type ChannelPluginCatalogEntry,

65

} from "../../channels/plugins/catalog.js";

76

import { getChannelPlugin, normalizeChannelId } from "../../channels/plugins/index.js";

87

import type { ChannelPlugin } from "../../channels/plugins/types.plugin.js";

98

import type { ChannelId } from "../../channels/plugins/types.public.js";

109

import type { OpenClawConfig } from "../../config/types.openclaw.js";

11-

import { normalizePluginsConfig, resolveEnableState } from "../../plugins/config-state.js";

1210

import type { RuntimeEnv } from "../../runtime.js";

1311

import { normalizeOptionalLowercaseString } from "../../shared/string-coerce.js";

1412

import { createClackPrompter } from "../../wizard/clack-prompter.js";

@@ -17,6 +15,10 @@ import {

1715

ensureChannelSetupPluginInstalled,

1816

loadChannelSetupPluginRegistrySnapshotForChannel,

1917

} from "./plugin-install.js";

18+

import {

19+

getTrustedChannelPluginCatalogEntry,

20+

listTrustedChannelPluginCatalogEntries,

21+

} from "./trusted-catalog.js";

20222123

type ChannelPluginSnapshot = {

2224

channels: Array<{ plugin: ChannelPlugin }>;

@@ -55,8 +57,13 @@ export function resolveCatalogChannelEntry(raw: string, cfg: OpenClawConfig | nu

5557

if (!trimmed) {

5658

return undefined;

5759

}

58-

const workspaceDir = cfg ? resolveWorkspaceDir(cfg) : undefined;

59-

return listChannelPluginCatalogEntries({ workspaceDir }).find((entry) => {

60+

const entries = cfg

61+

? listTrustedChannelPluginCatalogEntries({

62+

cfg,

63+

workspaceDir: resolveWorkspaceDir(cfg),

64+

})

65+

: listChannelPluginCatalogEntries({ excludeWorkspace: true });

66+

return entries.find((entry) => {

6067

if (normalizeOptionalLowercaseString(entry.id) === trimmed) {

6168

return true;

6269

}

@@ -76,74 +83,6 @@ function findScopedChannelPlugin(

7683

);

7784

}

788579-

function isTrustedWorkspaceChannelCatalogEntry(

80-

entry: ChannelPluginCatalogEntry | undefined,

81-

cfg: OpenClawConfig,

82-

): boolean {

83-

if (entry?.origin !== "workspace") {

84-

return true;

85-

}

86-

if (!entry.pluginId) {

87-

return false;

88-

}

89-

const plugins = cfg.plugins;

90-

if (plugins?.enabled === false) {

91-

return false;

92-

}

93-

const pluginEntry = plugins?.entries?.[entry.pluginId];

94-

if (pluginEntry?.enabled === false) {

95-

return false;

96-

}

97-

if (plugins?.deny?.length) {

98-

return resolveEnableState(entry.pluginId, "workspace", normalizePluginsConfig(cfg.plugins))

99-

.enabled;

100-

}

101-

if (plugins?.allow?.includes(entry.pluginId)) {

102-

return true;

103-

}

104-

if (pluginEntry?.enabled === true && !plugins?.allow?.length) {

105-

return true;

106-

}

107-

return resolveEnableState(entry.pluginId, "workspace", normalizePluginsConfig(cfg.plugins))

108-

.enabled;

109-

}

110-111-

function resolveTrustedCatalogEntry(params: {

112-

rawChannel?: string | null;

113-

channelId?: ChannelId;

114-

cfg: OpenClawConfig;

115-

workspaceDir?: string;

116-

catalogEntry?: ChannelPluginCatalogEntry;

117-

}): ChannelPluginCatalogEntry | undefined {

118-

if (isTrustedWorkspaceChannelCatalogEntry(params.catalogEntry, params.cfg)) {

119-

return params.catalogEntry;

120-

}

121-

if (params.rawChannel) {

122-

const trimmed = normalizeOptionalLowercaseString(params.rawChannel);

123-

if (!trimmed) {

124-

return undefined;

125-

}

126-

return listChannelPluginCatalogEntries({

127-

workspaceDir: params.workspaceDir,

128-

excludeWorkspace: true,

129-

}).find((entry) => {

130-

if (normalizeOptionalLowercaseString(entry.id) === trimmed) {

131-

return true;

132-

}

133-

return (entry.meta.aliases ?? []).some(

134-

(alias) => normalizeOptionalLowercaseString(alias) === trimmed,

135-

);

136-

});

137-

}

138-

if (!params.channelId) {

139-

return undefined;

140-

}

141-

return getChannelPluginCatalogEntry(params.channelId, {

142-

workspaceDir: params.workspaceDir,

143-

excludeWorkspace: true,

144-

});

145-

}

146-14786

function loadScopedChannelPlugin(params: {

14887

cfg: OpenClawConfig;

14988

runtime: RuntimeEnv;

@@ -173,20 +112,14 @@ export async function resolveInstallableChannelPlugin(params: {

173112

const supports = params.supports ?? (() => true);

174113

let nextCfg = params.cfg;

175114

const workspaceDir = resolveWorkspaceDir(nextCfg);

176-

const unresolvedCatalogEntry =

115+

const catalogEntry =

177116

(params.rawChannel ? resolveCatalogChannelEntry(params.rawChannel, nextCfg) : undefined) ??

178117

(params.channelId

179-

? getChannelPluginCatalogEntry(params.channelId, {

118+

? getTrustedChannelPluginCatalogEntry(params.channelId, {

119+

cfg: nextCfg,

180120

workspaceDir,

181121

})

182122

: undefined);

183-

const catalogEntry = resolveTrustedCatalogEntry({

184-

rawChannel: params.rawChannel,

185-

channelId: params.channelId,

186-

cfg: nextCfg,

187-

workspaceDir,

188-

catalogEntry: unresolvedCatalogEntry,

189-

});

190123

const channelId =

191124

params.channelId ??

192125

resolveResolvedChannelId({