@autobe/agent 0.5.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/lib/AutoBeAgent.js +4 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -2
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeContext.d.ts +2 -2
  6. package/lib/context/IAutoBeApplicationProps.d.ts +6 -0
  7. package/lib/factory/createAgenticaHistory.js +1 -0
  8. package/lib/factory/createAgenticaHistory.js.map +1 -1
  9. package/lib/factory/createAutoBeApplication.js +17 -17
  10. package/lib/factory/createAutoBeApplication.js.map +1 -1
  11. package/lib/index.mjs +6228 -4563
  12. package/lib/index.mjs.map +1 -1
  13. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.d.ts +4 -8
  14. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.js +25 -20
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -0
  16. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -0
  17. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +9 -0
  18. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +3 -0
  19. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +1 -0
  20. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.d.ts +1 -1
  21. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.js +8 -5
  22. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -0
  23. package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +31 -0
  24. package/lib/orchestrate/{orchestrateAnalyze.js → analyze/orchestrateAnalyze.js} +200 -59
  25. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
  26. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  27. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  28. package/lib/orchestrate/index.d.ts +3 -3
  29. package/lib/orchestrate/index.js +6 -6
  30. package/lib/orchestrate/index.js.map +1 -1
  31. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +8 -1
  32. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  33. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +6 -1
  34. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  35. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +3 -1
  36. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  37. package/lib/orchestrate/interface/transformInterfaceHistories.js +41 -0
  38. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  39. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +6 -5
  40. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +1 -1
  42. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +28 -1
  43. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  44. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +9 -0
  45. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +1 -1
  46. package/lib/orchestrate/prisma/transformPrismaHistories.js +9 -0
  47. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
  48. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +7 -0
  49. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  50. package/lib/orchestrate/{orchestrateTest.d.ts → test/orchestrateTest.d.ts} +2 -2
  51. package/lib/orchestrate/test/orchestrateTest.js +70 -0
  52. package/lib/orchestrate/test/orchestrateTest.js.map +1 -0
  53. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +4 -0
  54. package/lib/orchestrate/test/orchestrateTestCorrect.js +543 -0
  55. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
  56. package/lib/orchestrate/test/orchestrateTestProgress.d.ts +4 -0
  57. package/lib/orchestrate/test/orchestrateTestProgress.js +403 -0
  58. package/lib/orchestrate/test/orchestrateTestProgress.js.map +1 -0
  59. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
  60. package/lib/orchestrate/test/orchestrateTestScenario.js +700 -0
  61. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -0
  62. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +2 -0
  63. package/lib/orchestrate/test/transformTestCorrectHistories.js +47 -0
  64. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -0
  65. package/lib/orchestrate/test/transformTestHistories.d.ts +3 -0
  66. package/lib/orchestrate/test/transformTestHistories.js +74 -0
  67. package/lib/orchestrate/test/transformTestHistories.js.map +1 -0
  68. package/lib/orchestrate/test/transformTestProgressHistories.d.ts +2 -0
  69. package/lib/orchestrate/test/transformTestProgressHistories.js +47 -0
  70. package/lib/orchestrate/test/transformTestProgressHistories.js.map +1 -0
  71. package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +4 -0
  72. package/lib/orchestrate/test/transformTestScenarioHistories.js +176 -0
  73. package/lib/orchestrate/test/transformTestScenarioHistories.js.map +1 -0
  74. package/lib/structures/IAutoBeVendor.d.ts +45 -2
  75. package/package.json +6 -6
  76. package/src/AutoBeAgent.ts +5 -3
  77. package/src/constants/AutoBeSystemPromptConstant.ts +5 -2
  78. package/src/context/AutoBeContext.ts +2 -2
  79. package/src/context/IAutoBeApplicationProps.ts +6 -0
  80. package/src/factory/createAgenticaHistory.ts +1 -0
  81. package/src/factory/createAutoBeApplication.ts +2 -2
  82. package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.ts +38 -36
  83. package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +10 -0
  84. package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.ts +9 -6
  85. package/src/orchestrate/{orchestrateAnalyze.ts → analyze/orchestrateAnalyze.ts} +91 -39
  86. package/src/orchestrate/index.ts +3 -3
  87. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +8 -1
  88. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +6 -1
  89. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +3 -1
  90. package/src/orchestrate/interface/transformInterfaceHistories.ts +40 -0
  91. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -1
  92. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +28 -0
  93. package/src/orchestrate/prisma/transformPrismaCorrectHistories.ts +9 -0
  94. package/src/orchestrate/prisma/transformPrismaHistories.ts +9 -0
  95. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +7 -0
  96. package/src/orchestrate/test/orchestrateTest.ts +86 -0
  97. package/src/orchestrate/test/orchestrateTestCorrect.ts +368 -0
  98. package/src/orchestrate/test/orchestrateTestProgress.ts +264 -0
  99. package/src/orchestrate/test/orchestrateTestScenario.ts +178 -0
  100. package/src/orchestrate/test/transformTestCorrectHistories.ts +51 -0
  101. package/src/orchestrate/test/transformTestHistories.ts +77 -0
  102. package/src/orchestrate/test/transformTestProgressHistories.ts +51 -0
  103. package/src/orchestrate/test/transformTestScenarioHistories.ts +184 -0
  104. package/src/structures/IAutoBeVendor.ts +48 -2
  105. package/lib/analyze/AnalyzeAgent.d.ts +0 -24
  106. package/lib/analyze/AnalyzeAgent.js +0 -942
  107. package/lib/analyze/AnalyzeAgent.js.map +0 -1
  108. package/lib/analyze/AutoBeAnalyzeAgent.js.map +0 -1
  109. package/lib/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
  110. package/lib/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
  111. package/lib/orchestrate/orchestrateAnalyze.d.ts +0 -6
  112. package/lib/orchestrate/orchestrateAnalyze.js.map +0 -1
  113. package/lib/orchestrate/orchestrateTest.js +0 -19
  114. package/lib/orchestrate/orchestrateTest.js.map +0 -1
  115. package/src/analyze/AnalyzeAgent.ts +0 -183
  116. package/src/orchestrate/orchestrateTest.ts +0 -18
  117. /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.d.ts +0 -0
  118. /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.js +0 -0
  119. /package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.ts +0 -0
@@ -0,0 +1,700 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.orchestrateTestScenario = orchestrateTestScenario;
49
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
50
+ const core_1 = require("@agentica/core");
51
+ const typia_1 = __importDefault(require("typia"));
52
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
+ const transformTestScenarioHistories_1 = require("./transformTestScenarioHistories");
54
+ function orchestrateTestScenario(ctx) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ var _a, _b, _c, _d, _e, _f;
57
+ const files = Object.entries((_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : {})
58
+ .filter(([filename]) => {
59
+ return filename.startsWith("test/features/api/");
60
+ })
61
+ .reduce((acc, [filename, content]) => {
62
+ return Object.assign(acc, { [filename]: content });
63
+ }, {});
64
+ const operations = (_d = (_c = ctx.state().interface) === null || _c === void 0 ? void 0 : _c.document.operations) !== null && _d !== void 0 ? _d : [];
65
+ const endpoints = operations.map((it) => {
66
+ return {
67
+ method: it.method,
68
+ path: it.path,
69
+ summary: it.summary,
70
+ description: it.description,
71
+ parameters: it.parameters,
72
+ requestBody: it.requestBody,
73
+ responseBody: it.responseBody,
74
+ };
75
+ });
76
+ const start = new Date();
77
+ let completed = 0;
78
+ const scenarios = yield Promise.all(endpoints.map((endpoint, i, arr) => __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b;
80
+ const endponits = arr.filter((_el, j) => i !== j);
81
+ const rows = yield process(ctx, endpoint, endponits, files);
82
+ ctx.dispatch({
83
+ type: "testScenario",
84
+ scenarios: rows,
85
+ total: rows.flatMap((el) => el.scenarios).length,
86
+ step: (_b = (_a = ctx.state().test) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
87
+ completed,
88
+ created_at: start.toISOString(),
89
+ });
90
+ return rows;
91
+ })));
92
+ return {
93
+ type: "testScenario",
94
+ scenarios: scenarios.flat(),
95
+ total: scenarios.flat().flatMap((el) => el.scenarios).length,
96
+ step: (_f = (_e = ctx.state().test) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
97
+ completed,
98
+ created_at: start.toISOString(),
99
+ };
100
+ });
101
+ }
102
+ function process(ctx, endpoint, endpoints, files) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ var _a;
105
+ const pointer = {
106
+ value: null,
107
+ };
108
+ const agentica = new core_1.MicroAgentica({
109
+ model: ctx.model,
110
+ vendor: ctx.vendor,
111
+ config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : { locale: "en-US" })), { systemPrompt: {
112
+ describe: () => {
113
+ return "Answer only 'completion' or 'failure'.";
114
+ },
115
+ } }),
116
+ tokenUsage: ctx.usage(),
117
+ histories: [
118
+ ...(0, transformTestScenarioHistories_1.transformTestScenarioHistories)(ctx.state(), endpoints, files),
119
+ ],
120
+ controllers: [
121
+ createApplication({
122
+ model: ctx.model,
123
+ build: (next) => {
124
+ pointer.value = next.scenarios;
125
+ },
126
+ }),
127
+ ],
128
+ });
129
+ agentica.on("request", (event) => __awaiter(this, void 0, void 0, function* () {
130
+ if (event.body.tools)
131
+ event.body.tool_choice = "required";
132
+ }));
133
+ yield agentica.conversate([
134
+ "Make User Scenarios for below endpoint:",
135
+ "",
136
+ "```json",
137
+ JSON.stringify(endpoint, null, 2),
138
+ "```",
139
+ ].join("\n"));
140
+ if (pointer.value === null)
141
+ throw new Error("Failed to make scenarios.");
142
+ return pointer.value;
143
+ });
144
+ }
145
+ function createApplication(props) {
146
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
147
+ const application = collection[props.model];
148
+ return {
149
+ protocol: "class",
150
+ name: "Make User Scenarios",
151
+ application,
152
+ execute: {
153
+ makeScenario: (next) => {
154
+ props.build(next);
155
+ },
156
+ },
157
+ };
158
+ }
159
+ const claude = {
160
+ model: "claude",
161
+ options: {
162
+ reference: true,
163
+ separate: null
164
+ },
165
+ functions: [
166
+ {
167
+ name: "makeScenario",
168
+ parameters: {
169
+ description: " Properties containing the endpoints and user scenarios.\n\n------------------------------\n\nCurrent Type: {@link IMakeScenarioProps}",
170
+ type: "object",
171
+ properties: {
172
+ scenarios: {
173
+ title: "Array of user scenarios",
174
+ description: "Array of user scenarios.",
175
+ type: "array",
176
+ items: {
177
+ description: "Current Type: {@link AutoBeTest.IScenario}",
178
+ type: "object",
179
+ properties: {
180
+ endpoint: {
181
+ description: "Target API endpoint for user scenario generation.\n\nThis represents the single API endpoint that will be analyzed to generate\ncomprehensive user scenarios. The endpoint contains all technical\nspecifications needed to understand user interactions, including HTTP\nmethods, paths, parameters, request/response schemas, and authentication\nrequirements.\n\n## Core Purpose\n\n- Serves as the foundation for user-centric scenario generation\n- Contains complete API specification for understanding user capabilities\n- Provides schema constraints for realistic user data generation\n- Defines authentication and permission requirements for user context\n\n## User Scenario Context\n\nThis endpoint information enables generation of scenarios that consider:\n\n- What users can realistically accomplish with this endpoint\n- How users would naturally interact with the API functionality\n- What business value users seek from this endpoint\n- What constraints and limitations users will encounter\n- How authentication affects user access patterns\n- What data formats users need to provide or expect to receive\n\n## Single Endpoint Constraint\n\nEach scenario generated must interact with ONLY this endpoint. Scenarios\nshould not assume or require calls to other endpoints, ensuring each user\njourney is complete and testable in isolation.\n\n------------------------------\n\nDescription of the current {@link AutoBeOpenApi.IEndpoint} type:\n\n> API endpoint information.",
182
+ type: "object",
183
+ properties: {
184
+ path: {
185
+ title: "HTTP path of the API operation",
186
+ 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.",
187
+ type: "string"
188
+ },
189
+ method: {
190
+ title: "HTTP method of the API operation",
191
+ description: "HTTP method of the API operation.\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",
192
+ oneOf: [
193
+ {
194
+ "const": "get"
195
+ },
196
+ {
197
+ "const": "post"
198
+ },
199
+ {
200
+ "const": "put"
201
+ },
202
+ {
203
+ "const": "delete"
204
+ },
205
+ {
206
+ "const": "patch"
207
+ }
208
+ ]
209
+ }
210
+ },
211
+ required: [
212
+ "path",
213
+ "method"
214
+ ]
215
+ },
216
+ scenarios: {
217
+ title: "Comprehensive collection of user-centric scenarios for the endpoint",
218
+ description: "Comprehensive collection of user-centric scenarios for the endpoint.\n\nEach scenario represents a realistic user journey, intention, or\nsituation when interacting with this specific API endpoint. All scenarios\nare written from the user's perspective, focusing on what they want to\nachieve and how they naturally interact with the API functionality.\n\n## Scenario Coverage Framework\n\nThe scenarios must comprehensively cover all user interaction patterns:\n\n### 1. Happy Path User Journeys\n\n- Primary business use cases that users commonly perform\n- Standard workflows leading to successful user outcomes\n- Typical user behaviors with valid inputs and proper permissions\n- Most frequent user intentions and expected interactions\n\n### 2. Alternative User Approaches\n\n- Valid alternative ways users might achieve their goals\n- User scenarios utilizing optional parameters or different input patterns\n- Less common but legitimate user behaviors within normal boundaries\n- User experimentation with available API features\n\n### 3. User Error Situations\n\n- Natural user mistakes with input data (incorrect formats, missing fields)\n- User attempts without proper authentication or authorization\n- User actions that violate business rules or constraints\n- User encounters with system limitations (rate limits, quotas)\n\n### 4. Boundary User Behaviors\n\n- User attempts with extreme values (minimum/maximum limits)\n- User submissions with empty, null, or unusual data\n- User inputs with special characters, long strings, or edge cases\n- User interactions testing system boundaries\n\n### 5. Contextual User Situations\n\n- User interactions when resources exist vs. don't exist\n- Different user roles attempting the same actions\n- Time-sensitive user scenarios (expired sessions, scheduled operations)\n- User attempts during various system states\n\n## User-Centric Quality Standards\n\nEach scenario must:\n\n- Focus entirely on user motivation, context, and expected outcomes\n- Describe realistic business situations users actually encounter\n- Include clear user intent and the value they seek\n- Specify user-provided data and user-expected results\n- Be complete within the single endpoint constraint\n- Provide sufficient context for understanding user behavior patterns\n- Avoid technical implementation details or testing terminology\n\n## Single Endpoint Constraint Application\n\nEvery scenario must:\n\n- Complete the entire user journey using only this one endpoint\n- Not depend on or reference other API endpoints\n- Include all necessary context within the scenario itself\n- Represent a complete, self-contained user interaction\n\n## Business Value Focus\n\nThese user scenarios ensure:\n\n- Understanding of real user needs and behaviors\n- Comprehensive coverage of user interaction patterns\n- Proper handling of user errors and edge cases\n- Appropriate user feedback and experience design\n- Business rule validation from user perspective\n- Security and permission handling for different user contexts",
219
+ type: "array",
220
+ items: {
221
+ description: "Current Type: {@link AutoBeTest.Scenario}",
222
+ type: "object",
223
+ properties: {
224
+ functionName: {
225
+ title: "Descriptive function name derived from the user scenario",
226
+ 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\n- Must start with `test_` prefix (mandatory requirement)\n- Use snake_case formatting throughout\n- Include the primary user action (create, get, update, delete, list, etc.)\n- Specify the target resource (user, product, order, profile, etc.)\n- Add scenario-specific context (valid_data, invalid_email, not_found,\n etc.)\n\n## Content Structure\n\nFunction names should follow this pattern:\n`test_[user_action]_[resource]_[scenario_context]`\n\nWhere:\n\n- `user_action`: What the user is trying to do\n- `resource`: What the user is interacting with\n- `scenario_context`: The specific situation or condition\n\n## User-Focused Examples\n\n- `test_create_user_profile_with_complete_information` - User providing all\n available profile data\n- `test_retrieve_user_profile_when_profile_exists` - User accessing their\n existing profile\n- `test_update_user_email_with_valid_new_address` - User changing their\n email to a valid new one\n- `test_delete_user_account_when_user_lacks_permission` - User attempting\n account deletion without authorization\n- `test_search_user_profiles_with_pagination_preferences` - User browsing\n profiles with specific pagination\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",
227
+ type: "string"
228
+ },
229
+ scenario: {
230
+ description: "Comprehensive user scenario description written from pure user\nperspective.\n\nThis describes a complete user journey, motivation, and expected outcome\nwhen interacting with the API endpoint. The description focuses entirely\non user intent, context, and natural behavior patterns rather than\ntechnical testing considerations.\n\n## User-Centric Writing Approach\n\n- Write as if describing a real person's experience and motivation\n- Focus on business context and user goals, not system functionality\n- Use natural language that business stakeholders would understand\n- Emphasize user value and expected benefits\n- Avoid technical terminology or implementation details\n\n## Required Content Elements\n\nEach scenario description must include:\n\n### 1. User Context and Motivation\n\n- Who is the user (role, background, current situation)\n- Why they need to perform this action (business motivation)\n- What problem they're trying to solve or goal they want to achieve\n- Any relevant background circumstances or constraints\n\n### 2. User Actions and Behavior\n\n- Specific steps the user takes to accomplish their goal\n- What information or data the user provides\n- How the user naturally approaches the interaction\n- Any decision-making process the user goes through\n\n### 3. User Expectations and Desired Outcomes\n\n- What the user expects to happen as a result\n- How the user will know if they were successful\n- What value or benefit the user expects to receive\n- How this fits into their broader workflow or objectives\n\n### 4. Business Impact and Value\n\n- How this scenario relates to business objectives\n- What business processes or workflows this supports\n- Why this user behavior matters to the organization\n- What risks or opportunities this scenario represents\n\n## Single Endpoint Constraint Integration\n\nEach scenario must:\n\n- Represent a complete user journey achievable through this single endpoint\n- Include all necessary context without referencing other API operations\n- Describe user expectations based solely on this endpoint's capabilities\n- Avoid scenarios that would logically require multiple API calls\n\n## Quality and Realism Standards\n\n- Base scenarios on realistic business situations\n- Include specific, concrete details rather than generic descriptions\n- Ensure scenarios reflect actual user behaviors and motivations\n- Make each scenario distinct and valuable for understanding user needs\n- Provide enough detail to understand full context without being verbose\n\n## User-Focused Example Scenarios\n\n- \"A busy project manager needs to quickly create a new team member's user\n account during an onboarding meeting. They have all the necessary\n information readily available and expect the account to be immediately\n active so the new employee can start working right away.\"\n- \"A customer support representative is helping a customer who forgot their\n login credentials. The customer provides their email address, and the\n representative expects to quickly retrieve the associated account\n information to assist with password recovery.\"\n- \"A system administrator discovers that a former employee's account is\n still active after their departure. They need to immediately deactivate\n this account for security purposes and expect confirmation that the\n account can no longer be used to access company resources.\"\n\n## Language and Tone\n\n- Use active voice and present tense when describing user actions\n- Write in a narrative style that tells the user's story\n- Balance professional tone with human context\n- Ensure accessibility for both technical and non-technical readers\n- Maintain consistency in perspective throughout the description",
231
+ type: "string"
232
+ }
233
+ },
234
+ required: [
235
+ "functionName",
236
+ "scenario"
237
+ ]
238
+ }
239
+ }
240
+ },
241
+ required: [
242
+ "endpoint",
243
+ "scenarios"
244
+ ]
245
+ }
246
+ }
247
+ },
248
+ required: [
249
+ "scenarios"
250
+ ],
251
+ additionalProperties: false,
252
+ $defs: {}
253
+ },
254
+ description: "Make user scenarios for the given endpoints.",
255
+ validate: (() => { const _io0 = input => Array.isArray(input.scenarios) && input.scenarios.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) && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io2 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io3 = input => "string" === typeof input.functionName && "string" === typeof input.scenario; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.scenarios) || _report(_exceptionable, {
256
+ path: _path + ".scenarios",
257
+ expected: "Array<AutoBeTest.IScenario>",
258
+ value: input.scenarios
259
+ })) && input.scenarios.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
260
+ path: _path + ".scenarios[" + _index3 + "]",
261
+ expected: "AutoBeTest.IScenario",
262
+ value: elem
263
+ })) && _vo1(elem, _path + ".scenarios[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
264
+ path: _path + ".scenarios[" + _index3 + "]",
265
+ expected: "AutoBeTest.IScenario",
266
+ value: elem
267
+ })).every(flag => flag) || _report(_exceptionable, {
268
+ path: _path + ".scenarios",
269
+ expected: "Array<AutoBeTest.IScenario>",
270
+ value: input.scenarios
271
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
272
+ path: _path + ".endpoint",
273
+ expected: "AutoBeOpenApi.IEndpoint",
274
+ value: input.endpoint
275
+ })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
276
+ path: _path + ".endpoint",
277
+ expected: "AutoBeOpenApi.IEndpoint",
278
+ value: input.endpoint
279
+ }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
280
+ path: _path + ".scenarios",
281
+ expected: "Array<AutoBeTest.Scenario>",
282
+ value: input.scenarios
283
+ })) && input.scenarios.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
284
+ path: _path + ".scenarios[" + _index4 + "]",
285
+ expected: "AutoBeTest.Scenario",
286
+ value: elem
287
+ })) && _vo3(elem, _path + ".scenarios[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
288
+ path: _path + ".scenarios[" + _index4 + "]",
289
+ expected: "AutoBeTest.Scenario",
290
+ value: elem
291
+ })).every(flag => flag) || _report(_exceptionable, {
292
+ path: _path + ".scenarios",
293
+ expected: "Array<AutoBeTest.Scenario>",
294
+ value: input.scenarios
295
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.path || _report(_exceptionable, {
296
+ path: _path + ".path",
297
+ expected: "string",
298
+ value: input.path
299
+ }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
300
+ path: _path + ".method",
301
+ expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
302
+ value: input.method
303
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.functionName || _report(_exceptionable, {
304
+ path: _path + ".functionName",
305
+ expected: "string",
306
+ value: input.functionName
307
+ }), "string" === typeof input.scenario || _report(_exceptionable, {
308
+ path: _path + ".scenario",
309
+ expected: "string",
310
+ value: input.scenario
311
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
312
+ if (false === __is(input)) {
313
+ errors = [];
314
+ _report = __typia_transform__validateReport._validateReport(errors);
315
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
316
+ path: _path + "",
317
+ expected: "IMakeScenarioProps",
318
+ value: input
319
+ })) && _vo0(input, _path + "", true) || _report(true, {
320
+ path: _path + "",
321
+ expected: "IMakeScenarioProps",
322
+ value: input
323
+ }))(input, "$input", true);
324
+ const success = 0 === errors.length;
325
+ return success ? {
326
+ success,
327
+ data: input
328
+ } : {
329
+ success,
330
+ errors,
331
+ data: input
332
+ };
333
+ }
334
+ return {
335
+ success: true,
336
+ data: input
337
+ };
338
+ }; })()
339
+ }
340
+ ]
341
+ };
342
+ const collection = {
343
+ chatgpt: {
344
+ model: "chatgpt",
345
+ options: {
346
+ reference: true,
347
+ strict: false,
348
+ separate: null
349
+ },
350
+ functions: [
351
+ {
352
+ name: "makeScenario",
353
+ parameters: {
354
+ description: " Properties containing the endpoints and user scenarios.\n\n------------------------------\n\nCurrent Type: {@link IMakeScenarioProps}",
355
+ type: "object",
356
+ properties: {
357
+ scenarios: {
358
+ title: "Array of user scenarios",
359
+ description: "Array of user scenarios.",
360
+ type: "array",
361
+ items: {
362
+ description: "Current Type: {@link AutoBeTest.IScenario}",
363
+ type: "object",
364
+ properties: {
365
+ endpoint: {
366
+ description: "Target API endpoint for user scenario generation.\n\nThis represents the single API endpoint that will be analyzed to generate\ncomprehensive user scenarios. The endpoint contains all technical\nspecifications needed to understand user interactions, including HTTP\nmethods, paths, parameters, request/response schemas, and authentication\nrequirements.\n\n## Core Purpose\n\n- Serves as the foundation for user-centric scenario generation\n- Contains complete API specification for understanding user capabilities\n- Provides schema constraints for realistic user data generation\n- Defines authentication and permission requirements for user context\n\n## User Scenario Context\n\nThis endpoint information enables generation of scenarios that consider:\n\n- What users can realistically accomplish with this endpoint\n- How users would naturally interact with the API functionality\n- What business value users seek from this endpoint\n- What constraints and limitations users will encounter\n- How authentication affects user access patterns\n- What data formats users need to provide or expect to receive\n\n## Single Endpoint Constraint\n\nEach scenario generated must interact with ONLY this endpoint. Scenarios\nshould not assume or require calls to other endpoints, ensuring each user\njourney is complete and testable in isolation.\n\n------------------------------\n\nDescription of the current {@link AutoBeOpenApi.IEndpoint} type:\n\n> API endpoint information.",
367
+ type: "object",
368
+ properties: {
369
+ path: {
370
+ title: "HTTP path of the API operation",
371
+ 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.",
372
+ type: "string"
373
+ },
374
+ method: {
375
+ title: "HTTP method of the API operation",
376
+ description: "HTTP method of the API operation.\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",
377
+ type: "string",
378
+ "enum": [
379
+ "get",
380
+ "post",
381
+ "put",
382
+ "delete",
383
+ "patch"
384
+ ]
385
+ }
386
+ },
387
+ required: [
388
+ "path",
389
+ "method"
390
+ ]
391
+ },
392
+ scenarios: {
393
+ title: "Comprehensive collection of user-centric scenarios for the endpoint",
394
+ description: "Comprehensive collection of user-centric scenarios for the endpoint.\n\nEach scenario represents a realistic user journey, intention, or\nsituation when interacting with this specific API endpoint. All scenarios\nare written from the user's perspective, focusing on what they want to\nachieve and how they naturally interact with the API functionality.\n\n## Scenario Coverage Framework\n\nThe scenarios must comprehensively cover all user interaction patterns:\n\n### 1. Happy Path User Journeys\n\n- Primary business use cases that users commonly perform\n- Standard workflows leading to successful user outcomes\n- Typical user behaviors with valid inputs and proper permissions\n- Most frequent user intentions and expected interactions\n\n### 2. Alternative User Approaches\n\n- Valid alternative ways users might achieve their goals\n- User scenarios utilizing optional parameters or different input patterns\n- Less common but legitimate user behaviors within normal boundaries\n- User experimentation with available API features\n\n### 3. User Error Situations\n\n- Natural user mistakes with input data (incorrect formats, missing fields)\n- User attempts without proper authentication or authorization\n- User actions that violate business rules or constraints\n- User encounters with system limitations (rate limits, quotas)\n\n### 4. Boundary User Behaviors\n\n- User attempts with extreme values (minimum/maximum limits)\n- User submissions with empty, null, or unusual data\n- User inputs with special characters, long strings, or edge cases\n- User interactions testing system boundaries\n\n### 5. Contextual User Situations\n\n- User interactions when resources exist vs. don't exist\n- Different user roles attempting the same actions\n- Time-sensitive user scenarios (expired sessions, scheduled operations)\n- User attempts during various system states\n\n## User-Centric Quality Standards\n\nEach scenario must:\n\n- Focus entirely on user motivation, context, and expected outcomes\n- Describe realistic business situations users actually encounter\n- Include clear user intent and the value they seek\n- Specify user-provided data and user-expected results\n- Be complete within the single endpoint constraint\n- Provide sufficient context for understanding user behavior patterns\n- Avoid technical implementation details or testing terminology\n\n## Single Endpoint Constraint Application\n\nEvery scenario must:\n\n- Complete the entire user journey using only this one endpoint\n- Not depend on or reference other API endpoints\n- Include all necessary context within the scenario itself\n- Represent a complete, self-contained user interaction\n\n## Business Value Focus\n\nThese user scenarios ensure:\n\n- Understanding of real user needs and behaviors\n- Comprehensive coverage of user interaction patterns\n- Proper handling of user errors and edge cases\n- Appropriate user feedback and experience design\n- Business rule validation from user perspective\n- Security and permission handling for different user contexts",
395
+ type: "array",
396
+ items: {
397
+ description: "Current Type: {@link AutoBeTest.Scenario}",
398
+ type: "object",
399
+ properties: {
400
+ functionName: {
401
+ title: "Descriptive function name derived from the user scenario",
402
+ 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\n- Must start with `test_` prefix (mandatory requirement)\n- Use snake_case formatting throughout\n- Include the primary user action (create, get, update, delete, list, etc.)\n- Specify the target resource (user, product, order, profile, etc.)\n- Add scenario-specific context (valid_data, invalid_email, not_found,\n etc.)\n\n## Content Structure\n\nFunction names should follow this pattern:\n`test_[user_action]_[resource]_[scenario_context]`\n\nWhere:\n\n- `user_action`: What the user is trying to do\n- `resource`: What the user is interacting with\n- `scenario_context`: The specific situation or condition\n\n## User-Focused Examples\n\n- `test_create_user_profile_with_complete_information` - User providing all\n available profile data\n- `test_retrieve_user_profile_when_profile_exists` - User accessing their\n existing profile\n- `test_update_user_email_with_valid_new_address` - User changing their\n email to a valid new one\n- `test_delete_user_account_when_user_lacks_permission` - User attempting\n account deletion without authorization\n- `test_search_user_profiles_with_pagination_preferences` - User browsing\n profiles with specific pagination\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",
403
+ type: "string"
404
+ },
405
+ scenario: {
406
+ description: "Comprehensive user scenario description written from pure user\nperspective.\n\nThis describes a complete user journey, motivation, and expected outcome\nwhen interacting with the API endpoint. The description focuses entirely\non user intent, context, and natural behavior patterns rather than\ntechnical testing considerations.\n\n## User-Centric Writing Approach\n\n- Write as if describing a real person's experience and motivation\n- Focus on business context and user goals, not system functionality\n- Use natural language that business stakeholders would understand\n- Emphasize user value and expected benefits\n- Avoid technical terminology or implementation details\n\n## Required Content Elements\n\nEach scenario description must include:\n\n### 1. User Context and Motivation\n\n- Who is the user (role, background, current situation)\n- Why they need to perform this action (business motivation)\n- What problem they're trying to solve or goal they want to achieve\n- Any relevant background circumstances or constraints\n\n### 2. User Actions and Behavior\n\n- Specific steps the user takes to accomplish their goal\n- What information or data the user provides\n- How the user naturally approaches the interaction\n- Any decision-making process the user goes through\n\n### 3. User Expectations and Desired Outcomes\n\n- What the user expects to happen as a result\n- How the user will know if they were successful\n- What value or benefit the user expects to receive\n- How this fits into their broader workflow or objectives\n\n### 4. Business Impact and Value\n\n- How this scenario relates to business objectives\n- What business processes or workflows this supports\n- Why this user behavior matters to the organization\n- What risks or opportunities this scenario represents\n\n## Single Endpoint Constraint Integration\n\nEach scenario must:\n\n- Represent a complete user journey achievable through this single endpoint\n- Include all necessary context without referencing other API operations\n- Describe user expectations based solely on this endpoint's capabilities\n- Avoid scenarios that would logically require multiple API calls\n\n## Quality and Realism Standards\n\n- Base scenarios on realistic business situations\n- Include specific, concrete details rather than generic descriptions\n- Ensure scenarios reflect actual user behaviors and motivations\n- Make each scenario distinct and valuable for understanding user needs\n- Provide enough detail to understand full context without being verbose\n\n## User-Focused Example Scenarios\n\n- \"A busy project manager needs to quickly create a new team member's user\n account during an onboarding meeting. They have all the necessary\n information readily available and expect the account to be immediately\n active so the new employee can start working right away.\"\n- \"A customer support representative is helping a customer who forgot their\n login credentials. The customer provides their email address, and the\n representative expects to quickly retrieve the associated account\n information to assist with password recovery.\"\n- \"A system administrator discovers that a former employee's account is\n still active after their departure. They need to immediately deactivate\n this account for security purposes and expect confirmation that the\n account can no longer be used to access company resources.\"\n\n## Language and Tone\n\n- Use active voice and present tense when describing user actions\n- Write in a narrative style that tells the user's story\n- Balance professional tone with human context\n- Ensure accessibility for both technical and non-technical readers\n- Maintain consistency in perspective throughout the description",
407
+ type: "string"
408
+ }
409
+ },
410
+ required: [
411
+ "functionName",
412
+ "scenario"
413
+ ]
414
+ }
415
+ }
416
+ },
417
+ required: [
418
+ "endpoint",
419
+ "scenarios"
420
+ ]
421
+ }
422
+ }
423
+ },
424
+ required: [
425
+ "scenarios"
426
+ ],
427
+ additionalProperties: false,
428
+ $defs: {}
429
+ },
430
+ description: "Make user scenarios for the given endpoints.",
431
+ validate: (() => { const _io0 = input => Array.isArray(input.scenarios) && input.scenarios.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) && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io2 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io3 = input => "string" === typeof input.functionName && "string" === typeof input.scenario; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.scenarios) || _report(_exceptionable, {
432
+ path: _path + ".scenarios",
433
+ expected: "Array<AutoBeTest.IScenario>",
434
+ value: input.scenarios
435
+ })) && input.scenarios.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
436
+ path: _path + ".scenarios[" + _index3 + "]",
437
+ expected: "AutoBeTest.IScenario",
438
+ value: elem
439
+ })) && _vo1(elem, _path + ".scenarios[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
440
+ path: _path + ".scenarios[" + _index3 + "]",
441
+ expected: "AutoBeTest.IScenario",
442
+ value: elem
443
+ })).every(flag => flag) || _report(_exceptionable, {
444
+ path: _path + ".scenarios",
445
+ expected: "Array<AutoBeTest.IScenario>",
446
+ value: input.scenarios
447
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
448
+ path: _path + ".endpoint",
449
+ expected: "AutoBeOpenApi.IEndpoint",
450
+ value: input.endpoint
451
+ })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
452
+ path: _path + ".endpoint",
453
+ expected: "AutoBeOpenApi.IEndpoint",
454
+ value: input.endpoint
455
+ }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
456
+ path: _path + ".scenarios",
457
+ expected: "Array<AutoBeTest.Scenario>",
458
+ value: input.scenarios
459
+ })) && input.scenarios.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
460
+ path: _path + ".scenarios[" + _index4 + "]",
461
+ expected: "AutoBeTest.Scenario",
462
+ value: elem
463
+ })) && _vo3(elem, _path + ".scenarios[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
464
+ path: _path + ".scenarios[" + _index4 + "]",
465
+ expected: "AutoBeTest.Scenario",
466
+ value: elem
467
+ })).every(flag => flag) || _report(_exceptionable, {
468
+ path: _path + ".scenarios",
469
+ expected: "Array<AutoBeTest.Scenario>",
470
+ value: input.scenarios
471
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.path || _report(_exceptionable, {
472
+ path: _path + ".path",
473
+ expected: "string",
474
+ value: input.path
475
+ }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
476
+ path: _path + ".method",
477
+ expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
478
+ value: input.method
479
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.functionName || _report(_exceptionable, {
480
+ path: _path + ".functionName",
481
+ expected: "string",
482
+ value: input.functionName
483
+ }), "string" === typeof input.scenario || _report(_exceptionable, {
484
+ path: _path + ".scenario",
485
+ expected: "string",
486
+ value: input.scenario
487
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
488
+ if (false === __is(input)) {
489
+ errors = [];
490
+ _report = __typia_transform__validateReport._validateReport(errors);
491
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
492
+ path: _path + "",
493
+ expected: "IMakeScenarioProps",
494
+ value: input
495
+ })) && _vo0(input, _path + "", true) || _report(true, {
496
+ path: _path + "",
497
+ expected: "IMakeScenarioProps",
498
+ value: input
499
+ }))(input, "$input", true);
500
+ const success = 0 === errors.length;
501
+ return success ? {
502
+ success,
503
+ data: input
504
+ } : {
505
+ success,
506
+ errors,
507
+ data: input
508
+ };
509
+ }
510
+ return {
511
+ success: true,
512
+ data: input
513
+ };
514
+ }; })()
515
+ }
516
+ ]
517
+ },
518
+ claude,
519
+ llama: claude,
520
+ deepseek: claude,
521
+ "3.1": claude,
522
+ "3.0": {
523
+ model: "3.0",
524
+ options: {
525
+ constraint: true,
526
+ recursive: 3,
527
+ separate: null
528
+ },
529
+ functions: [
530
+ {
531
+ name: "makeScenario",
532
+ parameters: {
533
+ type: "object",
534
+ properties: {
535
+ scenarios: {
536
+ type: "array",
537
+ items: {
538
+ type: "object",
539
+ properties: {
540
+ endpoint: {
541
+ type: "object",
542
+ properties: {
543
+ path: {
544
+ type: "string",
545
+ title: "HTTP path of the API operation",
546
+ 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."
547
+ },
548
+ method: {
549
+ type: "string",
550
+ "enum": [
551
+ "get",
552
+ "post",
553
+ "put",
554
+ "delete",
555
+ "patch"
556
+ ],
557
+ title: "HTTP method of the API operation",
558
+ description: "HTTP method of the API operation.\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"
559
+ }
560
+ },
561
+ required: [
562
+ "path",
563
+ "method"
564
+ ],
565
+ description: "Target API endpoint for user scenario generation.\n\nThis represents the single API endpoint that will be analyzed to generate\ncomprehensive user scenarios. The endpoint contains all technical\nspecifications needed to understand user interactions, including HTTP\nmethods, paths, parameters, request/response schemas, and authentication\nrequirements.\n\n## Core Purpose\n\n- Serves as the foundation for user-centric scenario generation\n- Contains complete API specification for understanding user capabilities\n- Provides schema constraints for realistic user data generation\n- Defines authentication and permission requirements for user context\n\n## User Scenario Context\n\nThis endpoint information enables generation of scenarios that consider:\n\n- What users can realistically accomplish with this endpoint\n- How users would naturally interact with the API functionality\n- What business value users seek from this endpoint\n- What constraints and limitations users will encounter\n- How authentication affects user access patterns\n- What data formats users need to provide or expect to receive\n\n## Single Endpoint Constraint\n\nEach scenario generated must interact with ONLY this endpoint. Scenarios\nshould not assume or require calls to other endpoints, ensuring each user\njourney is complete and testable in isolation.\n\n------------------------------\n\nDescription of the current {@link AutoBeOpenApi.IEndpoint} type:\n\n> API endpoint information.",
566
+ additionalProperties: false
567
+ },
568
+ scenarios: {
569
+ type: "array",
570
+ items: {
571
+ type: "object",
572
+ properties: {
573
+ functionName: {
574
+ type: "string",
575
+ title: "Descriptive function name derived from the user scenario",
576
+ 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\n- Must start with `test_` prefix (mandatory requirement)\n- Use snake_case formatting throughout\n- Include the primary user action (create, get, update, delete, list, etc.)\n- Specify the target resource (user, product, order, profile, etc.)\n- Add scenario-specific context (valid_data, invalid_email, not_found,\n etc.)\n\n## Content Structure\n\nFunction names should follow this pattern:\n`test_[user_action]_[resource]_[scenario_context]`\n\nWhere:\n\n- `user_action`: What the user is trying to do\n- `resource`: What the user is interacting with\n- `scenario_context`: The specific situation or condition\n\n## User-Focused Examples\n\n- `test_create_user_profile_with_complete_information` - User providing all\n available profile data\n- `test_retrieve_user_profile_when_profile_exists` - User accessing their\n existing profile\n- `test_update_user_email_with_valid_new_address` - User changing their\n email to a valid new one\n- `test_delete_user_account_when_user_lacks_permission` - User attempting\n account deletion without authorization\n- `test_search_user_profiles_with_pagination_preferences` - User browsing\n profiles with specific pagination\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"
577
+ },
578
+ scenario: {
579
+ type: "string",
580
+ description: "Comprehensive user scenario description written from pure user\nperspective.\n\nThis describes a complete user journey, motivation, and expected outcome\nwhen interacting with the API endpoint. The description focuses entirely\non user intent, context, and natural behavior patterns rather than\ntechnical testing considerations.\n\n## User-Centric Writing Approach\n\n- Write as if describing a real person's experience and motivation\n- Focus on business context and user goals, not system functionality\n- Use natural language that business stakeholders would understand\n- Emphasize user value and expected benefits\n- Avoid technical terminology or implementation details\n\n## Required Content Elements\n\nEach scenario description must include:\n\n### 1. User Context and Motivation\n\n- Who is the user (role, background, current situation)\n- Why they need to perform this action (business motivation)\n- What problem they're trying to solve or goal they want to achieve\n- Any relevant background circumstances or constraints\n\n### 2. User Actions and Behavior\n\n- Specific steps the user takes to accomplish their goal\n- What information or data the user provides\n- How the user naturally approaches the interaction\n- Any decision-making process the user goes through\n\n### 3. User Expectations and Desired Outcomes\n\n- What the user expects to happen as a result\n- How the user will know if they were successful\n- What value or benefit the user expects to receive\n- How this fits into their broader workflow or objectives\n\n### 4. Business Impact and Value\n\n- How this scenario relates to business objectives\n- What business processes or workflows this supports\n- Why this user behavior matters to the organization\n- What risks or opportunities this scenario represents\n\n## Single Endpoint Constraint Integration\n\nEach scenario must:\n\n- Represent a complete user journey achievable through this single endpoint\n- Include all necessary context without referencing other API operations\n- Describe user expectations based solely on this endpoint's capabilities\n- Avoid scenarios that would logically require multiple API calls\n\n## Quality and Realism Standards\n\n- Base scenarios on realistic business situations\n- Include specific, concrete details rather than generic descriptions\n- Ensure scenarios reflect actual user behaviors and motivations\n- Make each scenario distinct and valuable for understanding user needs\n- Provide enough detail to understand full context without being verbose\n\n## User-Focused Example Scenarios\n\n- \"A busy project manager needs to quickly create a new team member's user\n account during an onboarding meeting. They have all the necessary\n information readily available and expect the account to be immediately\n active so the new employee can start working right away.\"\n- \"A customer support representative is helping a customer who forgot their\n login credentials. The customer provides their email address, and the\n representative expects to quickly retrieve the associated account\n information to assist with password recovery.\"\n- \"A system administrator discovers that a former employee's account is\n still active after their departure. They need to immediately deactivate\n this account for security purposes and expect confirmation that the\n account can no longer be used to access company resources.\"\n\n## Language and Tone\n\n- Use active voice and present tense when describing user actions\n- Write in a narrative style that tells the user's story\n- Balance professional tone with human context\n- Ensure accessibility for both technical and non-technical readers\n- Maintain consistency in perspective throughout the description"
581
+ }
582
+ },
583
+ required: [
584
+ "functionName",
585
+ "scenario"
586
+ ],
587
+ description: "Current Type: {@link AutoBeTest.Scenario}",
588
+ additionalProperties: false
589
+ },
590
+ title: "Comprehensive collection of user-centric scenarios for the endpoint",
591
+ description: "Comprehensive collection of user-centric scenarios for the endpoint.\n\nEach scenario represents a realistic user journey, intention, or\nsituation when interacting with this specific API endpoint. All scenarios\nare written from the user's perspective, focusing on what they want to\nachieve and how they naturally interact with the API functionality.\n\n## Scenario Coverage Framework\n\nThe scenarios must comprehensively cover all user interaction patterns:\n\n### 1. Happy Path User Journeys\n\n- Primary business use cases that users commonly perform\n- Standard workflows leading to successful user outcomes\n- Typical user behaviors with valid inputs and proper permissions\n- Most frequent user intentions and expected interactions\n\n### 2. Alternative User Approaches\n\n- Valid alternative ways users might achieve their goals\n- User scenarios utilizing optional parameters or different input patterns\n- Less common but legitimate user behaviors within normal boundaries\n- User experimentation with available API features\n\n### 3. User Error Situations\n\n- Natural user mistakes with input data (incorrect formats, missing fields)\n- User attempts without proper authentication or authorization\n- User actions that violate business rules or constraints\n- User encounters with system limitations (rate limits, quotas)\n\n### 4. Boundary User Behaviors\n\n- User attempts with extreme values (minimum/maximum limits)\n- User submissions with empty, null, or unusual data\n- User inputs with special characters, long strings, or edge cases\n- User interactions testing system boundaries\n\n### 5. Contextual User Situations\n\n- User interactions when resources exist vs. don't exist\n- Different user roles attempting the same actions\n- Time-sensitive user scenarios (expired sessions, scheduled operations)\n- User attempts during various system states\n\n## User-Centric Quality Standards\n\nEach scenario must:\n\n- Focus entirely on user motivation, context, and expected outcomes\n- Describe realistic business situations users actually encounter\n- Include clear user intent and the value they seek\n- Specify user-provided data and user-expected results\n- Be complete within the single endpoint constraint\n- Provide sufficient context for understanding user behavior patterns\n- Avoid technical implementation details or testing terminology\n\n## Single Endpoint Constraint Application\n\nEvery scenario must:\n\n- Complete the entire user journey using only this one endpoint\n- Not depend on or reference other API endpoints\n- Include all necessary context within the scenario itself\n- Represent a complete, self-contained user interaction\n\n## Business Value Focus\n\nThese user scenarios ensure:\n\n- Understanding of real user needs and behaviors\n- Comprehensive coverage of user interaction patterns\n- Proper handling of user errors and edge cases\n- Appropriate user feedback and experience design\n- Business rule validation from user perspective\n- Security and permission handling for different user contexts"
592
+ }
593
+ },
594
+ required: [
595
+ "endpoint",
596
+ "scenarios"
597
+ ],
598
+ description: "Current Type: {@link AutoBeTest.IScenario}",
599
+ additionalProperties: false
600
+ },
601
+ title: "Array of user scenarios",
602
+ description: "Array of user scenarios."
603
+ }
604
+ },
605
+ required: [
606
+ "scenarios"
607
+ ],
608
+ description: " Properties containing the endpoints and user scenarios.\n\n------------------------------\n\nCurrent Type: {@link IMakeScenarioProps}",
609
+ additionalProperties: false
610
+ },
611
+ description: "Make user scenarios for the given endpoints.",
612
+ validate: (() => { const _io0 = input => Array.isArray(input.scenarios) && input.scenarios.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) && input.scenarios.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io2 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io3 = input => "string" === typeof input.functionName && "string" === typeof input.scenario; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.scenarios) || _report(_exceptionable, {
613
+ path: _path + ".scenarios",
614
+ expected: "Array<AutoBeTest.IScenario>",
615
+ value: input.scenarios
616
+ })) && input.scenarios.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
617
+ path: _path + ".scenarios[" + _index3 + "]",
618
+ expected: "AutoBeTest.IScenario",
619
+ value: elem
620
+ })) && _vo1(elem, _path + ".scenarios[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
621
+ path: _path + ".scenarios[" + _index3 + "]",
622
+ expected: "AutoBeTest.IScenario",
623
+ value: elem
624
+ })).every(flag => flag) || _report(_exceptionable, {
625
+ path: _path + ".scenarios",
626
+ expected: "Array<AutoBeTest.IScenario>",
627
+ value: input.scenarios
628
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
629
+ path: _path + ".endpoint",
630
+ expected: "AutoBeOpenApi.IEndpoint",
631
+ value: input.endpoint
632
+ })) && _vo2(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
633
+ path: _path + ".endpoint",
634
+ expected: "AutoBeOpenApi.IEndpoint",
635
+ value: input.endpoint
636
+ }), (Array.isArray(input.scenarios) || _report(_exceptionable, {
637
+ path: _path + ".scenarios",
638
+ expected: "Array<AutoBeTest.Scenario>",
639
+ value: input.scenarios
640
+ })) && input.scenarios.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
641
+ path: _path + ".scenarios[" + _index4 + "]",
642
+ expected: "AutoBeTest.Scenario",
643
+ value: elem
644
+ })) && _vo3(elem, _path + ".scenarios[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
645
+ path: _path + ".scenarios[" + _index4 + "]",
646
+ expected: "AutoBeTest.Scenario",
647
+ value: elem
648
+ })).every(flag => flag) || _report(_exceptionable, {
649
+ path: _path + ".scenarios",
650
+ expected: "Array<AutoBeTest.Scenario>",
651
+ value: input.scenarios
652
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.path || _report(_exceptionable, {
653
+ path: _path + ".path",
654
+ expected: "string",
655
+ value: input.path
656
+ }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
657
+ path: _path + ".method",
658
+ expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
659
+ value: input.method
660
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.functionName || _report(_exceptionable, {
661
+ path: _path + ".functionName",
662
+ expected: "string",
663
+ value: input.functionName
664
+ }), "string" === typeof input.scenario || _report(_exceptionable, {
665
+ path: _path + ".scenario",
666
+ expected: "string",
667
+ value: input.scenario
668
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
669
+ if (false === __is(input)) {
670
+ errors = [];
671
+ _report = __typia_transform__validateReport._validateReport(errors);
672
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
673
+ path: _path + "",
674
+ expected: "IMakeScenarioProps",
675
+ value: input
676
+ })) && _vo0(input, _path + "", true) || _report(true, {
677
+ path: _path + "",
678
+ expected: "IMakeScenarioProps",
679
+ value: input
680
+ }))(input, "$input", true);
681
+ const success = 0 === errors.length;
682
+ return success ? {
683
+ success,
684
+ data: input
685
+ } : {
686
+ success,
687
+ errors,
688
+ data: input
689
+ };
690
+ }
691
+ return {
692
+ success: true,
693
+ data: input
694
+ };
695
+ }; })()
696
+ }
697
+ ]
698
+ },
699
+ };
700
+ //# sourceMappingURL=orchestrateTestScenario.js.map