UNPKG

@autobe/agent

Version:

AI backend server code generator

710 lines 41.8 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.orchestrateAnalyze = void 0; const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js")); const core_1 = require("@agentica/core"); const typia_1 = __importDefault(require("typia")); const uuid_1 = require("uuid"); const assertSchemaModel_1 = require("../../context/assertSchemaModel"); const enforceToolCall_1 = require("../../utils/enforceToolCall"); const AutoBeAnalyzeAgent_1 = require("./AutoBeAnalyzeAgent"); const AutoBeAnalyzeReviewer_1 = require("./AutoBeAnalyzeReviewer"); /** @todo Kakasoo */ const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b, _c, _d, _e, _f, _g, _h; const userPlanningRequirements = props.userPlanningRequirements; if (!userPlanningRequirements) { throw new Error(`Unable to prepare a proposal because there is no user requirement`); } const step = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0; const created_at = new Date().toISOString(); ctx.dispatch({ type: "analyzeStart", reason: userPlanningRequirements, step, created_at, }); const controller = createController({ model: ctx.model, execute: new DeterminingFiles(), }); const agentica = new core_1.MicroAgentica({ model: ctx.model, vendor: ctx.vendor, controllers: [controller], config: { locale: (_c = ctx.config) === null || _c === void 0 ? void 0 : _c.locale, executor: { describe: null, }, systemPrompt: { common: () => "# Overview\n\n- You are the agent that determines the form of the entire document.\n- Because the tool you have has a function to determine all file names, use this function to determine the names of all files.\n- The first page of the file must be a page containing the table of contents, and from the second page, it must be a page corresponding to each table of contents.\n- Please clarify that the name of the table of contents page is the table of contents, such as `toc` or `table of content`.\n- Each document must begin with a number in turn, such as `00`, `01`, `02`, `03`.\n- Do not include database schema document." /* AutoBeSystemPromptConstant.ANALYZE_PLANNER */, }, }, histories: [ ...ctx .histories() .filter((el) => el.type === "assistantMessage" || el.type === "userMessage"), ], }); (0, enforceToolCall_1.enforceToolCall)(agentica); const determined = yield agentica.conversate([ "Design a complete list of documents for that document", "```md", userPlanningRequirements, "```", ].join("\n")); const lastMessage = determined[determined.length - 1]; if (lastMessage.type === "assistantMessage") { const history = { id: (0, uuid_1.v4)(), type: "assistantMessage", text: lastMessage.text, created_at, completed_at: new Date().toISOString(), }; ctx.dispatch({ type: "assistantMessage", text: lastMessage.text, created_at, }); return history; } const described = determined.find((el) => el.type === "describe"); // const determinedOutput = Array.from( // new Set( // described // ? described.executes // .map((el) => { // if (el.protocol === "class") { // return el.arguments as unknown as IDeterminingInput; // } // return null; // }) // .filter((el) => el !== null) // : [], // ), // ); const determinedOutput = (_d = described === null || described === void 0 ? void 0 : described.executes.find((el) => el.protocol === "class" && (() => { const _io0 = input => "string" === typeof input.prefix && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); return input => "object" === typeof input && null !== input && _io0(input); })()(el.value))) === null || _d === void 0 ? void 0 : _d.value; const prefix = determinedOutput.prefix; const describedFiles = determinedOutput.files; if (describedFiles.length === 0) { const history = { id: (0, uuid_1.v4)(), type: "assistantMessage", text: "The current requirements are insufficient, so file generation will be suspended. It would be better to continue the conversation.", created_at, completed_at: new Date().toISOString(), }; ctx.dispatch({ type: "assistantMessage", text: "The current requirements are insufficient, so file generation will be suspended. It would be better to continue the conversation.", created_at, }); return history; } const pointers = yield Promise.all(describedFiles.map((_a) => __awaiter(void 0, [_a], void 0, function* ({ filename, reason }) { const pointer = { value: null }; const agent = new AutoBeAnalyzeAgent_1.AutoBeAnalyzeAgent(AutoBeAnalyzeReviewer_1.AutoBeAnalyzeReviewer, ctx, pointer, describedFiles.map((el) => el.filename)); yield agent.conversate([ `# Instruction`, `The names of all the files are as follows: ${describedFiles.join(",")}`, "Assume that all files are in the same folder. Also, when pointing to the location of a file, go to the relative path.", "", `Among the various documents, the part you decided to take care of is as follows.: ${filename}`, `Only write this document named '${filename}'.`, "Never write other documents.", "", "# User Planning Requirements", "```md", JSON.stringify(userPlanningRequirements), "```", "The reason why this document needs to be written is as follows.", `- reason: ${reason}`, ].join("\n")); return pointer; }))); const files = pointers .map((pointer) => { var _a, _b; return (_b = (_a = pointer.value) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : {}; }) .reduce((acc, cur) => Object.assign(acc, cur)); if (Object.keys(files).length) { const history = { id: (0, uuid_1.v4)(), type: "analyze", reason: userPlanningRequirements, prefix, files: files, step, created_at, completed_at: new Date().toISOString(), }; ctx.state().analyze = history; ctx.histories().push(history); ctx.dispatch({ type: "analyzeComplete", prefix, files: files, step, created_at, }); return history; } const history = { id: (0, uuid_1.v4)(), type: "assistantMessage", text: (_f = (_e = determined.find((el) => el.type === "assistantMessage")) === null || _e === void 0 ? void 0 : _e.text) !== null && _f !== void 0 ? _f : "", created_at, completed_at: new Date().toISOString(), }; ctx.dispatch({ type: "assistantMessage", text: (_h = (_g = determined.find((el) => el.type === "assistantMessage")) === null || _g === void 0 ? void 0 : _g.text) !== null && _h !== void 0 ? _h : "", created_at, }); return history; }); exports.orchestrateAnalyze = orchestrateAnalyze; class DeterminingFiles { /** * Determining the Initial File List. * * Design a list of initial documents that you need to create for that * requirement. The list of documents is determined only by the name of the * file. If you determine from the conversation that the user's requirements * have not been fully gathered, you must stop the analysis and continue * collecting the remaining requirements. In this case, you do not need to * generate any files. Simply pass an empty array to `input.files`, which is * the input value for the `determine` tool. * * @param input Prefix and files * @returns */ determine(input) { return input; } } function createController(props) { (0, assertSchemaModel_1.assertSchemaModel)(props.model); const application = collection[props.model]; return { protocol: "class", name: "Planning", application, // execute: props.execute, execute: { determine: (input) => { return input; }, }, }; } const claude = { model: "claude", options: { reference: true, separate: null }, functions: [ { name: "determine", parameters: { description: " Prefix and files\n\n------------------------------\n\nCurrent Type: {@link IDeterminingInput}", type: "object", properties: { prefix: { title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_).", type: "string" }, files: { title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix.", type: "array", items: { description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", type: "object", properties: { reason: { description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.", type: "string" }, filename: { title: "Filename to generate or overwrite", description: "Filename to generate or overwrite.", type: "string", pattern: "((.*)\\.md)$" } }, required: [ "reason", "filename" ] } } }, required: [ "prefix", "files" ], additionalProperties: false, $defs: {} }, output: { description: "Current Type: {@link IDeterminingInput}", type: "object", properties: { prefix: { title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_).", type: "string" }, files: { title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix.", type: "array", items: { description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", type: "object", properties: { reason: { description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.", type: "string" }, filename: { title: "Filename to generate or overwrite", description: "Filename to generate or overwrite.", type: "string", pattern: "((.*)\\.md)$" } }, required: [ "reason", "filename" ] } } }, required: [ "prefix", "files" ] }, description: "Determining the Initial File List.\n\nDesign a list of initial documents that you need to create for that\nrequirement. The list of documents is determined only by the name of the\nfile. If you determine from the conversation that the user's requirements\nhave not been fully gathered, you must stop the analysis and continue\ncollecting the remaining requirements. In this case, you do not need to\ngenerate any files. Simply pass an empty array to `input.files`, which is\nthe input value for the `determine` tool.", validate: (() => { const _io0 = input => "string" === typeof input.prefix && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.prefix || _report(_exceptionable, { path: _path + ".prefix", expected: "string", value: input.prefix }), (Array.isArray(input.files) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })).every(flag => flag) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, { path: _path + ".reason", expected: "string", value: input.reason }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, { path: _path + ".filename", expected: "`${string}.md`", value: input.filename })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => { if (false === __is(input)) { errors = []; _report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input })) && _vo0(input, _path + "", true) || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input }))(input, "$input", true); const success = 0 === errors.length; return success ? { success, data: input } : { success, errors, data: input }; } return { success: true, data: input }; }; })() } ] }; const collection = { chatgpt: { model: "chatgpt", options: { reference: true, strict: false, separate: null }, functions: [ { name: "determine", parameters: { description: " Prefix and files\n\n------------------------------\n\nCurrent Type: {@link IDeterminingInput}", type: "object", properties: { prefix: { title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_).", type: "string" }, files: { title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix.", type: "array", items: { description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", type: "object", properties: { reason: { description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.", type: "string" }, filename: { title: "Filename to generate or overwrite", description: "Filename to generate or overwrite.\n\n\n@pattern ((.*)\\.md)$", type: "string" } }, required: [ "reason", "filename" ] } } }, required: [ "prefix", "files" ], additionalProperties: false, $defs: {} }, output: { description: "Current Type: {@link IDeterminingInput}", type: "object", properties: { prefix: { title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_).", type: "string" }, files: { title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix.", type: "array", items: { description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", type: "object", properties: { reason: { description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.", type: "string" }, filename: { title: "Filename to generate or overwrite", description: "Filename to generate or overwrite.\n\n\n@pattern ((.*)\\.md)$", type: "string" } }, required: [ "reason", "filename" ] } } }, required: [ "prefix", "files" ] }, description: "Determining the Initial File List.\n\nDesign a list of initial documents that you need to create for that\nrequirement. The list of documents is determined only by the name of the\nfile. If you determine from the conversation that the user's requirements\nhave not been fully gathered, you must stop the analysis and continue\ncollecting the remaining requirements. In this case, you do not need to\ngenerate any files. Simply pass an empty array to `input.files`, which is\nthe input value for the `determine` tool.", validate: (() => { const _io0 = input => "string" === typeof input.prefix && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.prefix || _report(_exceptionable, { path: _path + ".prefix", expected: "string", value: input.prefix }), (Array.isArray(input.files) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })).every(flag => flag) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, { path: _path + ".reason", expected: "string", value: input.reason }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, { path: _path + ".filename", expected: "`${string}.md`", value: input.filename })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => { if (false === __is(input)) { errors = []; _report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input })) && _vo0(input, _path + "", true) || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input }))(input, "$input", true); const success = 0 === errors.length; return success ? { success, data: input } : { success, errors, data: input }; } return { success: true, data: input }; }; })() } ] }, claude, llama: claude, deepseek: claude, "3.1": claude, "3.0": { model: "3.0", options: { constraint: true, recursive: 3, separate: null }, functions: [ { name: "determine", parameters: { type: "object", properties: { prefix: { type: "string", title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_)." }, files: { type: "array", items: { type: "object", properties: { reason: { type: "string", description: "Describe briefly why you made this document, and if you have any plans for\nthe next one." }, filename: { type: "string", pattern: "((.*)\\.md)$", title: "Filename to generate or overwrite", description: "Filename to generate or overwrite." } }, required: [ "reason", "filename" ], description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", additionalProperties: false }, title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix." } }, required: [ "prefix", "files" ], description: " Prefix and files\n\n------------------------------\n\nCurrent Type: {@link IDeterminingInput}", additionalProperties: false }, output: { type: "object", properties: { prefix: { type: "string", title: "Prefix", description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names. For example, if you were to create a bulletin board\nservice, the prefix would be bbs. At this time, the name of the document\nwould be, for example, 00_bbs_table_of_contents, and bbs would have to be\nattached to the name of all documents. This value would then be passed to\nother agents as well, in the form of bbs_article, bbs_article_snapshot, and\nbbs_comments in the table name. Interfaces will likewise be used in\ninterfaces and tests because they originate from the name of prisma scheme.\nDo not use prefixes that are related to the technology stack (e.g., ts_,\napi_, react_) or unnatural prefixes that typically wouldn\u2019t appear in table\nnames or domain models (e.g., zz_, my_, dev_)." }, files: { type: "array", items: { type: "object", properties: { reason: { type: "string", description: "Describe briefly why you made this document, and if you have any plans for\nthe next one." }, filename: { type: "string", pattern: "((.*)\\.md)$", title: "Filename to generate or overwrite", description: "Filename to generate or overwrite." } }, required: [ "reason", "filename" ], description: "Description of the current {@link PickIFilereasonfilename} type:\n\n> From T, pick a set of properties whose keys are in the union K", additionalProperties: false }, title: "file names and reason to create.", description: "File name must be English. and it must contains the numbering and prefix." } }, required: [ "prefix", "files" ], description: "Current Type: {@link IDeterminingInput}", additionalProperties: false }, description: "Determining the Initial File List.\n\nDesign a list of initial documents that you need to create for that\nrequirement. The list of documents is determined only by the name of the\nfile. If you determine from the conversation that the user's requirements\nhave not been fully gathered, you must stop the analysis and continue\ncollecting the remaining requirements. In this case, you do not need to\ngenerate any files. Simply pass an empty array to `input.files`, which is\nthe input value for the `determine` tool.", validate: (() => { const _io0 = input => "string" === typeof input.prefix && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.prefix || _report(_exceptionable, { path: _path + ".prefix", expected: "string", value: input.prefix }), (Array.isArray(input.files) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".files[" + _index2 + "]", expected: "Pick<IFile, \"reason\" | \"filename\">", value: elem })).every(flag => flag) || _report(_exceptionable, { path: _path + ".files", expected: "Array<Pick<IFile, \"reason\" | \"filename\">>", value: input.files })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, { path: _path + ".reason", expected: "string", value: input.reason }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, { path: _path + ".filename", expected: "`${string}.md`", value: input.filename })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => { if (false === __is(input)) { errors = []; _report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input })) && _vo0(input, _path + "", true) || _report(true, { path: _path + "", expected: "IDeterminingInput", value: input }))(input, "$input", true); const success = 0 === errors.length; return success ? { success, data: input } : { success, errors, data: input }; } return { success: true, data: input }; }; })() } ] }, }; //# sourceMappingURL=orchestrateAnalyze.js.map