Function nemo_relay_scope_register_tool_conditional_execution_guardrail

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

#[unsafe(no_mangle)]pub unsafe extern "C" fn nemo_relay_scope_register_tool_conditional_execution_guardrail(
    scope_uuid: *const c_char,
    name: *const c_char,
    priority: i32,
    cb: NemoRelayToolConditionalCb,
    user_data: *mut c_void,
    free_fn: NemoRelayFreeFn,
) -> NemoRelayStatus

Register a scope-local tool conditional execution guardrail.

Parameters

  • scope_uuid: UUID of the target scope (null-terminated C string).
  • name: Unique guardrail name.
  • priority: Execution priority (lower runs first).
  • cb: Conditional callback.
  • user_data: Opaque pointer passed to cb.
  • free_fn: Optional destructor for user_data.

The callback is fallible. To signal an internal callback failure instead of allow/reject, call crate::error::nemo_relay_set_last_error_message from C and return null.

Safety

scope_uuid and name must be valid C strings. cb must be a valid function pointer.