Nous.Plugins.InputGuard.Policy (nous v0.13.3)
View SourceMaps severity levels to policy actions for the InputGuard plugin.
The policy determines what happens when input is flagged at each severity level.
Actions
:block— Halts the agent loop by settingneeds_response: falseand injecting an assistant message indicating the request was blocked.:warn— Injects a system message warning the LLM about the flagged input. Execution continues normally.:log— Logs the violation viaLogger.warning/1. Execution continues unchanged.:callback— Calls the user-providedon_violationfunction from config.fun/2— A functionfn result, ctx -> ctx endfor fully custom handling.
Default Policy
%{suspicious: :warn, blocked: :block}
Summary
Functions
Apply the configured policy action for the given result.
Functions
@spec apply( Nous.Plugins.InputGuard.Result.t(), Nous.Agent.Context.t(), [Nous.Tool.t()], map() ) :: {Nous.Agent.Context.t(), [Nous.Tool.t()]}
Apply the configured policy action for the given result.
Returns the (possibly modified) context and tools tuple.