Noizu.MCP.Server.Session (Noizu MCP v0.1.2)

Copy Markdown View Source

One MCP session: a GenServer owning the protocol state (Noizu.MCP.Peer) for a single connected client.

Handler code never runs in this process — every feature request is executed in a supervised Task so ping, cancellation, and progress stay responsive while tools run. Cancellation kills the task; crashes are converted to sanitized protocol/tool errors while full details go to Logger and telemetry.

Summary

Functions

Returns a specification to start this module under a supervisor.

Deliver an inbound wire binary (one JSON-RPC message) to the session.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

deliver(session, binary)

@spec deliver(pid(), binary()) :: :ok

Deliver an inbound wire binary (one JSON-RPC message) to the session.

start_link(opts)