Skip to content

Add call-state watch command/helper (control-only, over status RPC) - #3

Merged
undivisible merged 1 commit into
mainfrom
feat/watch-call-state
Oct 15, 2026
Merged

undivisible merged 1 commit into
mainfrom
feat/watch-call-state

Conversation

@undivisible

Copy link
Copy Markdown
Owner

Draft for review.

What: a watch command + StatusWatcher library helper that polls the existing status RPC and emits a JSON event when the call state changes (started / ended / changed). Lets CLI/crate users react to calls starting or ending without writing their own polling loop.

Scope: control-only. No new bridge action, no media/streaming, no additional private API, and no SIP/helper requirement beyond what status already needs.

Testing: StatusWatcher change detection is pure and device-free — 6 unit tests cover baseline/no-change/started/ended/array-shaped/unknown-shape. cargo fmt, cargo clippy --features cli -- -D warnings, and cargo test --features cli are clean. Not exercised against a live call (consistent with the crate's "not verified end-to-end" posture).

Usage:

rs_facetime watch --json
rs_facetime watch --interval-ms 500 --count 1

🤖 Generated with Claude Code

Adds a control-only convenience for CLI and library users: poll `status` and
emit a JSON event when the call state changes (started/ended/changed), instead
of hand-rolling a polling loop. No new bridge action, no media/streaming, no new
private API, no SIP/helper requirement beyond what `status` already needs.

- private_api::StatusWatcher: pure, device-free change detection over successive
  BridgeResponse status payloads; tolerant of the status field naming.
- CLI `watch [--interval-ms N] [--count N] [--json]`.
- 6 unit tests, no live call or injected helper required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@undivisible
undivisible marked this pull request as ready for review October 15, 2026 08:01
@undivisible
undivisible merged commit 859513d into main Oct 15, 2026
3 checks passed
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