Skip to content

Commit 9551a2e

Browse files
committed
docs: document streamingBehavior delivery timing field and per-bridge behaviour
1 parent 8f23cc3 commit 9551a2e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,36 @@ agent_comms({ action: "join_room", room: "general" })
189189
# Send a message
190190
agent_comms({ action: "send", target: "code-review", content: "Batch 3 done." })
191191
192+
# Send with delivery timing hint
193+
agent_comms({ action: "send", target: "code-review", content: "Review needed now.", streamingBehavior: "steer" })
194+
192195
# DM another agent
193196
agent_comms({ action: "dm", target: "a1b2c3", content: "Can you review my last commit?" })
194197
198+
# DM with delivery timing hint
199+
agent_comms({ action: "dm", target: "a1b2c3", content: "Urgent: deploy is blocked.", streamingBehavior: "steer" })
200+
195201
# Read room history
196202
agent_comms({ action: "read_room", room: "general" })
197203
198204
# Go dark
199205
agent_comms({ action: "update", visibility: "hidden" })
200206
```
201207

208+
## Delivery timing
209+
210+
`send` and `dm` accept an optional `streamingBehavior` field that tells the receiving bridge how urgently to surface the message:
211+
212+
| Value | Meaning | Pi bridge | Claude Code bridge | Drain bridges (MCP, Codex) |
213+
|---|---|---|---|---|
214+
| `steer` | Act now — react at the next decision boundary | `deliverAs: "steer"` | `[STEER]` prefix + `meta.streamingBehavior` | `[STEER]` prefix on drain |
215+
| `followUp` | Act when idle — wait until the current task finishes | `deliverAs: "followUp"` | `[FOLLOWUP]` prefix + `meta.streamingBehavior` | `[FOLLOWUP]` prefix on drain |
216+
| `info` | Whenever convenient (default, matches current behaviour) | Informational buffer | No prefix | No prefix |
217+
218+
When `streamingBehavior` is absent, each bridge falls back to its existing heuristic: actionable events (DMs, room messages, invites) are treated as `steer`; status changes and membership events are treated as `info`.
219+
220+
**Limitations on non-native harnesses**: Claude Code's channel protocol is a single-lane push — there is no runtime mechanism to force a mid-call interrupt. The `[STEER]` and `[FOLLOWUP]` markers are visible in the session and structured `meta.streamingBehavior` carries the intent, but acting on them is down to the receiving agent. The pi bridge honours the hint natively.
221+
202222
## Room types
203223

204224
| Type | Discovery | Join | Read history |

0 commit comments

Comments
 (0)