|
6 | 6 |
|
7 | 7 | ### Added |
8 | 8 |
|
| 9 | +#### Exec Approval UI |
| 10 | +- **Exec Approval Bell** — new `ExecApprovalBell` component in the global status bar; real-time exec approval queue powered by `exec.approval.requested` / `exec.approval.resolved` gateway events |
| 11 | +- **Approve / Deny actions** — per-request allow-once, allow-always, and deny buttons via `exec.approval.resolve` RPC; auto-expire entries based on server-provided TTL |
| 12 | +- **Timer dedup guard** — duplicate `entry.id` events are rejected before timer creation to prevent leaked timers |
| 13 | + |
| 14 | +#### Agent Update Dialog |
| 15 | +- **`UpdateAgentDialog`** — edit agent name and model via `agents.update` RPC; accessible from agent overview; validates non-empty changes; shows "No changes to save" toast on no-op |
| 16 | + |
| 17 | +#### Session Compact |
| 18 | +- **Compact button** — per-session compact action in session cards via `sessions.compact` RPC; disabled state with "Compacting…" label during operation; success/info toast feedback |
| 19 | + |
| 20 | +#### Dashboard Quick Actions |
| 21 | +- **Wake Agent** — "Wake Agent" button triggers `wake` RPC (`{ mode: 'now', text: 'Manual wake from ClawKernel dashboard' }`) |
| 22 | +- **Update Gateway** — "Update Gateway" button triggers `update.run` RPC with confirm dialog; shows restart countdown toast |
| 23 | + |
| 24 | +#### Gateway Shutdown Banner |
| 25 | +- **`GatewayShutdownBanner`** — layout-level banner displayed when the gateway broadcasts a `shutdown` event; shows reason text + countdown timer until expected restart; auto-clears on successful reconnect (`hello-ok`); uses `useRef` for timestamp tracking to handle repeated shutdown cycles correctly |
| 26 | + |
| 27 | +### Changed |
| 28 | + |
| 29 | +#### OpenClaw v2026.3.11 Compatibility |
| 30 | +- **Device auth v3** — `buildDeviceAuthPayloadV3` and `normalizeDeviceMetadataForAuth` added to `device-auth.ts`; client now signs with v3 payload format (includes `platform` and `deviceFamily`); server falls back to v2 if v3 verification fails |
| 31 | +- **Display name** — connect params now send `displayName` from `opts.clientName` (defaults to `ClawKernel`); previously hardcoded `WebClaw` |
| 32 | +- **Snapshot type realigned** — removed 7 phantom fields (`agents`, `sessions`, `channels`, `config`, `skills`, `cron`, `models`); added 6 upstream fields (`stateVersion`, `uptimeMs`, `configPath`, `stateDir`, `sessionDefaults`, `authMode`); `presence` and `health` now required (matching `SnapshotSchema`) |
| 33 | +- **`GatewayHelloOk` type corrected** — `server`, `features`, `snapshot`, `policy` marked required; `auth` sub-fields (`deviceToken`, `role`, `scopes`) required when `auth` is present; `policy` includes `maxPayload` and `maxBufferedBytes` |
| 34 | +- **Presence type expanded** — added 8 upstream fields (`deviceFamily`, `modelIdentifier`, `reason`, `tags`, `text`, `deviceId`, `roles`, `scopes`); `ts` now required |
| 35 | +- **`ChannelAccountSnapshot` parity** — removed 5 speculative fields (`credentialSource`, `audienceType`, `audience`, `webhookPath`, `webhookUrl`); added 3 upstream fields (`busy`, `activeRuns`, `lastRunActivityAt`); matches `ChannelAccountSnapshotSchema` exactly |
| 36 | +- **`updateAvailable` type** — removed erroneous `| null` union; upstream uses `Type.Optional(Type.Object(...))` only |
| 37 | + |
| 38 | +#### Event Handling |
| 39 | +- **Cron event** — replaced dead `cron.status` / `cron.jobs` handlers with single `cron` handler; re-fetches via RPC on event (matching upstream broadcast pattern at `server-cron.ts:359`) |
| 40 | +- **Device pairing events** — `pairing-bell.tsx` now subscribes to live `device.pair.requested` / `device.pair.resolved` events in addition to polling |
| 41 | +- **Shutdown + update.available events** — new store fields `gatewayShutdown` and `gatewayUpdateAvailable`; `gatewayShutdown` cleared on reconnect |
| 42 | +- **Dead handler cleanup** — removed 4 event handlers for events upstream never broadcasts (`sessions`, `config`, `channels`, `skills`) |
| 43 | +- **Presence event** — correctly unwraps `{ presence: Array<...> }` envelope (matching `presence-events.ts:11`) |
| 44 | + |
| 45 | +#### Gateway Client |
| 46 | +- **`isNonRecoverableAuthError`** — added 3 missing upstream error codes: `PAIRING_REQUIRED`, `CONTROL_UI_DEVICE_IDENTITY_REQUIRED`, `DEVICE_IDENTITY_REQUIRED`; prevents infinite reconnect loops on these errors |
| 47 | +- **`ConnectErrorDetailCodes`** — expanded from 4 to 7 codes to match upstream `connect-error-details.ts` |
| 48 | +- **`GatewayRequestError` class** — matches upstream `ui/src/ui/gateway.ts` (`gatewayCode` + `details`) |
| 49 | +- **Connect params** — sends `caps: ['tool-events']` capability; `instanceId` included in client info |
| 50 | + |
| 51 | +#### Store & UI |
| 52 | +- **`chat.inject` params** — corrected from `{ sessionKey, role, content }` to `{ sessionKey, message }` (matching `ChatInjectParamsSchema`) |
| 53 | +- **Event handlers use injected `set`** — `handleCronEvent` no longer calls `useGatewayStore.setState()` directly |
| 54 | +- **`presenceArrayToRecord`** — replaced `arr.indexOf(entry)` fallback (O(n²)) with loop counter (O(n)) |
| 55 | +- **Navigator reference** — `getBrowserNavigator()` called once and shared between auth payload and connect params; prevents platform divergence in v3 signature verification |
| 56 | +- **Pairing bell cleanup** — simplified `unsubs` array to single `unsub` variable with `?.()` cleanup |
| 57 | +- **Agent overview** — added `.catch()` to fire-and-forget `agents.list` refresh in `onUpdated` |
| 58 | +- **`compactingKey` ref guard** — `useCallback` dependency uses `compactingRef` instead of stale closure over `compactingKey` state |
| 59 | + |
| 60 | +### Fixed |
| 61 | + |
| 62 | +#### Channels |
| 63 | +- **DM policy enum** — `allow/deny` → `pairing/allowlist/open/disabled` (matching `DmPolicySchema` at `zod-schema.core.ts:313`) |
| 64 | +- **Group policy enum** — `allow/mention/deny` → `open/disabled/allowlist` (matching `GroupPolicySchema` at `zod-schema.core.ts:315`) |
| 65 | + |
| 66 | +#### Dependencies |
| 67 | +- **`@noble/ed25519`** — updated to `^2.3.0` |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +### Added |
| 72 | + |
9 | 73 | #### Usage & Cost Analytics `/usage` |
10 | 74 | - **Usage page** — new route `/usage`; nav item (ChartColumn) in sidebar; lazy-loaded with `PageErrorBoundary` |
11 | 75 | - **Manual fetch workflow** — page loads idle; user selects date range (or preset: Today, 7d, 30d) and clicks Refresh; empty state with guidance message; matches OpenClaw's pattern |
|
0 commit comments