Skip to content

Commit ad559d1

Browse files
committed
fix(gateway): embedded Control UI 500 — set dangerouslyDisableDeviceAuth for OpenClaw 2026.3.x
- Migrate local gateways to allowInsecureAuth + dangerouslyDisableDeviceAuth (override false) - Wizard seeds both flags; extend GatewayControlUiConfig type - Release shell 0.6.1+openclaw.2026.3.31, docs + CHANGELOG Made-with: Cursor
1 parent ed1f36a commit ad559d1

11 files changed

Lines changed: 50 additions & 28 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
tag:
10-
description: '要发布的 Git 标签(须已存在),例如 v0.6.0。必填:工作流会检出该标签再构建,勿留空(留空会误用当前分支导致安装包混拼 / Control UI 黑屏)。'
10+
description: '要发布的 Git 标签(须已存在),例如 v0.6.1。必填:工作流会检出该标签再构建,勿留空(留空会误用当前分支导致安装包混拼 / Control UI 黑屏)。'
1111
required: true
1212
type: string
1313

@@ -40,7 +40,7 @@ jobs:
4040
if: github.event_name == 'workflow_dispatch'
4141
run: |
4242
if [ -z "${{ github.event.inputs.tag }}" ]; then
43-
echo "::error::手动发布时必须在输入框填写 tag(与 Git 标签一致,例如 v0.6.0)。否则会按当前分支打包,极易与 Release 标签错配并导致安装包内 OpenClaw / Control UI 混拼。"
43+
echo "::error::手动发布时必须在输入框填写 tag(与 Git 标签一致,例如 v0.6.1)。否则会按当前分支打包,极易与 Release 标签错配并导致安装包内 OpenClaw / Control UI 混拼。"
4444
exit 1
4545
fi
4646

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to OpenClaw Desktop will be documented in this file.
44

55
## [Unreleased]
66

7+
## [0.6.1] - 2026-04-01
8+
9+
### Fixed
10+
11+
- **主界面 / Control UI:** 上游 OpenClaw **2026.3.x** 对 Control UI 的 **device identity** 与环回认证更严格,Electron 内嵌 iframe 下仅设置 `gateway.controlUi.allowInsecureAuth` 仍可能出现 **HTTP 500 Internal Server Error** 或 WebSocket 握手失败。现对**非 remote** 网关自动写入 **`allowInsecureAuth: true`****`dangerouslyDisableDeviceAuth: true`**(并覆盖用户误设的 `false`),与向导新建配置一致(`openclaw-config.ts``setup-handler.ts`)。详见上游相关讨论(如 device-identity / Control UI HTTP 问题)。
12+
713
## [0.6.0] - 2026-04-01
814

915
### Fixed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pnpm run package:win
7272
- Release assets are published through GitHub Actions.
7373
- The primary downloadable asset is `OpenClaw-Setup-<version>.exe`.
7474
- For the first public versions, unsigned Windows builds may trigger SmartScreen warnings.
75-
- **Bundled OpenClaw** version is stored in `resources/bundle-manifest.json` as `bundledOpenClawVersion` (updated by `pnpm run prepare-bundle` from `build/openclaw`). The pin lives in root `package.json` as `openclawBundleVersion`. Desktop **v0.6.0** ships OpenClaw **2026.3.31** alongside shell semver `0.6.0+openclaw.2026.3.31`.
75+
- **Bundled OpenClaw** version is stored in `resources/bundle-manifest.json` as `bundledOpenClawVersion` (updated by `pnpm run prepare-bundle` from `build/openclaw`). The pin lives in root `package.json` as `openclawBundleVersion`. Desktop **v0.6.1** ships OpenClaw **2026.3.31** alongside shell semver `0.6.1+openclaw.2026.3.31`.
7676

7777
## License
7878

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ If you've been searching for *how to install OpenClaw on Windows*, *how to run O
4848
## Quick Start
4949

5050
1. Download the latest installer from [Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest)
51-
2. Run the Windows setup (filename follows `package.json`, e.g. `OpenClaw-Setup-0.6.0+openclaw.2026.3.31.exe`)
51+
2. Run the Windows setup (filename follows `package.json`, e.g. `OpenClaw-Setup-0.6.1+openclaw.2026.3.31.exe`)
5252
3. Finish the setup wizard (provider → channel → gateway)
5353
4. Launch from Start Menu or Desktop shortcut
5454

5555
**System:** Windows 10/11 x64 · ~350 MB free space · Internet for API calls
5656

57-
## OpenClaw Desktop v0.6.0
57+
## OpenClaw Desktop v0.6.1
5858

59-
- **Shell version:** `0.6.0+openclaw.2026.3.31` (semver + bundled OpenClaw pin in build metadata).
59+
- **Shell version:** `0.6.1+openclaw.2026.3.31` (semver + bundled OpenClaw pin in build metadata).
6060
- **Bundled OpenClaw (npm):** **2026.3.31** — same runtime as `npm install openclaw@2026.3.31` (current npm `latest`); pinned in [`package.json`](package.json) as `openclawBundleVersion`.
61-
- **Desktop highlights (recent train):** **v0.6.0** fixes Control UI build leaving a stub `package.json` in the bundle and `prepare-bundle` skipping copy when the version marker matched — see [CHANGELOG **0.6.0**](CHANGELOG.md). Feishu `registerFull` guard covers `dist/extensions/feishu/index.js`; MiniMax wizard **M2.7-only**; Control UI from GitHub tag sources for Electron.
61+
- **Desktop highlights (recent train):** **v0.6.1** fixes embedded Control UI **500 / device-identity** failures with OpenClaw 2026.3.x by persisting `gateway.controlUi.dangerouslyDisableDeviceAuth` (see [CHANGELOG **0.6.1**](CHANGELOG.md)). **v0.6.0** fixed stub `package.json` / `prepare-bundle` resync ([**0.6.0**](CHANGELOG.md)). Feishu `registerFull` guard; MiniMax **M2.7-only**; Control UI from GitHub tag sources for Electron.
6262

6363
### Upstream OpenClaw 2026.3.31 (summary)
6464

@@ -94,6 +94,7 @@ Each release **pins** the bundled OpenClaw npm version in root [`package.json`](
9494
- **Runtime:** Bundled portable Node.js **22.16.0** (`pnpm run download-node`), matching upstream `openclaw.mjs` / `engines` (**Node ≥ 22.16**).
9595
- **State & config:** Same as upstream: `%USERPROFILE%\.openclaw`, main config `openclaw.json`. Use **`OPENCLAW_*`** env vars (`CLAWDBOT_*` / `MOLTBOT_*`, `.moltbot`, etc. were removed upstream).
9696
- **Control UI:** The npm package does not ship `dist/control-ui/`; we fetch GitHub tag **`v<version>`** sources (`ui/` plus repo-root `src/`, etc.) and run Vite. CI builds static assets on Linux and merges them into the Windows installer.
97+
- **Embedded console auth:** For **local** gateways (not `remote`), the shell auto-maintains `gateway.controlUi.allowInsecureAuth` and `dangerouslyDisableDeviceAuth` in `openclaw.json` so OpenClaw **2026.3.x** Control UI works inside the Electron iframe (see [CHANGELOG 0.6.1](CHANGELOG.md)). If you switch to remote gateway or hand-edit these keys, follow upstream docs.
9798
- **Bundled plugin list:** Upstream ships built-in channel/provider plugins under **`dist/extensions/*`**; the desktop shell scans that path and still falls back to legacy top-level `extensions/`.
9899
- **Breaking changes:** Plugin SDK (`openclaw/plugin-sdk/*`), browser/install behavior, and other breaking items are covered in [upstream OpenClaw releases](https://github.com/openclaw/openclaw/releases) and [upstream docs](https://docs.openclaw.ai/) for the version you ship. Installer-only users usually need no action; **custom/third-party plugin** authors should follow upstream migration guides.
99100

@@ -131,8 +132,8 @@ OpenClaw Desktop is a **community-maintained Windows distribution** for the Open
131132

132133
| | |
133134
|---|---|
134-
| **Release** | `v0.6.0` (shell `0.6.0+openclaw.2026.3.31`) |
135-
| **Installer** | `OpenClaw-Setup-0.6.0+openclaw.2026.3.31.exe` (see [Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest) for exact asset) |
135+
| **Release** | `v0.6.1` (shell `0.6.1+openclaw.2026.3.31`) |
136+
| **Installer** | `OpenClaw-Setup-0.6.1+openclaw.2026.3.31.exe` (see [Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest) for exact asset) |
136137
| **Platform** | Windows 10/11 x64 |
137138
| **Includes** | Electron shell, portable Node.js, bundled OpenClaw |
138139
| **Extras** | SHA-256 checksum, `latest.yml` for in-app updates |
@@ -213,7 +214,7 @@ pnpm run prepare-bundle
213214
pnpm run package:win # Output: dist/OpenClaw-Setup-<version>.exe
214215
```
215216

216-
**Bundled OpenClaw:** Pinned in `package.json` (`openclawBundleVersion`). After `prepare-bundle`, see `bundledOpenClawVersion` in [`resources/bundle-manifest.json`](resources/bundle-manifest.json) (currently **2026.3.31** for desktop **v0.6.0**). Local checks: `pnpm run check-openclaw-versions` (omit `OPENCLAW_SKIP_NPM_LATEST_CHECK` to also compare against npm `latest`).
217+
**Bundled OpenClaw:** Pinned in `package.json` (`openclawBundleVersion`). After `prepare-bundle`, see `bundledOpenClawVersion` in [`resources/bundle-manifest.json`](resources/bundle-manifest.json) (currently **2026.3.31** for desktop **v0.6.1**). Local checks: `pnpm run check-openclaw-versions` (omit `OPENCLAW_SKIP_NPM_LATEST_CHECK` to also compare against npm `latest`).
217218

218219
**Related docs:** [CHANGELOG.md](CHANGELOG.md) · [CONTRIBUTING.md](CONTRIBUTING.md)
219220

README.zh-CN.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@
4848
## 快速开始
4949

5050
1.[Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest) 下载最新安装包
51-
2. 运行安装程序(文件名与 `package.json` 一致,例如 `OpenClaw-Setup-0.6.0+openclaw.2026.3.31.exe`
51+
2. 运行安装程序(文件名与 `package.json` 一致,例如 `OpenClaw-Setup-0.6.1+openclaw.2026.3.31.exe`
5252
3. 完成设置向导(模型提供商 → 频道 → 网关)
5353
4. 从开始菜单或桌面快捷方式启动
5454

5555
**系统要求:** Windows 10/11 x64 · 约 350 MB 可用空间 · 网络连接(用于 API 调用)
5656

57-
## OpenClaw Desktop v0.6.0
57+
## OpenClaw Desktop v0.6.1
5858

59-
- **Shell 版本:** `0.6.0+openclaw.2026.3.31`(主版本号 + 构建元数据中的捆绑 OpenClaw 版本)。
59+
- **Shell 版本:** `0.6.1+openclaw.2026.3.31`(主版本号 + 构建元数据中的捆绑 OpenClaw 版本)。
6060
- **捆绑 OpenClaw(npm):** **2026.3.31**,与当前 npm `latest``npm install openclaw@2026.3.31`)一致;在根目录 [`package.json`](package.json) 中用 `openclawBundleVersion` 固定。
61-
- **桌面端近期要点:** **v0.6.0** 修复 Control UI 构建后遗留 stub `package.json`、以及 `prepare-bundle` 因版本标记相同跳过复制导致资源不一致的问题,详见 [CHANGELOG **0.6.0**](CHANGELOG.md)飞书 `registerFull` 一次性防护覆盖 `dist/extensions/feishu/index.js`;上游 **2026.3.31** 已改进 `hooks.mappings``feishu` 等;向导 MiniMax **仅 M2.7**;Control UI GitHub 标签源码构建
61+
- **桌面端近期要点:** **v0.6.1** 修复上游 **2026.3.x** 下内嵌 Control UI 出现 **Internal Server Error**(device identity / 环回认证收紧):自动写入 `gateway.controlUi.dangerouslyDisableDeviceAuth` 并与 `allowInsecureAuth` 一并校正,见 [CHANGELOG **0.6.1**](CHANGELOG.md)**v0.6.0** 已修复 stub `package.json``prepare-bundle` 同步问题。飞书 `registerFull` 防护;MiniMax **仅 M2.7**;Control UI GitHub 标签构建
6262

6363
### 上游 OpenClaw 2026.3.31(摘要)
6464

@@ -95,6 +95,7 @@
9595
- **状态与配置**:与上游一致使用 `%USERPROFILE%\.openclaw`、主配置 `openclaw.json`,环境变量请使用 **`OPENCLAW_*`**`CLAWDBOT_*` / `MOLTBOT_*``.moltbot` 等旧名已在上游移除)。
9696
- **Control UI**:npm 包不再附带 `dist/control-ui/`,构建时从 **GitHub 标签 `v<版本号>`** 拉取 `ui/` + 仓库根 `src/` 等源码后执行 Vite;CI 在 Linux 构建静态资源再合并到 Windows 安装包。
9797
- **内置插件列表**:上游将内置频道/提供商插件放在 **`dist/extensions/*`**;壳内扩展扫描已同时支持该路径与旧版顶层 `extensions/`
98+
- **内嵌控制台:** 本地网关下桌面会自动维护 `gateway.controlUi.allowInsecureAuth``dangerouslyDisableDeviceAuth`(非 `remote` 模式),以适配上游 Control UI 认证策略;若你手动改为 `remote` 或自行编辑该段配置,请以 [CHANGELOG 0.6.1](CHANGELOG.md) 与上游文档为准。
9899
- **重大变更说明**:插件 SDK(`openclaw/plugin-sdk/*`)、浏览器/安装行为等 Breaking 变更以 [上游 OpenClaw Releases](https://github.com/openclaw/openclaw/releases)[上游文档](https://docs.openclaw.ai/)**对应版本**为准;仅使用安装包与向导的用户一般无需额外操作,**自研/第三方插件**作者需按上游迁移指引更新。
99100

100101
*英文版同节:[README.md](./README.md)*
@@ -131,8 +132,8 @@ OpenClaw Desktop 是 OpenClaw 生态的**社区维护 Windows 分发版**,属
131132

132133
| | |
133134
|---|---|
134-
| **当前版本** | `v0.6.0`(壳 `0.6.0+openclaw.2026.3.31`|
135-
| **安装包** | `OpenClaw-Setup-0.6.0+openclaw.2026.3.31.exe`(见 [Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest) 实际资产名) |
135+
| **当前版本** | `v0.6.1`(壳 `0.6.1+openclaw.2026.3.31`|
136+
| **安装包** | `OpenClaw-Setup-0.6.1+openclaw.2026.3.31.exe`(见 [Releases](https://github.com/agentkernel/openclaw-desktop/releases/latest) 实际资产名) |
136137
| **适用系统** | Windows 10/11 x64 |
137138
| **包含内容** | Electron 外壳、便携 Node.js、捆绑 OpenClaw |
138139
| **附加产物** | SHA-256 校验文件、`latest.yml`(应用内更新用) |
@@ -213,7 +214,7 @@ pnpm run prepare-bundle
213214
pnpm run package:win # 输出: dist/OpenClaw-Setup-<version>.exe
214215
```
215216

216-
**捆绑 OpenClaw:**`package.json` 中通过 `openclawBundleVersion` 固定;执行 `prepare-bundle` 后查看 [`resources/bundle-manifest.json`](resources/bundle-manifest.json) 中的 `bundledOpenClawVersion`(桌面 **v0.6.0** 当前为 **2026.3.31**)。本地校验:`pnpm run check-openclaw-versions`(不设 `OPENCLAW_SKIP_NPM_LATEST_CHECK` 时还会与 npm `latest` 对比)。
217+
**捆绑 OpenClaw:**`package.json` 中通过 `openclawBundleVersion` 固定;执行 `prepare-bundle` 后查看 [`resources/bundle-manifest.json`](resources/bundle-manifest.json) 中的 `bundledOpenClawVersion`(桌面 **v0.6.1** 当前为 **2026.3.31**)。本地校验:`pnpm run check-openclaw-versions`(不设 `OPENCLAW_SKIP_NPM_LATEST_CHECK` 时还会与 npm `latest` 对比)。
217218

218219
**相关文档:** [CHANGELOG.md](CHANGELOG.md) · [CONTRIBUTING.md](CONTRIBUTING.md)
219220

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openclaw-desktop",
3-
"version": "0.6.0+openclaw.2026.3.31",
3+
"version": "0.6.1+openclaw.2026.3.31",
44
"openclawBundleVersion": "2026.3.31",
55
"description": "Community-maintained Windows desktop app and installer for OpenClaw.",
66
"type": "module",

resources/bundle-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"shellVersion": "0.6.0+openclaw.2026.3.31",
2+
"shellVersion": "0.6.1+openclaw.2026.3.31",
33
"bundledOpenClawVersion": "2026.3.31"
44
}

src/main/config/openclaw-config.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ function migrateLegacyProviderConfig(config: OpenClawConfig): { config: OpenClaw
105105

106106
/** Ensure Feishu channel keeps explicit `dmPolicy: pairing` so DMs use pairing flow (not implicit open). */
107107
/**
108-
* OpenClaw 2026.3+ rejects Control UI WebSocket connects without device identity unless
109-
* `gateway.controlUi.allowInsecureAuth` is set. The desktop embeds Control UI in a sandboxed
110-
* iframe where `crypto.subtle` may be missing — enable this for local (non-remote) gateways.
108+
* OpenClaw 2026.3+ hardens Control UI auth (device identity + loopback policy). The desktop embeds
109+
* Control UI in an Electron iframe; upstream may return 500 or reject WS unless both
110+
* `allowInsecureAuth` and `dangerouslyDisableDeviceAuth` are set for local gateways.
111+
* Always normalize to the embedded-safe pair for non-remote mode (overrides user `false`).
111112
*/
112113
function migrateDesktopControlUiAllowInsecureAuth(
113114
config: OpenClawConfig,
@@ -120,7 +121,11 @@ function migrateDesktopControlUiAllowInsecureAuth(
120121
return { config, changed: false }
121122
}
122123
const ctrl = gw.controlUi
123-
if (ctrl && typeof ctrl === 'object' && ctrl.allowInsecureAuth !== undefined) {
124+
const base =
125+
ctrl && typeof ctrl === 'object' && !Array.isArray(ctrl)
126+
? (ctrl as Record<string, unknown>)
127+
: {}
128+
if (base.allowInsecureAuth === true && base.dangerouslyDisableDeviceAuth === true) {
124129
return { config, changed: false }
125130
}
126131
const next = JSON.parse(JSON.stringify(config)) as OpenClawConfig
@@ -129,8 +134,11 @@ function migrateDesktopControlUiAllowInsecureAuth(
129134
return { config, changed: false }
130135
}
131136
ng.controlUi = {
132-
...(typeof ng.controlUi === 'object' && ng.controlUi !== null ? ng.controlUi : {}),
137+
...(typeof ng.controlUi === 'object' && ng.controlUi !== null && !Array.isArray(ng.controlUi)
138+
? ng.controlUi
139+
: {}),
133140
allowInsecureAuth: true,
141+
dangerouslyDisableDeviceAuth: true,
134142
}
135143
return { config: next, changed: true }
136144
}
@@ -522,7 +530,7 @@ export function readOpenClawConfig(): OpenClawConfig {
522530
}
523531
if (migratedControlUi.changed) {
524532
console.info(
525-
'[config] Set gateway.controlUi.allowInsecureAuth=true for embedded Control UI (OpenClaw 2026.3+)',
533+
'[config] Set gateway.controlUi.allowInsecureAuth=true and dangerouslyDisableDeviceAuth=true for embedded Control UI (OpenClaw 2026.3+)',
526534
)
527535
}
528536
if (migratedAuthNone.changed) {

src/main/update/update-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function normalizeVersion(tag: string): string {
6363
}
6464

6565
/**
66-
* Shell versions use semver plus build metadata (e.g. `0.6.0+openclaw.2026.3.31`).
66+
* Shell versions use semver plus build metadata (e.g. `0.6.1+openclaw.2026.3.31`).
6767
* Semver ignores build metadata for precedence; we tie-break with a full string compare.
6868
* Returns negative if a is older than b.
6969
*/

src/main/wizard/setup-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ function buildOpenClawConfig(state: WizardState): OpenClawConfig {
459459
mode: 'token',
460460
token: state.gatewayConfig.authToken,
461461
},
462-
// Upstream 2026.3+: Control UI webchat needs device identity when crypto.subtle exists.
463-
// Electron iframe may lack a full secure context — allow token-only on loopback for embedded UI.
462+
// Upstream 2026.3+: Control UI device-identity + loopback policy; embedded iframe needs both flags.
464463
controlUi: {
465464
allowInsecureAuth: true,
465+
dangerouslyDisableDeviceAuth: true,
466466
},
467467
},
468468
agents: {

0 commit comments

Comments
 (0)