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

推荐订阅源

V
Visual Studio Blog
博客园 - 司徒正美
博客园_首页
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
I
InfoQ
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
L
LangChain Blog
Last Week in AI
Last Week in AI
A
About on SuperTechFans
B
Blog
博客园 - 叶小钗
雷峰网
雷峰网
H
Help Net Security
WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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: persist pending onboarding plugin installs · opencla...
shakkernerd · 2026-04-26 · via Recent Commits to openclaw:main

@@ -17,26 +17,24 @@ function mergeUnsetPaths(

1717

return merged.length > 0 ? merged : undefined;

1818

}

191920-

export async function commitPluginInstallRecordsWithConfig(params: {

20+

type ConfigCommit = (config: OpenClawConfig, writeOptions?: ConfigWriteOptions) => Promise<void>;

21+22+

async function commitPluginInstallRecordsWithWriter(params: {

2123

previousInstallRecords?: Record<string, PluginInstallRecord>;

2224

nextInstallRecords: Record<string, PluginInstallRecord>;

2325

nextConfig: OpenClawConfig;

24-

baseHash?: string;

2526

writeOptions?: ConfigWriteOptions;

27+

commit: ConfigCommit;

2628

}): Promise<void> {

2729

const previousInstallRecords =

2830

params.previousInstallRecords ?? (await loadInstalledPluginIndexInstallRecords());

2931

await writePersistedInstalledPluginIndexInstallRecords(params.nextInstallRecords);

3032

try {

31-

await replaceConfigFile({

32-

nextConfig: params.nextConfig,

33-

...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),

34-

writeOptions: {

35-

...params.writeOptions,

36-

unsetPaths: mergeUnsetPaths(params.writeOptions?.unsetPaths, [

37-

Array.from(PLUGIN_INSTALLS_CONFIG_PATH),

38-

]),

39-

},

33+

await params.commit(params.nextConfig, {

34+

...params.writeOptions,

35+

unsetPaths: mergeUnsetPaths(params.writeOptions?.unsetPaths, [

36+

Array.from(PLUGIN_INSTALLS_CONFIG_PATH),

37+

]),

4038

});

4139

} catch (error) {

4240

try {

@@ -51,22 +49,41 @@ export async function commitPluginInstallRecordsWithConfig(params: {

5149

}

5250

}

535154-

export async function commitConfigWithPendingPluginInstalls(params: {

52+

export async function commitPluginInstallRecordsWithConfig(params: {

53+

previousInstallRecords?: Record<string, PluginInstallRecord>;

54+

nextInstallRecords: Record<string, PluginInstallRecord>;

5555

nextConfig: OpenClawConfig;

5656

baseHash?: string;

5757

writeOptions?: ConfigWriteOptions;

58+

}): Promise<void> {

59+

await commitPluginInstallRecordsWithWriter({

60+

...params,

61+

commit: async (nextConfig, writeOptions) => {

62+

await replaceConfigFile({

63+

nextConfig,

64+

...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),

65+

...(writeOptions ? { writeOptions } : {}),

66+

});

67+

},

68+

});

69+

}

70+71+

export async function commitConfigWriteWithPendingPluginInstalls(params: {

72+

nextConfig: OpenClawConfig;

73+

writeOptions?: ConfigWriteOptions;

74+

commit: ConfigCommit;

5875

}): Promise<{

5976

config: OpenClawConfig;

6077

installRecords: Record<string, PluginInstallRecord>;

6178

movedInstallRecords: boolean;

6279

}> {

6380

const pendingInstallRecords = params.nextConfig.plugins?.installs ?? {};

6481

if (Object.keys(pendingInstallRecords).length === 0) {

65-

await replaceConfigFile({

66-

nextConfig: params.nextConfig,

67-

...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),

68-

...(params.writeOptions ? { writeOptions: params.writeOptions } : {}),

69-

});

82+

if (params.writeOptions) {

83+

await params.commit(params.nextConfig, params.writeOptions);

84+

} else {

85+

await params.commit(params.nextConfig);

86+

}

7087

return {

7188

config: params.nextConfig,

7289

installRecords: {},

@@ -80,16 +97,38 @@ export async function commitConfigWithPendingPluginInstalls(params: {

8097

...pendingInstallRecords,

8198

};

8299

const strippedConfig = withoutPluginInstallRecords(params.nextConfig);

83-

await commitPluginInstallRecordsWithConfig({

100+

await commitPluginInstallRecordsWithWriter({

84101

previousInstallRecords,

85102

nextInstallRecords,

86103

nextConfig: strippedConfig,

87-

...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),

88104

...(params.writeOptions ? { writeOptions: params.writeOptions } : {}),

105+

commit: params.commit,

89106

});

90107

return {

91108

config: strippedConfig,

92109

installRecords: nextInstallRecords,

93110

movedInstallRecords: true,

94111

};

95112

}

113+114+

export async function commitConfigWithPendingPluginInstalls(params: {

115+

nextConfig: OpenClawConfig;

116+

baseHash?: string;

117+

writeOptions?: ConfigWriteOptions;

118+

}): Promise<{

119+

config: OpenClawConfig;

120+

installRecords: Record<string, PluginInstallRecord>;

121+

movedInstallRecords: boolean;

122+

}> {

123+

return await commitConfigWriteWithPendingPluginInstalls({

124+

nextConfig: params.nextConfig,

125+

...(params.writeOptions ? { writeOptions: params.writeOptions } : {}),

126+

commit: async (nextConfig, writeOptions) => {

127+

await replaceConfigFile({

128+

nextConfig,

129+

...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),

130+

...(writeOptions ? { writeOptions } : {}),

131+

});

132+

},

133+

});

134+

}