package client import ( "context" "net/http" ) type IOStreamState struct { Count int `json:"count"` Generation uint64 `json:"generation"` } type IOStreamStateExpectation struct { ExpectedCount *int `json:"expected_count,omitempty"` PresentStreamID string `json:"present_stream_id,omitempty"` AbsentStreamID string `json:"absent_stream_id,omitempty"` } func ExpectedIOStreamCount(count int) *int { return &count } func (client *Client) IOStreamState(ctx context.Context) (IOStreamState, error) { return DoREST[struct{}, IOStreamState](ctx, client, RESTRequest[struct{}]{Method: http.MethodGet, Path: "/agentcompat/io-stream-state"}) } func (client *Client) WaitForIOStreamState(ctx context.Context, expectation IOStreamStateExpectation) (IOStreamState, error) { return DoREST[IOStreamStateExpectation, IOStreamState](ctx, client, RESTRequest[IOStreamStateExpectation]{Method: http.MethodPost, Path: "/agentcompat/io-stream-state", Body: &expectation}) }