Struct Plugin Context
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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.
Registration context passed to WorkerPlugin::register.
Implementations
impl PluginContext
Referenced types: PluginContext
new
Creates an empty worker registration context.
with_runtime
Referenced types: PluginRuntime
Creates an empty worker registration context with a host runtime handle.
runtime
Referenced types: Option, PluginRuntime
Returns the host runtime handle for event and scope operations.
register_conditional_middleware_guardrail
Referenced types: str, BTreeSet, RuntimeRegistrationKind, Fn, String, Send, Sync, Future, Result, Option
Declares a callback-based gate installed with this component activation.
register_subscriber
Referenced types: str, Fn, Event, Send, Sync
Registers an event subscriber.
register_event_metadata_injector
Referenced types: str, i32, Fn, Arc, Event, Send, Sync, Future, Result, BTreeMap, String, Json
Registers an Event metadata injector.
register_mark_sanitize_guardrail
Referenced types: str, i32, Fn, Event, EventSanitizeFields, Send, Sync, Future, Result
Registers a mark event sanitizer.
register_scope_sanitize_start_guardrail
Referenced types: str, i32, Fn, Event, EventSanitizeFields, Send, Sync, Future, Result
Registers a scope-start event sanitizer.
register_scope_sanitize_end_guardrail
Referenced types: str, i32, Fn, Event, EventSanitizeFields, Send, Sync, Future, Result
Registers a scope-end event sanitizer.
register_tool_sanitize_request_guardrail
Referenced types: str, i32, Fn, Json, Send, Sync, Future, Result
Registers a tool sanitize-request guardrail.
register_tool_sanitize_response_guardrail
Referenced types: str, i32, Fn, Json, Send, Sync, Future, Result
Registers a tool sanitize-response guardrail.
register_tool_conditional_execution_guardrail
Referenced types: str, i32, Fn, String, Json, Send, Sync, Future, Result, Option
Registers a tool conditional-execution guardrail.
register_tool_request_intercept
Referenced types: str, i32, bool, Fn, String, Json, Send, Sync, Future, Result
Registers a tool request intercept.
register_tool_execution_intercept
Referenced types: str, i32, Fn, ToolExecutionContext, ToolNext, Send, Sync, Future, Result, ToolExecutionInterceptOutcome
Registers a tool execution intercept.
The callback returns a ToolExecutionInterceptOutcome. Calling ToolNext::call continues the chain and returns the downstream ToolExecutionResult; Relay retains downstream pending marks. ToolNext may be called repeatedly or concurrently while the callback is active. Each call snapshots its visible worker scope stack, and Relay rejects late calls or cancels unfinished calls when the callback settles.
register_llm_sanitize_request_guardrail
Referenced types: str, i32, Fn, LlmRequest, LlmSanitizeRequestContext, Send, Sync, Future, Result, Option
Registers an LLM sanitize-request guardrail.
register_llm_sanitize_response_guardrail
Referenced types: str, i32, Fn, Json, LlmSanitizeResponseContext, Send, Sync, Future, Result, Option
Registers an LLM sanitize-response guardrail.
register_llm_conditional_execution_guardrail
Referenced types: str, i32, Fn, LlmRequest, Send, Sync, Future, Result, Option, String
Registers an LLM conditional-execution guardrail.
register_llm_request_intercept
Referenced types: str, i32, bool, Fn, String, LlmRequest, Option, AnnotatedLlmRequest, Send, Sync, Future, Result, LlmRequestInterceptOutcome
Registers an LLM request intercept.
register_llm_execution_intercept
Referenced types: str, i32, Fn, LlmRequest, LlmExecutionContext, LlmNext, Send, Sync, Future, Result, Json
Registers an LLM execution intercept.
LlmNext::call may run repeatedly or concurrently while the callback is active. Each call snapshots its visible worker scope stack, and Relay rejects late calls or cancels unfinished calls when the callback settles.
register_llm_stream_execution_intercept
Referenced types: str, i32, Fn, LlmRequest, LlmExecutionContext, LlmStreamNext, Send, Sync, Future, Result, JsonStream
Registers an LLM stream execution intercept.
LlmStreamNext::call may run repeatedly or concurrently. Each call snapshots its visible worker scope stack. The interceptor’s returned stream keeps the callback active until it closes; Relay then rejects late calls and cancels unfinished calls.
Trait Implementations
impl Default for PluginContext
Referenced types: Default, PluginContext
default
Referenced types: default