Skip to content

Refactor realtime output activity tracking#86661

Merged
steipete merged 1 commit into
mainfrom
refactor/realtime-output-activity-tracker
May 25, 2026
Merged

Refactor realtime output activity tracking#86661
steipete merged 1 commit into
mainfrom
refactor/realtime-output-activity-tracker

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared realtime voice output activity tracker to the SDK for audio counters, stream-ending/playback state, interruptible-output checks, and playback watchdog timing.
  • Migrate Discord realtime voice playback/barge-in bookkeeping onto the shared tracker while leaving transport, audio conversion, stream/player lifecycle, and Discord config local.
  • Refresh SDK API baseline plus realtime voice SDK docs and changelog.

Verification

  • pnpm exec oxfmt --check --threads=1 src/talk/output-activity-tracker.ts src/talk/output-activity-tracker.test.ts src/plugin-sdk/realtime-voice.ts extensions/discord/src/voice/realtime.ts
  • node scripts/run-vitest.mjs src/talk/output-activity-tracker.test.ts
  • pnpm test extensions/discord/src/voice/manager.e2e.test.ts -- --reporter=dot -t "allows configured realtime barge-in|interrupts realtime playback when an already-active speaker keeps talking|does not interrupt realtime provider state when local playback is already idle|ignores realtime capture during playback when barge-in is disabled|queues forced agent-proxy answers until current realtime playback idles|does not interrupt active exact speech for a later forced agent-proxy consult|drains queued exact speech after cancelled prebuffered output is discarded"
  • pnpm plugin-sdk:api:check
  • pnpm build
  • env -u OPENCLAW_TESTBOX pnpm check:changed
  • /Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode local

Behavior addressed: Discord realtime output playback and barge-in decisions now use the same provider/channel-neutral activity tracker that browser and meeting-style realtime surfaces can reuse.
Real environment tested: Local macOS source checkout, Node/pnpm repo toolchain, focused Discord realtime voice adapter tests.
Exact steps or command run after this patch: Focused tracker tests, focused Discord voice manager e2e tests listed above, SDK API check, full build, changed checks, and autoreview.
Evidence after fix: Tracker tests passed, seven Discord realtime voice e2e cases passed, SDK API baseline check passed, build passed, check:changed passed, autoreview reported no accepted/actionable findings.
Observed result after fix: No intended live provider behavior change; Discord kept local playback/audio lifecycle ownership while shared state produced the same barge-in and playback-idle semantics under adapter tests.
What was not tested: Live Discord, browser voice, or Google Meet-style provider sessions; this is a pure helper extraction with unit and adapter proof.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord size: M maintainer Maintainer-authored PR labels May 25, 2026
@clawsweeper

clawsweeper Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Refactor realtime output activity tracking This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit a4f1269 into main May 25, 2026
127 of 131 checks passed
@steipete
steipete deleted the refactor/realtime-output-activity-tracker branch May 25, 2026 22:51
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant