Files
bot/docs/platforms/mac/remote.md
zeekay acaeda400a Eradicate OpenClaw — resolve merge conflicts and finish the rebrand
Three coordinated things:

1. Resolve the committed upstream/main merge conflicts. 94 files were
   sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
   conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
   by keeping HEAD everywhere — 540 conflict blocks.

2. Rewrite remaining OpenClaw text refs.
     OPENCLAW   → HANZO_BOT
     OpenClaw   → HanzoBot          (PascalCase type identifiers)
     openclaw   → bot               (codebase convention — botToken,
                                    botUsername etc.; avoids invalid
                                    hyphenated JS identifiers)
     openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z]   (compound)
     ai.openclaw.x → ai.hanzo.bot.x  (JVM package path)

3. Delete or rename openclaw-named file paths (116 of them). Dead
   duplicates with a Bot-named canonical from the partial migration:
   deleted. Otherwise renamed.
     ai/openclaw/**           → deleted (ai/hanzo/bot/** canonical)
     Sources/OpenClaw*/       → deleted (Sources/Bot* canonical)
     Tests/OpenClawIPCTests/  → deleted (Tests/BotIPCTests canonical)
     OpenClawKit/             → deleted (BotKit canonical)
     openclaw-tools.*.ts      → deleted (bot-tools.*.ts canonical)
     openclaw-root.ts etc.    → deleted (bot-root.ts canonical)
     types.openclaw.ts        → deleted (types.bot.ts canonical)
     extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
     docs/start/openclaw.md   → renamed hanzo-bot.md (+ zh-CN)
     docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
     scripts/.../openclaw-*   → deleted (bot/hanzo-bot parallels)
     openclaw.mjs             → deleted (hanzo-bot.mjs is package.bin)

Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).

Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.

The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.

Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
2026-05-11 17:56:29 -07:00

4.8 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
macOS app flow for controlling a remote HanzoBot gateway over SSH
Setting up or debugging remote mac control
Remote Control

Remote HanzoBot (macOS ⇄ remote host)

This flow lets the macOS app act as a full remote control for a HanzoBot gateway running on another host (desktop/server). It’s the app’s Remote over SSH (remote run) feature. All features—health checks, Voice Wake forwarding, and Web Chat—reuse the same remote SSH configuration from Settings → General.

Modes

  • Local (this Mac): Everything runs on the laptop. No SSH involved.
  • Remote over SSH (default): HanzoBot commands are executed on the remote host. The mac app opens an SSH connection with -o BatchMode plus your chosen identity/key and a local port-forward.
  • Remote direct (ws/wss): No SSH tunnel. The mac app connects to the gateway URL directly (for example, via Tailscale Serve or a public HTTPS reverse proxy).

Remote transports

Remote mode supports two transports:

  • SSH tunnel (default): Uses ssh -N -L ... to forward the gateway port to localhost. The gateway will see the node’s IP as 127.0.0.1 because the tunnel is loopback.
  • Direct (ws/wss): Connects straight to the gateway URL. The gateway sees the real client IP.

Prereqs on the remote host

  1. Install Node + pnpm and build/install the HanzoBot CLI (pnpm install && pnpm build && pnpm link --global).
  2. Ensure hanzo-bot is on PATH for non-interactive shells (symlink into /usr/local/bin or /opt/homebrew/bin if needed).
  3. Open SSH with key auth. We recommend Tailscale IPs for stable reachability off-LAN.

macOS app setup

  1. Open Settings → General.
  2. Under HanzoBot runs, pick Remote over SSH and set:
    • Transport: SSH tunnel or Direct (ws/wss).
    • SSH target: user@host (optional :port).
      • If the gateway is on the same LAN and advertises Bonjour, pick it from the discovered list to auto-fill this field.
    • Gateway URL (Direct only): wss://gateway.example.ts.net (or ws://... for local/LAN).
    • Identity file (advanced): path to your key.
    • Project root (advanced): remote checkout path used for commands.
    • CLI path (advanced): optional path to a runnable hanzo-bot entrypoint/binary (auto-filled when advertised).
  3. Hit Test remote. Success indicates the remote hanzo-bot status --json runs correctly. Failures usually mean PATH/CLI issues; exit 127 means the CLI isn’t found remotely.
  4. Health checks and Web Chat will now run through this SSH tunnel automatically.

Web Chat

  • SSH tunnel: Web Chat connects to the gateway over the forwarded WebSocket control port (default 18789).
  • Direct (ws/wss): Web Chat connects straight to the configured gateway URL.
  • There is no separate WebChat HTTP server anymore.

Permissions

  • The remote host needs the same TCC approvals as local (Automation, Accessibility, Screen Recording, Microphone, Speech Recognition, Notifications). Run onboarding on that machine to grant them once.
  • Nodes advertise their permission state via node.list / node.describe so agents know what’s available.

Security notes

  • Prefer loopback binds on the remote host and connect via SSH or Tailscale.
  • SSH tunneling uses strict host-key checking; trust the host key first so it exists in ~/.ssh/known_hosts.
  • If you bind the Gateway to a non-loopback interface, require token/password auth.
  • See Security and Tailscale.

WhatsApp login flow (remote)

  • Run hanzo-bot channels login --verbose on the remote host. Scan the QR with WhatsApp on your phone.
  • Re-run login on that host if auth expires. Health check will surface link problems.

Troubleshooting

  • exit 127 / not found: hanzo-bot isn’t on PATH for non-login shells. Add it to /etc/paths, your shell rc, or symlink into /usr/local/bin//opt/homebrew/bin.
  • Health probe failed: check SSH reachability, PATH, and that Baileys is logged in (hanzo-bot status --json).
  • Web Chat stuck: confirm the gateway is running on the remote host and the forwarded port matches the gateway WS port; the UI requires a healthy WS connection.
  • Node IP shows 127.0.0.1: expected with the SSH tunnel. Switch Transport to Direct (ws/wss) if you want the gateway to see the real client IP.
  • Voice Wake: trigger phrases are forwarded automatically in remote mode; no separate forwarder is needed.

Notification sounds

Pick sounds per notification from scripts with hanzo-bot and node.invoke, e.g.:

hanzo-bot nodes notify --node <id> --title "Ping" --body "Remote gateway ready" --sound Glass

There is no global “default sound” toggle in the app anymore; callers choose a sound (or none) per request.