Per-session runtime context for building executable agent tools.
This is a narrow capability object. It gives tool builders the project root, routed workspace access, command working directory data, and correlation ids without exposing raw session state.
Summary
Types
Opaque-ish runtime context passed to source-owned tool builders.
Functions
Captures a routed file with exact retained bytes and source revision.
Returns command environment entries for this context.
Deletes a file through the session router.
Edits a file through the session router.
Fetches exact retained bytes from this record's artifact owner without replaying a tool.
Scopes a record-owned artifact capability to one durably admitted tool call.
Builds a tool context from runtime values.
Reads a file through the session router.
Returns opts accepted by MingaAgent.Tools.all/1.
Returns the command working directory for this context.
Writes a file through the session router.
Types
@type image_tool_result_delivery() :: MingaAgent.ModelSelection.image_tool_result_delivery()
@type t() :: %MingaAgent.Tool.Context{ artifact_store: GenServer.server() | nil, capture_key: capture_key() | nil, image_tool_result_delivery: image_tool_result_delivery(), metadata: map(), project_root: String.t(), router_context: MingaAgent.ToolRouter.Context.t(), session_id: String.t() | nil }
Opaque-ish runtime context passed to source-owned tool builders.
Functions
@spec capture_file(t(), String.t(), keyword()) :: {:ok, MingaAgent.Tool.Output.t()} | {:error, MingaAgent.Tool.Output.t() | term()}
Captures a routed file with exact retained bytes and source revision.
Returns command environment entries for this context.
Deletes a file through the session router.
Edits a file through the session router.
@spec fetch_output( t(), MingaAgent.Tool.Output.Reference.t(), MingaAgent.Tool.Output.Range.t() ) :: {:ok, term()} | {:error, term()}
Fetches exact retained bytes from this record's artifact owner without replaying a tool.
@spec for_tool_call(t(), GenServer.server(), String.t(), String.t()) :: t()
Scopes a record-owned artifact capability to one durably admitted tool call.
Builds a tool context from runtime values.
Reads a file through the session router.
Returns opts accepted by MingaAgent.Tools.all/1.
Returns the command working directory for this context.
Writes a file through the session router.