// 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 type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import type { AgentHandoff, ChatMessage, FunctionCall, FunctionCallOutput } from "./livekit_agent_session_pb.js"; /** * @generated from enum livekit.agent.TextMessageErrorCode */ export declare enum TextMessageErrorCode { /** * Unexpected internal error * * @generated from enum value: INTERNAL_ERROR = 0; */ INTERNAL_ERROR = 0, /** * Session state not found in cache or version mismatch * * @generated from enum value: SESSION_STATE_NOT_FOUND = 1; */ SESSION_STATE_NOT_FOUND = 1, /** * An exception was raised inside the user's text handler * * @generated from enum value: TEXT_HANDLER_ERROR = 2; */ TEXT_HANDLER_ERROR = 2, /** * The worker process exited before the text session completed * * @generated from enum value: PROCESS_CLOSED = 3; */ PROCESS_CLOSED = 3, } /** * Request to send a text message to an agent. * * @generated from message livekit.agent.TextMessageRequest */ export declare class TextMessageRequest extends Message { /** * @generated from field: string text = 1; */ text: string; /** * @generated from field: string message_id = 2; */ messageId: string; /** * @generated from field: string session_id = 3; */ sessionId: string; /** * @generated from field: string agent_name = 4; */ agentName: string; /** * @generated from field: string metadata = 5; */ metadata: string; /** * @generated from field: optional livekit.agent.AgentSessionState session_state = 6; */ sessionState?: AgentSessionState; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "livekit.agent.TextMessageRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): TextMessageRequest; static fromJson(jsonValue: JsonValue, options?: Partial): TextMessageRequest; static fromJsonString(jsonString: string, options?: Partial): TextMessageRequest; static equals(a: TextMessageRequest | PlainMessage | undefined, b: TextMessageRequest | PlainMessage | undefined): boolean; } /** * 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 declare class TextMessageResponse extends Message { /** * @generated from field: string message_id = 1; */ messageId: string; /** * @generated from field: string session_id = 2; */ sessionId: string; /** * @generated from oneof livekit.agent.TextMessageResponse.event */ event: { /** * @generated from field: livekit.agent.ChatMessage message = 3; */ value: ChatMessage; case: "message"; } | { /** * @generated from field: livekit.agent.FunctionCall function_call = 4; */ value: FunctionCall; case: "functionCall"; } | { /** * @generated from field: livekit.agent.FunctionCallOutput function_call_output = 5; */ value: FunctionCallOutput; case: "functionCallOutput"; } | { /** * @generated from field: livekit.agent.AgentHandoff agent_handoff = 6; */ value: AgentHandoff; case: "agentHandoff"; } | { /** * @generated from field: livekit.agent.TextMessageComplete complete = 7; */ value: TextMessageComplete; case: "complete"; } | { case: undefined; value?: undefined }; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "livekit.agent.TextMessageResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): TextMessageResponse; static fromJson(jsonValue: JsonValue, options?: Partial): TextMessageResponse; static fromJsonString(jsonString: string, options?: Partial): TextMessageResponse; static equals(a: TextMessageResponse | PlainMessage | undefined, b: TextMessageResponse | PlainMessage | undefined): boolean; } /** * Indicates the text message session is complete. * * @generated from message livekit.agent.TextMessageComplete */ export declare class TextMessageComplete extends Message { /** * @generated from oneof livekit.agent.TextMessageComplete.result */ result: { /** * @generated from field: livekit.agent.AgentSessionState session_state = 1; */ value: AgentSessionState; case: "sessionState"; } | { /** * @generated from field: livekit.agent.TextMessageError error = 2; */ value: TextMessageError; case: "error"; } | { case: undefined; value?: undefined }; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "livekit.agent.TextMessageComplete"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): TextMessageComplete; static fromJson(jsonValue: JsonValue, options?: Partial): TextMessageComplete; static fromJsonString(jsonString: string, options?: Partial): TextMessageComplete; static equals(a: TextMessageComplete | PlainMessage | undefined, b: TextMessageComplete | PlainMessage | undefined): boolean; } /** * @generated from message livekit.agent.AgentSessionState */ export declare class AgentSessionState extends Message { /** * @generated from field: uint64 version = 1; */ version: bigint; /** * @generated from oneof livekit.agent.AgentSessionState.data */ data: { /** * @generated from field: bytes snapshot = 2; */ value: Uint8Array; case: "snapshot"; } | { /** * @generated from field: bytes delta = 3; */ value: Uint8Array; case: "delta"; } | { case: undefined; value?: undefined }; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "livekit.agent.AgentSessionState"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): AgentSessionState; static fromJson(jsonValue: JsonValue, options?: Partial): AgentSessionState; static fromJsonString(jsonString: string, options?: Partial): AgentSessionState; static equals(a: AgentSessionState | PlainMessage | undefined, b: AgentSessionState | PlainMessage | undefined): boolean; } /** * @generated from message livekit.agent.TextMessageError */ export declare class TextMessageError extends Message { /** * @generated from field: string message = 1; */ message: string; /** * @generated from field: livekit.agent.TextMessageErrorCode code = 2; */ code: TextMessageErrorCode; constructor(data?: PartialMessage); static readonly runtime: typeof proto3; static readonly typeName = "livekit.agent.TextMessageError"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial): TextMessageError; static fromJson(jsonValue: JsonValue, options?: Partial): TextMessageError; static fromJsonString(jsonString: string, options?: Partial): TextMessageError; static equals(a: TextMessageError | PlainMessage | undefined, b: TextMessageError | PlainMessage | undefined): boolean; }