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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Y
Y Combinator Blog
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
P
Proofpoint News Feed
Jina AI
Jina AI
B
Blog RSS Feed
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
D
Docker

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
refactor: route auto-reply sessions through session seam ...
jalehman · 2026-06-16 · via Recent Commits to openclaw:main

@@ -23,12 +23,24 @@ const legacyWholeStoreAccessNames = new Set([

2323

"saveSessionStore",

2424

"updateSessionStore",

2525

]);

26+

const legacyWriterNames = new Set([

27+

"applySessionStoreEntryPatch",

28+

"saveSessionStore",

29+

"updateSessionStore",

30+

"updateSessionStoreEntry",

31+

]);

26322733

export const migratedSessionAccessorFiles = new Set([

2834

"src/agents/embedded-agent-runner/compaction-successor-transcript.ts",

35+

"src/agents/embedded-agent-runner/run/attempt.ts",

2936

"src/agents/embedded-agent-runner/tool-result-truncation.ts",

3037

"src/agents/embedded-agent-runner/transcript-rewrite.ts",

3138

"src/agents/embedded-agent-runner/transcript-runtime-state.ts",

39+

"src/auto-reply/reply/agent-runner-helpers.ts",

40+

"src/auto-reply/reply/agent-runner.ts",

41+

"src/auto-reply/reply/commands-subagents/action-info.ts",

42+

"src/auto-reply/reply/followup-runner.ts",

43+

"src/auto-reply/reply/queue/drain.ts",

3244

"src/commands/export-trajectory.ts",

3345

"src/commands/health.ts",

3446

"src/commands/sandbox-explain.ts",

@@ -52,6 +64,30 @@ export const migratedBundledPluginSessionAccessorFiles = new Set([

5264

"extensions/telegram/src/bot-handlers.runtime.ts",

5365

]);

546667+

export const migratedSessionAccessorWriteFiles = new Set([

68+

"src/agents/command/attempt-execution.shared.ts",

69+

"src/agents/command/session-store.ts",

70+

"src/agents/embedded-agent-runner/run.ts",

71+

"src/agents/embedded-agent-runner/run/attempt.ts",

72+

"src/auto-reply/reply/abort-cutoff.runtime.ts",

73+

"src/auto-reply/reply/agent-runner-cli-dispatch.ts",

74+

"src/auto-reply/reply/agent-runner-execution.ts",

75+

"src/auto-reply/reply/agent-runner-memory.ts",

76+

"src/auto-reply/reply/agent-runner.ts",

77+

"src/auto-reply/reply/body.ts",

78+

"src/auto-reply/reply/commands-acp/lifecycle.ts",

79+

"src/auto-reply/reply/commands-reset.ts",

80+

"src/auto-reply/reply/directive-handling.impl.ts",

81+

"src/auto-reply/reply/directive-handling.persist.ts",

82+

"src/auto-reply/reply/dispatch-from-config.runtime.ts",

83+

"src/auto-reply/reply/followup-runner.ts",

84+

"src/auto-reply/reply/get-reply.ts",

85+

"src/auto-reply/reply/model-selection.ts",

86+

"src/auto-reply/reply/session-reset-model.ts",

87+

"src/auto-reply/reply/session-updates.ts",

88+

"src/auto-reply/reply/session-usage.ts",

89+

]);

90+5591

function normalizeRelativePath(filePath) {

5692

return filePath.replaceAll(path.sep, "/");

5793

}

@@ -91,9 +127,8 @@ function bindingName(node) {

91127

return null;

92128

}

9312994-

export function findSessionAccessorBoundaryViolations(content, fileName = "source.ts") {

130+

function findNamedSessionStoreViolations(content, fileName, legacyNames, legacyKind) {

95131

const sourceFile = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, true);

96-

const legacyNames = legacyNamesForFile(fileName);

97132

const violations = [];

9813399134

const visit = (node) => {

@@ -105,7 +140,7 @@ export function findSessionAccessorBoundaryViolations(content, fileName = "sourc

105140

if (legacyNames.has(importedName)) {

106141

violations.push({

107142

line: toLine(sourceFile, specifier),

108-

reason: `imports legacy session store access "${importedName}"`,

143+

reason: `imports legacy session store ${legacyKind} "${importedName}"`,

109144

});

110145

}

111146

}

@@ -117,15 +152,15 @@ export function findSessionAccessorBoundaryViolations(content, fileName = "sourc

117152

if (name && legacyNames.has(name)) {

118153

violations.push({

119154

line: toLine(sourceFile, node),

120-

reason: `aliases legacy session store access "${name}"`,

155+

reason: `aliases legacy session store ${legacyKind} "${name}"`,

121156

});

122157

}

123158

}

124159125160

if (ts.isPropertyAccessExpression(node) && legacyNames.has(node.name.text)) {

126161

violations.push({

127162

line: toLine(sourceFile, node.name),

128-

reason: `references legacy session store access "${node.name.text}"`,

163+

reason: `references legacy session store ${legacyKind} "${node.name.text}"`,

129164

});

130165

}

131166

@@ -136,7 +171,7 @@ export function findSessionAccessorBoundaryViolations(content, fileName = "sourc

136171

) {

137172

violations.push({

138173

line: toLine(sourceFile, node.argumentExpression),

139-

reason: `references legacy session store access "${node.argumentExpression.text}"`,

174+

reason: `references legacy session store ${legacyKind} "${node.argumentExpression.text}"`,

140175

});

141176

}

142177

@@ -149,7 +184,7 @@ export function findSessionAccessorBoundaryViolations(content, fileName = "sourc

149184

) {

150185

violations.push({

151186

line: toLine(sourceFile, node.expression),

152-

reason: `calls legacy session store access "${calleeName}"`,

187+

reason: `calls legacy session store ${legacyKind} "${calleeName}"`,

153188

});

154189

}

155190

}

@@ -161,21 +196,33 @@ export function findSessionAccessorBoundaryViolations(content, fileName = "sourc

161196

return violations;

162197

}

163198199+

export function findSessionAccessorBoundaryViolations(content, fileName = "source.ts") {

200+

const legacyNames = legacyNamesForFile(fileName);

201+

const legacyKind = legacyNames === legacyWholeStoreAccessNames ? "access" : "reader";

202+

return findNamedSessionStoreViolations(content, fileName, legacyNames, legacyKind);

203+

}

204+205+

export function findSessionAccessorWriteBoundaryViolations(content, fileName = "source.ts") {

206+

return findNamedSessionStoreViolations(content, fileName, legacyWriterNames, "writer");

207+

}

208+164209

export async function main() {

165210

const repoRoot = resolveRepoRoot(import.meta.url);

166-

const sourceRoots = resolveSourceRoots(repoRoot, [

211+

const readSourceRoots = resolveSourceRoots(repoRoot, [

167212

"extensions/discord/src/monitor",

168213

"extensions/telegram/src",

169-

"src/agents/embedded-agent-runner",

214+

"src/agents",

215+

"src/auto-reply",

170216

"src/commands",

171217

"src/config/sessions",

172218

"src/cron",

173219

"src/gateway",

174220

"src/infra",

175221

]);

176-

const violations = await collectFileViolations({

222+

const writeSourceRoots = resolveSourceRoots(repoRoot, ["src/agents", "src/auto-reply"]);

223+

const readViolations = await collectFileViolations({

177224

repoRoot,

178-

sourceRoots,

225+

sourceRoots: readSourceRoots,

179226

skipFile: (filePath) => {

180227

const relativePath = normalizeRelativePath(path.relative(repoRoot, filePath));

181228

return (

@@ -185,18 +232,28 @@ export async function main() {

185232

},

186233

findViolations: findSessionAccessorBoundaryViolations,

187234

});

235+

const writeViolations = await collectFileViolations({

236+

repoRoot,

237+

sourceRoots: writeSourceRoots,

238+

skipFile: (filePath) =>

239+

!migratedSessionAccessorWriteFiles.has(

240+

normalizeRelativePath(path.relative(repoRoot, filePath)),

241+

),

242+

findViolations: findSessionAccessorWriteBoundaryViolations,

243+

});

244+

const violations = [...readViolations, ...writeViolations];

188245189246

if (violations.length === 0) {

190247

console.log("session accessor boundary guard passed.");

191248

return;

192249

}

193250194-

console.error("Found legacy session store access usage in session-accessor migrated files:");

251+

console.error("Found legacy session store usage in session-accessor migrated files:");

195252

for (const violation of violations) {

196253

console.error(`- ${violation.path}:${violation.line}: ${violation.reason}`);

197254

}

198255

console.error(

199-

"Use src/config/sessions/session-accessor.ts helpers for migrated paths. Expand this ratchet only after a slice migrates more files.",

256+

"Use src/config/sessions/session-accessor.ts helpers for migrated read/write paths. Expand this ratchet only after a slice migrates more files.",

200257

);

201258

process.exit(1);

202259

}