Minor Changes
-
b7c8bb6: Make the package root (Node
defaultentry) server-safe so headless apps work out of the box.The top-level
@agent-native/coreentry used by Node/SSR/headless contexts no
longer re-exports the React client barrel. Re-exporting./client/index.jsfrom
the Node entry eagerly pulledreact,react-router, and
@tanstack/react-queryinto the module graph, so a freshly scaffolded
--headlessapp (which installs none of those) crashed at module load on the
documented first command,pnpm action hello. The React client surface still
ships via thebrowsercondition (so UI bundles that import client helpers from
the bare specifier keep working) and via the explicit@agent-native/core/client
subpath.Also fixes the headless scaffold's
tsconfig.json, which inherited
types: ["vite/client"]from the shared UI base config and failedpnpm typecheckwith TS2688 because a headless app has no Vite dependency. It now
overridestypesto the Node set it actually uses.Migration: code that runs through the Node entry (SSR, scripts, headless) and
imports React client helpers (useDbSync,cn,useSession,sendToAgentChat,
etc.) from@agent-native/coreshould import them from@agent-native/core/client
instead. Browser-only code is unaffected.