-
Notifications
You must be signed in to change notification settings - Fork 941
feat: blacklist redaction option #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull Request Review: Custom Entity Redaction FeatureOverall AssessmentThis is a well-structured PR that adds valuable functionality for custom entity redaction using natural language descriptions. The implementation is consistent across CLI, TypeScript SDK, and Python SDK, with good documentation and test coverage. Recommendation: ✅ Approve with minor suggestions for improvement Code Quality & Best Practices✅ Strengths
|
| Category | Rating | Notes |
|---|---|---|
| Code Quality | ⭐⭐⭐⭐ | Clean, consistent, well-structured |
| Security | ⭐⭐⭐⭐ | No major concerns, minor considerations documented |
| Performance | ⭐⭐⭐⭐⭐ | Minimal overhead, efficient implementation |
| Test Coverage | ⭐⭐⭐ | Good coverage, room for edge case tests |
| Documentation | ⭐⭐⭐⭐⭐ | Comprehensive and clear |
Action Items (Priority Order)
- High: Fix CLI argument parsing to validate flag values
- Medium: Align empty array handling between TypeScript and Python
- Medium: Add entity description validation/sanitization
- Low: Add edge case tests
- Low: Document entity + URL whitelist interaction
Conclusion
This is a solid feature addition that follows the project's conventions and maintains consistency across platforms. The implementation is secure and performant. With the minor improvements suggested above, this PR will be excellent.
Great work! 🎉
Review generated on 2025-10-16
Description
This pull request introduces custom entity redaction to the Superagent CLI and SDKs, allowing users to specify which types of PII to redact using natural language descriptions. The CLI now supports a
--entitiesflag, and both the TypeScript and Python SDKs accept anentitiesparameter for flexible, context-aware redaction. Documentation and tests have been updated to reflect and validate these new features.Custom Entity Redaction Feature
entitiesparameter in theredact()method. The CLI now accepts a--entitiesflag for the same purpose. [1] [2] [3] [4] [5] [6]entitieslist if provided, enabling AI-powered interpretation of custom entity descriptions. [1] [2]Documentation Updates
API and Type Safety Improvements
RedactOptionsinterface to the TypeScript SDK for better type safety and extended theClientinterface to support the new options.reasoningfield in API responses for both SDKs, with backward compatibility for the previousreasoning_contentfield. [1] [2] [3] [4]Testing Enhancements
Version Bumps
Change references: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21]
Related Issue
Fixes #1053
Checklist