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

    Function getLastSequence

    • Returns the sequence number of the most recent event on the axon, or undefined if the axon has no events.

      Calls GET /v1/axons/{id}/events?limit=1&include_total_count=true directly because @runloop/api-client does not yet expose a typed listEvents or getHead method on the Axon resource. The private client field is accessed via cast — fragile but functional.

      Axon sequences are 1-based and monotonically increasing, so total_count equals the highest sequence number.

      Parameters

      • axon: Axon

      Returns Promise<number | undefined>

      Replace with a proper SDK method once @runloop/api-client adds Axon.listEvents() or equivalent (tracked upstream).