`npx claude-worker` now stands up the session gateway and the full dashboard
on one port, with nothing to clone. Two new packages:
- `claude-worker` (unscoped, packages/cli) — the instance: single-port server,
shared-secret auth, durable parking on by default, a claude-worker.config.mjs
for the options that are functions, and `claude-worker guard`.
- `@claude-worker/web` — the dashboard as prebuilt static files with zero
runtime deps, for hosts that want to serve it themselves.
Single-origin is load-bearing, not cosmetic. A browser cannot set a header on a
WebSocket handshake, so the only credential a tab can present on a session
attach is a cookie — and cookies are per-origin. Hence one secret over two
transports: a login page trades it for an HttpOnly cookie for browsers, while
services keep sending it as a header. Because upgrades are exempt from CORS,
an explicit Origin check (not SameSite alone) is what defends the attach, and
the unauthenticated loopback default is fenced with a Host allowlist against
DNS rebinding.
Serving both from one process needed a new `fallback` option on the server for
requests outside basePath. Upgrades are still refused there.
Packaging: apps/web moved to packages/web, because the tag gate in the release
workflow reads only readdirSync("packages") and version:set filters
./packages/*, while the recursive release step walks every non-private
workspace package — so a publishable package under apps/ would ship while
being invisible to both. The monorepo root is renamed claude-worker-monorepo
to free the npm name. scripts/deploy-guard.mjs folded into
`claude-worker guard`, which needs no checkout.