NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
core_tool_grant.h
1#pragma once
2
4
5#include <asio/awaitable.hpp>
6
7#include <cstdint>
8#include <functional>
9#include <memory>
10#include <optional>
11#include <string>
12#include <string_view>
13
14namespace neograph { class ToolExecutionController; }
15namespace neograph { class ToolEffectBroker; }
16
17namespace neograph::program {
18
21 std::string_view owner_scope;
22 std::string_view program_version_id;
23 std::string_view run_id;
24 std::string_view operation_id;
25 std::uint64_t attempt = 0;
27 std::string_view binding_fingerprint;
28};
29
38 std::string owner_scope;
39 std::string program_version_id;
40 std::string run_id;
41 std::string operation_id;
42 std::uint64_t attempt = 0;
43 std::string grant_id;
44 std::string binding_fingerprint;
45 ToolGate gate;
46 std::shared_ptr<ToolExecutionController> controller;
48 std::shared_ptr<ToolEffectBroker> effect_broker;
49};
50
51using ProgramCoreToolGrantResolver =
52 std::function<std::optional<ProgramCoreToolGrant>(const ProgramCoreToolGrantContext&)>;
53
58using ProgramCoreToolGrantAwaitableResolver = std::function<
59 asio::awaitable<std::optional<ProgramCoreToolGrant>>(const ProgramCoreToolGrantContext&)>;
60
61} // namespace neograph::program
Immutable Program identity presented to a host before one Core operation.
std::string_view binding_fingerprint
Exact admitted executable-binding root; a version alone is not a host binding.
Host-owned authority for mediated Core tool dispatch in one exact Program run.
std::shared_ptr< ToolEffectBroker > effect_broker
Required host-owned per-call effect journal for a mediated Program Tool grant.
The single implementation of "execute an assistant message's tool_calls".
std::function< asio::awaitable< ToolDecision >(ToolCall, ToolGateContext)> ToolGate
Called once per tool call, before any tool runs.