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

推荐订阅源

美团技术团队
T
The Blog of Author Tim Ferriss
C
Check Point Blog
博客园_首页
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
L
LangChain Blog
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
Vercel News
Vercel News
博客园 - Franky
V
V2EX
IT之家
IT之家
U
Unit 42
N
Netflix TechBlog - Medium
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
博客园 - 叶小钗
H
Help Net Security
V
Visual Studio Blog
GbyAI
GbyAI

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): clean managed git uninstall roots · opencla...
vincentkoc · 2026-05-03 · via Recent Commits to openclaw:main

@@ -18,6 +18,34 @@ function getInstallRecords() {

1818

: (index.installRecords ?? {});

1919

}

202021+

function readOpenClawConfig() {

22+

const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");

23+

return fs.existsSync(configPath) ? readJson(configPath) : {};

24+

}

25+26+

function assertPluginRemoved(params) {

27+

const list = readJson(params.listFile);

28+

if ((list.plugins || []).some((entry) => entry.id === params.pluginId)) {

29+

throw new Error(`${params.pluginId} still listed after uninstall`);

30+

}

31+32+

const installRecords = getInstallRecords();

33+

if (installRecords[params.pluginId]) {

34+

throw new Error(`${params.pluginId} install record still present after uninstall`);

35+

}

36+37+

const config = readOpenClawConfig();

38+

if (config.plugins?.entries?.[params.pluginId]) {

39+

throw new Error(`${params.pluginId} config entry still present after uninstall`);

40+

}

41+

if ((config.plugins?.allow || []).includes(params.pluginId)) {

42+

throw new Error(`${params.pluginId} allowlist entry still present after uninstall`);

43+

}

44+

if ((config.plugins?.deny || []).includes(params.pluginId)) {

45+

throw new Error(`${params.pluginId} denylist entry still present after uninstall`);

46+

}

47+

}

48+2149

function recordFixturePluginTrust() {

2250

const pluginId = process.argv[3];

2351

const pluginRoot = process.argv[4];

@@ -272,6 +300,25 @@ function assertGitPlugin() {

272300

throw new Error(`missing git plugin installed dependency: ${dependencyPackagePath}`);

273301

}

274302

assertRealPathInside(installPath, dependencyPackagePath, "git plugin installed dependency");

303+

fs.writeFileSync("/tmp/plugins-git-install-path.txt", installPath, "utf8");

304+

fs.writeFileSync("/tmp/plugins-git-install-parent.txt", path.dirname(installPath), "utf8");

305+

}

306+307+

function assertGitPluginRemoved() {

308+

const installPath = fs.readFileSync("/tmp/plugins-git-install-path.txt", "utf8").trim();

309+

const installParent = fs.readFileSync("/tmp/plugins-git-install-parent.txt", "utf8").trim();

310+

assertPluginRemoved({

311+

pluginId: "demo-plugin-git",

312+

listFile: "/tmp/plugins-git-uninstalled.json",

313+

});

314+

if (fs.existsSync(installPath)) {

315+

throw new Error(`git managed repo still exists after uninstall: ${installPath}`);

316+

}

317+

if (fs.existsSync(installParent)) {

318+

throw new Error(

319+

`empty git managed install parent still exists after uninstall: ${installParent}`,

320+

);

321+

}

275322

}

276323277324

function assertRealPathInside(parentPath, childPath, label) {

@@ -407,13 +454,34 @@ function assertNpmPlugin() {

407454

throw new Error(`missing npm plugin installed dependency: ${dependencyPackagePath}`);

408455

}

409456

assertRealPathInside(npmRoot, dependencyPackagePath, "npm plugin installed dependency");

457+

fs.writeFileSync("/tmp/plugins-npm-install-path.txt", installPath, "utf8");

458+

fs.writeFileSync("/tmp/plugins-npm-dependency-path.txt", dependencyPackagePath, "utf8");

410459

}

411460412461

function assertNpmPluginUpdateUnchanged() {

413462

assertUpdateOutput("/tmp/plugins-npm-update.log", "demo-plugin-npm is up to date (0.0.1).");

414463

assertNpmPlugin();

415464

}

416465466+

function assertNpmPluginRemoved() {

467+

const installPath = fs.readFileSync("/tmp/plugins-npm-install-path.txt", "utf8").trim();

468+

const dependencyPackagePath = fs

469+

.readFileSync("/tmp/plugins-npm-dependency-path.txt", "utf8")

470+

.trim();

471+

assertPluginRemoved({

472+

pluginId: "demo-plugin-npm",

473+

listFile: "/tmp/plugins-npm-uninstalled.json",

474+

});

475+

if (fs.existsSync(installPath)) {

476+

throw new Error(`npm managed package still exists after uninstall: ${installPath}`);

477+

}

478+

if (fs.existsSync(dependencyPackagePath)) {

479+

throw new Error(

480+

`npm managed dependency still exists after uninstall: ${dependencyPackagePath}`,

481+

);

482+

}

483+

}

484+417485

function assertMarketplaceUpdated() {

418486

const data = readJson("/tmp/plugins-marketplace-updated.json");

419487

const inspect = readJson("/tmp/plugins-marketplace-updated-inspect.json");

@@ -646,10 +714,12 @@ const commands = {

646714

),

647715

"plugin-npm": assertNpmPlugin,

648716

"plugin-npm-update": assertNpmPluginUpdateUnchanged,

717+

"plugin-npm-removed": assertNpmPluginRemoved,

649718

"bundle-disabled": assertClaudeBundleDisabled,

650719

"bundle-inspect": assertClaudeBundleInspect,

651720

"slash-install": assertSlashInstall,

652721

"plugin-git": assertGitPlugin,

722+

"plugin-git-removed": assertGitPluginRemoved,

653723

"plugin-git-updated": assertGitPluginUpdated,

654724

"marketplace-list": assertMarketplaceList,

655725

"marketplace-installed": assertMarketplaceInstalled,