ExMCP.ACP.Agent.Transport behaviour (ex_mcp v0.10.0)

View Source

Transport behaviour for ACP agent runtimes.

This mirrors the pull-based ExMCP.Transport shape, but is named from the agent side because stdio agents read from this process' stdin/stdout instead of spawning a child process.

Summary

Types

message()

@type message() :: String.t()

opts()

@type opts() :: keyword()

state()

@type state() :: any()

Callbacks

close(state)

@callback close(state()) :: :ok

connect(opts)

@callback connect(opts()) :: {:ok, state()} | {:error, any()}

connected?(state)

(optional)
@callback connected?(state()) :: boolean()

receive_message(state)

@callback receive_message(state()) :: {:ok, message(), state()} | {:error, any()}

send_message(message, state)

@callback send_message(message(), state()) :: {:ok, state()} | {:error, any()}