v1.0.206
⚙️ Internal: DDD modularization of the codebase
Everything that was in src/components/ / src/hooks/ moved into 11 workspace packages under packages/{shared,feature}/. The intent: when AI works on chat, it loads feature-agent; on file browser, feature-explorer; etc. — not the whole monolith. src/ is now just Next.js routing + the WebSocket server bootstrap.
Six feature packages — each is self-contained client + server code:
feature-agent— chat domain (Claude / Ollama / Codex / Kimi / Deepseek), scheduled tasks, slash commandsfeature-comments— code annotation API + hooks (new)feature-console— terminal + browser bubbles + DB bubbles (Postgres / MySQL / Redis / Neo4j / Bash / Jupyter)feature-explorer— file browser + code rendering (DiffView, CodeViewer, MarkdownPreview, PreviewModal) + git + LSPfeature-review— review pages with anchored highlights and threaded comments (new)feature-skills— SKILL.md parser + slash autocomplete + cross-frame bus (new)feature-workspace— application integrator (Workspace, TabManager, Providers, cross-feature modals)
Plus three shared packages: shared-i18n (i18next + the full translation dictionary), shared-ui (UI primitives + generic React hooks), shared-utils (paths / platform / shortId).
Dependency rule, ESLint enforced: feature-* may import other feature-* (supporting-subdomain pattern, kept acyclic) and shared-*; shared-* is a leaf layer (cannot import @cockpit/*). See MODULES.md for the full architecture doc.
HTTP route handlers are now Web standard Request / Response everywhere — NextRequest / NextResponse dropped from 108 files (~670 substitutions across .json(...), new ...(...), req.nextUrl.searchParams, type annotations, and next/server imports). Future Hono / Bun / Deno migration is a thin adapter layer instead of a rewrite.
i18n: the full translation dictionary moved to @cockpit/shared-i18n as a singleton; dropped the IoC translator slot in shared-ui. Same translations, fewer levels of indirection.
🐛 Fix: prod install + /api/version
The DDD refactor accidentally listed 9 private workspace packages in dependencies, which made npm install @surething/cockpit fail with ERR 404 @cockpit/feature-agent@* — they don't exist on the registry. They're now devDependencies (needed for build, not for users); dist/wsServer.mjs and dist/scheduledTasks.mjs inline their contents at bundle time, mirroring what Next.js's transpilePackages already does for .next-prod/. No runtime resolution happens against the (missing) node_modules/@cockpit/* path.
/api/version used to read package.json from process.cwd(). In Next.js's prod runtime that effective cwd is /, so the endpoint silently returned {"version":""}. Now reads from process.env.COCKPIT_ROOT, which server.mjs sets to the installed cockpit package root at boot.
📦 Misc: drop unused tooling
Storybook + Vitest + Playwright + 10 supporting devDependencies removed — they hadn't been part of the workflow for months. npm install is faster and lighter; one less dependency surface to keep patched.