"""A task's objective and the notification that caused it to run now."""from__future__importannotationsfromdataclassesimportdataclass,fieldfromtypingimportAny,Dictfromsim_platform.domain.modelsimportContractError
[docs]@dataclass(frozen=True)classTask:"""Tell the agent what to do, separately from Runtime's wake-up bookkeeping. instruction is the task to perform. notification carries the wake reason and timing/events, not current market data. Work IDs remain on AgentClient. """instruction:strnotification:Dict[str,Any]=field(default_factory=dict)def__post_init__(self)->None:ifnotisinstance(self.instruction,str)ornotself.instruction.strip():raiseContractError('task requires a nonempty instruction')