import type { ChannelFrom, ChannelResolveSession, ChannelRespondOptions, ChannelSendOptions, ChannelSource } from "#channel/channel-operations.js"; import type { SessionAuthContext } from "#channel/types.js"; import type { InputResponse, StrictInputResponses } from "#shared/input.js"; import type { UserContent } from "ai"; import type { SlackChannelState } from "#public/channels/slack/slackChannel.js"; type SlackSource = ChannelSource; /** Options for a message send already bound to one Slack thread. */ export type SlackSendOptions = Omit, "auth" | "state"> & { readonly auth?: SessionAuthContext | null; }; /** Options for an input response already bound to one Slack thread. */ export type SlackRespondOptions = Omit, "auth"> & { readonly auth?: SessionAuthContext | null; }; /** Current-owner operations already bound to one Slack thread. */ export interface SlackSessionOperations { send(message: string | UserContent, options?: SlackSendOptions): ReturnType; respond(inputResponses: StrictInputResponses, options?: SlackRespondOptions): ReturnType; cancel(options?: { readonly turnId?: string; }): ReturnType; compact(): ReturnType; clear(): ReturnType; reset(options?: { readonly reason?: string; }): ReturnType; resolveSession(): ReturnType; } /** Binds Slack state and default auth needed only when a message creates a session. */ export declare function bindSlackSessionOperations(input: { readonly address: string; readonly defaultAuth: SessionAuthContext | null; readonly from: ChannelFrom; readonly resolveSession: ChannelResolveSession; readonly state: SlackChannelState; }): SlackSessionOperations; /** * Stamps the verified Slack user behind an input response, so `deliver` can map * a custom-auth responder's principal to them. The verified user wins over any * caller-supplied value. */ export declare function withSlackResponder(state: Partial | undefined, slackUserId: string | null | undefined): Partial | undefined; export {};