// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto2"; package safari_sdk.protos.logging; import "google/protobuf/struct.proto"; import "safari_sdk/protos/label.proto"; import "safari_sdk/protos/logging/orchestrator_info.proto"; import "safari_sdk/protos/logging/policy_environment_metadata.proto"; message KeyRange { // Name of the data stream. optional string topic = 1; // The time interval of the data stream. optional IntervalValue interval = 2; } message Session { // The session time interval. optional IntervalValue interval = 1; message StreamMetadata { optional KeyRange key_range = 1; optional bool is_required = 2; // Topic stream consistency options: } repeated StreamMetadata streams = 2; // For MDP logging only, a RLDSSpec in json format. optional string rlds_specs = 3; // The additional label metadata of the session. repeated LabelMessage labels = 4; // The string should consist of only alphanumeric and underscore. optional string task_id = 5; // Metadata related to the policy and environment. optional PolicyEnvironmentMetadata policy_environment_metadata = 6; // Freeform tags for identifying and filtering sessions in orchestration. repeated string tags = 7; // The setup configs of the session. The key is the stringified config ID. map setup_configs = 8; // The orchestrator info of the session. optional OrchestratorInfo orchestrator_info = 9; } // Metadata of a log file. There should be one file metadata per log file. message FileMetadata { // The agent id string (typically robot id). The string should be in the // format of regex '[a-zA-Z]([a-zA-Z]|[0-9]|_)+', aka. the same restrictions // as proto field names. This should be less than 30 characters. optional string agent_id = 1; // Identifies the time coverage of the log file at a per-stream level. repeated KeyRange stream_coverages = 2; } message TimeSynchronization { // The key is the topic specified to the logger. Timestamps in unix time // nanoseconds. map last_timestamp_by_topic = 1; }