Documentation
¶
Index ¶
- type Client
- func (c *Client) AgentHistory(ctx context.Context, sessionID string, before uint64, limit int) (api.AgentHistoryResult, error)
- func (c *Client) AgentSnapshot(ctx context.Context, sessionID string) (api.AgentSnapshotResult, error)
- func (c *Client) AgentTranscriptChunk(ctx context.Context, sessionID string, offset int64, limit int) (api.AgentTranscriptChunk, error)
- func (c *Client) AgentTurnEvents(ctx context.Context, sessionID string, turn uint64) ([]api.AgentEvent, error)
- func (c *Client) Attach(ctx context.Context, sessionID string) (api.Session, error)
- func (c *Client) Close() error
- func (c *Client) Input(ctx context.Context, data []byte) error
- func (c *Client) ReadOutput(ctx context.Context, onOutput func([]byte) bool) error
- func (c *Client) Request(ctx context.Context, method string, params map[string]any, result any) error
- func (c *Client) Roster(ctx context.Context) (api.State, error)
- func (c *Client) SubscribeAgent(ctx context.Context, sessionID string) (api.AgentSubscriptionResult, error)
- func (c *Client) WaitAgentTurn(ctx context.Context, sessionID string, epoch, after, current uint64) (api.AgentTurn, error)
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 (*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 (*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 (*Client) ReadOutput ¶
func (*Client) SubscribeAgent ¶
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.
Click to show internal directories.
Click to hide internal directories.