httpclient

package
v0.49.0 Latest Latest
Warning

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

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

Documentation

Overview

Package httpclient implements the principal-bound Control Session client over the versioned HTTP/SSE wire protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppServerClients

func AppServerClients(client *Client) (appserver.AppServerClients, error)

AppServerClients returns the complete focused AppServer client set backed by one authenticated HTTP Control client. The same transport-neutral contracts are used by embedded AppServer bindings.

Types

type Client

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

Client is the typed HTTP/SSE implementation of the bounded Control Session client contract.

func New

func New(config Config) (*Client, error)

New constructs one authenticated Control HTTP client.

func (*Client) AddMarketplace

func (*Client) AddPluginPath

func (*Client) AgentBindingStatus

func (c *Client) AgentBindingStatus(ctx context.Context, req appserver.AgentRequest) (agentbinding.Status, error)

func (*Client) AgentStatus

func (*Client) ApplyAgentBindingSet

func (c *Client) ApplyAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)

func (*Client) BindAgentBinding

func (*Client) Cancel

func (*Client) CancelParticipant

func (*Client) CloseSession

func (*Client) CompactSession

func (*Client) CompleteFile

func (*Client) CompleteResume

func (*Client) CompleteSkill

func (*Client) CompleteSlashArg

func (*Client) ConfigureSessionControllerMode

func (c *Client) ConfigureSessionControllerMode(ctx context.Context, req appserver.SessionControllerModeRequest) (appserver.CommandResult, error)

func (*Client) ConfigureSessionMode

func (c *Client) ConfigureSessionMode(ctx context.Context, req appserver.SessionModeRequest) (appserver.CommandResult, error)

func (*Client) ConfigureSessionPresentationMode

func (c *Client) ConfigureSessionPresentationMode(ctx context.Context, req appserver.SessionPresentationModeRequest) (appserver.CommandResult, error)

func (*Client) ConnectACP

func (*Client) ConnectModel

func (*Client) CreateAgentRole

func (*Client) CreateSession

func (*Client) DeleteAgentBindingSet

func (c *Client) DeleteAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)

func (*Client) DeleteAgentRole

func (*Client) DeleteModel

func (*Client) DisablePlugin

func (*Client) DisconnectACP

func (*Client) DisconnectCandidates

func (*Client) EnablePlugin

func (*Client) Handles

func (c *Client) Handles(ctx context.Context, sessionID string) ([]string, error)

func (*Client) HandoffAgent

func (*Client) Health

func (c *Client) Health(ctx context.Context) (appserver.HostStatus, error)

Health reports process liveness without selecting a Session.

func (*Client) Initialize

func (c *Client) Initialize(ctx context.Context) (appserver.ServerInfo, error)

func (*Client) InspectPlugin

func (*Client) InspectSession

func (c *Client) InspectSession(ctx context.Context, request appserver.StateRequest) (appserver.SessionState, error)

func (*Client) InstallPlugin

func (*Client) KillTerminal

func (c *Client) KillTerminal(ctx context.Context, req appserver.TerminalRequest) error

func (*Client) ListAgents

func (*Client) ListMarketplaces

func (c *Client) ListMarketplaces(ctx context.Context, req appserver.PluginRequest) ([]appserver.MarketplaceSnapshot, error)

func (*Client) ListPlugins

func (*Client) ListSessions

func (c *Client) ListSessions(ctx context.Context, request appserver.ListSessionsRequest) (session.SessionList, error)

func (*Client) PrepareACP

func (*Client) PrepareSandbox

func (c *Client) PrepareSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)

func (*Client) PresentationCapabilities

func (c *Client) PresentationCapabilities(ctx context.Context) (appserver.PresentationCapabilities, error)

func (*Client) PresentationSnapshot

func (*Client) Prompt

func (*Client) PromptParticipant

func (*Client) Readiness

func (c *Client) Readiness(ctx context.Context) (appserver.HostStatus, error)

Readiness reports whether recovery and listener publication have completed. A not-ready Host returns a decoded status with Ready=false and no transport error so launchers can wait without probing Session operations.

func (*Client) Reconnect

func (*Client) RefreshSandbox

func (c *Client) RefreshSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)

func (*Client) ReleaseTerminal

func (c *Client) ReleaseTerminal(ctx context.Context, req appserver.TerminalRequest) error

func (*Client) RemoveMarketplace

func (*Client) RemovePlugin

func (*Client) RepairSandbox

func (*Client) ResetAgentBinding

func (*Client) ResetSandbox

func (*Client) ResolveApproval

func (c *Client) ResolveApproval(ctx context.Context, request appserver.ResolveApprovalRequest) (appserver.CommandResult, error)

func (*Client) ResolveSkill

func (*Client) SaveAgentBindingSet

func (c *Client) SaveAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)

func (*Client) SessionStatus

func (c *Client) SessionStatus(ctx context.Context, request appserver.StatusRequest) (controlstatus.StatusSnapshot, error)

func (*Client) SetSandboxBackend

func (c *Client) SetSandboxBackend(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)

func (*Client) SetWorkspaceTrust added in v0.48.0

func (*Client) ShutdownHost

func (c *Client) ShutdownHost(ctx context.Context) (appserver.HostStatus, error)

ShutdownHost requests graceful quiesce of the authenticated Control Host. The response acknowledges the exact instance before listener shutdown starts.

func (*Client) StartParticipant

func (*Client) Steer

func (*Client) TerminalOutput

func (*Client) UpdateMarketplace

func (*Client) UseModel

func (*Client) UseSessionModel

func (*Client) WaitTerminal

type Config

type Config struct {
	BaseURL       string
	BearerToken   string
	HTTPClient    *http.Client
	EventBuffer   int
	MaxEventBytes int
	Compatibility appserver.CompatibilityPolicy
}

Config configures one authenticated, principal-bound Control client. BaseURL is the server origin, without the Control API prefix.

type RemoteError

type RemoteError struct {
	StatusCode int
	Detail     string
	Code       errorcode.Code
	Kind       appserver.ErrorKind
}

RemoteError is an HTTP failure that did not carry a Control CommandResult.

func (*RemoteError) Error

func (e *RemoteError) Error() string

func (*RemoteError) ErrorCode

func (e *RemoteError) ErrorCode() errorcode.Code

ErrorCode preserves the transport-neutral category carried by the Control wire. Status mapping remains a compatibility fallback for older servers.

func (*RemoteError) Is

func (e *RemoteError) Is(target error) bool

Is restores exact Control error identities used by client recovery logic.

type TaskClient

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

TaskClient is the authenticated HTTP implementation of the independent Task observation contract.

func NewTaskClient

func NewTaskClient(client *Client) (*TaskClient, error)

NewTaskClient constructs one Task observation client from an authenticated Control HTTP client. Principal binding is already fixed by bearer auth.

func (*TaskClient) Events

func (*TaskClient) List

func (*TaskClient) Subscribe

func (*TaskClient) WatchDirectory added in v0.45.0

Jump to

Keyboard shortcuts

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