mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
perf(plugin-sdk): add narrow outbound send deps entry
This commit is contained in:
@@ -262,6 +262,7 @@ releases.
|
||||
| `plugin-sdk/inbound-reply-dispatch` | Inbound reply helpers | Shared record-and-dispatch helpers |
|
||||
| `plugin-sdk/messaging-targets` | Messaging target parsing | Target parsing/matching helpers |
|
||||
| `plugin-sdk/outbound-media` | Outbound media helpers | Shared outbound media loading |
|
||||
| `plugin-sdk/outbound-send-deps` | Outbound send dependency helpers | Lightweight `resolveOutboundSendDep` lookup without importing the full outbound runtime |
|
||||
| `plugin-sdk/outbound-runtime` | Outbound runtime helpers | Outbound delivery, identity/send delegate, session, formatting, and payload planning helpers |
|
||||
| `plugin-sdk/thread-bindings-runtime` | Thread-binding helpers | Thread-binding lifecycle and adapter helpers |
|
||||
| `plugin-sdk/agent-media-payload` | Legacy media payload helpers | Agent media payload builder for legacy field layouts |
|
||||
|
||||
@@ -50,6 +50,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
|
||||
| `plugin-sdk/inbound-reply-dispatch` | Shared inbound record-and-dispatch helpers |
|
||||
| `plugin-sdk/messaging-targets` | Target parsing/matching helpers |
|
||||
| `plugin-sdk/outbound-media` | Shared outbound media loading helpers |
|
||||
| `plugin-sdk/outbound-send-deps` | Lightweight outbound send dependency lookup for channel adapters |
|
||||
| `plugin-sdk/outbound-runtime` | Outbound delivery, identity, send delegate, session, formatting, and payload planning helpers |
|
||||
| `plugin-sdk/poll-runtime` | Narrow poll normalization helpers |
|
||||
| `plugin-sdk/thread-bindings-runtime` | Thread-binding lifecycle and adapter helpers |
|
||||
|
||||
@@ -3,10 +3,8 @@ import {
|
||||
createAttachedChannelResultAdapter,
|
||||
} from "openclaw/plugin-sdk/channel-send-result";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import {
|
||||
resolveOutboundSendDep,
|
||||
type OutboundIdentity,
|
||||
} from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import type { OutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import {
|
||||
normalizeOptionalString,
|
||||
normalizeOptionalStringifiedId,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
installChannelOutboundPayloadContractSuite,
|
||||
primeChannelOutboundSendMock,
|
||||
type OutboundPayloadHarnessParams,
|
||||
} from "openclaw/plugin-sdk/testing";
|
||||
} from "openclaw/plugin-sdk/channel-contract-testing";
|
||||
import { describe, vi } from "vitest";
|
||||
import { discordOutbound } from "./outbound-adapter.js";
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { createReplyToFanout, type ReplyToResolution } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import {
|
||||
createReplyToFanout,
|
||||
resolveOutboundSendDep,
|
||||
type ReplyToResolution,
|
||||
type OutboundSendDeps,
|
||||
} from "openclaw/plugin-sdk/outbound-runtime";
|
||||
} from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { withDiscordDeliveryRetry } from "./delivery-retry.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import type { ResolvedIMessageAccount } from "./accounts.js";
|
||||
import { PAIRING_APPROVED_MESSAGE, resolveChannelMediaMaxBytes } from "./channel-api.js";
|
||||
import type { ChannelPlugin } from "./channel-api.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { ChannelPlugin } from "openclaw/plugin-sdk/core";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { collectStatusIssuesFromLastError } from "openclaw/plugin-sdk/status-helpers";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export {
|
||||
resolveThreadBindingIdleTimeoutMsForChannel,
|
||||
resolveThreadBindingMaxAgeMsForChannel,
|
||||
} from "openclaw/plugin-sdk/conversation-runtime";
|
||||
export { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
export { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
export { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
||||
export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
||||
export { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { chunkTextForOutbound, type ChannelOutboundAdapter } from "../runtime-api.js";
|
||||
import { createMSTeamsPollStoreFs } from "./polls.js";
|
||||
import { sendMessageMSTeams, sendPollMSTeams } from "./send.js";
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { chunkText, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
||||
import { buildOutboundBaseSessionKey, type RoutePeer } from "openclaw/plugin-sdk/routing";
|
||||
import {
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
createRuntimeDirectoryLiveAdapter,
|
||||
} from "openclaw/plugin-sdk/directory-runtime";
|
||||
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { buildOutboundBaseSessionKey, type RoutePeer } from "openclaw/plugin-sdk/routing";
|
||||
import {
|
||||
createComputedAccountStatusAdapter,
|
||||
|
||||
@@ -8,10 +8,8 @@ import {
|
||||
type InteractiveReply,
|
||||
type MessagePresentation,
|
||||
} from "openclaw/plugin-sdk/interactive-runtime";
|
||||
import {
|
||||
resolveOutboundSendDep,
|
||||
type OutboundIdentity,
|
||||
} from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import type { OutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import {
|
||||
resolvePayloadMediaUrls,
|
||||
sendPayloadMediaSequenceAndFinalize,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { primeChannelOutboundSendMock } from "openclaw/plugin-sdk/channel-contract-testing";
|
||||
import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
|
||||
import { primeChannelOutboundSendMock } from "openclaw/plugin-sdk/testing";
|
||||
import { vi, type Mock } from "vitest";
|
||||
import { slackOutbound } from "./outbound-adapter.js";
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
||||
import {
|
||||
resolveOutboundSendDep,
|
||||
type OutboundSendDeps,
|
||||
} from "openclaw/plugin-sdk/outbound-runtime";
|
||||
} from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { type RoutePeer } from "openclaw/plugin-sdk/routing";
|
||||
import {
|
||||
createComputedAccountStatusAdapter,
|
||||
|
||||
@@ -8,11 +8,11 @@ import {
|
||||
renderMessagePresentationFallbackText,
|
||||
resolveInteractiveTextFallback,
|
||||
} from "openclaw/plugin-sdk/interactive-runtime";
|
||||
import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import {
|
||||
resolveOutboundSendDep,
|
||||
sanitizeForPlainText,
|
||||
type OutboundSendDeps,
|
||||
} from "openclaw/plugin-sdk/outbound-runtime";
|
||||
} from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import {
|
||||
resolvePayloadMediaUrls,
|
||||
sendPayloadMediaSequenceOrFallback,
|
||||
|
||||
@@ -9,7 +9,8 @@ import {
|
||||
type ChannelOutboundAdapter,
|
||||
} from "openclaw/plugin-sdk/channel-send-result";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { resolveOutboundSendDep, sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime";
|
||||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
||||
import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
||||
import {
|
||||
normalizeWhatsAppOutboundPayload,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
installChannelOutboundPayloadContractSuite,
|
||||
primeChannelOutboundSendMock,
|
||||
type OutboundPayloadHarnessParams,
|
||||
} from "openclaw/plugin-sdk/testing";
|
||||
} from "openclaw/plugin-sdk/channel-contract-testing";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { whatsappOutbound } from "./outbound-adapter.js";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
installChannelOutboundPayloadContractSuite,
|
||||
primeChannelOutboundSendMock,
|
||||
type OutboundPayloadHarnessParams,
|
||||
} from "openclaw/plugin-sdk/testing";
|
||||
} from "openclaw/plugin-sdk/channel-contract-testing";
|
||||
import { describe, vi } from "vitest";
|
||||
import { zaloPlugin } from "./channel.js";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
installChannelOutboundPayloadContractSuite,
|
||||
primeChannelOutboundSendMock,
|
||||
type OutboundPayloadHarnessParams,
|
||||
} from "openclaw/plugin-sdk/testing";
|
||||
} from "openclaw/plugin-sdk/channel-contract-testing";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import "./accounts.test-mocks.js";
|
||||
import "./zalo-js.test-mocks.js";
|
||||
|
||||
@@ -238,6 +238,10 @@
|
||||
"types": "./dist/plugin-sdk/outbound-media.d.ts",
|
||||
"default": "./dist/plugin-sdk/outbound-media.js"
|
||||
},
|
||||
"./plugin-sdk/outbound-send-deps": {
|
||||
"types": "./dist/plugin-sdk/outbound-send-deps.d.ts",
|
||||
"default": "./dist/plugin-sdk/outbound-send-deps.js"
|
||||
},
|
||||
"./plugin-sdk/outbound-runtime": {
|
||||
"types": "./dist/plugin-sdk/outbound-runtime.d.ts",
|
||||
"default": "./dist/plugin-sdk/outbound-runtime.js"
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
"channel-runtime",
|
||||
"interactive-runtime",
|
||||
"outbound-media",
|
||||
"outbound-send-deps",
|
||||
"outbound-runtime",
|
||||
"poll-runtime",
|
||||
"infra-runtime",
|
||||
|
||||
6
src/plugin-sdk/outbound-send-deps.ts
Normal file
6
src/plugin-sdk/outbound-send-deps.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export {
|
||||
resolveLegacyOutboundSendDepKeys,
|
||||
resolveOutboundSendDep,
|
||||
type OutboundSendDeps,
|
||||
type ResolveOutboundSendDepOptions,
|
||||
} from "../infra/outbound/send-deps.js";
|
||||
Reference in New Issue
Block a user