Documentation
¶
Overview ¶
Package acp implements the Agent Client Protocol (ACP) for Oni3 using the official Go SDK (github.com/coder/acp-go-sdk).
ACP is an open standard (https://agentclientprotocol.com) that standardizes communication between code editors/IDEs (clients) and coding agents. Messages are JSON-RPC 2.0 objects, one per line, exchanged over stdio.
Index ¶
- type Service
- func (s *Service) Authenticate(ctx context.Context, params acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
- func (s *Service) Cancel(ctx context.Context, params acp.CancelNotification) error
- func (s *Service) CloseSession(ctx context.Context, params acp.CloseSessionRequest) (acp.CloseSessionResponse, error)
- func (s *Service) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
- func (s *Service) ListSessions(ctx context.Context, params acp.ListSessionsRequest) (acp.ListSessionsResponse, error)
- func (s *Service) Logout(ctx context.Context, params acp.LogoutRequest) (acp.LogoutResponse, error)
- func (s *Service) NewSession(ctx context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
- func (s *Service) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
- func (s *Service) ResumeSession(ctx context.Context, params acp.ResumeSessionRequest) (acp.ResumeSessionResponse, error)
- func (s *Service) SetAgentConnection(conn *acp.AgentSideConnection)
- func (s *Service) SetSessionConfigOption(ctx context.Context, params acp.SetSessionConfigOptionRequest) (acp.SetSessionConfigOptionResponse, error)
- func (s *Service) SetSessionMode(ctx context.Context, params acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the Oni3 ACP agent. It bridges ACP sessions to the configured Eino ReAct agent and streams turns to the client.
func NewService ¶
NewService creates an ACP agent bound to the given configured agent name.
func (*Service) Authenticate ¶
func (s *Service) Authenticate(ctx context.Context, params acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
Authenticate is unused: the agent advertises no auth methods.
func (*Service) Cancel ¶
Cancel aborts the running prompt turn. The SDK has already cancelled the prompt context before calling this method.
func (*Service) CloseSession ¶
func (s *Service) CloseSession(ctx context.Context, params acp.CloseSessionRequest) (acp.CloseSessionResponse, error)
func (*Service) Initialize ¶
func (s *Service) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
Initialize negotiates the protocol version and capabilities.
func (*Service) ListSessions ¶
func (s *Service) ListSessions(ctx context.Context, params acp.ListSessionsRequest) (acp.ListSessionsResponse, error)
func (*Service) Logout ¶
func (s *Service) Logout(ctx context.Context, params acp.LogoutRequest) (acp.LogoutResponse, error)
func (*Service) NewSession ¶
func (s *Service) NewSession(ctx context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
NewSession creates a session backed by the configured agent.
func (*Service) Prompt ¶
func (s *Service) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
Prompt runs one prompt turn, streaming updates back to the client. The SDK cancels the returned context when it receives session/cancel.
func (*Service) ResumeSession ¶
func (s *Service) ResumeSession(ctx context.Context, params acp.ResumeSessionRequest) (acp.ResumeSessionResponse, error)
func (*Service) SetAgentConnection ¶
func (s *Service) SetAgentConnection(conn *acp.AgentSideConnection)
SetAgentConnection implements acp.AgentConnAware; the SDK calls it right after constructing the connection.
func (*Service) SetSessionConfigOption ¶
func (s *Service) SetSessionConfigOption(ctx context.Context, params acp.SetSessionConfigOptionRequest) (acp.SetSessionConfigOptionResponse, error)
func (*Service) SetSessionMode ¶
func (s *Service) SetSessionMode(ctx context.Context, params acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)