Sanitized Fetch Middleware

Calciforge currently focuses on flagging external content with clean, review, or unsafe verdicts. A future fetch pipeline may also support sanitizing content before it reaches a model.

Why Consider It

Flagging preserves the original content and produces auditable policy decisions. Sanitizing can reduce exposure by stripping hidden or irrelevant content before model ingestion, but it may also remove legitimate context, break pages, or make it harder to understand what was changed.

Sanitizing is also a token-budget feature. HTML-to-markdown conversion, readability extraction, and boilerplate removal can reduce bandwidth, latency, and model context pressure by removing navigation, scripts, styles, ads, duplicated chrome, comments, and hidden content before the agent sees it.

Useful modes to evaluate:

Design Questions

Implementation Paths

The red-team fixture suite in examples/red-team/ should grow sanitizer cases alongside scanner cases before this becomes a default behavior.