21 : engine_(std::move(engine)) {
22 if (!engine_)
throw std::invalid_argument(
"GraphExecution requires an engine");
25 asio::awaitable<RunResult> run_stream_async(
28 return engine_->run_stream_async(std::move(config), std::move(cb),
29 std::move(metadata), std::move(resources));
32 asio::awaitable<RunResult> resume_async(
35 return engine_->resume_async(std::move(config), std::move(value),
36 std::move(cb), std::move(metadata),
37 std::move(resources));
40 asio::awaitable<RunResult> resume_from_async(
41 RunConfig config, std::string checkpoint_id, json value,
44 return engine_->resume_from_async(std::move(config), std::move(checkpoint_id),
45 std::move(value), std::move(cb),
46 std::move(metadata), std::move(resources));
54 auto history = engine_->get_state_history(thread_id, 1);
55 if (history.empty())
return std::nullopt;
56 return history.front().interrupt_phase;
60 std::shared_ptr<GraphEngine> engine_;