feat: register Heartbeat HoloLake engineering shelf

This commit is contained in:
冰朔 2026-09-08 17:53:48 +08:00
commit 0a0e73ebd4
24 changed files with 567 additions and 10 deletions

View file

@ -82,6 +82,8 @@ def validate_root(root: dict[str, Any]) -> None:
all_ids = [world["registration_path_id"], world["world_node_id"], root["root_agent"]["entry_id"], *domain_ids, *human_roots]
public_objects = root.get("registered_public_objects", [])
all_ids.extend(item["id"] for item in public_objects)
private_objects = root.get("registered_private_objects", [])
all_ids.extend(item["id"] for item in private_objects)
if len(all_ids) != len(set(all_ids)):
raise RootError("CURRENT_CANONICAL_ID_COLLISION")
@ -134,6 +136,7 @@ def build(repo: Path, commit: str | None = None) -> dict[str, Any]:
"parallel_human_roots": root["parallel_human_roots"],
"fixed_domains": root["fixed_domains"],
"registered_public_objects": root.get("registered_public_objects", []),
"registered_private_objects": root.get("registered_private_objects", []),
"entry_routes": root["entry_routes"],
"aliases": root["aliases"],
"history_only_numbers": root["history_only_numbers"],
@ -223,6 +226,7 @@ def resolve(output: Path, requested: str, kind: str | None) -> dict[str, Any]:
*[{"canonical_id": item["id"], "object_kind":item["object_kind"], "lifecycle":"CURRENT", "source_revision":current["source_revision"], "route":item.get("route")} for item in current["parallel_human_roots"]],
*[{"canonical_id": item["id"], "object_kind":item["object_kind"], "lifecycle":"CURRENT", "source_revision":current["source_revision"], "name":item["name"]} for item in current["fixed_domains"]],
*[{"canonical_id": item["id"], "object_kind":item["object_kind"], "lifecycle":item["lifecycle"], "source_revision":current["source_revision"], "name":item["name"], "route":item.get("route")} for item in current.get("registered_public_objects", [])],
*[{"canonical_id": item["id"], "object_kind":item["object_kind"], "lifecycle":item["lifecycle"], "source_revision":current["source_revision"], "name":item["name"], "route":item.get("route")} for item in current.get("registered_private_objects", [])],
]
matches = [item for item in current_nodes if item["canonical_id"] == requested and (kind is None or item["object_kind"] == kind)]
if len(matches) == 1: