> This page is for NeMo Relay, version dev.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.1) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.11.1: https://docs.nvidia.com/nemo/relay/v0.11.1/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Trait Plugin Registration Context

> Host capabilities available to plugins during component activation.

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`.

<pre />

Host capabilities available to plugins during component activation.

Hosts retain ownership of registry mutation, namespacing, rollback, and activation diagnostics. Implementations do not depend on a runtime crate.

## Required Methods

#### `qualify_name`

<pre />

Qualify a component-local registration name.

#### `register_subscriber`

<pre />

Install a subscriber and track its rollback.

#### `add_registration`

<pre />

Track an already-created resource's cleanup operation.

#### `record_activation_diagnostic`

<pre />

Record an activation diagnostic.

#### `record_nonfatal_activation_failure`

<pre />

Record an optional exporter initialization failure without aborting activation.

#### `activation_diagnostics`

<pre />

Read activation diagnostics recorded so far.

#### `register_conditional_middleware_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_event_metadata_injector`

<pre />

Install middleware and track its rollback.

#### `register_mark_sanitize_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_scope_sanitize_start_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_scope_sanitize_end_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_llm_request_intercept`

<pre />

Install middleware and track its rollback.

#### `register_tool_sanitize_request_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_tool_sanitize_response_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_tool_conditional_execution_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_llm_sanitize_request_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_llm_sanitize_response_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_llm_conditional_execution_guardrail`

<pre />

Install middleware and track its rollback.

#### `register_llm_execution_intercept`

<pre />

Install middleware and track its rollback.

#### `register_llm_stream_execution_intercept`

<pre />

Install middleware and track its rollback.

#### `register_tool_request_intercept`

<pre />

Install middleware and track its rollback.

#### `register_tool_execution_intercept`

<pre />

Install middleware and track its rollback.

#### `uses_plugin_component_namespace`

<pre />

Whether registration names belong to a plugin component namespace.

#### `with_child_namespace`

<pre />

Create an independent registration context nested under this namespace.

#### `into_registrations`

<pre />

Consume this context's cleanup entries.

## Provided Methods

#### `diagnostics_context`

<pre />

Optional diagnostic producer context supplied by the embedding runtime.

Runtime-specific components may downcast this handle to their runtime's diagnostic facade. Shared plugins must tolerate an unavailable context.

#### `extend_registrations`

<pre />

Track cleanup entries returned by a nested context or language adapter.

## Implementors

### `impl PluginRegistrationContext for HostPluginRegistrationContext`

<pre />