#[repr(C)]pub struct NemoRelayNativeHostApiV1 {Show 34 fields
pub abi_version: u32,
pub struct_size: usize,
pub relay_version: *const c_char,
pub string_new: unsafe extern "C" fn(data: *const u8, len: usize, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub string_data: unsafe extern "C" fn(value: *const NemoRelayNativeString) -> *const u8,
pub string_len: unsafe extern "C" fn(value: *const NemoRelayNativeString) -> usize,
pub string_free: unsafe extern "C" fn(value: *mut NemoRelayNativeString),
pub last_error_clear: unsafe extern "C" fn(),
pub last_error_set: unsafe extern "C" fn(message: *const NemoRelayNativeString),
pub plugin_context_register_subscriber: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, cb: NemoRelayNativeEventSubscriberCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_tool_sanitize_request_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_tool_sanitize_response_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_tool_conditional_execution_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolConditionalCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_tool_request_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, break_chain: bool, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_tool_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_sanitize_request_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmRequestCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_sanitize_response_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_conditional_execution_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmConditionalCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_request_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, break_chain: bool, cb: NemoRelayNativeLlmRequestInterceptCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub plugin_context_register_llm_stream_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmStreamExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatus,
pub scope_handle_free: unsafe extern "C" fn(handle: *mut NemoRelayNativeScopeHandle),
pub scope_get_current: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeHandle) -> NemoRelayStatus,
pub scope_push: unsafe extern "C" fn(name: *const NemoRelayNativeString, scope_type: NemoRelayNativeScopeType, parent: *const NemoRelayNativeScopeHandle, attributes: u32, data_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, input_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64, out: *mut *mut NemoRelayNativeScopeHandle) -> NemoRelayStatus,
pub scope_pop: unsafe extern "C" fn(handle: *const NemoRelayNativeScopeHandle, output_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64) -> NemoRelayStatus,
pub emit_mark: unsafe extern "C" fn(name: *const NemoRelayNativeString, parent: *const NemoRelayNativeScopeHandle, data_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64) -> NemoRelayStatus,
pub scope_stack_create: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeStack) -> NemoRelayStatus,
pub scope_stack_free: unsafe extern "C" fn(stack: *mut NemoRelayNativeScopeStack),
pub scope_stack_set_thread: unsafe extern "C" fn(stack: *const NemoRelayNativeScopeStack) -> NemoRelayStatus,
pub scope_stack_capture_thread: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeStackBinding) -> NemoRelayStatus,
pub scope_stack_restore_thread: unsafe extern "C" fn(binding: *mut NemoRelayNativeScopeStackBinding) -> NemoRelayStatus,
pub scope_stack_binding_free: unsafe extern "C" fn(binding: *mut NemoRelayNativeScopeStackBinding),
pub scope_stack_active: unsafe extern "C" fn() -> bool,
pub scope_stack_with_current: unsafe extern "C" fn(stack: *const NemoRelayNativeScopeStack, cb: NemoRelayNativeWithScopeStackCb, user_data: *mut c_void) -> NemoRelayStatus,
}Expand description
Versioned host API table passed to native plugin entry symbols.
Fields§
§abi_version: u32ABI version implemented by this table.
struct_size: usizeSize of this struct as seen by the host.
relay_version: *const c_charNull-terminated host Relay version string.
string_new: unsafe extern "C" fn(data: *const u8, len: usize, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatusAllocates a host-owned string from UTF-8 bytes.
string_data: unsafe extern "C" fn(value: *const NemoRelayNativeString) -> *const u8Returns the string data pointer for a host-owned string.
string_len: unsafe extern "C" fn(value: *const NemoRelayNativeString) -> usizeReturns the byte length for a host-owned string.
string_free: unsafe extern "C" fn(value: *mut NemoRelayNativeString)Frees a host-owned string.
last_error_clear: unsafe extern "C" fn()Clears the host thread-local native ABI error message.
last_error_set: unsafe extern "C" fn(message: *const NemoRelayNativeString)Sets the host thread-local native ABI error message.
plugin_context_register_subscriber: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, cb: NemoRelayNativeEventSubscriberCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an event subscriber through the plugin context.
plugin_context_register_tool_sanitize_request_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters a tool sanitize-request guardrail through the plugin context.
plugin_context_register_tool_sanitize_response_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters a tool sanitize-response guardrail through the plugin context.
plugin_context_register_tool_conditional_execution_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolConditionalCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters a tool conditional-execution guardrail through the plugin context.
plugin_context_register_tool_request_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, break_chain: bool, cb: NemoRelayNativeToolJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters a tool request intercept through the plugin context.
plugin_context_register_tool_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeToolExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters a tool execution intercept through the plugin context.
plugin_context_register_llm_sanitize_request_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmRequestCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM sanitize-request guardrail through the plugin context.
plugin_context_register_llm_sanitize_response_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeJsonCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM sanitize-response guardrail through the plugin context.
plugin_context_register_llm_conditional_execution_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmConditionalCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM conditional-execution guardrail through the plugin context.
plugin_context_register_llm_request_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, break_chain: bool, cb: NemoRelayNativeLlmRequestInterceptCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM request intercept through the plugin context.
plugin_context_register_llm_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM execution intercept through the plugin context.
plugin_context_register_llm_stream_execution_intercept: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, priority: i32, cb: NemoRelayNativeLlmStreamExecutionCb, user_data: *mut c_void, free_fn: NemoRelayNativeFreeFn) -> NemoRelayStatusRegisters an LLM stream execution intercept through the plugin context.
scope_handle_free: unsafe extern "C" fn(handle: *mut NemoRelayNativeScopeHandle)Frees a host-owned scope handle.
scope_get_current: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeHandle) -> NemoRelayStatusRetrieves the current scope handle from the active stack.
scope_push: unsafe extern "C" fn(name: *const NemoRelayNativeString, scope_type: NemoRelayNativeScopeType, parent: *const NemoRelayNativeScopeHandle, attributes: u32, data_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, input_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64, out: *mut *mut NemoRelayNativeScopeHandle) -> NemoRelayStatusPushes a scope, emits its start event, and returns its handle.
scope_pop: unsafe extern "C" fn(handle: *const NemoRelayNativeScopeHandle, output_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64) -> NemoRelayStatusPops a scope handle, emits its end event, and clears scope-local registrations.
emit_mark: unsafe extern "C" fn(name: *const NemoRelayNativeString, parent: *const NemoRelayNativeScopeHandle, data_json: *const NemoRelayNativeString, metadata_json: *const NemoRelayNativeString, timestamp_unix_micros: *const i64) -> NemoRelayStatusEmits a mark event under the current or provided parent scope.
scope_stack_create: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeStack) -> NemoRelayStatusCreates a new independent scope stack with its own root scope.
scope_stack_free: unsafe extern "C" fn(stack: *mut NemoRelayNativeScopeStack)Frees a host-owned scope stack handle.
scope_stack_set_thread: unsafe extern "C" fn(stack: *const NemoRelayNativeScopeStack) -> NemoRelayStatusBinds a scope stack to the current OS thread.
scope_stack_capture_thread: unsafe extern "C" fn(out: *mut *mut NemoRelayNativeScopeStackBinding) -> NemoRelayStatusCaptures the current thread-local scope-stack binding.
scope_stack_restore_thread: unsafe extern "C" fn(binding: *mut NemoRelayNativeScopeStackBinding) -> NemoRelayStatusRestores and frees a captured thread-local scope-stack binding.
scope_stack_binding_free: unsafe extern "C" fn(binding: *mut NemoRelayNativeScopeStackBinding)Frees a captured thread-local binding without restoring it.
scope_stack_active: unsafe extern "C" fn() -> boolReturns whether the current context has an explicitly active scope stack.
scope_stack_with_current: unsafe extern "C" fn(stack: *const NemoRelayNativeScopeStack, cb: NemoRelayNativeWithScopeStackCb, user_data: *mut c_void) -> NemoRelayStatusRuns a callback with the provided scope stack visible to host runtime APIs.
Trait Implementations§
Source§impl Clone for NemoRelayNativeHostApiV1
impl Clone for NemoRelayNativeHostApiV1
Source§fn clone(&self) -> NemoRelayNativeHostApiV1
fn clone(&self) -> NemoRelayNativeHostApiV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more