mirror of
https://github.com/getpaseo/paseo.git
synced 2026-12-01 04:36:26 +00:00
Local agent subprocesses expect an HTTP loopback URL for Paseo's built-in MCP server (/mcp/agents) and terminal activity hooks (/api/terminal-activity). Previously, bootstrap derived both URLs directly from the primary listener, so Unix-socket and named-pipe daemons returned null (silently omitting MCP and terminal activity) and non-loopback TCP listeners handed agents a non-loopback address that fails loopback validation and proxy bypass. In addition, providers spawned under a user's HTTP_PROXY routed local 127.0.0.1 MCP requests through the proxy and failed with HTTP 502 / handshake errors. Introduce a daemon-owned loopback agent endpoint that reuses the primary listener when it is already loopback-reachable TCP and otherwise binds a dedicated 127.0.0.1:0 HTTP server exposing only /mcp/agents and /api/terminal-activity with loopback remote-address, Host-header, and bearer auth checks. Merge 127.0.0.1, localhost, and ::1 into NO_PROXY (and no_proxy when set) in the shared provider launch environment without clobbering user entries.