@autobe/agent 0.9.2 → 0.10.1

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 (168) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  6. package/lib/context/AutoBeTokenUsage.js +56 -1
  7. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +288 -653
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4225 -6681
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  19. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  20. package/lib/orchestrate/index.d.ts +2 -2
  21. package/lib/orchestrate/index.js +4 -4
  22. package/lib/orchestrate/index.js.map +1 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
  24. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
  26. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
  28. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
  30. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  32. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
  34. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
  38. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  40. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  42. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  43. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
  45. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  49. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  50. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  52. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
  53. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  54. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  55. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  56. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  57. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  58. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  59. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  60. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  61. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  62. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  63. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  64. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  65. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  66. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  67. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  68. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  69. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  70. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  71. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  72. package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
  73. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  74. package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
  75. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
  78. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  79. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  80. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  81. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  82. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  83. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  86. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  88. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  89. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  92. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  93. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  94. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  95. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  96. package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
  97. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  98. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  99. package/lib/utils/backoffRetry.d.ts +4 -7
  100. package/lib/utils/backoffRetry.js +19 -37
  101. package/lib/utils/backoffRetry.js.map +1 -1
  102. package/lib/utils/forceRetry.d.ts +1 -0
  103. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  104. package/lib/utils/forceRetry.js.map +1 -0
  105. package/package.json +9 -12
  106. package/src/AutoBeAgent.ts +17 -3
  107. package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
  108. package/src/context/AutoBeTokenUsage.ts +85 -1
  109. package/src/factory/createAutoBeApplication.ts +2 -3
  110. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  111. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  112. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  113. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  114. package/src/orchestrate/index.ts +2 -2
  115. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  117. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  118. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  119. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  120. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  121. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  122. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  123. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  124. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  125. package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
  126. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
  127. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  130. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  131. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  132. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  133. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  134. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  135. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  136. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  137. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  138. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  139. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  140. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  141. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  142. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  143. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  144. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  145. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  146. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  147. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  148. package/src/structures/IAutoBeConfig.ts +9 -0
  149. package/src/utils/backoffRetry.ts +25 -36
  150. package/src/utils/forceRetry.ts +13 -0
  151. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  152. package/lib/factory/invertOpenApiDocument.js +0 -51
  153. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  154. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  155. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  156. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  157. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  158. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  159. package/lib/utils/StringUtil.d.ts +0 -4
  160. package/lib/utils/StringUtil.js +0 -43
  161. package/lib/utils/StringUtil.js.map +0 -1
  162. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  163. package/lib/utils/types/BackoffOptions.js.map +0 -1
  164. package/src/factory/invertOpenApiDocument.ts +0 -63
  165. package/src/orchestrate/orchestrateRealize.ts +0 -18
  166. package/src/utils/StringUtil.ts +0 -45
  167. package/src/utils/types/BackoffOptions.ts +0 -15
  168. /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -1,4 +1,5 @@
1
- import { AutoBeTestScenario, AutoBeTestWriteEvent } from "@autobe/interface";
1
+ import { AutoBeTestScenario } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateTestWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: AutoBeTestScenario[]): Promise<AutoBeTestWriteEvent[]>;
4
+ import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
5
+ export declare function orchestrateTestWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: AutoBeTestScenario[]): Promise<IAutoBeTestWriteResult[]>;
@@ -51,34 +51,32 @@ const core_1 = require("@agentica/core");
51
51
  const typia_1 = __importDefault(require("typia"));
52
52
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
53
  const enforceToolCall_1 = require("../../utils/enforceToolCall");
54
- const compileTestScenario_1 = require("./compileTestScenario");
54
+ const forceRetry_1 = require("../../utils/forceRetry");
55
+ const completeTestCode_1 = require("./compile/completeTestCode");
56
+ const getTestScenarioArtifacts_1 = require("./compile/getTestScenarioArtifacts");
55
57
  const transformTestWriteHistories_1 = require("./transformTestWriteHistories");
56
58
  function orchestrateTestWrite(ctx, scenarios) {
57
59
  return __awaiter(this, void 0, void 0, function* () {
58
60
  const start = new Date();
59
61
  let complete = 0;
60
- const events = yield Promise.all(
62
+ return Promise.all(
61
63
  /**
62
64
  * Generate test code for each scenario. Maps through plans array to create
63
65
  * individual test code implementations. Each scenario is processed to
64
66
  * generate corresponding test code and progress events.
65
67
  */
66
- scenarios.map((scenario) => __awaiter(this, void 0, void 0, function* () {
68
+ scenarios.map((scenario) => (0, forceRetry_1.forceRetry)(() => __awaiter(this, void 0, void 0, function* () {
67
69
  var _a, _b;
68
- const code = yield process(ctx, scenario);
69
- const event = {
70
- type: "testWrite",
71
- created_at: start.toISOString(),
72
- filename: `test/features/api/${code.domain}/${scenario.functionName}.ts`,
73
- content: code.content,
74
- completed: ++complete,
75
- total: scenarios.length,
76
- step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
77
- };
70
+ const artifacts = yield (0, getTestScenarioArtifacts_1.getTestScenarioArtifacts)(ctx, scenario);
71
+ const result = yield process(ctx, scenario, artifacts);
72
+ const event = Object.assign(Object.assign({ type: "testWrite", created_at: start.toISOString(), location: `test/features/api/${result.domain}/${scenario.functionName}.ts` }, result), { completed: ++complete, total: scenarios.length, step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0 });
78
73
  ctx.dispatch(event);
79
- return event;
80
- })));
81
- return events;
74
+ return {
75
+ scenario,
76
+ artifacts,
77
+ event,
78
+ };
79
+ }))));
82
80
  });
83
81
  }
84
82
  /**
@@ -88,52 +86,38 @@ function orchestrateTestWrite(ctx, scenarios) {
88
86
  *
89
87
  * @param ctx - The AutoBeContext containing model, vendor and configuration
90
88
  * @param scenario - The test scenario information to generate code for
91
- * @returns Promise resolving to ICreateTestCodeProps containing the generated
92
- * test code
89
+ * @param artifacts - The artifacts containing the reference files and schemas
90
+ * @returns Promise resolving to IAutoBeTestWriteApplication.IProps containing
91
+ * the generated test code
93
92
  */
94
- function process(ctx, scenario) {
93
+ function process(ctx, scenario, artifacts) {
95
94
  return __awaiter(this, void 0, void 0, function* () {
96
95
  var _a;
97
96
  const pointer = {
98
97
  value: null,
99
98
  };
100
- const artifacts = yield (0, compileTestScenario_1.compileTestScenario)(ctx, scenario);
101
99
  const agentica = new core_1.MicroAgentica({
102
100
  model: ctx.model,
103
101
  vendor: ctx.vendor,
104
102
  config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
105
- histories: (0, transformTestWriteHistories_1.transformTestWriteHistories)({
106
- scenario,
107
- artifacts,
108
- }),
103
+ histories: (0, transformTestWriteHistories_1.transformTestWriteHistories)(scenario, artifacts),
109
104
  controllers: [
110
105
  createApplication({
111
106
  model: ctx.model,
107
+ artifacts,
112
108
  build: (next) => {
113
109
  pointer.value = next;
114
110
  },
115
111
  }),
116
112
  ],
117
- tokenUsage: ctx.usage(),
118
113
  });
119
114
  (0, enforceToolCall_1.enforceToolCall)(agentica);
120
- yield agentica.conversate("Create e2e test functions.");
115
+ yield agentica.conversate("Create e2e test functions.").finally(() => {
116
+ const tokenUsage = agentica.getTokenUsage();
117
+ ctx.usage().record(tokenUsage, ["test"]);
118
+ });
121
119
  if (pointer.value === null)
122
120
  throw new Error("Failed to create test code.");
123
- const typeReferences = Array.from(new Set(Object.keys(artifacts.document.components.schemas).map((key) => key.split(".")[0])));
124
- pointer.value.content = pointer.value.content
125
- .replace(/^[ \t]*import\b[\s\S]*?;[ \t]*$/gm, "")
126
- .trim();
127
- pointer.value.content = [
128
- `import { TestValidator } from "@nestia/e2e";`,
129
- `import typia, { tags } from "typia";`,
130
- "",
131
- `import api from "@ORGANIZATION/PROJECT-api";`,
132
- ...typeReferences.map((ref) => `import type { ${ref} } from "@ORGANIZATION/PROJECT-api/lib/structures/${ref}";`),
133
- "",
134
- pointer.value.content,
135
- ].join("\n");
136
- pointer.value.content = pointer.value.content.replaceAll('string & Format<"uuid">', 'string & tags.Format<"uuid">');
137
121
  return pointer.value;
138
122
  });
139
123
  }
@@ -145,7 +129,9 @@ function createApplication(props) {
145
129
  name: "Create Test Code",
146
130
  application,
147
131
  execute: {
148
- createTestCode: (next) => {
132
+ write: (next) => {
133
+ next.draft = (0, completeTestCode_1.completeTestCode)(props.artifacts, next.draft);
134
+ next.final = (0, completeTestCode_1.completeTestCode)(props.artifacts, next.final);
149
135
  props.build(next);
150
136
  },
151
137
  },
@@ -159,36 +145,44 @@ const claude = {
159
145
  },
160
146
  functions: [
161
147
  {
162
- name: "createTestCode",
148
+ name: "write",
163
149
  parameters: {
164
- description: "Current Type: {@link ICreateTestCodeProps}",
150
+ description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
165
151
  type: "object",
166
152
  properties: {
167
153
  scenario: {
168
- title: "Strategic approach for test implementation",
169
- description: "Strategic approach for test implementation.\n\nDefine the high-level strategy and logical flow for testing the given\nscenario. Focus on test methodology, data preparation, and assertion\nstrategy.\n\n### Critical Requirements\n\n- Must follow the Test Generation Guidelines.\n- Must Planning the test code Never occur the TypeScript compile error.\n- NEVER include import statements in planning or implementation.\n\n### Planning Elements:\n\n#### Test Methodology\n\n- Identify test scenario type (CRUD operation, authentication flow,\n validation test)\n- Define test data requirements and preparation strategy\n- Plan positive/negative test cases and edge cases\n- Design assertion logic and validation points\n\n#### Execution Strategy\n\n- Outline step-by-step test execution flow\n- Plan error handling and exception plans\n- Define cleanup and teardown procedures\n- Identify dependencies and prerequisites\n\n### Example Plan:\n\n Test Strategy: Article Creation Validation\n 1. Prepare valid article data with required fields\n 2. Execute POST request to create article\n 3. Validate response structure and data integrity\n 4. Test error plans (missing fields, invalid data)\n 5. Verify database state changes\n 6. Reconsider the scenario if it doesn't follow the Test Generation\n Guidelines.",
154
+ description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
170
155
  type: "string"
171
156
  },
172
157
  domain: {
173
- title: "Functional domain classification for test organization",
174
- description: "Functional domain classification for test organization.\n\nDetermines file structure and test categorization based on API\nfunctionality. Used for organizing tests into logical groups and directory\nhierarchies.\n\n### Naming Rules:\n\n- Lowercase English words only\n- Singular nouns (e.g., \"article\", \"user\", \"comment\")\n- Kebab-case for compound words (e.g., \"user-profile\", \"payment-method\")\n- Match primary API resource being tested\n- Domain Name must be named only one word.\n\n### Domain Examples:\n\n- `article` \u2192 Article management operations\n- `comment` \u2192 Comment-related functionality\n- `auth` \u2192 Authentication and authorization\n- `user` \u2192 User management operations\n- `payment` \u2192 Payment processing\n- `notification` \u2192 Notification system",
158
+ description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
175
159
  type: "string"
176
160
  },
177
- content: {
178
- title: "Complete TypeScript E2E test implementation",
179
- description: "Complete TypeScript E2E test implementation.\n\nGenerate fully functional, compilation-error-free test code following",
161
+ draft: {
162
+ description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
163
+ type: "string"
164
+ },
165
+ review: {
166
+ description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\n\n**Compilation & Syntax:**\n\n- TypeScript compilation errors and type mismatches\n- Syntax errors and missing semicolons/brackets\n- Correct function signatures and parameter types\n\n**Framework Compliance:**\n\n-",
167
+ type: "string"
168
+ },
169
+ final: {
170
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
180
171
  type: "string"
181
172
  }
182
173
  },
183
174
  required: [
184
175
  "scenario",
185
176
  "domain",
186
- "content"
177
+ "draft",
178
+ "review",
179
+ "final"
187
180
  ],
188
181
  additionalProperties: false,
189
182
  $defs: {}
190
183
  },
191
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
184
+ description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
185
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
192
186
  path: _path + ".scenario",
193
187
  expected: "string",
194
188
  value: input.scenario
@@ -196,21 +190,29 @@ const claude = {
196
190
  path: _path + ".domain",
197
191
  expected: "string",
198
192
  value: input.domain
199
- }), "string" === typeof input.content || _report(_exceptionable, {
200
- path: _path + ".content",
193
+ }), "string" === typeof input.draft || _report(_exceptionable, {
194
+ path: _path + ".draft",
201
195
  expected: "string",
202
- value: input.content
196
+ value: input.draft
197
+ }), "string" === typeof input.review || _report(_exceptionable, {
198
+ path: _path + ".review",
199
+ expected: "string",
200
+ value: input.review
201
+ }), "string" === typeof input.final || _report(_exceptionable, {
202
+ path: _path + ".final",
203
+ expected: "string",
204
+ value: input.final
203
205
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
204
206
  if (false === __is(input)) {
205
207
  errors = [];
206
208
  _report = __typia_transform__validateReport._validateReport(errors);
207
209
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
208
210
  path: _path + "",
209
- expected: "ICreateTestCodeProps",
211
+ expected: "IAutoBeTestWriteApplication.IProps",
210
212
  value: input
211
213
  })) && _vo0(input, _path + "", true) || _report(true, {
212
214
  path: _path + "",
213
- expected: "ICreateTestCodeProps",
215
+ expected: "IAutoBeTestWriteApplication.IProps",
214
216
  value: input
215
217
  }))(input, "$input", true);
216
218
  const success = 0 === errors.length;
@@ -241,36 +243,44 @@ const collection = {
241
243
  },
242
244
  functions: [
243
245
  {
244
- name: "createTestCode",
246
+ name: "write",
245
247
  parameters: {
246
- description: "Current Type: {@link ICreateTestCodeProps}",
248
+ description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
247
249
  type: "object",
248
250
  properties: {
249
251
  scenario: {
250
- title: "Strategic approach for test implementation",
251
- description: "Strategic approach for test implementation.\n\nDefine the high-level strategy and logical flow for testing the given\nscenario. Focus on test methodology, data preparation, and assertion\nstrategy.\n\n### Critical Requirements\n\n- Must follow the Test Generation Guidelines.\n- Must Planning the test code Never occur the TypeScript compile error.\n- NEVER include import statements in planning or implementation.\n\n### Planning Elements:\n\n#### Test Methodology\n\n- Identify test scenario type (CRUD operation, authentication flow,\n validation test)\n- Define test data requirements and preparation strategy\n- Plan positive/negative test cases and edge cases\n- Design assertion logic and validation points\n\n#### Execution Strategy\n\n- Outline step-by-step test execution flow\n- Plan error handling and exception plans\n- Define cleanup and teardown procedures\n- Identify dependencies and prerequisites\n\n### Example Plan:\n\n Test Strategy: Article Creation Validation\n 1. Prepare valid article data with required fields\n 2. Execute POST request to create article\n 3. Validate response structure and data integrity\n 4. Test error plans (missing fields, invalid data)\n 5. Verify database state changes\n 6. Reconsider the scenario if it doesn't follow the Test Generation\n Guidelines.",
252
+ description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
252
253
  type: "string"
253
254
  },
254
255
  domain: {
255
- title: "Functional domain classification for test organization",
256
- description: "Functional domain classification for test organization.\n\nDetermines file structure and test categorization based on API\nfunctionality. Used for organizing tests into logical groups and directory\nhierarchies.\n\n### Naming Rules:\n\n- Lowercase English words only\n- Singular nouns (e.g., \"article\", \"user\", \"comment\")\n- Kebab-case for compound words (e.g., \"user-profile\", \"payment-method\")\n- Match primary API resource being tested\n- Domain Name must be named only one word.\n\n### Domain Examples:\n\n- `article` \u2192 Article management operations\n- `comment` \u2192 Comment-related functionality\n- `auth` \u2192 Authentication and authorization\n- `user` \u2192 User management operations\n- `payment` \u2192 Payment processing\n- `notification` \u2192 Notification system",
256
+ description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
257
257
  type: "string"
258
258
  },
259
- content: {
260
- title: "Complete TypeScript E2E test implementation",
261
- description: "Complete TypeScript E2E test implementation.\n\nGenerate fully functional, compilation-error-free test code following",
259
+ draft: {
260
+ description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
261
+ type: "string"
262
+ },
263
+ review: {
264
+ description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\n\n**Compilation & Syntax:**\n\n- TypeScript compilation errors and type mismatches\n- Syntax errors and missing semicolons/brackets\n- Correct function signatures and parameter types\n\n**Framework Compliance:**\n\n-",
265
+ type: "string"
266
+ },
267
+ final: {
268
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
262
269
  type: "string"
263
270
  }
264
271
  },
265
272
  required: [
266
273
  "scenario",
267
274
  "domain",
268
- "content"
275
+ "draft",
276
+ "review",
277
+ "final"
269
278
  ],
270
279
  additionalProperties: false,
271
280
  $defs: {}
272
281
  },
273
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
282
+ description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
283
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
274
284
  path: _path + ".scenario",
275
285
  expected: "string",
276
286
  value: input.scenario
@@ -278,21 +288,29 @@ const collection = {
278
288
  path: _path + ".domain",
279
289
  expected: "string",
280
290
  value: input.domain
281
- }), "string" === typeof input.content || _report(_exceptionable, {
282
- path: _path + ".content",
291
+ }), "string" === typeof input.draft || _report(_exceptionable, {
292
+ path: _path + ".draft",
293
+ expected: "string",
294
+ value: input.draft
295
+ }), "string" === typeof input.review || _report(_exceptionable, {
296
+ path: _path + ".review",
283
297
  expected: "string",
284
- value: input.content
298
+ value: input.review
299
+ }), "string" === typeof input.final || _report(_exceptionable, {
300
+ path: _path + ".final",
301
+ expected: "string",
302
+ value: input.final
285
303
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
286
304
  if (false === __is(input)) {
287
305
  errors = [];
288
306
  _report = __typia_transform__validateReport._validateReport(errors);
289
307
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
290
308
  path: _path + "",
291
- expected: "ICreateTestCodeProps",
309
+ expected: "IAutoBeTestWriteApplication.IProps",
292
310
  value: input
293
311
  })) && _vo0(input, _path + "", true) || _report(true, {
294
312
  path: _path + "",
295
- expected: "ICreateTestCodeProps",
313
+ expected: "IAutoBeTestWriteApplication.IProps",
296
314
  value: input
297
315
  }))(input, "$input", true);
298
316
  const success = 0 === errors.length;
@@ -320,41 +338,49 @@ const collection = {
320
338
  "3.0": {
321
339
  model: "3.0",
322
340
  options: {
323
- constraint: true,
324
341
  recursive: 3,
342
+ constraint: true,
325
343
  separate: null
326
344
  },
327
345
  functions: [
328
346
  {
329
- name: "createTestCode",
347
+ name: "write",
330
348
  parameters: {
331
349
  type: "object",
332
350
  properties: {
333
351
  scenario: {
334
352
  type: "string",
335
- title: "Strategic approach for test implementation",
336
- description: "Strategic approach for test implementation.\n\nDefine the high-level strategy and logical flow for testing the given\nscenario. Focus on test methodology, data preparation, and assertion\nstrategy.\n\n### Critical Requirements\n\n- Must follow the Test Generation Guidelines.\n- Must Planning the test code Never occur the TypeScript compile error.\n- NEVER include import statements in planning or implementation.\n\n### Planning Elements:\n\n#### Test Methodology\n\n- Identify test scenario type (CRUD operation, authentication flow,\n validation test)\n- Define test data requirements and preparation strategy\n- Plan positive/negative test cases and edge cases\n- Design assertion logic and validation points\n\n#### Execution Strategy\n\n- Outline step-by-step test execution flow\n- Plan error handling and exception plans\n- Define cleanup and teardown procedures\n- Identify dependencies and prerequisites\n\n### Example Plan:\n\n Test Strategy: Article Creation Validation\n 1. Prepare valid article data with required fields\n 2. Execute POST request to create article\n 3. Validate response structure and data integrity\n 4. Test error plans (missing fields, invalid data)\n 5. Verify database state changes\n 6. Reconsider the scenario if it doesn't follow the Test Generation\n Guidelines."
353
+ description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan"
337
354
  },
338
355
  domain: {
339
356
  type: "string",
340
- title: "Functional domain classification for test organization",
341
- description: "Functional domain classification for test organization.\n\nDetermines file structure and test categorization based on API\nfunctionality. Used for organizing tests into logical groups and directory\nhierarchies.\n\n### Naming Rules:\n\n- Lowercase English words only\n- Singular nouns (e.g., \"article\", \"user\", \"comment\")\n- Kebab-case for compound words (e.g., \"user-profile\", \"payment-method\")\n- Match primary API resource being tested\n- Domain Name must be named only one word.\n\n### Domain Examples:\n\n- `article` \u2192 Article management operations\n- `comment` \u2192 Comment-related functionality\n- `auth` \u2192 Authentication and authorization\n- `user` \u2192 User management operations\n- `payment` \u2192 Payment processing\n- `notification` \u2192 Notification system"
357
+ description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure"
342
358
  },
343
- content: {
359
+ draft: {
344
360
  type: "string",
345
- title: "Complete TypeScript E2E test implementation",
346
- description: "Complete TypeScript E2E test implementation.\n\nGenerate fully functional, compilation-error-free test code following"
361
+ description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow"
362
+ },
363
+ review: {
364
+ type: "string",
365
+ description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\n\n**Compilation & Syntax:**\n\n- TypeScript compilation errors and type mismatches\n- Syntax errors and missing semicolons/brackets\n- Correct function signatures and parameter types\n\n**Framework Compliance:**\n\n-"
366
+ },
367
+ final: {
368
+ type: "string",
369
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite."
347
370
  }
348
371
  },
349
372
  required: [
350
373
  "scenario",
351
374
  "domain",
352
- "content"
375
+ "draft",
376
+ "review",
377
+ "final"
353
378
  ],
354
- description: "Current Type: {@link ICreateTestCodeProps}",
379
+ description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
355
380
  additionalProperties: false
356
381
  },
357
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
382
+ description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
383
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
358
384
  path: _path + ".scenario",
359
385
  expected: "string",
360
386
  value: input.scenario
@@ -362,21 +388,29 @@ const collection = {
362
388
  path: _path + ".domain",
363
389
  expected: "string",
364
390
  value: input.domain
365
- }), "string" === typeof input.content || _report(_exceptionable, {
366
- path: _path + ".content",
391
+ }), "string" === typeof input.draft || _report(_exceptionable, {
392
+ path: _path + ".draft",
393
+ expected: "string",
394
+ value: input.draft
395
+ }), "string" === typeof input.review || _report(_exceptionable, {
396
+ path: _path + ".review",
397
+ expected: "string",
398
+ value: input.review
399
+ }), "string" === typeof input.final || _report(_exceptionable, {
400
+ path: _path + ".final",
367
401
  expected: "string",
368
- value: input.content
402
+ value: input.final
369
403
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
370
404
  if (false === __is(input)) {
371
405
  errors = [];
372
406
  _report = __typia_transform__validateReport._validateReport(errors);
373
407
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
374
408
  path: _path + "",
375
- expected: "ICreateTestCodeProps",
409
+ expected: "IAutoBeTestWriteApplication.IProps",
376
410
  value: input
377
411
  })) && _vo0(input, _path + "", true) || _report(true, {
378
412
  path: _path + "",
379
- expected: "ICreateTestCodeProps",
413
+ expected: "IAutoBeTestWriteApplication.IProps",
380
414
  value: input
381
415
  }))(input, "$input", true);
382
416
  const success = 0 === errors.length;
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,oDA8BC;;AA3CD,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,+DAA4D;AAE5D,+EAA4E;AAE5E,SAAsB,oBAAoB,CACxC,GAAyB,EACzB,SAA+B;;QAE/B,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,QAAQ,GAAW,CAAC,CAAC;QAEzB,MAAM,MAAM,GA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O,CAAC,KAAK,CAAC;IACvB,CAAC;CAAA;AAED,SAAS,iBAAiB,CAAiC,KAG1D;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACyB,CAAC;IACvC,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW;QACX,OAAO,EAAE;YACP,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;gBACvB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACqB;KACzB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA8C;CACpD,CAAC"}
1
+ {"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,oDAwCC;;AAzDD,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,uDAAoD;AACpD,iEAA8D;AAC9D,iFAA8E;AAI9E,+EAA4E;AAE5E,SAAsB,oBAAoB,CACxC,GAAyB,EACzB,SAA+B;;QA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;gBAC3D,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACoC;KACxC,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6D;CACnE,CAAC"}
@@ -0,0 +1,121 @@
1
+ export interface IAutoBeTestCorrectApplication {
2
+ /**
3
+ * Main entry point for AI Function Call - analyzes compilation errors and
4
+ * generates corrected E2E test code.
5
+ *
6
+ * The AI executes this function to perform the complete error correction
7
+ * workflow: error-free analysis → compilation error analysis → draft
8
+ * correction → code review → final corrected implementation. This multi-step
9
+ * process ensures systematic error resolution while preserving original test
10
+ * functionality and maintaining code quality.
11
+ *
12
+ * The corrector first analyzes the scenario without considering compilation
13
+ * errors to understand the intended functionality, then incorporates
14
+ * compilation diagnostics to identify specific issues, and finally produces
15
+ * corrected code through iterative refinement with comprehensive review and
16
+ * validation.
17
+ *
18
+ * @param props Complete specification for error correction workflow including
19
+ * analysis steps, draft implementation, review process, and final code
20
+ * generation
21
+ */
22
+ rewrite(props: IAutoBeTestCorrectApplication.IProps): void;
23
+ }
24
+ export declare namespace IAutoBeTestCorrectApplication {
25
+ interface IProps {
26
+ /**
27
+ * Step 1: Initial analysis and understanding without compilation error
28
+ * context.
29
+ *
30
+ * AI analyzes the original test scenario, business requirements, and
31
+ * intended functionality without being influenced by compilation errors.
32
+ * This clean analysis establishes a clear understanding of what the test
33
+ * should accomplish, the expected business workflow, and the correct API
34
+ * integration patterns.
35
+ *
36
+ * This step ensures that error correction doesn't lose sight of the
37
+ * original test purpose and helps maintain the intended business logic
38
+ * while addressing technical compilation issues. The AI develops a
39
+ * comprehensive understanding of the test requirements before diving into
40
+ * error-specific details.
41
+ *
42
+ * Workflow: Scenario understanding → Business logic analysis → Intended
43
+ * functionality mapping
44
+ */
45
+ think_without_compile_error: string;
46
+ /**
47
+ * Step 2: Compilation error analysis and root cause identification.
48
+ *
49
+ * AI re-analyzes the scenario and implementation with full awareness of
50
+ * compilation errors and diagnostic information. This step involves
51
+ * systematic examination of error messages, identification of error
52
+ * patterns, and understanding of how compilation issues relate to the
53
+ * intended functionality.
54
+ *
55
+ * The AI correlates compilation diagnostics with the original requirements
56
+ * to understand where the implementation diverged from correct TypeScript
57
+ * usage while maintaining the business logic intent. This analysis forms
58
+ * the foundation for targeted error correction strategies.
59
+ *
60
+ * Workflow: Error diagnostic analysis → Root cause identification →
61
+ * Correction strategy planning
62
+ */
63
+ think_again_with_compile_error: string;
64
+ /**
65
+ * Step 3: Draft corrected TypeScript E2E test code implementation.
66
+ *
67
+ * AI generates the first corrected version of the test code based on error
68
+ * analysis and correction strategies. This draft addresses all identified
69
+ * compilation errors while preserving the original business logic and test
70
+ * workflow. The code must be compilation-error-free and follow all
71
+ * established conventions.
72
+ *
73
+ * The implementation incorporates lessons learned from error analysis to
74
+ * produce properly typed, syntactically correct code that maintains the
75
+ * intended test functionality. All type safety requirements and framework
76
+ * conventions must be followed in this corrected implementation.
77
+ *
78
+ * Workflow: Error correction → TypeScript implementation → Functional
79
+ * preservation Critical: Must resolve all compilation errors while
80
+ * maintaining original test intent
81
+ */
82
+ draft: string;
83
+ /**
84
+ * Step 4: Code review and correction validation.
85
+ *
86
+ * AI performs a comprehensive review of the corrected draft implementation,
87
+ * validating that all compilation errors have been resolved and that the
88
+ * code maintains the original functionality. This review examines both
89
+ * technical correctness and business logic preservation.
90
+ *
91
+ * The review process includes verification of TypeScript compilation
92
+ * compatibility, API integration correctness, test workflow completeness,
93
+ * and adherence to all quality standards. Any remaining issues or potential
94
+ * improvements are identified for incorporation into the final
95
+ * implementation.
96
+ *
97
+ * Workflow: Draft validation → Compilation verification → Functionality
98
+ * review → Quality assessment
99
+ */
100
+ review: string;
101
+ /**
102
+ * Step 5: Final production-ready corrected test code.
103
+ *
104
+ * AI produces the final, polished version of the corrected test code
105
+ * incorporating all review feedback and validation results. This code
106
+ * represents the completed error correction, guaranteed to compile
107
+ * successfully while preserving all original test functionality and
108
+ * business logic.
109
+ *
110
+ * The final implementation resolves all compilation issues, maintains
111
+ * strict type safety, follows all established conventions, and delivers a
112
+ * production-ready test that accurately validates the intended API
113
+ * behaviors and user workflows.
114
+ *
115
+ * Workflow: Review integration → Final refinement → Production-ready
116
+ * implementation This is the ultimate deliverable that will replace the
117
+ * compilation-failed code.
118
+ */
119
+ final: string;
120
+ }
121
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoBeTestCorrectApplication.js.map