One input to a MingaClaudeBridge.Session: a new prompt, or the results of the tool calls the previous request ended with.
ref- identifies the request. The session tags every event for this request with it.kind-{:prompt, content}wherecontentis a string or a list ofMingaClaudeBridge.Wire.Blockvalues, or{:tool_results, results}.tools- the tools Minga offers for this request. The session answerstools/listand validatestools/callagainst them until the next request.
A tool result is %{tool_use_id: id, content: [part], is_error: boolean}, where a part is a MingaClaudeBridge.ToolCalls.part/0. The request must carry one result for every tool call the previous request ended with.
Content and results are conversation content. Do not log them.
Summary
Types
@type kind() :: {:prompt, String.t() | [MingaClaudeBridge.Wire.Block.t()]} | {:tool_results, [tool_result()]}
@type t() :: %MingaClaudeBridge.Session.Request{ kind: kind(), ref: reference(), tools: [MingaClaudeBridge.MCP.tool()] }
@type tool_result() :: %{ tool_use_id: String.t(), content: [MingaClaudeBridge.ToolCalls.part()], is_error: boolean() }
Functions
@spec prompt(String.t() | [MingaClaudeBridge.Wire.Block.t()], [ MingaClaudeBridge.MCP.tool() ]) :: t()
Builds a prompt request with a new ref.
@spec tool_results([tool_result()], [MingaClaudeBridge.MCP.tool()]) :: t()
Builds a tool-results request with a new ref.