export type ChannelProvider = 'slack' | 'telegram' | 'feishu-lark';
export type NexusThreadTargetKind = 'session' | 'mission';
export interface NexusThreadTargetRef {
    kind: NexusThreadTargetKind;
    id: string;
}
export interface ChannelThreadMappingInput {
    provider: string;
    conversationId: string;
    threadId?: string;
    messageId?: string;
    parentMessageId?: string;
    workspaceId?: string;
    target: NexusThreadTargetRef;
    sourceUrl?: string;
}
export interface ChannelThreadMapping {
    provider: ChannelProvider;
    providerAlias: string;
    conversationId: string;
    threadId: string;
    messageId?: string;
    parentMessageId?: string;
    workspaceId?: string;
    target: NexusThreadTargetRef;
    threadKey: string;
    conversationKey: string;
    sourceUrl?: string;
    mappedAt: number;
}
export interface ChannelArtifactAttachment {
    name: string;
    kind: 'text' | 'markdown' | 'json' | 'file' | 'image';
    content?: string;
    path?: string;
    mimeType?: string;
    sizeBytes?: number;
}
export interface ChannelArtifactEnvelopeInput {
    provider: string;
    thread: ChannelThreadMappingInput | ChannelThreadMapping;
    artifactType: string;
    title: string;
    summary: string;
    artifactId?: string;
    body?: string;
    attachments?: ChannelArtifactAttachment[];
    metadata?: Record<string, unknown>;
    createdAt?: number;
}
export interface ChannelArtifactEnvelope {
    envelopeType: 'nexus.channel.artifact';
    provider: ChannelProvider;
    thread: ChannelThreadMapping;
    artifactType: string;
    artifactId?: string;
    title: string;
    summary: string;
    body?: string;
    attachments: ChannelArtifactAttachment[];
    metadata: Record<string, unknown>;
    createdAt: number;
}
export declare function normalizeChannelProvider(provider: string): ChannelProvider;
export declare function buildChannelConversationKey(input: Pick<ChannelThreadMappingInput, 'provider' | 'conversationId' | 'workspaceId'>): string;
export declare function buildChannelThreadKey(input: Pick<ChannelThreadMappingInput, 'provider' | 'conversationId' | 'threadId' | 'messageId' | 'workspaceId'>): string;
export declare function mapChannelThread(input: ChannelThreadMappingInput): ChannelThreadMapping;
export declare function createChannelArtifactEnvelope(input: ChannelArtifactEnvelopeInput): ChannelArtifactEnvelope;
export declare class ChannelGateway {
    normalizeProvider(provider: string): ChannelProvider;
    mapThread(input: ChannelThreadMappingInput): ChannelThreadMapping;
    createArtifactEnvelope(input: ChannelArtifactEnvelopeInput): ChannelArtifactEnvelope;
    threadKey(input: Pick<ChannelThreadMappingInput, 'provider' | 'conversationId' | 'threadId' | 'messageId' | 'workspaceId'>): string;
    conversationKey(input: Pick<ChannelThreadMappingInput, 'provider' | 'conversationId' | 'workspaceId'>): string;
}
