feat: register Heartbeat HoloLake engineering shelf
This commit is contained in:
parent
ba7826399a
commit
0a0e73ebd4
24 changed files with 567 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ class RootAgentTest(unittest.TestCase):
|
|||
self.assertEqual(MODULE.resolve(output, 'SYS-GLW-LTH-SKILL-0001', None)['result']['object_kind'], 'LIGHTHOUSE_SKILL_MODULE_ZONE')
|
||||
self.assertEqual(MODULE.resolve(output, 'TCS-AGENT-COMMAND-ROUTER-001', None)['result']['object_kind'], 'PERSONA_DYNAMIC_MODEL_SUBAGENT_COMMAND_ROUTER')
|
||||
self.assertEqual(MODULE.resolve(output, 'ORG-FD-LTH-SANITIZER-001', None)['result']['object_kind'], 'DETERMINISTIC_SANITIZATION_AND_HASH_GUARD')
|
||||
self.assertEqual(MODULE.resolve(output, 'SYS-GLW-ELH-ENG-0001', None)['result']['object_kind'], 'FIFTH_DOMAIN_PRIVATE_LANGUAGE_ENGINEERING_SYSTEM')
|
||||
self.assertEqual(MODULE.resolve(output, 'HLP-LANG-PROJ-STAGE1-0001', None)['result']['lifecycle'], 'LANGUAGE_REGISTERED_REALITY_NOT_STARTED')
|
||||
again = MODULE.refresh(ROOT, output, pointer, 'test')
|
||||
self.assertEqual(again['state'], 'CURRENT_IDEMPOTENT')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue