import type { ChannelDirectoryEntry, ChannelDirectoryEntryKind, ChannelId } from "../../channels/plugins/types.js";
import type { KaijiBotConfig } from "../../config/config.js";
import { type RuntimeEnv } from "../../runtime.js";
export type TargetResolveKind = ChannelDirectoryEntryKind | "channel";
export type ResolveAmbiguousMode = "error" | "best" | "first";
export type ResolvedMessagingTarget = {
    to: string;
    kind: TargetResolveKind;
    display?: string;
    source: "normalized" | "directory";
};
export type ResolveMessagingTargetResult = {
    ok: true;
    target: ResolvedMessagingTarget;
} | {
    ok: false;
    error: Error;
    candidates?: ChannelDirectoryEntry[];
};
export declare function resolveChannelTarget(params: {
    cfg: KaijiBotConfig;
    channel: ChannelId;
    input: string;
    accountId?: string | null;
    preferredKind?: TargetResolveKind;
    runtime?: RuntimeEnv;
}): Promise<ResolveMessagingTargetResult>;
export declare function maybeResolveIdLikeTarget(params: {
    cfg: KaijiBotConfig;
    channel: ChannelId;
    input: string;
    accountId?: string | null;
    preferredKind?: TargetResolveKind;
}): Promise<ResolvedMessagingTarget | undefined>;
export declare function resetDirectoryCache(params?: {
    channel?: ChannelId;
    accountId?: string | null;
}): void;
export declare function formatTargetDisplay(params: {
    channel: ChannelId;
    target: string;
    display?: string;
    kind?: ChannelDirectoryEntryKind;
}): string;
export declare function resolveMessagingTarget(params: {
    cfg: KaijiBotConfig;
    channel: ChannelId;
    input: string;
    accountId?: string | null;
    preferredKind?: TargetResolveKind;
    runtime?: RuntimeEnv;
    resolveAmbiguous?: ResolveAmbiguousMode;
}): Promise<ResolveMessagingTargetResult>;
export declare function lookupDirectoryDisplay(params: {
    cfg: KaijiBotConfig;
    channel: ChannelId;
    targetId: string;
    accountId?: string | null;
    runtime?: RuntimeEnv;
}): Promise<string | undefined>;
