20namespace neograph::program {
27#if defined(__wasm32__)
50enum class NativeIdempotency : std::uint8_t {
55NEOGRAPH_PROGRAM_API std::string_view to_string(NativeIdempotency value)
noexcept;
56NEOGRAPH_PROGRAM_API NativeIdempotency native_idempotency_from_string(std::string_view value);
58enum class NativeReplayBehavior : std::uint8_t {
64NEOGRAPH_PROGRAM_API std::string_view to_string(NativeReplayBehavior value)
noexcept;
65NEOGRAPH_PROGRAM_API NativeReplayBehavior
66native_replay_behavior_from_string(std::string_view value);
84 std::size_t max_input_bytes = 0;
85 std::size_t max_output_bytes = 0;
86 std::uint64_t advisory_wall_time_ms = 0;
87 std::size_t advisory_memory_bytes = 0;
94 ContractRecord input_contract;
95 ContractRecord output_contract;
96 NativeIdempotency idempotency = NativeIdempotency::NonIdempotent;
97 NativeReplayBehavior replay_behavior = NativeReplayBehavior::Recorded;
101enum class NativeInvocationStatus : std::uint8_t {
110 NativeInvocationStatus status = NativeInvocationStatus::ProtocolFailure;
111 json value =
nullptr;
112 std::string diagnostic_code;
113 std::string diagnostic_message;
117struct NativeControlBindingImpl;
118struct NativeInvocationImpl;
137 bool cancel_requested()
const noexcept;
138 bool finished()
const noexcept;
139 bool wait_for(std::chrono::milliseconds timeout)
const;
140 std::optional<NativeInvocationResult> result()
const;
143 explicit NativeInvocation(std::shared_ptr<detail::NativeInvocationImpl> impl);
145 std::shared_ptr<detail::NativeInvocationImpl> impl_;
172 bool valid() const noexcept;
174 NativeInvocation invoke(std::uint64_t invocation_id, const json& input) const;
179 std::shared_ptr<detail::NativeControlBindingImpl> impl_;
NEOGRAPH_API export/import macro for shared-library builds.
Immutable, content-addressed Program compilation artifacts.
Marks an exception type as a configuration or definition verdict.
C++ wrapper over a C v1 plugin binding for trusted in-process dispatch only.
static NativeControlBinding create(neograph_program_native_binding_v1 binding, NativeControlMetadata metadata)
Throws NativeControlUnavailable where NATIVE_CONTROLS_AVAILABLE is false.
Thrown by NativeControlBinding::create where NATIVE_CONTROLS_AVAILABLE is false.
One move-only handle for an accepted native invocation.
Marker for exceptions that are configuration or definition verdicts (#364).
constexpr std::uint32_t NATIVE_CONTROL_IMPORT_SLOT_MIN
Import slots below this value are reserved by the versioned ng command module.
constexpr bool NATIVE_CONTROLS_AVAILABLE
Whether this build can load a native control plugin.
Stable C v1 contract for externally implemented Program host bindings.
Host-owned terminal result; no plugin storage survives this value.
Declared native resource envelope.
Versioned plugin binding supplied to the C++ Program registration surface.