openclaw-navigator 4.3.7 → 4.3.8

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 (3) hide show
  1. package/cli.mjs +8 -0
  2. package/mcp.mjs +25 -1
  3. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -58,6 +58,9 @@ const validTokens = new Set();
58
58
  // OC Web UI reverse proxy target (configurable via --ui-port or env)
59
59
  let ocUIPort = parseInt(process.env.OPENCLAW_UI_PORT ?? "4000", 10);
60
60
 
61
+ // Tunnel URL — set once the tunnel is active, exposed via /navigator/status
62
+ let activeTunnelURL = null;
63
+
61
64
  // Pairing code state
62
65
  let pairingCode = null;
63
66
  let pairingData = null;
@@ -217,6 +220,10 @@ function handleRequest(req, res) {
217
220
  pendingCommandCount: pendingCommands.length,
218
221
  recentEventCount: recentEvents.length,
219
222
  },
223
+ tunnel: activeTunnelURL ? {
224
+ url: activeTunnelURL,
225
+ uiURL: `${activeTunnelURL}/ui/`,
226
+ } : null,
220
227
  });
221
228
  return;
222
229
  }
@@ -670,6 +677,7 @@ ${BOLD}How it works:${RESET}
670
677
 
671
678
  if (result) {
672
679
  tunnelURL = result.url;
680
+ activeTunnelURL = tunnelURL; // Expose via /navigator/status
673
681
  tunnelProcess = result.process;
674
682
  gatewayURL = tunnelURL; // Use tunnel URL as the gateway URL
675
683
 
package/mcp.mjs CHANGED
@@ -156,7 +156,13 @@ const TOOLS = [
156
156
  {
157
157
  name: "navigator_status",
158
158
  description:
159
- "Get the Navigator bridge status — connection state, active tabs, current URL, uptime, pending commands.",
159
+ "Get the Navigator bridge status — connection state, active tabs, current URL, uptime, pending commands. Also returns the tunnel URL and OC Web UI URL.",
160
+ inputSchema: { type: "object", properties: {} },
161
+ },
162
+ {
163
+ name: "navigator_get_ui_url",
164
+ description:
165
+ "Get the OC Web UI URL. Returns the Cloudflare tunnel URL with /ui/ path that serves the OpenClaw dashboard. Use this to find the URL before navigating to the UI.",
160
166
  inputSchema: { type: "object", properties: {} },
161
167
  },
162
168
 
@@ -356,6 +362,24 @@ async function handleTool(name, args) {
356
362
  case "navigator_status":
357
363
  return jsonResult(await bridgeGet("/navigator/status"));
358
364
 
365
+ case "navigator_get_ui_url": {
366
+ const status = await bridgeGet("/navigator/status");
367
+ if (status.tunnel?.uiURL) {
368
+ return jsonResult({
369
+ ok: true,
370
+ uiURL: status.tunnel.uiURL,
371
+ tunnelURL: status.tunnel.url,
372
+ hint: "Navigate to uiURL to access the OC Web UI dashboard",
373
+ });
374
+ }
375
+ return jsonResult({
376
+ ok: true,
377
+ uiURL: `${BRIDGE_URL}/ui/`,
378
+ tunnelURL: null,
379
+ hint: "No tunnel active — UI accessible locally only. Start with --mcp to enable tunnel.",
380
+ });
381
+ }
382
+
359
383
  // ── Fire-and-forget ──
360
384
  case "navigator_navigate":
361
385
  return jsonResult(await sendCommand("navigate", { url: args.url }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-navigator",
3
- "version": "4.3.7",
3
+ "version": "4.3.8",
4
4
  "description": "One-command bridge + tunnel for the Navigator browser — works on any machine, any OS",
5
5
  "keywords": [
6
6
  "browser",