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

推荐订阅源

C
Check Point Blog
美团技术团队
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
月光博客
月光博客
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
J
Java Code Geeks
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Vercel News
Vercel News
博客园 - 聂微东

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(docker): prune omitted plugin runtime deps · openclaw...
vincentkoc · 2026-05-22 · via Recent Commits to openclaw:main

@@ -19,6 +19,29 @@ function writeDistPluginFile(repoRoot: string, root: "dist" | "dist-runtime", pl

1919

fs.writeFileSync(path.join(pluginDir, "openclaw.plugin.json"), "{}\n", "utf8");

2020

}

212122+

function writePluginSourcePackage(repoRoot: string, pluginId: string) {

23+

const pluginDir = path.join(repoRoot, "extensions", pluginId);

24+

fs.mkdirSync(pluginDir, { recursive: true });

25+

writeJsonFile(path.join(pluginDir, "package.json"), {

26+

name: `@openclaw/${pluginId}`,

27+

version: "0.0.0",

28+

});

29+

}

30+31+

function writeNodePackage(

32+

repoRoot: string,

33+

packageName: string,

34+

packageJson: Record<string, unknown> = {},

35+

) {

36+

const packageDir = path.join(repoRoot, "node_modules", ...packageName.split("/"));

37+

fs.mkdirSync(packageDir, { recursive: true });

38+

writeJsonFile(path.join(packageDir, "package.json"), {

39+

name: packageName,

40+

version: "0.0.0",

41+

...packageJson,

42+

});

43+

}

44+2245

afterEach(() => {

2346

cleanupTempDirs(tempDirs);

2447

});

@@ -32,11 +55,14 @@ describe("pruneDockerPluginDist", () => {

3255

]);

3356

});

345735-

it("removes package-excluded plugin dist unless Docker explicitly opts it in", () => {

58+

it("removes package-excluded plugin runtime artifacts unless Docker explicitly opts it in", () => {

3659

const repoRoot = makeRepoRoot("openclaw-docker-plugin-dist-");

3760

writeJsonFile(path.join(repoRoot, "package.json"), {

3861

files: ["dist/**", "!dist/extensions/diagnostics-otel/**", "!dist/extensions/feishu/**"],

3962

});

63+

writePluginSourcePackage(repoRoot, "diagnostics-otel");

64+

writePluginSourcePackage(repoRoot, "feishu");

65+

writePluginSourcePackage(repoRoot, "telegram");

4066

writeDistPluginFile(repoRoot, "dist", "diagnostics-otel");

4167

writeDistPluginFile(repoRoot, "dist", "feishu");

4268

writeDistPluginFile(repoRoot, "dist-runtime", "feishu");

@@ -47,10 +73,100 @@ describe("pruneDockerPluginDist", () => {

4773

env: { OPENCLAW_EXTENSIONS: "diagnostics-otel" } as NodeJS.ProcessEnv,

4874

});

497550-

expect(removed).toEqual(["dist/extensions/feishu", "dist-runtime/extensions/feishu"]);

76+

expect(removed).toEqual([

77+

"extensions/feishu",

78+

"dist/extensions/feishu",

79+

"dist-runtime/extensions/feishu",

80+

]);

81+

expect(fs.existsSync(path.join(repoRoot, "extensions", "diagnostics-otel"))).toBe(true);

82+

expect(fs.existsSync(path.join(repoRoot, "extensions", "feishu"))).toBe(false);

83+

expect(fs.existsSync(path.join(repoRoot, "extensions", "telegram"))).toBe(true);

5184

expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "diagnostics-otel"))).toBe(true);

5285

expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "feishu"))).toBe(false);

5386

expect(fs.existsSync(path.join(repoRoot, "dist-runtime", "extensions", "feishu"))).toBe(false);

5487

expect(fs.existsSync(path.join(repoRoot, "dist", "extensions", "telegram"))).toBe(true);

5588

});

89+90+

it("honors custom bundled plugin source roots when pruning Docker runtime importers", () => {

91+

const repoRoot = makeRepoRoot("openclaw-docker-plugin-source-");

92+

writeJsonFile(path.join(repoRoot, "package.json"), {

93+

files: ["dist/**", "!dist/extensions/acpx/**"],

94+

});

95+

const pluginDir = path.join(repoRoot, "plugins", "acpx");

96+

fs.mkdirSync(pluginDir, { recursive: true });

97+

writeJsonFile(path.join(pluginDir, "package.json"), {

98+

name: "@openclaw/acpx",

99+

version: "0.0.0",

100+

});

101+102+

const removed = pruneDockerPluginDist({

103+

repoRoot,

104+

env: {

105+

OPENCLAW_BUNDLED_PLUGIN_DIR: "plugins",

106+

} as NodeJS.ProcessEnv,

107+

});

108+109+

expect(removed).toEqual(["plugins/acpx"]);

110+

expect(fs.existsSync(pluginDir)).toBe(false);

111+

});

112+113+

it("removes node_modules dependency closure that only omitted Docker plugins need", () => {

114+

const repoRoot = makeRepoRoot("openclaw-docker-plugin-node-modules-");

115+

writeJsonFile(path.join(repoRoot, "package.json"), {

116+

files: ["dist/**", "!dist/extensions/acpx/**", "!dist/extensions/codex/**"],

117+

dependencies: {

118+

zod: "0.0.0",

119+

},

120+

});

121+

writeJsonFile(path.join(repoRoot, "extensions", "acpx", "package.json"), {

122+

name: "@openclaw/acpx",

123+

version: "0.0.0",

124+

dependencies: {

125+

"@zed-industries/codex-acp": "0.0.0",

126+

zod: "0.0.0",

127+

},

128+

});

129+

writeJsonFile(path.join(repoRoot, "extensions", "codex", "package.json"), {

130+

name: "@openclaw/codex",

131+

version: "0.0.0",

132+

dependencies: {

133+

"@openai/codex": "0.0.0",

134+

zod: "0.0.0",

135+

},

136+

});

137+

writeNodePackage(repoRoot, "@openclaw/acpx");

138+

writeNodePackage(repoRoot, "@openclaw/codex");

139+

writeNodePackage(repoRoot, "zod");

140+

writeNodePackage(repoRoot, "@openai/codex", {

141+

optionalDependencies: {

142+

"@openai/codex-linux-x64": "0.0.0",

143+

},

144+

});

145+

writeNodePackage(repoRoot, "@openai/codex-linux-x64");

146+

writeNodePackage(repoRoot, "@zed-industries/codex-acp", {

147+

optionalDependencies: {

148+

"@zed-industries/codex-acp-linux-x64": "0.0.0",

149+

},

150+

});

151+

writeNodePackage(repoRoot, "@zed-industries/codex-acp-linux-x64");

152+153+

const removed = pruneDockerPluginDist({

154+

repoRoot,

155+

env: { OPENCLAW_EXTENSIONS: "codex" } as NodeJS.ProcessEnv,

156+

});

157+158+

expect(removed).toEqual([

159+

"node_modules/@openclaw/acpx",

160+

"node_modules/@zed-industries/codex-acp",

161+

"node_modules/@zed-industries/codex-acp-linux-x64",

162+

"extensions/acpx",

163+

]);

164+

expect(fs.existsSync(path.join(repoRoot, "node_modules", "zod"))).toBe(true);

165+

expect(fs.existsSync(path.join(repoRoot, "node_modules", "@openai", "codex"))).toBe(true);

166+

expect(fs.existsSync(path.join(repoRoot, "node_modules", "@openai", "codex-linux-x64"))).toBe(

167+

true,

168+

);

169+

expect(fs.existsSync(path.join(repoRoot, "node_modules", "@zed-industries"))).toBe(false);

170+

expect(fs.existsSync(path.join(repoRoot, "extensions", "codex"))).toBe(true);

171+

});

56172

});