// Copyright 2023 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_text.proto (package livekit.agent, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { proto3 } from "@bufbuild/protobuf";
import { AgentHandoff, ChatMessage, FunctionCall, FunctionCallOutput } from "./livekit_agent_session_pb.js";

/**
 * @generated from enum livekit.agent.TextMessageErrorCode
 */
export const TextMessageErrorCode = /*@__PURE__*/ proto3.makeEnum(
  "livekit.agent.TextMessageErrorCode",
  [
    {no: 0, name: "INTERNAL_ERROR"},
    {no: 1, name: "SESSION_STATE_NOT_FOUND"},
    {no: 2, name: "TEXT_HANDLER_ERROR"},
    {no: 3, name: "PROCESS_CLOSED"},
  ],
);

/**
 * Request to send a text message to an agent.
 *
 * @generated from message livekit.agent.TextMessageRequest
 */
export const TextMessageRequest = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.TextMessageRequest",
  () => [
    { no: 1, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "agent_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "session_state", kind: "message", T: AgentSessionState, opt: true },
  ],
);

/**
 * Response to a text message request, multiple responses may be sent for a single request until it is complete.
 *
 * @generated from message livekit.agent.TextMessageResponse
 */
export const TextMessageResponse = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.TextMessageResponse",
  () => [
    { no: 1, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "message", kind: "message", T: ChatMessage, oneof: "event" },
    { no: 4, name: "function_call", kind: "message", T: FunctionCall, oneof: "event" },
    { no: 5, name: "function_call_output", kind: "message", T: FunctionCallOutput, oneof: "event" },
    { no: 6, name: "agent_handoff", kind: "message", T: AgentHandoff, oneof: "event" },
    { no: 7, name: "complete", kind: "message", T: TextMessageComplete, oneof: "event" },
  ],
);

/**
 * Indicates the text message session is complete.
 *
 * @generated from message livekit.agent.TextMessageComplete
 */
export const TextMessageComplete = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.TextMessageComplete",
  () => [
    { no: 1, name: "session_state", kind: "message", T: AgentSessionState, oneof: "result" },
    { no: 2, name: "error", kind: "message", T: TextMessageError, oneof: "result" },
  ],
);

/**
 * @generated from message livekit.agent.AgentSessionState
 */
export const AgentSessionState = /*@__PURE__*/ proto3.makeMessageType(
  "livekit.agent.AgentSessionState",
  () => [
    { no: 1, name: "version", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 2, name: "snapshot", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "data" },
    { no: 3, name: "delta", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "data" },
  ],
);

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

