Splits the SvelteKit app into three workspaces per docs/MONOREPO_MIGRATION_BRIEF.md:
- packages/core (@webavatar/webavatar-core): session management, auth tokens,
provider adapters, and the WS relay, with curated entry points (., ./client,
./server, ./vite) and a browser-stub guard on the server-only ones.
- packages/humanoid (@webavatar/webavatar-humanoid): avatar-state derivation
and animation-channel composition, depending on core only via type-only
imports (no runtime reference to core in its built output).
- apps/template: the SvelteKit application template, now importing both
packages by name, routed through a server-only wrapper and a build-time
guard (server-only-guard.ts) for the server/vite entries.
Also collapses the duplicated server.js/vite-plugin composition wiring into a
single createRealtimeRuntime factory (exported from packages/core/server),
adds ESLint boundary-enforcement rules and Gitea Actions workflows
(verify.yml, publish.yml), externalizes both packages in the production SSR
build for artifact parity with a real client install, and rewrites the
project documentation to match.
No runtime behavior or wire protocol changes. Registry publication stays
blocked on Gitea host/org placeholders not yet resolved — see the brief's
status banner for exactly what remains.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Server- and client-side infrastructure other subsystems (humanoid,
analytics, project surfaces) can log into: an open-category Logger
contract, per-session WS forwarding gated by DEBUG_ACCESS_KEY in prod
(frictionless in dev), and a production-shippable DebugPanel.svelte.
Also logs full conversation content (system prompt, user/assistant
messages) under its own `messages` category so a session's history is
trackable while debugging, with DEBUG_LOG_MESSAGES to keep that content
out of the unconditional console/stdout mirror when desired.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>