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

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
博客园 - 聂微东
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
量子位
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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
test: speed up read-only channel fixtures · openclaw/open...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -19,6 +19,95 @@ vi.mock("../../plugins/bundled-dir.js", async (importOriginal) => {

1919

};

2020

});

212122+

vi.mock("../../plugins/jiti-loader-cache.js", async (importOriginal) => {

23+

const actual = await importOriginal<typeof import("../../plugins/jiti-loader-cache.js")>();

24+

const { createRequire } = await import("node:module");

25+

const require = createRequire(import.meta.url);

26+27+

type LoaderConfig = {

28+

plugins?: {

29+

load?: { paths?: unknown };

30+

};

31+

};

32+

type LoaderParams = {

33+

config?: LoaderConfig;

34+

onlyPluginIds?: readonly string[];

35+

workspaceDir?: string;

36+

};

37+38+

function readJson(filePath: string): unknown {

39+

return JSON.parse(fs.readFileSync(filePath, "utf-8"));

40+

}

41+42+

function isRecord(value: unknown): value is Record<string, unknown> {

43+

return Boolean(value && typeof value === "object" && !Array.isArray(value));

44+

}

45+46+

function listCandidatePluginDirs(params: LoaderParams): string[] {

47+

const paths = params.config?.plugins?.load?.paths;

48+

const explicitPaths = Array.isArray(paths)

49+

? paths.filter((entry): entry is string => typeof entry === "string")

50+

: [];

51+

const workspaceExtensionsDir = params.workspaceDir

52+

? path.join(params.workspaceDir, ".openclaw", "extensions")

53+

: undefined;

54+

if (!workspaceExtensionsDir || !fs.existsSync(workspaceExtensionsDir)) {

55+

return explicitPaths;

56+

}

57+

return explicitPaths.concat(

58+

fs

59+

.readdirSync(workspaceExtensionsDir, { withFileTypes: true })

60+

.filter((entry) => entry.isDirectory())

61+

.map((entry) => path.join(workspaceExtensionsDir, entry.name)),

62+

);

63+

}

64+65+

function loadOpenClawPlugins(params: LoaderParams) {

66+

const onlyPluginIds = new Set(params.onlyPluginIds ?? []);

67+

const channelSetups = listCandidatePluginDirs(params).flatMap((pluginDir) => {

68+

const manifestPath = path.join(pluginDir, "openclaw.plugin.json");

69+

const packagePath = path.join(pluginDir, "package.json");

70+

if (!fs.existsSync(manifestPath) || !fs.existsSync(packagePath)) {

71+

return [];

72+

}

73+

const manifest = readJson(manifestPath);

74+

if (!isRecord(manifest) || typeof manifest.id !== "string") {

75+

return [];

76+

}

77+

if (onlyPluginIds.size > 0 && !onlyPluginIds.has(manifest.id)) {

78+

return [];

79+

}

80+

const packageJson = readJson(packagePath);

81+

const openclaw = isRecord(packageJson) ? packageJson.openclaw : undefined;

82+

const setupEntry = isRecord(openclaw) ? openclaw.setupEntry : undefined;

83+

if (typeof setupEntry !== "string") {

84+

return [];

85+

}

86+

const setupModule = require(path.join(pluginDir, setupEntry));

87+

const entry = setupModule.default ?? setupModule;

88+

const plugin = entry.plugin;

89+

return plugin ? [{ pluginId: manifest.id, plugin }] : [];

90+

});

91+

return { channelSetups };

92+

}

93+94+

return {

95+

...actual,

96+

getCachedPluginJitiLoader: ((params) => {

97+

const actualLoader = actual.getCachedPluginJitiLoader(params);

98+

return ((modulePath: string) => {

99+

if (

100+

modulePath.endsWith("/plugins/loader.js") ||

101+

modulePath.endsWith("/plugins/loader.ts")

102+

) {

103+

return { loadOpenClawPlugins };

104+

}

105+

return actualLoader(modulePath);

106+

}) as ReturnType<typeof actual.getCachedPluginJitiLoader>;

107+

}) satisfies typeof actual.getCachedPluginJitiLoader,

108+

};

109+

});

110+22111

function writeExternalSetupChannelPlugin(

23112

options: {

24113

setupEntry?: boolean;