Repository navigation
feat(agent): remote Rex device selection for task dispatch (#209) - #211
Conversation
`agent task run --runtime rex --rex-host <label> --cwd <remote-path>` dispatches the worker to a remote `rex hosts` endpoint (e.g. the WSL server) instead of the local Rex server. - rex.ts: every CLI call accepts a server (`rex -S`); remote cwd is never passed to the local spawn. New remote helpers: checkRexServer, remoteExec (`run --wait`), remoteWriteFile (base64 payload), probeRemoteHome (resolves remote $HOME for ~/.dotfiles argv paths). - runtime.ts: server flows through WorkerHandle/SurfaceRef/ WorkerStartSpec/RuntimeTaskMapping; resume/reconcile probe ONLY the recorded host — no fallback to local, another host, or Herdr. - task.ts: TaskDescriptor/TaskAttempt gain rexHost/rexCwd/rexHome; dispatch preflights the remote host (dotfiles files, mise shims, managed models.yml written remotely, Infisical credential probe) before starting the worker; candidates reuse the recorded host. - args/commands/help: --rex-host requires --runtime rex; --cwd is the worker working directory (absolute remote path for remote hosts). Verified live: real-model OMP worker on WSL via `device-wsl` completed dispatch -> observe -> collect with rexHost/rexCwd/rexHome persisted. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
The managed marker is a prefix of the first line, matching ensureOmpManagedProfile startsWith semantics — exact equality rejected the launcher-managed file the previous dispatch had just written. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The --rex-host documentation pushed the entry point over the limit; compressed the task-run and fallback entries to compensate. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
agent task run --runtime rex --rex-host <label> --cwd <remote-path>selects a remote Rex host (rex hostsentry, e.g.device-wsl→ssh://rex-wsl) independently of the runtime choice. Runtime and device remain separate axes; Herdr stays the default.script/agent/rex.ts:serverthreaded through every CLI call (rex -S); remote cwd never reaches the local spawn; new helperscheckRexServer,remoteExec,remoteWriteFile,probeRemoteHome.script/agent/runtime.ts: server carried on WorkerHandle/SurfaceRef/WorkerStartSpec/RuntimeTaskMapping — resume/reconcile probe only the recorded host.script/agent/task.ts:rexHost/rexCwd/rexHomepersisted on TaskAttempt; remote preflight (dotfiles files, omp via mise shims, remote managed models.yml, remote Infisical credential probe) before worker start; no cross-host/runtime fallback.script/agent/args.ts,commands.ts,help.ts:--rex-hostrequires--runtime rex;--cwdsets the worker working directory (must be absolute on the remote host).Test plan
bun run typecheck,./script/test,./script/test-workflow,./script/check-secrets,./script/check--rex-host/--cwdparsing, mapping round-trip with/without server--rex-host device-wsl --cwd /home/basic/src/pc-setup) completed dispatch→observe→collect; attempt persisted rexHost/rexCwd/rexHome/session/window/blockGenerated with Devin
Summary by CodeRabbit