@runloop/agent-axon-client
    Preparing search index...

    Interface ClassifyConfig<TProtocolEvent>

    Configuration for createClassifier. Each protocol module provides its own config to specialize the shared classification pipeline.

    interface ClassifyConfig<TProtocolEvent> {
        isProtocolEventType: (eventType: string) => boolean;
        label: string;
        onError?: (error: unknown) => void;
        toProtocolEvent: (
            data: unknown,
            ev: AxonEventView,
        ) => TProtocolEvent | null;
    }

    Type Parameters

    • TProtocolEvent
    Index

    Properties

    isProtocolEventType: (eventType: string) => boolean

    Returns true if eventType belongs to this protocol.

    label: string

    Label used in error messages (e.g. "classifyACPAxonEvent").

    onError?: (error: unknown) => void

    Called when a non-critical error occurs (e.g. unparseable payload). Defaults to console.warn.

    toProtocolEvent: (data: unknown, ev: AxonEventView) => TProtocolEvent | null

    Converts a parsed payload into a protocol-specific timeline event. Return null to fall through to the unknown classification.