Node Resolution
run in each node can be resolved in three ways.
1. Direct function (TypeScript workflows)
TS
nodes: {
chat: { run: chatNode, params: {} }
}This is the cleanest option when your workflows are TypeScript modules.
2. Module path string (YAML/JSON or TS)
YAML
nodes:
chat:
run: ../nodes/chat.node.ts#chatNodeResolution behavior (from resolveNodeHandler):
- Path-like strings are dynamically imported
- If
#exportNameis present, that named export must be a function - If absent, runtime tries:
defaultexport as function- exactly one named function export
3. Registry key string
If the run value is not path-like, runtime treats it as a registry id.
TS
import { registerNode } from "kortyx";
registerNode("chatNode", chatNode);
// workflow node:
// { run: "chatNode" }Helper APIs:
registerNodegetRegisteredNodelistRegisteredNodesclearRegisteredNodes