Files
buzz/crates
Joel Robotham b25a20206d broker: add presence, typing, observer, and liveness signals to the contract
Give a keyless agent parity with a local one for the ephemeral signals a
running agent emits so an owner and channel can see it work. presence.set and
typing.set were named as deferred by #6742; observer.emit and liveness.ping are
net-new -- the trajectory and keepalive planes the contract never enumerated
but a keyless agent needs just as much once it holds no relay connection.

Four best-effort actions, all following the existing contract shape (strict
wire, one spelling of every identity, no member names its own subject):

- presence.set  -> status only (reuses buzz_core PresenceStatus)
- typing.set    -> channelId only; ephemeral, no stop counterpart
- observer.emit -> a batch of frames, each { kind, payload }; payload is opaque
                   and encrypted host-side, and the outcome is a batch receipt
                   since re-batched frames have no stable per-frame id
- liveness.ping -> { channelId, turnId }; distinct from an observer frame so a
                   host can attach meaning (reset a stall watchdog), not just
                   forward it

The host still derives owner, key, encryption, and all Nostr metadata; the agent
supplies only content. observer.emit and liveness.ping overlap on the wire --
flagged in the module docs so a reviewer can collapse liveness.ping if preferred.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Joel Robotham <jrobotham@squareup.com>
2026-08-27 17:27:51 +10:00
..