Chuyển đến nội dung chính

dsh-ros2-state

Đã xác minh

dsh-ros2-state · v0.1.0 · MIT

dsh-ros2 control-plane state client — long-lived UDS connection to the dsh-ros2-sidecar data plane, so the Agent reads reduced, fresh robot state in milliseconds (logic-direct / physically-separated). Provides state_get / state_snapshot tools + a StateCli

Cài đặt

dsh plugin add dsh-ros2-state

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.

Thẻ

Readme

dsh-ros2-state

Control-plane state client for the dsh-ros2-sidecar data plane (逻辑直连 · 物理分离): a long-lived Unix Domain Socket connection (newline-JSON), letting the Agent read reduced, fresh robot state in milliseconds — no ROS2 subprocess per read, because the sidecar continuously reduces high-frequency topics into a semantic cache.

  • src/state-client.ts — StateClient (get / snapshot / subscribe / close), UdsStateClient impl (request_id concurrency, heartbeat, STALE/DOWN/TIMEOUT)
  • src/tools.ts — state_get / state_snapshot (read-only), via the deps.state seam
  • src/config.ts — state { socketPath, timeoutMs, tcp }

The sidecar (data plane) is dsh-ros2-sidecar; this package is the control plane that connects to it. See docs/sidecar-design.md.

Config (state.socketPath): path to the sidecar UDS socket. fail-closed: safety-relevant reads surface STALE/DOWN as structured errors — treat them as unsafe.