acp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.1.0-dev"

Functions

func NewServer

func NewServer(ctx context.Context, logger *slog.Logger) (*acplib.Server, error)

Types

type WSRelay

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

WSRelay is a WebSocket-to-stdio bridge for the ACP server. It allows IDE plugins and other remote clients to connect to covo-agent's ACP server over WebSocket instead of stdio, enabling:

  • Remote IDE integration across different machines
  • Multiple concurrent client connections
  • Network-transparent ACP access

Each WebSocket connection spawns a dedicated `covo-agent acp` subprocess, with stdin/stdout relayed bidirectionally. This ensures full isolation between clients and leverages the existing stdio transport without modifying the ACP library.

func NewWSRelay

func NewWSRelay(cfg WSRelayConfig) (*WSRelay, error)

NewWSRelay creates a new WebSocket relay server.

func (*WSRelay) Addr

func (r *WSRelay) Addr() string

Addr returns the actual listening address.

func (*WSRelay) Shutdown

func (r *WSRelay) Shutdown()

Shutdown gracefully stops the relay server.

func (*WSRelay) Start

func (r *WSRelay) Start(ctx context.Context) error

Start begins listening for WebSocket connections.

type WSRelayConfig

type WSRelayConfig struct {
	// Addr is the listen address (default: "127.0.0.1:17891").
	Addr            string
	AuthToken       string
	MaxConnections  int
	MaxMessageBytes int64
	// BinaryPath is the path to the covo-agent binary (default: os.Executable).
	BinaryPath string
	// Logger for relay events.
	Logger *slog.Logger
}

WSRelayConfig configures the ACP WebSocket relay server.

Jump to

Keyboard shortcuts

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