SurfSense/surfsense_backend/app/tasks/chat/streaming/contract
CREDO23 88a58f6aff refactor(chat): add streaming/contract/ for file-write contract enforcement
Extracts the desktop_local_folder file-operation contract helpers:

* contract_enforcement_active: gates the contract on filesystem mode.
* evaluate_file_contract_outcome: scores tool outputs as success/no-op.
* log_file_contract: structured logging of contract verdicts.

This is the unit responsible for catching agents that claim to have
written/edited a file without actually invoking the filesystem tool.

Add-only; stream_new_chat.py keeps its inline duplicates until cutover.
2026-05-25 21:48:14 +02:00
..
__init__.py refactor(chat): add streaming/contract/ for file-write contract enforcement 2026-05-25 21:48:14 +02:00
file_contract.py refactor(chat): add streaming/contract/ for file-write contract enforcement 2026-05-25 21:48:14 +02:00