minor fix on skill & registry

This commit is contained in:
Xuwznln
2026-03-22 03:36:28 +08:00
parent 23c2e3b2f7
commit 427afe83d4
2 changed files with 4 additions and 18 deletions

View File

@@ -182,11 +182,12 @@ API 模板结构:
- ak/sk → AUTH, --addr → BASE URL - ak/sk → AUTH, --addr → BASE URL
## Session State ## Session State
- lab_uuid, device_name - lab_uuid(通过 API #1 自动匹配,不要问用户), device_name
## API Endpoints (10 个) ## API Endpoints (10 个)
# 注意: # 注意:
# - #1 获取 lab 列表需加 ?page=1&page_size=100 # - #1 获取 lab 列表 + 自动匹配 lab_uuid遍历 is_admin 的 lab
# 调用 /lab/info/{uuid} 比对 access_key == ak
# - #2 创建工作流用 POST /lab/workflow # - #2 创建工作流用 POST /lab/workflow
# - #10 获取资源树路径含 lab_uuid: /lab/material/download/{lab_uuid} # - #10 获取资源树路径含 lab_uuid: /lab/material/download/{lab_uuid}

View File

@@ -181,21 +181,6 @@ class Registry:
"module": "unilabos.ros.nodes.presets.host_node:HostNode", "module": "unilabos.ros.nodes.presets.host_node:HostNode",
"status_types": {}, "status_types": {},
"action_value_mappings": { "action_value_mappings": {
"create_resource_detailed": {
"type": ResourceCreateFromOuter,
"goal": {
"resources": "resources",
"device_ids": "device_ids",
"bind_parent_ids": "bind_parent_ids",
"bind_locations": "bind_locations",
"other_calling_params": "other_calling_params",
},
"feedback": {},
"result": {"success": "success"},
"schema": ros_action_to_json_schema(ResourceCreateFromOuter),
"goal_default": ROS2MessageInstance(ResourceCreateFromOuter.Goal()).get_python_dict(),
"handles": {},
},
"create_resource": { "create_resource": {
"type": ResourceCreateFromOuterEasy, "type": ResourceCreateFromOuterEasy,
"goal": { "goal": {
@@ -713,7 +698,7 @@ class Registry:
# ------------------------------------------------------------------ # ------------------------------------------------------------------
def _add_builtin_actions(self, device_config: Dict[str, Any], device_id: str): def _add_builtin_actions(self, device_config: Dict[str, Any], device_id: str):
"""为设备添加内置的驱动命令动作""" """为设备添加内置的驱动命令动作(运行时需要,上报注册表时会过滤掉)"""
str_single_input = self._replace_type_with_class("StrSingleInput", device_id, "内置动作") str_single_input = self._replace_type_with_class("StrSingleInput", device_id, "内置动作")
for additional_action in ["_execute_driver_command", "_execute_driver_command_async"]: for additional_action in ["_execute_driver_command", "_execute_driver_command_async"]:
try: try: