refactor: use channel target resolution APIs (#85814)

* refactor: use channel target resolution apis

* refactor: satisfy delivery lint

* refactor: remove unused target parsing shim

* fix: preserve routed cron topic targets
This commit is contained in:
Peter Steinberger
2026-05-23 21:26:55 +01:00
committed by GitHub
parent fd2a9adbe6
commit c4f0da00a9
52 changed files with 2145 additions and 438 deletions

View File

@@ -180,7 +180,7 @@ describe("plugin-sdk channel-route", () => {
).toBe(false);
});
it("resolves parsed route targets through an injected channel grammar", () => {
it("keeps deprecated parser wrapper wired for public SDK compatibility", () => {
expect(
resolveChannelRouteTargetWithParser({
channel: "Mock",

View File

@@ -44,12 +44,14 @@ export type ChannelRouteTargetInput = Pick<
export type ChannelRouteKeyInput = ChannelRouteRef | ChannelRouteTargetInput;
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
export type ChannelRouteExplicitTarget = {
to: string;
threadId?: string | number;
chatType?: ChannelRouteChatType;
};
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
export type ChannelRouteExplicitTargetParser = (
channel: string,
rawTarget: string,
@@ -125,6 +127,7 @@ export type ChannelRouteParsedTarget = ChannelRouteTargetInput & {
chatType?: ChannelRouteChatType;
};
/** @deprecated Use `messaging.resolveOutboundSessionRoute` for provider-specific target grammar. */
export function resolveChannelRouteTargetWithParser(params: {
channel: string;
rawTarget?: string | null;

View File

@@ -1,3 +1,4 @@
/** @deprecated Use `openclaw/plugin-sdk/channel-targets`. */
export {
buildMessagingTarget,
ensureTargetId,