feat: add redaction support to cli #1047
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces enhancements to the Superagent CLI and SDK to support automated redaction of sensitive data (PII/PHI) for compliance, improves output formatting, and upgrades dependencies. The most important changes are grouped below.
Redaction Feature and CLI Enhancements:
--redactedflag to the CLI (guardCommandincli/src/commands/guard.ts) to enable redaction of sensitive data (PII/PHI) in prompts. When enabled, the CLI uses the new redaction feature in the SDK. [1] [2]redactedfield when redaction is enabled.SDK Redaction Support:
superagent-aidependency to v0.0.7 in bothcli/package.jsonandcli/package-lock.json, enabling new redaction capabilities. [1] [2] [3]redactedoption increateGuard()for automatic PII/PHI redaction, and theGuardResultresponse includes aredactedfield containing the sanitized prompt.Documentation and Versioning:
CHANGELOG.mddocumenting all notable changes, including the new redaction feature, output format improvements, and compliance-focused enhancements for SOC2, HIPAA, and GDPR.0.0.5to reflect new features and dependency updates.Related Issue
Fixes #1045
Checklist