Subpath exports
Consumers reach internals only through documented subpaths:
Deep imports into unpublished paths are not supported. If something is not reachable through a subpath, it is not part of the public surface.
Dependency direction
Cross-module dependencies flow downward only. Core defines interfaces; everything else depends on core, never the reverse.coredepends on nothing else in the package.schemasis standalone (used at the type level elsewhere).generatorsandprompt-optimizerdepend on core and schemas.adapters/*depend only on core’s interfaces.
ai peer.
Vendor isolation
zod and ai are peer dependencies, never direct dependencies. Vendor SDKs live only inside adapter subpaths. The core never imports a vendor SDK directly, so you can plug in a custom inference path by satisfying the LanguageModel contract without pulling in an ecosystem you do not use.
Isomorphic by default
The default and browser builds carry no Node-only built-ins. Node-only code (for example, the local Markdown loader in generators) is reachable only through the package’snode conditional export. In a browser build, those Node-only paths resolve to stubs that throw a clear error, so you choose an isomorphic alternative instead.
This keeps the path open to in-browser evaluation flows while still offering Node conveniences where the runtime supports them.
Related concepts
Evaluators
How the
Gaussia base class drives an evaluation.Schemas
The Zod-derived data model the SDK passes around.