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

推荐订阅源

V
Visual Studio Blog
罗磊的独立博客
小众软件
小众软件
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
博客园_首页
N
Netflix TechBlog - Medium
B
Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
博客园 - 【当耐特】

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: preserve message-tool delivery evidence · openclaw/o...
shakkernerd · 2026-05-23 · via Recent Commits to openclaw:main

@@ -27,6 +27,7 @@ import type { OutboundSessionContext } from "../../infra/outbound/session-contex

2727

import { type RuntimeEnv, writeRuntimeJson } from "../../runtime.js";

2828

import { isInternalMessageChannel } from "../../utils/message-channel.js";

2929

import { isNestedAgentLane } from "../lanes.js";

30+

import type { MessagingToolSend } from "../pi-embedded-messaging.types.js";

3031

import type { EmbeddedPiRunMeta } from "../pi-embedded-runner/types.js";

3132

import type { AgentCommandOpts, AgentCommandResultMetaOverrides } from "./types.js";

3233

@@ -67,6 +68,10 @@ export type AgentCommandDeliveryStatus = {

6768

export type AgentCommandDeliveryResult = {

6869

payloads: ReturnType<typeof projectOutboundPayloadPlanForJson>;

6970

meta: EmbeddedPiRunMeta & AgentCommandResultMetaOverrides;

71+

didSendViaMessagingTool?: boolean;

72+

messagingToolSentTexts?: string[];

73+

messagingToolSentMediaUrls?: string[];

74+

messagingToolSentTargets?: MessagingToolSend[];

7075

deliverySucceeded?: boolean;

7176

deliveryStatus?: AgentCommandDeliveryStatus;

7277

};

@@ -159,6 +164,45 @@ function mergeResultMetaOverrides(

159164

};

160165

}

161166167+

function hasNonEmptyString(value: unknown): value is string {

168+

return typeof value === "string" && value.trim().length > 0;

169+

}

170+171+

function hasNonEmptyStringArray(value: unknown): value is string[] {

172+

return Array.isArray(value) && value.some(hasNonEmptyString);

173+

}

174+175+

function hasNonEmptyArray<T>(value: T[] | undefined): value is T[] {

176+

return Array.isArray(value) && value.length > 0;

177+

}

178+179+

function buildDeliveryResult(params: {

180+

payloads: AgentCommandDeliveryResult["payloads"];

181+

meta: AgentCommandDeliveryResult["meta"];

182+

result: RunResult;

183+

deliverySucceeded?: boolean;

184+

deliveryStatus?: AgentCommandDeliveryStatus;

185+

}): AgentCommandDeliveryResult {

186+

return {

187+

payloads: params.payloads,

188+

meta: params.meta,

189+

...(params.result.didSendViaMessagingTool === true ? { didSendViaMessagingTool: true } : {}),

190+

...(hasNonEmptyStringArray(params.result.messagingToolSentTexts)

191+

? { messagingToolSentTexts: params.result.messagingToolSentTexts }

192+

: {}),

193+

...(hasNonEmptyStringArray(params.result.messagingToolSentMediaUrls)

194+

? { messagingToolSentMediaUrls: params.result.messagingToolSentMediaUrls }

195+

: {}),

196+

...(hasNonEmptyArray(params.result.messagingToolSentTargets)

197+

? { messagingToolSentTargets: params.result.messagingToolSentTargets }

198+

: {}),

199+

...(params.deliverySucceeded !== undefined

200+

? { deliverySucceeded: params.deliverySucceeded }

201+

: {}),

202+

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

203+

};

204+

}

205+162206

function serializeDeliveryPayloadOutcomes(

163207

outcomes: DurableSendResult["payloadOutcomes"],

164208

): AgentCommandDeliveryPayloadOutcome[] | undefined {

@@ -611,12 +655,13 @@ export async function deliverAgentCommandResult(

611655

deliveryStatus = deliver ? (deliveryStatus ?? noVisiblePayloadStatus()) : undefined;

612656

const deliverySucceeded = deliveryStatus?.succeeded === true ? true : undefined;

613657

emitJsonEnvelope(deliveryStatus);

614-

return {

658+

return buildDeliveryResult({

615659

payloads: normalizedPayloads,

616660

meta: resultMeta,

617-

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

618-

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

619-

};

661+

result,

662+

deliverySucceeded,

663+

deliveryStatus,

664+

});

620665

}

621666622667

let deliverySucceeded = false;

@@ -639,7 +684,7 @@ export async function deliverAgentCommandResult(

639684

logPayload(payload);

640685

}

641686

emitJsonEnvelope();

642-

return { payloads: normalizedPayloads, meta: resultMeta };

687+

return buildDeliveryResult({ payloads: normalizedPayloads, meta: resultMeta, result });

643688

}

644689

if (deliver && deliveryChannel && !isInternalMessageChannel(deliveryChannel)) {

645690

if (deliveryTarget && !deliveryStatus) {

@@ -682,5 +727,11 @@ export async function deliverAgentCommandResult(

682727

}

683728684729

emitJsonEnvelope(deliveryStatus);

685-

return { payloads: normalizedPayloads, meta: resultMeta, deliverySucceeded, deliveryStatus };

730+

return buildDeliveryResult({

731+

payloads: normalizedPayloads,

732+

meta: resultMeta,

733+

result,

734+

deliverySucceeded,

735+

deliveryStatus,

736+

});

686737

}