Adds crisis detection and response system with 5-tier classification: - crisis/PROTOCOL.md: Crisis response protocol and tier definitions - crisis/detect.py: Tiered indicator engine (LOW/MEDIUM/HIGH/CRITICAL) - crisis/response.py: Timmy's crisis responses and UI flag generation - crisis/gateway.py: API gateway wrapper for crisis detection - crisis/tests.py: Unit tests for all crisis modules Integrates with existing crisis UI components in index.html. All smoke tests pass.
23 lines
630 B
Python
23 lines
630 B
Python
"""
|
|
Crisis detection and response system for the-door.
|
|
|
|
Stands between a broken man and a machine that would tell him to die.
|
|
"""
|
|
|
|
from .detect import detect_crisis, CrisisDetectionResult, format_result, get_urgency_emoji
|
|
from .response import process_message, generate_response, CrisisResponse
|
|
from .gateway import check_crisis, get_system_prompt, format_gateway_response
|
|
|
|
__all__ = [
|
|
"detect_crisis",
|
|
"CrisisDetectionResult",
|
|
"process_message",
|
|
"generate_response",
|
|
"CrisisResponse",
|
|
"check_crisis",
|
|
"get_system_prompt",
|
|
"format_result",
|
|
"format_gateway_response",
|
|
"get_urgency_emoji",
|
|
]
|