13 Commits
Author SHA1 Message Date
George Pickett 732b994120 Harden agent id validation, session keys, agent-state rollback, and gateway/auth reliability
Centralize OpenClaw agent id validation in a new module
(src/lib/agents/agentIds.ts) and route every gateway, cron, ssh, and
intent path through it. Tighten the safe-id regex to match the gateway's
64-char normalization and reserve "main" from UI creation.

Add symlink-aware boundary checks and move rollback to
trash/restoreAgentStateLocally and the SSH equivalent so a failed move
never leaves the filesystem half-migrated, and restore refuses symlinks
that escape stateDir.

Validate session keys (hasMalformedAgentSessionKey,
sessionKeyBelongsToAgent) and cron job fields before trusting gateway
output, and compare cron agent ids case-insensitively.

Refactor applyGatewayConfigPatch and exec-approvals retry to fetch the
snapshot inside the retry callback, eliminating a stale-baseHash race.

Harden the control-plane adapter: stop() now waits on in-flight start,
times out hung sockets, and ignores stale ws event handlers via a
connection epoch.

Close a WebSocket upgrade auth bypass in server/index.js by routing
upgrades through accessGate.allowUpgrade, make access-gate cookie values
URL-safe and stop reconstructing redirect URLs from Host headers, and
apply the access gate to all non-token requests rather than only /api/.

Read media via realpath + boundary re-check, enforce MAX_MEDIA_BYTES on
remote SSH responses, and whitelist response MIME types. Clean up SSE
streams on client abort.

Normalize localhost gateway URLs in studio-settings so token hints only
apply when the draft URL matches, and write settings atomically.

Make the Playwright port configurable (PLAYWRIGHT_PORT, default 3100)
to avoid colliding with the running dev server, and ignore .worktrees
in eslint.

Add unit tests for the new agentIds module, gateway connect profile,
disconnect-like errors, local gateway, and studio settings store, and
extend existing tests to cover the new validation, rollback, retry, and
normalization paths.
2026-06-22 10:06:22 -07:00
George Pickett 367fa18cd2 feat: warn when openclaw-studio CLI is outdated 2026-03-05 17:28:01 -08:00
George Pickett d2c10958bc Improve Studio install onboarding for local and cloud setups
Make first-run connection setup explain how users open Studio separately from how Studio reaches OpenClaw, so remote and same-host cloud installs are less confusing for beginners.

Made-with: Cursor
2026-03-05 16:19:54 -08:00
George Pickett e1b78696da big refactor in progress 2026-03-02 17:18:53 -08:00
George Pickett aab2579675 Harden control-plane startup, domain WS behavior, and runtime route reliability 2026-03-02 12:52:39 -08:00
George Pickett c4d19ff912 Refactor Studio around domain control-plane architecture 2026-02-28 12:09:32 -08:00
George Pickett c64ef28b6e Fix localhost loopback binding across IPv4 and IPv6 2026-02-25 10:45:16 -08:00
George Pickett 20084b8831 Merge branch 'codex/public-bind-access-token-guard' 2026-02-25 10:18:56 -08:00
George Pickett 3e27e6c86e Enforce Studio access token for public binds 2026-02-25 10:15:27 -08:00
George Pickett 12ffaf7976 Harden proxy browser auth passthrough detection 2026-02-25 10:14:58 -08:00
George Pickett c4246766ce Fix gateway proxy auth passthrough gating 2026-02-25 09:10:50 -08:00
George Pickett 8a645a2295 Apply pending big-one workspace updates 2026-02-24 11:57:47 -08:00
George Pickett 81ab1224ec Local snapshot before linking remote 2026-02-19 11:33:47 -08:00