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

推荐订阅源

D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
B
Blog RSS Feed
H
Help Net Security
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
L
LangChain Blog
Vercel News
Vercel News

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(bluebubbles): scope short message id resolution to th...
2026-04-29 · via Recent Commits to openclaw:main

@@ -17,9 +17,11 @@ import {

1717

type ChannelMessageActionAdapter,

1818

type ChannelMessageActionName,

1919

} from "./actions-api.js";

20+

import type { BlueBubblesChatContext } from "./monitor-reply-cache.js";

2021

import { getCachedBlueBubblesPrivateApiStatus, isMacOS26OrHigher } from "./probe.js";

2122

import { normalizeSecretInputString } from "./secret-input.js";

2223

import {

24+

buildBlueBubblesChatContextFromTarget,

2325

normalizeBlueBubblesHandle,

2426

normalizeBlueBubblesMessagingTarget,

2527

parseBlueBubblesTarget,

@@ -51,6 +53,32 @@ function mapTarget(raw: string): BlueBubblesSendTarget {

5153

};

5254

}

535556+

/**

57+

* Collect any chat-identifying hints the action caller supplied, so short

58+

* message id resolution can reject cross-chat collisions. The order of

59+

* precedence mirrors resolveChatGuid: explicit chat* params first, then the

60+

* `to`/`target` param, then the current session channel as a last resort.

61+

*/

62+

function buildChatContextFromActionParams(params: {

63+

actionParams: Record<string, unknown>;

64+

currentChannelId?: string;

65+

}): BlueBubblesChatContext {

66+

const explicitChatGuid = readStringParam(params.actionParams, "chatGuid")?.trim();

67+

const explicitChatIdentifier = readStringParam(params.actionParams, "chatIdentifier")?.trim();

68+

const explicitChatId = readNumberParam(params.actionParams, "chatId", { integer: true });

69+

const rawTarget =

70+

readStringParam(params.actionParams, "to") ??

71+

readStringParam(params.actionParams, "target") ??

72+

params.currentChannelId ??

73+

undefined;

74+

const targetContext = buildBlueBubblesChatContextFromTarget(rawTarget);

75+

return {

76+

chatGuid: explicitChatGuid || targetContext.chatGuid,

77+

chatIdentifier: explicitChatIdentifier || targetContext.chatIdentifier,

78+

chatId: typeof explicitChatId === "number" ? explicitChatId : targetContext.chatId,

79+

};

80+

}

81+5482

function readMessageText(params: Record<string, unknown>): string | undefined {

5583

return readStringParam(params, "text") ?? readStringParam(params, "message");

5684

}

@@ -201,9 +229,15 @@ export const bluebubblesMessageActions: ChannelMessageActionAdapter = {

201229

"Use action=react with messageId=<message_id>, emoji=<emoji>, and to/chatGuid to identify the chat.",

202230

);

203231

}

204-

// Resolve short ID (e.g., "1", "2") to full UUID

232+

// Resolve short ID (e.g., "1", "2") to full UUID, scoped to the chat the

233+

// caller is acting on so a short ID from a different chat cannot be

234+

// silently accepted (see cross-chat guard in resolveBlueBubblesMessageId).

205235

const messageId = runtime.resolveBlueBubblesMessageId(rawMessageId, {

206236

requireKnownShortId: true,

237+

chatContext: buildChatContextFromActionParams({

238+

actionParams: params,

239+

currentChannelId: toolContext?.currentChannelId,

240+

}),

207241

});

208242

const partIndex = readNumberParam(params, "partIndex", { integer: true });

209243

const resolvedChatGuid = await resolveChatGuid();

@@ -248,9 +282,14 @@ export const bluebubblesMessageActions: ChannelMessageActionAdapter = {

248282

`Use action=edit with messageId=<message_id>, text=<new_content>.`,

249283

);

250284

}

251-

// Resolve short ID (e.g., "1", "2") to full UUID

285+

// Resolve short ID (e.g., "1", "2") to full UUID, scoped to the chat

286+

// the caller is acting on (cross-chat guard).

252287

const messageId = runtime.resolveBlueBubblesMessageId(rawMessageId, {

253288

requireKnownShortId: true,

289+

chatContext: buildChatContextFromActionParams({

290+

actionParams: params,

291+

currentChannelId: toolContext?.currentChannelId,

292+

}),

254293

});

255294

const partIndex = readNumberParam(params, "partIndex", { integer: true });

256295

const backwardsCompatMessage = readStringParam(params, "backwardsCompatMessage");

@@ -274,9 +313,14 @@ export const bluebubblesMessageActions: ChannelMessageActionAdapter = {

274313

"Use action=unsend with messageId=<message_id>.",

275314

);

276315

}

277-

// Resolve short ID (e.g., "1", "2") to full UUID

316+

// Resolve short ID (e.g., "1", "2") to full UUID, scoped to the chat

317+

// the caller is acting on (cross-chat guard).

278318

const messageId = runtime.resolveBlueBubblesMessageId(rawMessageId, {

279319

requireKnownShortId: true,

320+

chatContext: buildChatContextFromActionParams({

321+

actionParams: params,

322+

currentChannelId: toolContext?.currentChannelId,

323+

}),

280324

});

281325

const partIndex = readNumberParam(params, "partIndex", { integer: true });

282326

@@ -310,9 +354,14 @@ export const bluebubblesMessageActions: ChannelMessageActionAdapter = {

310354

`Use action=reply with messageId=<message_id>, message=<your reply>, target=<chat_target>.`,

311355

);

312356

}

313-

// Resolve short ID (e.g., "1", "2") to full UUID

357+

// Resolve short ID (e.g., "1", "2") to full UUID, scoped to the chat

358+

// the caller is acting on (cross-chat guard).

314359

const messageId = runtime.resolveBlueBubblesMessageId(rawMessageId, {

315360

requireKnownShortId: true,

361+

chatContext: buildChatContextFromActionParams({

362+

actionParams: params,

363+

currentChannelId: toolContext?.currentChannelId,

364+

}),

316365

});

317366

const partIndex = readNumberParam(params, "partIndex", { integer: true });

318367