diff --git a/src/bitdrift_public/protobuf/client/v1/api.proto b/src/bitdrift_public/protobuf/client/v1/api.proto index db3f13d..035a08c 100644 --- a/src/bitdrift_public/protobuf/client/v1/api.proto +++ b/src/bitdrift_public/protobuf/client/v1/api.proto @@ -63,6 +63,14 @@ message ClientStateUpdate { // This is sent both in the initial handshake as well as mid-stream if any of the attributes have // changed. The handshake will fill in all values as part of an initial update. message StateUpdateRequest { + // A complete, presence-bearing labels snapshot. Absent means unchanged; an empty map clears. + message LabelsUpdate { + map labels = 1; + } + + // Persisted application labels, sent at handshake and whenever the label set changes. + LabelsUpdate labels_update = 3; + message StartedSession { // The session ID of the started session. string session_id = 1; diff --git a/src/bitdrift_public/protobuf/client/v1/matcher.proto b/src/bitdrift_public/protobuf/client/v1/matcher.proto index 6397def..b7117f3 100644 --- a/src/bitdrift_public/protobuf/client/v1/matcher.proto +++ b/src/bitdrift_public/protobuf/client/v1/matcher.proto @@ -22,6 +22,12 @@ message Matcher { // no value will be returned and no match will occur. Said another way, a missing key will // not yield the empty string, but no string at all. string static_device_metadata = 1 [(validate.rules).string.min_len = 1]; + // Reads an application label. Missing labels do not match, including an empty RHS. + // Supported by environment rules, not static-device configuration selection. + string label = 2 [(validate.rules).string = { + min_len: 1 + max_len: 64 + }]; } }