{value: string, source: string}. */ public array $fact_slots = array(); /** * Response blocks (shared block schema; see src-js/shared/blocks.ts). */ public array $blocks = array(); /** * Diagnostics: timings, engine, degrade reasons, guard hits, events. */ public array $meta = array(); /** * Constructor. * * @param int $session_id Session row id. * @param string $raw Original visitor message (preserved for AI tiers). * @param string $site_lang Site locale. */ public function __construct( public readonly int $session_id, public readonly string $raw, string $site_lang = '', ) { $this->site_lang = $site_lang; } /** * Append a response block. * * @param array $block Block (type + payload per the shared schema). */ public function add_block( array $block ): void { $this->blocks[] = $block; } /** * Record a diagnostic value. * * @param string $key Meta key. * @param mixed $value Value. */ public function note( string $key, mixed $value ): void { $this->meta[ $key ] = $value; } }