Skip to content

feat: support connecting to a remote OpenClaw gateway#7823

Closed
webxl wants to merge 7 commits intojanhq:mainfrom
webxl:feat/remote-openclaw
Closed

feat: support connecting to a remote OpenClaw gateway#7823
webxl wants to merge 7 commits intojanhq:mainfrom
webxl:feat/remote-openclaw

Conversation

@webxl
Copy link
Copy Markdown

@webxl webxl commented Mar 26, 2026

Summary

  • Adds ability to connect to a remote OpenClaw gateway instead of only localhost
  • Extends health checks and commands to support remote gateway connections
  • Updates the remote access settings UI with gateway configuration options

Depends on: #7822 (merge that first — this branch builds on it)

Test Plan

  • Configure a remote OpenClaw gateway URL in settings and verify connection
  • Verify local OpenClaw still works when no remote gateway is configured
  • Check settings UI shows gateway configuration options

🤖 Generated with Claude Code

webxl and others added 7 commits March 19, 2026 09:50
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tauri's build.rs sets cfg(dev) = !has_feature("custom-protocol").
Including tauri/custom-protocol in the feature list caused cfg(dev)
to be false, making the binary serve from frontendDist (empty stub)
instead of the Vite dev server at localhost:1420.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add openclaw_is_available Tauri command (always registered, returns
cfg!(feature = "openclaw")) so the frontend can detect at runtime
whether the feature was compiled in.

On startup, NavMain checks feature availability and stores it in app
state. SettingsMenu conditionally renders the OpenClaw integration
link based on that flag.

Also remove the misleading "Couldn't start Remote Access" toast from
fetchStatus — a thrown IPC call means the feature isn't compiled in,
not a user-actionable error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a "Gateway Mode" selector (Embedded / Remote) to the Remote Access
settings.  In Remote mode Jan skips all local lifecycle management
(start/stop/install) and routes agent-mode chat traffic to a
user-provided URL + token instead.

Backend:
- New types JanGatewayMode & JanGatewaySettings (models.rs)
- gateway_settings field on OpenClawState, loaded from Tauri Store
- 3 new commands: get/set gateway settings, validate remote gateway
- openclaw_start/stop are no-ops in remote mode
- openclaw_status/check_gateway probe the remote URL in remote mode
- Health monitor skips auto-restart in remote mode

Frontend:
- getOpenClawGatewayUrl() resolves local or remote URL
- ensureOpenClawHttpApi() skips in remote mode
- custom-chat-transport uses async gateway URL
- Settings UI shows URL/token inputs + test connection in remote mode
- i18n keys for gateway mode labels and messages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Vanalite
Copy link
Copy Markdown
Contributor

Commented here #7822 (comment)

@Vanalite Vanalite closed this Mar 26, 2026
@github-project-automation github-project-automation Bot moved this to Done in Jan Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants