Files
docs/mail-intake/mcp/modules/mail_intake.parsers.subject.json
Vishesh 'ironeagle' Bangotra 9929f05334 refactor: serve MCP bundles under <name>/mcp with nginx guard; rename core->mcp_server
- collect.py: copy repo MCP bundles to ROOT/<name>/mcp (instead of ROOT/mcp/<name>); add nginx location guard to deny /<name>/mcp/
- config.py: bundle roots now point to <repo>/mcp and standards/mcp for static bundles
- Rename core.py -> mcp_server.py and update imports in main.py and registry.py
- Dockerfile: per-repo MCP COPYs under /app/<name>/mcp, drop blog copy; add ports 8008/8009 in .drone.yml
- Restore standards/mcp/libraries.json from git for registry server
2026-10-11 23:37:46 +05:30

16 lines
1.4 KiB
JSON

{
"module": "mail_intake.parsers.subject",
"content": {
"path": "mail_intake.parsers.subject",
"docstring": "# Summary\n\nSubject line normalization utilities for Mail Intake.\n\nThis module provides helper functions for normalizing email subject lines\nto enable reliable thread-level comparison and grouping.\n\nNormalization is intentionally conservative to avoid altering semantic\nmeaning while removing common reply and forward prefixes.",
"objects": {
"normalize_subject": {
"name": "normalize_subject",
"kind": "function",
"path": "mail_intake.parsers.subject.normalize_subject",
"signature": "normalize_subject(subject: str) -> str",
"docstring": "Normalize an email subject for thread-level comparison.\n\nArgs:\n subject (str):\n Raw subject line from a message header.\n\nReturns:\n str:\n Normalized subject string suitable for thread grouping.\n\nNotes:\n **Responsibilities:**\n\n - Strips common prefixes such as `Re:`, `Fwd:`, and `FW:`.\n - Repeats prefix stripping to handle stacked prefixes.\n - Collapses excessive whitespace.\n - Preserves original casing (no lowercasing).\n\n **Guarantees:**\n\n - This function is intentionally conservative and avoids aggressive\n transformations that could alter the semantic meaning of the subject."
}
}
}
}