Documentation
¶
Index ¶
- Variables
- type AuthMethodEntry
- type InstallInfo
- type RatchetAgent
- func (a *RatchetAgent) Authenticate(_ context.Context, _ acpsdk.AuthenticateRequest) (acpsdk.AuthenticateResponse, error)
- func (a *RatchetAgent) Cancel(_ context.Context, params acpsdk.CancelNotification) error
- func (a *RatchetAgent) Initialize(_ context.Context, _ acpsdk.InitializeRequest) (acpsdk.InitializeResponse, error)
- func (a *RatchetAgent) LoadSession(ctx context.Context, params acpsdk.LoadSessionRequest) (acpsdk.LoadSessionResponse, error)
- func (a *RatchetAgent) NewSession(ctx context.Context, params acpsdk.NewSessionRequest) (acpsdk.NewSessionResponse, error)
- func (a *RatchetAgent) Prompt(ctx context.Context, params acpsdk.PromptRequest) (acpsdk.PromptResponse, error)
- func (a *RatchetAgent) SetConnection(conn *acpsdk.AgentSideConnection)
- func (a *RatchetAgent) SetSessionMode(_ context.Context, _ acpsdk.SetSessionModeRequest) (acpsdk.SetSessionModeResponse, error)
- func (a *RatchetAgent) SetSessionModel(ctx context.Context, params acpsdk.SetSessionModelRequest) (acpsdk.SetSessionModelResponse, error)
- type Registry
- type RegistryAgent
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 (a *RatchetAgent) Authenticate(_ context.Context, _ acpsdk.AuthenticateRequest) (acpsdk.AuthenticateResponse, error)
func (*RatchetAgent) Cancel ¶
func (a *RatchetAgent) Cancel(_ context.Context, params acpsdk.CancelNotification) error
func (*RatchetAgent) Initialize ¶
func (a *RatchetAgent) Initialize(_ context.Context, _ acpsdk.InitializeRequest) (acpsdk.InitializeResponse, error)
func (*RatchetAgent) LoadSession ¶
func (a *RatchetAgent) LoadSession(ctx context.Context, params acpsdk.LoadSessionRequest) (acpsdk.LoadSessionResponse, error)
LoadSession implements acp.AgentLoader.
func (*RatchetAgent) NewSession ¶
func (a *RatchetAgent) NewSession(ctx context.Context, params acpsdk.NewSessionRequest) (acpsdk.NewSessionResponse, error)
func (*RatchetAgent) Prompt ¶
func (a *RatchetAgent) Prompt(ctx context.Context, params acpsdk.PromptRequest) (acpsdk.PromptResponse, error)
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 (a *RatchetAgent) SetSessionMode(_ context.Context, _ acpsdk.SetSessionModeRequest) (acpsdk.SetSessionModeResponse, error)
func (*RatchetAgent) SetSessionModel ¶
func (a *RatchetAgent) SetSessionModel(ctx context.Context, params acpsdk.SetSessionModelRequest) (acpsdk.SetSessionModelResponse, error)
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 ¶
NewRegistry creates a registry client with the given cache TTL.
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.