docs: document outbound action runner · openclaw/openclaw@b4a6388
steipete
·
2026-06-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers agent delivery planning from explicit inputs, session history, |
| 2 | +// turn-source overrides, and route-aware target normalization. |
1 | 3 | import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; |
2 | 4 | |
3 | 5 | const mocks = vi.hoisted(() => ({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Agent delivery planning resolves final reply destinations from explicit |
| 2 | +// options, session history, turn source, bindings, and channel route hooks. |
1 | 3 | import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; |
2 | 4 | import type { ChannelOutboundTargetMode } from "../../channels/plugins/types.public.js"; |
3 | 5 | import type { ChannelId } from "../../channels/plugins/types.public.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers best-effort external target normalization and session-only downgrade |
| 2 | +// decisions. |
1 | 3 | import { describe, expect, it, vi } from "vitest"; |
2 | 4 | import { |
3 | 5 | resolveExternalBestEffortDeliveryTarget, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Best-effort delivery helpers normalize optional external destinations and |
| 2 | +// decide when a reply should stay session-only. |
1 | 3 | import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; |
2 | 4 | import { stringifyRouteThreadId } from "../../plugin-sdk/channel-route.js"; |
3 | 5 | import { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers bound delivery routing for active bindings, requester matching, |
| 2 | +// ambiguous bindings, and fail-closed fallback reasons. |
1 | 3 | import { beforeEach, describe, expect, it } from "vitest"; |
2 | 4 | import { createBoundDeliveryRouter } from "./bound-delivery-router.js"; |
3 | 5 | import { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Bound delivery router maps task-completion delivery back to active |
| 2 | +// conversation bindings, failing closed when requester context is ambiguous. |
1 | 3 | import { normalizeConversationRef } from "./session-binding-normalization.js"; |
2 | 4 | import { |
3 | 5 | getSessionBindingService, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers outbound result envelope flattening and payload/meta wrapping. |
1 | 2 | import { describe, expect, it } from "vitest"; |
2 | 3 | import type { ReplyPayload } from "../../auto-reply/types.js"; |
3 | 4 | import { buildOutboundResultEnvelope } from "./envelope.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Outbound envelopes wrap payload projections, metadata, and delivery JSON for |
| 2 | +// tool responses while flattening simple delivery-only results. |
1 | 3 | import type { ReplyPayload } from "../../auto-reply/types.js"; |
2 | 4 | import type { OutboundDeliveryJson } from "./format.js"; |
3 | 5 | import { normalizeOutboundPayloadsForJson, type OutboundPayloadJson } from "./payloads.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers message-action cross-context policy, markers, and presentation |
| 2 | +// decoration behavior. |
1 | 3 | import { afterEach, beforeEach, describe, expect, it } from "vitest"; |
2 | 4 | import type { ChannelPlugin } from "../../channels/plugins/types.js"; |
3 | 5 | import type { OpenClawConfig } from "../../config/config.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Covers core message-action send fallback, TTS application, and durable send |
| 2 | +// policy after plugin preparation is absent. |
1 | 3 | import { afterEach, describe, expect, it, vi } from "vitest"; |
2 | 4 | import type { OpenClawConfig } from "../../config/config.js"; |
3 | 5 | import { setActivePluginRegistry } from "../../plugins/runtime.js"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。