agentapi

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package agentapi provides the HTTP server for the ACP agent inside the container.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestContext

type RequestContext struct {
	Logger   zerolog.Logger
	Request  *http.Request
	Response http.ResponseWriter
}

RequestContext holds the context for a request.

type Server

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

Server implements REST API endpoints and the websocket server that ACP communications are routed through.

func NewServer

func NewServer(agentCommand []string,
	terminalTools *acptools.TerminalTools,
	fileTools *acptools.FilesystemTools,
	plugins *plugin.ACPManager,
) *Server

NewServer creates a new HTTP server for the ACP agent.

func (*Server) ActiveConnection added in v0.0.2

func (s *Server) ActiveConnection() int64

ActiveConnection returns the number of currently active websocket connections.

func (*Server) Serve

func (s *Server) Serve(addr string) error

Serve listens on addr and bridges each websocket connection to an agent process spawned from agentCommand.

func (*Server) ServeTLS added in v0.0.2

func (s *Server) ServeTLS(addr string, tlsConfig *tls.Config) error

ServeTLS listens on addr and serves over TLS using the provided config, bridging each websocket connection to an agent process.

Jump to

Keyboard shortcuts

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