REPOSITORY
via/fruit-multi-robot-control Private
[참조 MVP] 과채류 다중로봇 관제 — 작업 주문, 로봇 가용성, OTA 상태를 연결하는 SaaS 관제 참조 MVP입니다.
https://git.agrithing.ai/via/fruit-multi-robot-control.git 8232a9c feat: 과채류 다중로봇 관제 구체 MVP 구현
9216e1f ci: add static dynamic and evidence gates
8af54e0 feat: add executable institution reference MVP
8c9cb0d docs: define product role and interface contract
2 items · feat/concrete-mvp-v2
·/ asw_component/component.py
python · 963 B · 070d123 Download
from __future__ import annotationsdef execute(payload: dict) -> dict: robots = payload.get("robots", []) eligible = [robot for robot in robots if robot.get("state") == "AVAILABLE" and float(robot.get("batteryPercent", 0)) >= 30 and "fruit_work" in robot.get("capabilities", [])] eligible.sort(key=lambda robot: (-float(robot["batteryPercent"]), robot["id"])) selected = eligible[0] if eligible else None assignment = None if not selected else {"robotId": selected["id"], "taskCount": int(payload.get("taskCount", 0)), "mode": "FRUIT_WORK"} return {"component": "via/fruit-multi-robot-control", "accepted": selected is not None, "status": "ASSIGNED" if selected else "QUEUED", "target": "service", "workOrder": str(payload.get("workOrder", "unknown")), "assignment": assignment, "queueReason": None if selected else "NO_ELIGIBLE_ROBOT", "evaluatedRobots": len(robots)}