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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
B
Blog RSS Feed
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
D
Docker
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
H
Help Net Security
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
博客园 - Franky
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Blog — PlanetScale
Blog — PlanetScale
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(config): return persisted config write responses (#81...
giodl73-repo · 2026-05-15 · via Recent Commits to openclaw:main

@@ -4,6 +4,7 @@ import {

44

resolveConfigWriteAfterWrite,

55

transformConfigFileWithRetry,

66

type ConfigMutationCommit,

7+

type ConfigReplaceResult,

78

type ConfigMutationResult,

89

type ConfigMutationContext,

910

type ConfigTransformResult,

@@ -27,7 +28,10 @@ function mergeUnsetPaths(

2728

return merged.length > 0 ? merged : undefined;

2829

}

293030-

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

31+

type ConfigCommit = (

32+

config: OpenClawConfig,

33+

writeOptions?: ConfigWriteOptions,

34+

) => Promise<ConfigReplaceResult | void>;

3135

const PLUGIN_SOURCE_CHANGED_RESTART_REASON = "plugin source changed";

32363337

function mergeAfterWrite(

@@ -49,7 +53,7 @@ async function commitPluginInstallRecordsWithWriter(params: {

4953

nextConfig: OpenClawConfig;

5054

writeOptions?: ConfigWriteOptions;

5155

commit: ConfigCommit;

52-

}): Promise<void> {

56+

}): Promise<ConfigReplaceResult | void> {

5357

const previousInstallRecords =

5458

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

5559

await writePersistedInstalledPluginIndexInstallRecords(params.nextInstallRecords);

@@ -58,7 +62,7 @@ async function commitPluginInstallRecordsWithWriter(params: {

5862

previousInstallRecords,

5963

params.nextInstallRecords,

6064

);

61-

await params.commit(params.nextConfig, {

65+

return await params.commit(params.nextConfig, {

6266

...params.writeOptions,

6367

...(installRecordsChanged && params.writeOptions?.afterWrite === undefined

6468

? { afterWrite: { mode: "restart", reason: PLUGIN_SOURCE_CHANGED_RESTART_REASON } }

@@ -90,7 +94,7 @@ export async function commitPluginInstallRecordsWithConfig(params: {

9094

await commitPluginInstallRecordsWithWriter({

9195

...params,

9296

commit: async (nextConfig, writeOptions) => {

93-

await replaceConfigFile({

97+

return await replaceConfigFile({

9498

nextConfig,

9599

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

96100

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

@@ -107,18 +111,18 @@ export async function commitConfigWriteWithPendingPluginInstalls(params: {

107111

config: OpenClawConfig;

108112

installRecords: Record<string, PluginInstallRecord>;

109113

movedInstallRecords: boolean;

114+

persistedHash: string | null;

110115

}> {

111116

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

112117

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

113-

if (params.writeOptions) {

114-

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

115-

} else {

116-

await params.commit(params.nextConfig);

117-

}

118+

const committed = params.writeOptions

119+

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

120+

: await params.commit(params.nextConfig);

118121

return {

119122

config: params.nextConfig,

120123

installRecords: {},

121124

movedInstallRecords: false,

125+

persistedHash: committed?.persistedHash ?? null,

122126

};

123127

}

124128

@@ -128,7 +132,7 @@ export async function commitConfigWriteWithPendingPluginInstalls(params: {

128132

...pendingInstallRecords,

129133

};

130134

const strippedConfig = withoutPluginInstallRecords(params.nextConfig);

131-

await commitPluginInstallRecordsWithWriter({

135+

const committed = await commitPluginInstallRecordsWithWriter({

132136

previousInstallRecords,

133137

nextInstallRecords,

134138

nextConfig: strippedConfig,

@@ -139,6 +143,7 @@ export async function commitConfigWriteWithPendingPluginInstalls(params: {

139143

config: strippedConfig,

140144

installRecords: nextInstallRecords,

141145

movedInstallRecords: true,

146+

persistedHash: committed?.persistedHash ?? null,

142147

};

143148

}

144149

@@ -150,12 +155,13 @@ export async function commitConfigWithPendingPluginInstalls(params: {

150155

config: OpenClawConfig;

151156

installRecords: Record<string, PluginInstallRecord>;

152157

movedInstallRecords: boolean;

158+

persistedHash: string | null;

153159

}> {

154160

return await commitConfigWriteWithPendingPluginInstalls({

155161

nextConfig: params.nextConfig,

156162

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

157163

commit: async (nextConfig, writeOptions) => {

158-

await replaceConfigFile({

164+

return await replaceConfigFile({

159165

nextConfig,

160166

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

161167

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

@@ -173,7 +179,7 @@ export async function transformConfigWithPendingPluginInstalls<T = void>(

173179

nextConfig,

174180

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

175181

commit: async (config, commitWriteOptions) => {

176-

await replaceConfigFile({

182+

return await replaceConfigFile({

177183

nextConfig: config,

178184

snapshot,

179185

writeOptions: commitWriteOptions ?? {},

@@ -189,6 +195,7 @@ export async function transformConfigWithPendingPluginInstalls<T = void>(

189195

);

190196

return {

191197

config: committed.config,

198+

persistedHash: committed.persistedHash,

192199

afterWrite,

193200

};

194201

};