Packages
agent_client_protocol
0.1.0
Elixir implementation of the Agent Client Protocol (ACP) for communication between code editors and AI coding agents. Includes schema types, JSON-RPC primitives, behaviours, and connection management.
Current section
Files
Jump to
Current section
Files
lib/acp/message_handler.ex
defmodule ACP.MessageHandler do
@moduledoc """
Behaviour for handling incoming JSON-RPC requests and notifications.
Implementations route decoded requests to the appropriate Agent or Client callbacks.
"""
@doc "Handle an incoming request and return a response."
@callback handle_request(request :: any()) :: {:ok, any()} | {:error, ACP.Error.t()}
@doc "Handle an incoming notification."
@callback handle_notification(notification :: any()) :: :ok | {:error, ACP.Error.t()}
end