Send throttled WhatsApp progress during long tool turns.

Wire channel inbound on_progress/on_tool_ui to outbound queue so group users see wait signals for CLI/UME work without sharing per-speaker session context.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-10 22:47:26 +08:00
parent d245e463c0
commit 0ab5ab8c5a
6 changed files with 497 additions and 2 deletions

View file

@ -353,6 +353,12 @@ def _parse_group_policy_dict(raw: Any) -> GroupPolicyConfig | None:
def resolve_group_policy(*, account: dict[str, Any] | None = None) -> GroupPolicyConfig:
"""Resolve group mention/session policy.
Default ``session_scope`` is ``user_in_chat`` (per speaker in a group). Override via
account ``group_policy.session_scope`` or env ``AIA_WHATSAPP_GROUP_SESSION_SCOPE=chat``
when a shared group transcript is intentionally desired.
"""
cfg = (account or {}).get("config")
if isinstance(cfg, dict):
gp = _parse_group_policy_dict(cfg.get("group_policy"))