// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/instance_live.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 type { BotChatEvent, BotEvent, BotEventFilter, BotLifecycleEvent } from "./bot_live_pb.js";
import { file_soulfire_bot_live } from "./bot_live_pb.js";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb.js";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file soulfire/instance_live.proto.
 */
export const file_soulfire_instance_live: GenFile = /*@__PURE__*/
  fileDesc("Chxzb3VsZmlyZS9pbnN0YW5jZV9saXZlLnByb3RvEgtzb3VsZmlyZS52MSKoAQoTSW5zdGFuY2VFdmVudEZpbHRlchIUCgxpbmNsdWRlX2NoYXQYASABKAgSGQoRaW5jbHVkZV9saWZlY3ljbGUYAiABKAgSNAoKYm90X2V2ZW50cxgDIAEoCzIbLnNvdWxmaXJlLnYxLkJvdEV2ZW50RmlsdGVySACIAQESGwoHYm90X2lkcxgEIAMoCUIK0vMYBgoEdXVpZEINCgtfYm90X2V2ZW50cyJ3ChpXYXRjaEluc3RhbmNlRXZlbnRzUmVxdWVzdBIiCgtpbnN0YW5jZV9pZBgBIAEoCUIN4EEC0vMYBgoEdXVpZBI1CgZmaWx0ZXIYAiABKAsyIC5zb3VsZmlyZS52MS5JbnN0YW5jZUV2ZW50RmlsdGVyQgPgQQIi3QEKDUluc3RhbmNlRXZlbnQSJQoOYm90X3Byb2ZpbGVfaWQYASABKAlCDeBBAtLzGAYKBHV1aWQSEAoIYm90X25hbWUYAiABKAkSKQoEY2hhdBgDIAEoCzIZLnNvdWxmaXJlLnYxLkJvdENoYXRFdmVudEgAEjMKCWxpZmVjeWNsZRgEIAEoCzIeLnNvdWxmaXJlLnYxLkJvdExpZmVjeWNsZUV2ZW50SAASKgoJYm90X2V2ZW50GAUgASgLMhUuc291bGZpcmUudjEuQm90RXZlbnRIAEIHCgVldmVudDKhAgoTSW5zdGFuY2VMaXZlU2VydmljZRKJAgoTV2F0Y2hJbnN0YW5jZUV2ZW50cxInLnNvdWxmaXJlLnYxLldhdGNoSW5zdGFuY2VFdmVudHNSZXF1ZXN0Ghouc291bGZpcmUudjEuSW5zdGFuY2VFdmVudCKqAcrzGKUBChVXYXRjaCBpbnN0YW5jZSBldmVudHMaDVJFQURfQk9UX0lORk8iCGluc3RhbmNlMjNPcGVucyBhIGxpdmUgZXZlbnQgc3RyZWFtIHVudGlsIHRoZSBjbGllbnQgY2FuY2Vscy46PkFsbG9jYXRlcyBzZXJ2ZXItc2lkZSBzdWJzY3JpcHRpb24gcmVzb3VyY2VzIGZvciB0aGUgaW5zdGFuY2UuMAFCIQodY29tLnNvdWxmaXJlbWMuZ3JwYy5nZW5lcmF0ZWRQAWIGcHJvdG8z", [file_soulfire_api_docs, file_soulfire_bot_live, file_google_api_field_behavior]);

/**
 * Selects which categories of events the instance stream should deliver.
 * Each category is opt-in; a stream with no categories enabled stays silent.
 *
 * @generated from message soulfire.v1.InstanceEventFilter
 */
export type InstanceEventFilter = Message<"soulfire.v1.InstanceEventFilter"> & {
  /**
   * Deliver chat and system messages observed by any bot as BotChatEvent.
   *
   * @generated from field: bool include_chat = 1;
   */
  includeChat: boolean;

  /**
   * Deliver connect / disconnect lifecycle events as BotLifecycleEvent.
   *
   * @generated from field: bool include_lifecycle = 2;
   */
  includeLifecycle: boolean;

  /**
   * Full bot event filter. When present, this supersedes the two legacy
   * category flags above and can request any BotEvent category.
   *
   * @generated from field: optional soulfire.v1.BotEventFilter bot_events = 3;
   */
  botEvents?: BotEventFilter | undefined;

  /**
   * Optional profile UUID allowlist. Empty selects every configured bot.
   *
   * @generated from field: repeated string bot_ids = 4;
   */
  botIds: string[];
};

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

/**
 * Request to subscribe to an instance's multiplexed live event stream.
 *
 * @generated from message soulfire.v1.WatchInstanceEventsRequest
 */
export type WatchInstanceEventsRequest = Message<"soulfire.v1.WatchInstanceEventsRequest"> & {
  /**
   * The UUID of the SoulFire instance to watch.
   *
   * @generated from field: string instance_id = 1;
   */
  instanceId: string;

  /**
   * Which event categories to include in the stream.
   *
   * @generated from field: soulfire.v1.InstanceEventFilter filter = 2;
   */
  filter?: InstanceEventFilter | undefined;
};

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

/**
 * A single event on the instance-wide stream, tagged with the bot that
 * produced it.
 *
 * @generated from message soulfire.v1.InstanceEvent
 */
export type InstanceEvent = Message<"soulfire.v1.InstanceEvent"> & {
  /**
   * Profile UUID of the bot that observed / produced this event.
   *
   * @generated from field: string bot_profile_id = 1;
   */
  botProfileId: string;

  /**
   * Last known account name of that bot, for convenient display. May be empty.
   *
   * @generated from field: string bot_name = 2;
   */
  botName: string;

  /**
   * @generated from oneof soulfire.v1.InstanceEvent.event
   */
  event: {
    /**
     * A chat or system message observed by the bot.
     *
     * @generated from field: soulfire.v1.BotChatEvent chat = 3;
     */
    value: BotChatEvent;
    case: "chat";
  } | {
    /**
     * A connection lifecycle change for the bot.
     *
     * @generated from field: soulfire.v1.BotLifecycleEvent lifecycle = 4;
     */
    value: BotLifecycleEvent;
    case: "lifecycle";
  } | {
    /**
     * Any bot event not represented by the legacy fields above. Chat and
     * lifecycle continue to use their original variants for wire compatibility.
     *
     * @generated from field: soulfire.v1.BotEvent bot_event = 5;
     */
    value: BotEvent;
    case: "botEvent";
  } | { case: undefined; value?: undefined };
};

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

/**
 * Service for streaming instance-wide live events.
 * All operations require appropriate permissions.
 *
 * @generated from service soulfire.v1.InstanceLiveService
 */
export const InstanceLiveService: GenService<{
  /**
   * Subscribes to a single multiplexed event stream covering every bot in the
   * instance. The stream stays open until the client cancels. Each selected
   * bot contributes its current status and live snapshots before incremental
   * events begin.
   *
   * @generated from rpc soulfire.v1.InstanceLiveService.WatchInstanceEvents
   */
  watchInstanceEvents: {
    methodKind: "server_streaming";
    input: typeof WatchInstanceEventsRequestSchema;
    output: typeof InstanceEventSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_instance_live, 0);
