Revert d83d4e032f to keep the current weekly release on its established baseline. The sidecar convergence work and QA acceptance remain valid and will be relanded after the release window closes.
When the web sidecar starts without OD_PORT, createDaemonProxyHandler
handed /api, /artifacts and /frames to the Next.js fallback, whose
catch-all answers every path with 200 text/html. Browser callers parsed
the shell as JSON and crashed with "Unexpected token '<'", and agent
detection quietly came back empty (#6074).
Daemon-routed pathnames now get the same plain-text ECONNREFUSED 502 the
proxy already synthesizes for a dead daemon, so
isDaemonProxyConnectionFailure recognizes the outage; non-daemon paths
keep falling through unchanged.
* test(collab): red specs for the packaged-client presence/proxy 502 storm
Encode the three client-side halves of the 502 storm as failing specs on
main before any fix:
- web: a persistently failing presence upstream is heartbeated every 10s
forever (62 POSTs in 10 minutes) with no backoff.
- daemon: every vela CLI presence failure is flattened into a 502 whose
message embeds the spawned command line; upstream 403/404 rejections are
indistinguishable from infra outages, every beat re-spawns the CLI, and
presence spawns carry no timeout.
- web sidecar: an idempotent /api request that dies with a connection reset
on a reused pooled daemon socket surfaces as a synthesized 502 instead of
being replayed once on a fresh connection.
createDaemonProxyHandler is exported as the proxy spec's seam.
* fix(collab): stop the packaged-client presence/proxy 502 storm
Three client-side halves of one incident (hours of ~2050 DevTools errors:
POST /presence/heartbeat and PUT /workspace/billing/interests 502ing every
few seconds while the collab upstream rejected one project):
- web CollabClient: presence heartbeats move from a fixed 10s interval to a
self-scheduling chain with exponential backoff on consecutive failures
(10s -> 20s -> 40s -> ... capped at 5min, +/-10% jitter). One success or a
new presence identity restores the base cadence, so recovery is untouched.
- daemon presence routes: vela CLI failures are classified via the CLI's
'API request failed with status NNN' output. Upstream 401/403 relay as
403, 404 as 404, timeouts as 503; only genuine infrastructure failures
keep 502. Response bodies no longer embed the spawned command line or
stderr (daemon log keeps the full detail). Repeated consecutive failures
for one project open a 20s negative cache that answers without spawning
another CLI process, and presence spawns now carry a 10s timeoutMs so a
wedged CLI cannot pile up children.
- web sidecar proxy: proxied requests use an explicit keep-alive agent whose
pooled idle sockets die well before the daemon's 120s keep-alive window,
and an idempotent request with a small fully-buffered body that fails with
ECONNRESET/EPIPE on a reused pooled socket before any response bytes is
replayed once on a fresh connection instead of surfacing a synthesized 502
the daemon never sent. Non-idempotent methods and large bodies keep the
streaming path and are never replayed.
Fix web sidecar proxy requests so same-origin browser requests reach the daemon without tripping origin validation, while unrelated origins remain rejected. Fixes#388.
* feat(tools-dev): add --prod flag and OD_HOST for headless server deployment
- Lazy-load electronBinaryPath so daemon+web can start without Electron
- Add --prod flag to tools-dev start/run that sets NODE_ENV, OD_WEB_PROD,
and OD_WEB_OUTPUT_MODE automatically for production Next.js builds
- Add OD_HOST env var support to daemon and web sidecar bind addresses
(defaults to 127.0.0.1, set to 0.0.0.0 for remote access)
- Skip next.config.ts distDir override when OD_WEB_PROD=1 so production
builds resolve the default .next directory
Closes#221
* fix: address PR review — hardcode daemon bind to 127.0.0.1, cache electron path
- Revert OD_HOST from daemon: daemon is a local privileged process and must
only bind 127.0.0.1. Remote access goes through the web sidecar proxy.
- Web sidecar resolveDaemonOrigin now always uses 127.0.0.1, separated from
the web bind address (OD_HOST) so the daemon proxy works correctly even
when the web listener binds 0.0.0.0.
- Add OD_HOST character validation to reject clearly invalid values early.
- Cache electronBinaryPath getter result to avoid repeated require() calls.
---------
Co-authored-by: yamsfeer <yamsfeer@users.noreply.github.com>
* feat(dev): add desktop tools-dev control plane
* refactor(sidecar): split Open Design contracts
Move Open Design-specific sidecar protocol definitions into @open-design/contracts so sidecar and platform can remain descriptor-driven primitives.
* refactor(daemon): organize package sources
Keep daemon app code, tests, and sidecar entrypoints in separate package directories so each layer can be built and verified independently.
* chore(repo): streamline maintenance entrypoints
Centralize agent guidance by directory and reduce root command chains while preserving the existing build scope.
* docs: translate agent guidance to English
* fix(sidecar): tolerate stale IPC sockets
Remove stale Unix socket files only after confirming no listener is active, so tools-dev can restart after unclean shutdowns.