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,369 lines (1,342 loc) 111 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from3, except, desc) => { if (from3 && typeof from3 === "object" || typeof from3 === "function") { for (let key of __getOwnPropNames(from3)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from3[key], enumerable: !(desc = __getOwnPropDesc(from3, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // package.json var require_package = __commonJS({ "package.json"(exports, module2) { module2.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/index.ts var integrations_exports = {}; __export(integrations_exports, { addCustomHeaderPlugin: () => addCustomHeaderPlugin, buildSchema: () => buildSchema, config: () => config, copilotRuntimeNestEndpoint: () => copilotRuntimeNestEndpoint, copilotRuntimeNextJSAppRouterEndpoint: () => copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint: () => copilotRuntimeNextJSPagesRouterEndpoint, copilotRuntimeNodeExpressEndpoint: () => copilotRuntimeNodeExpressEndpoint, copilotRuntimeNodeHttpEndpoint: () => copilotRuntimeNodeHttpEndpoint, createContext: () => createContext, getCommonConfig: () => getCommonConfig }); module.exports = __toCommonJS(integrations_exports); // src/lib/integrations/shared.ts var import_type_graphql26 = require("type-graphql"); // src/graphql/resolvers/copilot.resolver.ts var import_type_graphql20 = require("type-graphql"); var import_rxjs3 = require("rxjs"); // src/graphql/inputs/generate-copilot-response.input.ts var import_type_graphql18 = require("type-graphql"); // src/graphql/inputs/message.input.ts var import_type_graphql3 = require("type-graphql"); // src/graphql/types/enums.ts var import_type_graphql = require("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 = {})); (0, import_type_graphql.registerEnumType)(MessageRole, { name: "MessageRole", description: "The role of the message" }); (0, import_type_graphql.registerEnumType)(CopilotRequestType, { name: "CopilotRequestType", description: "The type of Copilot request" }); (0, import_type_graphql.registerEnumType)(ActionInputAvailability, { name: "ActionInputAvailability", description: "The availability of the frontend action" }); // src/graphql/types/base/index.ts var import_type_graphql2 = require("type-graphql"); 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 BaseMessageInput = class { id; createdAt; }; __name(BaseMessageInput, "BaseMessageInput"); _ts_decorate([ (0, import_type_graphql2.Field)(() => String), _ts_metadata("design:type", String) ], BaseMessageInput.prototype, "id", void 0); _ts_decorate([ (0, import_type_graphql2.Field)(() => Date), _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date) ], BaseMessageInput.prototype, "createdAt", void 0); BaseMessageInput = _ts_decorate([ (0, import_type_graphql2.InputType)() ], BaseMessageInput); // src/graphql/inputs/message.input.ts 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 MessageInput = class extends BaseMessageInput { textMessage; actionExecutionMessage; resultMessage; agentStateMessage; imageMessage; }; __name(MessageInput, "MessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => TextMessageInput, { nullable: true }), _ts_metadata2("design:type", typeof TextMessageInput === "undefined" ? Object : TextMessageInput) ], MessageInput.prototype, "textMessage", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => ActionExecutionMessageInput, { nullable: true }), _ts_metadata2("design:type", typeof ActionExecutionMessageInput === "undefined" ? Object : ActionExecutionMessageInput) ], MessageInput.prototype, "actionExecutionMessage", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => ResultMessageInput, { nullable: true }), _ts_metadata2("design:type", typeof ResultMessageInput === "undefined" ? Object : ResultMessageInput) ], MessageInput.prototype, "resultMessage", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => AgentStateMessageInput, { nullable: true }), _ts_metadata2("design:type", typeof AgentStateMessageInput === "undefined" ? Object : AgentStateMessageInput) ], MessageInput.prototype, "agentStateMessage", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => ImageMessageInput, { nullable: true }), _ts_metadata2("design:type", typeof ImageMessageInput === "undefined" ? Object : ImageMessageInput) ], MessageInput.prototype, "imageMessage", void 0); MessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], MessageInput); var TextMessageInput = class { content; parentMessageId; role; }; __name(TextMessageInput, "TextMessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], TextMessageInput.prototype, "content", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String, { nullable: true }), _ts_metadata2("design:type", String) ], TextMessageInput.prototype, "parentMessageId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => MessageRole), _ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], TextMessageInput.prototype, "role", void 0); TextMessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], TextMessageInput); var ActionExecutionMessageInput = class { name; arguments; parentMessageId; scope; }; __name(ActionExecutionMessageInput, "ActionExecutionMessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ActionExecutionMessageInput.prototype, "name", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ActionExecutionMessageInput.prototype, "arguments", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String, { nullable: true }), _ts_metadata2("design:type", String) ], ActionExecutionMessageInput.prototype, "parentMessageId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String, { nullable: true, deprecationReason: "This field will be removed in a future version" }), _ts_metadata2("design:type", typeof String === "undefined" ? Object : String) ], ActionExecutionMessageInput.prototype, "scope", void 0); ActionExecutionMessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], ActionExecutionMessageInput); var ResultMessageInput = class { actionExecutionId; actionName; parentMessageId; result; }; __name(ResultMessageInput, "ResultMessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ResultMessageInput.prototype, "actionExecutionId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ResultMessageInput.prototype, "actionName", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String, { nullable: true }), _ts_metadata2("design:type", String) ], ResultMessageInput.prototype, "parentMessageId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ResultMessageInput.prototype, "result", void 0); ResultMessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], ResultMessageInput); var AgentStateMessageInput = class { threadId; agentName; role; state; running; nodeName; runId; active; }; __name(AgentStateMessageInput, "AgentStateMessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], AgentStateMessageInput.prototype, "threadId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], AgentStateMessageInput.prototype, "agentName", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => MessageRole), _ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], AgentStateMessageInput.prototype, "role", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], AgentStateMessageInput.prototype, "state", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => Boolean), _ts_metadata2("design:type", Boolean) ], AgentStateMessageInput.prototype, "running", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], AgentStateMessageInput.prototype, "nodeName", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], AgentStateMessageInput.prototype, "runId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => Boolean), _ts_metadata2("design:type", Boolean) ], AgentStateMessageInput.prototype, "active", void 0); AgentStateMessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], AgentStateMessageInput); var ImageMessageInput = class { format; bytes; parentMessageId; role; }; __name(ImageMessageInput, "ImageMessageInput"); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ImageMessageInput.prototype, "format", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String), _ts_metadata2("design:type", String) ], ImageMessageInput.prototype, "bytes", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => String, { nullable: true }), _ts_metadata2("design:type", String) ], ImageMessageInput.prototype, "parentMessageId", void 0); _ts_decorate2([ (0, import_type_graphql3.Field)(() => MessageRole), _ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], ImageMessageInput.prototype, "role", void 0); ImageMessageInput = _ts_decorate2([ (0, import_type_graphql3.InputType)() ], ImageMessageInput); // src/graphql/inputs/frontend.input.ts var import_type_graphql5 = require("type-graphql"); // src/graphql/inputs/action.input.ts var import_type_graphql4 = require("type-graphql"); 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 ActionInput = class { name; description; jsonSchema; available; }; __name(ActionInput, "ActionInput"); _ts_decorate3([ (0, import_type_graphql4.Field)(() => String), _ts_metadata3("design:type", String) ], ActionInput.prototype, "name", void 0); _ts_decorate3([ (0, import_type_graphql4.Field)(() => String), _ts_metadata3("design:type", String) ], ActionInput.prototype, "description", void 0); _ts_decorate3([ (0, import_type_graphql4.Field)(() => String), _ts_metadata3("design:type", String) ], ActionInput.prototype, "jsonSchema", void 0); _ts_decorate3([ (0, import_type_graphql4.Field)(() => ActionInputAvailability, { nullable: true }), _ts_metadata3("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability) ], ActionInput.prototype, "available", void 0); ActionInput = _ts_decorate3([ (0, import_type_graphql4.InputType)() ], ActionInput); // src/graphql/inputs/frontend.input.ts 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 FrontendInput = class { toDeprecate_fullContext; actions; url; }; __name(FrontendInput, "FrontendInput"); _ts_decorate4([ (0, import_type_graphql5.Field)(() => String, { nullable: true }), _ts_metadata4("design:type", String) ], FrontendInput.prototype, "toDeprecate_fullContext", void 0); _ts_decorate4([ (0, import_type_graphql5.Field)(() => [ ActionInput ]), _ts_metadata4("design:type", Array) ], FrontendInput.prototype, "actions", void 0); _ts_decorate4([ (0, import_type_graphql5.Field)(() => String, { nullable: true }), _ts_metadata4("design:type", String) ], FrontendInput.prototype, "url", void 0); FrontendInput = _ts_decorate4([ (0, import_type_graphql5.InputType)() ], FrontendInput); // src/graphql/inputs/cloud.input.ts var import_type_graphql7 = require("type-graphql"); // src/graphql/inputs/cloud-guardrails.input.ts var import_type_graphql6 = require("type-graphql"); 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 GuardrailsRuleInput = class { allowList = []; denyList = []; }; __name(GuardrailsRuleInput, "GuardrailsRuleInput"); _ts_decorate5([ (0, import_type_graphql6.Field)(() => [ String ], { nullable: true }), _ts_metadata5("design:type", Array) ], GuardrailsRuleInput.prototype, "allowList", void 0); _ts_decorate5([ (0, import_type_graphql6.Field)(() => [ String ], { nullable: true }), _ts_metadata5("design:type", Array) ], GuardrailsRuleInput.prototype, "denyList", void 0); GuardrailsRuleInput = _ts_decorate5([ (0, import_type_graphql6.InputType)() ], GuardrailsRuleInput); var GuardrailsInput = class { inputValidationRules; }; __name(GuardrailsInput, "GuardrailsInput"); _ts_decorate5([ (0, import_type_graphql6.Field)(() => GuardrailsRuleInput, { nullable: false }), _ts_metadata5("design:type", typeof GuardrailsRuleInput === "undefined" ? Object : GuardrailsRuleInput) ], GuardrailsInput.prototype, "inputValidationRules", void 0); GuardrailsInput = _ts_decorate5([ (0, import_type_graphql6.InputType)() ], GuardrailsInput); // src/graphql/inputs/cloud.input.ts 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 CloudInput = class { guardrails; }; __name(CloudInput, "CloudInput"); _ts_decorate6([ (0, import_type_graphql7.Field)(() => GuardrailsInput, { nullable: true }), _ts_metadata6("design:type", typeof GuardrailsInput === "undefined" ? Object : GuardrailsInput) ], CloudInput.prototype, "guardrails", void 0); CloudInput = _ts_decorate6([ (0, import_type_graphql7.InputType)() ], CloudInput); // src/graphql/inputs/forwarded-parameters.input.ts var import_type_graphql8 = require("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 ForwardedParametersInput = class { model; maxTokens; stop; toolChoice; toolChoiceFunctionName; temperature; }; __name(ForwardedParametersInput, "ForwardedParametersInput"); _ts_decorate7([ (0, import_type_graphql8.Field)(() => String, { nullable: true }), _ts_metadata7("design:type", String) ], ForwardedParametersInput.prototype, "model", void 0); _ts_decorate7([ (0, import_type_graphql8.Field)(() => Number, { nullable: true }), _ts_metadata7("design:type", Number) ], ForwardedParametersInput.prototype, "maxTokens", void 0); _ts_decorate7([ (0, import_type_graphql8.Field)(() => [ String ], { nullable: true }), _ts_metadata7("design:type", Array) ], ForwardedParametersInput.prototype, "stop", void 0); _ts_decorate7([ (0, import_type_graphql8.Field)(() => String, { nullable: true }), _ts_metadata7("design:type", typeof String === "undefined" ? Object : String) ], ForwardedParametersInput.prototype, "toolChoice", void 0); _ts_decorate7([ (0, import_type_graphql8.Field)(() => String, { nullable: true }), _ts_metadata7("design:type", String) ], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0); _ts_decorate7([ (0, import_type_graphql8.Field)(() => Number, { nullable: true }), _ts_metadata7("design:type", Number) ], ForwardedParametersInput.prototype, "temperature", void 0); ForwardedParametersInput = _ts_decorate7([ (0, import_type_graphql8.InputType)() ], ForwardedParametersInput); // src/graphql/inputs/agent-session.input.ts var import_type_graphql9 = require("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 AgentSessionInput = class { agentName; threadId; nodeName; }; __name(AgentSessionInput, "AgentSessionInput"); _ts_decorate8([ (0, import_type_graphql9.Field)(() => String), _ts_metadata8("design:type", String) ], AgentSessionInput.prototype, "agentName", void 0); _ts_decorate8([ (0, import_type_graphql9.Field)(() => String, { nullable: true }), _ts_metadata8("design:type", String) ], AgentSessionInput.prototype, "threadId", void 0); _ts_decorate8([ (0, import_type_graphql9.Field)(() => String, { nullable: true }), _ts_metadata8("design:type", String) ], AgentSessionInput.prototype, "nodeName", void 0); AgentSessionInput = _ts_decorate8([ (0, import_type_graphql9.InputType)() ], AgentSessionInput); // src/graphql/inputs/agent-state.input.ts var import_type_graphql10 = require("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 AgentStateInput = class { agentName; state; config; }; __name(AgentStateInput, "AgentStateInput"); _ts_decorate9([ (0, import_type_graphql10.Field)(() => String), _ts_metadata9("design:type", String) ], AgentStateInput.prototype, "agentName", void 0); _ts_decorate9([ (0, import_type_graphql10.Field)(() => String), _ts_metadata9("design:type", String) ], AgentStateInput.prototype, "state", void 0); _ts_decorate9([ (0, import_type_graphql10.Field)(() => String, { nullable: true }), _ts_metadata9("design:type", String) ], AgentStateInput.prototype, "config", void 0); AgentStateInput = _ts_decorate9([ (0, import_type_graphql10.InputType)() ], AgentStateInput); // src/graphql/inputs/extensions.input.ts var import_type_graphql11 = require("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 ExtensionsInput = class { openaiAssistantAPI; }; __name(ExtensionsInput, "ExtensionsInput"); _ts_decorate10([ (0, import_type_graphql11.Field)(() => OpenAIApiAssistantAPIInput, { nullable: true }), _ts_metadata10("design:type", typeof OpenAIApiAssistantAPIInput === "undefined" ? Object : OpenAIApiAssistantAPIInput) ], ExtensionsInput.prototype, "openaiAssistantAPI", void 0); ExtensionsInput = _ts_decorate10([ (0, import_type_graphql11.InputType)() ], ExtensionsInput); var OpenAIApiAssistantAPIInput = class { runId; threadId; }; __name(OpenAIApiAssistantAPIInput, "OpenAIApiAssistantAPIInput"); _ts_decorate10([ (0, import_type_graphql11.Field)(() => String, { nullable: true }), _ts_metadata10("design:type", String) ], OpenAIApiAssistantAPIInput.prototype, "runId", void 0); _ts_decorate10([ (0, import_type_graphql11.Field)(() => String, { nullable: true }), _ts_metadata10("design:type", String) ], OpenAIApiAssistantAPIInput.prototype, "threadId", void 0); OpenAIApiAssistantAPIInput = _ts_decorate10([ (0, import_type_graphql11.InputType)() ], OpenAIApiAssistantAPIInput); // src/graphql/inputs/meta-event.input.ts var import_type_graphql17 = require("type-graphql"); // src/graphql/types/meta-events.type.ts var import_type_graphql16 = require("type-graphql"); // src/graphql/types/copilot-response.type.ts var import_type_graphql15 = require("type-graphql"); // src/graphql/types/message-status.type.ts var import_type_graphql12 = require("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 MessageStatusCode; (function(MessageStatusCode2) { MessageStatusCode2["Pending"] = "pending"; MessageStatusCode2["Success"] = "success"; MessageStatusCode2["Failed"] = "failed"; })(MessageStatusCode || (MessageStatusCode = {})); (0, import_type_graphql12.registerEnumType)(MessageStatusCode, { name: "MessageStatusCode" }); var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 { code; }, "BaseMessageStatus"); _ts_decorate11([ (0, import_type_graphql12.Field)(() => MessageStatusCode), _ts_metadata11("design:type", String) ], BaseMessageStatus.prototype, "code", void 0); BaseMessageStatus = _ts_decorate11([ (0, import_type_graphql12.ObjectType)() ], BaseMessageStatus); var PendingMessageStatus = class extends BaseMessageStatus { code = "pending"; }; __name(PendingMessageStatus, "PendingMessageStatus"); PendingMessageStatus = _ts_decorate11([ (0, import_type_graphql12.ObjectType)() ], PendingMessageStatus); var SuccessMessageStatus = class extends BaseMessageStatus { code = "success"; }; __name(SuccessMessageStatus, "SuccessMessageStatus"); SuccessMessageStatus = _ts_decorate11([ (0, import_type_graphql12.ObjectType)() ], SuccessMessageStatus); var FailedMessageStatus = class extends BaseMessageStatus { code = "failed"; reason; }; __name(FailedMessageStatus, "FailedMessageStatus"); _ts_decorate11([ (0, import_type_graphql12.Field)(() => String), _ts_metadata11("design:type", String) ], FailedMessageStatus.prototype, "reason", void 0); FailedMessageStatus = _ts_decorate11([ (0, import_type_graphql12.ObjectType)() ], FailedMessageStatus); var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({ name: "MessageStatus", types: () => [ PendingMessageStatus, SuccessMessageStatus, FailedMessageStatus ] }); // src/graphql/types/response-status.type.ts var import_graphql_scalars = require("graphql-scalars"); var import_type_graphql13 = require("type-graphql"); 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 ResponseStatusCode; (function(ResponseStatusCode2) { ResponseStatusCode2["Pending"] = "pending"; ResponseStatusCode2["Success"] = "success"; ResponseStatusCode2["Failed"] = "failed"; })(ResponseStatusCode || (ResponseStatusCode = {})); (0, import_type_graphql13.registerEnumType)(ResponseStatusCode, { name: "ResponseStatusCode" }); var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 { code; }, "BaseResponseStatus"); _ts_decorate12([ (0, import_type_graphql13.Field)(() => ResponseStatusCode), _ts_metadata12("design:type", String) ], BaseResponseStatus.prototype, "code", void 0); BaseResponseStatus = _ts_decorate12([ (0, import_type_graphql13.InterfaceType)({ resolveType(value) { if (value.code === "success") { return SuccessResponseStatus; } else if (value.code === "failed") { return FailedResponseStatus; } else if (value.code === "pending") { return PendingResponseStatus; } return void 0; } }), (0, import_type_graphql13.ObjectType)() ], BaseResponseStatus); var PendingResponseStatus = class extends BaseResponseStatus { code = "pending"; }; __name(PendingResponseStatus, "PendingResponseStatus"); PendingResponseStatus = _ts_decorate12([ (0, import_type_graphql13.ObjectType)({ implements: BaseResponseStatus }) ], PendingResponseStatus); var SuccessResponseStatus = class extends BaseResponseStatus { code = "success"; }; __name(SuccessResponseStatus, "SuccessResponseStatus"); SuccessResponseStatus = _ts_decorate12([ (0, import_type_graphql13.ObjectType)({ implements: BaseResponseStatus }) ], SuccessResponseStatus); var FailedResponseStatusReason; (function(FailedResponseStatusReason2) { FailedResponseStatusReason2["GUARDRAILS_VALIDATION_FAILED"] = "GUARDRAILS_VALIDATION_FAILED"; FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED"; FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; })(FailedResponseStatusReason || (FailedResponseStatusReason = {})); (0, import_type_graphql13.registerEnumType)(FailedResponseStatusReason, { name: "FailedResponseStatusReason" }); var FailedResponseStatus = class extends BaseResponseStatus { code = "failed"; reason; details = null; }; __name(FailedResponseStatus, "FailedResponseStatus"); _ts_decorate12([ (0, import_type_graphql13.Field)(() => FailedResponseStatusReason), _ts_metadata12("design:type", String) ], FailedResponseStatus.prototype, "reason", void 0); _ts_decorate12([ (0, import_type_graphql13.Field)(() => import_graphql_scalars.GraphQLJSON, { nullable: true }), _ts_metadata12("design:type", typeof Record === "undefined" ? Object : Record) ], FailedResponseStatus.prototype, "details", void 0); FailedResponseStatus = _ts_decorate12([ (0, import_type_graphql13.ObjectType)({ implements: BaseResponseStatus }) ], FailedResponseStatus); var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({ name: "ResponseStatus", types: () => [ PendingResponseStatus, SuccessResponseStatus, FailedResponseStatus ] }); // src/graphql/types/extensions-response.type.ts var import_type_graphql14 = require("type-graphql"); 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 ExtensionsResponse = class { openaiAssistantAPI; }; __name(ExtensionsResponse, "ExtensionsResponse"); _ts_decorate13([ (0, import_type_graphql14.Field)(() => OpenAIApiAssistantAPIResponse, { nullable: true }), _ts_metadata13("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse) ], ExtensionsResponse.prototype, "openaiAssistantAPI", void 0); ExtensionsResponse = _ts_decorate13([ (0, import_type_graphql14.ObjectType)() ], ExtensionsResponse); var OpenAIApiAssistantAPIResponse = class { runId; threadId; }; __name(OpenAIApiAssistantAPIResponse, "OpenAIApiAssistantAPIResponse"); _ts_decorate13([ (0, import_type_graphql14.Field)(() => String, { nullable: true }), _ts_metadata13("design:type", String) ], OpenAIApiAssistantAPIResponse.prototype, "runId", void 0); _ts_decorate13([ (0, import_type_graphql14.Field)(() => String, { nullable: true }), _ts_metadata13("design:type", String) ], OpenAIApiAssistantAPIResponse.prototype, "threadId", void 0); OpenAIApiAssistantAPIResponse = _ts_decorate13([ (0, import_type_graphql14.ObjectType)() ], OpenAIApiAssistantAPIResponse); // src/graphql/types/copilot-response.type.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 BaseMessageOutput = class { id; createdAt; status; }; __name(BaseMessageOutput, "BaseMessageOutput"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], BaseMessageOutput.prototype, "id", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => Date), _ts_metadata14("design:type", typeof Date === "undefined" ? Object : Date) ], BaseMessageOutput.prototype, "createdAt", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => MessageStatusUnion), _ts_metadata14("design:type", Object) ], BaseMessageOutput.prototype, "status", void 0); BaseMessageOutput = _ts_decorate14([ (0, import_type_graphql15.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_decorate14([ (0, import_type_graphql15.Field)(() => MessageRole), _ts_metadata14("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], TextMessageOutput.prototype, "role", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => [ String ]), _ts_metadata14("design:type", Array) ], TextMessageOutput.prototype, "content", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String, { nullable: true }), _ts_metadata14("design:type", String) ], TextMessageOutput.prototype, "parentMessageId", void 0); TextMessageOutput = _ts_decorate14([ (0, import_type_graphql15.ObjectType)({ implements: BaseMessageOutput }) ], TextMessageOutput); var ActionExecutionMessageOutput = class { name; scope; arguments; parentMessageId; }; __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ActionExecutionMessageOutput.prototype, "name", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String, { nullable: true, deprecationReason: "This field will be removed in a future version" }), _ts_metadata14("design:type", String) ], ActionExecutionMessageOutput.prototype, "scope", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => [ String ]), _ts_metadata14("design:type", Array) ], ActionExecutionMessageOutput.prototype, "arguments", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String, { nullable: true }), _ts_metadata14("design:type", String) ], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0); ActionExecutionMessageOutput = _ts_decorate14([ (0, import_type_graphql15.ObjectType)({ implements: BaseMessageOutput }) ], ActionExecutionMessageOutput); var ResultMessageOutput = class { actionExecutionId; actionName; result; }; __name(ResultMessageOutput, "ResultMessageOutput"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ResultMessageOutput.prototype, "actionExecutionId", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ResultMessageOutput.prototype, "actionName", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ResultMessageOutput.prototype, "result", void 0); ResultMessageOutput = _ts_decorate14([ (0, import_type_graphql15.ObjectType)({ implements: BaseMessageOutput }) ], ResultMessageOutput); var AgentStateMessageOutput = class { threadId; agentName; nodeName; runId; active; role; state; running; }; __name(AgentStateMessageOutput, "AgentStateMessageOutput"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], AgentStateMessageOutput.prototype, "threadId", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], AgentStateMessageOutput.prototype, "agentName", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], AgentStateMessageOutput.prototype, "nodeName", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], AgentStateMessageOutput.prototype, "runId", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => Boolean), _ts_metadata14("design:type", Boolean) ], AgentStateMessageOutput.prototype, "active", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => MessageRole), _ts_metadata14("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], AgentStateMessageOutput.prototype, "role", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], AgentStateMessageOutput.prototype, "state", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => Boolean), _ts_metadata14("design:type", Boolean) ], AgentStateMessageOutput.prototype, "running", void 0); AgentStateMessageOutput = _ts_decorate14([ (0, import_type_graphql15.ObjectType)({ implements: BaseMessageOutput }) ], AgentStateMessageOutput); var ImageMessageOutput = class { format; bytes; role; parentMessageId; }; __name(ImageMessageOutput, "ImageMessageOutput"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ImageMessageOutput.prototype, "format", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], ImageMessageOutput.prototype, "bytes", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => MessageRole), _ts_metadata14("design:type", typeof MessageRole === "undefined" ? Object : MessageRole) ], ImageMessageOutput.prototype, "role", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String, { nullable: true }), _ts_metadata14("design:type", String) ], ImageMessageOutput.prototype, "parentMessageId", void 0); ImageMessageOutput = _ts_decorate14([ (0, import_type_graphql15.ObjectType)({ implements: BaseMessageOutput }) ], ImageMessageOutput); var CopilotResponse = class { threadId; status; runId; messages; extensions; metaEvents; }; __name(CopilotResponse, "CopilotResponse"); _ts_decorate14([ (0, import_type_graphql15.Field)(() => String), _ts_metadata14("design:type", String) ], CopilotResponse.prototype, "threadId", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => ResponseStatusUnion), _ts_metadata14("design:type", Object) ], CopilotResponse.prototype, "status", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)({ nullable: true }), _ts_metadata14("design:type", String) ], CopilotResponse.prototype, "runId", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => [ BaseMessageOutput ]), _ts_metadata14("design:type", Array) ], CopilotResponse.prototype, "messages", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => ExtensionsResponse, { nullable: true }), _ts_metadata14("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse) ], CopilotResponse.prototype, "extensions", void 0); _ts_decorate14([ (0, import_type_graphql15.Field)(() => [ BaseMetaEvent ], { nullable: true }), _ts_metadata14("design:type", Array) ], CopilotResponse.prototype, "metaEvents", void 0); CopilotResponse = _ts_decorate14([ (0, import_type_graphql15.ObjectType)() ], CopilotResponse); // src/graphql/types/meta-events.type.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 MetaEventName; (function(MetaEventName2) { MetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent"; MetaEventName2["Copi