Adds an AWSComprehend class to the JS SDK (@arakoodev/edgechains.js/ai) that integrates with AWS Comprehend to detect and redact personally identifiable information (PII) from text — useful for sanitizing prompts before sending them to LLMs.
/claim #290
AWSComprehend class (src/ai/src/lib/aws-comprehend/aws-comprehend.ts)detectPiiEntities() — detect PII entities with optional type filteringcontainsPii() — quick boolean check for PII presenceredact() — replace PII with mask characters while preserving text structureredactPrompt() — convenience one-liner that returns the redacted stringsrc/ai/src/tests/awsComprehend.test.ts)examples/aws-comprehend-redaction/)@aws-sdk/client-comprehend to package.jsonimport { AWSComprehend } from "@arakoodev/edgechains.js/ai";
const comprehend = new AWSComprehend();
// Redact PII before sending to LLM
const safePrompt = await comprehend.redactPrompt("My name is John Smith, SSN 123-45-6789");
// → "My name is **********, SSN ***********"
maoshuorz
@maoshuorz
Arakoo.ai
@arakoodev
gittare
@gittare