import { i as OpenClawConfig } from "./types.openclaw-CpnoYlBx.js"; import { t as ChannelId } from "./channel-id.types-DjYEl-_2.js"; import { n as AccessGroupMembershipResolver } from "./access-groups-B2PJnFsb.js"; import { r as DmGroupAccessReasonCode } from "./dm-policy-shared-CbXY3hb3.js"; //#region src/channels/direct-dm-access.d.ts /** Runtime hooks needed by the legacy direct-DM access resolver. */ type DirectDmCommandAuthorizationRuntime = { shouldComputeCommandAuthorized: (rawBody: string, cfg: OpenClawConfig) => boolean; /** @deprecated Command authorization is resolved by channel ingress. Kept for runtime injection compatibility. */ resolveCommandAuthorizedFromAuthorizers?: (params: { useAccessGroups: boolean; authorizers: Array<{ configured: boolean; allowed: boolean; }>; modeWhenAccessGroupsOff?: "allow" | "deny" | "configured"; }) => boolean; }; /** * Legacy direct-DM ingress decision with command-authorization compatibility fields. * @deprecated Use `resolveChannelMessageIngress` from `openclaw/plugin-sdk/channel-ingress-runtime`. */ type ResolvedInboundDirectDmAccess = { access: { decision: "allow" | "block" | "pairing"; reasonCode: DmGroupAccessReasonCode; reason: string; effectiveAllowFrom: string[]; }; shouldComputeAuth: boolean; senderAllowedForCommands: boolean; commandAuthorized: boolean | undefined; }; /** * Resolves legacy direct-DM access lists, pairing-store entries, and command authorization. * @deprecated Use `resolveChannelMessageIngress` from `openclaw/plugin-sdk/channel-ingress-runtime`. */ declare function resolveInboundDirectDmAccessWithRuntime(params: { cfg: OpenClawConfig; channel: ChannelId; accountId: string; dmPolicy?: string | null; allowFrom?: Array | null; senderId: string; rawBody: string; isSenderAllowed: (senderId: string, allowFrom: string[]) => boolean; resolveAccessGroupMembership?: AccessGroupMembershipResolver; runtime: DirectDmCommandAuthorizationRuntime; modeWhenAccessGroupsOff?: "allow" | "deny" | "configured"; readStoreAllowFrom?: (provider: ChannelId, accountId: string) => Promise; }): Promise; /** * Creates a pre-crypto authorizer that can issue pairing challenges before payload decryption. * @deprecated Use `resolveChannelMessageIngress` from `openclaw/plugin-sdk/channel-ingress-runtime`. */ declare function createPreCryptoDirectDmAuthorizer(params: { resolveAccess: (senderId: string) => Promise | ResolvedInboundDirectDmAccess>; issuePairingChallenge?: (params: { senderId: string; reply: (text: string) => Promise; }) => Promise; onBlocked?: (params: { senderId: string; reason: string; reasonCode: DmGroupAccessReasonCode; }) => void; }): (input: { senderId: string; reply: (text: string) => Promise; }) => Promise<"allow" | "block" | "pairing">; //#endregion export { resolveInboundDirectDmAccessWithRuntime as i, ResolvedInboundDirectDmAccess as n, createPreCryptoDirectDmAuthorizer as r, DirectDmCommandAuthorizationRuntime as t };