ToolCall. TypeSource behaviour
(ToolCall v0.4.0)
Copy Markdown
Internal contract for function-declaration sources.
A source loads its compile-time state once, then returns a Declaration for a
function name and arity. the builder consumes the declaration; wire
emitters never see a source-specific AST.
Summary
Types
@type state() :: term()
Callbacks
@callback fetch(state(), atom(), non_neg_integer()) :: {:ok, ToolCall.TypeSource.Declaration.t()} | {:error, [ToolCall.Diagnostic.t()]}
@callback load(module(), Macro.Env.t()) :: state()