Skip to content

feat(voice): model spoken exchanges with XState - #609

Open
charleslpan wants to merge 5 commits into
mainfrom
cursor/spoken-exchange-statechart-e315
Open

feat(voice): model spoken exchanges with XState#609
charleslpan wants to merge 5 commits into
mainfrom
cursor/spoken-exchange-statechart-e315

Conversation

@charleslpan

@charleslpancharleslpan commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Node-free XState v5 chart for spoken exchange lifecycle, turn origin, restart, notice hold, and resource ownership
  • make the chart authoritative for the ordinary renderer conversation and introduction takeover while retaining WebRTC transport and act validation
  • bind press audio and idle retirement to their active chart actors, wire observed notices into the chart-owned hold queue, and gate session tool execution with the developer-opened-turn projection
  • remove the shadow parity path and duplicate hook-level status, latch, pending-turn, exchange-kind, and restart decisions
  • keep Stately inspection opt-in and unavailable in packaged, fixture, and evidence runs

Evidence

  • Platform-independent checks: ./scripts/check.sh passed, including 2,415 tests, recursive typechecks, and builds
  • Focused statechart tests: 16 passed, 0 failed
  • Desktop tests: 785 passed, 0 failed
  • macOS Electron verification (./scripts/verify.sh): portable checks and builds passed; visual evidence stopped at error: this command requires macOS on the Linux Cloud Agent

Automated visual evidence

Download the deterministic macOS evidence · workflow run

  • Commit: 1a5c4184fedd5468b70c0b17ef57e22ed5afaf5d
  • Scenario: smoke
  • Physical-notch check: not performed by CI

Physical-device evidence

  • Screenshot or screen recording: not attached
  • Physical-notch check: not performed
  • Device/display configuration: Linux Cloud Agent; no macOS display

Notes

  • RealtimeVoiceSession remains the browser/WebRTC implementation; the statechart owns public lifecycle, resource lifetimes, and authorization projections.
  • Final ownership-audit commit: 1a5c418.
  • CI remains responsible for macOS-only visual verification.
Open in WebOpen in Cursor

Open in Alchemize

@vercel

vercelBot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated
luke-webSkippedSkippedSep 1, 2026 4:35am UTC

Request Review

@charleslpan
charleslpan marked this pull request as ready for review September 1, 2026 04:12
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment threadpackages/voice-machine/src/voice-machine.ts
Comment threadpackages/voice-machine/src/voice-machine.ts
Comment threadpackages/voice-machine/src/voice-machine.ts
Comment threadapps/desktop/src/renderer/voice-machine-adapter.ts Outdated

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fb6d5a4. Configure here.

Comment threadpackages/voice-machine/src/voice-machine.ts
Comment threadapps/desktop/src/renderer/use-voice-conversation.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@charleslpan@cursoragent