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

推荐订阅源

L
LangChain Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG

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): verify packaged setup runtime entries · ope...
vincentkoc · 2026-05-16 · via Recent Commits to openclaw:main

@@ -24,6 +24,20 @@ function readPackageStringList(packageLabel, fieldName, value) {

2424

return { entries, errors };

2525

}

262627+

function readOptionalPackageString(packageLabel, fieldName, value) {

28+

if (value === undefined || value === null) {

29+

return { entry: "", errors: [] };

30+

}

31+

const entry = typeof value === "string" ? value.trim() : "";

32+

if (!entry) {

33+

return {

34+

entry: "",

35+

errors: [`${packageLabel} package.json ${fieldName} must be a non-empty string`],

36+

};

37+

}

38+

return { entry, errors: [] };

39+

}

40+2741

function normalizePackagePath(value) {

2842

return value

2943

.replace(/\\/g, "/")

@@ -58,6 +72,14 @@ function listBuiltRuntimeEntryCandidates(entryPath) {

5872

].filter((candidate) => candidate !== normalized);

5973

}

607475+

function hasPackedFile(packageFiles, entryPath) {

76+

return packageFiles.has(normalizePackagePath(entryPath));

77+

}

78+79+

function missingCompiledRuntimeError(packageLabel, entry, candidates) {

80+

return `${packageLabel} requires compiled runtime output for TypeScript entry ${entry}: expected ${candidates.join(", ")}`;

81+

}

82+6183

function formatPackageLabel(packageJson, fallbackSpec) {

6284

const packageName = typeof packageJson.name === "string" ? packageJson.name.trim() : "";

6385

const packageVersion = typeof packageJson.version === "string" ? packageJson.version.trim() : "";

@@ -82,16 +104,29 @@ export function collectPluginNpmPublishedRuntimeErrors(params) {

82104

"openclaw.runtimeExtensions",

83105

packageJson.openclaw?.runtimeExtensions,

84106

);

85-

errors.push(...extensionsResult.errors, ...runtimeExtensionsResult.errors);

107+

const setupEntryResult = readOptionalPackageString(

108+

packageLabel,

109+

"openclaw.setupEntry",

110+

packageJson.openclaw?.setupEntry,

111+

);

112+

const runtimeSetupEntryResult = readOptionalPackageString(

113+

packageLabel,

114+

"openclaw.runtimeSetupEntry",

115+

packageJson.openclaw?.runtimeSetupEntry,

116+

);

117+

errors.push(

118+

...extensionsResult.errors,

119+

...runtimeExtensionsResult.errors,

120+

...setupEntryResult.errors,

121+

...runtimeSetupEntryResult.errors,

122+

);

86123

if (errors.length > 0) {

87124

return errors;

88125

}

89126

const extensions = extensionsResult.entries;

90127

const runtimeExtensions = runtimeExtensionsResult.entries;

91-92-

if (extensions.length === 0) {

93-

return errors;

94-

}

128+

const setupEntry = setupEntryResult.entry;

129+

const runtimeSetupEntry = runtimeSetupEntryResult.entry;

9513096131

if (runtimeExtensions.length > 0 && runtimeExtensions.length !== extensions.length) {

97132

errors.push(

@@ -103,7 +138,7 @@ export function collectPluginNpmPublishedRuntimeErrors(params) {

103138

for (const [index, entry] of extensions.entries()) {

104139

const runtimeEntry = runtimeExtensions[index];

105140

if (runtimeEntry) {

106-

if (!packageFiles.has(normalizePackagePath(runtimeEntry))) {

141+

if (!hasPackedFile(packageFiles, runtimeEntry)) {

107142

errors.push(`${packageLabel} runtime extension entry not found: ${runtimeEntry}`);

108143

}

109144

continue;

@@ -114,13 +149,40 @@ export function collectPluginNpmPublishedRuntimeErrors(params) {

114149

}

115150116151

const candidates = listBuiltRuntimeEntryCandidates(entry);

117-

if (candidates.some((candidate) => packageFiles.has(normalizePackagePath(candidate)))) {

152+

if (candidates.some((candidate) => hasPackedFile(packageFiles, candidate))) {

118153

continue;

119154

}

120155156+

errors.push(missingCompiledRuntimeError(packageLabel, entry, candidates));

157+

}

158+159+

if (runtimeSetupEntry && !setupEntry) {

121160

errors.push(

122-

`${packageLabel} requires compiled runtime output for TypeScript entry ${entry}: expected ${candidates.join(", ")}`,

161+

`${packageLabel} package.json openclaw.runtimeSetupEntry requires openclaw.setupEntry`,

123162

);

163+

return errors;

164+

}

165+166+

if (setupEntry) {

167+

if (runtimeSetupEntry) {

168+

if (!hasPackedFile(packageFiles, runtimeSetupEntry)) {

169+

errors.push(`${packageLabel} runtime setup entry not found: ${runtimeSetupEntry}`);

170+

}

171+

return errors;

172+

}

173+174+

const candidates = listBuiltRuntimeEntryCandidates(setupEntry);

175+

if (candidates.length > 0) {

176+

if (candidates.some((candidate) => hasPackedFile(packageFiles, candidate))) {

177+

return errors;

178+

}

179+

errors.push(missingCompiledRuntimeError(packageLabel, setupEntry, candidates));

180+

return errors;

181+

}

182+183+

if (!hasPackedFile(packageFiles, setupEntry)) {

184+

errors.push(`${packageLabel} setup entry not found: ${setupEntry}`);

185+

}

124186

}

125187126188

return errors;