Renders signatures back to string representation.
Converts internal signature format to human-readable syntax for use in prompts and debugging.
Summary
Functions
Render a signature to its string representation.
Render a type spec to its string representation.
Functions
Render a signature to its string representation.
Examples
iex> sig = {:signature, [{"id", :int}], :string}
iex> PtcRunner.SubAgent.Signature.Renderer.render(sig)
"(id :int) -> :string"
iex> sig = {:signature, [], {:map, [{"count", :int}]}}
iex> PtcRunner.SubAgent.Signature.Renderer.render(sig)
"-> {count :int}"
Render a type spec to its string representation.
Converts type tuples and atoms to their PTC-Lisp syntax representation
(e.g., :string, [int], {key :string}).
Examples
iex> PtcRunner.SubAgent.Signature.Renderer.render_type(:string)
":string"
iex> PtcRunner.SubAgent.Signature.Renderer.render_type({:optional, :int})
":int?"
iex> PtcRunner.SubAgent.Signature.Renderer.render_type({:list, :string})
"[:string]"