Interface BetaResponsesClientEvent.Visitor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • visitResponseCreate

         abstract T visitResponseCreate(BetaResponsesClientEvent.ResponseCreate responseCreate)

        Client event for creating a response over a persistent WebSocket connection. This payload uses the same top-level fields as POST /v1/responses.

        Notes:

        • stream is implicit over WebSocket and should not be sent.

        • background is not supported over WebSocket.

      • visitResponseInject

         abstract T visitResponseInject(BetaResponseInjectEvent responseInject)

        Injects input items into an active response over a WebSocket connection. The items are validated and committed atomically. Currently, the server accepts client-owned tool outputs that resume a waiting agent.

      • unknown

         T unknown(JsonValue json)

        Maps an unknown variant of BetaResponsesClientEvent to a value of type T.

        An instance of BetaResponsesClientEvent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.