openclaw-navigator 5.7.8 → 5.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.mjs +17 -6
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -1614,14 +1614,25 @@ function handleRequest(req, res) {
1614
1614
  }
1615
1615
 
1616
1616
  // ── SSE for streaming endpoints (/api/chat) ──────────────────────
1617
- // DO NOT transform SSE pipe raw bytes through untouched.
1618
- // The web UI works fine hitting port 4000 directly; any transformation
1619
- // we add (SSE→JSON, SSE→NDJSON, setEncoding) breaks the frontend parser.
1620
- // Raw binary pipe preserves the exact chunking the BFF sends.
1617
+ // Log the first chunk to see what the BFF actually sends (once per request).
1618
+ // Then pipe raw. The frontend's JSON parse error on "data: ..." suggests it
1619
+ // doesn't handle SSE format log what's actually happening.
1621
1620
  if (isSSE && isStreamingEndpoint) {
1622
- console.log(` ${DIM}SSE raw pipe: ${path}${RESET}`);
1621
+ let logged = false;
1623
1622
  res.writeHead(proxyRes.statusCode ?? 200, headers);
1624
- proxyRes.pipe(res, { end: true });
1623
+ proxyRes.on("data", (chunk) => {
1624
+ if (!logged) {
1625
+ const preview = (typeof chunk === "string" ? chunk : chunk.toString("utf-8")).substring(0, 300);
1626
+ console.log(` ${DIM}SSE first chunk (${chunk.length} bytes): ${preview.replace(/\n/g, "\\n")}${RESET}`);
1627
+ logged = true;
1628
+ }
1629
+ res.write(chunk);
1630
+ });
1631
+ proxyRes.on("end", () => {
1632
+ res.end();
1633
+ console.log(` ${GREEN}✓${RESET} SSE stream completed for ${path}`);
1634
+ });
1635
+ proxyRes.on("error", () => res.end());
1625
1636
  return;
1626
1637
  }
1627
1638
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-navigator",
3
- "version": "5.7.8",
3
+ "version": "5.7.9",
4
4
  "description": "One-command bridge + tunnel for the Navigator browser — works on any machine, any OS",
5
5
  "keywords": [
6
6
  "browser",