31 explicit HookRuntime(std::shared_ptr<MandatoryHookRunner> runner,
32 std::chrono::milliseconds default_timeout = std::chrono::seconds(30));
41 [[nodiscard]]
static std::shared_ptr<HookRuntime>
compose(std::shared_ptr<HookRuntime> outer,
42 std::shared_ptr<HookRuntime> inner);
44 asio::awaitable<void> emit_async(HookPhase phase, std::string type,
45 std::string owner_scope, std::string run_id, json data,
46 std::shared_ptr<graph::CancelToken> cancellation = {},
47 std::optional<std::chrono::system_clock::time_point> parent_deadline = {},
48 std::optional<std::uint64_t> event_sequence = {});
61 std::string owner_scope, std::string run_id,
63 std::shared_ptr<graph::CancelToken> cancellation = {},
64 std::optional<std::chrono::system_clock::time_point> parent_deadline = {});
74 std::chrono::milliseconds default_timeout_;
75 std::atomic<std::uint64_t> next_sequence_{0};
78 std::shared_ptr<HookRuntime> outer_;
79 std::shared_ptr<HookRuntime> inner_;
static std::shared_ptr< HookRuntime > compose(std::shared_ptr< HookRuntime > outer, std::shared_ptr< HookRuntime > inner)
Both runtimes of a nested run, outer first: a subgraph whose engine has its own HookRuntime under a p...
asio::awaitable< void > emit_once_async(HookPhase phase, std::string type, std::string owner_scope, std::string run_id, json data, std::shared_ptr< graph::CancelToken > cancellation={}, std::optional< std::chrono::system_clock::time_point > parent_deadline={})
Emits an event whose data carries a durable identity, such as a tool call's (run, thread,...