Documentation
¶
Overview ¶
Package acp implements the Agent Client Protocol (ACP) server for kodelet. ACP enables kodelet to be embedded in ACP-compatible clients like Zed or JetBrains IDEs using JSON-RPC 2.0 over stdio.
Index ¶
- type Option
- type Server
- func (s *Server) CallClient(ctx context.Context, method string, params any) (json.RawMessage, error)
- func (s *Server) GetClientCapabilities() *acptypes.ClientCapabilities
- func (s *Server) Run() error
- func (s *Server) SendUpdate(sessionID acptypes.SessionID, update any) error
- func (s *Server) Shutdown()
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Server)
Option configures the server
func WithConfig ¶
func WithConfig(config *ServerConfig) Option
WithConfig sets the server configuration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the ACP agent server. The server handles JSON-RPC 2.0 messages concurrently - responses may arrive out-of-order relative to requests (which is allowed by JSON-RPC spec).
func (*Server) CallClient ¶
func (s *Server) CallClient(ctx context.Context, method string, params any) (json.RawMessage, error)
CallClient makes an RPC call to the client and waits for response
func (*Server) GetClientCapabilities ¶
func (s *Server) GetClientCapabilities() *acptypes.ClientCapabilities
GetClientCapabilities returns the client capabilities
func (*Server) Run ¶
Run starts the server event loop. Requests are processed concurrently, so responses may arrive out-of-order. The method blocks until the input stream is closed or the context is cancelled.
func (*Server) SendUpdate ¶
SendUpdate sends a session/update notification to the client and persists it for replay
Directories
¶
| Path | Synopsis |
|---|---|
|
Package acptypes defines types for the Agent Client Protocol (ACP).
|
Package acptypes defines types for the Agent Client Protocol (ACP). |
|
Package bridge provides the bridge between kodelet's message handler system and the ACP session update protocol.
|
Package bridge provides the bridge between kodelet's message handler system and the ACP session update protocol. |
|
Package session manages ACP session lifecycle, wrapping kodelet threads with ACP session semantics.
|
Package session manages ACP session lifecycle, wrapping kodelet threads with ACP session semantics. |