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.
- {roboapi-0.4.4 → roboapi-0.4.5}/PKG-INFO +6 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/README.md +5 -1
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/installation.md +5 -1
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/model-api.md +5 -2
- roboapi-0.4.5/docs/releases/v0.4.5.md +19 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/App.test.tsx +9 -5
- roboapi-0.4.5/frontend/src/components/SettingsPanel.test.tsx +127 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/SettingsPanel.tsx +65 -44
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/i18n.tsx +3 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/SettingsPage.test.tsx +2 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/styles.css +4 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/pyproject.toml +1 -1
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/models.py +2 -1
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/initialize.py +16 -6
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/client.py +29 -8
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/settings.py +15 -4
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/runtime.py +7 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/server.py +12 -1
- 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
- roboapi-0.4.4/roboapi/web/static/assets/index-CZ3Otu1v.js → roboapi-0.4.5/roboapi/web/static/assets/index-BKtDMtWh.js +3 -3
- roboapi-0.4.5/roboapi/web/static/assets/index-wKYVYXw0.css +1 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/index.html +2 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/PKG-INFO +6 -2
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/SOURCES.txt +4 -3
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_components.py +1 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_initialize.py +36 -4
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_policy.py +53 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_web.py +23 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/uv.lock +1 -1
- roboapi-0.4.4/frontend/src/components/SettingsPanel.test.tsx +0 -64
- roboapi-0.4.4/roboapi/web/static/assets/index-QXqV-fDC.css +0 -1
- {roboapi-0.4.4 → roboapi-0.4.5}/.python-version +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/DESIGN.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/LICENSE +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/MANIFEST.in +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/NOTICE +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/calibration.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/development.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/embodiments.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/naming.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.10.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.11.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.8.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.2.9.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.3.0.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.0.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.1.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.2.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.3.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/releases/v0.4.4.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/repository-rename.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/zh-CN/DESIGN.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/docs/zh-CN/README.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/BRAND.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/asset-provenance.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/index.html +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/package-lock.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/package.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Bundler-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Inter-OFL.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Lucide-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Meshoptimizer-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/PokeBrand-NOTICE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/React-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/public/assets/Three-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/App.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/api.test.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/api.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/Inter-Variable.ttf +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/MiSans-Regular.woff2 +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/MiSans-Semibold.woff2 +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/brand/logo-1.png +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/README.md +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/home-reference.png +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/assets/calibration/robotiq-ace-pro-2.glb +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/cameraStream.test.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/cameraStream.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Brand.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationDialog.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationDialog.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationIllustration.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationIllustration.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CalibrationScene.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CameraView.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/CameraView.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DevicesDialog.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Dialog.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DirectionCheckDialog.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/DirectionCheckDialog.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Icon.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/InstructionPanel.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/LogsPanel.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Notification.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/Popover.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetChips.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetChips.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/PresetsPanel.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/RunInfoDialog.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StopButton.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StorageSettings.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/StorageSettings.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/TaskHistory.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/TaskHistory.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/WorkspaceSettings.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/WorkspaceSettings.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/camera-lens.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/direction-motion.test.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/direction-motion.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration/locking-pins.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/components/calibration.css +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/format.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/main.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/naming.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/naming.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/notifications.test.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/notifications.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/RunPage.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/pages/SettingsPage.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/fixtures.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/mockCamera.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/test/setup.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/useCameraPreview.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/useCameraPreview.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/usePolling.test.tsx +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/src/usePolling.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/tsconfig.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/frontend/vite.config.ts +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/profile.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/calibration/session.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/cli.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/config/loader.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/embodiment.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/errors.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/geometry.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/base.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/camera.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/arm.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/desk.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/feedback.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/guiding.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/ik.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/limits.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/franka/settings.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/registry.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/robotiq.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/scaffold.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/README.md.tmpl +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/arm.py.tmpl +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/camera.py.tmpl +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/gripper.py.tmpl +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/templates/pyproject.toml.tmpl +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/build.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/compliant.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/dashboard.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/feedback.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/ipc.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/CMakeLists.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/dependencies.lock.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/cartesian_speedl.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/control_loop.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/geom.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/motion_primitives.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/robot_io.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/include/ur_cpp/streaming_pose.hpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/src/control_loop.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/src/robot_io_urcl.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/cartesian_speedl_unit.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/control_modes_unit.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/streaming_pose_unit.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/tests/velocity_governor_unit.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/native/worker.cpp +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/position.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/hardware/ur/settings.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/images.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/mcp.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/motion.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/naming.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/operations.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/policy/protocol.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/product-names.json +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/records.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/semantics.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/tasks.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/tool.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/__init__.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/presets.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Bundler-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Inter-OFL.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Inter-Variable-c8O0ljhh.ttf +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Lucide-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Meshoptimizer-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/MiSans-Regular-ES4DrbaF.woff2 +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/MiSans-Semibold-B34HIk9C.woff2 +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/PokeBrand-NOTICE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/React-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/Three-LICENSE.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/home-reference-CTpf8-oV.png +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi/web/static/assets/robotiq-ace-pro-2-EJuoOXTy.glb +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/dependency_links.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/entry_points.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/requires.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/roboapi.egg-info/top_level.txt +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/setup.cfg +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_calibration.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_chunk_boundary.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_cli.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_config.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_direction_check.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_instruction_pending.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_mcp.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_monitor_error_clear.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_motion.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_naming.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_preview.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_runtime.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_sessions.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_storage.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_task_runtime.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_task_web.py +0 -0
- {roboapi-0.4.4 → roboapi-0.4.5}/tests/test_tasks.py +0 -0
- {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.
|
|
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:**
|
|
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:**
|
|
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
|
|
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
|
-
|
|
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` |
|
|
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
|
|
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
|
|
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
|
|
632
|
+
expect(within(dialog).getByLabelText("Model")).toHaveValue("vision-2"),
|
|
629
633
|
);
|
|
630
|
-
expect(within(dialog).getByLabelText("Model
|
|
634
|
+
expect(within(dialog).getByLabelText("Model")).toBeDisabled();
|
|
631
635
|
expect(
|
|
632
|
-
within(dialog).getByRole("button", { name: "
|
|
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(
|
|
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
|
|
35
|
+
async function submit(event: FormEvent) {
|
|
35
36
|
event.preventDefault();
|
|
36
37
|
if (!config || !idle || busy) return;
|
|
37
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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;
|
|
50
|
-
setKey("");
|
|
51
|
-
setVisible(false);
|
|
65
|
+
// request reports the failure; retain the draft for an explicit retry.
|
|
52
66
|
} finally {
|
|
53
|
-
setBusy(
|
|
67
|
+
setBusy(null);
|
|
54
68
|
}
|
|
55
69
|
}
|
|
56
70
|
return (
|
|
57
|
-
<form className="model-settings" onSubmit={
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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…" : "
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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("
|
|
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("
|
|
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;
|
|
@@ -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
|
|
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
|
|
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=
|
|
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:
|