8#include <neograph/graph/registry.h>
20namespace neograph::program {
23class RegistrySnapshotAccess;
26enum class EffectMode : std::uint8_t {
31NEOGRAPH_PROGRAM_API std::string_view to_string(EffectMode mode)
noexcept;
32NEOGRAPH_PROGRAM_API EffectMode effect_mode_from_string(std::string_view value);
34struct ExecutableManifest {
35 ExecutableIdentity identity;
36 EffectMode effect_mode = EffectMode::Brokered;
37 std::string attestation_id;
38 std::vector<std::string> required_capabilities;
39 std::vector<std::string> declared_effects;
40 std::vector<ExecutableIdentity> required_executables;
45struct ProviderMetadata {
55struct ImportedExecutableMetadata {
56 std::string module_id;
57 std::string export_name;
58 std::string dependency_digest;
59 ExecutableIdentity target;
73 std::function<std::vector<ExecutableIdentity>(
const json& node_config)>;
75class NEOGRAPH_PROGRAM_API RegistrySnapshot {
77 RegistrySnapshot(
const RegistrySnapshot&)
noexcept =
default;
78 RegistrySnapshot(RegistrySnapshot&&)
noexcept =
default;
79 RegistrySnapshot& operator=(
const RegistrySnapshot&)
noexcept =
default;
80 RegistrySnapshot& operator=(RegistrySnapshot&&)
noexcept =
default;
83 const std::string& fingerprint()
const noexcept;
84 std::vector<ExecutableIdentity> identities()
const;
85 std::optional<ExecutableManifest> find(ExecutableKind kind, std::string_view name)
const;
86 json manifest()
const;
87 std::optional<NativeControlBinding> find_native(std::string_view name)
const;
88 std::string serialize_canonical()
const;
92 std::shared_ptr<const Impl> impl_;
94 explicit RegistrySnapshot(std::shared_ptr<const Impl> impl);
96 friend class detail::RegistrySnapshotAccess;
120 ExecutableManifest manifest,
129 ExecutableManifest manifest,
137 ExecutableManifest manifest,
140 ExecutableManifest manifest,
148 ExecutableManifest manifest,
153 std::optional<graph::ConditionSpec> spec);
157 ImportedExecutableMetadata metadata);
168 ExecutableManifest manifest,
171 ExecutableManifest manifest,
174 RegistrySnapshot build() &&;
178 ExecutableManifest manifest,
183 bool allow_executable_bindings);
185 std::unique_ptr<Impl> impl_;
NEOGRAPH_API export/import macro for shared-library builds.
ExecutionGuarantee
The lowest recoverability/integrity class reachable through an executable closure.
C++ wrapper over a C v1 plugin binding for trusted in-process dispatch only.
Move-only builder for one sealed, process-local executable registry.
RegistrySnapshotBuilder & add_native(ExecutableManifest manifest, NativeControlBinding binding) &
Register a native callable for direct lookup without granting a JavaScript slot.
RegistrySnapshotBuilder & add_core_endpoint_node(ExecutableManifest manifest, ExecutableRequirementResolver requirement_resolver)
A built-in SchemaProvider endpoint node (#531): the manifest names its type (embed,...
RegistrySnapshotBuilder & add_native(std::uint32_t import_slot, ExecutableManifest manifest, NativeControlBinding binding) &
Seal a native binding to one non-built-in JavaScript import slot.
RegistrySnapshotBuilder & add_core_llm_call(ExecutableManifest manifest, ExecutableRequirementResolver requirement_resolver)
Fixed NeoGraph implementations that may hold exact bound executables.
RegistrySnapshotBuilder & add_host_brokered_node(ExecutableManifest manifest, graph::NodeFactoryFn factory, json config_schema, json effects, ExecutableRequirementResolver requirement_resolver={})
Host-reviewed broker nodes may retain only their exact declared bindings.
std::function< json(const json ¤t, const json &incoming)> ReducerFn
Custom reducer function signature.
std::function< std::string(const GraphState &)> ConditionFn
Condition function signature for conditional edge routing.
Thin C++ RAII wrapper around yyjson with nlohmann-compatible API.
std::function< std::unique_ptr< GraphNode >(const std::string &name, const json &config, const NodeContext &ctx)> NodeFactoryFn
Factory function signature for creating graph nodes.
C++ ownership-safe wrapper for the Program native C v1 ABI.
std::function< std::vector< ExecutableIdentity >(const json &node_config)> ExecutableRequirementResolver
Pure node-config to exact executable requirements callback.