Pixir.Provider.ToolCall (pixir v0.1.13)

Copy Markdown View Source

Cross-provider validation for Provider-declared finalized tool calls.

A call is executable only after its Provider completion boundary and only when its identity is bounded and its arguments are a JSON object. Invalid identity values are never echoed in structured errors.

Summary

Functions

Validate a finalized call whose arguments are still encoded JSON.

Validate a finalized call whose arguments are already decoded.

The character class (regex-body form, no brackets) a tool-call identity may use.

Functions

from_json(call_id, name, arguments)

@spec from_json(term(), term(), term()) :: {:ok, map()} | {:error, map()}

Validate a finalized call whose arguments are still encoded JSON.

from_map(call_id, name, arguments)

@spec from_map(term(), term(), term()) :: {:ok, map()} | {:error, map()}

Validate a finalized call whose arguments are already decoded.

identity_alphabet()

@spec identity_alphabet() :: String.t()

The character class (regex-body form, no brackets) a tool-call identity may use.

Read it rather than restating it: an extractor built from a private copy of this class silently diverges from the validator the moment either side moves.