Skip to content

feat(output): add --suppress-reads flag#136

Open
hayatosc wants to merge 1 commit intoopenclaw:mainfrom
hayatosc:feat/suppress-reads-output
Open

feat(output): add --suppress-reads flag#136
hayatosc wants to merge 1 commit intoopenclaw:mainfrom
hayatosc:feat/suppress-reads-output

Conversation

@hayatosc
Copy link

close #134

This pull request introduces a new --suppress-reads flag to the CLI, allowing users to suppress the output of raw file contents from read operations in both human-readable and JSON output formats. This is particularly useful for privacy or security-sensitive scenarios, or to reduce noise in agent-to-agent pipelines. The flag is documented across CLI help, documentation, and skill reference files, and is implemented with careful handling in both output formatting and CLI flag resolution.

Key changes:

Feature: Suppress Read Output

  • Added a --suppress-reads global CLI flag that replaces raw file contents with [read output suppressed] in both text and json output formats, while leaving quiet mode unchanged. This is reflected in CLI flag parsing, documentation, and the help output.

  • Implemented suppression logic in the output formatters:

    • For JSON output, read responses and read-like tool outputs are sanitized to replace file contents with the suppression marker.
    • For text output, similar suppression is performed when rendering tool outputs.

CLI and Core Integration

  • Updated CLI core logic to propagate the suppressReads flag through output policy resolution and formatter creation, ensuring consistent behavior across prompt and exec commands.

  • Extended the GlobalFlags and output policy types to include the new suppressReads option, ensuring type safety and future extensibility.

Documentation

  • Thoroughly documented the new flag in docs/CLI.md, README.md, and skills/acpx/SKILL.md, including usage examples and behavioral details.

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.

Add output format option to suppress file READ operations while showing tool executions

1 participant