"""Message types flowing between nodes.""" from dataclasses import dataclass, field @dataclass class Envelope: """What flows between nodes.""" text: str user_id: str = "anon" session_id: str = "" timestamp: str = "" @dataclass class Command: """Input node's perception — describes what was heard.""" instruction: str source_text: str metadata: dict = field(default_factory=dict) @dataclass class ThoughtResult: """Thinker node's output — either a direct answer or tool results.""" response: str tool_used: str = "" tool_output: str = "" controls: list = field(default_factory=list)