acp

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 13 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

This section is empty.

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) 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.

Jump to

Keyboard shortcuts

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