Documentation
¶
Overview ¶
Package acp provides an ACP (Agent Client Protocol) handler that serves bond agents over JSON-RPC 2.0 via stdio or other transports. ACP enables code editors (Zed, JetBrains, VS Code) to connect to bond agents as coding assistants.
This package uses shared protocol types from agent/acpproxy (Message, ErrorObject, error codes, method constants) and transport implementations from agent/acpproxy/acpio (Transport, StdioProcess).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultTransport = acpio.DefaultTransport
DefaultTransport returns a Transport using os.Stdin and os.Stdout.
var NewTransport = acpio.NewTransport
NewTransport creates a ndjson Transport from an io.Reader and io.Writer.
Functions ¶
This section is empty.
Types ¶
type ErrorObject ¶
type ErrorObject = acpproxy.ErrorObject
Protocol types used throughout this package.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the ACP protocol handler. It bridges a bond.Agent to the ACP JSON-RPC protocol.
func NewHandler ¶
NewHandler creates an ACP handler for the given agent. Follows the same pattern as NewHTTPHandler, NewA2AHandler, NewMCPHandler.
type Options ¶
type Options struct {
// AgentName is the name reported during initialization.
AgentName string
// AgentVersion is the version reported during initialization.
AgentVersion string
// AgentOptions configures the bond agent loop (tools, plugins, max turns).
AgentOptions bond.AgentOptions
// Transport is the reader/writer pair. Defaults to stdin/stdout.
Transport ReadWriter
// Commands is the list of slash commands to advertise to the client.
Commands []Command
}
Options configures the ACP handler.
type ReadWriter ¶ added in v0.6.0
type ReadWriter = acpproxy.ReadWriter
Protocol types used throughout this package.