Replace sleep with dynamic breakpoints at pause nodes

Background

Current implementation of workflow pause state is based on sleep that pauses underlaying thread that runs graph, such design is inefficient both in production and in test environment. In order to reduce risk surface related to maintaining large amount of idle threads on a duo workflow service host machine a hard time out of 30 minutes for a pause was introduced, after which workflow is being killed

Goal

Replace sleep with dynamic breakpoints which are offered in the latest release of LangGraph. That should reduce performance impact of pause and remove need for time out as well

Implementation

It would be required to reshape the graph at workflow.py to some degree. In order to avoid sleep, a pause nodes should raise NodeInterrupt exception that pauses a graph execution that later should be resumed using latest checkpoint. That would require a new gRPC message exchanged between executor and service to indicate that action

Edited by Mikołaj Wawrzyniak