Skip to content

feat(control): wire Codex Micro MIC key to voice.pushToTalk actions - #2

Open
derekclair wants to merge 2 commits into
mainfrom
feat/mic-ptt-control
Open

feat(control): wire Codex Micro MIC key to voice.pushToTalk actions#2
derekclair wants to merge 2 commits into
mainfrom
feat/mic-ptt-control

Conversation

@derekclair

Copy link
Copy Markdown
Owner

Summary

Completes the control-plane path so the wide MIC key on a Codex Micro can create prompts in authenticated Grok CLI sessions.

Changes

  • grok-cli/src/control/types.ts — added voice.pushToTalk.{start,stop,latch} to SupportedControlAction
  • grok-micro/packages/bridge/src/grok-control.ts — extended GrokWireAction union and wireActionFor() so the daemon routes PTT gestures instead of throwing UnsupportedActionError
  • grok-cli/src/control/voice-ptt.ts (new) — VoicePTTContext interface + handleVoicePTT() dispatcher ready for TUI integration

Already implemented (no code changes)

  • Native 350 ms press/double-tap latch timing in native-input.ts
  • Daemon routing + voice state tracking + lighting policy in daemon.ts
  • Health JSON lastAction + voice field updates

Next integration step

Wire handleVoicePTT into the interactive action handler (LocalControlServer.setActionHandler) and supply the four context methods (focusComposer, beginListening, STT glue, stopListeningAndSubmit).

Verification

  • pnpm verify (bridge) + bun run typecheck && bun test src/control/ (grok-cli) expected to stay green
  • Real-device smoke: daemon + patched Grok CLI, press MIC → prompt creation / voice input starts

Closes the remaining MIC gesture gap listed in PARITY.md / AGENTS.md.

derekclair and others added 2 commits September 5, 2026 21:23
A missing socket now marks health stale, and status.sh says so instead of reprinting yesterday’s connected snapshot.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add voice.pushToTalk.{start,stop,latch} to SupportedControlAction
- Extend GrokWireAction union and wireActionFor() mapping so the daemon
  no longer throws UnsupportedActionError for PTT gestures
- Introduce voice-ptt.ts stub with VoicePTTContext + handleVoicePTT()
  ready for interactive UI integration

Native timing, routing, health JSON voice state and lighting were already
implemented in native-input.ts and daemon.ts. This change completes the
control-plane contract so authenticated Grok CLI sessions can receive
PTT events and create prompts.
Sign up for free to 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.

1 participant