Dispatch Spot v241
Summary
- Added live browser token issuance backend wiring for the Twilio token contract.
- Expanded CORI’s Quotes so operators can see real live-token readiness posture and issue a controlled token when the workspace is actually ready.
- Preserved staged rollout gating so the app does not pretend live calling is active when provider or workspace posture is incomplete.
What changed
- Live token contract helper added
- Added
src/modules/voice/twilio-token.contract.ts
- Introduced workspace-gated readiness checks for env mapping, staged rollout, credential readiness, browser token posture, dispatcher voice-assist policy, and provider-ready token service posture.
- Added signed JWT issuance using Node crypto when all required conditions are satisfied.
- Token backend route upgraded
- Updated
app/api/voice/twilio/token/route.ts
- The route now supports both readiness/foundation response and controlled live-token issuance mode.
- Added explicit blocked-reason output when live issuance cannot proceed.
- CORI’s Quotes token section expanded
- Updated
app/(dashboard)/cori/quotes/page.tsx
- Added provider-posture visibility and a new
Issue live token action.
- Added live-token readiness signals for provider ready, voice assist allowed, and live token ready.
- Token issuance result visibility added
- When a token is issued, the section now surfaces token preview, expiry time, voice region, and optional full-token disclosure.
- When issuance is blocked, the section now surfaces the exact blocked reason.
- Canonical documentation updated
- Updated
CHANGELOG.md
- Added
dispatchspot_next_phase_handoff_v241.md and dispatchspot_next_phase_handoff_v241.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:
- In the existing Twilio token service backend foundation section, you will now see two action buttons at the top-right:
Check token foundation and Issue live token.
- Inside the summary cards in that same section, you will now also see provider posture visibility.
- In the foundation contract results block, you will now see extra live-readiness lines for live token ready, provider ready, and voice assist.
- After clicking
Issue live token, if the workspace is fully ready, you will now see a success panel showing live browser token issued, token preview, expiry time, voice region, and a disclosure row to reveal the full token.
- If issuance is not ready, you will now see a blocked-state panel showing the exact reason.
Important note
- There are no Prisma schema changes in v241.
- This build adds real backend token issuance wiring logic, but it still depends on valid Twilio environment variables and workspace/provider posture being set correctly on the deployed server before live issuance can succeed.
- I could not run a full dependency-aware Next.js build in this sandbox because installed project dependencies are not present here.