Skip to content

Add AWS Comprehend prompt redaction utility#546

Open
DYSfu wants to merge 1 commit into
arakoodev:tsfrom
DYSfu:dysfu/aws-comprehend-redactor
Open

Add AWS Comprehend prompt redaction utility#546
DYSfu wants to merge 1 commit into
arakoodev:tsfrom
DYSfu:dysfu/aws-comprehend-redactor

Conversation

@DYSfu
Copy link
Copy Markdown

@DYSfu DYSfu commented May 23, 2026

/claim #290

Summary

  • add an AWSComprehendRedactor utility with an injectable Comprehend-compatible client
  • add an AWSComprehendSdkAdapter for callers using the AWS SDK v3 client/command pair
  • support direct text redaction, prompt/message redaction, endpoint-style chat() chaining, score/type filters, and custom replacements
  • export the utility and public types from the AI package
  • add mocked Vitest coverage and a runnable aws-comprehend-redaction example

Validation

  • npx vitest run src/ai/src/tests/aws-comprehend/aws-comprehend-redactor.test.ts
  • npx tsc -b
  • npx prettier --check src/ai/src/lib/aws-comprehend/aws-comprehend-redactor.ts src/ai/src/tests/aws-comprehend/aws-comprehend-redactor.test.ts src/ai/src/index.ts
  • cd JS/edgechains/examples/aws-comprehend-redaction && npm install --package-lock=false --ignore-scripts --no-audit --no-fund --progress=false --loglevel=warn && npm run build && npm start

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 23, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@DYSfu
Copy link
Copy Markdown
Author

DYSfu commented May 23, 2026

I have read the Arakoo CLA Document and I hereby sign the CLA

@DYSfu
Copy link
Copy Markdown
Author

DYSfu commented May 23, 2026

recheck

@DYSfu
Copy link
Copy Markdown
Author

DYSfu commented May 23, 2026

Demo showing the AWS Comprehend-compatible redactor example building and redacting EMAIL/PHONE before the prompt reaches an endpoint-style chat client.

edgechains-aws-comprehend-redaction-demo.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant