openclaw-navigator 5.3.2 → 5.3.3

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 +12 -8
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * openclaw-navigator v5.3.2
4
+ * openclaw-navigator v5.3.3
5
5
  *
6
6
  * One-command bridge + tunnel for the Navigator browser.
7
7
  * Starts a local bridge, creates a Cloudflare tunnel automatically,
@@ -394,7 +394,8 @@ function handleRequest(req, res) {
394
394
  },
395
395
  routing: {
396
396
  "/ui/*": `localhost:${ocUIPort}`,
397
- "/api/*": `localhost:${ocGatewayPort}`,
397
+ "/api/sessions/*": `localhost:${ocGatewayPort}`,
398
+ "/api/* (other)": `localhost:${ocUIPort} (web UI fallback)`,
398
399
  "/ws": `localhost:${ocGatewayPort} (WebSocket proxy)`,
399
400
  },
400
401
  tunnel: activeTunnelURL
@@ -889,9 +890,11 @@ function handleRequest(req, res) {
889
890
  return;
890
891
  }
891
892
 
892
- // ── Reverse proxy: /api/* → OC Gateway (localhost:ocGatewayPort) ─────
893
- // Keeps /api/ prefix intact all API calls including chat go to the gateway.
894
- if (path.startsWith("/api/")) {
893
+ // ── Reverse proxy: /api/sessions/* → OC Gateway (localhost:ocGatewayPort) ──
894
+ // ONLY proxy known OC gateway paths /api/sessions/* (chat/agent endpoints).
895
+ // Other /api/* paths (e.g. /api/auth/* from NextAuth) fall through to the
896
+ // web UI fallback so login and other web UI API routes work correctly.
897
+ if (path.startsWith("/api/sessions/") || path === "/api/sessions") {
895
898
  const targetURL = `${path}${url.search}`;
896
899
 
897
900
  const proxyOpts = {
@@ -1147,8 +1150,9 @@ ${BOLD}Stability (recommended for production):${RESET}
1147
1150
  --tunnel-hostname <host> Hostname for named tunnel (e.g. nav.yourdomain.com)
1148
1151
 
1149
1152
  ${BOLD}Routing (through Cloudflare tunnel):${RESET}
1150
- /ui/* → localhost:<ui-port> Web UI (proxied to OC gateway's UI server)
1151
- /api/* → localhost:<gateway-port> OC gateway API (chat, sessions, etc.)
1153
+ /ui/* → localhost:<ui-port> Web UI (Next.js on port 4000)
1154
+ /api/sessions/* → localhost:<gateway-port> OC gateway chat/agent API
1155
+ /api/* (other) → localhost:<ui-port> Web UI API routes (auth, etc.)
1152
1156
  /ws, WebSocket → localhost:<gateway-port> WebSocket proxy to OC gateway
1153
1157
  /health → bridge itself Health check
1154
1158
  /navigator/* → bridge itself Navigator control endpoints
@@ -1511,7 +1515,7 @@ module.exports = {
1511
1515
  const uiURL = tunnelURL ? `${tunnelURL}/ui/` : `http://localhost:${port}/ui/`;
1512
1516
  console.log(` ${BOLD}OC Web UI:${RESET} ${CYAN}${uiURL}${RESET}`);
1513
1517
  info(` /ui/* → localhost:${ocUIPort} (web UI proxy)`);
1514
- info(` /api/* → localhost:${ocGatewayPort} (OC gateway)`);
1518
+ info(` /api/sessions/* → localhost:${ocGatewayPort} (OC gateway)`);
1515
1519
  info(` /ws → localhost:${ocGatewayPort} (WebSocket proxy)`);
1516
1520
 
1517
1521
  // ── Startup health checks ──────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-navigator",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "description": "One-command bridge + tunnel for the Navigator browser — works on any machine, any OS",
5
5
  "keywords": [
6
6
  "browser",