acp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 11 Imported by: 0

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

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

func NewService(agentName string, cfg *config.Config) *Service

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

func (s *Service) Cancel(ctx context.Context, params acp.CancelNotification) error

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

func (s *Service) SetSessionMode(ctx context.Context, params acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)

Jump to

Keyboard shortcuts

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