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

    Interface BotMetricsSnapshot

    Snapshot returned by bot.metrics(). Plain JSON — safe to serialise.

    interface BotMetricsSnapshot {
        startedAt?: number;
        uptimeMs: number;
        uptime: string;
        conversations: ConversationCounters & { active: number };
        flows: Record<string, ConversationCounters>;
        messages: { in: number; out: number; outFailed: number };
        dropped: {
            duplicate: number;
            blocked: number;
            handoff: number;
            echo?: number;
        };
        presenceSkipped: { typing: number; markRead: number };
        triggered: number;
        errors: number;
    }
    Index
    startedAt?: number

    Epoch ms of the last start(); undefined while the bot is not running.

    uptimeMs: number

    Ms since the last start(); 0 while the bot is not running.

    uptime: string

    Human uptime, e.g. '3d 4h', '5m 12s'.

    conversations: ConversationCounters & { active: number }

    Type Declaration

    • active: number

      Conversations alive right now (running or waiting for a reply).

    flows: Record<string, ConversationCounters>

    Per conversation/flow name.

    messages: { in: number; out: number; outFailed: number }

    Type Declaration

    • in: number

      Inbound messages/interactions accepted (after dedupe and access lists).

    • out: number

      Outbound sends the provider accepted.

    • outFailed: number

      Outbound sends the provider rejected.

    dropped: { duplicate: number; blocked: number; handoff: number; echo?: number }

    Type Declaration

    • duplicate: number

      Redelivered inbound events dropped by BotConfig.dedupe.

    • blocked: number

      Inbound dropped by the blacklist / whitelist.

    • handoff: number

      Inbound not routed because the chat is in human handoff.

    • Optionalecho?: number

      Echoes of the bot's own sends dropped by BotConfig.echoFilter (present only with the filter on).

    presenceSkipped: { typing: number; markRead: number }

    Presence hints (ctx.typing()/recording(), the automatic typing indicator, ctx.markRead()) skipped because the transport was disconnected (best-effort policy).

    triggered: number

    bot.trigger() calls that started a conversation.

    errors: number

    Errors reported to the bot 'error' channel.