transport

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProcedureSandboxCreateSession    = "/rpc.v1.SandboxService/CreateSession"
	ProcedureSandboxGetSession       = "/rpc.v1.SandboxService/GetSession"
	ProcedureSandboxPauseSession     = "/rpc.v1.SandboxService/PauseSession"
	ProcedureSandboxResumeSession    = "/rpc.v1.SandboxService/ResumeSession"
	ProcedureSandboxDestroySession   = "/rpc.v1.SandboxService/DestroySession"
	ProcedureSandboxLaunchProcess    = "/rpc.v1.SandboxService/LaunchProcess"
	ProcedureSandboxKillProcess      = "/rpc.v1.SandboxService/KillProcess"
	ProcedureSandboxGetProcessStatus = "/rpc.v1.SandboxService/GetProcessStatus"
	ProcedureSandboxExecuteTool      = "/rpc.v1.SandboxService/ExecuteTool"
	ProcedureSandboxExecuteStream    = "/rpc.v1.SandboxService/ExecuteToolStream"
	ProcedureSandboxTurnComplete     = "/rpc.v1.SandboxService/TurnComplete"
	ProcedureSandboxCreateSnapshot   = "/rpc.v1.SandboxService/CreateSnapshot"
	ProcedureSandboxRollback         = "/rpc.v1.SandboxService/RollbackSession"
	ProcedureSandboxListSnapshots    = "/rpc.v1.SandboxService/ListSnapshots"
	ProcedureSandboxHealthCheck      = "/rpc.v1.SandboxService/HealthCheck"

	ProcedureAgentCreateSession   = "/rpc.v1.AgentService/CreateSession"
	ProcedureAgentGetSession      = "/rpc.v1.AgentService/GetSession"
	ProcedureAgentListSessions    = "/rpc.v1.AgentService/ListSessions"
	ProcedureAgentResumeSession   = "/rpc.v1.AgentService/ResumeSession"
	ProcedureAgentSendMessage     = "/rpc.v1.AgentService/SendMessage"
	ProcedureAgentContinue        = "/rpc.v1.AgentService/Continue"
	ProcedureAgentSteer           = "/rpc.v1.AgentService/Steer"
	ProcedureAgentFollowUp        = "/rpc.v1.AgentService/FollowUp"
	ProcedureAgentAbort           = "/rpc.v1.AgentService/Abort"
	ProcedureAgentSubscribeEvents = "/rpc.v1.AgentService/SubscribeEvents"
	ProcedureAgentDestroySession  = "/rpc.v1.AgentService/DestroySession"

	ProcedureEventsStream = "/rpc.v1.AgentEventService/StreamAgentEvents"

	ProcedureTerminalStream = "/rpc.v1.TerminalService/StreamTerminal"
)

Variables

This section is empty.

Functions

func NewPolicyInterceptor

func NewPolicyInterceptor(cfg InterceptorConfig) connect.Interceptor

Types

type ClientConfig

type ClientConfig struct {
	APIVersion      string
	MaxMessageBytes int
	HeaderInjector  ClientHeaderInjector
}

type ClientHeaderInjector

type ClientHeaderInjector func(ctx context.Context, procedure string, headers http.Header) error

func HeaderTokenAuth

func HeaderTokenAuth(name, token string) ClientHeaderInjector

type EventClient

type EventClient struct {
	Stream *connect.Client[api.StreamAgentEventsRequest, api.AgentEventEnvelope]
}

func NewEventClient

func NewEventClient(httpClient connect.HTTPClient, baseURL string, cfg ClientConfig) *EventClient

type InterceptorConfig

type InterceptorConfig struct {
	AuthHook       ServerAuthHook
	APIVersion     string
	MinAPIVersion  string
	APIVersionName string
}

type JSONCodec

type JSONCodec struct{}

func (JSONCodec) Marshal

func (JSONCodec) Marshal(v any) ([]byte, error)

func (JSONCodec) Name

func (JSONCodec) Name() string

func (JSONCodec) Unmarshal

func (JSONCodec) Unmarshal(data []byte, v any) error

type Server

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

func NewServer

func NewServer(cfg ServerConfig, opts ...ServerOption) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

type ServerAuthHook

type ServerAuthHook func(ctx context.Context, procedure string, headers http.Header) error

type ServerConfig

type ServerConfig struct {
	MaxMessageBytes int
	APIVersion      string
	MinAPIVersion   string
	AuthHook        ServerAuthHook
}

type ServerOption

type ServerOption func(*Server)

func WithAgentEventService

func WithAgentEventService(e api.AgentEventService) ServerOption

func WithAgentService

func WithAgentService(a agentapi.AgentService) ServerOption

func WithSandboxService

func WithSandboxService(s api.SandboxService) ServerOption

func WithSessionManager

func WithSessionManager(t *termmux.SessionManager) ServerOption

type TerminalClient

type TerminalClient struct {
	Stream *connect.Client[termmux.TerminalClientMessage, termmux.TerminalServerMessage]
}

func NewTerminalClient

func NewTerminalClient(httpClient connect.HTTPClient, baseURL string, cfg ClientConfig) *TerminalClient

Jump to

Keyboard shortcuts

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