client

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(ctx context.Context, endpoint, token string) (*Client, error)

func (*Client) AgentHistory

func (c *Client) AgentHistory(
	ctx context.Context,
	sessionID string,
	before uint64,
	limit int,
) (api.AgentHistoryResult, error)

AgentHistory returns one bounded page of normalized transcript events. A zero before cursor starts at the newest page; callers can pass the returned cursor to walk towards older events.

func (*Client) AgentSnapshot

func (c *Client) AgentSnapshot(ctx context.Context, sessionID string) (api.AgentSnapshotResult, error)

func (*Client) AgentTranscriptChunk added in v0.9.0

func (c *Client) AgentTranscriptChunk(
	ctx context.Context,
	sessionID string,
	offset int64,
	limit int,
) (api.AgentTranscriptChunk, error)

AgentTranscriptChunk reads a bounded raw JSONL range from the transcript bound to sessionID. Offset is encoded as a decimal string so large files do not lose precision while crossing JSON's floating-point default.

func (*Client) AgentTurnEvents

func (c *Client) AgentTurnEvents(ctx context.Context, sessionID string, turn uint64) ([]api.AgentEvent, error)

func (*Client) Attach

func (c *Client) Attach(ctx context.Context, sessionID string) (api.Session, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Input

func (c *Client) Input(ctx context.Context, data []byte) error

func (*Client) ReadOutput

func (c *Client) ReadOutput(ctx context.Context, onOutput func([]byte) bool) error

func (*Client) Request

func (c *Client) Request(ctx context.Context, method string, params map[string]any, result any) error

func (*Client) Roster

func (c *Client) Roster(ctx context.Context) (api.State, error)

func (*Client) SubscribeAgent

func (c *Client) SubscribeAgent(ctx context.Context, sessionID string) (api.AgentSubscriptionResult, error)

func (*Client) WaitAgentTurn

func (c *Client) WaitAgentTurn(
	ctx context.Context,
	sessionID string,
	epoch, after, current uint64,
) (api.AgentTurn, error)

WaitAgentTurn blocks on the attached session until a turn newer than after reaches a terminal state. current may name an already-running turn that a standalone wait should join; send-and-wait callers pass zero.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL