asw_component/__init__.py +3−0 View file@@ -0,0 +1,3 @@
1 +
from .component import execute 2 +
3 +
__all__ = ["execute"][참조 MVP] 과채류 다중로봇 관제 — 작업 주문, 로봇 가용성, OTA 상태를 연결하는 SaaS 관제 참조 MVP입니다.
https://git.agrithing.ai/via/fruit-multi-robot-control.git 8232a9c 9216e1f 8af54e0 8c9cb0d 8af54e09c609f3c373ce9409dcc628b2f528892e asw_component/__init__.py +3−0 View filefrom .component import execute__all__ = ["execute"]asw_component/component.py +7−0 View filefrom __future__ import annotationsdef execute(payload: dict) -> dict: if not isinstance(payload, dict) or not payload: raise ValueError("a non-empty object is required") return {"component": "via/fruit-multi-robot-control", "accepted": True, "status": "READY", "target": "service", "input_fields": sorted(payload.keys())}examples/input.json +13−0 View file{ "workOrder": "WO-FRUIT-081", "robots": [ { "id": "fruit-bot-01", "state": "AVAILABLE" }, { "id": "fruit-bot-02", "state": "CHARGING" } ]}pyproject.toml +5−0 View file[project]name = "fruit-multi-robot-control"version = "0.1.0"description = "작업 주문, 로봇 가용성, OTA 상태를 연결하는 SaaS 관제 참조 MVP입니다."requires-python = ">=3.11"run.py +9−0 View filefrom __future__ import annotationsimport jsonimport sysfrom asw_component import executepath = sys.argv[1] if len(sys.argv) > 1 else Nonewith open(path, encoding="utf-8") if path else sys.stdin as source: payload = json.load(source)print(json.dumps(execute(payload), ensure_ascii=False, indent=2))