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

推荐订阅源

Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
Google DeepMind News
Google DeepMind News
月光博客
月光博客
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - 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
test(e2e): assert release plugin uninstall removes files ...
vincentkoc · 2026-05-26 · via Recent Commits to openclaw:main

@@ -12,6 +12,29 @@ function readJson(file) {

1212

return JSON.parse(fs.readFileSync(file, "utf8"));

1313

}

141415+

function resolveHomePath(value) {

16+

if (value === "~") {

17+

return process.env.HOME;

18+

}

19+

if (value?.startsWith("~/") || value?.startsWith("~\\")) {

20+

return path.join(process.env.HOME ?? "", value.slice(2));

21+

}

22+

return value;

23+

}

24+25+

function comparablePath(value) {

26+

const resolved = path.resolve(resolveHomePath(value));

27+

try {

28+

return fs.realpathSync.native(resolved);

29+

} catch {

30+

return resolved;

31+

}

32+

}

33+34+

function pathsEqual(left, right) {

35+

return comparablePath(left) === comparablePath(right);

36+

}

37+1538

function configPath() {

1639

return (

1740

process.env.OPENCLAW_CONFIG_PATH ??

@@ -29,6 +52,12 @@ function writeConfig(cfg) {

2952

fs.writeFileSync(configPath(), `${JSON.stringify(cfg, null, 2)}\n`);

3053

}

315455+

function installRecords() {

56+

const recordsPath = path.join(process.env.HOME ?? "", ".openclaw", "plugins", "installs.json");

57+

const records = fs.existsSync(recordsPath) ? readJson(recordsPath) : {};

58+

return records.installRecords ?? records.records ?? {};

59+

}

60+3261

function assertOnboard() {

3362

const home = process.argv[3];

3463

const stateDir = path.join(home, ".openclaw");

@@ -65,16 +94,63 @@ function assertFileContains() {

6594

assert(raw.includes(needle), `${file} did not contain ${needle}. Output: ${raw}`);

6695

}

679697+

function rememberPluginInstallPath() {

98+

const pluginId = process.argv[3];

99+

const installPathFile = process.argv[4];

100+

const sourcePathFile = process.argv[5];

101+

const expectedSourcePath = process.argv[6];

102+

assert(pluginId, "missing plugin id");

103+

assert(installPathFile, "missing install path file");

104+

const record = installRecords()[pluginId];

105+

assert(record, `missing install record for ${pluginId}`);

106+

const installPath = resolveHomePath(record.installPath);

107+

assert(installPath, `install path missing for ${pluginId}`);

108+

assert(fs.existsSync(installPath), `install path missing on disk for ${pluginId}: ${installPath}`);

109+

if (expectedSourcePath && record.sourcePath) {

110+

assert(

111+

pathsEqual(record.sourcePath, expectedSourcePath),

112+

`unexpected source path for ${pluginId}: ${record.sourcePath}, expected ${expectedSourcePath}`,

113+

);

114+

}

115+

fs.writeFileSync(installPathFile, installPath, "utf8");

116+

if (sourcePathFile && (expectedSourcePath || record.sourcePath)) {

117+

fs.writeFileSync(

118+

sourcePathFile,

119+

expectedSourcePath || resolveHomePath(record.sourcePath),

120+

"utf8",

121+

);

122+

}

123+

}

124+68125

function assertPluginUninstalled() {

69126

const pluginId = process.argv[3];

127+

const installPathFile = process.argv[4];

128+

const sourcePathFile = process.argv[5];

70129

const cfg = readJson(configPath());

71-

const recordsPath = path.join(process.env.HOME ?? "", ".openclaw", "plugins", "installs.json");

72-

const records = fs.existsSync(recordsPath) ? readJson(recordsPath) : {};

73-

const installRecords = records.installRecords ?? records.records ?? {};

74-

assert(!installRecords[pluginId], `install record still present for ${pluginId}`);

130+

const records = installRecords();

131+

assert(!records[pluginId], `install record still present for ${pluginId}`);

75132

assert(!cfg.plugins?.entries?.[pluginId], `plugin config entry still present for ${pluginId}`);

76133

assert(!(cfg.plugins?.allow ?? []).includes(pluginId), `allowlist still contains ${pluginId}`);

77134

assert(!(cfg.plugins?.deny ?? []).includes(pluginId), `denylist still contains ${pluginId}`);

135+

if (!installPathFile) {

136+

return;

137+

}

138+

const installPath = fs.readFileSync(installPathFile, "utf8").trim();

139+

const sourcePath =

140+

sourcePathFile && fs.existsSync(sourcePathFile)

141+

? fs.readFileSync(sourcePathFile, "utf8").trim()

142+

: "";

143+

if (sourcePath) {

144+

assert(

145+

fs.existsSync(sourcePath),

146+

`source path was deleted during uninstall for ${pluginId}: ${sourcePath}`,

147+

);

148+

}

149+

const installPathIsSourcePath = sourcePath ? pathsEqual(installPath, sourcePath) : false;

150+

assert(

151+

installPathIsSourcePath || !fs.existsSync(installPath),

152+

`managed plugin directory still present: ${installPath}`,

153+

);

78154

}

7915580156

function configureClickClack() {

@@ -183,6 +259,7 @@ async function waitClickClackReply() {

183259184260

const commands = {

185261

"assert-onboard": assertOnboard,

262+

"remember-plugin-install-path": rememberPluginInstallPath,

186263

"configure-mock-model": configureMockModel,

187264

"assert-agent-turn": assertAgentTurn,

188265

"assert-file-contains": assertFileContains,