UNPKG

@autobe/agent

Version:

AI backend server code generator

808 lines 103 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.orchestrateInterfacePrerequisite = orchestrateInterfacePrerequisite; const __typia_transform__isTypeUint32 = __importStar(require("typia/lib/internal/_isTypeUint32")); const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport")); const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize")); const tstl_1 = require("tstl"); const typia_1 = __importDefault(require("typia")); const uuid_1 = require("uuid"); const RAGRetrieval_1 = require("../../utils/RAGRetrieval"); const executeCachedBatch_1 = require("../../utils/executeCachedBatch"); const getEmbedder_1 = require("../../utils/getEmbedder"); const AutoBePreliminaryController_1 = require("../common/AutoBePreliminaryController"); const convertToSectionEntries_1 = require("../common/internal/convertToSectionEntries"); const transformInterfacePrerequisiteHistory_1 = require("./histories/transformInterfacePrerequisiteHistory"); const AutoBeInterfacePrerequisiteProgrammer_1 = require("./programmers/AutoBeInterfacePrerequisiteProgrammer"); function orchestrateInterfacePrerequisite(ctx, document) { return __awaiter(this, void 0, void 0, function* () { const dict = AutoBeInterfacePrerequisiteProgrammer_1.AutoBeInterfacePrerequisiteProgrammer.associate(document.operations); const candidates = document.operations.filter(AutoBeInterfacePrerequisiteProgrammer_1.AutoBeInterfacePrerequisiteProgrammer.isCandidate); const progress = { total: candidates.length, completed: 0, }; const result = yield (0, executeCachedBatch_1.executeCachedBatch)(ctx, candidates.map((it) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () { const counter = new tstl_1.Singleton(() => ++progress.completed); try { return yield process(ctx, { dict, document, operation: it, progress, promptCacheKey, counter, }); } catch (_a) { counter.get(); return null; } }))); return result.filter((r) => r !== null); }); } function process(ctx, props) { return __awaiter(this, void 0, void 0, function* () { var _a, _b; const allSections = (0, convertToSectionEntries_1.convertToSectionEntries)((_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []); const domains = Array.from(new Set(props.operation.path .split("/") .filter((p) => p && !p.startsWith(":") && !p.startsWith("{")))).join(", "); const paths = props.operation.path; const queryText = ` Domains: ${domains} Task: ${paths} `.trim(); const ragSections = yield (0, RAGRetrieval_1.buildAnalysisContextSections)((0, getEmbedder_1.getEmbedder)(), allSections, queryText, "TOPK", { log: false, logPrefix: "interfacePrerequisite" }); const preliminary = new AutoBePreliminaryController_1.AutoBePreliminaryController({ dispatch: (e) => ctx.dispatch(e), state: ctx.state(), application: { version: "3.1", components: { schemas: { "IAutoBeInterfacePrerequisiteApplication.IProps": { type: "object", properties: { thinking: { type: "string", description: "Reasoning: what's missing (preliminary), what you're submitting (write),\nor why you're finalizing (complete)." }, request: { oneOf: [ { $ref: "#/components/schemas/IAutoBePreliminaryComplete" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetAnalysisSections" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetDatabaseSchemas" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetInterfaceOperations" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetInterfaceSchemas" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousAnalysisSections" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousDatabaseSchemas" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousInterfaceOperations" }, { $ref: "#/components/schemas/IAutoBePreliminaryGetPreviousInterfaceSchemas" }, { $ref: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IWrite" } ], discriminator: { propertyName: "type", mapping: { complete: "#/components/schemas/IAutoBePreliminaryComplete", getAnalysisSections: "#/components/schemas/IAutoBePreliminaryGetAnalysisSections", getDatabaseSchemas: "#/components/schemas/IAutoBePreliminaryGetDatabaseSchemas", getInterfaceOperations: "#/components/schemas/IAutoBePreliminaryGetInterfaceOperations", getInterfaceSchemas: "#/components/schemas/IAutoBePreliminaryGetInterfaceSchemas", getPreviousAnalysisSections: "#/components/schemas/IAutoBePreliminaryGetPreviousAnalysisSections", getPreviousDatabaseSchemas: "#/components/schemas/IAutoBePreliminaryGetPreviousDatabaseSchemas", getPreviousInterfaceOperations: "#/components/schemas/IAutoBePreliminaryGetPreviousInterfaceOperations", getPreviousInterfaceSchemas: "#/components/schemas/IAutoBePreliminaryGetPreviousInterfaceSchemas", write: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IWrite" } }, description: "Action to perform. Exhausted preliminary types are removed from the\nunion." } }, required: [ "thinking", "request" ] }, IAutoBePreliminaryComplete: { type: "object", properties: { type: { "const": "complete", description: "Type discriminator for completion request." } }, required: [ "type" ], description: "Finalize the write loop by accepting your most recent `write` as-is.\n\nAfter submitting a `write`, review it yourself thoroughly against the review\nchecklist in your instructions. If you find issues worth fixing, submit\nanother `write` with corrections. When you are satisfied with the quality,\ncall `complete` to finalize.\n\nYou have a maximum of 3 write attempts, but this is a safety cap \u2014 not a\ntarget to fill.\n\nOnly valid after at least one `write` submission \u2014 rejected otherwise." }, IAutoBePreliminaryGetAnalysisSections: { type: "object", properties: { type: { "const": "getAnalysisSections", description: "Type discriminator." }, sectionIds: { type: "array", items: { type: "integer", minimum: 0 }, minItems: 1, maxItems: 100, description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls." } }, required: [ "type", "sectionIds" ], description: "Request to retrieve individual analysis sections by numeric ID." }, IAutoBePreliminaryGetDatabaseSchemas: { type: "object", properties: { type: { "const": "getDatabaseSchemas", description: "Type discriminator." }, schemaNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls." } }, required: [ "type", "schemaNames" ], description: "Request to retrieve database schema definitions for context." }, IAutoBePreliminaryGetInterfaceOperations: { type: "object", properties: { type: { "const": "getInterfaceOperations", description: "Type discriminator." }, endpoints: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IEndpoint" }, minItems: 1, description: "API operation endpoints to retrieve. DO NOT request same endpoints already\nrequested in previous calls." } }, required: [ "type", "endpoints" ], description: "Request to retrieve existing interface operations for context." }, "AutoBeOpenApi.IEndpoint": { type: "object", properties: { path: { type: "string", pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$", description: "HTTP path of the API operation.\n\nMust start with `/`. Parameters use curly braces: `{paramName}`. Resource\nnames in camelCase. No quotes, spaces, role prefixes (`/admin/`), or API\nversion prefixes (`/api/v1/`).\n\nAllowed characters: letters, digits, `/`, `{`, `}`, `-`, `_`, `.`" }, method: { oneOf: [ { "const": "get" }, { "const": "post" }, { "const": "put" }, { "const": "delete" }, { "const": "patch" } ], description: "HTTP method (lowercase only).\n\nUse `patch` (not `get`) when a read operation needs a complex\n{@link requestBody}. `get` cannot have a request body." } }, required: [ "path", "method" ], description: "API endpoint information." }, IAutoBePreliminaryGetInterfaceSchemas: { type: "object", properties: { type: { "const": "getInterfaceSchemas", description: "Type discriminator." }, typeNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Schema type names to retrieve. DO NOT request same names already requested\nin previous calls." } }, required: [ "type", "typeNames" ], description: "Request to retrieve OpenAPI schema type definitions for context." }, IAutoBePreliminaryGetPreviousAnalysisSections: { type: "object", properties: { type: { "const": "getPreviousAnalysisSections", description: "Type discriminator." }, sectionIds: { type: "array", items: { type: "integer", minimum: 0 }, minItems: 1, description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls." } }, required: [ "type", "sectionIds" ], description: "Request to retrieve analysis sections from the previous iteration by numeric\nID." }, IAutoBePreliminaryGetPreviousDatabaseSchemas: { type: "object", properties: { type: { "const": "getPreviousDatabaseSchemas", description: "Type discriminator." }, schemaNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls." } }, required: [ "type", "schemaNames" ], description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles." }, IAutoBePreliminaryGetPreviousInterfaceOperations: { type: "object", properties: { type: { "const": "getPreviousInterfaceOperations", description: "Type discriminator." }, endpoints: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IEndpoint" }, minItems: 1, description: "Endpoints to retrieve from previous iteration. DO NOT request same\nendpoints already requested in previous calls." } }, required: [ "type", "endpoints" ], description: "Request to retrieve interface operations from the previous iteration.\n\nLoads API operation definitions from the last successfully generated version,\nused as reference context during regeneration or modification cycles." }, IAutoBePreliminaryGetPreviousInterfaceSchemas: { type: "object", properties: { type: { "const": "getPreviousInterfaceSchemas", description: "Type discriminator." }, typeNames: { type: "array", items: { type: "string" }, minItems: 1, description: "Schema type names to retrieve from previous iteration. DO NOT request same\nnames already requested in previous calls." } }, required: [ "type", "typeNames" ], description: "Request to retrieve interface schemas from the previous iteration.\n\nLoads OpenAPI schema definitions (DTOs) from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles." }, "IAutoBeInterfacePrerequisiteApplication.IWrite": { type: "object", properties: { type: { "const": "write", description: "Type discriminator for write submission." }, analysis: { type: "string", description: "Analysis of the operation's resource dependencies." }, rationale: { type: "string", description: "Rationale for the prerequisite chain decisions." }, endpoint: { $ref: "#/components/schemas/AutoBeOpenApi.IEndpoint", description: "The API endpoint (method + path) being analyzed." }, prerequisites: { type: "array", items: { $ref: "#/components/schemas/AutoBeOpenApi.IPrerequisite" }, description: "Required prerequisite operations that must execute before this operation." } }, required: [ "type", "analysis", "rationale", "endpoint", "prerequisites" ], description: "Submit API operation prerequisites." }, "AutoBeOpenApi.IPrerequisite": { type: "object", properties: { endpoint: { $ref: "#/components/schemas/AutoBeOpenApi.IEndpoint", description: "The API endpoint that must be called first." }, description: { type: "string", description: "Why this prerequisite is required (specific condition or state).\n\n> MUST be written in English. Never use other languages." } }, required: [ "endpoint", "description" ], description: "Prerequisite API operation that must succeed before the main operation.\n\nONLY for business logic dependencies (resource existence, state checks,\ndata availability). NEVER for authentication or authorization -- those are\nhandled via `authorizationActor`.\n\nKeep prerequisite chains minimal. Descriptions should explain WHY the\ndependency is needed." } } }, functions: [ { name: "process", async: false, parameters: [ { name: "props", required: true, schema: { $ref: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IProps" } } ], description: "Process task or retrieve preliminary data." } ] }, source: SOURCE, kinds: [ "analysisSections", "databaseSchemas", "interfaceOperations", "interfaceSchemas", "previousAnalysisSections", "previousDatabaseSchemas", "previousInterfaceOperations", "previousInterfaceSchemas", "complete", ], all: { interfaceOperations: props.document.operations, interfaceSchemas: props.document.components.schemas, }, local: { analysisSections: ragSections, interfaceOperations: [props.operation], }, }); const event = yield preliminary.orchestrate(ctx, (out) => __awaiter(this, void 0, void 0, function* () { var _a, _b; const pointer = { value: null, }; const result = yield ctx.conversate(Object.assign({ source: SOURCE, controller: createController({ dict: props.dict, document: props.document, operation: props.operation, preliminary, build: (next) => { pointer.value = next; }, }), enforceFunctionCall: true, promptCacheKey: props.promptCacheKey }, (0, transformInterfacePrerequisiteHistory_1.transformInterfacePrerequisiteHistory)({ document: props.document, operation: props.operation, preliminary, }))); if (pointer.value === null) return out(result)(null); const event = { type: SOURCE, id: (0, uuid_1.v7)(), endpoint: { path: props.operation.path, method: props.operation.method, }, analysis: pointer.value.analysis, rationale: pointer.value.rationale, prerequisites: pointer.value.prerequisites, acquisition: preliminary.getAcquisition(), metric: result.metric, tokenUsage: result.tokenUsage, total: props.progress.total, completed: props.counter.get(), step: (_b = (_a = ctx.state().database) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0, created_at: new Date().toISOString(), }; return out(result)(event); })); ctx.dispatch(event); return event; }); } function createController(props) { const validate = (next) => { const result = (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "complete" === input.type; const _io2 = input => "getAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.length <= 100 && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io3 = input => "getDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io4 = input => "getInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io5(elem)))); const _io5 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io6 = input => "getInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io7 = input => "getPreviousAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io8 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io9 = input => "getPreviousInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io5(elem)))); const _io10 = input => "getPreviousInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io11 = input => "write" === input.type && "string" === typeof input.analysis && "string" === typeof input.rationale && ("object" === typeof input.endpoint && null !== input.endpoint && _io5(input.endpoint)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io5(input.endpoint) && "string" === typeof input.description; const _iu0 = input => (() => { if ("complete" === input.type) return _io1(input); else if ("getAnalysisSections" === input.type) return _io2(input); else if ("getDatabaseSchemas" === input.type) return _io3(input); else if ("getInterfaceOperations" === input.type) return _io4(input); else if ("getInterfaceSchemas" === input.type) return _io6(input); else if ("getPreviousAnalysisSections" === input.type) return _io7(input); else if ("getPreviousDatabaseSchemas" === input.type) return _io8(input); else if ("getPreviousInterfaceOperations" === input.type) return _io9(input); else if ("getPreviousInterfaceSchemas" === input.type) return _io10(input); else if ("write" === input.type) return _io11(input); else return false; })(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, { path: _path + ".thinking", expected: "string", value: input.thinking }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, { path: _path + ".request", expected: "(IAutoBeInterfacePrerequisiteApplication.IWrite | IAutoBePreliminaryComplete | IAutoBePreliminaryGetAnalysisSections | IAutoBePreliminaryGetDatabaseSchemas | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPreviousAnalysisSections | IAutoBePreliminaryGetPreviousDatabaseSchemas | IAutoBePreliminaryGetPreviousInterfaceOperations | IAutoBePreliminaryGetPreviousInterfaceSchemas)", value: input.request })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, { path: _path + ".request", expected: "(IAutoBeInterfacePrerequisiteApplication.IWrite | IAutoBePreliminaryComplete | IAutoBePreliminaryGetAnalysisSections | IAutoBePreliminaryGetDatabaseSchemas | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPreviousAnalysisSections | IAutoBePreliminaryGetPreviousDatabaseSchemas | IAutoBePreliminaryGetPreviousInterfaceOperations | IAutoBePreliminaryGetPreviousInterfaceSchemas)", value: input.request })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"complete\"", value: input.type })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getAnalysisSections" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getAnalysisSections\"", value: input.type }), (Array.isArray(input.sectionIds) || _report(_exceptionable, { path: _path + ".sectionIds", expected: "(Array<number & Type<\"uint32\">> & MinItems<1> & MaxItems<100>)", value: input.sectionIds })) && ((1 <= input.sectionIds.length || _report(_exceptionable, { path: _path + ".sectionIds", expected: "Array<> & MinItems<1>", value: input.sectionIds })) && (input.sectionIds.length <= 100 || _report(_exceptionable, { path: _path + ".sectionIds", expected: "Array<> & MaxItems<100>", value: input.sectionIds })) && input.sectionIds.map((elem, _index10) => "number" === typeof elem && (__typia_transform__isTypeUint32._isTypeUint32(elem) || _report(_exceptionable, { path: _path + ".sectionIds[" + _index10 + "]", expected: "number & Type<\"uint32\">", value: elem })) || _report(_exceptionable, { path: _path + ".sectionIds[" + _index10 + "]", expected: "(number & Type<\"uint32\">)", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".sectionIds", expected: "(Array<number & Type<\"uint32\">> & MinItems<1> & MaxItems<100>)", value: input.sectionIds })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["getDatabaseSchemas" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getDatabaseSchemas\"", value: input.type }), (Array.isArray(input.schemaNames) || _report(_exceptionable, { path: _path + ".schemaNames", expected: "(Array<string> & MinItems<1>)", value: input.schemaNames })) && ((1 <= input.schemaNames.length || _report(_exceptionable, { path: _path + ".schemaNames", expected: "Array<> & MinItems<1>", value: input.schemaNames })) && input.schemaNames.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, { path: _path + ".schemaNames[" + _index11 + "]", expected: "string", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".schemaNames", expected: "(Array<string> & MinItems<1>)", value: input.schemaNames })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["getInterfaceOperations" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getInterfaceOperations\"", value: input.type }), (Array.isArray(input.endpoints) || _report(_exceptionable, { path: _path + ".endpoints", expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)", value: input.endpoints })) && ((1 <= input.endpoints.length || _report(_exceptionable, { path: _path + ".endpoints", expected: "Array<> & MinItems<1>", value: input.endpoints })) && input.endpoints.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".endpoints[" + _index12 + "]", expected: "AutoBeOpenApi.IEndpoint", value: elem })) && _vo5(elem, _path + ".endpoints[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".endpoints[" + _index12 + "]", expected: "AutoBeOpenApi.IEndpoint", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".endpoints", expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)", value: input.endpoints })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, { path: _path + ".path", expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">", value: input.path })) || _report(_exceptionable, { path: _path + ".path", expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)", value: input.path }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, { path: _path + ".method", expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")", value: input.method })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["getInterfaceSchemas" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getInterfaceSchemas\"", value: input.type }), (Array.isArray(input.typeNames) || _report(_exceptionable, { path: _path + ".typeNames", expected: "(Array<string> & MinItems<1>)", value: input.typeNames })) && ((1 <= input.typeNames.length || _report(_exceptionable, { path: _path + ".typeNames", expected: "Array<> & MinItems<1>", value: input.typeNames })) && input.typeNames.map((elem, _index13) => "string" === typeof elem || _report(_exceptionable, { path: _path + ".typeNames[" + _index13 + "]", expected: "string", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".typeNames", expected: "(Array<string> & MinItems<1>)", value: input.typeNames })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["getPreviousAnalysisSections" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getPreviousAnalysisSections\"", value: input.type }), (Array.isArray(input.sectionIds) || _report(_exceptionable, { path: _path + ".sectionIds", expected: "(Array<number & Type<\"uint32\">> & MinItems<1>)", value: input.sectionIds })) && ((1 <= input.sectionIds.length || _report(_exceptionable, { path: _path + ".sectionIds", expected: "Array<> & MinItems<1>", value: input.sectionIds })) && input.sectionIds.map((elem, _index14) => "number" === typeof elem && (__typia_transform__isTypeUint32._isTypeUint32(elem) || _report(_exceptionable, { path: _path + ".sectionIds[" + _index14 + "]", expected: "number & Type<\"uint32\">", value: elem })) || _report(_exceptionable, { path: _path + ".sectionIds[" + _index14 + "]", expected: "(number & Type<\"uint32\">)", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".sectionIds", expected: "(Array<number & Type<\"uint32\">> & MinItems<1>)", value: input.sectionIds })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["getPreviousDatabaseSchemas" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getPreviousDatabaseSchemas\"", value: input.type }), (Array.isArray(input.schemaNames) || _report(_exceptionable, { path: _path + ".schemaNames", expected: "(Array<string> & MinItems<1>)", value: input.schemaNames })) && ((1 <= input.schemaNames.length || _report(_exceptionable, { path: _path + ".schemaNames", expected: "Array<> & MinItems<1>", value: input.schemaNames })) && input.schemaNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, { path: _path + ".schemaNames[" + _index15 + "]", expected: "string", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".schemaNames", expected: "(Array<string> & MinItems<1>)", value: input.schemaNames })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["getPreviousInterfaceOperations" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getPreviousInterfaceOperations\"", value: input.type }), (Array.isArray(input.endpoints) || _report(_exceptionable, { path: _path + ".endpoints", expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)", value: input.endpoints })) && ((1 <= input.endpoints.length || _report(_exceptionable, { path: _path + ".endpoints", expected: "Array<> & MinItems<1>", value: input.endpoints })) && input.endpoints.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".endpoints[" + _index16 + "]", expected: "AutoBeOpenApi.IEndpoint", value: elem })) && _vo5(elem, _path + ".endpoints[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".endpoints[" + _index16 + "]", expected: "AutoBeOpenApi.IEndpoint", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".endpoints", expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)", value: input.endpoints })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["getPreviousInterfaceSchemas" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"getPreviousInterfaceSchemas\"", value: input.type }), (Array.isArray(input.typeNames) || _report(_exceptionable, { path: _path + ".typeNames", expected: "(Array<string> & MinItems<1>)", value: input.typeNames })) && ((1 <= input.typeNames.length || _report(_exceptionable, { path: _path + ".typeNames", expected: "Array<> & MinItems<1>", value: input.typeNames })) && input.typeNames.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, { path: _path + ".typeNames[" + _index17 + "]", expected: "string", value: elem })).every(flag => flag)) || _report(_exceptionable, { path: _path + ".typeNames", expected: "(Array<string> & MinItems<1>)", value: input.typeNames })].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["write" === input.type || _report(_exceptionable, { path: _path + ".type", expected: "\"write\"", value: input.type }), "string" === typeof input.analysis || _report(_exceptionable, { path: _path + ".analysis", expected: "string", value: input.analysis }), "string" === typeof input.rationale || _report(_exceptionable, { path: _path + ".rationale", expected: "string", value: input.rationale }), ("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, { path: _path + ".endpoint", expected: "AutoBeOpenApi.IEndpoint", value: input.endpoint })) && _vo5(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, { path: _path + ".endpoint", expected: "AutoBeOpenApi.IEndpoint", value: input.endpoint }), (Array.isArray(input.prerequisites) || _report(_exceptionable, { path: _path + ".prerequisites", expected: "Array<AutoBeOpenApi.IPrerequisite>", value: input.prerequisites })) && input.prerequisites.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, { path: _path + ".prerequisites[" + _index18 + "]", expected: "AutoBeOpenApi.IPrerequisite", value: elem })) && _vo12(elem, _path + ".prerequisites[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, { path: _path + ".prerequisites[" + _index18 + "]", expected: "AutoBeOpenApi.IPrerequisite", value: elem })).every(flag => flag) || _report(_exceptionable, { path: _path + ".prerequisites", expected: "Array<AutoBeOpenApi.IPrerequisite>", value: input.prerequisites })].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, { path: _path + ".endpo