bothy-sdk
    Preparing search index...

    Class RecordingSource

    Records every delivery (tokens stay in memory as Secret, never printed).

    const recording = new RecordingSource(await adapter.makeSource());
    recording.envelopes("agent.invocation").length;

    Hierarchy

    • Wrapper
      • RecordingSource
    Index

    Constructors

    Properties

    deliveries: Delivery[] = []

    Every delivery in order.

    The wrapped source.

    Accessors

    • get closeReason(): CloseReason | undefined

      Why the wrapped source stopped, once it has.

      Returns CloseReason | undefined

    Methods

    • Yields and records the inner deliveries.

      Returns AsyncGenerator<Delivery, void, undefined>

      The deliveries.

    • Forwards to the wrapped source.

      Parameters

      • seq: number

        The seq.

      Returns Promise<void>

    • Forwards to the wrapped source.

      Parameters

      • seq: number

        The cursor.

      Returns Promise<void>

    • Forwards to the wrapped source.

      Parameters

      • requestId: string

        The request.

      • choices: readonly {}[]

        The choices.

      Returns Promise<void>

    • Forwards to the wrapped source.

      Returns Promise<void>

    • Returns the recorded envelopes, optionally of one type.

      Parameters

      • OptionaleventType: string

        The event type to keep.

      Returns Envelope[]

      The envelopes in delivery order.

    • Forwards to the wrapped source.

      Parameters

      • seq: number

        The settled seq.

      Returns Promise<void>