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

推荐订阅源

人人都是产品经理
人人都是产品经理
博客园_首页
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
美团技术团队
D
Docker
WordPress大学
WordPress大学
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
Y
Y Combinator Blog
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans

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: load source bundled plugins from pnpm workspaces · o...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -22,6 +22,7 @@ function createOpenClawRoot(params: {

2222

hasDistRuntimeExtensions?: boolean;

2323

hasDistExtensions?: boolean;

2424

hasGitCheckout?: boolean;

25+

hasPnpmWorkspace?: boolean;

2526

}) {

2627

const repoRoot = makeRepoRoot(params.prefix);

2728

if (params.hasExtensions) {

@@ -39,6 +40,13 @@ function createOpenClawRoot(params: {

3940

if (params.hasGitCheckout) {

4041

fs.writeFileSync(path.join(repoRoot, ".git"), "gitdir: /tmp/fake.git\n", "utf8");

4142

}

43+

if (params.hasPnpmWorkspace) {

44+

fs.writeFileSync(

45+

path.join(repoRoot, "pnpm-workspace.yaml"),

46+

"packages:\n - .\n - extensions/*\n",

47+

"utf8",

48+

);

49+

}

4250

fs.writeFileSync(

4351

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

4452

`${JSON.stringify({ name: "openclaw" }, null, 2)}\n`,

@@ -188,17 +196,18 @@ describe("resolveBundledPluginsDir", () => {

188196

},

189197

],

190198

[

191-

"prefers built dist/extensions in a git checkout outside vitest",

199+

"prefers source extensions in a pnpm git checkout outside vitest",

192200

{

193201

prefix: "openclaw-bundled-dir-git-built-",

194202

hasExtensions: true,

195203

hasSrc: true,

196204

hasDistRuntimeExtensions: true,

197205

hasDistExtensions: true,

198206

hasGitCheckout: true,

207+

hasPnpmWorkspace: true,

199208

},

200209

{

201-

expectedRelativeDir: path.join("dist-runtime", "extensions"),

210+

expectedRelativeDir: "extensions",

202211

},

203212

],

204213

[

@@ -215,27 +224,29 @@ describe("resolveBundledPluginsDir", () => {

215224

},

216225

],

217226

[

218-

"still prefers built bundled plugins during tsx-driven source execution",

227+

"still prefers source extensions during tsx-driven pnpm source execution",

219228

{

220229

prefix: "openclaw-bundled-dir-tsx-built-",

221230

hasExtensions: true,

222231

hasSrc: true,

223232

hasDistRuntimeExtensions: true,

224233

hasDistExtensions: true,

225234

hasGitCheckout: true,

235+

hasPnpmWorkspace: true,

226236

},

227237

{

228-

expectedRelativeDir: path.join("dist-runtime", "extensions"),

238+

expectedRelativeDir: "extensions",

229239

execArgv: ["--import", "tsx"],

230240

},

231241

],

232242

[

233-

"falls back to source extensions in a git checkout when built trees are missing",

243+

"uses source extensions in a pnpm git checkout when built trees are missing",

234244

{

235245

prefix: "openclaw-bundled-dir-git-",

236246

hasExtensions: true,

237247

hasSrc: true,

238248

hasGitCheckout: true,

249+

hasPnpmWorkspace: true,

239250

},

240251

{

241252

expectedRelativeDir: "extensions",

@@ -267,6 +278,7 @@ describe("resolveBundledPluginsDir", () => {

267278

hasDistRuntimeExtensions: true,

268279

hasDistExtensions: true,

269280

hasGitCheckout: true,

281+

hasPnpmWorkspace: true,

270282

});

271283

fs.mkdirSync(path.join(repoRoot, "dist", "extensions", "discord"), { recursive: true });

272284

fs.mkdirSync(path.join(repoRoot, "dist-runtime", "extensions", "discord"), {

@@ -280,6 +292,25 @@ describe("resolveBundledPluginsDir", () => {

280292

});

281293

});

282294295+

it("keeps built bundled plugins for git-looking trees without pnpm workspace metadata", () => {

296+

const repoRoot = createOpenClawRoot({

297+

prefix: "openclaw-bundled-dir-git-no-pnpm-",

298+

hasExtensions: true,

299+

hasSrc: true,

300+

hasDistRuntimeExtensions: true,

301+

hasDistExtensions: true,

302+

hasGitCheckout: true,

303+

});

304+

seedBundledPluginTree(repoRoot, "extensions");

305+

seedBundledPluginTree(repoRoot, path.join("dist", "extensions"));

306+

seedBundledPluginTree(repoRoot, path.join("dist-runtime", "extensions"));

307+308+

expectResolvedBundledDirFromRoot({

309+

repoRoot,

310+

expectedRelativeDir: path.join("dist-runtime", "extensions"),

311+

});

312+

});

313+283314

it("returns a stable empty bundled plugin directory when bundled plugins are disabled", () => {

284315

const repoRoot = createOpenClawRoot({

285316

prefix: "openclaw-bundled-dir-disabled-",