UNPKG

@copilotkit/runtime

Version:

<div align="center"> <a href="https://copilotkit.ai" target="_blank"> <img src="https://github.com/copilotkit/copilotkit/raw/main/assets/banner.png" alt="CopilotKit Logo"> </a>

1,494 lines (1,463 loc) 185 kB
import { EmptyAdapter, RemoteChain, streamLangChainResponse } from "./chunk-IIXJVVTV.mjs"; import { GuardrailsValidationFailureResponse, MessageStreamInterruptedResponse, ResponseStatusUnion, SuccessResponseStatus, UnknownErrorResponse } from "./chunk-5BIEM2UU.mjs"; import { ActionExecutionMessage, AgentStateMessage, ImageMessage, ResultMessage, TextMessage } from "./chunk-SHBDMA63.mjs"; import { BaseMessageInput } from "./chunk-2OZAGFV3.mjs"; import { __commonJS, __name, __toESM } from "./chunk-FHD4JECV.mjs"; // package.json var require_package = __commonJS({ "package.json"(exports, module) { module.exports = { name: "@copilotkit/runtime", private: false, homepage: "https://github.com/CopilotKit/CopilotKit", repository: { type: "git", url: "https://github.com/CopilotKit/CopilotKit.git" }, publishConfig: { access: "public" }, version: "1.9.1", sideEffects: false, main: "./dist/index.js", module: "./dist/index.mjs", exports: { ".": "./dist/index.js" }, types: "./dist/index.d.ts", license: "MIT", scripts: { build: 'tsup --onSuccess "pnpm run generate-graphql-schema"', dev: 'tsup --watch --onSuccess "pnpm run generate-graphql-schema"', test: "jest --passWithNoTests", "check-types": "tsc --noEmit", clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__", "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts", "link:global": "pnpm link --global", "unlink:global": "pnpm unlink --global" }, devDependencies: { "@jest/globals": "^29.7.0", "@swc/core": "1.5.28", "@types/express": "^4.17.21", "@types/jest": "^29.5.12", "@types/node": "^18.11.17", "@whatwg-node/server": "^0.9.34", eslint: "^8.56.0", "eslint-config-custom": "workspace:*", jest: "^29.6.4", nodemon: "^3.1.3", "ts-jest": "^29.1.1", "ts-node": "^10.9.2", tsconfig: "workspace:*", tsup: "^6.7.0", typescript: "^5.2.3", "zod-to-json-schema": "^3.23.5" }, dependencies: { "@ag-ui/client": "0.0.28", "@ag-ui/core": "0.0.28", "@ag-ui/encoder": "0.0.28", "@ag-ui/langgraph": "0.0.3", "@ag-ui/proto": "0.0.28", "@anthropic-ai/sdk": "^0.27.3", "@copilotkit/shared": "workspace:*", "@graphql-yoga/plugin-defer-stream": "^3.3.1", "@langchain/aws": "^0.1.9", "@langchain/community": "^0.3.29", "@langchain/core": "^0.3.38", "@langchain/google-gauth": "^0.1.0", "@langchain/langgraph-sdk": "^0.0.70", "@langchain/openai": "^0.4.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", express: "^4.19.2", graphql: "^16.8.1", "graphql-scalars": "^1.23.0", "graphql-yoga": "^5.3.1", "groq-sdk": "^0.5.0", langchain: "^0.3.3", openai: "^4.85.1", "partial-json": "^0.1.7", pino: "^9.2.0", "pino-pretty": "^11.2.1", "reflect-metadata": "^0.2.2", rxjs: "^7.8.1", "type-graphql": "2.0.0-rc.1", zod: "^3.23.3" }, peerDependencies: { "@ag-ui/client": ">=0.0.28", "@ag-ui/core": ">=0.0.28", "@ag-ui/encoder": ">=0.0.28", "@ag-ui/proto": ">=0.0.28" }, keywords: [ "copilotkit", "copilot", "react", "nextjs", "nodejs", "ai", "assistant", "javascript", "automation", "textarea" ] }; } }); // src/lib/integrations/node-http/index.ts import { createYoga } from "graphql-yoga"; // src/lib/integrations/shared.ts import { buildSchemaSync } from "type-graphql"; // src/graphql/resolvers/copilot.resolver.ts import { Arg, Ctx, Mutation, Query, Resolver } from "type-graphql"; import { ReplaySubject as ReplaySubject3, Subject, filter, finalize, firstValueFrom as firstValueFrom2, shareReplay, skipWhile, take, takeWhile, tap } from "rxjs"; // src/graphql/inputs/generate-copilot-response.input.ts import { Field as Field15, InputType as InputType11 } from "type-graphql"; // src/graphql/inputs/message.input.ts import { Field, InputType } from "type-graphql"; // src/graphql/types/enums.ts import { registerEnumType } from "type-graphql"; var MessageRole; (function(MessageRole2) { MessageRole2["user"] = "user"; MessageRole2["assistant"] = "assistant"; MessageRole2["system"] = "system"; MessageRole2["tool"] = "tool"; MessageRole2["developer"] = "developer"; })(MessageRole || (MessageRole = {})); var CopilotRequestType; (function(CopilotRequestType2) { CopilotRequestType2["Chat"] = "Chat"; CopilotRequestType2["Task"] = "Task"; CopilotRequestType2["TextareaCompletion"] = "TextareaCompletion"; CopilotRequestType2["TextareaPopover"] = "TextareaPopover"; CopilotRequestType2["Suggestion"] = "Suggestion"; })(CopilotRequestType || (CopilotRequestType = {})); var ActionInputAvailability; (function(ActionInputAvailability2) { ActionInputAvailability2["disabled"] = "disabled"; ActionInputAvailability2["enabled"] = "enabled"; ActionInputAvailability2["remote"] = "remote"; })(ActionInputAvailability || (ActionInputAvailability = {})); registerEnumType(MessageRole, { name: "MessageRole", description: "The role of the message" }); registerEnumType(CopilotRequestType, { name: "CopilotRequestType", description: "The type of Copilot request" }); registerEnumType(ActionInputAvailability, { name: "ActionInputAvailability", description: "The availability of the frontend action" }); // src/graphql/inputs/message.input.ts function _ts_decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate, "_ts_decorate"); function _ts_metadata(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata, "_ts_metadata"); var MessageInput = class extends BaseMessageInput { textMessage; actionExecutionMessage; resultMessage; agentStateMessage; imageMessage; }; __name(MessageInput, "MessageInput"); _ts_decorate([ Field(() => TextMessageInput, { nullable: true }), _ts_metadata("design:type", typeof TextMessageInput === "undefined" ? Object : TextMessageInput) ], MessageInput.prototype, "textMessage", void 0); _ts_decorate([ Field(() => ActionExecutionMessageInput, { nullable: true }), _ts_metadata("design:type", typeof ActionExecutionMessageInput === "undefined" ? Object : ActionExecutionMessageInput) ], MessageInput.prototype, "actionExecutionMessage", void 0); _ts_decorate([ Field(() => ResultMessageInput, { nullable: true }), _ts_metadata("design:type", typeof ResultMessageInput === "undefined" ? Object : ResultMessageInput) ], MessageInput.prototype, "resultMessage", void 0); _ts_decorate([ Field(() => AgentStateMessageInput, { nullable: true }), _ts_metadata("design:type", typeof AgentStateMessageInput === "undefined" ? Object : AgentStateMessageInput) ], MessageInput.prototype, "agentStateMessage", void 0); _ts_decorate([ Field(() => ImageMessageInput, { nullable: true }), _ts_metadata("design:type", typeof ImageMessageInput === "undefined" ? Object : ImageMessageInput) ], MessageInput.prototype, "imageMessage", void 0); MessageInput = _ts_decorate([ InputType() ], MessageInput); var TextMessageInput = class { content; parentMessageId; role; }; __name(TextMessageInput, "TextMessageInput"); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], TextMessageInput.prototype, "content", void 0); _ts_decorate([ Field(() => String, { nullable: true }), _ts_metadata("design:type", String) ], TextMessageInput.prototype, "parentMessageId", void 0); _ts_decorate([ Field(() => MessageRole), _ts_metadata("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], TextMessageInput.prototype, "role", void 0); TextMessageInput = _ts_decorate([ InputType() ], TextMessageInput); var ActionExecutionMessageInput = class { name; arguments; parentMessageId; scope; }; __name(ActionExecutionMessageInput, "ActionExecutionMessageInput"); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ActionExecutionMessageInput.prototype, "name", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ActionExecutionMessageInput.prototype, "arguments", void 0); _ts_decorate([ Field(() => String, { nullable: true }), _ts_metadata("design:type", String) ], ActionExecutionMessageInput.prototype, "parentMessageId", void 0); _ts_decorate([ Field(() => String, { nullable: true, deprecationReason: "This field will be removed in a future version" }), _ts_metadata("design:type", typeof String === "undefined" ? Object : String) ], ActionExecutionMessageInput.prototype, "scope", void 0); ActionExecutionMessageInput = _ts_decorate([ InputType() ], ActionExecutionMessageInput); var ResultMessageInput = class { actionExecutionId; actionName; parentMessageId; result; }; __name(ResultMessageInput, "ResultMessageInput"); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ResultMessageInput.prototype, "actionExecutionId", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ResultMessageInput.prototype, "actionName", void 0); _ts_decorate([ Field(() => String, { nullable: true }), _ts_metadata("design:type", String) ], ResultMessageInput.prototype, "parentMessageId", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ResultMessageInput.prototype, "result", void 0); ResultMessageInput = _ts_decorate([ InputType() ], ResultMessageInput); var AgentStateMessageInput = class { threadId; agentName; role; state; running; nodeName; runId; active; }; __name(AgentStateMessageInput, "AgentStateMessageInput"); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], AgentStateMessageInput.prototype, "threadId", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], AgentStateMessageInput.prototype, "agentName", void 0); _ts_decorate([ Field(() => MessageRole), _ts_metadata("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], AgentStateMessageInput.prototype, "role", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], AgentStateMessageInput.prototype, "state", void 0); _ts_decorate([ Field(() => Boolean), _ts_metadata("design:type", Boolean) ], AgentStateMessageInput.prototype, "running", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], AgentStateMessageInput.prototype, "nodeName", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], AgentStateMessageInput.prototype, "runId", void 0); _ts_decorate([ Field(() => Boolean), _ts_metadata("design:type", Boolean) ], AgentStateMessageInput.prototype, "active", void 0); AgentStateMessageInput = _ts_decorate([ InputType() ], AgentStateMessageInput); var ImageMessageInput = class { format; bytes; parentMessageId; role; }; __name(ImageMessageInput, "ImageMessageInput"); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ImageMessageInput.prototype, "format", void 0); _ts_decorate([ Field(() => String), _ts_metadata("design:type", String) ], ImageMessageInput.prototype, "bytes", void 0); _ts_decorate([ Field(() => String, { nullable: true }), _ts_metadata("design:type", String) ], ImageMessageInput.prototype, "parentMessageId", void 0); _ts_decorate([ Field(() => MessageRole), _ts_metadata("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], ImageMessageInput.prototype, "role", void 0); ImageMessageInput = _ts_decorate([ InputType() ], ImageMessageInput); // src/graphql/inputs/frontend.input.ts import { Field as Field3, InputType as InputType3 } from "type-graphql"; // src/graphql/inputs/action.input.ts import { Field as Field2, InputType as InputType2 } from "type-graphql"; function _ts_decorate2(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate2, "_ts_decorate"); function _ts_metadata2(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata2, "_ts_metadata"); var ActionInput = class { name; description; jsonSchema; available; }; __name(ActionInput, "ActionInput"); _ts_decorate2([ Field2(() => String), _ts_metadata2("design:type", String) ], ActionInput.prototype, "name", void 0); _ts_decorate2([ Field2(() => String), _ts_metadata2("design:type", String) ], ActionInput.prototype, "description", void 0); _ts_decorate2([ Field2(() => String), _ts_metadata2("design:type", String) ], ActionInput.prototype, "jsonSchema", void 0); _ts_decorate2([ Field2(() => ActionInputAvailability, { nullable: true }), _ts_metadata2("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability) ], ActionInput.prototype, "available", void 0); ActionInput = _ts_decorate2([ InputType2() ], ActionInput); // src/graphql/inputs/frontend.input.ts function _ts_decorate3(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate3, "_ts_decorate"); function _ts_metadata3(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata3, "_ts_metadata"); var FrontendInput = class { toDeprecate_fullContext; actions; url; }; __name(FrontendInput, "FrontendInput"); _ts_decorate3([ Field3(() => String, { nullable: true }), _ts_metadata3("design:type", String) ], FrontendInput.prototype, "toDeprecate_fullContext", void 0); _ts_decorate3([ Field3(() => [ ActionInput ]), _ts_metadata3("design:type", Array) ], FrontendInput.prototype, "actions", void 0); _ts_decorate3([ Field3(() => String, { nullable: true }), _ts_metadata3("design:type", String) ], FrontendInput.prototype, "url", void 0); FrontendInput = _ts_decorate3([ InputType3() ], FrontendInput); // src/graphql/inputs/cloud.input.ts import { Field as Field5, InputType as InputType5 } from "type-graphql"; // src/graphql/inputs/cloud-guardrails.input.ts import { Field as Field4, InputType as InputType4 } from "type-graphql"; function _ts_decorate4(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate4, "_ts_decorate"); function _ts_metadata4(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata4, "_ts_metadata"); var GuardrailsRuleInput = class { allowList = []; denyList = []; }; __name(GuardrailsRuleInput, "GuardrailsRuleInput"); _ts_decorate4([ Field4(() => [ String ], { nullable: true }), _ts_metadata4("design:type", Array) ], GuardrailsRuleInput.prototype, "allowList", void 0); _ts_decorate4([ Field4(() => [ String ], { nullable: true }), _ts_metadata4("design:type", Array) ], GuardrailsRuleInput.prototype, "denyList", void 0); GuardrailsRuleInput = _ts_decorate4([ InputType4() ], GuardrailsRuleInput); var GuardrailsInput = class { inputValidationRules; }; __name(GuardrailsInput, "GuardrailsInput"); _ts_decorate4([ Field4(() => GuardrailsRuleInput, { nullable: false }), _ts_metadata4("design:type", typeof GuardrailsRuleInput === "undefined" ? Object : GuardrailsRuleInput) ], GuardrailsInput.prototype, "inputValidationRules", void 0); GuardrailsInput = _ts_decorate4([ InputType4() ], GuardrailsInput); // src/graphql/inputs/cloud.input.ts function _ts_decorate5(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate5, "_ts_decorate"); function _ts_metadata5(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata5, "_ts_metadata"); var CloudInput = class { guardrails; }; __name(CloudInput, "CloudInput"); _ts_decorate5([ Field5(() => GuardrailsInput, { nullable: true }), _ts_metadata5("design:type", typeof GuardrailsInput === "undefined" ? Object : GuardrailsInput) ], CloudInput.prototype, "guardrails", void 0); CloudInput = _ts_decorate5([ InputType5() ], CloudInput); // src/graphql/inputs/forwarded-parameters.input.ts import { Field as Field6, InputType as InputType6 } from "type-graphql"; function _ts_decorate6(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate6, "_ts_decorate"); function _ts_metadata6(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata6, "_ts_metadata"); var ForwardedParametersInput = class { model; maxTokens; stop; toolChoice; toolChoiceFunctionName; temperature; }; __name(ForwardedParametersInput, "ForwardedParametersInput"); _ts_decorate6([ Field6(() => String, { nullable: true }), _ts_metadata6("design:type", String) ], ForwardedParametersInput.prototype, "model", void 0); _ts_decorate6([ Field6(() => Number, { nullable: true }), _ts_metadata6("design:type", Number) ], ForwardedParametersInput.prototype, "maxTokens", void 0); _ts_decorate6([ Field6(() => [ String ], { nullable: true }), _ts_metadata6("design:type", Array) ], ForwardedParametersInput.prototype, "stop", void 0); _ts_decorate6([ Field6(() => String, { nullable: true }), _ts_metadata6("design:type", typeof String === "undefined" ? Object : String) ], ForwardedParametersInput.prototype, "toolChoice", void 0); _ts_decorate6([ Field6(() => String, { nullable: true }), _ts_metadata6("design:type", String) ], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0); _ts_decorate6([ Field6(() => Number, { nullable: true }), _ts_metadata6("design:type", Number) ], ForwardedParametersInput.prototype, "temperature", void 0); ForwardedParametersInput = _ts_decorate6([ InputType6() ], ForwardedParametersInput); // src/graphql/inputs/agent-session.input.ts import { Field as Field7, InputType as InputType7 } from "type-graphql"; function _ts_decorate7(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate7, "_ts_decorate"); function _ts_metadata7(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata7, "_ts_metadata"); var AgentSessionInput = class { agentName; threadId; nodeName; }; __name(AgentSessionInput, "AgentSessionInput"); _ts_decorate7([ Field7(() => String), _ts_metadata7("design:type", String) ], AgentSessionInput.prototype, "agentName", void 0); _ts_decorate7([ Field7(() => String, { nullable: true }), _ts_metadata7("design:type", String) ], AgentSessionInput.prototype, "threadId", void 0); _ts_decorate7([ Field7(() => String, { nullable: true }), _ts_metadata7("design:type", String) ], AgentSessionInput.prototype, "nodeName", void 0); AgentSessionInput = _ts_decorate7([ InputType7() ], AgentSessionInput); // src/graphql/inputs/agent-state.input.ts import { Field as Field8, InputType as InputType8 } from "type-graphql"; function _ts_decorate8(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate8, "_ts_decorate"); function _ts_metadata8(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata8, "_ts_metadata"); var AgentStateInput = class { agentName; state; config; }; __name(AgentStateInput, "AgentStateInput"); _ts_decorate8([ Field8(() => String), _ts_metadata8("design:type", String) ], AgentStateInput.prototype, "agentName", void 0); _ts_decorate8([ Field8(() => String), _ts_metadata8("design:type", String) ], AgentStateInput.prototype, "state", void 0); _ts_decorate8([ Field8(() => String, { nullable: true }), _ts_metadata8("design:type", String) ], AgentStateInput.prototype, "config", void 0); AgentStateInput = _ts_decorate8([ InputType8() ], AgentStateInput); // src/graphql/inputs/extensions.input.ts import { Field as Field9, InputType as InputType9 } from "type-graphql"; function _ts_decorate9(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate9, "_ts_decorate"); function _ts_metadata9(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata9, "_ts_metadata"); var ExtensionsInput = class { openaiAssistantAPI; }; __name(ExtensionsInput, "ExtensionsInput"); _ts_decorate9([ Field9(() => OpenAIApiAssistantAPIInput, { nullable: true }), _ts_metadata9("design:type", typeof OpenAIApiAssistantAPIInput === "undefined" ? Object : OpenAIApiAssistantAPIInput) ], ExtensionsInput.prototype, "openaiAssistantAPI", void 0); ExtensionsInput = _ts_decorate9([ InputType9() ], ExtensionsInput); var OpenAIApiAssistantAPIInput = class { runId; threadId; }; __name(OpenAIApiAssistantAPIInput, "OpenAIApiAssistantAPIInput"); _ts_decorate9([ Field9(() => String, { nullable: true }), _ts_metadata9("design:type", String) ], OpenAIApiAssistantAPIInput.prototype, "runId", void 0); _ts_decorate9([ Field9(() => String, { nullable: true }), _ts_metadata9("design:type", String) ], OpenAIApiAssistantAPIInput.prototype, "threadId", void 0); OpenAIApiAssistantAPIInput = _ts_decorate9([ InputType9() ], OpenAIApiAssistantAPIInput); // src/graphql/inputs/meta-event.input.ts import { Field as Field14, InputType as InputType10 } from "type-graphql"; // src/graphql/types/meta-events.type.ts import { Field as Field13, InterfaceType as InterfaceType2, ObjectType as ObjectType4, registerEnumType as registerEnumType3 } from "type-graphql"; // src/graphql/types/copilot-response.type.ts import { Field as Field12, InterfaceType, ObjectType as ObjectType3 } from "type-graphql"; // src/graphql/types/message-status.type.ts import { Field as Field10, ObjectType, createUnionType, registerEnumType as registerEnumType2 } from "type-graphql"; function _ts_decorate10(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate10, "_ts_decorate"); function _ts_metadata10(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata10, "_ts_metadata"); var MessageStatusCode; (function(MessageStatusCode2) { MessageStatusCode2["Pending"] = "pending"; MessageStatusCode2["Success"] = "success"; MessageStatusCode2["Failed"] = "failed"; })(MessageStatusCode || (MessageStatusCode = {})); registerEnumType2(MessageStatusCode, { name: "MessageStatusCode" }); var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 { code; }, "BaseMessageStatus"); _ts_decorate10([ Field10(() => MessageStatusCode), _ts_metadata10("design:type", String) ], BaseMessageStatus.prototype, "code", void 0); BaseMessageStatus = _ts_decorate10([ ObjectType() ], BaseMessageStatus); var PendingMessageStatus = class extends BaseMessageStatus { code = "pending"; }; __name(PendingMessageStatus, "PendingMessageStatus"); PendingMessageStatus = _ts_decorate10([ ObjectType() ], PendingMessageStatus); var SuccessMessageStatus = class extends BaseMessageStatus { code = "success"; }; __name(SuccessMessageStatus, "SuccessMessageStatus"); SuccessMessageStatus = _ts_decorate10([ ObjectType() ], SuccessMessageStatus); var FailedMessageStatus = class extends BaseMessageStatus { code = "failed"; reason; }; __name(FailedMessageStatus, "FailedMessageStatus"); _ts_decorate10([ Field10(() => String), _ts_metadata10("design:type", String) ], FailedMessageStatus.prototype, "reason", void 0); FailedMessageStatus = _ts_decorate10([ ObjectType() ], FailedMessageStatus); var MessageStatusUnion = createUnionType({ name: "MessageStatus", types: () => [ PendingMessageStatus, SuccessMessageStatus, FailedMessageStatus ] }); // src/graphql/types/extensions-response.type.ts import { Field as Field11, ObjectType as ObjectType2 } from "type-graphql"; function _ts_decorate11(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate11, "_ts_decorate"); function _ts_metadata11(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata11, "_ts_metadata"); var ExtensionsResponse = class { openaiAssistantAPI; }; __name(ExtensionsResponse, "ExtensionsResponse"); _ts_decorate11([ Field11(() => OpenAIApiAssistantAPIResponse, { nullable: true }), _ts_metadata11("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse) ], ExtensionsResponse.prototype, "openaiAssistantAPI", void 0); ExtensionsResponse = _ts_decorate11([ ObjectType2() ], ExtensionsResponse); var OpenAIApiAssistantAPIResponse = class { runId; threadId; }; __name(OpenAIApiAssistantAPIResponse, "OpenAIApiAssistantAPIResponse"); _ts_decorate11([ Field11(() => String, { nullable: true }), _ts_metadata11("design:type", String) ], OpenAIApiAssistantAPIResponse.prototype, "runId", void 0); _ts_decorate11([ Field11(() => String, { nullable: true }), _ts_metadata11("design:type", String) ], OpenAIApiAssistantAPIResponse.prototype, "threadId", void 0); OpenAIApiAssistantAPIResponse = _ts_decorate11([ ObjectType2() ], OpenAIApiAssistantAPIResponse); // src/graphql/types/copilot-response.type.ts function _ts_decorate12(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate12, "_ts_decorate"); function _ts_metadata12(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata12, "_ts_metadata"); var BaseMessageOutput = class { id; createdAt; status; }; __name(BaseMessageOutput, "BaseMessageOutput"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], BaseMessageOutput.prototype, "id", void 0); _ts_decorate12([ Field12(() => Date), _ts_metadata12("design:type", typeof Date === "undefined" ? Object : Date) ], BaseMessageOutput.prototype, "createdAt", void 0); _ts_decorate12([ Field12(() => MessageStatusUnion), _ts_metadata12("design:type", Object) ], BaseMessageOutput.prototype, "status", void 0); BaseMessageOutput = _ts_decorate12([ InterfaceType({ resolveType(value) { if (value.hasOwnProperty("content")) { return TextMessageOutput; } else if (value.hasOwnProperty("name")) { return ActionExecutionMessageOutput; } else if (value.hasOwnProperty("result")) { return ResultMessageOutput; } else if (value.hasOwnProperty("state")) { return AgentStateMessageOutput; } else if (value.hasOwnProperty("format") && value.hasOwnProperty("bytes")) { return ImageMessageOutput; } return void 0; } }) ], BaseMessageOutput); var TextMessageOutput = class { role; content; parentMessageId; }; __name(TextMessageOutput, "TextMessageOutput"); _ts_decorate12([ Field12(() => MessageRole), _ts_metadata12("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], TextMessageOutput.prototype, "role", void 0); _ts_decorate12([ Field12(() => [ String ]), _ts_metadata12("design:type", Array) ], TextMessageOutput.prototype, "content", void 0); _ts_decorate12([ Field12(() => String, { nullable: true }), _ts_metadata12("design:type", String) ], TextMessageOutput.prototype, "parentMessageId", void 0); TextMessageOutput = _ts_decorate12([ ObjectType3({ implements: BaseMessageOutput }) ], TextMessageOutput); var ActionExecutionMessageOutput = class { name; scope; arguments; parentMessageId; }; __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ActionExecutionMessageOutput.prototype, "name", void 0); _ts_decorate12([ Field12(() => String, { nullable: true, deprecationReason: "This field will be removed in a future version" }), _ts_metadata12("design:type", String) ], ActionExecutionMessageOutput.prototype, "scope", void 0); _ts_decorate12([ Field12(() => [ String ]), _ts_metadata12("design:type", Array) ], ActionExecutionMessageOutput.prototype, "arguments", void 0); _ts_decorate12([ Field12(() => String, { nullable: true }), _ts_metadata12("design:type", String) ], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0); ActionExecutionMessageOutput = _ts_decorate12([ ObjectType3({ implements: BaseMessageOutput }) ], ActionExecutionMessageOutput); var ResultMessageOutput = class { actionExecutionId; actionName; result; }; __name(ResultMessageOutput, "ResultMessageOutput"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ResultMessageOutput.prototype, "actionExecutionId", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ResultMessageOutput.prototype, "actionName", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ResultMessageOutput.prototype, "result", void 0); ResultMessageOutput = _ts_decorate12([ ObjectType3({ implements: BaseMessageOutput }) ], ResultMessageOutput); var AgentStateMessageOutput = class { threadId; agentName; nodeName; runId; active; role; state; running; }; __name(AgentStateMessageOutput, "AgentStateMessageOutput"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], AgentStateMessageOutput.prototype, "threadId", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], AgentStateMessageOutput.prototype, "agentName", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], AgentStateMessageOutput.prototype, "nodeName", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], AgentStateMessageOutput.prototype, "runId", void 0); _ts_decorate12([ Field12(() => Boolean), _ts_metadata12("design:type", Boolean) ], AgentStateMessageOutput.prototype, "active", void 0); _ts_decorate12([ Field12(() => MessageRole), _ts_metadata12("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], AgentStateMessageOutput.prototype, "role", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], AgentStateMessageOutput.prototype, "state", void 0); _ts_decorate12([ Field12(() => Boolean), _ts_metadata12("design:type", Boolean) ], AgentStateMessageOutput.prototype, "running", void 0); AgentStateMessageOutput = _ts_decorate12([ ObjectType3({ implements: BaseMessageOutput }) ], AgentStateMessageOutput); var ImageMessageOutput = class { format; bytes; role; parentMessageId; }; __name(ImageMessageOutput, "ImageMessageOutput"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ImageMessageOutput.prototype, "format", void 0); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], ImageMessageOutput.prototype, "bytes", void 0); _ts_decorate12([ Field12(() => MessageRole), _ts_metadata12("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], ImageMessageOutput.prototype, "role", void 0); _ts_decorate12([ Field12(() => String, { nullable: true }), _ts_metadata12("design:type", String) ], ImageMessageOutput.prototype, "parentMessageId", void 0); ImageMessageOutput = _ts_decorate12([ ObjectType3({ implements: BaseMessageOutput }) ], ImageMessageOutput); var CopilotResponse = class { threadId; status; runId; messages; extensions; metaEvents; }; __name(CopilotResponse, "CopilotResponse"); _ts_decorate12([ Field12(() => String), _ts_metadata12("design:type", String) ], CopilotResponse.prototype, "threadId", void 0); _ts_decorate12([ Field12(() => ResponseStatusUnion), _ts_metadata12("design:type", Object) ], CopilotResponse.prototype, "status", void 0); _ts_decorate12([ Field12({ nullable: true }), _ts_metadata12("design:type", String) ], CopilotResponse.prototype, "runId", void 0); _ts_decorate12([ Field12(() => [ BaseMessageOutput ]), _ts_metadata12("design:type", Array) ], CopilotResponse.prototype, "messages", void 0); _ts_decorate12([ Field12(() => ExtensionsResponse, { nullable: true }), _ts_metadata12("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse) ], CopilotResponse.prototype, "extensions", void 0); _ts_decorate12([ Field12(() => [ BaseMetaEvent ], { nullable: true }), _ts_metadata12("design:type", Array) ], CopilotResponse.prototype, "metaEvents", void 0); CopilotResponse = _ts_decorate12([ ObjectType3() ], CopilotResponse); // src/graphql/types/meta-events.type.ts function _ts_decorate13(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate13, "_ts_decorate"); function _ts_metadata13(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata13, "_ts_metadata"); var MetaEventName; (function(MetaEventName2) { MetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent"; MetaEventName2["CopilotKitLangGraphInterruptEvent"] = "CopilotKitLangGraphInterruptEvent"; })(MetaEventName || (MetaEventName = {})); registerEnumType3(MetaEventName, { name: "MetaEventName", description: "Meta event types" }); var BaseMetaEvent = class { type = "MetaEvent"; name; }; __name(BaseMetaEvent, "BaseMetaEvent"); _ts_decorate13([ Field13(() => String), _ts_metadata13("design:type", String) ], BaseMetaEvent.prototype, "type", void 0); _ts_decorate13([ Field13(() => MetaEventName), _ts_metadata13("design:type", String) ], BaseMetaEvent.prototype, "name", void 0); BaseMetaEvent = _ts_decorate13([ InterfaceType2({ resolveType(value) { if (value.name === "LangGraphInterruptEvent") { return LangGraphInterruptEvent; } else if (value.name === "CopilotKitLangGraphInterruptEvent") { return CopilotKitLangGraphInterruptEvent; } return void 0; } }), InterfaceType2() ], BaseMetaEvent); var CopilotKitLangGraphInterruptEventData = class { value; messages; }; __name(CopilotKitLangGraphInterruptEventData, "CopilotKitLangGraphInterruptEventData"); _ts_decorate13([ Field13(() => String), _ts_metadata13("design:type", String) ], CopilotKitLangGraphInterruptEventData.prototype, "value", void 0); _ts_decorate13([ Field13(() => [ BaseMessageOutput ]), _ts_metadata13("design:type", Array) ], CopilotKitLangGraphInterruptEventData.prototype, "messages", void 0); CopilotKitLangGraphInterruptEventData = _ts_decorate13([ ObjectType4() ], CopilotKitLangGraphInterruptEventData); var LangGraphInterruptEvent = class { name = "LangGraphInterruptEvent"; value; response; }; __name(LangGraphInterruptEvent, "LangGraphInterruptEvent"); _ts_decorate13([ Field13(() => MetaEventName), _ts_metadata13("design:type", typeof MetaEventName === "undefined" || false ? Object : "LangGraphInterruptEvent") ], LangGraphInterruptEvent.prototype, "name", void 0); _ts_decorate13([ Field13(() => String), _ts_metadata13("design:type", String) ], LangGraphInterruptEvent.prototype, "value", void 0); _ts_decorate13([ Field13(() => String, { nullable: true }), _ts_metadata13("design:type", String) ], LangGraphInterruptEvent.prototype, "response", void 0); LangGraphInterruptEvent = _ts_decorate13([ ObjectType4({ implements: BaseMetaEvent }) ], LangGraphInterruptEvent); var CopilotKitLangGraphInterruptEvent = class { name = "CopilotKitLangGraphInterruptEvent"; data; response; }; __name(CopilotKitLangGraphInterruptEvent, "CopilotKitLangGraphInterruptEvent"); _ts_decorate13([ Field13(() => MetaEventName), _ts_metadata13("design:type", typeof MetaEventName === "undefined" || false ? Object : "CopilotKitLangGraphInterruptEvent") ], CopilotKitLangGraphInterruptEvent.prototype, "name", void 0); _ts_decorate13([ Field13(() => CopilotKitLangGraphInterruptEventData), _ts_metadata13("design:type", typeof CopilotKitLangGraphInterruptEventData === "undefined" ? Object : CopilotKitLangGraphInterruptEventData) ], CopilotKitLangGraphInterruptEvent.prototype, "data", void 0); _ts_decorate13([ Field13(() => String, { nullable: true }), _ts_metadata13("design:type", String) ], CopilotKitLangGraphInterruptEvent.prototype, "response", void 0); CopilotKitLangGraphInterruptEvent = _ts_decorate13([ ObjectType4({ implements: BaseMetaEvent }) ], CopilotKitLangGraphInterruptEvent); // src/graphql/inputs/meta-event.input.ts function _ts_decorate14(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate14, "_ts_decorate"); function _ts_metadata14(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata14, "_ts_metadata"); var MetaEventInput = class { name; value; response; messages; }; __name(MetaEventInput, "MetaEventInput"); _ts_decorate14([ Field14(() => MetaEventName), _ts_metadata14("design:type", typeof MetaEventName === "undefined" ? Object : MetaEventName) ], MetaEventInput.prototype, "name", void 0); _ts_decorate14([ Field14(() => String), _ts_metadata14("design:type", String) ], MetaEventInput.prototype, "value", void 0); _ts_decorate14([ Field14(() => String, { nullable: true }), _ts_metadata14("design:type", String) ], MetaEventInput.prototype, "response", void 0); _ts_decorate14([ Field14(() => [ MessageInput ], { nullable: true }), _ts_metadata14("design:type", Array) ], MetaEventInput.prototype, "messages", void 0); MetaEventInput = _ts_decorate14([ InputType10() ], MetaEventInput); // src/graphql/inputs/generate-copilot-response.input.ts function _ts_decorate15(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } __name(_ts_decorate15, "_ts_decorate"); function _ts_metadata15(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); } __name(_ts_metadata15, "_ts_metadata"); var GenerateCopilotResponseMetadataInput = class { requestType; }; __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput"); _ts_decorate15([ Field15(() => CopilotRequestType, { nullable: true }), _ts_metadata15("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType) ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0); GenerateCopilotResponseMetadataInput = _ts_decorate15([ InputType11() ], GenerateCopilotResponseMetadataInput); var GenerateCopilotResponseInput = class { metadata; threadId; runId; messages; frontend; cloud; forwardedParameters; agentSession; agentState; agentStates; extensions; metaEvents; }; __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput"); _ts_decorate15([ Field15(() => GenerateCopilotResponseMetadataInput, { nullable: false }), _ts_metadata15("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput) ], GenerateCopilotResponseInput.prototype, "metadata", void 0); _ts_decorate15([ Field15(() => String, { nullable: true }), _ts_metadata15("design:type", String) ], GenerateCopilotResponseInput.prototype, "threadId", void 0); _ts_decorate15([ Field15(() => String, { nullable: true }), _ts_metadata15("design:type", String) ], GenerateCopilotResponseInput.prototype, "runId", void 0); _ts_decorate15([ Field15(() => [ MessageInput ]), _ts_metadata15("design:type", Array) ], GenerateCopilotResponseInput.prototype, "messages", void 0); _ts_decorate15([ Field15(() => FrontendInput), _ts_metadata15("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput) ], GenerateCopilotResponseInput.prototype, "frontend", void 0); _ts_decorate15([ Field15(() => CloudInput, { nullable: true }), _ts_metadata15("design:type", typeof CloudInput === "undefined" ? Object : CloudInput) ], GenerateCopilotResponseInput.prototype, "cloud", void 0); _ts_decorate15([ Field15(() => ForwardedParametersInput, { nullable: true }), _ts_metadata15("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput) ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0); _ts_decorate15([ Field15(() => AgentSessionInput, { nullable: true }), _ts_metadata15("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput) ], GenerateCopilotResponseInput.prototype, "agentSession", void 0); _ts_decorate15([ Field15(() => AgentStateInput, { nullable: true }), _ts_metadata15("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput) ], GenerateCopilotResponseInput.prototype, "agentState", void 0); _ts_decorate15([ Field15(() => [ AgentStateInput ], { nullable: true }), _ts_metadata15("design:type", Array) ], GenerateCopilotResponseInput.prototype, "agentStates", void 0); _ts_decorate15([ Field15(() => ExtensionsInput, { nullable: true }), _ts_metadata15("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput) ], GenerateCopilotResponseInput.prototype, "extensions", void 0); _ts_decorate15([ Field15(() => [ MetaEventInput ], { nullable: true }), _ts_metadata15("design:type", Array) ], GenerateCopilotResponseInput.prototype, "metaEvents", void 0); GenerateCopilotResponseInput = _ts_decorate15([ InputType11() ], GenerateCopilotResponseInput); // src/graphql/resolvers/copilot.resolver.ts import { Repeater } from "graphql-yoga"; // src/service-adapters/events.ts import { randomId as randomId3 } from "@copilotkit/shared"; import { of, concat, scan as scan2, concatMap, ReplaySubject as ReplaySubject2, firstValueFrom, from as from2, catchError as catchError2, EMPTY } from "rxjs"; // src/lib/telemetry-client.ts import { TelemetryClient } from "@copilotkit/shared"; // src/lib/runti