Skip to content

berd-call: own status sounds, with a menu bar toggle - #400

Merged
johnmatthewtennant merged 3 commits into
mainfrom
aaron/berd-call-owned-status-sounds
Oct 21, 2026
Merged

johnmatthewtennant merged 3 commits into
mainfrom
aaron/berd-call-owned-status-sounds

Conversation

@johnmatthewtennant

Copy link
Copy Markdown
Contributor

Summary

berd-call already has a status sound runtime (Pop every five seconds while the agent works, Purr while it waits), and its session protocol accepts set_conversation_status. But berd-call start never sends it, and nothing outside the call could report status or change the mode. So the Buzz Berd Call plugin plays its own afplay cues, and the menu bar can't toggle them.

With this PR, berd-call plays the cues for any host that reports the agent's status:

  • berd-call settings --conversation-status working|waiting reports whether the agent is working. Until something reports it, the call stays silent, so a terminal call whose agent never reports status is unchanged.
  • berd-call settings --status-sounds off|working|working-and-waiting and a new Status Sounds submenu in the menu bar change the mode. The mode is saved in the call's settings file and used by later calls (default working, as before).
  • status shows statusSounds and conversationStatus. Both survive settings --restart and the Spokesperson switch: the new session is sent the current status as soon as it is ready.
  • The saved file only gets a status_sounds key once a mode is chosen, so an older berd-call can still read settings that never set one.

Related issue

Revives the status sounds part of #346 (closed). Unlike #346, berd-call doesn't guess when the agent is working from the transcript. The host reports it.

Testing

Live call from this branch's debug binary, with a temporary settings file:

export BERD_CALL_SETTINGS_FILE=/tmp/status-sounds/settings.json
berd-call start --port 5391 --stream --voice en-US-F --language en-US &
berd-call status --port 5391                                   # statusSounds: working, conversationStatus: null
berd-call settings --port 5391 --status-sounds off             # settings.json now has "status_sounds": "off"
berd-call settings --port 5391 --conversation-status working   # conversationStatus: working
berd-call settings --port 5391 --restart --voice en-US-F --language en-US
berd-call status --port 5391                                   # still off / working after the restart
berd-call settings --port 5391 --status-sounds working         # Pop starts, no playback errors
berd-call settings --port 5391 --conversation-status waiting   # conversationStatus: waiting
berd-call settings --port 5391 --conversation-status idle      # usage error, exit 2
berd-call stop --port 5391

New unit tests cover the menu (checkmark, title, and the request it sends), flag parsing, and the session actor holding the status until one is reported, sending it on later session starts, and saving the mode.

host_session::tests::spokesperson_results_change_and_save_only_its_voice also fails on main (629e0af). This PR doesn't touch it.

A host such as the Buzz Berd Call plugin now reports whether the agent
is working with `berd-call settings --conversation-status
working|waiting`, and berd-call plays the cues through the session's
existing status sound runtime. `--status-sounds
off|working|working-and-waiting` and a Status Sounds submenu change the
mode, which is saved for later calls. `status` shows both, and both
survive a session restart. A call nothing reports on stays silent.

Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
A status report during stop or restart wrote to a child that may
already have exited, so a broken pipe could end the call. The status is
now committed and acknowledged, and the restarted session is sent it
when it starts.

Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review October 20, 2026 20:52
@johnmatthewtennant
johnmatthewtennant requested a review from a team October 20, 2026 20:52

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Automated code review

REQUEST_CHANGES: one blocking state-consistency defect allows an acknowledged status-sound update to be reported as failed while still changing and persisting the preference. All supplied GitHub checks for the exact head SHA completed successfully.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Comment thread src-tauri/crates/berd-call/src/host_session.rs Outdated
A status sound change sent to a running session was committed and
saved before the session acknowledged it, and the control socket gave
up after five seconds. A request reported as failed could still change
the mode, now and in later calls. The change now commits and saves only
on ConversationStatusApplied, is dropped if the session stops first,
and waits without a read timeout like other session-backed settings.

Co-authored-by: Aaron <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Automated code review

APPROVE: the prior status-sound acknowledgement and persistence defect is fixed at this head, the full changed behavior is covered without a new actionable finding, and all supplied GitHub checks for the exact head SHA completed successfully.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Pending checks: 1 check(s) are not complete.

This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.

@johnmatthewtennant
johnmatthewtennant merged commit 075dd69 into main Oct 21, 2026
10 checks passed
@johnmatthewtennant
johnmatthewtennant deleted the aaron/berd-call-owned-status-sounds branch October 21, 2026 02:29
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.

2 participants