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

acp

package
v0.30.41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRegistryURL = "https://cdn.agentclientprotocol.com/registry/v1/latest/registry.json"

DefaultRegistryURL is the ACP agent registry endpoint.

Functions

func WriteZedACPConfig added in v0.30.18

func WriteZedACPConfig(path, serverName string, entry ZedACPAgentServer) error

WriteZedACPConfig merges a custom ACP agent into a Zed settings.json file.

Types

type AuthMethodEntry

type AuthMethodEntry struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

AuthMethodEntry describes an authentication method.

type InstallInfo

type InstallInfo struct {
	Command string   `json:"command,omitempty"` // e.g. "npm install -g @agent/cli"
	Binary  string   `json:"binary,omitempty"`  // binary name after install
	Args    []string `json:"args,omitempty"`    // args to run as ACP agent
}

InstallInfo describes how to install an ACP agent.

type RatchetAgent

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

RatchetAgent implements the ACP Agent interface by wrapping the ratchet daemon Service.

func NewRatchetAgent

func NewRatchetAgent(svc *daemon.Service) *RatchetAgent

NewRatchetAgent creates a new ACP agent wrapping the given ratchet Service.

func (*RatchetAgent) Authenticate

func (*RatchetAgent) Cancel

func (*RatchetAgent) Initialize

func (*RatchetAgent) LoadSession

LoadSession implements acp.AgentLoader.

func (*RatchetAgent) NewSession

func (*RatchetAgent) Prompt

Prompt sends a message and streams responses as ACP session updates.

func (*RatchetAgent) SetConnection

func (a *RatchetAgent) SetConnection(conn *acpsdk.AgentSideConnection)

SetConnection stores the AgentSideConnection for sending updates back to the client.

func (*RatchetAgent) SetSessionMode

func (*RatchetAgent) SetSessionModel

SetSessionModel implements acp.AgentExperimental.

type Registry

type Registry struct {
	URL string // override for testing; defaults to DefaultRegistryURL
	// contains filtered or unexported fields
}

Registry holds the fetched agent list with a cache.

func NewRegistry

func NewRegistry(cacheTTL time.Duration) *Registry

NewRegistry creates a registry client with the given cache TTL.

func (*Registry) Agents

func (r *Registry) Agents(ctx context.Context) ([]RegistryAgent, error)

Agents returns all registered ACP agents, fetching from the remote registry if the cache is stale.

type RegistryAgent

type RegistryAgent struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Version     string            `json:"version"`
	Homepage    string            `json:"homepage,omitempty"`
	Install     *InstallInfo      `json:"install,omitempty"`
	Auth        []AuthMethodEntry `json:"auth,omitempty"`
}

RegistryAgent represents an agent entry from the ACP registry.

type ZedACPAgentServer added in v0.30.18

type ZedACPAgentServer struct {
	Type    string            `json:"type"`
	Command string            `json:"command"`
	Args    []string          `json:"args"`
	Env     map[string]string `json:"env"`
}

ZedACPAgentServer describes one custom ACP agent server in Zed settings.

type ZedACPConfig added in v0.30.18

type ZedACPConfig struct {
	AgentServers map[string]ZedACPAgentServer `json:"agent_servers"`
}

ZedACPConfig is the ACP-related subset of Zed settings.

Jump to

Keyboard shortcuts

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