description: "The runtime Typert registry: stores generated package reflection, lazy Zod schema factories, and Remote invocation descriptors, and resolves them for consumers."
English | 中文
dsh-typert-registry makes generated Typert artifacts queryable at runtime: each package's reflection, lazy Zod schema factories, and Remote invocation descriptors live under stable keys. A schema is materialized and cached when a consumer first requests it. Registrations are atomic and fiber-scoped: a contribution lands whole or not at all and is withdrawn automatically when the registering component unloads. The same service hosts the lookup and scoped-Context provider registries that Remote calls resolve through. It performs no TypeScript analysis and generates no schemas; the generator and the loader handle those.
Mount the registry in any Host or Client composition that stores or consumes generated Typert artifacts; it provides ctx.typert. There is no configuration.
Load the registry plugin; the Client face is installed the same way by the Client runtime's own metadata, and both faces run the same implementation:
- name: '@deepseek-ai/dsh-typert-registry'
Consumers read schemas with get(key), resolve(key), or list(filter?) and package reflection with getPackage(name, face?) or listPackages(filter?). The first schema read materializes one process-realm instance; later reads reuse it. resolve() distinguishes a malformed key, an absent package, and a registered package that contributes no schema under that name, each with its own error. toJSONSchema(key) projects the materialized Zod schema to JSON Schema without caching the projection.
Generated artifacts register through the loader in Loader compositions; any other owner calls ctx.typert.register(contribution) directly and receives the exact disposer that withdraws it. Duplicate package-face identities, schema keys, invocation ids, or endpoints reject the whole batch before anything is committed.
Remote calls resolve Host objects and scoped Contexts through ctx.typert.lookups and ctx.typert.contexts. registerHost() installs the Host wire declaration and its wire-to-Context resolver, while configureHost() replaces only that resolver. registerClient() installs the bidirectional Client adapter for the same merge-declared kind. Host-to-Client event sources carry their domain identity explicitly instead of projecting it back from a Context.
Read these pages when the package-level contract is not enough; they move from the registry to what feeds it and what consumes it.
ctx.typert contract.None, as this runtime type registry's consumers (cordis_inspect, wire faces, gates) own any model-visible projection of registry contents.
No direct effect; a consumer that places reflection or schemas in a request owns the resulting prefix change.
These limits define what the registry stores and rejects; they are current package constraints, not a task backlog.
toJSONSchema() returns a fresh document per call; consumers that project repeatedly own caching.