Documentation
¶
Overview ¶
Package httpclient implements the principal-bound Control Session client over the versioned HTTP/SSE wire protocol.
Index ¶
- func AppServerClients(client *Client) (appserver.AppServerClients, error)
- type Client
- func (c *Client) ACPPreparation(ctx context.Context, req appserver.ACPPreparationRequest) (controlagents.ACPPreparation, error)
- func (c *Client) AddMarketplace(ctx context.Context, req appserver.AddMarketplaceRequest) (appserver.CommandResult, error)
- func (c *Client) AddPluginPath(ctx context.Context, req appserver.AddPluginPathRequest) (appserver.CommandResult, error)
- func (c *Client) AgentBindingStatus(ctx context.Context, req appserver.AgentRequest) (agentbinding.Status, error)
- func (c *Client) AgentStatus(ctx context.Context, req appserver.AgentRequest) (appserver.AgentStatusSnapshot, error)
- func (c *Client) ApplyAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)
- func (c *Client) BindAgentBinding(ctx context.Context, req appserver.BindAgentBindingRequest) (appserver.CommandResult, error)
- func (c *Client) Cancel(ctx context.Context, request appserver.CancelRequest) (appserver.CommandResult, error)
- func (c *Client) CancelParticipant(ctx context.Context, req appserver.CancelParticipantRequest) (appserver.CommandResult, error)
- func (c *Client) CloseSession(ctx context.Context, request appserver.CloseSessionRequest) (appserver.CommandResult, error)
- func (c *Client) CompactSession(ctx context.Context, request appserver.CompactSessionRequest) (appserver.CommandResult, error)
- func (c *Client) CompleteFile(ctx context.Context, req appserver.CompletionRequest) ([]appserver.CompletionCandidate, error)
- func (c *Client) CompleteResume(ctx context.Context, req appserver.CompletionRequest) ([]appserver.ResumeCandidate, error)
- func (c *Client) CompleteSkill(ctx context.Context, req appserver.CompletionRequest) ([]appserver.CompletionCandidate, error)
- func (c *Client) CompleteSlashArg(ctx context.Context, req appserver.CompletionRequest) ([]appserver.SlashArgCandidate, error)
- func (c *Client) ConfigureSessionControllerMode(ctx context.Context, req appserver.SessionControllerModeRequest) (appserver.CommandResult, error)
- func (c *Client) ConfigureSessionMode(ctx context.Context, req appserver.SessionModeRequest) (appserver.CommandResult, error)
- func (c *Client) ConfigureSessionPresentation(ctx context.Context, req appserver.SessionPresentationConfigRequest) (appserver.CommandResult, error)
- func (c *Client) ConfigureSessionPresentationMode(ctx context.Context, req appserver.SessionPresentationModeRequest) (appserver.CommandResult, error)
- func (c *Client) ConnectACP(ctx context.Context, req appserver.ConnectACPRequest) (appserver.CommandResult, error)
- func (c *Client) ConnectModel(ctx context.Context, req appserver.ConnectModelRequest) (appserver.CommandResult, error)
- func (c *Client) CreateAgentRole(ctx context.Context, req appserver.CreateAgentRoleRequest) (appserver.CommandResult, error)
- func (c *Client) CreateSession(ctx context.Context, request appserver.CreateSessionRequest) (appserver.CommandResult, error)
- func (c *Client) DeleteAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)
- func (c *Client) DeleteAgentRole(ctx context.Context, req appserver.DeleteAgentRoleRequest) (appserver.CommandResult, error)
- func (c *Client) DeleteModel(ctx context.Context, req appserver.DeleteModelRequest) (appserver.CommandResult, error)
- func (c *Client) DisablePlugin(ctx context.Context, req appserver.DisablePluginRequest) (appserver.CommandResult, error)
- func (c *Client) DisconnectACP(ctx context.Context, req appserver.DisconnectACPRequest) (appserver.CommandResult, error)
- func (c *Client) DisconnectCandidates(ctx context.Context, req appserver.AgentRequest) (appserver.DisconnectCandidatesSnapshot, error)
- func (c *Client) EnablePlugin(ctx context.Context, req appserver.EnablePluginRequest) (appserver.CommandResult, error)
- func (c *Client) Handles(ctx context.Context, sessionID string) ([]string, error)
- func (c *Client) HandoffAgent(ctx context.Context, req appserver.HandoffAgentRequest) (appserver.CommandResult, error)
- func (c *Client) Health(ctx context.Context) (appserver.HostStatus, error)
- func (c *Client) Initialize(ctx context.Context) (appserver.ServerInfo, error)
- func (c *Client) InspectPlugin(ctx context.Context, req appserver.PluginRequest) (appserver.PluginSnapshot, error)
- func (c *Client) InspectSession(ctx context.Context, request appserver.StateRequest) (appserver.SessionState, error)
- func (c *Client) InstallPlugin(ctx context.Context, req appserver.InstallPluginRequest) (appserver.CommandResult, error)
- func (c *Client) KillTerminal(ctx context.Context, req appserver.TerminalRequest) error
- func (c *Client) ListAgents(ctx context.Context, req appserver.AgentRequest) ([]appserver.AgentCandidate, error)
- func (c *Client) ListMarketplaces(ctx context.Context, req appserver.PluginRequest) ([]appserver.MarketplaceSnapshot, error)
- func (c *Client) ListPlugins(ctx context.Context, req appserver.PluginRequest) ([]appserver.PluginSnapshot, error)
- func (c *Client) ListSessions(ctx context.Context, request appserver.ListSessionsRequest) (session.SessionList, error)
- func (c *Client) PrepareACP(ctx context.Context, req appserver.PrepareACPRequest) (appserver.CommandResult, error)
- func (c *Client) PrepareACPAuthentication(ctx context.Context, req appserver.PrepareACPAuthenticationRequest) (appserver.CommandResult, error)
- func (c *Client) PrepareSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
- func (c *Client) PresentationCapabilities(ctx context.Context) (appserver.PresentationCapabilities, error)
- func (c *Client) PresentationSnapshot(ctx context.Context, req appserver.PresentationRequest) (appserver.PresentationSnapshot, error)
- func (c *Client) Prompt(ctx context.Context, request appserver.PromptRequest) (appserver.CommandResult, error)
- func (c *Client) PromptParticipant(ctx context.Context, req appserver.PromptParticipantRequest) (appserver.CommandResult, error)
- func (c *Client) Readiness(ctx context.Context) (appserver.HostStatus, error)
- func (c *Client) Reconnect(ctx context.Context, request appserver.ReconnectRequest) (appserver.ReconnectResult, error)
- func (c *Client) RefreshSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
- func (c *Client) ReleaseTerminal(ctx context.Context, req appserver.TerminalRequest) error
- func (c *Client) RemoveMarketplace(ctx context.Context, req appserver.RemoveMarketplaceRequest) (appserver.CommandResult, error)
- func (c *Client) RemovePlugin(ctx context.Context, req appserver.RemovePluginRequest) (appserver.CommandResult, error)
- func (c *Client) RepairSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
- func (c *Client) ResetAgentBinding(ctx context.Context, req appserver.ResetAgentBindingRequest) (appserver.CommandResult, error)
- func (c *Client) ResetSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
- func (c *Client) ResolveApproval(ctx context.Context, request appserver.ResolveApprovalRequest) (appserver.CommandResult, error)
- func (c *Client) ResolveSkill(ctx context.Context, req appserver.CompletionRequest) (appserver.SkillResolveResult, error)
- func (c *Client) SaveAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)
- func (c *Client) SessionStatus(ctx context.Context, request appserver.StatusRequest) (controlstatus.StatusSnapshot, error)
- func (c *Client) SetSandboxBackend(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
- func (c *Client) SetWorkspaceTrust(ctx context.Context, req appserver.WorkspaceTrustRequest) (appserver.CommandResult, error)
- func (c *Client) ShutdownHost(ctx context.Context) (appserver.HostStatus, error)
- func (c *Client) StartParticipant(ctx context.Context, req appserver.StartParticipantRequest) (appserver.CommandResult, error)
- func (c *Client) Steer(ctx context.Context, request appserver.SteerRequest) (appserver.CommandResult, error)
- func (c *Client) TerminalOutput(ctx context.Context, req appserver.TerminalRequest) (appserver.TerminalOutput, error)
- func (c *Client) UpdateMarketplace(ctx context.Context, req appserver.UpdateMarketplaceRequest) (appserver.CommandResult, error)
- func (c *Client) UseModel(ctx context.Context, req appserver.UseModelRequest) (appserver.CommandResult, error)
- func (c *Client) UseSessionModel(ctx context.Context, req appserver.SessionModelRequest) (appserver.CommandResult, error)
- func (c *Client) WaitTerminal(ctx context.Context, req appserver.TerminalRequest) (appserver.TerminalExitStatus, error)
- type Config
- type RemoteError
- type TaskClient
- func (c *TaskClient) Events(ctx context.Context, request taskstream.ReadRequest) (taskstream.Batch, error)
- func (c *TaskClient) List(ctx context.Context, request taskstream.ListRequest) (taskstream.ListResult, error)
- func (c *TaskClient) Subscribe(ctx context.Context, request taskstream.SubscribeRequest) (taskstream.SubscribeResult, error)
- func (c *TaskClient) WatchDirectory(ctx context.Context, request taskstream.DirectoryWatchRequest) (taskstream.DirectoryWatchResult, error)
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 (*Client) ACPPreparation ¶
func (c *Client) ACPPreparation(ctx context.Context, req appserver.ACPPreparationRequest) (controlagents.ACPPreparation, error)
func (*Client) AddMarketplace ¶
func (c *Client) AddMarketplace(ctx context.Context, req appserver.AddMarketplaceRequest) (appserver.CommandResult, error)
func (*Client) AddPluginPath ¶
func (c *Client) AddPluginPath(ctx context.Context, req appserver.AddPluginPathRequest) (appserver.CommandResult, error)
func (*Client) AgentBindingStatus ¶
func (c *Client) AgentBindingStatus(ctx context.Context, req appserver.AgentRequest) (agentbinding.Status, error)
func (*Client) AgentStatus ¶
func (c *Client) AgentStatus(ctx context.Context, req appserver.AgentRequest) (appserver.AgentStatusSnapshot, error)
func (*Client) ApplyAgentBindingSet ¶
func (c *Client) ApplyAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)
func (*Client) BindAgentBinding ¶
func (c *Client) BindAgentBinding(ctx context.Context, req appserver.BindAgentBindingRequest) (appserver.CommandResult, error)
func (*Client) Cancel ¶
func (c *Client) Cancel(ctx context.Context, request appserver.CancelRequest) (appserver.CommandResult, error)
func (*Client) CancelParticipant ¶
func (c *Client) CancelParticipant(ctx context.Context, req appserver.CancelParticipantRequest) (appserver.CommandResult, error)
func (*Client) CloseSession ¶
func (c *Client) CloseSession(ctx context.Context, request appserver.CloseSessionRequest) (appserver.CommandResult, error)
func (*Client) CompactSession ¶
func (c *Client) CompactSession(ctx context.Context, request appserver.CompactSessionRequest) (appserver.CommandResult, error)
func (*Client) CompleteFile ¶
func (c *Client) CompleteFile(ctx context.Context, req appserver.CompletionRequest) ([]appserver.CompletionCandidate, error)
func (*Client) CompleteResume ¶
func (c *Client) CompleteResume(ctx context.Context, req appserver.CompletionRequest) ([]appserver.ResumeCandidate, error)
func (*Client) CompleteSkill ¶
func (c *Client) CompleteSkill(ctx context.Context, req appserver.CompletionRequest) ([]appserver.CompletionCandidate, error)
func (*Client) CompleteSlashArg ¶
func (c *Client) CompleteSlashArg(ctx context.Context, req appserver.CompletionRequest) ([]appserver.SlashArgCandidate, error)
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) ConfigureSessionPresentation ¶
func (c *Client) ConfigureSessionPresentation(ctx context.Context, req appserver.SessionPresentationConfigRequest) (appserver.CommandResult, error)
func (*Client) ConfigureSessionPresentationMode ¶
func (c *Client) ConfigureSessionPresentationMode(ctx context.Context, req appserver.SessionPresentationModeRequest) (appserver.CommandResult, error)
func (*Client) ConnectACP ¶
func (c *Client) ConnectACP(ctx context.Context, req appserver.ConnectACPRequest) (appserver.CommandResult, error)
func (*Client) ConnectModel ¶
func (c *Client) ConnectModel(ctx context.Context, req appserver.ConnectModelRequest) (appserver.CommandResult, error)
func (*Client) CreateAgentRole ¶
func (c *Client) CreateAgentRole(ctx context.Context, req appserver.CreateAgentRoleRequest) (appserver.CommandResult, error)
func (*Client) CreateSession ¶
func (c *Client) CreateSession(ctx context.Context, request appserver.CreateSessionRequest) (appserver.CommandResult, error)
func (*Client) DeleteAgentBindingSet ¶
func (c *Client) DeleteAgentBindingSet(ctx context.Context, req appserver.AgentBindingSetRequest) (appserver.CommandResult, error)
func (*Client) DeleteAgentRole ¶
func (c *Client) DeleteAgentRole(ctx context.Context, req appserver.DeleteAgentRoleRequest) (appserver.CommandResult, error)
func (*Client) DeleteModel ¶
func (c *Client) DeleteModel(ctx context.Context, req appserver.DeleteModelRequest) (appserver.CommandResult, error)
func (*Client) DisablePlugin ¶
func (c *Client) DisablePlugin(ctx context.Context, req appserver.DisablePluginRequest) (appserver.CommandResult, error)
func (*Client) DisconnectACP ¶
func (c *Client) DisconnectACP(ctx context.Context, req appserver.DisconnectACPRequest) (appserver.CommandResult, error)
func (*Client) DisconnectCandidates ¶
func (c *Client) DisconnectCandidates(ctx context.Context, req appserver.AgentRequest) (appserver.DisconnectCandidatesSnapshot, error)
func (*Client) EnablePlugin ¶
func (c *Client) EnablePlugin(ctx context.Context, req appserver.EnablePluginRequest) (appserver.CommandResult, error)
func (*Client) HandoffAgent ¶
func (c *Client) HandoffAgent(ctx context.Context, req appserver.HandoffAgentRequest) (appserver.CommandResult, error)
func (*Client) Initialize ¶
func (*Client) InspectPlugin ¶
func (c *Client) InspectPlugin(ctx context.Context, req appserver.PluginRequest) (appserver.PluginSnapshot, error)
func (*Client) InspectSession ¶
func (c *Client) InspectSession(ctx context.Context, request appserver.StateRequest) (appserver.SessionState, error)
func (*Client) InstallPlugin ¶
func (c *Client) InstallPlugin(ctx context.Context, req appserver.InstallPluginRequest) (appserver.CommandResult, error)
func (*Client) KillTerminal ¶
func (*Client) ListAgents ¶
func (c *Client) ListAgents(ctx context.Context, req appserver.AgentRequest) ([]appserver.AgentCandidate, error)
func (*Client) ListMarketplaces ¶
func (c *Client) ListMarketplaces(ctx context.Context, req appserver.PluginRequest) ([]appserver.MarketplaceSnapshot, error)
func (*Client) ListPlugins ¶
func (c *Client) ListPlugins(ctx context.Context, req appserver.PluginRequest) ([]appserver.PluginSnapshot, error)
func (*Client) ListSessions ¶
func (c *Client) ListSessions(ctx context.Context, request appserver.ListSessionsRequest) (session.SessionList, error)
func (*Client) PrepareACP ¶
func (c *Client) PrepareACP(ctx context.Context, req appserver.PrepareACPRequest) (appserver.CommandResult, error)
func (*Client) PrepareACPAuthentication ¶
func (c *Client) PrepareACPAuthentication(ctx context.Context, req appserver.PrepareACPAuthenticationRequest) (appserver.CommandResult, error)
func (*Client) PrepareSandbox ¶
func (c *Client) PrepareSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
func (*Client) PresentationCapabilities ¶
func (*Client) PresentationSnapshot ¶
func (c *Client) PresentationSnapshot(ctx context.Context, req appserver.PresentationRequest) (appserver.PresentationSnapshot, error)
func (*Client) Prompt ¶
func (c *Client) Prompt(ctx context.Context, request appserver.PromptRequest) (appserver.CommandResult, error)
func (*Client) PromptParticipant ¶
func (c *Client) PromptParticipant(ctx context.Context, req appserver.PromptParticipantRequest) (appserver.CommandResult, error)
func (*Client) Readiness ¶
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 (c *Client) Reconnect(ctx context.Context, request appserver.ReconnectRequest) (appserver.ReconnectResult, error)
func (*Client) RefreshSandbox ¶
func (c *Client) RefreshSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
func (*Client) ReleaseTerminal ¶
func (*Client) RemoveMarketplace ¶
func (c *Client) RemoveMarketplace(ctx context.Context, req appserver.RemoveMarketplaceRequest) (appserver.CommandResult, error)
func (*Client) RemovePlugin ¶
func (c *Client) RemovePlugin(ctx context.Context, req appserver.RemovePluginRequest) (appserver.CommandResult, error)
func (*Client) RepairSandbox ¶
func (c *Client) RepairSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
func (*Client) ResetAgentBinding ¶
func (c *Client) ResetAgentBinding(ctx context.Context, req appserver.ResetAgentBindingRequest) (appserver.CommandResult, error)
func (*Client) ResetSandbox ¶
func (c *Client) ResetSandbox(ctx context.Context, req appserver.SandboxRequest) (appserver.CommandResult, error)
func (*Client) ResolveApproval ¶
func (c *Client) ResolveApproval(ctx context.Context, request appserver.ResolveApprovalRequest) (appserver.CommandResult, error)
func (*Client) ResolveSkill ¶
func (c *Client) ResolveSkill(ctx context.Context, req appserver.CompletionRequest) (appserver.SkillResolveResult, error)
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 (c *Client) SetWorkspaceTrust(ctx context.Context, req appserver.WorkspaceTrustRequest) (appserver.CommandResult, error)
func (*Client) ShutdownHost ¶
ShutdownHost requests graceful quiesce of the authenticated Control Host. The response acknowledges the exact instance before listener shutdown starts.
func (*Client) StartParticipant ¶
func (c *Client) StartParticipant(ctx context.Context, req appserver.StartParticipantRequest) (appserver.CommandResult, error)
func (*Client) Steer ¶
func (c *Client) Steer(ctx context.Context, request appserver.SteerRequest) (appserver.CommandResult, error)
func (*Client) TerminalOutput ¶
func (c *Client) TerminalOutput(ctx context.Context, req appserver.TerminalRequest) (appserver.TerminalOutput, error)
func (*Client) UpdateMarketplace ¶
func (c *Client) UpdateMarketplace(ctx context.Context, req appserver.UpdateMarketplaceRequest) (appserver.CommandResult, error)
func (*Client) UseModel ¶
func (c *Client) UseModel(ctx context.Context, req appserver.UseModelRequest) (appserver.CommandResult, error)
func (*Client) UseSessionModel ¶
func (c *Client) UseSessionModel(ctx context.Context, req appserver.SessionModelRequest) (appserver.CommandResult, error)
func (*Client) WaitTerminal ¶
func (c *Client) WaitTerminal(ctx context.Context, req appserver.TerminalRequest) (appserver.TerminalExitStatus, error)
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 (c *TaskClient) Events(ctx context.Context, request taskstream.ReadRequest) (taskstream.Batch, error)
func (*TaskClient) List ¶
func (c *TaskClient) List(ctx context.Context, request taskstream.ListRequest) (taskstream.ListResult, error)
func (*TaskClient) Subscribe ¶
func (c *TaskClient) Subscribe(ctx context.Context, request taskstream.SubscribeRequest) (taskstream.SubscribeResult, error)
func (*TaskClient) WatchDirectory ¶ added in v0.45.0
func (c *TaskClient) WatchDirectory( ctx context.Context, request taskstream.DirectoryWatchRequest, ) (taskstream.DirectoryWatchResult, error)