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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
IT之家
IT之家
Y
Y Combinator Blog
T
Tailwind CSS Blog
B
Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
InfoQ
J
Java Code Geeks
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain 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
fix: remove managed plugin files on uninstall · openclaw/...
shakkernerd · 2026-04-26 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -121,6 +121,7 @@ Docs: https://docs.openclaw.ai

121121

- Image understanding: preserve configured provider-prefixed vision model metadata when callers request the model without the provider prefix, so custom image models keep their `input: ["text", "image"]` capability. Fixes #33185. Thanks @Kobe9312 and @vincentkoc.

122122

- Plugins/install: restore the previous plugin index records if a concurrent config write conflict interrupts install, update, or uninstall metadata commits. Thanks @shakkernerd.

123123

- Plugins/install: reject native plugin archives that do not include a valid `openclaw.plugin.json`, preventing manifestless archives from writing install records that later show missing-manifest diagnostics. Thanks @shakkernerd.

124+

- Plugins/uninstall: remove tracked managed plugin install directories even when the persisted install path differs from the default id-derived target, while still refusing deletes outside the managed extensions root. Thanks @shakkernerd.

124125

- Plugins/update: restore previous plugin index records if core update or channel setup hits a concurrent config write conflict after plugin metadata changes. Thanks @shakkernerd.

125126

- Plugins/onboarding: defer channel/provider plugin install records until the owning config write commits, keeping setup failures from advancing the plugin index ahead of `openclaw.json`. Thanks @shakkernerd.

126127

- Plugins/config: route configure and agent setup writes with pending plugin install records through the plugin index commit helper so provider onboarding metadata is not stripped by plain config writes. Thanks @shakkernerd.

Original file line numberDiff line numberDiff line change

@@ -261,13 +261,10 @@ openclaw plugins uninstall <id> --keep-files

261261
262262

`uninstall` removes plugin records from `plugins.entries`, the persisted plugin

263263

index, the plugin allowlist, and linked `plugins.load.paths` entries when

264-

applicable.

264+

applicable. Unless `--keep-files` is set, uninstall also removes the tracked

265+

managed install directory when it is inside OpenClaw's plugin extensions root.

265266

For active memory plugins, the memory slot resets to `memory-core`.

266267
267-

By default, uninstall also removes the plugin install directory under the active

268-

state-dir plugin root. Use

269-

`--keep-files` to keep files on disk.

270-
271268

`--keep-config` is supported as a deprecated alias for `--keep-files`.

272269
273270

### Update

Original file line numberDiff line numberDiff line change

@@ -782,6 +782,25 @@ describe("uninstallPlugin", () => {

782782

});

783783

await expect(fs.access(outsideDir)).resolves.toBeUndefined();

784784

});

785+
786+

it("deletes tracked managed install paths even when they are not the default target", async () => {

787+

const extensionsDir = path.join(tempDir, "extensions");

788+

const managedDir = path.join(extensionsDir, "archive-installs", "my-plugin");

789+

await fs.mkdir(managedDir, { recursive: true });

790+

await fs.writeFile(path.join(managedDir, "index.js"), "// plugin");

791+
792+

const result = await uninstallPlugin({

793+

config: createSingleNpmInstallConfig(managedDir),

794+

pluginId: "my-plugin",

795+

deleteFiles: true,

796+

extensionsDir,

797+

});

798+
799+

expectSuccessfulUninstallActions(result, {

800+

directory: true,

801+

});

802+

await expect(fs.access(managedDir)).rejects.toThrow();

803+

});

785804

});

786805
787806

describe("resolveUninstallDirectoryTarget", () => {

@@ -814,4 +833,22 @@ describe("resolveUninstallDirectoryTarget", () => {

814833
815834

expect(target).toBe(resolvePluginInstallDir("my-plugin", extensionsDir));

816835

});

836+
837+

it("uses configured installPath when it stays inside the managed extensions dir", () => {

838+

const extensionsDir = path.join(os.tmpdir(), "openclaw-uninstall-safe");

839+

const installPath = path.join(extensionsDir, "archive-installs", "my-plugin");

840+
841+

expect(

842+

resolveUninstallDirectoryTarget({

843+

pluginId: "my-plugin",

844+

hasInstall: true,

845+

installRecord: {

846+

source: "archive",

847+

sourcePath: "/tmp/my-plugin.zip",

848+

installPath,

849+

},

850+

extensionsDir,

851+

}),

852+

).toBe(installPath);

853+

});

817854

});

Original file line numberDiff line numberDiff line change

@@ -57,7 +57,12 @@ export function resolveUninstallDirectoryTarget(params: {

5757

return configuredPath;

5858

}

5959
60-

// Never trust configured installPath blindly for recursive deletes.

60+

if (params.extensionsDir && isPathInsideOrEqual(params.extensionsDir, configuredPath)) {

61+

return configuredPath;

62+

}

63+
64+

// Never trust configured installPath blindly for recursive deletes outside

65+

// the managed extensions directory.

6166

return defaultPath;

6267

}

6368

@@ -101,6 +106,11 @@ function resolveComparablePath(value: string): string {

101106

}

102107

}

103108
109+

function isPathInsideOrEqual(parent: string, child: string): boolean {

110+

const relative = path.relative(resolveComparablePath(parent), resolveComparablePath(child));

111+

return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative));

112+

}

113+
104114

/**

105115

* Remove plugin references from config (pure config mutation).

106116

* Returns a new config with the plugin removed from entries, installs, allow, load.paths, slots,