Overview
NodeRegistry manages all node definitions. It’s generic over node type strings for type-safe lookups.
Methods
register
Register a single node definition. Throws if the type is already registered.registerAll
Register multiple nodes at once.unregister
Remove a registered node type. Returnstrue if it existed.
has
Check if a type is registered.getDefinition
Get the full definition including executor.getMetadata
Get client-safe metadata (no executor). Safe to send to the browser.getExecutor
Get just the executor function.getNodeTypes
Get all registered type identifiers.getAllDefinitions / getAllMetadata
getByCategory / getMetadataByCategory
Filter definitions or metadata by category.validateInput / validateOutput
Validate data against a node’s Zod schema. ThrowsZodError on failure.
size
Example
Factory Function
createRegistry<TNodeType>() creates a new empty NodeRegistry.

