Skip to content

Add AWS Comprehend PII redactor - #557

Open
Simultech369 wants to merge 2 commits into
arakoodev:tsfrom
Simultech369:codex/aws-comprehend-redactor
Open

Simultech369 wants to merge 2 commits into
arakoodev:tsfrom
Simultech369:codex/aws-comprehend-redactor

Conversation

@Simultech369

Copy link
Copy Markdown

Summary

  • Add a ComprehendRedactor utility for AWS Comprehend-style PII redaction
  • Support simple detectPiiEntities(input) clients and AWS SDK v3-style send(command) clients via command factories
  • Add configurable language code, replacement behavior, and minimum confidence filtering
  • Export the utility from the AI package
  • Add tests for redaction, confidence filtering, custom replacements, and SDK-v3 style usage

Closes #290

Test Plan

  • npx.cmd vitest run comprehendRedactor
  • npx.cmd tsc -b
  • git diff --check

@github-actions

github-actions Bot commented May 26, 2026 •

Copy link
Copy Markdown

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

@Simultech369

Copy link
Copy Markdown
Author

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

1 similar comment
@Simultech369

Copy link
Copy Markdown
Author

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

@Simultech369

Copy link
Copy Markdown
Author

recheck

@Simultech369

Copy link
Copy Markdown
Author

/claim #290

@Simultech369

Copy link
Copy Markdown
Author

I am cleaning up older open PRs on my account. If this #290 PII-redactor slice is still reviewable or eligible, I am happy to keep it open and make changes.

Otherwise, I will close it after a short grace period to reduce queue noise.

@Simultech369

Copy link
Copy Markdown
Author

Updated this PR to fulfill all acceptance criteria for #290:

  • Added ComprehendRedactorEndpoint allowing automatic chaining with existing EdgeChains AI endpoints (OpenAI, GeminiAI, LlamaAI, or any chat endpoint) via redactor.chain(endpoint).
  • Added reactive SimpleObservable stream support via redactor.observe(prompt) and observeAndChat() for stream pipelines.
  • Added comprehensive unit tests covering prompt & message redaction chaining and observable streaming.
  • Added a full runnable working example in JS/edgechains/examples/aws-comprehend-redactor/ with complete documentation.

Ready for review and merge @sandys!
Payout address (Base USDC): 0xEa3A353Fb3fc88DB8F0FA1E6Ea541FEdc9F5F0E7

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.

BOUNTY: integrate AWS Comprehend as a utility to redact data

1 participant