Files
openclaw/src/channels/session.types.ts
2026-05-19 00:49:25 +02:00

29 lines
934 B
TypeScript

import type { MsgContext } from "../auto-reply/templating.js";
import type { GroupKeyResolution, SessionEntry } from "../config/sessions/types.js";
import type { ChannelRouteRef } from "../plugin-sdk/channel-route.js";
export type InboundLastRouteUpdate = {
sessionKey: string;
channel: SessionEntry["lastChannel"];
to: string;
accountId?: string;
threadId?: string | number;
route?: ChannelRouteRef;
mainDmOwnerPin?: {
ownerRecipient: string;
senderRecipient: string;
onSkip?: (params: { ownerRecipient: string; senderRecipient: string }) => void;
};
};
export type RecordInboundSession = (params: {
storePath: string;
sessionKey: string;
ctx: MsgContext;
groupResolution?: GroupKeyResolution | null;
createIfMissing?: boolean;
updateLastRoute?: InboundLastRouteUpdate;
onRecordError: (err: unknown) => void;
trackSessionMetaTask?: (task: Promise<unknown>) => void;
}) => Promise<void>;