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.
RuntimeDiagnostic(_RuntimeDiagnosticRequired)
One aggregated runtime failure from an active plugin.
ConfigReport(TypedDict)
Validation or activation report for a plugin config.
DynamicPluginValidationStatus(_DynamicPluginValidationStatusRequired)
DynamicPluginFailure(TypedDict)
Actionable reason a dynamic plugin could not be trusted or loaded.
DynamicPluginValidationReport(_DynamicPluginValidationReportRequired)
PluginHostReport(TypedDict)
Static and dynamic validation results owned by one plugin host.
PluginContext(Protocol)
Component-scoped registration context passed to custom plugin handlers.
Methods
register_subscriber
Register an infallible event subscriber for this component.
register_conditional_middleware_guardrail
Register an activation-owned gate for a global runtime registration.
register_event_metadata_injector
Register an event metadata injector for this component.
register_mark_sanitize_guardrail
Register a mark event sanitizer for this component.
register_scope_sanitize_start_guardrail
Register a scope-start event sanitizer for this component.
register_scope_sanitize_end_guardrail
Register a scope-end event sanitizer 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.
PluginHostActivation
Owned lifetime for one process-wide static and dynamic plugin host.
Methods
report
Return the validation report captured during activation.
is_active
Return whether this activation handle has not begun teardown.
close
Clear callbacks and unload plugins; repeated calls are safe.
Functions
initialize
Initialize the core-owned static and dynamic plugin host.
activate
Initialize and close the plugin host around an async context.
validate
Validate the core-owned static and dynamic plugin host.
validate_exact
Validate only the supplied static plugin configuration.
list_kinds
List registered custom plugin kinds.
register
Register a custom plugin implementation.
deregister
Deregister a custom plugin kind.
Type Aliases And Constants
DynamicPluginCheckStateDynamicPluginKindUnsupportedBehavior