|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
What a ToolGate is allowed to know about the run it is gating. More...
#include <tool_dispatch.h>
Public Attributes | |
| std::shared_ptr< const std::vector< ToolCall > > | batch_calls |
| Immutable assistant-message batch being decided. | |
| std::optional< json > | resume_value |
The human's answer from GraphEngine::resume(). | |
| int | step = 0 |
| Super-step index. Zero on the Agent path. | |
| std::string | thread_id |
Mirrors RunConfig::thread_id. Empty on the Agent path. | |
What a ToolGate is allowed to know about the run it is gating.
Deliberately small and passed by value. A graph::RunContext would be the obvious thing to hand over, but dispatch_tool_calls lives in the core neograph layer while RunContext belongs to neograph::graph — and the standalone llm::Agent, which shares this dispatcher, has no RunContext at all. So the gate gets a struct of its own, which both callers can fill.
Add fields here as gates need them; a by-value struct grows without breaking anybody's gate signature.
Definition at line 55 of file tool_dispatch.h.
| std::shared_ptr<const std::vector<ToolCall> > neograph::ToolGateContext::batch_calls |
Immutable assistant-message batch being decided.
Set by the dispatcher only when a gate is present. Shared ownership keeps the snapshot alive while an asynchronous gate is suspended. A gate can reject relationships between sibling calls before any Tool starts (for example, duplicate writes to the same resource).
Definition at line 72 of file tool_dispatch.h.
| std::optional<json> neograph::ToolGateContext::resume_value |
The human's answer from GraphEngine::resume().
Empty on a fresh run, which is how a gate distinguishes "nobody has been asked yet" from "the answer was no" — and therefore how it avoids interrupting forever.
Definition at line 59 of file tool_dispatch.h.