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

推荐订阅源

Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
D
Docker
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MyScale Blog
MyScale Blog
A
About on SuperTechFans
博客园 - 【当耐特】
U
Unit 42
H
Help Net Security
博客园 - 三生石上(FineUI控件)
V2EX - 技术
V2EX - 技术
T
Tor Project blog
博客园 - 叶小钗
G
Google Developers Blog
S
Securelist
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
The Register - Security
The Register - Security
Recorded Future
Recorded Future
NISL@THU
NISL@THU
量子位
L
LangChain Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CERT Recently Published Vulnerability Notes
The Hacker News
The Hacker News
D
DataBreaches.Net
小众软件
小众软件
罗磊的独立博客
Forbes - Security
Forbes - Security
The Last Watchdog
The Last Watchdog
Jina AI
Jina AI
I
InfoQ
S
Schneier on Security
Recent Announcements
Recent Announcements
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
Secure Thoughts

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix telegram context session start boundary · openclaw/openclaw@afd7339
VACInc · 2026-05-12 · via Recent Commits to openclaw:main

@@ -179,6 +179,7 @@ export const registerTelegramHandlers = ({

179179

key: string;

180180

threadId?: number;

181181

messages: Array<{ msg: Message; ctx: TelegramContext; receivedAtMs: number }>;

182+

promptContextMinTimestampMs?: number;

182183

timer: ReturnType<typeof setTimeout>;

183184

};

184185

const textFragmentBuffer = new Map<string, TextFragmentEntry>();

@@ -197,6 +198,22 @@ export const registerTelegramHandlers = ({

197198

debounceLane: TelegramDebounceLane;

198199

botUsername?: string;

199200

threadId?: number;

201+

promptContextMinTimestampMs?: number;

202+

};

203+

const normalizePromptContextMinTimestampMs = (timestampMs?: number) =>

204+

typeof timestampMs === "number" && Number.isFinite(timestampMs) ? timestampMs : undefined;

205+

const latestPromptContextMinTimestampMs = (

206+

...timestamps: Array<number | undefined>

207+

): number | undefined => {

208+

let latest: number | undefined;

209+

for (const timestampMs of timestamps) {

210+

const normalized = normalizePromptContextMinTimestampMs(timestampMs);

211+

if (normalized === undefined) {

212+

continue;

213+

}

214+

latest = latest === undefined ? normalized : Math.max(latest, normalized);

215+

}

216+

return latest;

200217

};

201218

const resolveTelegramDebounceLane = (msg: Message): TelegramDebounceLane => {

202219

const forwardMeta = msg as {

@@ -394,9 +411,13 @@ export const registerTelegramHandlers = ({

394411

return;

395412

}

396413

if (entries.length === 1) {

414+

const promptContextMinTimestampMs = normalizePromptContextMinTimestampMs(

415+

last.promptContextMinTimestampMs,

416+

);

397417

await processMessageWithReplyChain(last.ctx, last.msg, last.allMedia, last.storeAllowFrom, {

398418

receivedAtMs: last.receivedAtMs,

399419

ingressBuffer: "inbound-debounce",

420+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

400421

});

401422

return;

402423

}

@@ -409,6 +430,9 @@ export const registerTelegramHandlers = ({

409430

return;

410431

}

411432

const first = entries[0];

433+

const promptContextMinTimestampMs = latestPromptContextMinTimestampMs(

434+

...entries.map((entry) => entry.promptContextMinTimestampMs),

435+

);

412436

const baseCtx = first.ctx;

413437

const syntheticMessage = buildSyntheticTextMessage({

414438

base: first.msg,

@@ -426,6 +450,7 @@ export const registerTelegramHandlers = ({

426450

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

427451

receivedAtMs: first.receivedAtMs,

428452

ingressBuffer: "inbound-debounce",

453+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

429454

},

430455

);

431456

},

@@ -454,13 +479,14 @@ export const registerTelegramHandlers = ({

454479

messageThreadId?: number;

455480

resolvedThreadId?: number;

456481

senderId?: string | number;

482+

runtimeCfg?: OpenClawConfig;

457483

}): {

458484

agentId: string;

459485

sessionEntry: ReturnType<typeof resolveSessionStoreEntry>["existing"];

460486

sessionKey: string;

461487

model?: string;

462488

} => {

463-

const runtimeCfg = telegramDeps.getRuntimeConfig();

489+

const runtimeCfg = params.runtimeCfg ?? telegramDeps.getRuntimeConfig();

464490

const resolvedThreadId =

465491

params.resolvedThreadId ??

466492

resolveTelegramForumThreadId({

@@ -505,7 +531,7 @@ export const registerTelegramHandlers = ({

505531

const storePath = telegramDeps.resolveStorePath(runtimeCfg.session?.store, {

506532

agentId: route.agentId,

507533

});

508-

const store = loadSessionStore(storePath);

534+

const store = (telegramDeps.loadSessionStore ?? loadSessionStore)(storePath);

509535

const entry = resolveSessionStoreEntry({ store, sessionKey }).existing;

510536

const storedOverride = resolveStoredModelOverride({

511537

sessionEntry: entry,

@@ -585,6 +611,9 @@ export const registerTelegramHandlers = ({

585611

primaryEntry.msg,

586612

allMedia,

587613

storeAllowFrom,

614+

entry.promptContextMinTimestampMs !== undefined

615+

? { promptContextMinTimestampMs: entry.promptContextMinTimestampMs }

616+

: undefined,

588617

);

589618

} catch (err) {

590619

runtime.error?.(danger(`media group handler failed: ${String(err)}`));

@@ -620,6 +649,9 @@ export const registerTelegramHandlers = ({

620649

messageIdOverride: String(last.msg.message_id),

621650

receivedAtMs: first.receivedAtMs,

622651

ingressBuffer: "text-fragment",

652+

...(entry.promptContextMinTimestampMs !== undefined

653+

? { promptContextMinTimestampMs: entry.promptContextMinTimestampMs }

654+

: {}),

623655

});

624656

} catch (err) {

625657

runtime.error?.(danger(`text fragment handler failed: ${String(err)}`));

@@ -698,6 +730,7 @@ export const registerTelegramHandlers = ({

698730

const buildPromptContextForMessage = (

699731

msg: Message,

700732

replyChainNodes: TelegramCachedMessageNode[],

733+

options?: TelegramMessageContextOptions,

701734

): TelegramPromptContextEntry[] => {

702735

const messageId = typeof msg.message_id === "number" ? String(msg.message_id) : undefined;

703736

const currentNode = messageCache.get({

@@ -715,6 +748,9 @@ export const registerTelegramHandlers = ({

715748

replyChainNodes,

716749

recentLimit: 10,

717750

replyTargetWindowSize: 2,

751+

...(options?.promptContextMinTimestampMs !== undefined

752+

? { minTimestampMs: options.promptContextMinTimestampMs }

753+

: {}),

718754

});

719755

return conversationContext.length > 0

720756

? [

@@ -785,7 +821,7 @@ export const registerTelegramHandlers = ({

785821

) => {

786822

const replyChainNodes = buildReplyChainForMessage(msg);

787823

const { replyMedia, replyChain } = await resolveReplyMediaForChain(ctx, replyChainNodes);

788-

const promptContext = buildPromptContextForMessage(msg, replyChainNodes);

824+

const promptContext = buildPromptContextForMessage(msg, replyChainNodes, options);

789825

await processMessage(

790826

ctx,

791827

allMedia,

@@ -1267,6 +1303,7 @@ export const registerTelegramHandlers = ({

12671303

storeAllowFrom: string[];

12681304

sendOversizeWarning: boolean;

12691305

oversizeLogMessage: string;

1306+

promptContextMinTimestampMs?: number;

12701307

}) => {

12711308

const {

12721309

ctx,

@@ -1277,6 +1314,7 @@ export const registerTelegramHandlers = ({

12771314

storeAllowFrom,

12781315

sendOversizeWarning,

12791316

oversizeLogMessage,

1317+

promptContextMinTimestampMs,

12801318

} = params;

1281131912821320

// Text fragment handling - Telegram splits long pastes into multiple inbound messages (~4096 chars).

@@ -1314,6 +1352,10 @@ export const registerTelegramHandlers = ({

13141352

nextTotalChars <= TELEGRAM_TEXT_FRAGMENT_MAX_TOTAL_CHARS

13151353

) {

13161354

existing.messages.push({ msg, ctx, receivedAtMs: nowMs });

1355+

existing.promptContextMinTimestampMs = latestPromptContextMinTimestampMs(

1356+

existing.promptContextMinTimestampMs,

1357+

promptContextMinTimestampMs,

1358+

);

13171359

scheduleTextFragmentFlush(existing);

13181360

return;

13191361

}

@@ -1335,6 +1377,7 @@ export const registerTelegramHandlers = ({

13351377

const entry: TextFragmentEntry = {

13361378

key,

13371379

messages: [{ msg, ctx, receivedAtMs: nowMs }],

1380+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

13381381

timer: setTimeout(() => {}, TELEGRAM_TEXT_FRAGMENT_MAX_GAP_MS),

13391382

};

13401383

textFragmentBuffer.set(key, entry);

@@ -1350,6 +1393,10 @@ export const registerTelegramHandlers = ({

13501393

if (existing) {

13511394

clearTimeout(existing.timer);

13521395

existing.messages.push({ msg, ctx });

1396+

existing.promptContextMinTimestampMs = latestPromptContextMinTimestampMs(

1397+

existing.promptContextMinTimestampMs,

1398+

promptContextMinTimestampMs,

1399+

);

13531400

existing.timer = setTimeout(async () => {

13541401

mediaGroupBuffer.delete(mediaGroupId);

13551402

mediaGroupProcessing = mediaGroupProcessing

@@ -1362,6 +1409,7 @@ export const registerTelegramHandlers = ({

13621409

} else {

13631410

const entry: MediaGroupEntry = {

13641411

messages: [{ msg, ctx }],

1412+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

13651413

timer: setTimeout(async () => {

13661414

mediaGroupBuffer.delete(mediaGroupId);

13671415

mediaGroupProcessing = mediaGroupProcessing

@@ -1458,6 +1506,7 @@ export const registerTelegramHandlers = ({

14581506

debounceKey,

14591507

debounceLane,

14601508

botUsername: ctx.me?.username,

1509+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

14611510

});

14621511

};

14631512

bot.on("callback_query", async (ctx) => {

@@ -2326,6 +2375,18 @@ export const registerTelegramHandlers = ({

23262375

}

23272376

}

232823772378+

const promptContextMinTimestampMs = normalizePromptContextMinTimestampMs(

2379+

resolveTelegramSessionState({

2380+

chatId: event.chatId,

2381+

isGroup: event.isGroup,

2382+

isForum: event.isForum,

2383+

messageThreadId: event.messageThreadId,

2384+

resolvedThreadId,

2385+

senderId: event.senderId,

2386+

runtimeCfg: cfg,

2387+

}).sessionEntry?.sessionStartedAt,

2388+

);

2389+23292390

recordMessageForReplyChain(event.msg, resolvedThreadId ?? dmThreadId);

23302391

await processInboundMessage({

23312392

ctx: event.ctx,

@@ -2336,6 +2397,7 @@ export const registerTelegramHandlers = ({

23362397

storeAllowFrom,

23372398

sendOversizeWarning: event.sendOversizeWarning,

23382399

oversizeLogMessage: event.oversizeLogMessage,

2400+

...(promptContextMinTimestampMs !== undefined ? { promptContextMinTimestampMs } : {}),

23392401

});

23402402

} catch (err) {

23412403

runtime.error?.(danger(`${event.errorMessage}: ${String(err)}`));