NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
core_provider_call.h
1#pragma once
2
3#include <neograph/api.h>
5
6#include <cstdint>
7#include <functional>
8#include <memory>
9#include <optional>
10#include <string>
11#include <string_view>
12#include <utility>
13#include <vector>
14
15namespace neograph::program {
16
23class ProgramMonetaryAccount;
24
33 std::string run_id;
34 std::string program_version_id;
37 std::vector<std::pair<std::string, std::string>> threads;
39 std::uint64_t max_attempt = 0;
44 bool may_resend = false;
45};
46
54 std::string code;
56 std::string message;
58 json witness;
59};
60
63 std::string_view owner_scope;
64 std::string_view program_version_id;
65 std::string_view run_id;
66 std::string_view operation_id;
67 std::uint64_t attempt = 0;
70 std::shared_ptr<ProgramMonetaryAccount> monetary_account;
75 std::shared_ptr<UsageAccumulator> journaled_usage;
78 std::optional<ProgramCoreProviderCallReplaySource> replay_source;
83};
84
87 std::string owner_scope;
88 std::string program_version_id;
89 std::string run_id;
90 std::string operation_id;
91 std::uint64_t attempt = 0;
92 std::shared_ptr<graph::ProviderCallBroker> broker;
93};
94
95using ProgramCoreProviderCallResolver = std::function<
96 std::optional<ProgramCoreProviderCallBinding>(
98
108NEOGRAPH_PROGRAM_API ProgramCoreProviderCallBinding bind_priced_provider_call(
109 const ProgramCoreProviderCallContext& context);
110
111} // namespace neograph::program
NEOGRAPH_API export/import macro for shared-library builds.
Host-owned, invocation-scoped boundary for built-in Core provider calls.
Host binding for one Program operation.
Exact Program operation requesting a host-owned Core provider broker.
std::shared_ptr< UsageAccumulator > journaled_usage
Set only when the runtime settles an attempt that never runs again (a run its expired execution lease...
std::shared_ptr< ProgramMonetaryAccount > monetary_account
The attempt's monetary account.
std::function< void(ProgramCoreProviderCallDiagnostic)> diagnostic
#543: where a broker reports a ProgramCoreProviderCallDiagnostic.
std::optional< ProgramCoreProviderCallReplaySource > replay_source
#405: set on a fork for the calls it repeats; see ProgramCoreProviderCallReplaySource.
#543: a fact about a provider call that a broker reports to the host as it happens.
std::string message
One sentence for a person.
std::string code
Stable identifier, for example P_PROVIDER_CALL_POLICY_CHANGED.
json witness
The facts the message summarizes, as JSON.
#405: where the calls of a forked run's operation were made before the fork.
std::uint64_t max_attempt
Only calls the source journaled up to this attempt, before the fork.
std::vector< std::pair< std::string, std::string > > threads
This run's Core threads of the operation, each with the source run's thread of the same derivation.
bool may_resend
#543: whether the fork may send a call the source already journaled at the same position when it can ...