NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
provider_call_broker.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <neograph/api.h>
8#include <neograph/provider.h>
9
10#include <asio/awaitable.hpp>
11
12#include <cstdint>
13#include <atomic>
14#include <memory>
15#include <string>
16#include <functional>
17#include <optional>
18#include <string_view>
19
20namespace neograph::graph {
21
22
25 std::string owner_scope;
26 std::string run_id;
27 std::string thread_id;
28 std::string task_id;
29 std::string node_name;
31 std::uint64_t call_ordinal = 0;
32 std::shared_ptr<UsageAccumulator> usage;
33 std::uint64_t model_token_budget = 0;
34 std::shared_ptr<std::atomic_bool> budget_exhausted;
35 std::shared_ptr<CancelToken> budget_cancel_token;
36 std::shared_ptr<OwnedManagedBudgetLease> managed_budget_lease;
37 std::shared_ptr<CheckpointStore> managed_budget_store;
38};
39
41NEOGRAPH_API std::string managed_provider_effect_id(const ProviderCallIdentity& identity);
42
50class NEOGRAPH_API ProviderCallBroker {
51public:
52 virtual ~ProviderCallBroker() = default;
53
54 virtual asio::awaitable<sp::runtime::Result> invoke(
55 ProviderCallIdentity identity,
56 std::shared_ptr<Provider> provider,
57 ProviderRequest request) = 0;
58};
59
60} // namespace neograph::graph
NEOGRAPH_API export/import macro for shared-library builds.
The trusted host implements durable admission, replay, and reconciliation.
NEOGRAPH_API std::string managed_provider_effect_id(const ProviderCallIdentity &identity)
Stable original-bank task slot; preparation binding is stored separately.
Portable request controls remain the SDK's declared, family-specific fields.
Definition provider.h:190
std::uint64_t call_ordinal
Stable per-task ordinal; inner loops assign each provider turn explicitly.