Wire BridgeAnnouncementConfig into Twilio bridge webhook handler #22

Open
opened 2026-04-06 15:11:20 -07:00 by pyr0ball · 0 comments
Owner

Context

cf-orch#18 defines the live-human identification contract. contracts/bridge.py now contains:

  • BridgeAnnouncementConfig — product name, user_name_enabled, tone, silence durations
  • BridgeSession — model with announced_at: datetime | None (None = announcement not yet fired)
  • render_announcement(config, session) → TTS-ready string
  • BridgeSession.with_announced(transcript) → returns updated session

Required in Osprey bridge webhook handler

  1. Instantiate BridgeAnnouncementConfig(product_name="Osprey by CircuitForge") from product config
  2. At bridge connection (before user audio): call render_announcement() and play via Twilio <Say>
  3. Call session.with_announced(transcript=text) and persist to context checkpoint
  4. Log the BridgeAnnouncementEvent to the run record

Osprey MUST NOT pass audio to the live human before session.has_announced is True.

References

  • cf-orch#18
  • cf-orch#1 (FTB dialer implementation)
## Context cf-orch#18 defines the live-human identification contract. `contracts/bridge.py` now contains: - `BridgeAnnouncementConfig` — product name, user_name_enabled, tone, silence durations - `BridgeSession` — model with `announced_at: datetime | None` (None = announcement not yet fired) - `render_announcement(config, session)` → TTS-ready string - `BridgeSession.with_announced(transcript)` → returns updated session ## Required in Osprey bridge webhook handler 1. Instantiate `BridgeAnnouncementConfig(product_name="Osprey by CircuitForge")` from product config 2. At bridge connection (before user audio): call `render_announcement()` and play via Twilio `<Say>` 3. Call `session.with_announced(transcript=text)` and persist to context checkpoint 4. Log the `BridgeAnnouncementEvent` to the run record Osprey MUST NOT pass audio to the live human before `session.has_announced` is True. ## References - cf-orch#18 - cf-orch#1 (FTB dialer implementation)
Sign in to join this conversation.
No labels
backlog
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/osprey#22
No description provided.