Skip to content

BOUNTY: AWS Comprehend PII redactor (issue #290)#599

Open
syutoutousai wants to merge 1 commit into
arakoodev:tsfrom
syutoutousai:feat/comprehend-redactor
Open

BOUNTY: AWS Comprehend PII redactor (issue #290)#599
syutoutousai wants to merge 1 commit into
arakoodev:tsfrom
syutoutousai:feat/comprehend-redactor

Conversation

@syutoutousai

Copy link
Copy Markdown

Summary

Implements a ComprehendRedactor class that integrates AWS Comprehend for PII detection and redaction, chainable with existing Endpoint classes via RxJS observables.

Changes

  • New: ComprehendRedactor class in src/ai/src/lib/comprehend-redactor/
    • redact(text, piiTypes?) — async PII detection + masking
    • redact$(text) — Observable-based single-shot
    • mask$(source$) — chainable observable operator for piping with Endpoint classes
  • Tests: 4 test cases covering redaction, type filtering, observable emit, and mask$ chaining
  • Example: examples/pii-redaction/ demonstrating full pipeline (redact → LLM)
  • Deps: @aws-sdk/client-comprehend, rxjs

Usage

const redactor = new ComprehendRedactor();
const { redacted } = await redactor.redact(userPrompt);
const response = await openai.chat({ prompt: redacted });

// Or chain with observables:
openai.chat$({ prompt }).pipe(redactor.mask$());

Closes #290

…v#290)

- New ComprehendRedactor class with async redact() and RxJS observable support

- mask operator for chaining with existing Endpoint classes

- Test coverage for redact, type filtering, observable emit, and mask$ chaining

- Example demonstrating PII redaction + LLM pipeline

- Add @aws-sdk/client-comprehend and rxjs dependencies
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Before we can accept your contribution, we ask that you sign the Arakoo Contributor License Agreement. You can sign the CLA by adding a new comment to this pull request and pasting exactly the following text.


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


You can retrigger this bot by commenting recheck in this Pull Request

@syutoutousai

Copy link
Copy Markdown
Author

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

3 similar comments
@syutoutousai

Copy link
Copy Markdown
Author

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

@syutoutousai

Copy link
Copy Markdown
Author

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

@syutoutousai

Copy link
Copy Markdown
Author

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

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