*/ public function rules(): array { return [ 'role' => ['required', 'string', Rule::in([ Message::ROLE_USER, Message::ROLE_AGENT, Message::ROLE_TOOL, Message::ROLE_SYSTEM, ])], 'type' => ['required', 'string', 'max:64'], 'content' => ['nullable', 'string'], 'payload' => ['nullable', 'array'], 'reply_to' => ['nullable', 'uuid'], 'dedupe_key' => ['nullable', 'string', 'max:128'], ]; } }