File size: 1,731 Bytes
2ade2c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""Shared task structures for SupportDesk."""

from __future__ import annotations

from dataclasses import dataclass
from typing import Literal

from models import KnowledgeSnippet, SupportTicket

ALL_QUEUES = [
    "billing_ops",
    "trust_and_safety",
    "platform_engineering",
    "compliance_ops",
    "general_support",
]
ALL_PRIORITIES = ["low", "normal", "high", "urgent"]
ALL_STATUSES = ["new", "waiting_on_customer", "resolved", "escalated"]
ALL_ISSUE_TYPES = [
    "duplicate_charge",
    "account_compromise",
    "production_incident",
    "regulated_exception",
    "general_question",
]


@dataclass(frozen=True)
class SupportTaskSpec:
    task_id: str
    difficulty: Literal["easy", "medium", "hard"]
    title: str
    objective: str
    ticket: SupportTicket
    knowledge_base: tuple[KnowledgeSnippet, ...]
    gold_queue: str
    gold_priority: str
    gold_issue_type: str
    gold_status: str
    gold_resolution_code: str
    required_requested_fields: tuple[str, ...]
    required_reply_markers: tuple[tuple[str, ...], ...]
    required_note_markers: tuple[tuple[str, ...], ...]
    forbidden_reply_markers: tuple[str, ...] = ()
    risk_flags: tuple[str, ...] = ()
    follow_up_outcome: Literal["none", "partial", "complete", "incorrect"] = "none"
    follow_up_message: str = ""
    follow_up_provided_fields: tuple[str, ...] = ()
    follow_up_wrong_fields: tuple[str, ...] = ()
    sla_step_cost: int = 15
    over_escalation_queues: tuple[str, ...] = ()
    under_escalation_deadline_step: int | None = None
    max_steps: int = 6


__all__ = [
    "SupportTaskSpec",
    "KnowledgeSnippet",
    "SupportTicket",
    "ALL_QUEUES",
    "ALL_PRIORITIES",
    "ALL_STATUSES",
    "ALL_ISSUE_TYPES",
]