diff --git a/docs/.generated/plugin-sdk-api-baseline.json b/docs/.generated/plugin-sdk-api-baseline.json index 3d5e7f1d0bd..2ffbe062dd4 100644 --- a/docs/.generated/plugin-sdk-api-baseline.json +++ b/docs/.generated/plugin-sdk-api-baseline.json @@ -1702,6 +1702,15 @@ "path": "src/channels/plugins/whatsapp-heartbeat.ts" } }, + { + "declaration": "export function waitForTransportReady(params: WaitForTransportReadyParams): Promise;", + "exportName": "waitForTransportReady", + "kind": "function", + "source": { + "line": 21, + "path": "src/infra/transport-ready.ts" + } + }, { "declaration": "export function waitUntilAbort(signal?: AbortSignal | undefined, onAbort?: (() => void | Promise) | undefined): Promise;", "exportName": "waitUntilAbort", @@ -2458,6 +2467,15 @@ "path": "src/infra/heartbeat-visibility.ts" } }, + { + "declaration": "export type TransportReadyResult = TransportReadyResult;", + "exportName": "TransportReadyResult", + "kind": "type", + "source": { + "line": 5, + "path": "src/infra/transport-ready.ts" + } + }, { "declaration": "export type TypingCallbacks = TypingCallbacks;", "exportName": "TypingCallbacks", @@ -2466,6 +2484,15 @@ "line": 4, "path": "src/channels/typing.ts" } + }, + { + "declaration": "export type WaitForTransportReadyParams = WaitForTransportReadyParams;", + "exportName": "WaitForTransportReadyParams", + "kind": "type", + "source": { + "line": 10, + "path": "src/infra/transport-ready.ts" + } } ], "importSpecifier": "openclaw/plugin-sdk/channel-runtime", diff --git a/docs/.generated/plugin-sdk-api-baseline.jsonl b/docs/.generated/plugin-sdk-api-baseline.jsonl index 4a4fdb644e4..262456949fb 100644 --- a/docs/.generated/plugin-sdk-api-baseline.jsonl +++ b/docs/.generated/plugin-sdk-api-baseline.jsonl @@ -186,6 +186,7 @@ {"declaration":"export function resolveIndicatorType(status: \"sent\" | \"ok-empty\" | \"ok-token\" | \"skipped\" | \"failed\"): HeartbeatIndicatorType | undefined;","entrypoint":"channel-runtime","exportName":"resolveIndicatorType","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"function","recordType":"export","sourceLine":23,"sourcePath":"src/infra/heartbeat-events.ts"} {"declaration":"export function resolvePollMaxSelections(optionCount: number, allowMultiselect: boolean | undefined): number;","entrypoint":"channel-runtime","exportName":"resolvePollMaxSelections","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"function","recordType":"export","sourceLine":29,"sourcePath":"src/polls.ts"} {"declaration":"export function resolveWhatsAppHeartbeatRecipients(cfg: OpenClawConfig, opts?: HeartbeatRecipientsOpts): HeartbeatRecipientsResult;","entrypoint":"channel-runtime","exportName":"resolveWhatsAppHeartbeatRecipients","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"function","recordType":"export","sourceLine":48,"sourcePath":"src/channels/plugins/whatsapp-heartbeat.ts"} +{"declaration":"export function waitForTransportReady(params: WaitForTransportReadyParams): Promise;","entrypoint":"channel-runtime","exportName":"waitForTransportReady","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"function","recordType":"export","sourceLine":21,"sourcePath":"src/infra/transport-ready.ts"} {"declaration":"export function waitUntilAbort(signal?: AbortSignal | undefined, onAbort?: (() => void | Promise) | undefined): Promise;","entrypoint":"channel-runtime","exportName":"waitUntilAbort","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"function","recordType":"export","sourceLine":38,"sourcePath":"src/plugin-sdk/channel-lifecycle.ts"} {"declaration":"export const CHANNEL_MESSAGE_ACTION_NAMES: readonly [\"send\", \"broadcast\", \"poll\", \"poll-vote\", \"react\", \"reactions\", \"read\", \"edit\", \"unsend\", \"reply\", \"sendWithEffect\", \"renameGroup\", \"setGroupIcon\", \"addParticipant\", \"removeParticipant\", \"leaveGroup\", \"sendAttachment\", \"delete\", \"pin\", \"unpin\", \"list-pins\", \"permissions\", \"thread-create\", \"thread-list\", \"thread-reply\", \"search\", \"sticker\", \"sticker-search\", \"member-info\", \"role-info\", \"emoji-list\", \"emoji-upload\", \"sticker-upload\", \"role-add\", \"role-remove\", \"channel-info\", \"channel-list\", \"channel-create\", \"channel-edit\", \"channel-delete\", \"channel-move\", \"category-create\", \"category-edit\", \"category-delete\", \"topic-create\", \"topic-edit\", \"voice-status\", \"event-list\", \"event-create\", \"timeout\", \"kick\", \"ban\", \"set-profile\", \"set-presence\", \"set-profile\", \"download-file\", \"upload-file\"];","entrypoint":"channel-runtime","exportName":"CHANNEL_MESSAGE_ACTION_NAMES","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"const","recordType":"export","sourceLine":1,"sourcePath":"src/channels/plugins/message-action-names.ts"} {"declaration":"export const CHANNEL_MESSAGE_CAPABILITIES: readonly [\"interactive\", \"buttons\", \"cards\", \"components\", \"blocks\"];","entrypoint":"channel-runtime","exportName":"CHANNEL_MESSAGE_CAPABILITIES","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"const","recordType":"export","sourceLine":1,"sourcePath":"src/channels/plugins/message-capabilities.ts"} @@ -270,7 +271,9 @@ {"declaration":"export type ReplyPrefixContextBundle = ReplyPrefixContextBundle;","entrypoint":"channel-runtime","exportName":"ReplyPrefixContextBundle","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":12,"sourcePath":"src/channels/reply-prefix.ts"} {"declaration":"export type ReplyPrefixOptions = ReplyPrefixOptions;","entrypoint":"channel-runtime","exportName":"ReplyPrefixOptions","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":20,"sourcePath":"src/channels/reply-prefix.ts"} {"declaration":"export type ResolvedHeartbeatVisibility = ResolvedHeartbeatVisibility;","entrypoint":"channel-runtime","exportName":"ResolvedHeartbeatVisibility","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":5,"sourcePath":"src/infra/heartbeat-visibility.ts"} +{"declaration":"export type TransportReadyResult = TransportReadyResult;","entrypoint":"channel-runtime","exportName":"TransportReadyResult","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":5,"sourcePath":"src/infra/transport-ready.ts"} {"declaration":"export type TypingCallbacks = TypingCallbacks;","entrypoint":"channel-runtime","exportName":"TypingCallbacks","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":4,"sourcePath":"src/channels/typing.ts"} +{"declaration":"export type WaitForTransportReadyParams = WaitForTransportReadyParams;","entrypoint":"channel-runtime","exportName":"WaitForTransportReadyParams","importSpecifier":"openclaw/plugin-sdk/channel-runtime","kind":"type","recordType":"export","sourceLine":10,"sourcePath":"src/infra/transport-ready.ts"} {"category":"channel","entrypoint":"channel-setup","importSpecifier":"openclaw/plugin-sdk/channel-setup","recordType":"module","sourceLine":1,"sourcePath":"src/plugin-sdk/channel-setup.ts"} {"declaration":"export function createOptionalChannelSetupAdapter(params: OptionalChannelSetupParams): ChannelSetupAdapter;","entrypoint":"channel-setup","exportName":"createOptionalChannelSetupAdapter","importSpecifier":"openclaw/plugin-sdk/channel-setup","kind":"function","recordType":"export","sourceLine":22,"sourcePath":"src/plugin-sdk/optional-channel-setup.ts"} {"declaration":"export function createOptionalChannelSetupSurface(params: OptionalChannelSetupParams): OptionalChannelSetupSurface;","entrypoint":"channel-setup","exportName":"createOptionalChannelSetupSurface","importSpecifier":"openclaw/plugin-sdk/channel-setup","kind":"function","recordType":"export","sourceLine":40,"sourcePath":"src/plugin-sdk/channel-setup.ts"} diff --git a/extensions/signal/src/monitor.tool-result.test-harness.ts b/extensions/signal/src/monitor.tool-result.test-harness.ts index 7c0823d6c5a..355a0a3604b 100644 --- a/extensions/signal/src/monitor.tool-result.test-harness.ts +++ b/extensions/signal/src/monitor.tool-result.test-harness.ts @@ -189,15 +189,6 @@ vi.mock("openclaw/plugin-sdk/channel-runtime", async () => { enqueueSystemEventMock(...args); return actual.enqueueSystemEvent(...args); }, - }; -}); - -vi.mock("openclaw/plugin-sdk/infra-runtime", async () => { - const actual = await vi.importActual( - "openclaw/plugin-sdk/infra-runtime", - ); - return { - ...actual, waitForTransportReady: (...args: unknown[]) => waitForTransportReadyMock(...args), }; }); diff --git a/extensions/signal/src/monitor.ts b/extensions/signal/src/monitor.ts index 826499497d2..a815b0374ae 100644 --- a/extensions/signal/src/monitor.ts +++ b/extensions/signal/src/monitor.ts @@ -1,3 +1,4 @@ +import { waitForTransportReady } from "openclaw/plugin-sdk/channel-runtime"; import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import type { SignalReactionNotificationMode } from "openclaw/plugin-sdk/config-runtime"; import { loadConfig } from "openclaw/plugin-sdk/config-runtime"; @@ -6,7 +7,6 @@ import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, } from "openclaw/plugin-sdk/config-runtime"; -import { waitForTransportReady } from "openclaw/plugin-sdk/infra-runtime"; import { saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime"; import { DEFAULT_GROUP_HISTORY_LIMIT, type HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import { diff --git a/src/plugin-sdk/channel-runtime.ts b/src/plugin-sdk/channel-runtime.ts index bf9751951d2..49a7b681000 100644 --- a/src/plugin-sdk/channel-runtime.ts +++ b/src/plugin-sdk/channel-runtime.ts @@ -15,6 +15,7 @@ export { enqueueSystemEvent } from "../infra/system-events.js"; export { recordChannelActivity } from "../infra/channel-activity.js"; export * from "../infra/heartbeat-events.ts"; export * from "../infra/heartbeat-visibility.ts"; +export * from "../infra/transport-ready.js"; export { isWhatsAppGroupJid, isWhatsAppUserTarget,