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

    Class AxonTransport

    Transport implementation that communicates with a remote Claude Code instance running on a Runloop Devbox via an Axon event channel.

    Implements

    Index

    Claude SDK

    • Permanently closes the transport by aborting the SSE stream and marking the connection as closed. Idempotent.

      Returns Promise<void>

    • Async generator that yields parsed JSON messages from the SSE stream. Only AGENT_EVENT messages are yielded — USER_EVENTs (our own publishes echoed back) are skipped.

      When replayTargetSequence is set, events up to that sequence are replayed: onAxonEvent fires (timeline works) but control_request messages are buffered. control_response events during replay mark buffered requests as resolved. After replay, unresolved control requests are yielded before live events.

      Returns AsyncGenerator<WireData>

      Parsed WireData objects from the agent.

      If called before connect.

    • Aborts the current SSE stream and re-subscribes without marking the transport as closed. The read loop exits, but a new readMessages() call will yield events from the fresh subscription.

      Returns Promise<void>

    • Publishes a serialized JSON message to the Axon channel.

      Parameters

      • data: string

        The JSON string to send. Its type field is used to derive the Axon event_type.

      Returns Promise<void>