Package com.axelor.ai.chat.plugin
Class RiskScreenPlugin
java.lang.Object
com.axelor.ai.chat.plugin.RiskScreenPlugin
- All Implemented Interfaces:
ChatPlugin
The third layer of the confused-deputy defence: before the target agent consumes a discussion
containing other members' text, an internal risk-assessor agent screens the fresh span (the human
messages since the agent's last reply) for manipulation attempts. Findings do two jobs: they
surface to the summoner as a notify banner before any approval, and they append to the folded
instruction as concrete distrust anchors for the model.
Advisory, never the gate: the screen fails open on any error or timeout — the deterministic mutation-approval guard (foreign text ⇒ approval) stays load-bearing. Solo owner↔agent chats never pay the cost: no fresh foreign text, no screen.
-
Method Summary
Modifier and TypeMethodDescriptiondecorateWriter(ChatRequest request, StreamWriter writer) Wraps the stream writer to intercept events (e.g.onRequest(ChatRequest request) Called before the loop starts.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.chat.ChatPlugin
decorateProvider, decorateToolExecutor, estimateInjectedTokens, onComplete, onError, onMessage, priority
-
Method Details
-
onRequest
Description copied from interface:ChatPluginCalled before the loop starts. May inspect or transform the request (e.g. resolve agent config, check rate limits).- Specified by:
onRequestin interfaceChatPlugin
-
decorateWriter
Description copied from interface:ChatPluginWraps the stream writer to intercept events (e.g. persistence, metrics).- Specified by:
decorateWriterin interfaceChatPlugin
-