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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | 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
refactor(config): tighten plugin config guardrails · open...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -1,94 +1,10 @@

11

#!/usr/bin/env node

2-

import fs from "node:fs";

3-

import path from "node:path";

4-5-

const repoRoot = path.resolve(new URL("..", import.meta.url).pathname);

6-7-

const CHANNEL_EXTENSION_IDS = new Set([

8-

"discord",

9-

"imessage",

10-

"irc",

11-

"line",

12-

"matrix",

13-

"mattermost",

14-

"nextcloud-talk",

15-

"signal",

16-

"slack",

17-

"telegram",

18-

"whatsapp",

19-

]);

20-21-

const HELPER_BASENAME_PATTERNS = [

22-

/^action-runtime\.ts$/,

23-

/^actions(?:\..*)?\.ts$/,

24-

/^active-listener\.ts$/,

25-

/^access-control\.ts$/,

26-

/^channel\.ts$/,

27-

/^client(?:[-.].*)?\.ts$/,

28-

/^recipient-resolution\.ts$/,

29-

/^rich-menu\.ts$/,

30-

/^send(?:[-.].*)?\.ts$/,

31-

/^sent-message-cache\.ts$/,

32-

/^thread-bindings\.ts$/,

33-

];

34-35-

const FORBIDDEN_PATTERNS = [/\bloadConfig\s*\(/, /\.config\.loadConfig\s*\(/];

36-37-

function* walk(dir) {

38-

for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {

39-

if (entry.name === "node_modules" || entry.name === "dist") {

40-

continue;

41-

}

42-

const absolute = path.join(dir, entry.name);

43-

if (entry.isDirectory()) {

44-

yield* walk(absolute);

45-

continue;

46-

}

47-

yield absolute;

48-

}

49-

}

50-51-

function isCandidate(relativePath) {

52-

const parts = relativePath.split(path.sep);

53-

if (parts[0] !== "extensions" || parts[2] !== "src") {

54-

return false;

55-

}

56-

if (!CHANNEL_EXTENSION_IDS.has(parts[1])) {

57-

return false;

58-

}

59-

if (

60-

relativePath.endsWith(".test.ts") ||

61-

relativePath.endsWith(".test-harness.ts") ||

62-

relativePath.endsWith(".d.ts")

63-

) {

64-

return false;

65-

}

66-

if (parts.includes("monitor") || parts.includes("cli")) {

67-

return false;

68-

}

69-

if (parts.includes("actions")) {

70-

return true;

71-

}

72-

const basename = path.basename(relativePath);

73-

return HELPER_BASENAME_PATTERNS.some((pattern) => pattern.test(basename));

74-

}

2+

import { collectRuntimeActionLoadConfigViolations } from "./lib/config-boundary-guard.mjs";

753764

function main() {

77-

const violations = [];

78-

for (const absolute of walk(path.join(repoRoot, "extensions"))) {

79-

const relativePath = path.relative(repoRoot, absolute);

80-

if (!isCandidate(relativePath)) {

81-

continue;

82-

}

83-

const lines = fs.readFileSync(absolute, "utf8").split(/\r?\n/);

84-

lines.forEach((line, index) => {

85-

if (FORBIDDEN_PATTERNS.some((pattern) => pattern.test(line))) {

86-

violations.push(`${relativePath}:${index + 1}: ${line.trim()}`);

87-

}

88-

});

89-

}

5+

const violations = collectRuntimeActionLoadConfigViolations();

906

if (violations.length === 0) {

91-

return;

7+

return 0;

928

}

939

console.error(

9410

[

@@ -98,7 +14,7 @@ function main() {

9814

...violations,

9915

].join("\n"),

10016

);

101-

process.exitCode = 1;

17+

return 1;

10218

}

10319104-

main();

20+

process.exitCode = main();