@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface BotEvents

    interface BotEvents {
        ready: void;
        qr: string;
        connection: ConnectionUpdate;
        message: MessageContext;
        error: { error: unknown; ctx?: MessageContext<DefaultTools, unknown> };
        started: void;
        stopping: void;
        stopped: void;
        "command:unknown": { ctx: MessageContext; command: string };
        reaction: InboundReaction;
        poll: PollVote;
        call: CallEvent;
        group: GroupEvent;
        presence: PresenceEvent;
        status: DeliveryStatus;
        handoff: HandoffState;
        resume: ResumeEvent;
        "conversation:started": ConversationStartedEvent;
        "conversation:ended": ConversationEndedEvent;
        "coordination:leader": { name: string; fence: number };
        "coordination:follower": { name: string; reason?: LeaseLossReason };
        "coordination:lease-lost": LeaseInfo & { reason: LeaseLossReason };
        "coordination:handover": ConversationHandoverEvent;
        "durability:dead": {
            kind: "inbound" | "outbound";
            id: string;
            chatId?: string;
            error: unknown;
        };
        "durability:ambiguous": { key: string; chatId: string };
    }
    Index
    ready: void

    Emitted once the provider's connection state reaches 'ready'.

    qr: string

    Emitted with the provider's auth artifact (QR string / pairing code / OAuth URL).

    connection: ConnectionUpdate

    Emitted on every provider connection-state transition.

    Emitted after every dispatched inbound message finishes its pipeline.

    error: { error: unknown; ctx?: MessageContext<DefaultTools, unknown> }

    Emitted for any internal/handler error.

    started: void

    Emitted once start() finishes.

    stopping: void

    Emitted once per stop() of a running bot, right after inbound is closed and BEFORE the drain and the transport stop: cancel long work here (model calls, downloads) while the transport can still deliver what is in flight. A throwing listener is reported on 'error'.

    stopped: void

    Emitted once stop() finishes.

    "command:unknown": { ctx: MessageContext; command: string }

    Emitted by the Dispatcher for an unrecognized /xyz command.

    reaction: InboundReaction

    Forwarded provider event: someone reacted to a message.

    poll: PollVote

    Forwarded provider event: a poll's aggregated votes changed.

    call: CallEvent

    Forwarded provider event: a call notification.

    group: GroupEvent

    Forwarded provider event: group participants changed.

    presence: PresenceEvent

    Forwarded provider event: a contact's presence changed.

    Forwarded provider event: outbound delivery/read receipt.

    handoff: HandoffState

    A chat was handed off to a human (bot.handoff() / ctx.handoff()).

    resume: ResumeEvent

    A handed-off chat was given back to the bot (bot.resume()).

    "conversation:started": ConversationStartedEvent

    A conversation/flow was entered (trigger match, bot.trigger(), dormant resume, c.goto()).

    "conversation:ended": ConversationEndedEvent

    A conversation/flow ended — completed, cancelled, timed out, out of retries or errored.

    "coordination:leader": { name: string; fence: number }

    Multi-replica (coordination): this replica was elected for a singleton (provider:<id>) and starts it.

    "coordination:follower": { name: string; reason?: LeaseLossReason }

    Multi-replica: this replica lost (or gave up) a singleton leadership and stands by.

    "coordination:lease-lost": LeaseInfo & { reason: LeaseLossReason }

    Multi-replica: a chat turn or leadership was lost before its release (pause, partition, backend down).

    "coordination:handover": ConversationHandoverEvent

    Multi-replica (coordination.handover): a conversation another replica ran was taken over on this one — resumed, or handled by the hand-over fallback (see outcome).

    "durability:dead": {
        kind: "inbound" | "outbound";
        id: string;
        chatId?: string;
        error: unknown;
    }

    Durability (BotConfig.durability): an inbound event or a send was dead-lettered after its retries (id is the inbox record id or the outbox key). Replay/retry it through bot.durability.

    "durability:ambiguous": { key: string; chatId: string }

    Durability: a send's outcome is unknown after a crash (the provider was called, the result was never recorded). Handled per durability.outbox.onAmbiguous.