## browseAndPlay Tool Spec Plays a YouTube video on the shared screen so it appears on the Go-Live broadcast. Used when the user asks the assistant to play / watch a song, music video, or clip. ### Behaviour - Public schema is a single required `query` string (what to play). - **Mode-gated**: only acts when `STREAM_BROWSER` is true (`cfg.stream_browser`). In voice-only mode (false) there is no screen to show, so it returns a short message and does nothing. - Drives the on-screen Chrome by subprocessing the Node CDP helper `bot/scripts/stream-test/browse-search.mjs youtube`, which searches YouTube and plays the first result on display `:1`. The broadcast captures that display, so the playback is what viewers see. - Returns `success` with the played video's title, or a failure message if the helper/Chrome is unavailable. It does NOT make an LLM call. ### Principles - The Node layer owns Chrome/CDP; the Python tool only shells out to it, so the brain stays free of a browser dependency. - Fail-open and explicit: any error returns a plain failure message rather than raising into the reply loop.