Recursively builds the typed CFN schema definition from the config shape. The schema is a JSON
schema tree (object properties, array items), so this maps each node 1:1.
Nesting depth is bounded by MAX_TOOL_SCHEMA_DEPTH: a pathologically deep (or
self-referential) schema throws a clear error naming the limit rather than an opaque
RangeError: Maximum call stack size exceeded. The optional depth argument is internal
(defaulted) — callers pass a single schema.
Recursively builds the typed CFN schema definition from the config shape. The schema is a JSON schema tree (object properties, array items), so this maps each node 1:1.
Nesting depth is bounded by MAX_TOOL_SCHEMA_DEPTH: a pathologically deep (or self-referential) schema throws a clear error naming the limit rather than an opaque
RangeError: Maximum call stack size exceeded. The optionaldepthargument is internal (defaulted) — callers pass a single schema.