AR

/claim #290

Summary

Adds an AWS Comprehend PII redaction utility to the JavaScript SDK.

What changed

  • Added AWSComprehendPIIRedactor in the AI package.
  • Supports direct text redaction, chat prompt redaction, chat message redaction, and wrapChat() for endpoint-style chaining before existing chat() calls.
  • Uses the official AWS Comprehend client by default, with an injectable detectPiiEntities client for local tests and examples.
  • Handles reverse-order redaction so replacing earlier entities does not shift later offsets.
  • Adds a credential-free local example in JS/edgechains/examples/aws-comprehend-pii-redaction.

Demo evidence

The demo does not require AWS credentials, private data, camera access, or any paid service.

Verification

  • npx vitest run src/ai/src/tests/comprehend.test.ts - 4 tests passed
  • npx tsc -p tsconfig.json --noEmit - passed
  • npm run start in JS/edgechains/examples/aws-comprehend-pii-redaction

Example output:

Endpoint received: Summarize this customer note: [NAME], [EMAIL], called about billing.

Claim

Total prize pool $75
Total paid $0
Status Pending
Submitted June 14, 2026
Last updated June 14, 2026

Contributors

DE

Deivid00007

@Deivid00007

100%

Sponsors

AR

Arakoo.ai

@arakoodev

$25
GI

gittare

@gittare

$50