Versions in this module Expand all Collapse all v0 v0.0.2 May 6, 2026 Changes in this version + const PlanStateKey type Config + AfterAgentCallbacks []adkagent.AfterAgentCallback + BeforeAgentCallbacks []adkagent.BeforeAgentCallback v0.0.1 Apr 27, 2026 Changes in this version + const SessionStateKey + var ErrPromptAlreadyActive = errors.New("acp prompt already active") + type Agent struct + func New(cfg Config) (*Agent, error) + func (a *Agent) Close() error + type Client struct + func NewClient(ctx context.Context, cfg ClientConfig) (*Client, error) + func (c *Client) Authenticate(ctx context.Context, methodID string) error + func (c *Client) Close() error + func (c *Client) CreateSession(ctx context.Context, cwd, model, mode string, mcpServers []acp.McpServer) (acp.NewSessionResponse, error) + func (c *Client) CreateSessionWithMeta(ctx context.Context, cwd, model, mode string, mcpServers []acp.McpServer, ...) (acp.NewSessionResponse, error) + func (c *Client) CreateTerminal(_ context.Context, _ acp.CreateTerminalRequest) (acp.CreateTerminalResponse, error) + func (c *Client) Initialize(ctx context.Context) (acp.InitializeResponse, error) + func (c *Client) KillTerminal(_ context.Context, _ acp.KillTerminalRequest) (acp.KillTerminalResponse, error) + func (c *Client) NewSession(ctx context.Context, cwd string, mcpServers []acp.McpServer) (acp.NewSessionResponse, error) + func (c *Client) NewSessionWithMeta(ctx context.Context, cwd string, mcpServers []acp.McpServer, ...) (acp.NewSessionResponse, error) + func (c *Client) Prompt(ctx context.Context, sessionID, prompt string) (<-chan ExtendedSessionNotification, <-chan PromptResult, error) + func (c *Client) PromptWithContent(ctx context.Context, sessionID string, prompt []acp.ContentBlock) (<-chan ExtendedSessionNotification, <-chan PromptResult, error) + func (c *Client) ReadTextFile(_ context.Context, _ acp.ReadTextFileRequest) (acp.ReadTextFileResponse, error) + func (c *Client) ReleaseTerminal(_ context.Context, _ acp.ReleaseTerminalRequest) (acp.ReleaseTerminalResponse, error) + func (c *Client) RequestPermission(ctx context.Context, params acp.RequestPermissionRequest) (acp.RequestPermissionResponse, error) + func (c *Client) SessionUpdate(ctx context.Context, params acp.SessionNotification) error + func (c *Client) SetSessionMode(ctx context.Context, sessionID, mode string) error + func (c *Client) SetSessionModel(ctx context.Context, sessionID, model string) error + func (c *Client) TerminalOutput(_ context.Context, _ acp.TerminalOutputRequest) (acp.TerminalOutputResponse, error) + func (c *Client) WaitForTerminalExit(_ context.Context, _ acp.WaitForTerminalExitRequest) (acp.WaitForTerminalExitResponse, error) + func (c *Client) WriteTextFile(_ context.Context, _ acp.WriteTextFileRequest) (acp.WriteTextFileResponse, error) + type ClientConfig struct + ClientName string + ClientVersion string + Command []string + Logger *zerolog.Logger + PermissionHandler PermissionHandler + SessionID string + Stderr io.Writer + WorkingDir string + type Config struct + ClientName string + ClientVersion string + Command []string + Context context.Context + Description string + GlobalInstruction string + GlobalInstructionProvider InstructionProvider + Instruction string + InstructionProvider InstructionProvider + Logger *zerolog.Logger + MCPServers map[string]MCPServerConfig + Mode string + Model string + Name string + PermissionHandler PermissionHandler + SessionID string + Stderr io.Writer + SystemInstructions string + WorkingDir string + type ExtendedSessionNotification struct + Raw json.RawMessage + type InstructionProvider func(ctx adkagent.ReadonlyContext) (string, error) + type MCPServerConfig struct + Args []string + Cmd []string + Env map[string]string + Headers map[string]string + Type MCPServerType + URL string + WorkingDir string + type MCPServerType string + const MCPServerTypeHTTP + const MCPServerTypeSSE + const MCPServerTypeStdio + type PermissionHandler func(context.Context, acp.RequestPermissionRequest) (acp.RequestPermissionResponse, error) + type PromptResult struct + Err error + Response acp.PromptResponse + Usage *acp.Usage