Type Alias Nemo Relay Tool Exec Intercept Cb

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub type NemoRelayToolExecInterceptCb = unsafe extern "C" fn(user_data: *mut c_void, args_json: *const c_char, next_fn: NemoRelayToolExecNextFn, next_ctx: *mut c_void) -> *mut c_char;

Callback for tool execution intercepts. Receives arguments as JSON plus a next callback and its context. Call next_fn(args, next_ctx) to invoke the next layer in the middleware chain, or return directly to short-circuit. The result field is passed to the remaining middleware and application; pending_marks are Relay-owned lifecycle metadata emitted after the tool-end event and are not included in the application-visible result. The returned JSON must contain a result field and may contain a pending_marks array. The returned string must be allocated with malloc or an equivalent allocation compatible with nemo_relay_string_free. Ownership transfers to Relay when the callback returns; the callback must not free or reuse the string afterward, and Relay frees it exactly once.