diff --git a/proto/decentraland/pulse/pulse_client.proto b/proto/decentraland/pulse/pulse_client.proto index aca97cbd..8c68cd77 100644 --- a/proto/decentraland/pulse/pulse_client.proto +++ b/proto/decentraland/pulse/pulse_client.proto @@ -74,17 +74,35 @@ message ParcelRect { sint32 max_z = 4; } -// Scene-listener connect: same signed-fetch auth chain as HandshakeRequest, plus an -// immutable parcel-set area of interest. No initial state — a listener is never a subject. +// One realm's slice of a scene listener's area of interest. Parcels only mean anything +// within a realm — every world numbers its own parcels from 0,0 — so a listener that +// observes several realms, as an authoritative server cohosting scenes from several worlds +// does, announces one of these per realm rather than one realm for the whole connection. +message SceneListenerAoi { + // Non-empty realm identifier — same rules as TeleportRequest.realm. + string realm = 1; + // This realm's parcels as inclusive rects. The sum of rect areas across every announced + // realm is capped server-side (SceneListener:MaxParcels) — overlaps count per rect, so + // announce disjoint rects. + repeated ParcelRect parcel_rects = 2; +} + +// Scene-listener connect: same signed-fetch auth chain as HandshakeRequest, plus a +// parcel-set area of interest per realm. No initial state — a listener is never a subject. message SceneListenerHandshakeRequest { // Signed-fetch headers JSON — identical shape to HandshakeRequest.auth_chain. bytes auth_chain = 1; - // AoI realm partition — same rules as TeleportRequest.realm. - string realm = 2; - // Announced AoI as inclusive parcel-coordinate rects; fixed for the connection - // lifetime. The sum of rect areas is capped server-side (SceneListener:MaxParcels) — - // overlaps count per rect, so announce disjoint rects. - repeated ParcelRect parcel_rects = 3; + // Announced AoI, one entry per realm; replaceable afterwards with SceneListenerUpdate. + repeated SceneListenerAoi aoi = 2; +} + +// Scene-listener AoI reassignment: replaces the area of interest announced at connect, in +// place, on an authenticated scene-listener connection. Only valid from a peer that +// authenticated with SceneListenerHandshakeRequest. +message SceneListenerUpdate { + // The new AoI, replacing (not extending) the current one — realms absent from it are no + // longer observed. Same rules and SceneListener:MaxParcels budget as the handshake's. + repeated SceneListenerAoi aoi = 1; } message ClientMessage { @@ -97,5 +115,6 @@ message ClientMessage { EmoteStop emote_stop = 6; TeleportRequest teleport = 7; SceneListenerHandshakeRequest scene_listener_handshake = 8; + SceneListenerUpdate scene_listener_update = 9; } }