ACP.AgentSideConnection (agent_client_protocol v0.1.0)

Copy Markdown View Source

An agent-side connection to a client.

Wraps an ACP.Connection with the AgentSide decoder, providing convenience functions that implement the Client interface (request_permission, write_text_file, session_notification, etc.) for making requests to the client from the agent side.

Summary

Functions

create_terminal(c, req)

ext_method(c, req)

ext_notification(c, notif)

kill_terminal_command(c, req)

read_text_file(c, req)

release_terminal(c, req)

request_permission(c, req)

session_notification(c, notif)

start_link(opts)

Start an agent-side connection.

Options:

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

stop(agent_side_connection)

subscribe(agent_side_connection)

terminal_output(c, req)

wait_for_terminal_exit(c, req)

write_text_file(c, req)