feat: robot network discovery daemon#2484
Conversation
55b71a8 to
758bce8
Compare
Greptile SummaryThis PR introduces
Confidence Score: 4/5Safe to merge with one fix: the status command reports values from the current shell environment rather than the installed service configuration, so its output can be misleading after a custom-name install. The daemon lifecycle (signal handling, start/stop, try/finally cleanup) is solid. The main outstanding defect is in the status command, which reads DIMENSIONAL_ROBOT_NAME and LCM_DEFAULT_URL from the current process environment instead of the values baked into the installed unit file — meaning the displayed robot name and LCM URL can contradict what the running beacon actually advertises. The Linux Environment= escaping issue in install.py is the other open concern. dimwizard/dimwizard/cli.py (status command reads env vars instead of persisted config) and dimwizard/dimwizard/install.py (unescaped values in Linux systemd unit file) Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant DimosCLI as dimos run
participant SetupWizard as dimwizard/setup.py
participant Install as dimwizard/install.py
participant SystemD as systemd/launchd
participant Beacon as dimwizard __main__
participant Zeroconf as zeroconf
User->>DimosCLI: dimos run
DimosCLI->>SetupWizard: setup_wizard()
SetupWizard->>Install: is_installed()?
alt not installed
SetupWizard->>User: Prompt: Set up network discovery?
User->>SetupWizard: yes
SetupWizard->>Install: install()
Install->>SystemD: write unit file + enable --now
SystemD->>Beacon: start process
Beacon->>Zeroconf: Advertiser.start() register_service()
Zeroconf-->>Beacon: mDNS beacon running
else already installed
SetupWizard-->>DimosCLI: return (skip)
end
DimosCLI-->>User: robot running
User->>DimosCLI: Ctrl+C / SIGTERM
DimosCLI-->>User: exit
SystemD->>Beacon: SIGTERM
Beacon->>Zeroconf: Advertiser.stop() unregister + close
Reviews (3): Last reviewed commit: "fix: dimwizard cleanup" | Re-trigger Greptile |
| @@ -0,0 +1,21 @@ | |||
| [build-system] | |||
There was a problem hiding this comment.
Why a separate pyproject.toml? Does this get included in the dimos package?
Problem
An agentic harness has no current mechanism for detecting robots running on the same network. This PR addresses that limitation by installing a persistent background service that broadcasts each robot's identity over mDNS, making them more easily discoverable.
Solution
Adds dimwizard, a daemon that makes robots discoverable on the local network via mDNS. Includes a new hook in
dimos runwhich prompts the user to install the background service (launchd on macOS, systemd on Linux).The service will continuously broadcasts the robot's name and LCM URL under
_dimensional._tcp.local. A follow-up harness PR will use this to automatically detect + connect to robots on the same network without manual config.How to Test
Contributor License Agreement