Projects compiled prelude contracts and normalized capability JSON Schema into one deterministic, renderer-neutral model contract.
The projection uses PtcRunner.Kernel.DeterministicJSON objects. A function
contract has parameters (ordered name/type nodes) and returns; a
constant contract has value. Type nodes contain kind and nullable, with
items for arrays or closed and ordered fields for objects. Each field
has an independent required boolean, so omission is never conflated with a
nullable value.
JSON Schema annotations and validity constraints retain their normalized
names: title, description, enum, const, minimum, maximum,
min_length, max_length, min_items, max_items, and format. Missing
optional output schemas remain nil; the prompt renderer omits absent
information. This structure is presentation data only. Runtime authority
remains with the compiled prelude contract and capability JSON Schema
validators.
Summary
Functions
Builds a value contract from only the top-level kind of a JSON value.
Functions
@spec function(PtcRunner.Lisp.Signature.signature()) :: {:ok, term()} | {:error, :unsupported_contract}
Builds a value contract from only the top-level kind of a JSON value.
@spec value(PtcRunner.Lisp.Signature.type()) :: {:ok, term()} | {:error, :unsupported_contract}