bin/uik-daemon.js— persistent background daemon that publishes desktop state and agent heartbeats to the intent API. Exposed asuik-daemonbin, runnable vianpm run daemonornpx uik-daemon.- npm
binentry foruik-daemon.
Previously the DesktopAdapter and IAKAdapter existed as library code but nothing ran them as a long-lived process, so the intent dashboard showed every device and agent as stale. The daemon closes that gap.
Run under launchd (macOS), systemd (Linux), or a detached tmux session. Environment:
INTENT_API_KEY(required)INTENT_USER_ID(required)INTENT_AGENT_HANDLE(default@agent)INTENT_DEVICE_ID(default hostname)POLL_INTERVAL_MS(default 30000)
See examples/claudemb-launchd.plist and examples/claudemb-daemon.sh for a working macOS setup.
Initial release: IntentClient + IAK/Desktop/OpenClaw adapters, 2-level derived state.
examples/iak-integration.jswould silently exit once the DesktopAdapter's internalsetIntervalwas unref'd, making it useless as a long-running daemon. Added a referenced keep-alive and clarified the comment.
- README: new "Running as a daemon" section documenting
npx uik-daemonand the launchd+tmux deployment pattern. Notes the example file is a one-shot demo;uik-daemonis the supported long-running path.
uik-daemonpublished the agent status only once at startup, so the agent slot went stale after its TTL while the device slot stayed fresh from the DesktopAdapter heartbeat. The daemon now re-publishes agent status on the samePOLL_INTERVAL_MScadence as the desktop adapter. Caught while dogfooding on the Mac mini.