MingaAgent.Hooks.PreToolUsePayload (Minga v0.1.0)

Copy Markdown View Source

Public payload passed to PreToolUse hooks.

The shell runner encodes this payload as JSON and writes it to the hook command's standard input. Keep field names stable because user scripts may depend on them.

Summary

Types

t()

Payload for a tool call about to execute.

Functions

Builds a payload from a native provider or runtime tool call map.

Builds a payload from explicit tool call fields.

Converts the payload to the JSON object shape used on stdin.

Types

t()

@type t() :: %MingaAgent.Hooks.PreToolUsePayload{
  arguments: map(),
  event: String.t(),
  tool_call_id: String.t(),
  tool_name: String.t()
}

Payload for a tool call about to execute.

Functions

new(tool_call)

@spec new(map()) :: t()

Builds a payload from a native provider or runtime tool call map.

new(tool_call_id, tool_name, arguments)

@spec new(String.t(), String.t(), map()) :: t()

Builds a payload from explicit tool call fields.

to_map(payload)

@spec to_map(t()) :: map()

Converts the payload to the JSON object shape used on stdin.