Documentation
¶
Index ¶
- func Run(ctx context.Context, agentFilename string, stdin io.Reader, stdout io.Writer, ...) error
- type Agent
- func (a *Agent) Authenticate(context.Context, acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
- func (a *Agent) Cancel(_ context.Context, params acp.CancelNotification) error
- func (a *Agent) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
- func (a *Agent) LoadSession(context.Context, acp.LoadSessionRequest) (acp.LoadSessionResponse, error)
- func (a *Agent) NewSession(_ context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
- func (a *Agent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
- func (a *Agent) SetAgentConnection(conn *acp.AgentSideConnection)
- func (a *Agent) SetSessionMode(context.Context, acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
- func (a *Agent) Stop(ctx context.Context)
- type FilesystemToolset
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent implements the ACP Agent interface for cagent
func NewAgent ¶
func NewAgent(agentSource config.Source, runConfig *config.RuntimeConfig) *Agent
NewAgent creates a new ACP agent
func (*Agent) Authenticate ¶
func (a *Agent) Authenticate(context.Context, acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
Authenticate implements acp.Agent
func (*Agent) Initialize ¶
func (a *Agent) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
Initialize implements acp.Agent
func (*Agent) LoadSession ¶
func (a *Agent) LoadSession(context.Context, acp.LoadSessionRequest) (acp.LoadSessionResponse, error)
LoadSession implements acp.Agent (optional, not supported)
func (*Agent) NewSession ¶
func (a *Agent) NewSession(_ context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
NewSession implements acp.Agent
func (*Agent) Prompt ¶
func (a *Agent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
Prompt implements acp.Agent
func (*Agent) SetAgentConnection ¶
func (a *Agent) SetAgentConnection(conn *acp.AgentSideConnection)
SetAgentConnection sets the ACP connection
func (*Agent) SetSessionMode ¶
func (a *Agent) SetSessionMode(context.Context, acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
SetSessionMode implements acp.Agent (optional)
type FilesystemToolset ¶
type FilesystemToolset struct {
*builtin.FilesystemTool
// contains filtered or unexported fields
}
FilesystemToolset wraps a standard FilesystemTool and overrides read_file, write_file, and edit_file to use the ACP connection for file operations
func NewFilesystemToolset ¶
func NewFilesystemToolset(agent *Agent, workingDir string, opts ...builtin.FileSystemOpt) *FilesystemToolset
NewFilesystemToolset creates a new ACP-specific filesystem toolset
Click to show internal directories.
Click to hide internal directories.