// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/metrics.proto (package soulfire.v1, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_soulfire_api_docs } from "./api_docs_pb.js";
import { file_google_api_annotations } from "../google/api/annotations_pb.js";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb.js";
import type { Timestamp } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file soulfire/metrics.proto.
 */
export const file_soulfire_metrics: GenFile = /*@__PURE__*/
  fileDesc("ChZzb3VsZmlyZS9tZXRyaWNzLnByb3RvEgtzb3VsZmlyZS52MSKWBQoPTWV0cmljc1NuYXBzaG90EjIKCXRpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAhIYCgtib3RzX29ubGluZRgCIAEoDUID4EECEhcKCmJvdHNfdG90YWwYAyABKA1CA+BBAhIfChJwYWNrZXRzX3NlbnRfdG90YWwYBCABKARCA+BBAhIjChZwYWNrZXRzX3JlY2VpdmVkX3RvdGFsGAUgASgEQgPgQQISHQoQYnl0ZXNfc2VudF90b3RhbBgGIAEoBEID4EECEiEKFGJ5dGVzX3JlY2VpdmVkX3RvdGFsGAcgASgEQgPgQQISJAoXcGFja2V0c19zZW50X3Blcl9zZWNvbmQYCCABKAFCA+BBAhIoChtwYWNrZXRzX3JlY2VpdmVkX3Blcl9zZWNvbmQYCSABKAFCA+BBAhIiChVieXRlc19zZW50X3Blcl9zZWNvbmQYCiABKAFCA+BBAhImChlieXRlc19yZWNlaXZlZF9wZXJfc2Vjb25kGAsgASgBQgPgQQISIQoUYXZnX3RpY2tfZHVyYXRpb25fbXMYDCABKAFCA+BBAhIhChRtYXhfdGlja19k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NZXRyaWNzUmVxdWVzdBIuCgVzaW5jZRgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBIAIgBAUIICgZfc2luY2UiVgoYR2V0U2VydmVyTWV0cmljc1Jlc3BvbnNlEjoKCXNuYXBzaG90cxgBIAMoCzIiLnNvdWxmaXJlLnYxLlNlcnZlck1ldHJpY3NTbmFwc2hvdEID4EECMooDCg5NZXRyaWNzU2VydmljZRLFAQoSR2V0SW5zdGFuY2VNZXRyaWNzEiYuc291bGZpcmUudjEuR2V0SW5zdGFuY2VNZXRyaWNzUmVxdWVzdBonLnNvdWxmaXJlLnYxLkdldEluc3RhbmNlTWV0cmljc1Jlc3BvbnNlIl7K8xgvChRHZXQgaW5zdGFuY2UgbWV0cmljcxoNUkVBRF9CT1RfSU5GTyIIaW5zdGFuY2WC0+STAiUSIy92MS9pbnN0YW5jZXMve2luc3RhbmNlX2lkfS9tZXRyaWNzEq8BChBHZXRTZXJ2ZXJNZXRyaWNzEiQuc291bGZpcmUudjEuR2V0U2VydmVyTWV0cmljc1JlcXVlc3QaJS5zb3VsZmlyZS52MS5HZXRTZXJ2ZXJNZXRyaWNzUmVzcG9uc2UiTsrzGDAKEkdldCBzZXJ2ZXIgbWV0cmljcxoSUkVBRF9TRVJWRVJfQ09ORklHIgZzZXJ2ZXKC0+STAhQSEi92MS9zZXJ2ZXIvbWV0cmljc0IhCh1jb20uc291bGZpcmVtYy5ncnBjLmdlbmVyYXRlZFABYgZwcm90bzM", [file_soulfire_api_docs, file_google_api_annotations, file_google_api_field_behavior, file_google_protobuf_timestamp]);

/**
 * A single time-series data point sampled at a fixed interval.
 *
 * @generated from message soulfire.v1.MetricsSnapshot
 */
export type MetricsSnapshot = Message<"soulfire.v1.MetricsSnapshot"> & {
  /**
   * When this snapshot was taken.
   *
   * @generated from field: google.protobuf.Timestamp timestamp = 1;
   */
  timestamp?: Timestamp | undefined;

  /**
   * Number of bots currently connected to the Minecraft server.
   *
   * @generated from field: uint32 bots_online = 2;
   */
  botsOnline: number;

  /**
   * Total number of bots configured in the instance (online + offline).
   *
   * @generated from field: uint32 bots_total = 3;
   */
  botsTotal: number;

  /**
   * Cumulative packets sent across all bots since the server started.
   *
   * @generated from field: uint64 packets_sent_total = 4;
   */
  packetsSentTotal: bigint;

  /**
   * Cumulative packets received across all bots since the server started.
   *
   * @generated from field: uint64 packets_received_total = 5;
   */
  packetsReceivedTotal: bigint;

  /**
   * Cumulative bytes sent across all bots since the server started.
   *
   * @generated from field: uint64 bytes_sent_total = 6;
   */
  bytesSentTotal: bigint;

  /**
   * Cumulative bytes received across all bots since the server started.
   *
   * @generated from field: uint64 bytes_received_total = 7;
   */
  bytesReceivedTotal: bigint;

  /**
   * Current rate of packets sent per second (computed from counter deltas).
   *
   * @generated from field: double packets_sent_per_second = 8;
   */
  packetsSentPerSecond: number;

  /**
   * Current rate of packets received per second (computed from counter deltas).
   *
   * @generated from field: double packets_received_per_second = 9;
   */
  packetsReceivedPerSecond: number;

  /**
   * Current rate of bytes sent per second (computed from counter deltas).
   *
   * @generated from field: double bytes_sent_per_second = 10;
   */
  bytesSentPerSecond: number;

  /**
   * Current rate of bytes received per second (computed from counter deltas).
   *
   * @generated from field: double bytes_received_per_second = 11;
   */
  bytesReceivedPerSecond: number;

  /**
   * Average tick duration across all bots in milliseconds.
   *
   * @generated from field: double avg_tick_duration_ms = 12;
   */
  avgTickDurationMs: number;

  /**
   * Maximum tick duration observed across all bots in milliseconds.
   * Reset each sampling interval.
   *
   * @generated from field: double max_tick_duration_ms = 13;
   */
  maxTickDurationMs: number;

  /**
   * Average health across all online bots with player data.
   * Range: 0 to 20 (Minecraft health points).
   *
   * @generated from field: double avg_health = 14;
   */
  avgHealth: number;

  /**
   * Average food level across all online bots with player data.
   * Range: 0 to 20 (Minecraft food points).
   *
   * @generated from field: double avg_food_level = 15;
   */
  avgFoodLevel: number;

  /**
   * Total number of loaded chunks across all online bots.
   *
   * @generated from field: uint32 total_loaded_chunks = 16;
   */
  totalLoadedChunks: number;

  /**
   * Total number of tracked entities across all online bots.
   *
   * @generated from field: uint32 total_tracked_entities = 17;
   */
  totalTrackedEntities: number;

  /**
   * Connection events since the previous snapshot.
   *
   * @generated from field: uint32 connections = 18;
   */
  connections: number;

  /**
   * Disconnection events since the previous snapshot.
   *
   * @generated from field: uint32 disconnections = 19;
   */
  disconnections: number;
};

/**
 * Describes the message soulfire.v1.MetricsSnapshot.
 * Use `create(MetricsSnapshotSchema)` to create a new message.
 */
export const MetricsSnapshotSchema: GenMessage<MetricsSnapshot> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 0);

/**
 * Current-state distributions computed from the latest bot data.
 * These are not time-series; they reflect the current instant.
 *
 * @generated from message soulfire.v1.MetricsDistributions
 */
export type MetricsDistributions = Message<"soulfire.v1.MetricsDistributions"> & {
  /**
   * Health histogram with 10 buckets of width 2: [0,2), [2,4), ..., [18,20].
   * Each entry is the count of bots whose health falls in that bucket.
   *
   * @generated from field: repeated uint32 health_histogram = 1;
   */
  healthHistogram: number[];

  /**
   * Food level histogram with 10 buckets of width 2: [0,2), [2,4), ..., [18,20].
   *
   * @generated from field: repeated uint32 food_histogram = 2;
   */
  foodHistogram: number[];

  /**
   * Number of bots in each dimension (e.g., "minecraft:overworld" -> 5).
   *
   * @generated from field: map<string, uint32> dimension_counts = 3;
   */
  dimensionCounts: { [key: string]: number };

  /**
   * Number of bots in each game mode (e.g., "SURVIVAL" -> 10).
   *
   * @generated from field: map<string, uint32> game_mode_counts = 4;
   */
  gameModeCounts: { [key: string]: number };

  /**
   * XZ positions of online bots for scatter plot rendering.
   *
   * @generated from field: repeated soulfire.v1.BotPosition bot_positions = 5;
   */
  botPositions: BotPosition[];
};

/**
 * Describes the message soulfire.v1.MetricsDistributions.
 * Use `create(MetricsDistributionsSchema)` to create a new message.
 */
export const MetricsDistributionsSchema: GenMessage<MetricsDistributions> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 1);

/**
 * Position of a single bot on the XZ plane.
 *
 * @generated from message soulfire.v1.BotPosition
 */
export type BotPosition = Message<"soulfire.v1.BotPosition"> & {
  /**
   * X coordinate in the Minecraft world.
   *
   * @generated from field: double x = 1;
   */
  x: number;

  /**
   * Z coordinate in the Minecraft world.
   *
   * @generated from field: double z = 2;
   */
  z: number;

  /**
   * Dimension the bot is in (e.g., "minecraft:overworld").
   *
   * @generated from field: string dimension = 3;
   */
  dimension: string;
};

/**
 * Describes the message soulfire.v1.BotPosition.
 * Use `create(BotPositionSchema)` to create a new message.
 */
export const BotPositionSchema: GenMessage<BotPosition> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 2);

/**
 * Request to retrieve metrics for a specific instance.
 *
 * @generated from message soulfire.v1.GetInstanceMetricsRequest
 */
export type GetInstanceMetricsRequest = Message<"soulfire.v1.GetInstanceMetricsRequest"> & {
  /**
   * The UUID of the SoulFire instance to get metrics for.
   *
   * @generated from field: string instance_id = 1;
   */
  instanceId: string;

  /**
   * If set, only return snapshots taken after this timestamp.
   * Used for incremental fetching to reduce payload size.
   *
   * @generated from field: optional google.protobuf.Timestamp since = 2;
   */
  since?: Timestamp | undefined;
};

/**
 * Describes the message soulfire.v1.GetInstanceMetricsRequest.
 * Use `create(GetInstanceMetricsRequestSchema)` to create a new message.
 */
export const GetInstanceMetricsRequestSchema: GenMessage<GetInstanceMetricsRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 3);

/**
 * Response containing time-series metrics and current distributions.
 *
 * @generated from message soulfire.v1.GetInstanceMetricsResponse
 */
export type GetInstanceMetricsResponse = Message<"soulfire.v1.GetInstanceMetricsResponse"> & {
  /**
   * Time-series snapshots ordered oldest to newest.
   * Contains up to 600 snapshots (30 minutes at 3-second intervals).
   * If the request included a "since" timestamp, only newer snapshots are returned.
   *
   * @generated from field: repeated soulfire.v1.MetricsSnapshot snapshots = 1;
   */
  snapshots: MetricsSnapshot[];

  /**
   * Current-state distributions computed from the latest bot data.
   *
   * @generated from field: soulfire.v1.MetricsDistributions distributions = 2;
   */
  distributions?: MetricsDistributions | undefined;
};

/**
 * Describes the message soulfire.v1.GetInstanceMetricsResponse.
 * Use `create(GetInstanceMetricsResponseSchema)` to create a new message.
 */
export const GetInstanceMetricsResponseSchema: GenMessage<GetInstanceMetricsResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 4);

/**
 * A single server-level system metrics data point sampled at a fixed interval.
 *
 * @generated from message soulfire.v1.ServerMetricsSnapshot
 */
export type ServerMetricsSnapshot = Message<"soulfire.v1.ServerMetricsSnapshot"> & {
  /**
   * When this snapshot was taken.
   *
   * @generated from field: google.protobuf.Timestamp timestamp = 1;
   */
  timestamp?: Timestamp | undefined;

  /**
   * JVM process CPU load (0.0 to 1.0, or -1.0 if unavailable).
   *
   * @generated from field: double process_cpu_load = 2;
   */
  processCpuLoad: number;

  /**
   * System-wide CPU load (0.0 to 1.0, or -1.0 if unavailable).
   *
   * @generated from field: double system_cpu_load = 3;
   */
  systemCpuLoad: number;

  /**
   * Heap memory currently used in bytes.
   *
   * @generated from field: uint64 heap_used_bytes = 4;
   */
  heapUsedBytes: bigint;

  /**
   * Heap memory committed (reserved by JVM) in bytes.
   *
   * @generated from field: uint64 heap_committed_bytes = 5;
   */
  heapCommittedBytes: bigint;

  /**
   * Maximum heap memory in bytes (-1 if undefined).
   *
   * @generated from field: int64 heap_max_bytes = 6;
   */
  heapMaxBytes: bigint;

  /**
   * Non-heap memory currently used in bytes.
   *
   * @generated from field: uint64 non_heap_used_bytes = 7;
   */
  nonHeapUsedBytes: bigint;

  /**
   * Current live thread count.
   *
   * @generated from field: uint32 thread_count = 8;
   */
  threadCount: number;

  /**
   * Current daemon thread count.
   *
   * @generated from field: uint32 daemon_thread_count = 9;
   */
  daemonThreadCount: number;

  /**
   * Cumulative GC collection count across all collectors.
   *
   * @generated from field: uint64 gc_collection_count = 10;
   */
  gcCollectionCount: bigint;

  /**
   * Cumulative GC collection time in milliseconds across all collectors.
   *
   * @generated from field: uint64 gc_collection_time_ms = 11;
   */
  gcCollectionTimeMs: bigint;

  /**
   * JVM uptime in milliseconds.
   *
   * @generated from field: uint64 uptime_ms = 12;
   */
  uptimeMs: bigint;

  /**
   * Number of available processors.
   *
   * @generated from field: uint32 available_processors = 13;
   */
  availableProcessors: number;

  /**
   * Total bots online across all instances.
   *
   * @generated from field: uint32 total_bots_online = 14;
   */
  totalBotsOnline: number;

  /**
   * Total bots configured across all instances.
   *
   * @generated from field: uint32 total_bots_total = 15;
   */
  totalBotsTotal: number;

  /**
   * Total bots desired to be running across all instances.
   *
   * @generated from field: uint32 total_bots_desired = 17;
   */
  totalBotsDesired: number;

  /**
   * Instances with at least one desired bot.
   *
   * @generated from field: uint32 instances_with_desired_bots = 18;
   */
  instancesWithDesiredBots: number;

  /**
   * Bots currently queued or starting.
   *
   * @generated from field: uint32 total_bots_starting = 19;
   */
  totalBotsStarting: number;

  /**
   * Bots waiting for an automatic reconnect.
   *
   * @generated from field: uint32 total_bots_retrying = 20;
   */
  totalBotsRetrying: number;

  /**
   * Desired bots whose latest connection attempt failed.
   *
   * @generated from field: uint32 total_bots_failed = 21;
   */
  totalBotsFailed: number;
};

/**
 * Describes the message soulfire.v1.ServerMetricsSnapshot.
 * Use `create(ServerMetricsSnapshotSchema)` to create a new message.
 */
export const ServerMetricsSnapshotSchema: GenMessage<ServerMetricsSnapshot> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 5);

/**
 * Request to retrieve server-level system metrics.
 *
 * @generated from message soulfire.v1.GetServerMetricsRequest
 */
export type GetServerMetricsRequest = Message<"soulfire.v1.GetServerMetricsRequest"> & {
  /**
   * If set, only return snapshots taken after this timestamp.
   * Used for incremental fetching to reduce payload size.
   *
   * @generated from field: optional google.protobuf.Timestamp since = 1;
   */
  since?: Timestamp | undefined;
};

/**
 * Describes the message soulfire.v1.GetServerMetricsRequest.
 * Use `create(GetServerMetricsRequestSchema)` to create a new message.
 */
export const GetServerMetricsRequestSchema: GenMessage<GetServerMetricsRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 6);

/**
 * Response containing server-level system metrics time-series.
 *
 * @generated from message soulfire.v1.GetServerMetricsResponse
 */
export type GetServerMetricsResponse = Message<"soulfire.v1.GetServerMetricsResponse"> & {
  /**
   * Time-series snapshots ordered oldest to newest.
   * Contains up to 600 snapshots (30 minutes at 3-second intervals).
   *
   * @generated from field: repeated soulfire.v1.ServerMetricsSnapshot snapshots = 1;
   */
  snapshots: ServerMetricsSnapshot[];
};

/**
 * Describes the message soulfire.v1.GetServerMetricsResponse.
 * Use `create(GetServerMetricsResponseSchema)` to create a new message.
 */
export const GetServerMetricsResponseSchema: GenMessage<GetServerMetricsResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_metrics, 7);

/**
 * Service for retrieving instance metrics and monitoring data.
 * Metrics are collected server-side and stored in a ring buffer.
 * All operations require appropriate permissions.
 *
 * @generated from service soulfire.v1.MetricsService
 */
export const MetricsService: GenService<{
  /**
   * Returns time-series metrics and current distributions for an instance.
   * Supports incremental fetching via the "since" parameter.
   * Requires: READ_BOT_INFO permission on the instance
   * Errors: NOT_FOUND if instance does not exist
   *
   * @generated from rpc soulfire.v1.MetricsService.GetInstanceMetrics
   */
  getInstanceMetrics: {
    methodKind: "unary";
    input: typeof GetInstanceMetricsRequestSchema;
    output: typeof GetInstanceMetricsResponseSchema;
  },
  /**
   * Returns server-level system metrics (CPU, memory, threads, GC, aggregate bots).
   * Supports incremental fetching via the "since" parameter.
   * Requires: READ_SERVER_CONFIG global permission
   *
   * @generated from rpc soulfire.v1.MetricsService.GetServerMetrics
   */
  getServerMetrics: {
    methodKind: "unary";
    input: typeof GetServerMetricsRequestSchema;
    output: typeof GetServerMetricsResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_metrics, 0);
