// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/plugin_stats.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/plugin_stats.proto.
 */
export const file_soulfire_plugin_stats: GenFile = /*@__PURE__*/
  fileDesc("Chtzb3VsZmlyZS9wbHVnaW5fc3RhdHMucHJvdG8SC3NvdWxmaXJlLnYxInkKDFBsdWdpbk1ldHJpYxIQCgNrZXkYASABKAlCA+BBAhIZCgxkaXNwbGF5X25hbWUYAiABKAlCA+BBAhISCgV2YWx1ZRgDIAEoAUID4EECEgwKBHVuaXQYBCABKAkSEQoEaWNvbhgFIAEoCUgAiAEBQgcKBV9pY29uIr8BChFQbHVnaW5SdW50aW1lU3RhdBIWCglwbHVnaW5faWQYASABKAlCA+BBAhIUCgdlbmFibGVkGAIgASgIQgPgQQISHQoQYWN0aXZlX2JvdF9jb3VudBgDIAEoBUID4EECEjEKDXJ1bm5pbmdfc2luY2UYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEioKB21ldHJpY3MYBSADKAsyGS5zb3VsZmlyZS52MS5QbHVnaW5NZXRyaWMiQwodR2V0SW5zdGFuY2VQbHVnaW5TdGF0c1JlcXVlc3QSIgoLaW5zdGFuY2VfaWQYASABKAlCDeBBAtLzGAYKBHV1aWQiVAoeR2V0SW5zdGFuY2VQbHVnaW5TdGF0c1Jlc3BvbnNlEjIKBXN0YXRzGAEgAygLMh4uc291bGZpcmUudjEuUGx1Z2luUnVudGltZVN0YXRCA+BBAjLyAQoSUGx1Z2luU3RhdHNTZXJ2aWNlEtsBChZHZXRJbnN0YW5jZVBsdWdpblN0YXRzEiouc291bGZpcmUudjEuR2V0SW5zdGFuY2VQbHVnaW5TdGF0c1JlcXVlc3QaKy5zb3VsZmlyZS52MS5HZXRJbnN0YW5jZVBsdWdpblN0YXRzUmVzcG9uc2UiaMrzGDQKGUdldCBpbnN0YW5jZSBwbHVnaW4gc3RhdHMaDVJFQURfQk9UX0lORk8iCGluc3RhbmNlgtPkkwIqEigvdjEvaW5zdGFuY2VzL3tpbnN0YW5jZV9pZH0vcGx1Z2luLXN0YXRzQiEKHWNvbS5zb3VsZmlyZW1jLmdycGMuZ2VuZXJhdGVkUAFiBnByb3RvMw", [file_soulfire_api_docs, file_google_api_annotations, file_google_api_field_behavior, file_google_protobuf_timestamp]);

/**
 * A single named metric reported by a plugin (a counter or a gauge).
 *
 * @generated from message soulfire.v1.PluginMetric
 */
export type PluginMetric = Message<"soulfire.v1.PluginMetric"> & {
  /**
   * Stable machine key for the metric (e.g. "diamonds_mined").
   *
   * @generated from field: string key = 1;
   */
  key: string;

  /**
   * Human-friendly label for display (e.g. "Diamonds mined").
   *
   * @generated from field: string display_name = 2;
   */
  displayName: string;

  /**
   * Current value. Counters accumulate; gauges reflect the latest set value.
   *
   * @generated from field: double value = 3;
   */
  value: number;

  /**
   * Optional unit shown next to the value (e.g. "blocks", "ms"). May be empty.
   *
   * @generated from field: string unit = 4;
   */
  unit: string;

  /**
   * Optional icon hint for the client (e.g. a Minecraft item id like
   * "minecraft:diamond", or a lucide icon name). Absent if not provided.
   *
   * @generated from field: optional string icon = 5;
   */
  icon?: string | undefined;
};

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

/**
 * Runtime status for a single plugin within an instance.
 *
 * @generated from message soulfire.v1.PluginRuntimeStat
 */
export type PluginRuntimeStat = Message<"soulfire.v1.PluginRuntimeStat"> & {
  /**
   * The plugin id (matches ServerPlugin.id).
   *
   * @generated from field: string plugin_id = 1;
   */
  pluginId: string;

  /**
   * Whether the plugin is currently active in this instance (has reported at
   * least once during the current session).
   *
   * @generated from field: bool enabled = 2;
   */
  enabled: boolean;

  /**
   * Number of currently-online bots this plugin is acting on.
   *
   * @generated from field: int32 active_bot_count = 3;
   */
  activeBotCount: number;

  /**
   * When the plugin first became active in the current session.
   *
   * @generated from field: google.protobuf.Timestamp running_since = 4;
   */
  runningSince?: Timestamp | undefined;

  /**
   * All metrics the plugin has reported, ordered by registration.
   *
   * @generated from field: repeated soulfire.v1.PluginMetric metrics = 5;
   */
  metrics: PluginMetric[];
};

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

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

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

/**
 * Response containing runtime stats for all reporting plugins in an instance.
 *
 * @generated from message soulfire.v1.GetInstancePluginStatsResponse
 */
export type GetInstancePluginStatsResponse = Message<"soulfire.v1.GetInstancePluginStatsResponse"> & {
  /**
   * One entry per plugin that has reported runtime stats this session.
   *
   * @generated from field: repeated soulfire.v1.PluginRuntimeStat stats = 1;
   */
  stats: PluginRuntimeStat[];
};

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

/**
 * Service for retrieving plugin runtime statistics.
 * Stats are collected server-side from plugins via the plugin metrics API.
 * All operations require appropriate permissions.
 *
 * @generated from service soulfire.v1.PluginStatsService
 */
export const PluginStatsService: GenService<{
  /**
   * Returns runtime stats for every plugin that has reported in the instance.
   * Requires: READ_BOT_INFO permission on the instance
   * Errors: NOT_FOUND if instance does not exist
   *
   * @generated from rpc soulfire.v1.PluginStatsService.GetInstancePluginStats
   */
  getInstancePluginStats: {
    methodKind: "unary";
    input: typeof GetInstancePluginStatsRequestSchema;
    output: typeof GetInstancePluginStatsResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_plugin_stats, 0);
