# Dispatch Spot v242

## Summary
- Added controlled live browser token consumption and dialer session handshake staging for CORI’s Quotes.
- Kept the flow gated by Twilio readiness, target-phone presence, and call-consent posture.
- Extended the quote workspace so operators can see when the dialer is truly ready to move from token issuance into controlled live session setup.

## What changed
1. Live dialer session handshake backend route added
   - Added `app/api/voice/twilio/live-session/route.ts`
   - The new route:
     - consumes a live browser token through the existing readiness contract
     - checks for a real phone target
     - checks consent posture when call consent is required
     - returns clear blocked reasons when the session cannot move forward

2. Controlled token-consumption session contract added
   - The new route now returns:
     - session status
     - token consumption status
     - handshake status
     - dialer state feedback
     - target phone
     - identity
     - token preview
     - expiry time
     - region

3. CORI’s Quotes live handshake section added
   - Updated `app/(dashboard)/cori/quotes/page.tsx`
   - Added a new section:
     - `Controlled browser token consumption and live dialer session handshake track`
   - Added actions:
     - `Start live handshake`
     - `Reset`

4. Controlled handshake visibility added
   - The new UI surfaces:
     - session status
     - token consumption
     - handshake status
     - dialer feedback
     - target phone
     - consent posture
     - transcript-assist posture
     - token preview / expiry / region

5. Dialer follow-through continuity added
   - When the live handshake comes back ready, the page now moves the in-app browser dialer into the connected posture so the operator can see the workflow progress inside the same workspace.

6. Canonical documentation updated
   - Updated:
     - `CHANGELOG.md`
   - Added:
     - `dispatchspot_next_phase_handoff_v242.md`
     - `dispatchspot_next_phase_handoff_v242.html`

## What's Visible
When you log in and open CORI’s Quotes, this is what you will see and where you will see it:

1. Below the mock activation section
   - You will now see a new section named:
     - `Controlled browser token consumption and live dialer session handshake track`

2. At the top-right of that section
   - You will now see two buttons:
     - `Start live handshake`
     - `Reset`

3. Inside that section’s summary cards
   - You will now see cards for:
     - session status
     - token consumption
     - handshake status
     - dialer feedback

4. In the live dialer session handshake result block
   - You will now see:
     - target phone
     - consent state
     - transcript-assist state
     - identity
     - token preview
     - expiry time
     - voice region
     - a plain-language readiness or blocked message

5. After a successful live handshake
   - The browser dialer area lower on the page will move into connected posture so you can see that the quote workspace progressed from token readiness into controlled session staging.

## Important note
- There are no Prisma schema changes in v242.
- This build still does not claim that a real provider-side Twilio call is connected. It stages controlled live token consumption and handshake readiness inside the app first.
- Live success still depends on valid Twilio env vars plus workspace/provider posture on your deployed server.
- I could not run a full dependency-aware Next.js build in this sandbox because installed project dependencies are not present here.

## Next
- This sets up the next logical step for provider-side dialer connection follow-through, real browser-device wiring, or controlled session lifecycle logging.
