// Copyright 2026 LiveKit, Inc.
//
// 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
//
//   http://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.

// @generated by protoc-gen-es v1.10.1 with parameter "target=dts+js"
// @generated from file agent/livekit_agent_inference.proto (package livekit.agent, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { Duration, proto3, Timestamp } from "@bufbuild/protobuf";
import { ChatMessage } from "./livekit_agent_session_pb.js";

/**
 * @generated from enum livekit.agent.AudioEncoding
 */
export const AudioEncoding = /*@__PURE__*/ proto3.makeEnum(
  "livekit.agent.AudioEncoding",
  [
    {no: 0, name: "AUDIO_ENCODING_PCM_S16LE", localName: "PCM_S16LE"},
    {no: 1, name: "AUDIO_ENCODING_OPUS", localName: "OPUS"},
  ],
);

/**
 * @generated from message livekit.agent.SessionSettings
 */
export const SessionSettings = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionSettings",
  () => [
    { no: 1, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
    { no: 2, name: "encoding", kind: "enum", T: proto3.getEnumType(AudioEncoding) },
    { no: 3, name: "eot_settings", kind: "message", T: EotSettings, oneof: "type_settings" },
    { no: 4, name: "interruption_settings", kind: "message", T: InterruptionSettings, oneof: "type_settings" },
  ],
);

/**
 * @generated from message livekit.agent.InferenceError
 */
export const InferenceError = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceError",
  () => [
    { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ],
);

/**
 * @generated from message livekit.agent.EotSettings
 */
export const EotSettings = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.EotSettings",
  () => [
    { no: 1, name: "detection_interval", kind: "message", T: Duration },
  ],
);

/**
 * @generated from message livekit.agent.InterruptionSettings
 */
export const InterruptionSettings = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InterruptionSettings",
  () => [
    { no: 1, name: "threshold", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
    { no: 2, name: "min_frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
    { no: 3, name: "max_audio_duration", kind: "message", T: Duration },
    { no: 4, name: "audio_prefix_duration", kind: "message", T: Duration },
    { no: 5, name: "detection_interval", kind: "message", T: Duration },
  ],
);

/**
 * @generated from message livekit.agent.SessionCreate
 */
export const SessionCreate = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionCreate",
  () => [
    { no: 1, name: "settings", kind: "message", T: SessionSettings },
  ],
);

/**
 * @generated from message livekit.agent.InputAudio
 */
export const InputAudio = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InputAudio",
  () => [
    { no: 1, name: "audio", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 2, name: "created_at", kind: "message", T: Timestamp },
    { no: 3, name: "num_samples", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ],
);

/**
 * @generated from message livekit.agent.EotInputChatContext
 */
export const EotInputChatContext = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.EotInputChatContext",
  () => [
    { no: 1, name: "messages", kind: "message", T: ChatMessage, repeated: true },
  ],
);

/**
 * @generated from message livekit.agent.SessionFlush
 */
export const SessionFlush = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionFlush",
  [],
);

/**
 * @generated from message livekit.agent.SessionClose
 */
export const SessionClose = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionClose",
  [],
);

/**
 * @generated from message livekit.agent.InferenceStart
 */
export const InferenceStart = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceStart",
  () => [
    { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ],
);

/**
 * @generated from message livekit.agent.InferenceStop
 */
export const InferenceStop = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceStop",
  () => [
    { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ],
);

/**
 * audio buffer sentinel messages
 *
 * @generated from message livekit.agent.BufferStart
 */
export const BufferStart = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.BufferStart",
  [],
);

/**
 * @generated from message livekit.agent.BufferStop
 */
export const BufferStop = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.BufferStop",
  [],
);

/**
 * @generated from message livekit.agent.ClientMessage
 */
export const ClientMessage = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.ClientMessage",
  () => [
    { no: 1, name: "created_at", kind: "message", T: Timestamp },
    { no: 2, name: "session_create", kind: "message", T: SessionCreate, oneof: "message" },
    { no: 3, name: "input_audio", kind: "message", T: InputAudio, oneof: "message" },
    { no: 4, name: "session_flush", kind: "message", T: SessionFlush, oneof: "message" },
    { no: 5, name: "session_close", kind: "message", T: SessionClose, oneof: "message" },
    { no: 6, name: "inference_start", kind: "message", T: InferenceStart, oneof: "message" },
    { no: 7, name: "inference_stop", kind: "message", T: InferenceStop, oneof: "message" },
    { no: 8, name: "buffer_start", kind: "message", T: BufferStart, oneof: "message" },
    { no: 9, name: "buffer_stop", kind: "message", T: BufferStop, oneof: "message" },
    { no: 10, name: "eot_input_chat_context", kind: "message", T: EotInputChatContext, oneof: "message" },
  ],
);

/**
 * @generated from message livekit.agent.EotInferenceRequest
 */
export const EotInferenceRequest = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.EotInferenceRequest",
  () => [
    { no: 1, name: "audio", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 2, name: "assistant_text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "encoding", kind: "enum", T: proto3.getEnumType(AudioEncoding) },
    { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ],
);

/**
 * @generated from message livekit.agent.InterruptionInferenceRequest
 */
export const InterruptionInferenceRequest = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InterruptionInferenceRequest",
  () => [
    { no: 1, name: "audio", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 2, name: "encoding", kind: "enum", T: proto3.getEnumType(AudioEncoding) },
    { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
  ],
);

/**
 * @generated from message livekit.agent.InferenceRequest
 */
export const InferenceRequest = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceRequest",
  () => [
    { no: 1, name: "eot_inference_request", kind: "message", T: EotInferenceRequest, oneof: "request" },
    { no: 2, name: "interruption_inference_request", kind: "message", T: InterruptionInferenceRequest, oneof: "request" },
  ],
);

/**
 * @generated from message livekit.agent.InferenceStats
 */
export const InferenceStats = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceStats",
  () => [
    { no: 1, name: "earliest_client_created_at", kind: "message", T: Timestamp, opt: true },
    { no: 2, name: "latest_client_created_at", kind: "message", T: Timestamp, opt: true },
    { no: 3, name: "client_e2e_latency", kind: "message", T: Duration, opt: true },
    { no: 4, name: "server_e2e_latency", kind: "message", T: Duration },
    { no: 5, name: "preprocessing_duration", kind: "message", T: Duration },
    { no: 6, name: "inference_duration", kind: "message", T: Duration },
  ],
);

/**
 * @generated from message livekit.agent.EotInferenceResponse
 */
export const EotInferenceResponse = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.EotInferenceResponse",
  () => [
    { no: 1, name: "probability", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
    { no: 2, name: "stats", kind: "message", T: InferenceStats },
  ],
);

/**
 * @generated from message livekit.agent.InterruptionInferenceResponse
 */
export const InterruptionInferenceResponse = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InterruptionInferenceResponse",
  () => [
    { no: 1, name: "is_interruption", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 2, name: "probabilities", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
    { no: 3, name: "stats", kind: "message", T: InferenceStats },
  ],
);

/**
 * @generated from message livekit.agent.InferenceResponse
 */
export const InferenceResponse = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceResponse",
  () => [
    { no: 1, name: "eot_inference_response", kind: "message", T: EotInferenceResponse, oneof: "response" },
    { no: 2, name: "interruption_inference_response", kind: "message", T: InterruptionInferenceResponse, oneof: "response" },
  ],
);

/**
 * @generated from message livekit.agent.SessionCreated
 */
export const SessionCreated = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionCreated",
  () => [
    { no: 1, name: "default_thresholds", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 2 /* ScalarType.FLOAT */} },
    { no: 2, name: "default_threshold", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
    { no: 3, name: "default_backchannel_thresholds", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 2 /* ScalarType.FLOAT */} },
    { no: 4, name: "default_backchannel_threshold", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
  ],
);

/**
 * @generated from message livekit.agent.InferenceStarted
 */
export const InferenceStarted = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceStarted",
  [],
);

/**
 * @generated from message livekit.agent.InferenceStopped
 */
export const InferenceStopped = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InferenceStopped",
  [],
);

/**
 * @generated from message livekit.agent.SessionClosed
 */
export const SessionClosed = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.SessionClosed",
  [],
);

/**
 * @generated from message livekit.agent.EotPrediction
 */
export const EotPrediction = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.EotPrediction",
  () => [
    { no: 1, name: "probability", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
    { no: 2, name: "inference_stats", kind: "message", T: InferenceStats },
    { no: 3, name: "backend", kind: "enum", T: proto3.getEnumType(EotPrediction_EotBackend) },
    { no: 4, name: "backchannel_probability", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
  ],
);

/**
 * @generated from enum livekit.agent.EotPrediction.EotBackend
 */
export const EotPrediction_EotBackend = /*@__PURE__*/ proto3.makeEnum(
  "livekit.agent.EotPrediction.EotBackend",
  [
    {no: 0, name: "EOT_BACKEND_UNKNOWN", localName: "UNKNOWN"},
    {no: 1, name: "EOT_BACKEND_MULTIMODAL", localName: "MULTIMODAL"},
    {no: 2, name: "EOT_BACKEND_TEXT", localName: "TEXT"},
  ],
);

/**
 * @generated from message livekit.agent.InterruptionPrediction
 */
export const InterruptionPrediction = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.InterruptionPrediction",
  () => [
    { no: 1, name: "is_interruption", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 2, name: "probabilities", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
    { no: 3, name: "inference_stats", kind: "message", T: InferenceStats },
  ],
);

/**
 * @generated from message livekit.agent.ServerMessage
 */
export const ServerMessage = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.ServerMessage",
  () => [
    { no: 1, name: "server_created_at", kind: "message", T: Timestamp },
    { no: 2, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
    { no: 3, name: "client_created_at", kind: "message", T: Timestamp, opt: true },
    { no: 4, name: "session_created", kind: "message", T: SessionCreated, oneof: "message" },
    { no: 5, name: "inference_started", kind: "message", T: InferenceStarted, oneof: "message" },
    { no: 6, name: "inference_stopped", kind: "message", T: InferenceStopped, oneof: "message" },
    { no: 7, name: "session_closed", kind: "message", T: SessionClosed, oneof: "message" },
    { no: 8, name: "error", kind: "message", T: InferenceError, oneof: "message" },
    { no: 9, name: "eot_prediction", kind: "message", T: EotPrediction, oneof: "message" },
    { no: 10, name: "interruption_prediction", kind: "message", T: InterruptionPrediction, oneof: "message" },
  ],
);

