nemo_relay.plugin
nemo_relay.plugin
Generated from python/nemo_relay/plugin.pyi.
Module nemo_relay.plugin.
Generic plugin configuration and registration helpers.
Classes
ConfigDiagnostic(_ConfigDiagnosticRequired)
One plugin validation diagnostic.
ConfigReport(TypedDict)
Validation or activation report for a plugin config.
PluginContext(Protocol)
Component-scoped registration context passed to custom plugin handlers.
Methods
register_subscriber
Register an infallible event subscriber for this component.
register_tool_sanitize_request_guardrail
Register a tool sanitize-request guardrail for this component.
register_tool_sanitize_response_guardrail
Register a tool sanitize-response guardrail for this component.
register_tool_conditional_execution_guardrail
Register a tool conditional-execution guardrail for this component.
register_llm_sanitize_request_guardrail
Register an LLM sanitize-request guardrail for this component.
register_llm_sanitize_response_guardrail
Register an LLM sanitize-response guardrail for this component.
register_llm_conditional_execution_guardrail
Register an LLM conditional-execution guardrail for this component.
register_llm_request_intercept
Register an LLM request intercept for this component.
register_llm_execution_intercept
Register an LLM execution intercept for this component.
register_llm_stream_execution_intercept
Register an LLM streaming execution intercept for this component.
register_tool_request_intercept
Register a tool request intercept for this component.
register_tool_execution_intercept
Register a tool execution intercept for this component.
Plugin(Protocol)
Custom plugin callback contract.
Methods
validate
Validate one component-local config object.
register
Install middleware and subscribers for one component instance.
ConfigPolicy
Policy for unsupported plugin configuration.
Methods
ConfigPolicy
Create an instance.
to_dict
Serialize this policy to the canonical JSON object shape.
ComponentSpec
One top-level custom plugin component.
Methods
ComponentSpec
Create an instance.
to_dict
Serialize this component to the canonical JSON object shape.
PluginConfig
Canonical plugin configuration document.
Methods
PluginConfig
Create an instance.
to_dict
Serialize this config to the canonical JSON document shape.
Functions
validate
Validate a plugin configuration without changing runtime state.
initialize
Validate and activate a plugin configuration.
clear
Clear the active plugin configuration.
plugin
Context manager for plugin initialization and cleanup.
report
Return the last successful plugin report.
list_kinds
List registered custom plugin kinds.
register
Register a custom plugin implementation.
deregister
Deregister a custom plugin kind.
Type Aliases And Constants
UnsupportedBehavior