agentcall icon indicating copy to clipboard operation
agentcall copied to clipboard

Bridge stdin observability parity: port command.ack/command.error + raw type acceptance to bridge.js and both visual bridges (follow-up to #2)

Open jomon003 opened this issue 3 months ago • 0 comments

Background

PR #2 made scripts/python/bridge.py observable on stdin — it emits command.ack / command.error per received line and accepts raw API type command names alongside the command shorthand. That change landed only in the Python audio bridge. The other three bridges still silently no-op on an unknown line and never emit ack/error:

  • scripts/node/bridge.js (Node audio)
  • scripts/python/bridge-visual.py (Python visual)
  • scripts/node/bridge-visual.js (Node visual)

Goal

Bring all four bridges to identical stdin-observability behavior:

  • command.ack emitted once per recognized line, before forwarding: {"event":"command.ack","command":"<resolved shorthand>","request_id"?:…} (resolved name, e.g. {"type":"meeting.mic"} acks as mic).
  • command.error for unknown commands: {"event":"command.error","command":"<name or '<missing>'>","message":"unknown bridge stdin command","request_id"?:…}.
  • Malformed JSON stays a silent skip (unchanged).
  • Raw type names accepted via the same alias map as bridge.py (meeting.send_chat/raise_hand/mic/leave, screenshot.take).
  • command.ack != success — domain failures stay their own events (screenshare.error, webpage.error, tts.error). The visual bridges' bridge-only commands (screenshare.swap, webpage.*, tasks.set) also ack.

Plan

Three PRs, merged one by one:

  • [ ] bridge.js (Node audio) — 6 commands
  • [ ] bridge-visual.py (Python visual) — 13 commands
  • [ ] bridge-visual.js (Node visual) — 13 commands

No version bump (stays 1.1.15, matching #2). The third PR closes this issue.

jomon003 avatar Aug 10 '26 07:08 jomon003