docs: publish structured runtime context

This commit is contained in:
lda
2026-09-05 00:34:58 +07:00 Verified
parent 71dc5ba8e8
commit c389590a9c
17 changed files with 431 additions and 92 deletions
+9 -5
View File
@@ -275,9 +275,7 @@ def _nested_foreach_path_options(
# bounded object schema, mirroring input/state inventory behavior.
if prop_name == "item":
options.extend(
_nested_item_subpaths(
prop_schema, owner_id, availability, depth=0
)
_nested_item_subpaths(prop_schema, owner_id, availability, depth=0)
)
return options
@@ -302,7 +300,10 @@ def _nested_item_subpaths(
for name, sub_schema in properties.items():
if not isinstance(name, str) or not isinstance(sub_schema, Mapping):
continue
if isinstance(sub_schema.get("type"), str) and sub_schema.get("type") == "array":
if (
isinstance(sub_schema.get("type"), str)
and sub_schema.get("type") == "array"
):
# Arrays are whole values; item indexes need real runtime indexes.
path = str(
GraphSourcePath(
@@ -339,7 +340,10 @@ def _nested_item_subpaths(
)
options.extend(
_nested_item_subpaths(
sub_schema, owner_id, availability, depth=depth + 1,
sub_schema,
owner_id,
availability,
depth=depth + 1,
prefix_parts=(*prefix_parts, name),
)
)