client

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 18 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 DialRelay added in v0.12.0

func DialRelay(ctx context.Context, relayURL, hostID, accessToken string) (*Client, error)

DialRelay connects a native client to an access capability issued by the Relay. Relay endpoints are not Headless HTTP roots: they use the scoped /h/{hostID}/v1/client/connect alias and authenticate with access_token.

func (*Client) AbortAgentAttachment added in v0.12.0

func (c *Client) AbortAgentAttachment(ctx context.Context, command api.AgentAttachmentAbortCommand) (api.AgentAttachmentResult, error)

func (*Client) AgentContiguousThrough added in v0.12.0

func (c *Client) AgentContiguousThrough(streamID string) (uint64, error)

AgentContiguousThrough never skips a missing sequence, including unknown types.

func (*Client) AgentEventsHistory added in v0.12.0

func (c *Client) AgentEventsHistory(ctx context.Context, request api.AgentEventsHistoryRequest) (api.AgentEventsHistoryResult, error)

func (*Client) AgentExecution added in v0.12.0

func (c *Client) AgentExecution(ctx context.Context, executionID string) (api.AgentExecution, error)

func (*Client) CancelAgentTurn added in v0.12.0

func (c *Client) CancelAgentTurn(ctx context.Context, command api.AgentTurnCancelCommand) (api.AgentCommandReceipt, error)

func (*Client) ClearAgentGoal added in v0.12.0

func (c *Client) ClearAgentGoal(ctx context.Context, command api.AgentGoalClearCommand) (api.AgentCommandReceipt, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) CompleteAgentAttachment added in v0.12.0

func (c *Client) CompleteAgentAttachment(ctx context.Context, command api.AgentAttachmentCompleteCommand) (api.AgentAttachmentResult, error)

func (*Client) Input

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

func (*Client) PrepareAgentAttachment added in v0.12.0

func (c *Client) PrepareAgentAttachment(ctx context.Context, command api.AgentAttachmentPrepareCommand) (api.AgentAttachmentPrepareResult, error)

func (*Client) PutAgentAttachmentChunk added in v0.12.0

func (c *Client) PutAgentAttachmentChunk(ctx context.Context, command api.AgentAttachmentChunkCommand) (api.AgentAttachmentResult, 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 any, result any) error

func (*Client) ResolveAgentInteraction added in v0.12.0

func (c *Client) ResolveAgentInteraction(ctx context.Context, command api.AgentInteractionResolveCommand) (api.AgentCommandReceipt, error)

func (*Client) ResumeAgentExecution added in v0.12.0

func (c *Client) ResumeAgentExecution(ctx context.Context, command api.AgentCommand) (api.AgentCommandReceipt, error)

func (*Client) Roster

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

func (*Client) SetAgentGoal added in v0.12.0

func (c *Client) SetAgentGoal(ctx context.Context, command api.AgentGoalSetCommand) (api.AgentCommandReceipt, error)

func (*Client) SetCloseHook added in v0.12.0

func (c *Client) SetCloseHook(hook func())

SetCloseHook registers a cleanup callback owned by the caller. It is used by the CLI to tie an SSH tunnel's lifetime to the authenticated WebSocket; callers must set it before handing the client to command code.

func (*Client) StartAgentTurn added in v0.12.0

func (c *Client) StartAgentTurn(ctx context.Context, command api.AgentTurnStartCommand) (api.AgentCommandReceipt, error)

func (*Client) SteerAgentTurn added in v0.12.0

func (c *Client) SteerAgentTurn(ctx context.Context, command api.AgentTurnSteerCommand) (api.AgentCommandReceipt, error)

func (*Client) Subscribe added in v0.12.0

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

func (*Client) SubscribeAgentEvents added in v0.12.0

func (*Client) WaitAgentTurn

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

WaitAgentTurn consumes only canonical events from the subscribed execution. Turn numbers are a local CLI projection; stream identity prevents replacement executions from completing a wait for an earlier conversation.

Jump to

Keyboard shortcuts

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