node

inline fun <I, O> node(name: String, description: String = "", rerunOnResume: Boolean = false, waitForOutput: Boolean = false, config: NodeConfig = NodeConfig(), inputSchema: Schema? = null, outputSchema: Schema? = null, stateSchema: Schema? = null, crossinline block: suspend FlowCollector<Event>.(context: Context, input: I) -> O): FunctionNode<I, O>

Creates a FunctionNode that runs block on an input of type I and returns an output of type O, emitting progress Events through its FlowCollector receiver. Schemas inferred from I and O describe the node, while an explicit inputSchema or outputSchema is also enforced on every run.