roboapi 0.4.4__tar.gz → 0.4.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. {roboapi-0.4.4 → roboapi-0.4.5}/PKG-INFO +6 -2
  2. {roboapi-0.4.4 → roboapi-0.4.5}/README.md +5 -1
  3. {roboapi-0.4.4 → roboapi-0.4.5}/docs/installation.md +5 -1
  4. {roboapi-0.4.4 → roboapi-0.4.5}/docs/model-api.md +5 -2
  5. roboapi-0.4.5/docs/releases/v0.4.5.md +19 -0
  6. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/App.test.tsx +9 -5
  7. roboapi-0.4.5/frontend/src/components/SettingsPanel.test.tsx +127 -0
  8. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/SettingsPanel.tsx +65 -44
  9. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/i18n.tsx +3 -2
  10. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/SettingsPage.test.tsx +2 -2
  11. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/styles.css +4 -2
  12. {roboapi-0.4.4 → roboapi-0.4.5}/pyproject.toml +1 -1
  13. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/models.py +2 -1
  14. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/initialize.py +16 -6
  15. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/client.py +29 -8
  16. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/settings.py +15 -4
  17. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/runtime.py +7 -0
  18. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/server.py +12 -1
  19. roboapi-0.4.4/roboapi/web/static/assets/CalibrationScene-DegHxh1F.js → roboapi-0.4.5/roboapi/web/static/assets/CalibrationScene-5G_QRvLJ.js +1 -1
  20. roboapi-0.4.4/roboapi/web/static/assets/index-CZ3Otu1v.js → roboapi-0.4.5/roboapi/web/static/assets/index-BKtDMtWh.js +3 -3
  21. roboapi-0.4.5/roboapi/web/static/assets/index-wKYVYXw0.css +1 -0
  22. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/index.html +2 -2
  23. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/PKG-INFO +6 -2
  24. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/SOURCES.txt +4 -3
  25. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_components.py +1 -0
  26. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_initialize.py +36 -4
  27. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_policy.py +53 -0
  28. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_web.py +23 -0
  29. {roboapi-0.4.4 → roboapi-0.4.5}/uv.lock +1 -1
  30. roboapi-0.4.4/frontend/src/components/SettingsPanel.test.tsx +0 -64
  31. roboapi-0.4.4/roboapi/web/static/assets/index-QXqV-fDC.css +0 -1
  32. {roboapi-0.4.4 → roboapi-0.4.5}/.python-version +0 -0
  33. {roboapi-0.4.4 → roboapi-0.4.5}/DESIGN.md +0 -0
  34. {roboapi-0.4.4 → roboapi-0.4.5}/LICENSE +0 -0
  35. {roboapi-0.4.4 → roboapi-0.4.5}/MANIFEST.in +0 -0
  36. {roboapi-0.4.4 → roboapi-0.4.5}/NOTICE +0 -0
  37. {roboapi-0.4.4 → roboapi-0.4.5}/docs/calibration.md +0 -0
  38. {roboapi-0.4.4 → roboapi-0.4.5}/docs/development.md +0 -0
  39. {roboapi-0.4.4 → roboapi-0.4.5}/docs/embodiments.md +0 -0
  40. {roboapi-0.4.4 → roboapi-0.4.5}/docs/naming.md +0 -0
  41. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.10.md +0 -0
  42. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.11.md +0 -0
  43. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.8.md +0 -0
  44. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.9.md +0 -0
  45. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.3.0.md +0 -0
  46. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.0.md +0 -0
  47. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.1.md +0 -0
  48. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.2.md +0 -0
  49. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.3.md +0 -0
  50. {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.4.md +0 -0
  51. {roboapi-0.4.4 → roboapi-0.4.5}/docs/repository-rename.md +0 -0
  52. {roboapi-0.4.4 → roboapi-0.4.5}/docs/zh-CN/DESIGN.md +0 -0
  53. {roboapi-0.4.4 → roboapi-0.4.5}/docs/zh-CN/README.md +0 -0
  54. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/BRAND.md +0 -0
  55. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/asset-provenance.json +0 -0
  56. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/index.html +0 -0
  57. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/package-lock.json +0 -0
  58. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/package.json +0 -0
  59. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Bundler-LICENSE.txt +0 -0
  60. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Inter-OFL.txt +0 -0
  61. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Lucide-LICENSE.txt +0 -0
  62. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Meshoptimizer-LICENSE.txt +0 -0
  63. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/PokeBrand-NOTICE.txt +0 -0
  64. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/React-LICENSE.txt +0 -0
  65. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Three-LICENSE.txt +0 -0
  66. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/App.tsx +0 -0
  67. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/api.test.ts +0 -0
  68. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/api.ts +0 -0
  69. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/Inter-Variable.ttf +0 -0
  70. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/MiSans-Regular.woff2 +0 -0
  71. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/MiSans-Semibold.woff2 +0 -0
  72. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/logo-1.png +0 -0
  73. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/README.md +0 -0
  74. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/home-reference.png +0 -0
  75. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/robotiq-ace-pro-2.glb +0 -0
  76. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/cameraStream.test.ts +0 -0
  77. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/cameraStream.ts +0 -0
  78. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Brand.tsx +0 -0
  79. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationDialog.test.tsx +0 -0
  80. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationDialog.tsx +0 -0
  81. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationIllustration.test.tsx +0 -0
  82. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationIllustration.tsx +0 -0
  83. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationScene.tsx +0 -0
  84. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CameraView.test.tsx +0 -0
  85. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CameraView.tsx +0 -0
  86. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DevicesDialog.tsx +0 -0
  87. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Dialog.tsx +0 -0
  88. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DirectionCheckDialog.test.tsx +0 -0
  89. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DirectionCheckDialog.tsx +0 -0
  90. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Icon.tsx +0 -0
  91. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/InstructionPanel.tsx +0 -0
  92. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/LogsPanel.tsx +0 -0
  93. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Notification.tsx +0 -0
  94. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Popover.tsx +0 -0
  95. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetChips.test.tsx +0 -0
  96. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetChips.tsx +0 -0
  97. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetsPanel.tsx +0 -0
  98. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/RunInfoDialog.tsx +0 -0
  99. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StopButton.tsx +0 -0
  100. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StorageSettings.test.tsx +0 -0
  101. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StorageSettings.tsx +0 -0
  102. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/TaskHistory.test.tsx +0 -0
  103. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/TaskHistory.tsx +0 -0
  104. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/WorkspaceSettings.test.tsx +0 -0
  105. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/WorkspaceSettings.tsx +0 -0
  106. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/camera-lens.ts +0 -0
  107. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/direction-motion.test.ts +0 -0
  108. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/direction-motion.ts +0 -0
  109. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/locking-pins.ts +0 -0
  110. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration.css +0 -0
  111. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/format.ts +0 -0
  112. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/main.tsx +0 -0
  113. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/naming.test.tsx +0 -0
  114. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/naming.ts +0 -0
  115. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/notifications.test.ts +0 -0
  116. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/notifications.ts +0 -0
  117. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/RunPage.tsx +0 -0
  118. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/SettingsPage.tsx +0 -0
  119. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/fixtures.ts +0 -0
  120. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/mockCamera.ts +0 -0
  121. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/setup.ts +0 -0
  122. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/useCameraPreview.test.tsx +0 -0
  123. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/useCameraPreview.ts +0 -0
  124. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/usePolling.test.tsx +0 -0
  125. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/usePolling.ts +0 -0
  126. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/tsconfig.json +0 -0
  127. {roboapi-0.4.4 → roboapi-0.4.5}/frontend/vite.config.ts +0 -0
  128. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/__init__.py +0 -0
  129. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/__init__.py +0 -0
  130. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/profile.py +0 -0
  131. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/session.py +0 -0
  132. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/cli.py +0 -0
  133. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/__init__.py +0 -0
  134. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/loader.py +0 -0
  135. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/embodiment.py +0 -0
  136. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/errors.py +0 -0
  137. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/geometry.py +0 -0
  138. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/__init__.py +0 -0
  139. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/base.py +0 -0
  140. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/camera.py +0 -0
  141. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/__init__.py +0 -0
  142. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/arm.py +0 -0
  143. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/desk.py +0 -0
  144. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/feedback.py +0 -0
  145. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/guiding.py +0 -0
  146. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/ik.py +0 -0
  147. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/limits.py +0 -0
  148. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/settings.py +0 -0
  149. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/registry.py +0 -0
  150. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/robotiq.py +0 -0
  151. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/scaffold.py +0 -0
  152. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/README.md.tmpl +0 -0
  153. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/arm.py.tmpl +0 -0
  154. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/camera.py.tmpl +0 -0
  155. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/gripper.py.tmpl +0 -0
  156. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/pyproject.toml.tmpl +0 -0
  157. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/__init__.py +0 -0
  158. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/build.py +0 -0
  159. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/compliant.py +0 -0
  160. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/dashboard.py +0 -0
  161. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/feedback.py +0 -0
  162. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/ipc.py +0 -0
  163. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/CMakeLists.txt +0 -0
  164. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/dependencies.lock.json +0 -0
  165. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/cartesian_speedl.hpp +0 -0
  166. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/control_loop.hpp +0 -0
  167. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/geom.hpp +0 -0
  168. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/motion_primitives.hpp +0 -0
  169. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/robot_io.hpp +0 -0
  170. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/streaming_pose.hpp +0 -0
  171. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/src/control_loop.cpp +0 -0
  172. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/src/robot_io_urcl.cpp +0 -0
  173. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/cartesian_speedl_unit.cpp +0 -0
  174. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/control_modes_unit.cpp +0 -0
  175. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/streaming_pose_unit.cpp +0 -0
  176. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/velocity_governor_unit.cpp +0 -0
  177. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/worker.cpp +0 -0
  178. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/position.py +0 -0
  179. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/settings.py +0 -0
  180. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/images.py +0 -0
  181. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/mcp.py +0 -0
  182. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/motion.py +0 -0
  183. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/naming.py +0 -0
  184. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/operations.py +0 -0
  185. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/__init__.py +0 -0
  186. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/protocol.py +0 -0
  187. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/product-names.json +0 -0
  188. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/records.py +0 -0
  189. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/semantics.py +0 -0
  190. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/tasks.py +0 -0
  191. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/tool.py +0 -0
  192. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/__init__.py +0 -0
  193. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/presets.py +0 -0
  194. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Bundler-LICENSE.txt +0 -0
  195. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Inter-OFL.txt +0 -0
  196. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Inter-Variable-c8O0ljhh.ttf +0 -0
  197. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Lucide-LICENSE.txt +0 -0
  198. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Meshoptimizer-LICENSE.txt +0 -0
  199. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/MiSans-Regular-ES4DrbaF.woff2 +0 -0
  200. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/MiSans-Semibold-B34HIk9C.woff2 +0 -0
  201. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/PokeBrand-NOTICE.txt +0 -0
  202. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/React-LICENSE.txt +0 -0
  203. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Three-LICENSE.txt +0 -0
  204. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/home-reference-CTpf8-oV.png +0 -0
  205. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/robotiq-ace-pro-2-EJuoOXTy.glb +0 -0
  206. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/dependency_links.txt +0 -0
  207. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/entry_points.txt +0 -0
  208. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/requires.txt +0 -0
  209. {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/top_level.txt +0 -0
  210. {roboapi-0.4.4 → roboapi-0.4.5}/setup.cfg +0 -0
  211. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_calibration.py +0 -0
  212. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_chunk_boundary.py +0 -0
  213. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_cli.py +0 -0
  214. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_config.py +0 -0
  215. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_direction_check.py +0 -0
  216. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_instruction_pending.py +0 -0
  217. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_mcp.py +0 -0
  218. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_monitor_error_clear.py +0 -0
  219. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_motion.py +0 -0
  220. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_naming.py +0 -0
  221. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_preview.py +0 -0
  222. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_runtime.py +0 -0
  223. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_sessions.py +0 -0
  224. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_storage.py +0 -0
  225. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_task_runtime.py +0 -0
  226. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_task_web.py +0 -0
  227. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_tasks.py +0 -0
  228. {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: roboapi
3
- Version: 0.4.4
3
+ Version: 0.4.5
4
4
  Summary: Run robot policies on UR and Franka through a browser or an MCP agent.
5
5
  Author: PokeBot
6
6
  License-Expression: Apache-2.0 AND MIT AND ISC AND OFL-1.1 AND LicenseRef-MiSans
@@ -59,7 +59,8 @@ and extract it. The GitHub repository is currently private.
59
59
  Mounting must match the model's training viewpoint.
60
60
  - **Host:** Linux x86-64 and CPython 3.10–3.12; new installations use 3.12 with
61
61
  [uv](https://docs.astral.sh/uv/getting-started/installation/).
62
- - **Model service:** a Base URL, model ID and API key for the model API contract.
62
+ - **Model service:** an API key for `https://api.pokebot.com/v1`, or a custom service
63
+ implementing the same model API contract. Select a model from the service's list during setup.
63
64
 
64
65
  The release wheel includes the web interface. UR e-Series requires a separately built
65
66
  control runtime from sources included in the wheel. Franka uses a compatible SDK and
@@ -118,6 +119,8 @@ for one component. See [Add hardware components](docs/embodiments.md) for SDK in
118
119
 
119
120
  Have the robot address, camera device and model credentials ready. The wizard selects the
120
121
  gripper connection and saves the local configuration; Franka also needs Desk credentials.
122
+ Accept the default model address or enter your own, provide the API key, then select a
123
+ model from the returned list. Model discovery requires a network connection.
121
124
  3. Start the browser interface:
122
125
 
123
126
  ```sh
@@ -139,6 +142,7 @@ for one component. See [Add hardware components](docs/embodiments.md) for SDK in
139
142
  Actions run at 30 Hz. Between chunks, RoboAPI waits 0.5 seconds by default before capturing
140
143
  the next observation. Open the current model at the input’s right to go to **Settings →
141
144
  Model & runtime** and change its connection or **Chunk wait (s)** while stopped. Choose
145
+ **Connect** to load models, select one, then **Save** to apply the settings. Choose
142
146
  English or Chinese in **Settings → General**.
143
147
 
144
148
  Shift+Enter sends; Enter inserts a newline. Up/Down recalls past instructions without sending.
@@ -19,7 +19,8 @@ and extract it. The GitHub repository is currently private.
19
19
  Mounting must match the model's training viewpoint.
20
20
  - **Host:** Linux x86-64 and CPython 3.10–3.12; new installations use 3.12 with
21
21
  [uv](https://docs.astral.sh/uv/getting-started/installation/).
22
- - **Model service:** a Base URL, model ID and API key for the model API contract.
22
+ - **Model service:** an API key for `https://api.pokebot.com/v1`, or a custom service
23
+ implementing the same model API contract. Select a model from the service's list during setup.
23
24
 
24
25
  The release wheel includes the web interface. UR e-Series requires a separately built
25
26
  control runtime from sources included in the wheel. Franka uses a compatible SDK and
@@ -78,6 +79,8 @@ for one component. See [Add hardware components](docs/embodiments.md) for SDK in
78
79
 
79
80
  Have the robot address, camera device and model credentials ready. The wizard selects the
80
81
  gripper connection and saves the local configuration; Franka also needs Desk credentials.
82
+ Accept the default model address or enter your own, provide the API key, then select a
83
+ model from the returned list. Model discovery requires a network connection.
81
84
  3. Start the browser interface:
82
85
 
83
86
  ```sh
@@ -99,6 +102,7 @@ for one component. See [Add hardware components](docs/embodiments.md) for SDK in
99
102
  Actions run at 30 Hz. Between chunks, RoboAPI waits 0.5 seconds by default before capturing
100
103
  the next observation. Open the current model at the input’s right to go to **Settings →
101
104
  Model & runtime** and change its connection or **Chunk wait (s)** while stopped. Choose
105
+ **Connect** to load models, select one, then **Save** to apply the settings. Choose
102
106
  English or Chinese in **Settings → General**.
103
107
 
104
108
  Shift+Enter sends; Enter inserts a newline. Up/Down recalls past instructions without sending.
@@ -163,7 +163,11 @@ configuration readback and guiding; their complete workflows still need hardware
163
163
  Follow [Get started](../README.md#get-started) to initialize, preview and calibrate.
164
164
  After the final Home return, the browser saves the calibration and initializes control,
165
165
  including the gripper. It then offers optional direction checks; **Done** returns to the run view.
166
- The setup wizard saves settings without contacting hardware or the model service.
166
+ The setup wizard does not contact hardware. It defaults to `https://api.pokebot.com/v1`,
167
+ accepts a custom Base URL, and uses the API key to fetch the available models before saving.
168
+ In the browser's model settings, **Connect** loads the list without saving credentials or
169
+ creating a session; select a model and choose **Save** to apply it. A failed connection
170
+ leaves the saved configuration unchanged.
167
171
  A successful camera preview shows fresh video. Franka arm preview uses Desk credentials
168
172
  and leaves FCI, brakes and operating mode unchanged. Calibration prepares Programming-mode
169
173
  guiding; automatic returns and Enable control prepare FCI when needed.
@@ -8,13 +8,16 @@ A service must implement all four endpoints; a general chat endpoint alone is in
8
8
 
9
9
  ## Connection
10
10
 
11
- Configure the service's Base URL, model ID and API key through `roboapi init` or **Settings**.
11
+ Use `roboapi init` or **Settings** to enter an API key and select a model from the service's
12
+ list. The default Base URL is `https://api.pokebot.com/v1`; custom endpoints are supported.
13
+ In Settings, **Connect** fetches models without saving or creating a session;
14
+ **Save** applies the selected model and connection settings.
12
15
  For a Base URL such as `https://model.example/v1`, paths below are relative to `/v1/`.
13
16
  Requests use JSON and `Authorization: Bearer <API_KEY>`.
14
17
 
15
18
  | Method | Path | Purpose |
16
19
  | --- | --- | --- |
17
- | GET | `models` | Confirm that the configured model is available |
20
+ | GET | `models` | List models during setup and confirm the selected model when connecting |
18
21
  | POST | `sessions` | Create one session for a run |
19
22
  | POST | `chat/completions` | Request the next action chunk in that session |
20
23
  | POST | `sessions/{id}/close` | Close the session with final execution feedback |
@@ -0,0 +1,19 @@
1
+ # v0.4.5 — Select models from the service
2
+
3
+ - Default to `https://api.pokebot.com/v1`, with custom endpoints still supported.
4
+ - Fetch the authenticated model list during `roboapi init` and select a model
5
+ instead of entering an ID or relying on a fixed default.
6
+ - In model settings, choose **Connect**, select a model, then **Save**. Keep the
7
+ current selection when it is available, and reload the list after changing
8
+ the address or API key.
9
+ - Discover models without saving draft credentials or creating a session.
10
+ Failed connections leave saved settings unchanged and can be retried.
11
+
12
+ ## Upgrading
13
+
14
+ Install the update in the existing environment and restart RoboAPI. Existing
15
+ endpoint and model settings remain in use; open **Settings > Model & runtime**
16
+ to connect and choose another model. New installation setup requires access to
17
+ the model service to retrieve its list.
18
+
19
+ This update does not require recalibration or rebuilding the UR native runtime.
@@ -48,6 +48,8 @@ function backend(initial = runtime()) {
48
48
  } else if (path === "/api/policy/config") {
49
49
  config = { ...config, ...body };
50
50
  return json(config);
51
+ } else if (path === "/api/policy/models") {
52
+ return json({ models: ["vision-1", "vision-2"] });
51
53
  }
52
54
  return json(status);
53
55
  }
@@ -600,15 +602,17 @@ describe("Current model settings", () => {
600
602
  await screen.findByRole("heading", { name: "Ready" });
601
603
  const dialog = await settings();
602
604
  await waitFor(() =>
603
- expect(within(dialog).getByLabelText("Model ID")).toHaveValue("vision-2"),
605
+ expect(within(dialog).getByLabelText("Model")).toHaveValue("vision-2"),
604
606
  );
605
607
  expect(within(dialog).getByLabelText("API key")).toHaveValue("");
606
608
  expect(within(dialog).getByText("Configured")).toBeVisible();
609
+ await userEvent.click(within(dialog).getByRole("button", { name: "Connect" }));
610
+ await within(dialog).findByRole("button", { name: "Save" });
607
611
  fireEvent.change(within(dialog).getByLabelText("Chunk wait (s)"), {
608
612
  target: { value: "1.25" },
609
613
  });
610
614
  await userEvent.click(
611
- within(dialog).getByRole("button", { name: "Save & connect" }),
615
+ within(dialog).getByRole("button", { name: "Save" }),
612
616
  );
613
617
  await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());
614
618
  expect(
@@ -625,11 +629,11 @@ describe("Current model settings", () => {
625
629
  await screen.findByRole("heading", { name: "Running" });
626
630
  const dialog = await settings();
627
631
  await waitFor(() =>
628
- expect(within(dialog).getByLabelText("Model ID")).toHaveValue("vision-2"),
632
+ expect(within(dialog).getByLabelText("Model")).toHaveValue("vision-2"),
629
633
  );
630
- expect(within(dialog).getByLabelText("Model ID")).toBeDisabled();
634
+ expect(within(dialog).getByLabelText("Model")).toBeDisabled();
631
635
  expect(
632
- within(dialog).getByRole("button", { name: "Save & connect" }),
636
+ within(dialog).getByRole("button", { name: "Connect" }),
633
637
  ).toBeDisabled();
634
638
  });
635
639
  it("only reveals the key entered now and discards it when the panel is closed", async () => {
@@ -0,0 +1,127 @@
1
+ import { fireEvent, render, screen, waitFor } from "@testing-library/react";
2
+ import userEvent from "@testing-library/user-event";
3
+ import { expect, it, vi } from "vitest";
4
+ import { json } from "../test/fixtures";
5
+ import { SettingsPanel } from "./SettingsPanel";
6
+
7
+ const config = {
8
+ url: "https://model.test/v1",
9
+ model: "vision-2",
10
+ api_key_configured: true,
11
+ policy_ready: true,
12
+ inter_chunk_pause_s: 0.5,
13
+ };
14
+
15
+ it("retries a failed initial load without duplicating the request error inline", async () => {
16
+ const fetch = vi.fn()
17
+ .mockResolvedValueOnce(json({ error: "Configuration unavailable" }, 503))
18
+ .mockResolvedValueOnce(json(config));
19
+ vi.stubGlobal("fetch", fetch);
20
+ render(<SettingsPanel idle onSaved={vi.fn()} />);
21
+
22
+ const retry = await screen.findByRole("button", { name: "Retry" });
23
+ expect(screen.queryByText("Loading…")).toBeNull();
24
+ expect(screen.queryByText("Configuration unavailable")).toBeNull();
25
+ expect(screen.queryByRole("alert")).toBeNull();
26
+ expect(screen.getByRole("button", { name: "Connect" })).toBeDisabled();
27
+
28
+ await userEvent.click(retry);
29
+ expect(await screen.findByLabelText("Model")).toHaveValue(config.model);
30
+ expect(screen.getByLabelText("Model")).toBeDisabled();
31
+ expect(screen.getByRole("spinbutton", { name: "Chunk wait (s)" })).toBeVisible();
32
+ expect(screen.queryByRole("button", { name: "Retry" })).toBeNull();
33
+ expect(screen.getByRole("button", { name: "Connect" })).toBeEnabled();
34
+ expect(fetch).toHaveBeenCalledTimes(2);
35
+ });
36
+
37
+ it("connects with the saved key, preserves a valid model, then saves", async () => {
38
+ const fetch = vi.fn()
39
+ .mockResolvedValueOnce(json(config))
40
+ .mockResolvedValueOnce(json({ models: ["vision-1", "vision-2"] }))
41
+ .mockResolvedValueOnce(json({ ...config, inter_chunk_pause_s: 1.25 }));
42
+ vi.stubGlobal("fetch", fetch);
43
+ const saved = vi.fn();
44
+ render(<SettingsPanel idle onSaved={saved} />);
45
+ await userEvent.click(await screen.findByRole("button", { name: "Connect" }));
46
+ const button = await screen.findByRole("button", { name: "Save" });
47
+ expect(screen.getByLabelText("Model")).toHaveValue("vision-2");
48
+ expect(fetch.mock.calls[1][0]).toBe("/api/policy/models");
49
+ expect(JSON.parse(fetch.mock.calls[1][1].body)).toEqual({ url: config.url });
50
+ expect(saved).not.toHaveBeenCalled();
51
+ fireEvent.change(screen.getByLabelText("Chunk wait (s)"), { target: { value: "1.25" } });
52
+ await userEvent.click(button);
53
+ await waitFor(() => expect(saved).toHaveBeenCalledOnce());
54
+ expect(JSON.parse(fetch.mock.calls[2][1].body)).toEqual({
55
+ url: config.url, model: "vision-2", inter_chunk_pause_s: 1.25,
56
+ });
57
+ });
58
+
59
+ it("invalidates the list after connection edits and requires choosing among new models", async () => {
60
+ const fetch = vi.fn()
61
+ .mockResolvedValueOnce(json(config))
62
+ .mockResolvedValueOnce(json({ models: ["vision-2"] }))
63
+ .mockResolvedValueOnce(json({ models: ["remote-a", "remote-b"] }))
64
+ .mockResolvedValueOnce(json({ ...config, model: "remote-b", url: "https://updated.test/v1" }));
65
+ vi.stubGlobal("fetch", fetch);
66
+ const saved = vi.fn();
67
+ render(<SettingsPanel idle onSaved={saved} />);
68
+ await userEvent.click(await screen.findByRole("button", { name: "Connect" }));
69
+ await screen.findByRole("button", { name: "Save" });
70
+ fireEvent.change(screen.getByLabelText("Base URL"), { target: { value: "https://updated.test/v1" } });
71
+ expect(screen.getByLabelText("Model")).toBeDisabled();
72
+ expect(screen.queryByRole("button", { name: "Save" })).toBeNull();
73
+ await userEvent.type(screen.getByLabelText("API key"), "new-key");
74
+ expect(fetch).toHaveBeenCalledTimes(2);
75
+ await userEvent.click(screen.getByRole("button", { name: "Connect" }));
76
+ const button = await screen.findByRole("button", { name: "Save" });
77
+ expect(button).toBeDisabled();
78
+ expect(screen.getByLabelText("Model")).toHaveValue("");
79
+ await userEvent.selectOptions(screen.getByLabelText("Model"), "remote-b");
80
+ await userEvent.click(button);
81
+ await waitFor(() => expect(saved).toHaveBeenCalledOnce());
82
+ expect(JSON.parse(fetch.mock.calls[3][1].body)).toEqual({
83
+ url: "https://updated.test/v1", model: "remote-b", api_key: "new-key", inter_chunk_pause_s: 0.5,
84
+ });
85
+ });
86
+
87
+ it("retains entered credentials for discovery and save retries without inline errors", async () => {
88
+ const fetch = vi.fn()
89
+ .mockResolvedValueOnce(json(config))
90
+ .mockResolvedValueOnce(json({ error: "Model connection failed" }, 503))
91
+ .mockResolvedValueOnce(json({ models: ["updated-model"] }))
92
+ .mockResolvedValueOnce(json({ error: "Model connection failed" }, 503))
93
+ .mockResolvedValueOnce(json(config));
94
+ vi.stubGlobal("fetch", fetch);
95
+ const saved = vi.fn();
96
+ render(<SettingsPanel idle onSaved={saved} />);
97
+ const model = await screen.findByLabelText("Model");
98
+ fireEvent.change(screen.getByLabelText("Base URL"), {
99
+ target: { value: "https://updated.test/v1" },
100
+ });
101
+ const key = screen.getByLabelText("API key");
102
+ await userEvent.type(key, "entered-key");
103
+ await userEvent.click(screen.getByRole("button", { name: "Show entered key" }));
104
+ await userEvent.click(screen.getByRole("button", { name: "Connect" }));
105
+ await waitFor(() => expect(screen.getByRole("button", { name: "Connect" })).toBeEnabled());
106
+ expect(key).toHaveValue("entered-key");
107
+ expect(key).toHaveAttribute("type", "password");
108
+ expect(model).toHaveValue(config.model);
109
+ expect(model).toBeDisabled();
110
+ await userEvent.click(screen.getByRole("button", { name: "Connect" }));
111
+ const save = await screen.findByRole("button", { name: "Save" });
112
+ await userEvent.click(save);
113
+
114
+ await waitFor(() => expect(model).toBeEnabled());
115
+ expect(model).toHaveValue("updated-model");
116
+ expect(screen.getByLabelText("Base URL")).toHaveValue("https://updated.test/v1");
117
+ expect(key).toHaveValue("entered-key");
118
+ expect(key).toHaveAttribute("type", "password");
119
+ expect(screen.queryByRole("alert")).toBeNull();
120
+ expect(screen.queryByText("Model connection failed")).toBeNull();
121
+ expect(saved).not.toHaveBeenCalled();
122
+
123
+ await userEvent.click(save);
124
+ await waitFor(() => expect(saved).toHaveBeenCalledOnce());
125
+ expect(key).toHaveValue("");
126
+ expect(JSON.parse(fetch.mock.calls[4][1].body).api_key).toBe("entered-key");
127
+ });
@@ -12,7 +12,8 @@ export function SettingsPanel({
12
12
  const [config, setConfig] = useState<PolicyConfig | null>(null);
13
13
  const [key, setKey] = useState("");
14
14
  const [visible, setVisible] = useState(false);
15
- const [busy, setBusy] = useState(false);
15
+ const [busy, setBusy] = useState<"connect" | "save" | null>(null);
16
+ const [models, setModels] = useState<string[] | null>(null);
16
17
  const [failed, setFailed] = useState(false);
17
18
  const [attempt, setAttempt] = useState(0);
18
19
  const keyId = useId();
@@ -31,47 +32,46 @@ export function SettingsPanel({
31
32
  });
32
33
  return () => controller.abort();
33
34
  }, [attempt]);
34
- async function save(event: FormEvent) {
35
+ async function submit(event: FormEvent) {
35
36
  event.preventDefault();
36
37
  if (!config || !idle || busy) return;
37
- setBusy(true);
38
+ const credentials = {
39
+ url: config.url.trim(),
40
+ ...(key.trim() ? { api_key: key.trim() } : {}),
41
+ };
42
+ setBusy(models === null ? "connect" : "save");
43
+ setVisible(false);
38
44
  try {
39
- await request<PolicyConfig>("/api/policy/config", {
40
- url: config.url.trim(),
41
- model: config.model.trim(),
42
- inter_chunk_pause_s: config.inter_chunk_pause_s,
43
- ...(key.trim() ? { api_key: key.trim() } : {}),
44
- });
45
- setKey("");
46
- setVisible(false);
47
- onSaved();
45
+ if (models === null) {
46
+ const result = await request<{ models: string[] }>("/api/policy/models", credentials);
47
+ setModels(result.models);
48
+ setConfig({
49
+ ...config,
50
+ url: credentials.url,
51
+ model: result.models.includes(config.model)
52
+ ? config.model : result.models.length === 1 ? result.models[0] : "",
53
+ });
54
+ } else {
55
+ const saved = await request<PolicyConfig>("/api/policy/config", {
56
+ ...credentials,
57
+ model: config.model,
58
+ inter_chunk_pause_s: config.inter_chunk_pause_s,
59
+ });
60
+ setConfig(saved);
61
+ setKey("");
62
+ onSaved();
63
+ }
48
64
  } catch {
49
- // request reports the failure; discard the entered key after the attempt.
50
- setKey("");
51
- setVisible(false);
65
+ // request reports the failure; retain the draft for an explicit retry.
52
66
  } finally {
53
- setBusy(false);
67
+ setBusy(null);
54
68
  }
55
69
  }
56
70
  return (
57
- <form className="model-settings" onSubmit={save} autoComplete="off">
71
+ <form className="model-settings" onSubmit={submit} autoComplete="off">
58
72
  {!config && !failed && <p className="muted">{t("Loading…")}</p>}
59
73
  {config && (
60
- <fieldset disabled={!idle || busy}>
61
- <label>
62
- {t("Model ID")}
63
- <input
64
- autoFocus
65
- data-autofocus
66
- value={config.model}
67
- maxLength={128}
68
- required
69
- spellCheck={false}
70
- onChange={(event) =>
71
- setConfig({ ...config, model: event.target.value })
72
- }
73
- />
74
- </label>
74
+ <fieldset disabled={!idle || !!busy}>
75
75
  <label>
76
76
  {t("Base URL")}
77
77
  <input
@@ -80,9 +80,10 @@ export function SettingsPanel({
80
80
  maxLength={2048}
81
81
  required
82
82
  spellCheck={false}
83
- onChange={(event) =>
84
- setConfig({ ...config, url: event.target.value })
85
- }
83
+ onChange={(event) => {
84
+ setConfig({ ...config, url: event.target.value });
85
+ setModels(null);
86
+ }}
86
87
  />
87
88
  </label>
88
89
  <div className="key-field">
@@ -96,17 +97,19 @@ export function SettingsPanel({
96
97
  <div className="key-input">
97
98
  <input
98
99
  id={keyId}
100
+ autoFocus
101
+ data-autofocus
99
102
  type={visible ? "text" : "password"}
100
103
  value={key}
101
104
  maxLength={4096}
102
105
  autoComplete="new-password"
103
106
  spellCheck={false}
104
- placeholder={t(
105
- config.api_key_configured
106
- ? "Leave blank to keep the existing key"
107
- : "Optional",
108
- )}
109
- onChange={(event) => setKey(event.target.value)}
107
+ placeholder={config.api_key_configured ? t("Leave blank to keep the existing key") : undefined}
108
+ required={!config.api_key_configured}
109
+ onChange={(event) => {
110
+ setKey(event.target.value);
111
+ setModels(null);
112
+ }}
110
113
  />
111
114
  <button
112
115
  type="button"
@@ -114,13 +117,31 @@ export function SettingsPanel({
114
117
  aria-label={t(
115
118
  visible ? "Hide entered key" : "Show entered key",
116
119
  )}
117
- disabled={!key || busy || !idle}
120
+ disabled={!key || !!busy || !idle}
118
121
  onClick={() => setVisible(!visible)}
119
122
  >
120
123
  <Icon name={visible ? "eyeOff" : "eye"} />
121
124
  </button>
122
125
  </div>
123
126
  </div>
127
+ <label>
128
+ {t("Model")}
129
+ <select
130
+ value={config.model}
131
+ required
132
+ disabled={models === null}
133
+ onChange={(event) => setConfig({ ...config, model: event.target.value })}
134
+ >
135
+ {models === null ? (
136
+ <option value={config.model}>{config.model || t("Select model")}</option>
137
+ ) : (
138
+ <>
139
+ <option value="" disabled>{t("Select model")}</option>
140
+ {models.map((model) => <option key={model} value={model}>{model}</option>)}
141
+ </>
142
+ )}
143
+ </select>
144
+ </label>
124
145
  <label className="runtime-settings">
125
146
  {t("Chunk wait (s)")}
126
147
  <input
@@ -154,9 +175,9 @@ export function SettingsPanel({
154
175
  <button
155
176
  type="submit"
156
177
  className="primary full-width"
157
- disabled={!idle || !config || busy}
178
+ disabled={!idle || !config || !!busy || (models !== null && !models.includes(config.model))}
158
179
  >
159
- {t(busy ? "Connecting…" : "Save & connect")}
180
+ {t(busy === "connect" ? "Connecting…" : busy === "save" ? "Saving…" : models === null ? "Connect" : "Save")}
160
181
  <Icon name="check" />
161
182
  </button>
162
183
  </form>
@@ -75,7 +75,7 @@ const chinese: Record<string, string> = {
75
75
  "Model settings": "模型设置",
76
76
  "Current model": "当前模型",
77
77
  Model: "模型",
78
- "Model ID": "模型 ID",
78
+ "Select model": "选择模型",
79
79
  "Base URL": "Base URL",
80
80
  "API key": "API Key",
81
81
  Configured: "已配置",
@@ -84,7 +84,8 @@ const chinese: Record<string, string> = {
84
84
  "Show entered key": "显示本次输入的密钥",
85
85
  "Hide entered key": "隐藏本次输入的密钥",
86
86
  "Chunk wait (s)": "动作块间隔 / s",
87
- "Save & connect": "保存并连接",
87
+ "No models available for this key": "此 Key 没有可用模型",
88
+ Connect: "连接",
88
89
  "Connecting…": "连接中…",
89
90
  Apply: "应用",
90
91
  "Stop to edit settings": "停止后可修改设置",
@@ -131,13 +131,13 @@ it("keeps Robot Stop reachable while inspecting locked model settings", async ()
131
131
  await screen.findByRole("button", { name: "Model settings" }),
132
132
  );
133
133
  const settings = await screen.findByRole("region", { name: "Settings" });
134
- expect(await within(settings).findByLabelText("Model ID")).toBeDisabled();
134
+ expect(await within(settings).findByLabelText("Base URL")).toBeDisabled();
135
135
  await userEvent.click(
136
136
  within(settings).getByRole("button", { name: "Robot Stop" }),
137
137
  );
138
138
  expect(posts("/api/stop")).toEqual([{}]);
139
139
  await waitFor(() =>
140
- expect(within(settings).getByLabelText("Model ID")).toBeEnabled(),
140
+ expect(within(settings).getByLabelText("Base URL")).toBeEnabled(),
141
141
  );
142
142
  });
143
143
 
@@ -866,7 +866,8 @@ pre {
866
866
  font-size: 11px;
867
867
  color: #4e535d;
868
868
  }
869
- .model-settings input {
869
+ .model-settings input,
870
+ .model-settings select {
870
871
  font-size: 12px;
871
872
  margin-top: 6px;
872
873
  padding: 10px 11px;
@@ -2189,7 +2190,8 @@ summary {
2189
2190
  align-items: center;
2190
2191
  gap: 12px;
2191
2192
  }
2192
- .settings-page .model-settings input {
2193
+ .settings-page .model-settings input,
2194
+ .settings-page .model-settings select {
2193
2195
  min-height: 38px;
2194
2196
  padding: 8px 10px;
2195
2197
  border-radius: 8px;
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "roboapi"
3
- version = "0.4.4"
3
+ version = "0.4.5"
4
4
  description = "Run robot policies on UR and Franka through a browser or an MCP agent."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "PokeBot" }]
@@ -7,6 +7,7 @@ import math
7
7
 
8
8
  from ..semantics import HOME_POSE7
9
9
  from ..tool import ToolLoad
10
+ from ..policy.settings import DEFAULT_POLICY_URL
10
11
 
11
12
 
12
13
  @dataclass
@@ -71,7 +72,7 @@ def _default_camera():
71
72
  @dataclass
72
73
  class PolicyConfig:
73
74
  type: str = "openai"
74
- url: str = ""
75
+ url: str = DEFAULT_POLICY_URL
75
76
  # Bearer token, read from a file so it never lands in the config -- or in git.
76
77
  token_file: str = ""
77
78
  model: str = "" # required only by the OpenAI-compatible transport
@@ -10,7 +10,8 @@ import shlex
10
10
  from . import config
11
11
  from .config import DEFAULT_CONFIG, loader
12
12
  from .hardware.registry import component_plugin, component_plugins
13
- from .policy.settings import validate_policy_endpoint, write_policy_token
13
+ from .policy import OpenAIChatPolicyClient, PolicyUnavailable
14
+ from .policy.settings import DEFAULT_POLICY_URL, validate_policy_url, write_policy_token
14
15
 
15
16
 
16
17
  def _ask(label, default=""):
@@ -138,16 +139,25 @@ def initialize(path_text=DEFAULT_CONFIG, *, complete=False):
138
139
  selected.append(plugin)
139
140
  if selected[0].configure_tool is not None:
140
141
  cfg.tool = selected[0].configure_tool(setup)
142
+ token_path = path.parent / "model-api-key"
143
+ url = DEFAULT_POLICY_URL
141
144
  while True:
142
- url = _ask("Model Base URL")
143
- model = _ask("Model", "vision-1")
144
145
  try:
145
- url, model = validate_policy_endpoint(url, model)
146
- break
146
+ url = validate_policy_url(_ask("Model Base URL", url))
147
147
  except ValueError as exc:
148
148
  print(str(exc))
149
+ continue
150
+ token = _secret("Model API key", token_path)
151
+ try:
152
+ print("Connecting…")
153
+ models = OpenAIChatPolicyClient(url, str(token_path), api_key=token).list_models()
154
+ break
155
+ except (ValueError, PolicyUnavailable) as exc:
156
+ print(str(exc))
157
+ model = models[_choose("Model", models)]
158
+ setup.secrets.append((token_path, token))
149
159
  cfg.policy = config.PolicyConfig(type="openai", url=url, model=model,
150
- token_file=setup.secret("Model API key", "model-api-key"))
160
+ token_file=str(token_path))
151
161
  print("After each action chunk, wait before capturing the next observation. Actions run at 30 Hz.")
152
162
  default_pause = str(cfg.runtime.inter_chunk_pause_s)
153
163
  while True: