@mastra/core
Version:
19 lines • 982 B
TypeScript
/**
* Built-in class codecs.
*
* IMPORTANT: This module must be loaded for `instanceof` to survive
* serialization across the unix-socket pubsub. The `BUILTIN_CODECS_REGISTERED`
* constant exists solely so consumers can import it as a *named* import (see
* `codec.ts`). A `import './registrations'` side-effect import would be
* tree-shaken out of dist consumers because `packages/core/package.json` has
* `"sideEffects": false`. Named imports are kept by every bundler.
*
* `DefaultStepResult` flows through workflow output schemas typed as
* `z.any()`, so it crosses the unix-socket pubsub on the evented engine.
* Without a class registration, consumers that rely on
* `instanceof DefaultStepResult` (e.g. the in-memory storage path) would
* receive plain data. The generic `TOOLS` type parameter is erased at
* runtime, so we register the constructor name once.
*/
export declare const BUILTIN_CODECS_REGISTERED: true;
//# sourceMappingURL=registrations.d.ts.map