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

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
L
LangChain Blog
腾讯CDC
Y
Y Combinator Blog
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
MyScale Blog
MyScale Blog
博客园 - Franky
IT之家
IT之家
博客园_首页

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: keep user turn replay hooks idempotent · openclaw/op...
shakkernerd · 2026-05-27 · via Recent Commits to openclaw:main

@@ -243,6 +243,8 @@ type AppendSessionTranscriptMessageParams<TMessage = unknown> = {

243243

useRawWhenLinear?: boolean;

244244

/** Opt into transcript idempotency lookup; default append stays O(1) for fresh keyed messages. */

245245

idempotencyLookup?: "scan" | "caller-checked";

246+

/** Runs under the transcript write lock after idempotency replay checks and before append. */

247+

prepareMessageAfterIdempotencyCheck?: (message: TMessage) => TMessage | undefined;

246248

config?: OpenClawConfig;

247249

};

248250

@@ -261,9 +263,17 @@ function isTranscriptAgentMessage(value: unknown): value is AgentMessage {

261263

);

262264

}

263265266+

export async function appendSessionTranscriptMessage<TMessage>(

267+

params: AppendSessionTranscriptMessageParams<TMessage> & {

268+

prepareMessageAfterIdempotencyCheck: (message: TMessage) => TMessage | undefined;

269+

},

270+

): Promise<AppendSessionTranscriptMessageResult<TMessage> | undefined>;

271+

export async function appendSessionTranscriptMessage<TMessage>(

272+

params: AppendSessionTranscriptMessageParams<TMessage>,

273+

): Promise<AppendSessionTranscriptMessageResult<TMessage>>;

264274

export async function appendSessionTranscriptMessage<TMessage>(

265275

params: AppendSessionTranscriptMessageParams<TMessage>,

266-

): Promise<AppendSessionTranscriptMessageResult<TMessage>> {

276+

): Promise<AppendSessionTranscriptMessageResult<TMessage> | undefined> {

267277

const activeLockRunner = resolveOwnedSessionTranscriptWriteLockRunner({

268278

sessionFile: params.transcriptPath,

269279

});

@@ -300,7 +310,7 @@ async function withSessionTranscriptWriteLock<T>(

300310301311

async function appendSessionTranscriptMessageLocked<TMessage>(

302312

params: AppendSessionTranscriptMessageParams<TMessage>,

303-

): Promise<AppendSessionTranscriptMessageResult<TMessage>> {

313+

): Promise<AppendSessionTranscriptMessageResult<TMessage> | undefined> {

304314

const now = params.now ?? Date.now();

305315

await ensureTranscriptHeader(params.transcriptPath, {

306316

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

@@ -315,6 +325,13 @@ async function appendSessionTranscriptMessageLocked<TMessage>(

315325

return { ...existing, message: existing.message as TMessage, appended: false };

316326

}

317327328+

const message = params.prepareMessageAfterIdempotencyCheck

329+

? params.prepareMessageAfterIdempotencyCheck(params.message)

330+

: params.message;

331+

if (message === undefined) {

332+

return undefined;

333+

}

334+318335

const messageId = randomUUID();

319336

const stat = await fs.stat(params.transcriptPath).catch(() => null);

320337

let leafInfo: TranscriptLeafInfo = await readTranscriptLeafInfo(params.transcriptPath).catch(

@@ -336,9 +353,9 @@ async function appendSessionTranscriptMessageLocked<TMessage>(

336353

};

337354

}

338355

const finalMessage = (

339-

isTranscriptAgentMessage(params.message)

340-

? redactTranscriptMessage(params.message, params.config)

341-

: redactSecrets(params.message)

356+

isTranscriptAgentMessage(message)

357+

? redactTranscriptMessage(message, params.config)

358+

: redactSecrets(message)

342359

) as TMessage;

343360

const entry = {

344361

type: "message",