@msm-core/safety
v0.1.1
Published
Agent trust guardrails — PII detection/redaction (Luhn-checked), prompt-injection detection, groundedness, and a tool-output safety filter. Pure, deterministic, dependency-free.
Downloads
347
Maintainers
Readme
@msm-core/safety
Agent trust guardrails — pure, deterministic, dependency-free.
detectPii/redactPii— direct-identifier detection +[REDACTED:type]redaction (Luhn-checked cards; deploymentextraPatterns).detectPromptInjection(aliasdetectInjection) — jailbreak / instruction-override flagging with a score.checkGroundedness— flags a substantive answer that cited nothing.makeSafetyFilter(cfg)— the wrapper a runtime applies to each tool result (redact + flag/block perguardMode).filterView— scrub text in structured tool views;INJECTION_REFUSAL— a neutral block message.
Consolidated from the duplicated per-product guards in platform-ai and uniagent.
