PatternContentGuardOptions
AgentPrism.Core.dllSettings for the built-in pattern-based guard.
public sealed class PatternContentGuardOptionsInheritance
Section titled “Inheritance”object ← PatternContentGuardOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the AgentPrism:ContentGuard:Pattern configuration section.
This class deliberately has no Enabled flag. The no-surprises rule’s
gate is the registration itself: AddAgentPrism does not register the
built-in guard, so in a default setup the inspection wrapper is never added
to the pipeline and the cost is exactly zero. Adding an
Enabled flag would require the guard to be registered but turned off;
then the claim “if no guard is registered the cost is zero” would become
unmeasurable.
If you need to keep the guard running but temporarily disable it, empty PatternContentGuardOptions.DeniedTerms and set PatternContentGuardOptions.MaskedPii to PiiPatterns.None: the guard then sees no rule and returns ContentGuardResult.Allow on the first inspection.
Constructors
Section titled “Constructors”PatternContentGuardOptions()
Section titled “ PatternContentGuardOptions()”public PatternContentGuardOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "AgentPrism:ContentGuard:Pattern"Field Value
Section titled “Field Value”Properties
Section titled “Properties”DeniedTerms
Section titled “ DeniedTerms”Denied terms. A match produces ContentGuardAction.Block.
public IList<string> DeniedTerms { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The comparison is case-insensitive and searches for a word fragment
(IndexOf); it is not a regex, so a value the consumer writes
carries no ReDoS risk.
MaskReplacement
Section titled “ MaskReplacement”The text written in place of a masked match. Default [redacted].
public string MaskReplacement { get; set; }Property Value
Section titled “Property Value”MaskedPii
Section titled “ MaskedPii”The built-in PII patterns to turn on. A match produces ContentGuardAction.Mask. Default PiiPatterns.None.
public PiiPatterns MaskedPii { get; set; }