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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
Engineering at Meta
Engineering at Meta

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(plugins): harden manifest channel metadata · openclaw...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main

@@ -1,11 +1,13 @@

11

import fs from "node:fs";

22

import path from "node:path";

33

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

4+

import { isBlockedObjectKey } from "../infra/prototype-keys.js";

45

import {

56

normalizeOptionalLowercaseString,

67

normalizeOptionalString,

78

} from "../shared/string-coerce.js";

89

import { normalizeOptionalTrimmedStringList } from "../shared/string-normalization.js";

10+

import { sanitizeForLog } from "../terminal/ansi.js";

911

import { resolveUserPath } from "../utils.js";

1012

import { resolveCompatibilityHostVersion } from "../version.js";

1113

import { loadBundleManifest } from "./bundle-manifest.js";

@@ -306,26 +308,38 @@ function mergePackageChannelMetaIntoChannelConfigs(params: {

306308

packageChannel?: OpenClawPackageManifest["channel"];

307309

}): Record<string, PluginManifestChannelConfig> | undefined {

308310

const channelId = params.packageChannel?.id?.trim();

309-

if (!channelId || !params.channelConfigs?.[channelId]) {

311+

if (

312+

!channelId ||

313+

isBlockedObjectKey(channelId) ||

314+

!params.channelConfigs ||

315+

!Object.prototype.hasOwnProperty.call(params.channelConfigs, channelId)

316+

) {

310317

return params.channelConfigs;

311318

}

312319313320

const existing = params.channelConfigs[channelId];

321+

if (!existing) {

322+

return params.channelConfigs;

323+

}

314324

const label = existing.label ?? normalizeOptionalString(params.packageChannel?.label) ?? "";

315325

const description =

316326

existing.description ?? normalizeOptionalString(params.packageChannel?.blurb) ?? "";

317327

const preferOver =

318328

existing.preferOver ?? normalizePreferredPluginIds(params.packageChannel?.preferOver);

319329320-

return {

321-

...params.channelConfigs,

322-

[channelId]: {

323-

...existing,

324-

...(label ? { label } : {}),

325-

...(description ? { description } : {}),

326-

...(preferOver?.length ? { preferOver } : {}),

327-

},

330+

const merged: Record<string, PluginManifestChannelConfig> = Object.create(null);

331+

for (const [key, value] of Object.entries(params.channelConfigs)) {

332+

if (!isBlockedObjectKey(key)) {

333+

merged[key] = value;

334+

}

335+

}

336+

merged[channelId] = {

337+

...existing,

338+

...(label ? { label } : {}),

339+

...(description ? { description } : {}),

340+

...(preferOver?.length ? { preferOver } : {}),

328341

};

342+

return merged;

329343

}

330344331345

function buildRecord(params: {

@@ -468,9 +482,9 @@ function pushProviderAuthEnvVarsCompatDiagnostic(params: {

468482

}

469483

params.diagnostics.push({

470484

level: "warn",

471-

pluginId: params.record.id,

472-

source: params.record.manifestPath,

473-

message: `providerAuthEnvVars is deprecated compatibility metadata for provider env-var lookup; mirror ${providerIds.join(", ")} env vars to setup.providers[].envVars before the deprecation window closes`,

485+

pluginId: sanitizeForLog(params.record.id),

486+

source: sanitizeForLog(params.record.manifestPath),

487+

message: `providerAuthEnvVars is deprecated compatibility metadata for provider env-var lookup; mirror ${providerIds.map(sanitizeForLog).join(", ")} env vars to setup.providers[].envVars before the deprecation window closes`,

474488

});

475489

}

476490

@@ -488,15 +502,18 @@ function pushNonBundledChannelConfigDescriptorDiagnostic(params: {

488502

return;

489503

}

490504

const channelConfigs = params.record.channelConfigs ?? {};

491-

const missingChannels = declaredChannels.filter((channelId) => !channelConfigs[channelId]);

505+

const missingChannels = declaredChannels.filter(

506+

(channelId) => !Object.prototype.hasOwnProperty.call(channelConfigs, channelId),

507+

);

492508

if (missingChannels.length === 0) {

493509

return;

494510

}

511+

const safeMissingChannels = missingChannels.map(sanitizeForLog);

495512

params.diagnostics.push({

496513

level: "warn",

497-

pluginId: params.record.id,

498-

source: params.record.manifestPath,

499-

message: `channel plugin manifest declares ${missingChannels.join(", ")} without channelConfigs metadata; add openclaw.plugin.json#channelConfigs so config schema and setup surfaces work before runtime loads`,

514+

pluginId: sanitizeForLog(params.record.id),

515+

source: sanitizeForLog(params.record.manifestPath),

516+

message: `channel plugin manifest declares ${safeMissingChannels.join(", ")} without channelConfigs metadata; add openclaw.plugin.json#channelConfigs so config schema and setup surfaces work before runtime loads`,

500517

});

501518

}

502519