Help us shape the future of Go! Take the 2026 Go Developer Survey

acp

package
v0.19.12 Latest Latest
Warning

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

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

Documentation

Overview

Package acp serves the Agent Client Protocol (agentclientprotocol.com): newline-delimited JSON-RPC 2.0 through which a client, an editor or a chat platform's agent harness, drives any number of Orb sessions in one process. An ACP session id is the Orb session id, so a stored session reopens by id.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, in io.Reader, out io.Writer, host Host, version string) error

Serve answers one client until in ends or ctx is done.

Types

type Host

type Host interface {
	Open(ctx context.Context, options Options) (session *agent.AgentSessionRuntime, close func(), err error)
}

Host opens the sessions a client drives; close disposes one.

type MCPServer

type MCPServer struct {
	Name    string     `json:"name"`
	Type    string     `json:"type,omitempty"`
	Command string     `json:"command,omitempty"`
	Args    []string   `json:"args,omitempty"`
	Env     []Variable `json:"env,omitempty"`
	URL     string     `json:"url,omitempty"`
	Headers []Variable `json:"headers,omitempty"`
}

MCPServer is an ACP McpServer: stdio (command) or remote (type and url).

type Options

type Options struct {
	ID  string
	CWD string
	// SystemPrompt replaces Orb's base prompt, as --system-prompt does; Append
	// adds to it, as --append-system-prompt does.
	SystemPrompt *string
	Append       string
	MCPServers   []MCPServer
}

Options open one session: a new one in CWD, or the stored session ID.

type Variable

type Variable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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