feat: configurable control ui base path
This commit is contained in:
@@ -645,13 +645,18 @@ Defaults:
|
||||
mode: "local", // or "remote"
|
||||
port: 18789, // WS + HTTP multiplex
|
||||
bind: "loopback",
|
||||
// controlUi: { enabled: true }
|
||||
// controlUi: { enabled: true, basePath: "/clawdis" }
|
||||
// auth: { mode: "token", token: "your-token" } // token is for multi-machine CLI access
|
||||
// tailscale: { mode: "off" | "serve" | "funnel" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Control UI base path:
|
||||
- `gateway.controlUi.basePath` sets the URL prefix where the Control UI is served.
|
||||
- Examples: `"/ui"`, `"/clawdis"`, `"/apps/clawdis"`.
|
||||
- Default: root (`/`) (unchanged).
|
||||
|
||||
Notes:
|
||||
- `clawdis gateway` refuses to start unless `gateway.mode` is set to `local` (or you pass the override flag).
|
||||
- `gateway.port` controls the single multiplexed port used for WebSocket + HTTP (control UI, hooks, A2UI).
|
||||
|
||||
@@ -6,9 +6,10 @@ read_when:
|
||||
---
|
||||
# Control UI (browser)
|
||||
|
||||
The Control UI is a small **Vite + Lit** single-page app served by the Gateway under:
|
||||
The Control UI is a small **Vite + Lit** single-page app served by the Gateway:
|
||||
|
||||
- `http://<host>:18789/`
|
||||
- default: `http://<host>:18789/`
|
||||
- optional prefix: set `gateway.controlUi.basePath` (e.g. `/clawdis`)
|
||||
|
||||
It speaks **directly to the Gateway WebSocket** on the same port.
|
||||
|
||||
@@ -40,7 +41,7 @@ clawdis gateway --tailscale serve
|
||||
```
|
||||
|
||||
Open:
|
||||
- `https://<magicdns>/ui/`
|
||||
- `https://<magicdns>/` (or your configured `gateway.controlUi.basePath`)
|
||||
|
||||
By default, the gateway trusts Tailscale identity headers in serve mode. You can still set
|
||||
`CLAWDIS_GATEWAY_TOKEN` or `gateway.auth` if you want a shared secret instead.
|
||||
@@ -52,7 +53,7 @@ clawdis gateway --bind tailnet --token "$(openssl rand -hex 32)"
|
||||
```
|
||||
|
||||
Then open:
|
||||
- `http://<tailscale-ip>:18789/ui/`
|
||||
- `http://<tailscale-ip>:18789/` (or your configured `gateway.controlUi.basePath`)
|
||||
|
||||
Paste the token into the UI settings (sent as `connect.params.auth.token`).
|
||||
|
||||
@@ -65,6 +66,12 @@ pnpm ui:install
|
||||
pnpm ui:build
|
||||
```
|
||||
|
||||
Optional absolute base (when you want fixed asset URLs):
|
||||
|
||||
```bash
|
||||
CLAWDIS_CONTROL_UI_BASE_PATH=/clawdis/ pnpm ui:build
|
||||
```
|
||||
|
||||
For local development (separate dev server):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -5,7 +5,8 @@ read_when:
|
||||
---
|
||||
# Dashboard (Control UI)
|
||||
|
||||
The Gateway dashboard is the browser Control UI served at `/ui/`.
|
||||
The Gateway dashboard is the browser Control UI served at `/` by default
|
||||
(override with `gateway.controlUi.basePath`).
|
||||
|
||||
Key references:
|
||||
- `docs/control-ui.md` for usage and UI capabilities.
|
||||
|
||||
@@ -40,7 +40,7 @@ default unless you force `gateway.auth.mode` to `password` or set
|
||||
}
|
||||
```
|
||||
|
||||
Open: `https://<magicdns>/ui/`
|
||||
Open: `https://<magicdns>/` (or your configured `gateway.controlUi.basePath`)
|
||||
|
||||
### Public internet (Funnel + shared password)
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ read_when:
|
||||
|
||||
The Gateway serves a small **browser Control UI** (Vite + Lit) from the same port as the Gateway WebSocket:
|
||||
|
||||
- `http://<host>:18789/ui/`
|
||||
- default: `http://<host>:18789/`
|
||||
- optional prefix: set `gateway.controlUi.basePath` (e.g. `/clawdis`)
|
||||
|
||||
The UI talks directly to the Gateway WS and supports:
|
||||
- Chat (`chat.history`, `chat.send`, `chat.abort`)
|
||||
@@ -34,7 +35,7 @@ You can control it via config:
|
||||
```json5
|
||||
{
|
||||
gateway: {
|
||||
controlUi: { enabled: true } // set false to disable /ui/
|
||||
controlUi: { enabled: true, basePath: "/clawdis" } // basePath optional
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -61,7 +62,7 @@ clawdis gateway
|
||||
```
|
||||
|
||||
Open:
|
||||
- `https://<magicdns>/ui/`
|
||||
- `https://<magicdns>/` (or your configured `gateway.controlUi.basePath`)
|
||||
|
||||
### Tailnet bind + token (legacy)
|
||||
|
||||
@@ -82,7 +83,7 @@ clawdis gateway
|
||||
```
|
||||
|
||||
Open:
|
||||
- `http://<tailscale-ip>:18789/ui/`
|
||||
- `http://<tailscale-ip>:18789/` (or your configured `gateway.controlUi.basePath`)
|
||||
|
||||
### Public internet (Funnel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user