@conciergus/chat - v0.3.1
    Preparing search index...

    Interface Plugin

    Complete plugin definition

    interface Plugin {
        onLoad?: (context: PluginContext) => void | Promise<void>;
        onEnable?: (context: PluginContext) => void | Promise<void>;
        onDisable?: (context: PluginContext) => void | Promise<void>;
        onUnload?: (context: PluginContext) => void | Promise<void>;
        onConfigChange?: (
            context: PluginContext,
            newConfig: ConciergusConfig,
        ) => void | Promise<void>;
        processMessage?: (
            message: EnhancedUIMessage,
            context: PluginContext,
        ) => EnhancedUIMessage | Promise<EnhancedUIMessage>;
        processOutgoingMessage?: (
            message: EnhancedUIMessage,
            context: PluginContext,
        ) => EnhancedUIMessage | Promise<EnhancedUIMessage>;
        transformMetadata?: (
            metadata: MessageMetadata,
            context: PluginContext,
        ) => MessageMetadata | Promise<MessageMetadata>;
        processStreamPart?: (
            part: EnhancedStreamPart,
            context: PluginContext,
        ) => EnhancedStreamPart | Promise<EnhancedStreamPart>;
        onStreamStart?: (context: PluginContext) => void | Promise<void>;
        onStreamEnd?: (context: PluginContext) => void | Promise<void>;
        onStreamError?: (
            error: Error,
            context: PluginContext,
        ) => void | Promise<void>;
        onConversationCreate?: (
            conversation: Conversation,
            context: PluginContext,
        ) => Conversation | Promise<Conversation>;
        onConversationUpdate?: (
            conversation: Conversation,
            context: PluginContext,
        ) => Conversation | Promise<Conversation>;
        onConversationDelete?: (
            conversationId: string,
            context: PluginContext,
        ) => void | Promise<void>;
        transformMessages?: (
            messages: ConversationMessage[],
            context: PluginContext,
        ) => ConversationMessage[] | Promise<ConversationMessage[]>;
        onAgentRegister?: (
            agent: AgentInfo,
            context: PluginContext,
        ) => AgentInfo | Promise<AgentInfo>;
        onAgentSelect?: (
            agent: AgentInfo,
            context: PluginContext,
        ) => AgentInfo | Promise<AgentInfo>;
        onAgentResponse?: (
            response: any,
            agent: AgentInfo,
            context: PluginContext,
        ) => any;
        renderComponent?: (
            componentType: string,
            props: any,
            context: PluginContext,
        ) => ReactNode;
        getStyles?: (context: PluginContext) => string | Record<string, any>;
        getThemes?: (context: PluginContext) => Record<string, any>;
        trackEvent?: (
            event: AnalyticsEvent,
            context: PluginContext,
        ) => void | Promise<void>;
        processAnalytics?: (
            data: AnalyticsData,
            context: PluginContext,
        ) => AnalyticsData | Promise<AnalyticsData>;
        generateReport?: (
            type: string,
            options: any,
            context: PluginContext,
        ) => any;
        metadata: PluginMetadata;
        defaultConfig?: Partial<PluginConfig>;
        configSchema?: any;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    onLoad?: (context: PluginContext) => void | Promise<void>

    Called when plugin is loaded

    onEnable?: (context: PluginContext) => void | Promise<void>

    Called when plugin is enabled

    onDisable?: (context: PluginContext) => void | Promise<void>

    Called when plugin is disabled

    onUnload?: (context: PluginContext) => void | Promise<void>

    Called when plugin is unloaded

    onConfigChange?: (
        context: PluginContext,
        newConfig: ConciergusConfig,
    ) => void | Promise<void>

    Called when Conciergus configuration changes

    processMessage?: (
        message: EnhancedUIMessage,
        context: PluginContext,
    ) => EnhancedUIMessage | Promise<EnhancedUIMessage>

    Process incoming messages

    processOutgoingMessage?: (
        message: EnhancedUIMessage,
        context: PluginContext,
    ) => EnhancedUIMessage | Promise<EnhancedUIMessage>

    Process outgoing messages

    transformMetadata?: (
        metadata: MessageMetadata,
        context: PluginContext,
    ) => MessageMetadata | Promise<MessageMetadata>

    Transform message metadata

    processStreamPart?: (
        part: EnhancedStreamPart,
        context: PluginContext,
    ) => EnhancedStreamPart | Promise<EnhancedStreamPart>

    Process stream parts

    onStreamStart?: (context: PluginContext) => void | Promise<void>

    Handle stream start

    onStreamEnd?: (context: PluginContext) => void | Promise<void>

    Handle stream end

    onStreamError?: (error: Error, context: PluginContext) => void | Promise<void>

    Handle stream error

    onConversationCreate?: (
        conversation: Conversation,
        context: PluginContext,
    ) => Conversation | Promise<Conversation>

    Process conversation creation

    onConversationUpdate?: (
        conversation: Conversation,
        context: PluginContext,
    ) => Conversation | Promise<Conversation>

    Process conversation update

    onConversationDelete?: (
        conversationId: string,
        context: PluginContext,
    ) => void | Promise<void>

    Process conversation deletion

    transformMessages?: (
        messages: ConversationMessage[],
        context: PluginContext,
    ) => ConversationMessage[] | Promise<ConversationMessage[]>

    Transform conversation messages

    onAgentRegister?: (
        agent: AgentInfo,
        context: PluginContext,
    ) => AgentInfo | Promise<AgentInfo>

    Process agent registration

    onAgentSelect?: (
        agent: AgentInfo,
        context: PluginContext,
    ) => AgentInfo | Promise<AgentInfo>

    Process agent selection

    onAgentResponse?: (
        response: any,
        agent: AgentInfo,
        context: PluginContext,
    ) => any

    Handle agent response

    renderComponent?: (
        componentType: string,
        props: any,
        context: PluginContext,
    ) => ReactNode

    Render custom UI components

    getStyles?: (context: PluginContext) => string | Record<string, any>

    Provide custom CSS styles

    getThemes?: (context: PluginContext) => Record<string, any>

    Provide custom themes

    trackEvent?: (
        event: AnalyticsEvent,
        context: PluginContext,
    ) => void | Promise<void>

    Track custom events

    processAnalytics?: (
        data: AnalyticsData,
        context: PluginContext,
    ) => AnalyticsData | Promise<AnalyticsData>

    Process analytics data

    generateReport?: (type: string, options: any, context: PluginContext) => any

    Generate custom reports

    metadata: PluginMetadata

    Plugin metadata

    defaultConfig?: Partial<PluginConfig>

    Default plugin configuration

    configSchema?: any

    Plugin configuration schema