"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.orchestrateTestScenarioReview = orchestrateTestScenarioReview;
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
const utils_1 = require("@autobe/utils");
const tstl_1 = require("tstl");
const typia_1 = __importDefault(require("typia"));
const uuid_1 = require("uuid");
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
const transformTestScenarioReviewHistories_1 = require("./histories/transformTestScenarioReviewHistories");
function orchestrateTestScenarioReview(ctx, props) {
    return __awaiter(this, void 0, void 0, function* () {
        const res = yield review(ctx, props);
        return res;
    });
}
function review(ctx, props) {
    return __awaiter(this, void 0, void 0, function* () {
        var _a, _b;
        try {
            const pointer = {
                value: null,
            };
            const { tokenUsage } = yield ctx.conversate({
                source: "testScenariosReview",
                controller: createController({
                    model: ctx.model,
                    pointer,
                    originalGroups: props.groups,
                }),
                histories: (0, transformTestScenarioReviewHistories_1.transformTestScenarioReviewHistories)({
                    state: ctx.state(),
                    groups: props.groups,
                    instruction: props.instruction,
                }),
                enforceFunctionCall: true,
                message: "Review the Test Scenario.",
            });
            if (pointer.value === null) {
                // unreachable
                throw new Error("Failed to get review result.");
            }
            props.progress.total = Math.max(props.progress.total, (props.progress.completed += pointer.value.scenarioGroups.length));
            ctx.dispatch({
                type: "testScenariosReview",
                id: (0, uuid_1.v7)(),
                tokenUsage,
                total: props.progress.total,
                completed: props.progress.completed,
                scenarios: pointer.value.scenarioGroups
                    .map((group) => {
                    return group.scenarios.map((s) => {
                        return Object.assign(Object.assign({}, s), { endpoint: group.endpoint });
                    });
                })
                    .flat(),
                step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
                created_at: new Date().toISOString(),
            });
            // @todo michael: need to investigate scenario removal more gracefully
            return pointer.value.pass
                ? // || pointer.value.scenarioGroups.length < props.groups.length
                    props.groups
                : pointer.value.scenarioGroups;
        }
        catch (_c) {
            props.progress.completed += props.groups.length;
            return props.groups;
        }
    });
}
function createController(props) {
    (0, assertSchemaModel_1.assertSchemaModel)(props.model);
    const validate = (next) => {
        const result = (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && "boolean" === typeof input.pass && (Array.isArray(input.scenarioGroups) && input.scenarioGroups.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && (Array.isArray(input.scenarios) && (1 <= input.scenarios.length && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io2 = 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 _io3 = input => "string" === typeof input.draft && "string" === typeof input.functionName && (Array.isArray(input.dependencies) && input.dependencies.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && "string" === typeof input.purpose; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
                path: _path + ".review",
                expected: "string",
                value: input.review
            }), "string" === typeof input.plan || _report(_exceptionable, {
                path: _path + ".plan",
                expected: "string",
                value: input.plan
            }), "boolean" === typeof input.pass || _report(_exceptionable, {
                path: _path + ".pass",
                expected: "boolean",
                value: input.pass
            }), (Array.isArray(input.scenarioGroups) || _report(_exceptionable, {
                path: _path + ".scenarioGroups",
                expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                value: input.scenarioGroups
            })) && input.scenarioGroups.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                path: _path + ".scenarioGroups[" + _index4 + "]",
                expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                value: elem
            })) && _vo1(elem, _path + ".scenarioGroups[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
                path: _path + ".scenarioGroups[" + _index4 + "]",
                expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                value: elem
            })).every(flag => flag) || _report(_exceptionable, {
                path: _path + ".scenarioGroups",
                expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                value: input.scenarioGroups
            })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                path: _path + ".endpoint",
                expected: "AutoBeOpenApi.IEndpoint",
                value: input.endpoint
            })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                path: _path + ".endpoint",
                expected: "AutoBeOpenApi.IEndpoint",
                value: input.endpoint
            }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
                path: _path + ".scenarios",
                expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                value: input.scenarios
            })) && ((1 <= input.scenarios.length || _report(_exceptionable, {
                path: _path + ".scenarios",
                expected: "Array<> & MinItems<1>",
                value: input.scenarios
            })) && input.scenarios.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                path: _path + ".scenarios[" + _index5 + "]",
                expected: "IAutoBeTestScenarioApplication.IScenario",
                value: elem
            })) && _vo3(elem, _path + ".scenarios[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
                path: _path + ".scenarios[" + _index5 + "]",
                expected: "IAutoBeTestScenarioApplication.IScenario",
                value: elem
            })).every(flag => flag)) || _report(_exceptionable, {
                path: _path + ".scenarios",
                expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                value: input.scenarios
            })].every(flag => flag); const _vo2 = (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 _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
                path: _path + ".draft",
                expected: "string",
                value: input.draft
            }), "string" === typeof input.functionName || _report(_exceptionable, {
                path: _path + ".functionName",
                expected: "string",
                value: input.functionName
            }), (Array.isArray(input.dependencies) || _report(_exceptionable, {
                path: _path + ".dependencies",
                expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                value: input.dependencies
            })) && input.dependencies.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                path: _path + ".dependencies[" + _index6 + "]",
                expected: "IAutoBeTestScenarioApplication.IDependencies",
                value: elem
            })) && _vo4(elem, _path + ".dependencies[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
                path: _path + ".dependencies[" + _index6 + "]",
                expected: "IAutoBeTestScenarioApplication.IDependencies",
                value: elem
            })).every(flag => flag) || _report(_exceptionable, {
                path: _path + ".dependencies",
                expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                value: input.dependencies
            })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                path: _path + ".endpoint",
                expected: "AutoBeOpenApi.IEndpoint",
                value: input.endpoint
            })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                path: _path + ".endpoint",
                expected: "AutoBeOpenApi.IEndpoint",
                value: input.endpoint
            }), "string" === typeof input.purpose || _report(_exceptionable, {
                path: _path + ".purpose",
                expected: "string",
                value: input.purpose
            })].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: "IAutoBeTestScenarioReviewApplication.IProps",
                    value: input
                })) && _vo0(input, _path + "", true) || _report(true, {
                    path: _path + "",
                    expected: "IAutoBeTestScenarioReviewApplication.IProps",
                    value: input
                }))(input, "$input", true);
                const success = 0 === errors.length;
                return success ? {
                    success,
                    data: input
                } : {
                    success,
                    errors,
                    data: input
                };
            }
            return {
                success: true,
                data: input
            };
        }; })()(next);
        if (result.success === false)
            return result;
        // merge to unique scenario groups
        const scenarioGroups = uniqueScenarioGroups(result.data.scenarioGroups);
        const errors = [];
        // validate endpoints between scenarioGroups and originalGroups
        const filteredScenarioGroups = props.originalGroups.reduce((acc, originalGroup) => {
            // Keep only groups whose endpoint matches with one in props.originalGroups
            const matchingGroup = scenarioGroups.find((g) => g.endpoint.method === originalGroup.endpoint.method &&
                g.endpoint.path === originalGroup.endpoint.path);
            if (!matchingGroup) {
                return [...acc, originalGroup];
            }
            return [...acc, matchingGroup];
        }, []);
        result.data.scenarioGroups = filteredScenarioGroups;
        if (errors.length > 0) {
            return {
                success: false,
                errors,
                data: result.data,
            };
        }
        return result;
    };
    const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
    return {
        protocol: "class",
        name: "Test Scenario Reviewer",
        application,
        execute: {
            review: (input) => {
                props.pointer.value = input;
            },
        },
    };
}
const uniqueScenarioGroups = (groups) => new tstl_1.HashMap(groups.map((g) => new tstl_1.Pair(g.endpoint, g)), utils_1.AutoBeEndpointComparator.hashCode, utils_1.AutoBeEndpointComparator.equals)
    .toJSON()
    .map((it) => it.second);
const collection = {
    chatgpt: (validate) => (() => {
        const application = {
            model: "chatgpt",
            options: {
                reference: true,
                strict: false,
                separate: null
            },
            functions: [
                {
                    name: "review",
                    parameters: {
                        description: "Current Type: {@link IAutoBeTestScenarioReviewApplication.IProps}",
                        type: "object",
                        properties: {
                            review: {
                                description: "Concise review summary focusing on critical findings and key\nimprovements.\n\nShould include:\n\n- Executive summary of overall quality\n- Critical issues requiring immediate fixes\n- Key improvement recommendations\n- Database schema compliance status\n- Modified scenarios identification by functionName",
                                type: "string"
                            },
                            plan: {
                                description: "Structured action plan with priority-based improvements.\n\nShould contain:\n\n- Critical fixes required immediately\n- High priority enhancements\n- Implementation guidance\n- Success criteria\n- Specific scenario action items by functionName",
                                type: "string"
                            },
                            pass: {
                                description: "If the scenario groups pass the review, Set to true.",
                                type: "boolean"
                            },
                            scenarioGroups: {
                                description: "The reviewed and improved scenario groups with all quality fixes applied.\n\nThis is the primary output containing:\n\n- All critical issues resolved\n- Authentication flows corrected\n- Database dependencies validated\n- Quality enhancements implemented\n- Only implementable scenarios retained",
                                type: "array",
                                items: {
                                    $ref: "#/$defs/IAutoBeTestScenarioApplication.IScenarioGroup"
                                }
                            }
                        },
                        required: [
                            "review",
                            "plan",
                            "pass",
                            "scenarioGroups"
                        ],
                        additionalProperties: false,
                        $defs: {
                            "IAutoBeTestScenarioApplication.IScenarioGroup": {
                                description: "### Description of {@link endpoint} property:\n\n> Target API endpoint to test.\n> \n> This must be **unique** across all scenario groups. An endpoint is\n> identified by its `path` and `method` combination.\n> \n> Multiple test scenarios may exist for a single endpoint.",
                                type: "object",
                                properties: {
                                    endpoint: {
                                        $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
                                    },
                                    scenarios: {
                                        description: "An array of test scenarios associated with the given endpoint.\n\nEach scenario represents a specific test case for the same `path` and\n`method`.\n\nIMPORTANT: Each scenario must be actually implementable. A scenario's\nimplementability is determined by the existence of ALL APIs (endpoints)\nrequired to test it. This includes not only the primary endpoint being\ntested, but also ALL dependency endpoints needed for setup,\nauthentication, and data preparation. If even one required dependency API\nis missing from the available operations, the scenario cannot be\nimplemented and should not be generated.\n\nExample: A \"test banned user login\" scenario requires both a login API\nAND a ban user API. If the ban API doesn't exist, this scenario is not\nimplementable regardless of database schema fields.\n\n\n@minItems 1",
                                        type: "array",
                                        items: {
                                            $ref: "#/$defs/IAutoBeTestScenarioApplication.IScenario"
                                        }
                                    }
                                },
                                required: [
                                    "endpoint",
                                    "scenarios"
                                ]
                            },
                            "AutoBeOpenApi.IEndpoint": {
                                description: "API endpoint information.",
                                type: "object",
                                properties: {
                                    path: {
                                        description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n  curly braces for parameters ({paramName}), hyphens (-), and underscores\n  (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
                                        type: "string"
                                    },
                                    method: {
                                        description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n  ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
                                        type: "string",
                                        "enum": [
                                            "get",
                                            "post",
                                            "put",
                                            "delete",
                                            "patch"
                                        ]
                                    }
                                },
                                required: [
                                    "path",
                                    "method"
                                ]
                            },
                            "IAutoBeTestScenarioApplication.IScenario": {
                                description: "Represents a test scenario for a single API operation.\n\nThis interface defines a structured, user-centric test draft that includes\na descriptive function name, a detailed scenario draft, and logical\ndependencies on other endpoints required for context or setup.\n\nCRITICAL: All referenced endpoints MUST exist in the provided API\noperations. Do NOT create scenarios for non-existent APIs, even if database\nschema fields suggest their existence. Test scenarios must be implementable\nwith available APIs only.",
                                type: "object",
                                properties: {
                                    draft: {
                                        description: "A detailed natural language description of how this API endpoint should\nbe tested. This should include both successful and failure scenarios,\nbusiness rule validations, edge cases, and any sequence of steps\nnecessary to perform the test. A subsequent agent will use this draft to\ngenerate multiple concrete test cases.",
                                        type: "string"
                                    },
                                    functionName: {
                                        description: "Descriptive function name derived from the user scenario.\n\nThe function name serves as a concise, technical identifier that clearly\nrepresents the specific user scenario being described. It should be\nimmediately understandable and directly correspond to the user situation\nwithout requiring additional context.\n\n## Naming Convention\n\nDO: Use snake_case naming convention.\n\n- Must start with `test_api_` prefix (mandatory requirement)\n- ALWAYS start with business feature, NOT action verbs\n- Business feature comes first, followed by scenario context\n- Embed action verbs within the scenario description, not at the beginning\n\n## Content Structure\n\nFunction names should follow this pattern:\n`test_api_[core_feature]_[specific_scenario]`\n\nWhere:\n\n- `core_feature`: The main business feature or entity being tested\n  (customer, seller, cart, push_message, etc.)\n- `specific_scenario`: The specific operation or scenario context\n  (join_verification_not_found, login_success,\n  moderator_assignment_update, discountable_ticket_duplicated,\n  csv_export, etc.)\n\n## Business Feature-Based Examples\n\n- `test_api_customer_join_verification_not_found` - Customer join\n  verification when verification code not found\n- `test_api_seller_login` - Seller login operation\n- `test_api_cart_discountable_ticket_duplicated` - Cart discountable ticket\n  with duplication scenario\n- `test_api_push_message_csv` - Push message functionality with CSV format\n- `test_api_product_review_update` - Product review update operation\n\n## Clarity Guidelines\n\n- Prioritize clarity over brevity\n- Avoid technical jargon or implementation terms\n- Use terminology that reflects user perspective\n- Ensure the name alone conveys the user's intent\n- Make it understandable to non-technical stakeholders\n- Keep consistent with user scenario description\n\n## Single Endpoint Alignment\n\nFunction names must reflect scenarios that:\n\n- Accomplish user goals through this single endpoint only\n- Don't imply dependency on other API operations\n- Represent complete user interactions",
                                        type: "string"
                                    },
                                    dependencies: {
                                        description: "A list of other API endpoints that this scenario logically depends on.\n\nThese dependencies represent context or prerequisite conditions, such as\nauthentication, resource creation, or data setup, that are relevant to\nthe test. This list is not a strict execution order \u2014 if ordering is\nimportant, it must be described explicitly in the `purpose`.\n\nWARNING: Every endpoint referenced here MUST exist in the provided API\noperations. Do NOT reference endpoints that are not explicitly available,\neven if they seem logically necessary based on database schema or\nbusiness logic.",
                                        type: "array",
                                        items: {
                                            $ref: "#/$defs/IAutoBeTestScenarioApplication.IDependencies"
                                        }
                                    }
                                },
                                required: [
                                    "draft",
                                    "functionName",
                                    "dependencies"
                                ]
                            },
                            "IAutoBeTestScenarioApplication.IDependencies": {
                                description: "### Description of {@link endpoint} property:\n\n> Target API endpoint that this scenario depends on.\n> \n> This endpoint MUST exist in the available API operations list.\n> Non-existent endpoints will cause test implementation failures.",
                                type: "object",
                                properties: {
                                    endpoint: {
                                        $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
                                    },
                                    purpose: {
                                        description: "A concise explanation of why this API call is relevant or required for\nthe main test scenario.\n\nThis should describe the contextual or setup role of the dependency, such\nas creating necessary data or establishing user authentication.\n\nExample: \"Creates a category so that a product can be linked to it during\ncreation.\"",
                                        type: "string"
                                    }
                                },
                                required: [
                                    "endpoint",
                                    "purpose"
                                ]
                            }
                        }
                    },
                    validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && "boolean" === typeof input.pass && (Array.isArray(input.scenarioGroups) && input.scenarioGroups.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && (Array.isArray(input.scenarios) && (1 <= input.scenarios.length && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io2 = 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 _io3 = input => "string" === typeof input.draft && "string" === typeof input.functionName && (Array.isArray(input.dependencies) && input.dependencies.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && "string" === typeof input.purpose; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
                            path: _path + ".review",
                            expected: "string",
                            value: input.review
                        }), "string" === typeof input.plan || _report(_exceptionable, {
                            path: _path + ".plan",
                            expected: "string",
                            value: input.plan
                        }), "boolean" === typeof input.pass || _report(_exceptionable, {
                            path: _path + ".pass",
                            expected: "boolean",
                            value: input.pass
                        }), (Array.isArray(input.scenarioGroups) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups",
                            expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                            value: input.scenarioGroups
                        })) && input.scenarioGroups.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".scenarioGroups[" + _index4 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                            value: elem
                        })) && _vo1(elem, _path + ".scenarioGroups[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups[" + _index4 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                            value: elem
                        })).every(flag => flag) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups",
                            expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                            value: input.scenarioGroups
                        })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                            value: input.scenarios
                        })) && ((1 <= input.scenarios.length || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "Array<> & MinItems<1>",
                            value: input.scenarios
                        })) && input.scenarios.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".scenarios[" + _index5 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenario",
                            value: elem
                        })) && _vo3(elem, _path + ".scenarios[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".scenarios[" + _index5 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenario",
                            value: elem
                        })).every(flag => flag)) || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                            value: input.scenarios
                        })].every(flag => flag); const _vo2 = (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 _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
                            path: _path + ".draft",
                            expected: "string",
                            value: input.draft
                        }), "string" === typeof input.functionName || _report(_exceptionable, {
                            path: _path + ".functionName",
                            expected: "string",
                            value: input.functionName
                        }), (Array.isArray(input.dependencies) || _report(_exceptionable, {
                            path: _path + ".dependencies",
                            expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                            value: input.dependencies
                        })) && input.dependencies.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".dependencies[" + _index6 + "]",
                            expected: "IAutoBeTestScenarioApplication.IDependencies",
                            value: elem
                        })) && _vo4(elem, _path + ".dependencies[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".dependencies[" + _index6 + "]",
                            expected: "IAutoBeTestScenarioApplication.IDependencies",
                            value: elem
                        })).every(flag => flag) || _report(_exceptionable, {
                            path: _path + ".dependencies",
                            expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                            value: input.dependencies
                        })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        }), "string" === typeof input.purpose || _report(_exceptionable, {
                            path: _path + ".purpose",
                            expected: "string",
                            value: input.purpose
                        })].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: "IAutoBeTestScenarioReviewApplication.IProps",
                                value: input
                            })) && _vo0(input, _path + "", true) || _report(true, {
                                path: _path + "",
                                expected: "IAutoBeTestScenarioReviewApplication.IProps",
                                value: input
                            }))(input, "$input", true);
                            const success = 0 === errors.length;
                            return success ? {
                                success,
                                data: input
                            } : {
                                success,
                                errors,
                                data: input
                            };
                        }
                        return {
                            success: true,
                            data: input
                        };
                    }; })()
                }
            ]
        };
        __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
            validate: {
                review: validate,
            },
        }), { equals: false }));
        return application;
    })(),
    claude: (validate) => (() => {
        const application = {
            model: "claude",
            options: {
                reference: true,
                separate: null
            },
            functions: [
                {
                    name: "review",
                    parameters: {
                        description: "Current Type: {@link IAutoBeTestScenarioReviewApplication.IProps}",
                        type: "object",
                        properties: {
                            review: {
                                description: "Concise review summary focusing on critical findings and key\nimprovements.\n\nShould include:\n\n- Executive summary of overall quality\n- Critical issues requiring immediate fixes\n- Key improvement recommendations\n- Database schema compliance status\n- Modified scenarios identification by functionName",
                                type: "string"
                            },
                            plan: {
                                description: "Structured action plan with priority-based improvements.\n\nShould contain:\n\n- Critical fixes required immediately\n- High priority enhancements\n- Implementation guidance\n- Success criteria\n- Specific scenario action items by functionName",
                                type: "string"
                            },
                            pass: {
                                description: "If the scenario groups pass the review, Set to true.",
                                type: "boolean"
                            },
                            scenarioGroups: {
                                description: "The reviewed and improved scenario groups with all quality fixes applied.\n\nThis is the primary output containing:\n\n- All critical issues resolved\n- Authentication flows corrected\n- Database dependencies validated\n- Quality enhancements implemented\n- Only implementable scenarios retained",
                                type: "array",
                                items: {
                                    $ref: "#/$defs/IAutoBeTestScenarioApplication.IScenarioGroup"
                                }
                            }
                        },
                        required: [
                            "review",
                            "plan",
                            "pass",
                            "scenarioGroups"
                        ],
                        additionalProperties: false,
                        $defs: {
                            "IAutoBeTestScenarioApplication.IScenarioGroup": {
                                type: "object",
                                properties: {
                                    endpoint: {
                                        description: "Target API endpoint to test.\n\nThis must be **unique** across all scenario groups. An endpoint is\nidentified by its `path` and `method` combination.\n\nMultiple test scenarios may exist for a single endpoint.",
                                        $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
                                    },
                                    scenarios: {
                                        description: "An array of test scenarios associated with the given endpoint.\n\nEach scenario represents a specific test case for the same `path` and\n`method`.\n\nIMPORTANT: Each scenario must be actually implementable. A scenario's\nimplementability is determined by the existence of ALL APIs (endpoints)\nrequired to test it. This includes not only the primary endpoint being\ntested, but also ALL dependency endpoints needed for setup,\nauthentication, and data preparation. If even one required dependency API\nis missing from the available operations, the scenario cannot be\nimplemented and should not be generated.\n\nExample: A \"test banned user login\" scenario requires both a login API\nAND a ban user API. If the ban API doesn't exist, this scenario is not\nimplementable regardless of database schema fields.",
                                        type: "array",
                                        items: {
                                            $ref: "#/$defs/IAutoBeTestScenarioApplication.IScenario"
                                        },
                                        minItems: 1
                                    }
                                },
                                required: [
                                    "endpoint",
                                    "scenarios"
                                ]
                            },
                            "AutoBeOpenApi.IEndpoint": {
                                description: "API endpoint information.",
                                type: "object",
                                properties: {
                                    path: {
                                        description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n  curly braces for parameters ({paramName}), hyphens (-), and underscores\n  (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
                                        type: "string",
                                        pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
                                    },
                                    method: {
                                        description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n  ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
                                        oneOf: [
                                            {
                                                "const": "get"
                                            },
                                            {
                                                "const": "post"
                                            },
                                            {
                                                "const": "put"
                                            },
                                            {
                                                "const": "delete"
                                            },
                                            {
                                                "const": "patch"
                                            }
                                        ]
                                    }
                                },
                                required: [
                                    "path",
                                    "method"
                                ]
                            },
                            "IAutoBeTestScenarioApplication.IScenario": {
                                description: "Represents a test scenario for a single API operation.\n\nThis interface defines a structured, user-centric test draft that includes\na descriptive function name, a detailed scenario draft, and logical\ndependencies on other endpoints required for context or setup.\n\nCRITICAL: All referenced endpoints MUST exist in the provided API\noperations. Do NOT create scenarios for non-existent APIs, even if database\nschema fields suggest their existence. Test scenarios must be implementable\nwith available APIs only.",
                                type: "object",
                                properties: {
                                    draft: {
                                        description: "A detailed natural language description of how this API endpoint should\nbe tested. This should include both successful and failure scenarios,\nbusiness rule validations, edge cases, and any sequence of steps\nnecessary to perform the test. A subsequent agent will use this draft to\ngenerate multiple concrete test cases.",
                                        type: "string"
                                    },
                                    functionName: {
                                        description: "Descriptive function name derived from the user scenario.\n\nThe function name serves as a concise, technical identifier that clearly\nrepresents the specific user scenario being described. It should be\nimmediately understandable and directly correspond to the user situation\nwithout requiring additional context.\n\n## Naming Convention\n\nDO: Use snake_case naming convention.\n\n- Must start with `test_api_` prefix (mandatory requirement)\n- ALWAYS start with business feature, NOT action verbs\n- Business feature comes first, followed by scenario context\n- Embed action verbs within the scenario description, not at the beginning\n\n## Content Structure\n\nFunction names should follow this pattern:\n`test_api_[core_feature]_[specific_scenario]`\n\nWhere:\n\n- `core_feature`: The main business feature or entity being tested\n  (customer, seller, cart, push_message, etc.)\n- `specific_scenario`: The specific operation or scenario context\n  (join_verification_not_found, login_success,\n  moderator_assignment_update, discountable_ticket_duplicated,\n  csv_export, etc.)\n\n## Business Feature-Based Examples\n\n- `test_api_customer_join_verification_not_found` - Customer join\n  verification when verification code not found\n- `test_api_seller_login` - Seller login operation\n- `test_api_cart_discountable_ticket_duplicated` - Cart discountable ticket\n  with duplication scenario\n- `test_api_push_message_csv` - Push message functionality with CSV format\n- `test_api_product_review_update` - Product review update operation\n\n## Clarity Guidelines\n\n- Prioritize clarity over brevity\n- Avoid technical jargon or implementation terms\n- Use terminology that reflects user perspective\n- Ensure the name alone conveys the user's intent\n- Make it understandable to non-technical stakeholders\n- Keep consistent with user scenario description\n\n## Single Endpoint Alignment\n\nFunction names must reflect scenarios that:\n\n- Accomplish user goals through this single endpoint only\n- Don't imply dependency on other API operations\n- Represent complete user interactions",
                                        type: "string"
                                    },
                                    dependencies: {
                                        description: "A list of other API endpoints that this scenario logically depends on.\n\nThese dependencies represent context or prerequisite conditions, such as\nauthentication, resource creation, or data setup, that are relevant to\nthe test. This list is not a strict execution order \u2014 if ordering is\nimportant, it must be described explicitly in the `purpose`.\n\nWARNING: Every endpoint referenced here MUST exist in the provided API\noperations. Do NOT reference endpoints that are not explicitly available,\neven if they seem logically necessary based on database schema or\nbusiness logic.",
                                        type: "array",
                                        items: {
                                            $ref: "#/$defs/IAutoBeTestScenarioApplication.IDependencies"
                                        }
                                    }
                                },
                                required: [
                                    "draft",
                                    "functionName",
                                    "dependencies"
                                ]
                            },
                            "IAutoBeTestScenarioApplication.IDependencies": {
                                type: "object",
                                properties: {
                                    endpoint: {
                                        description: "Target API endpoint that this scenario depends on.\n\nThis endpoint MUST exist in the available API operations list.\nNon-existent endpoints will cause test implementation failures.",
                                        $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
                                    },
                                    purpose: {
                                        description: "A concise explanation of why this API call is relevant or required for\nthe main test scenario.\n\nThis should describe the contextual or setup role of the dependency, such\nas creating necessary data or establishing user authentication.\n\nExample: \"Creates a category so that a product can be linked to it during\ncreation.\"",
                                        type: "string"
                                    }
                                },
                                required: [
                                    "endpoint",
                                    "purpose"
                                ]
                            }
                        }
                    },
                    validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && "boolean" === typeof input.pass && (Array.isArray(input.scenarioGroups) && input.scenarioGroups.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && (Array.isArray(input.scenarios) && (1 <= input.scenarios.length && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io2 = 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 _io3 = input => "string" === typeof input.draft && "string" === typeof input.functionName && (Array.isArray(input.dependencies) && input.dependencies.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io2(input.endpoint) && "string" === typeof input.purpose; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
                            path: _path + ".review",
                            expected: "string",
                            value: input.review
                        }), "string" === typeof input.plan || _report(_exceptionable, {
                            path: _path + ".plan",
                            expected: "string",
                            value: input.plan
                        }), "boolean" === typeof input.pass || _report(_exceptionable, {
                            path: _path + ".pass",
                            expected: "boolean",
                            value: input.pass
                        }), (Array.isArray(input.scenarioGroups) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups",
                            expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                            value: input.scenarioGroups
                        })) && input.scenarioGroups.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".scenarioGroups[" + _index4 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                            value: elem
                        })) && _vo1(elem, _path + ".scenarioGroups[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups[" + _index4 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenarioGroup",
                            value: elem
                        })).every(flag => flag) || _report(_exceptionable, {
                            path: _path + ".scenarioGroups",
                            expected: "Array<IAutoBeTestScenarioApplication.IScenarioGroup>",
                            value: input.scenarioGroups
                        })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                            value: input.scenarios
                        })) && ((1 <= input.scenarios.length || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "Array<> & MinItems<1>",
                            value: input.scenarios
                        })) && input.scenarios.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".scenarios[" + _index5 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenario",
                            value: elem
                        })) && _vo3(elem, _path + ".scenarios[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".scenarios[" + _index5 + "]",
                            expected: "IAutoBeTestScenarioApplication.IScenario",
                            value: elem
                        })).every(flag => flag)) || _report(_exceptionable, {
                            path: _path + ".scenarios",
                            expected: "(Array<IAutoBeTestScenarioApplication.IScenario> & MinItems<1>)",
                            value: input.scenarios
                        })].every(flag => flag); const _vo2 = (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 _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.draft || _report(_exceptionable, {
                            path: _path + ".draft",
                            expected: "string",
                            value: input.draft
                        }), "string" === typeof input.functionName || _report(_exceptionable, {
                            path: _path + ".functionName",
                            expected: "string",
                            value: input.functionName
                        }), (Array.isArray(input.dependencies) || _report(_exceptionable, {
                            path: _path + ".dependencies",
                            expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                            value: input.dependencies
                        })) && input.dependencies.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
                            path: _path + ".dependencies[" + _index6 + "]",
                            expected: "IAutoBeTestScenarioApplication.IDependencies",
                            value: elem
                        })) && _vo4(elem, _path + ".dependencies[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".dependencies[" + _index6 + "]",
                            expected: "IAutoBeTestScenarioApplication.IDependencies",
                            value: elem
                        })).every(flag => flag) || _report(_exceptionable, {
                            path: _path + ".dependencies",
                            expected: "Array<IAutoBeTestScenarioApplication.IDependencies>",
                            value: input.dependencies
                        })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
                            path: _path + ".endpoint",
                            expected: "AutoBeOpenApi.IEndpoint",
                            value: input.endpoint
                        }), "string" === typeof input.purpose || _report(_exceptionable, {
                            path: _path + ".purpose",
                            expected: "string",
                            value: input.purpose
                        })].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: "IAutoBeTestScenarioReviewApplication.IProps",
                                value: input
                            })) && _vo0(input, _path + "", true) || _report(true, {
                                path: _path + "",
                                expected: "IAutoBeTestScenarioReviewApplication.IProps",
                                value: input
                            }))(input, "$input", true);
                            const success = 0 === errors.length;
                            return success ? {
                                success,
                                data: input
                            } : {
                                success,
                                errors,
                                data: input
                            };
                        }
                        return {
                            success: true,
                            data: input
                        };
                    }; })()
                }
            ]
        };
        __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
            validate: {
                review: validate,
            },
        }), { equals: false }));
        return application;
    })(),
};
//# sourceMappingURL=orchestrateTestScenarioReview.js.map