ACP.ClientSideConnection (agent_client_protocol v0.1.0)

Copy Markdown View Source

A client-side connection to an agent.

Wraps an ACP.Connection with the ClientSide decoder, providing convenience functions that implement the Agent interface (initialize, prompt, etc.) for making requests to the agent from the client side.

Summary

Functions

authenticate(c, req)

cancel(c, notif)

ext_method(c, req)

ext_notification(c, notif)

initialize(c, req)

load_session(c, req)

new_session(c, req)

prompt(c, req)

set_session_mode(c, req)

start_link(opts)

Start a client-side connection.

Options:

  • :handler - Module implementing ACP.Client behaviour (handles incoming agent requests)
  • :handler_state - State passed to handler
  • :input - Input IO device (default: :stdio)
  • :output - Output IO device (default: :stdio)
  • :name - Optional GenServer name

stop(client_side_connection)

subscribe(client_side_connection)