fix: restore gateway port wait and batch openclaw setup into fewer SSH sessions (#1820)

The previous refactor (b43d3f1) deleted the gateway port wait entirely,
causing the TUI to launch before the gateway was listening on port 18789.

Changes:
- startGateway() now starts the daemon AND polls port 18789 in the same
  SSH session (up to 60s), using /dev/tcp with nc fallback.
- New setupOpenclawBatched() combines install verification + env var
  setup + openclaw config into a single SSH session (was 6 separate
  SSH calls, now 2 total for the whole openclaw flow).
- New optional `setup` hook on AgentConfig lets agents opt into the
  batched path; other agents are unaffected.

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
A 2026-02-23 15:46:19 -08:00 committed by GitHub
parent f97079a35d
commit a4e805d83b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 114 additions and 37 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.8.1",
"version": "0.8.2",
"type": "module",
"bin": {
"spawn": "cli.js"