NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
strict_runtime.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <neograph/context_store.h>
5#include <neograph/controlled_provider.h>
7#include <neograph/runtime_interposition_controller.h>
8
9#include <cstdint>
10#include <memory>
11#include <optional>
12#include <string>
13#include <vector>
14
15namespace neograph::graph { class GraphEngine; }
16
17namespace neograph {
18
19struct StrictRuntimeProfileConfig {
20 std::shared_ptr<Provider> provider;
21 std::shared_ptr<DurableContextStore> context_store;
22 std::shared_ptr<DurableProviderDispatchReceiptStore> dispatch_store;
23 std::shared_ptr<HookRuntime> hook_runtime;
24 std::string provider_binding_identity;
30 std::uint64_t max_input_tokens = 0;
31 std::vector<std::string> required_context_artifact_ids;
32 std::vector<std::string> required_skill_artifact_ids;
33};
34
63class NEOGRAPH_API StrictRuntimeProfile final {
64public:
65 explicit StrictRuntimeProfile(StrictRuntimeProfileConfig config);
66
69 void activate(std::string owner_id, ContextEpoch epoch);
70 void activate(std::string owner_id, ContextEpoch epoch,
71 std::optional<ContextEpoch> predecessor);
72 void clear() noexcept;
73 bool active() const noexcept;
74
75 void attach(graph::GraphEngine& engine) const;
76
77 std::shared_ptr<RuntimeInterpositionController> interposition() const noexcept;
78 std::shared_ptr<HookRuntime> hooks() const noexcept;
79 std::shared_ptr<DurableContextStore> context_store() const noexcept;
80 std::shared_ptr<DurableProviderDispatchReceiptStore> dispatch_store() const noexcept;
81
82private:
83 std::shared_ptr<DurableContextStore> context_store_;
84 std::shared_ptr<DurableProviderDispatchReceiptStore> dispatch_store_;
85 std::shared_ptr<HookRuntime> hook_runtime_;
86 std::shared_ptr<RuntimeInterpositionController> interposition_;
87};
88
89} // namespace neograph
Immutable selection of exact RAW and derived material for provider turns.
Opt-in marker for ContextStore implementations that survive process restart.
Opt-in marker for receipt stores backed by durable storage.
Owns lifecycle-event identity and dispatch for one admitted host runtime.
Explicit provider interposition for runtimes that have admitted context.
Host-owned strict runtime assembly.
void activate(std::string owner_id, ContextEpoch epoch)
See RuntimeInterpositionController::activate: an epoch that claims to extend its predecessor is verif...
Host-owned lifecycle hook boundary.