@autobe/agent 0.24.1 → 0.25.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 (225) hide show
  1. package/lib/AutoBeMockAgent.js +1 -0
  2. package/lib/AutoBeMockAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +19 -18
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/IAutoBeApplication.d.ts +101 -6
  6. package/lib/context/IAutoBeApplicationProps.d.ts +6 -2
  7. package/lib/factory/createAgenticaHistory.js +1 -1
  8. package/lib/factory/createAgenticaHistory.js.map +1 -1
  9. package/lib/factory/createAutoBeApplication.js +80 -90
  10. package/lib/factory/createAutoBeApplication.js.map +1 -1
  11. package/lib/factory/createAutoBeContext.js +8 -8
  12. package/lib/factory/createAutoBeContext.js.map +1 -1
  13. package/lib/factory/getAutoBeGenerated.js +4 -1
  14. package/lib/factory/getAutoBeGenerated.js.map +1 -1
  15. package/lib/factory/getAutoBeRealizeGenerated.d.ts +2 -1
  16. package/lib/factory/getAutoBeRealizeGenerated.js +1 -1
  17. package/lib/factory/getAutoBeRealizeGenerated.js.map +1 -1
  18. package/lib/factory/getCriticalCompiler.js +1 -1
  19. package/lib/factory/getCriticalCompiler.js.map +1 -1
  20. package/lib/index.mjs +2222 -1393
  21. package/lib/index.mjs.map +1 -1
  22. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +5 -1
  23. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  24. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +1 -1
  25. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +18 -3
  26. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  27. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +5 -1
  28. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +19 -7
  29. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  30. package/lib/orchestrate/analyze/orchestrateAnalyze.js +3 -2
  31. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  32. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +1 -1
  33. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
  34. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  35. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +1 -0
  36. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -2
  37. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  38. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  39. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  40. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +2 -1
  41. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  42. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +5 -1
  43. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +20 -7
  44. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  45. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +6 -1
  46. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -23
  47. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  48. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +6 -1
  49. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +22 -6
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  53. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +4 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +26 -5
  55. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  56. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +5 -1
  57. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +21 -5
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  59. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
  60. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +5 -1
  62. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +20 -4
  63. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  64. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +1 -1
  65. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  66. package/lib/orchestrate/interface/orchestrateInterface.js +25 -7
  67. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  68. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +1 -1
  69. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +17 -8
  70. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  71. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -1
  72. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +18 -11
  73. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +6 -1
  75. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +25 -10
  76. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  77. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -1
  78. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +9 -6
  79. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  80. package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +5 -1
  81. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +33 -17
  82. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  83. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +5 -1
  84. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +36 -18
  85. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  86. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +67 -8
  87. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
  88. package/lib/orchestrate/interface/utils/OperationValidator.js +2 -1
  89. package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
  90. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +4 -1
  91. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +19 -8
  92. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  93. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
  94. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  95. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +6 -1
  96. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +20 -6
  97. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  98. package/lib/orchestrate/prisma/orchestratePrisma.js +3 -3
  99. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  100. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
  101. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +6 -3
  102. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  103. package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
  104. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +12 -6
  105. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  106. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +1 -1
  107. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  108. package/lib/orchestrate/{common/histories/transformCommonCorrectDateHistories.d.ts → realize/histories/transformRealizeCorrectCastingHistories.d.ts} +1 -2
  109. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +33 -0
  110. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -0
  111. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +1 -1
  112. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  113. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +1 -1
  114. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  115. package/lib/orchestrate/realize/internal/compileRealizeFiles.js +3 -1
  116. package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
  117. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +25 -8
  118. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
  119. package/lib/orchestrate/realize/orchestrateRealize.js +12 -8
  120. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  121. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +3 -1
  122. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  123. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +16 -5
  124. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  125. package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -5
  126. package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
  127. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js +1 -0
  128. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -1
  129. package/lib/orchestrate/realize/utils/replaceImportStatements.js +3 -1
  130. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  131. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +5 -1
  132. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +11 -7
  133. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  134. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +7 -1
  135. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +39 -31
  136. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  137. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +8 -0
  138. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +119 -0
  139. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -0
  140. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +5 -1
  141. package/lib/orchestrate/test/histories/transformTestWriteHistories.js +111 -94
  142. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  143. package/lib/orchestrate/test/orchestrateTest.js +20 -14
  144. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  145. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +4 -1
  146. package/lib/orchestrate/test/orchestrateTestCorrect.js +51 -35
  147. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  148. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  149. package/lib/orchestrate/test/orchestrateTestScenario.js +21 -4
  150. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  151. package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +9 -0
  152. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +855 -0
  153. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -0
  154. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +4 -1
  155. package/lib/orchestrate/test/orchestrateTestWrite.js +9 -4
  156. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  157. package/lib/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.d.ts +47 -0
  158. package/lib/orchestrate/{common/structures/IAutoBeCommonCorrectDateApplication.js → test/structures/IAutoBeTestScenarioReviewApplication.js} +1 -1
  159. package/lib/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.js.map +1 -0
  160. package/package.json +6 -6
  161. package/src/AutoBeMockAgent.ts +1 -0
  162. package/src/constants/AutoBeSystemPromptConstant.ts +19 -18
  163. package/src/context/IAutoBeApplication.ts +101 -6
  164. package/src/context/IAutoBeApplicationProps.ts +6 -2
  165. package/src/factory/createAgenticaHistory.ts +11 -5
  166. package/src/factory/createAutoBeContext.ts +5 -5
  167. package/src/factory/getAutoBeGenerated.ts +3 -0
  168. package/src/factory/getAutoBeRealizeGenerated.ts +3 -1
  169. package/src/factory/getCriticalCompiler.ts +2 -1
  170. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +5 -1
  171. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +16 -0
  172. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +22 -7
  173. package/src/orchestrate/analyze/orchestrateAnalyze.ts +3 -2
  174. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +2 -1
  175. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
  176. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +2 -1
  177. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +23 -9
  178. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +33 -24
  179. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +26 -9
  180. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +27 -5
  181. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +24 -7
  182. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +23 -6
  183. package/src/orchestrate/interface/orchestrateInterface.ts +29 -10
  184. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +22 -12
  185. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +25 -17
  186. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +35 -23
  187. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +9 -3
  188. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +44 -29
  189. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +51 -32
  190. package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +68 -8
  191. package/src/orchestrate/interface/utils/OperationValidator.ts +2 -1
  192. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +20 -6
  193. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +24 -9
  194. package/src/orchestrate/prisma/orchestratePrisma.ts +7 -3
  195. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +5 -1
  196. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +15 -10
  197. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +45 -0
  198. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +3 -1
  199. package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +30 -8
  200. package/src/orchestrate/realize/orchestrateRealize.ts +36 -40
  201. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +5 -1
  202. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +38 -16
  203. package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -5
  204. package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +1 -0
  205. package/src/orchestrate/realize/utils/replaceImportStatements.ts +5 -0
  206. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +14 -7
  207. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +44 -36
  208. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +159 -0
  209. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +35 -12
  210. package/src/orchestrate/test/orchestrateTest.ts +19 -13
  211. package/src/orchestrate/test/orchestrateTestCorrect.ts +65 -46
  212. package/src/orchestrate/test/orchestrateTestScenario.ts +23 -9
  213. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +198 -0
  214. package/src/orchestrate/test/orchestrateTestWrite.ts +13 -4
  215. package/src/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.ts +52 -0
  216. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js +0 -48
  217. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js.map +0 -1
  218. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.d.ts +0 -35
  219. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.js.map +0 -1
  220. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.d.ts +0 -4
  221. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js +0 -540
  222. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js.map +0 -1
  223. package/src/orchestrate/common/histories/transformCommonCorrectDateHistories.ts +0 -60
  224. package/src/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.ts +0 -40
  225. package/src/orchestrate/realize/orchestrateRealizeCorrectDate.ts +0 -372
@@ -0,0 +1,198 @@
1
+ import { IAgenticaController } from "@agentica/core";
2
+ import { AutoBeProgressEventBase, AutoBeTestScenario } from "@autobe/interface";
3
+ import { AutoBeEndpointComparator } from "@autobe/utils";
4
+ import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
5
+ import { HashMap, IPointer, Pair } from "tstl";
6
+ import typia from "typia";
7
+ import { v7 } from "uuid";
8
+
9
+ import { AutoBeContext } from "../../context/AutoBeContext";
10
+ import { assertSchemaModel } from "../../context/assertSchemaModel";
11
+ import { transformTestScenarioReviewHistories } from "./histories/transformTestScenarioReviewHistories";
12
+ import { IAutoBeTestScenarioApplication } from "./structures/IAutoBeTestScenarioApplication";
13
+ import { IAutoBeTestScenarioReviewApplication } from "./structures/IAutoBeTestScenarioReviewApplication";
14
+
15
+ export async function orchestrateTestScenarioReview<
16
+ Model extends ILlmSchema.Model,
17
+ >(
18
+ ctx: AutoBeContext<Model>,
19
+ props: {
20
+ instruction: string;
21
+ groups: IAutoBeTestScenarioApplication.IScenarioGroup[];
22
+ progress: AutoBeProgressEventBase;
23
+ },
24
+ ): Promise<IAutoBeTestScenarioApplication.IScenarioGroup[]> {
25
+ const res: IAutoBeTestScenarioApplication.IScenarioGroup[] = await review(
26
+ ctx,
27
+ props,
28
+ );
29
+ return res;
30
+ }
31
+
32
+ async function review<Model extends ILlmSchema.Model>(
33
+ ctx: AutoBeContext<Model>,
34
+ props: {
35
+ instruction: string;
36
+ groups: IAutoBeTestScenarioApplication.IScenarioGroup[];
37
+ progress: AutoBeProgressEventBase;
38
+ },
39
+ ): Promise<IAutoBeTestScenarioApplication.IScenarioGroup[]> {
40
+ try {
41
+ const pointer: IPointer<IAutoBeTestScenarioReviewApplication.IProps | null> =
42
+ {
43
+ value: null,
44
+ };
45
+ const { tokenUsage } = await ctx.conversate({
46
+ source: "testScenariosReview",
47
+ controller: createController({
48
+ model: ctx.model,
49
+ pointer,
50
+ originalGroups: props.groups,
51
+ }),
52
+ histories: transformTestScenarioReviewHistories({
53
+ state: ctx.state(),
54
+ groups: props.groups,
55
+ instruction: props.instruction,
56
+ }),
57
+ enforceFunctionCall: true,
58
+ message: "Review the Test Scenario.",
59
+ });
60
+ if (pointer.value === null) {
61
+ // unreachable
62
+ throw new Error("Failed to get review result.");
63
+ }
64
+
65
+ props.progress.total = Math.max(
66
+ props.progress.total,
67
+ (props.progress.completed += pointer.value.scenarioGroups.length),
68
+ );
69
+
70
+ ctx.dispatch({
71
+ type: "testScenariosReview",
72
+ id: v7(),
73
+ tokenUsage,
74
+ total: props.progress.total,
75
+ completed: props.progress.completed,
76
+ scenarios: pointer.value.scenarioGroups
77
+ .map((group) => {
78
+ return group.scenarios.map((s) => {
79
+ return {
80
+ ...s,
81
+ endpoint: group.endpoint,
82
+ } satisfies AutoBeTestScenario;
83
+ });
84
+ })
85
+ .flat(),
86
+ step: ctx.state().interface?.step ?? 0,
87
+ created_at: new Date().toISOString(),
88
+ });
89
+ // @todo michael: need to investigate scenario removal more gracefully
90
+ return pointer.value.pass
91
+ ? // || pointer.value.scenarioGroups.length < props.groups.length
92
+ props.groups
93
+ : pointer.value.scenarioGroups;
94
+ } catch {
95
+ props.progress.completed += props.groups.length;
96
+ return props.groups;
97
+ }
98
+ }
99
+
100
+ function createController<Model extends ILlmSchema.Model>(props: {
101
+ model: Model;
102
+ pointer: IPointer<IAutoBeTestScenarioReviewApplication.IProps | null>;
103
+ originalGroups: IAutoBeTestScenarioApplication.IScenarioGroup[];
104
+ }): IAgenticaController.IClass<Model> {
105
+ assertSchemaModel(props.model);
106
+
107
+ const validate: Validator = (
108
+ next: unknown,
109
+ ): IValidation<IAutoBeTestScenarioReviewApplication.IProps> => {
110
+ const result: IValidation<IAutoBeTestScenarioReviewApplication.IProps> =
111
+ typia.validate<IAutoBeTestScenarioReviewApplication.IProps>(next);
112
+ if (result.success === false) return result;
113
+
114
+ // merge to unique scenario groups
115
+ const scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[] =
116
+ uniqueScenarioGroups(result.data.scenarioGroups);
117
+
118
+ const errors: IValidation.IError[] = [];
119
+
120
+ // validate endpoints between scenarioGroups and originalGroups
121
+ const filteredScenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[] =
122
+ props.originalGroups.reduce<
123
+ IAutoBeTestScenarioApplication.IScenarioGroup[]
124
+ >((acc, originalGroup) => {
125
+ // Keep only groups whose endpoint matches with one in props.originalGroups
126
+ const matchingGroup = scenarioGroups.find(
127
+ (g) =>
128
+ g.endpoint.method === originalGroup.endpoint.method &&
129
+ g.endpoint.path === originalGroup.endpoint.path,
130
+ );
131
+
132
+ if (!matchingGroup) {
133
+ return [...acc, originalGroup];
134
+ }
135
+
136
+ return [...acc, matchingGroup];
137
+ }, []);
138
+
139
+ result.data.scenarioGroups = filteredScenarioGroups;
140
+
141
+ if (errors.length > 0) {
142
+ return {
143
+ success: false,
144
+ errors,
145
+ data: result.data,
146
+ };
147
+ }
148
+
149
+ return result;
150
+ };
151
+
152
+ const application: ILlmApplication<Model> = collection[
153
+ props.model === "chatgpt" ? "chatgpt" : "claude"
154
+ ](
155
+ validate,
156
+ ) satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
157
+
158
+ return {
159
+ protocol: "class",
160
+ name: "Test Scenario Reviewer",
161
+ application,
162
+ execute: {
163
+ review: (input) => {
164
+ props.pointer.value = input;
165
+ },
166
+ } satisfies IAutoBeTestScenarioReviewApplication,
167
+ };
168
+ }
169
+
170
+ const uniqueScenarioGroups = (
171
+ groups: IAutoBeTestScenarioApplication.IScenarioGroup[],
172
+ ): IAutoBeTestScenarioApplication.IScenarioGroup[] =>
173
+ new HashMap(
174
+ groups.map((g) => new Pair(g.endpoint, g)),
175
+ AutoBeEndpointComparator.hashCode,
176
+ AutoBeEndpointComparator.equals,
177
+ )
178
+ .toJSON()
179
+ .map((it) => it.second);
180
+
181
+ const collection = {
182
+ chatgpt: (validate: Validator) =>
183
+ typia.llm.application<IAutoBeTestScenarioReviewApplication, "chatgpt">({
184
+ validate: {
185
+ review: validate,
186
+ },
187
+ }),
188
+ claude: (validate: Validator) =>
189
+ typia.llm.application<IAutoBeTestScenarioReviewApplication, "claude">({
190
+ validate: {
191
+ review: validate,
192
+ },
193
+ }),
194
+ };
195
+
196
+ type Validator = (
197
+ input: unknown,
198
+ ) => IValidation<IAutoBeTestScenarioReviewApplication.IProps>;
@@ -22,10 +22,13 @@ import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
22
22
 
23
23
  export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
24
24
  ctx: AutoBeContext<Model>,
25
- scenarios: AutoBeTestScenario[],
25
+ props: {
26
+ instruction: string;
27
+ scenarios: AutoBeTestScenario[];
28
+ },
26
29
  ): Promise<IAutoBeTestWriteResult[]> {
27
30
  const progress: AutoBeProgressEventBase = {
28
- total: scenarios.length,
31
+ total: props.scenarios.length,
29
32
  completed: 0,
30
33
  };
31
34
  const result: Array<IAutoBeTestWriteResult | null> = await executeCachedBatch(
@@ -34,7 +37,7 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
34
37
  * individual test code implementations. Each scenario is processed to
35
38
  * generate corresponding test code and progress events.
36
39
  */
37
- scenarios.map((scenario) => async (promptCacheKey) => {
40
+ props.scenarios.map((scenario) => async (promptCacheKey) => {
38
41
  try {
39
42
  const artifacts: IAutoBeTestScenarioArtifacts =
40
43
  await getTestScenarioArtifacts(ctx, scenario);
@@ -43,6 +46,7 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
43
46
  artifacts,
44
47
  progress,
45
48
  promptCacheKey,
49
+ instruction: props.instruction,
46
50
  });
47
51
  ctx.dispatch(event);
48
52
  return {
@@ -65,6 +69,7 @@ async function process<Model extends ILlmSchema.Model>(
65
69
  artifacts: IAutoBeTestScenarioArtifacts;
66
70
  progress: AutoBeProgressEventBase;
67
71
  promptCacheKey: string;
72
+ instruction: string;
68
73
  },
69
74
  ): Promise<AutoBeTestWriteEvent> {
70
75
  const { scenario, artifacts, progress, promptCacheKey } = props;
@@ -73,7 +78,11 @@ async function process<Model extends ILlmSchema.Model>(
73
78
  };
74
79
  const { tokenUsage } = await ctx.conversate({
75
80
  source: "testWrite",
76
- histories: await transformTestWriteHistories(ctx, scenario, artifacts),
81
+ histories: await transformTestWriteHistories(ctx, {
82
+ scenario,
83
+ artifacts,
84
+ instruction: props.instruction,
85
+ }),
77
86
  controller: createController({
78
87
  model: ctx.model,
79
88
  build: (next) => {
@@ -0,0 +1,52 @@
1
+ import { IAutoBeTestScenarioApplication } from "./IAutoBeTestScenarioApplication";
2
+
3
+ export interface IAutoBeTestScenarioReviewApplication {
4
+ review: (props: IAutoBeTestScenarioReviewApplication.IProps) => void;
5
+ }
6
+
7
+ export namespace IAutoBeTestScenarioReviewApplication {
8
+ export interface IProps {
9
+ /**
10
+ * Concise review summary focusing on critical findings and key
11
+ * improvements.
12
+ *
13
+ * Should include:
14
+ *
15
+ * - Executive summary of overall quality
16
+ * - Critical issues requiring immediate fixes
17
+ * - Key improvement recommendations
18
+ * - Database schema compliance status
19
+ * - Modified scenarios identification by functionName
20
+ */
21
+ review: string;
22
+
23
+ /**
24
+ * Structured action plan with priority-based improvements.
25
+ *
26
+ * Should contain:
27
+ *
28
+ * - Critical fixes required immediately
29
+ * - High priority enhancements
30
+ * - Implementation guidance
31
+ * - Success criteria
32
+ * - Specific scenario action items by functionName
33
+ */
34
+ plan: string;
35
+
36
+ /** If the scenario groups pass the review, Set to true. */
37
+ pass: boolean;
38
+
39
+ /**
40
+ * The reviewed and improved scenario groups with all quality fixes applied.
41
+ *
42
+ * This is the primary output containing:
43
+ *
44
+ * - All critical issues resolved
45
+ * - Authentication flows corrected
46
+ * - Database dependencies validated
47
+ * - Quality enhancements implemented
48
+ * - Only implementable scenarios retained
49
+ */
50
+ scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[];
51
+ }
52
+ }
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformCommonCorrectDateHistories = void 0;
4
- const utils_1 = require("@autobe/utils");
5
- const uuid_1 = require("uuid");
6
- /** Transform date correction histories for AI conversation */
7
- const transformCommonCorrectDateHistories = (failures) => [
8
- {
9
- id: (0, uuid_1.v7)(),
10
- created_at: new Date().toISOString(),
11
- type: "systemMessage",
12
- text: "<!--\nfilename: REALIZE_DATE.md\n-->\n# \uD83D\uDCC5 Date Type Handling Guide for Realize Agent\n\n## \uD83D\uDEA8 CRITICAL: Date Type is ABSOLUTELY FORBIDDEN in TypeScript Declarations\n\nThis document provides comprehensive guidelines for handling date-related types in the Realize Agent system. Violations of these rules will cause compilation failures.\n\n## \uD83D\uDD34 The Golden Rule: NEVER Use Native Date Type\n\n### \u274C ABSOLUTELY FORBIDDEN\n```typescript\n// NEVER declare variables with Date type\nconst now: Date = new Date(); // \u274C FORBIDDEN\nconst processDate = (date: Date) => { ... }; // \u274C FORBIDDEN\nfunction getDate(): Date { ... } // \u274C FORBIDDEN\ninterface IUser { created_at: Date; } // \u274C FORBIDDEN\ntype TimeStamp = Date; // \u274C FORBIDDEN\n```\n\n### \u2705 REQUIRED: Always Use String with Tags\n```typescript\n// ALWAYS use string with tags.Format<'date-time'>\nconst now: string & tags.Format<'date-time'> = toISOStringSafe(new Date());\nconst processDate = (date: string & tags.Format<'date-time'>) => { ... };\nfunction getDate(): string & tags.Format<'date-time'> { ... }\ninterface IUser { created_at: string & tags.Format<'date-time'>; }\ntype TimeStamp = string & tags.Format<'date-time'>;\n```\n\n## \uD83D\uDEE0\uFE0F The toISOStringSafe() Function\n\n### Function Signature\n```typescript\nfunction toISOStringSafe(\n value: Date | (string & tags.Format<\"date-time\">)\n): string & tags.Format<\"date-time\">\n```\n\n### Purpose\n`toISOStringSafe()` is the ONLY approved method for converting Date objects or date strings to ISO strings with proper type branding.\n\n### \u26A0\uFE0F CRITICAL: Parameter Requirements\n\n**toISOStringSafe REQUIRES a non-null parameter!**\n- The function accepts `Date` or ISO string format\n- It does NOT accept `null` or `undefined`\n- Always check for null/undefined BEFORE calling\n\n```typescript\n// \u274C WRONG: Function doesn't accept null\ntoISOStringSafe(nullableValue) // Type error if nullable!\n\n// \u2705 CORRECT: Check null first, then call\nvalue ? toISOStringSafe(value) : null // Safe null handling\n```\n\n### Common Usage Patterns\n\n#### 1. Creating New Timestamps\n```typescript\n// \u2705 For new timestamps\nconst created_at = toISOStringSafe(new Date());\nconst updated_at = toISOStringSafe(new Date());\n\n// \u2705 Converting existing date strings\nconst formatted_date = toISOStringSafe(dateString);\n```\n\n#### 2. Converting Prisma DateTime Fields\n```typescript\n// \u2705 Converting from Prisma (which returns Date objects)\nreturn {\n created_at: toISOStringSafe(created.created_at),\n updated_at: toISOStringSafe(created.updated_at),\n expires_at: created.expires_at ? toISOStringSafe(created.expires_at) : null,\n};\n```\n\n#### 3. Processing API Input Dates\n```typescript\n// \u2705 Converting date strings from API input\nawait MyGlobal.prisma.posts.create({\n data: {\n title: body.title,\n content: body.content,\n published_at: body.published_at ? toISOStringSafe(body.published_at) : null,\n scheduled_at: body.scheduled_at ? toISOStringSafe(body.scheduled_at) : null,\n },\n});\n```\n\n## \uD83D\uDCCA Date Field Patterns in Different Contexts\n\n### 1. Prisma Operations\n\n#### CREATE Operations\n```typescript\nawait MyGlobal.prisma.articles.create({\n data: {\n id: v4() as string & tags.Format<'uuid'>,\n title: body.title,\n content: body.content,\n // Required date fields\n created_at: toISOStringSafe(new Date()),\n updated_at: toISOStringSafe(new Date()),\n // Optional/nullable date fields\n published_at: body.published_at ? toISOStringSafe(body.published_at) : null,\n deleted_at: null, // If soft delete field exists\n },\n});\n```\n\n#### UPDATE Operations\n```typescript\nawait MyGlobal.prisma.articles.update({\n where: { id: parameters.id },\n data: {\n title: body.title,\n content: body.content,\n // Always update the updated_at field\n updated_at: toISOStringSafe(new Date()),\n // Conditional date updates\n ...(body.published_at !== undefined && {\n published_at: body.published_at ? toISOStringSafe(body.published_at) : null\n }),\n },\n});\n```\n\n#### WHERE Clauses with Date Ranges\n```typescript\nawait MyGlobal.prisma.events.findMany({\n where: {\n // Date range queries\n created_at: {\n gte: body.start_date ? toISOStringSafe(body.start_date) : undefined,\n lte: body.end_date ? toISOStringSafe(body.end_date) : undefined,\n },\n // Specific date comparisons\n expires_at: {\n gt: toISOStringSafe(new Date()), // Events not yet expired\n },\n },\n});\n```\n\n### 2. Return Object Transformations\n\n#### From Prisma to API Response\n```typescript\n// Prisma returns Date objects, API expects ISO strings\nconst users = await MyGlobal.prisma.users.findMany();\n\nreturn users.map(user => ({\n id: user.id,\n name: user.name,\n email: user.email,\n // Convert all Date fields to ISO strings\n created_at: toISOStringSafe(user.created_at),\n updated_at: toISOStringSafe(user.updated_at),\n last_login_at: user.last_login_at ? toISOStringSafe(user.last_login_at) : null,\n email_verified_at: user.email_verified_at ? toISOStringSafe(user.email_verified_at) : null,\n}));\n```\n\n### 3. Complex Date Operations\n\n#### Soft Delete Implementation\n```typescript\n// If schema has deleted_at field (always check first!)\nawait MyGlobal.prisma.posts.update({\n where: { id: parameters.id },\n data: {\n deleted_at: toISOStringSafe(new Date()), // Mark as deleted\n updated_at: toISOStringSafe(new Date()),\n },\n});\n\n// Querying non-deleted items\nawait MyGlobal.prisma.posts.findMany({\n where: {\n deleted_at: null, // Only get non-deleted posts\n },\n});\n```\n\n#### Date Calculations\n```typescript\n// Calculate expiry date (30 days from now)\nconst now = new Date();\nconst expiryDate = new Date(now.getTime() + 30 * 24 * 60 * 60 * 1000);\n\nawait MyGlobal.prisma.subscriptions.create({\n data: {\n user_id: user.id,\n started_at: toISOStringSafe(now),\n expires_at: toISOStringSafe(expiryDate),\n },\n});\n```\n\n## \uD83D\uDEAB Common Date Type Errors and Solutions\n\n### Error: \"Type 'Date' is not assignable to type 'string & tags.Format<'date-time'>'\"\n\n**Cause**: Trying to assign a Date object directly without conversion\n\n```typescript\n// \u274C WRONG\nreturn {\n created_at: new Date(), // ERROR!\n};\n\n// \u2705 CORRECT\nreturn {\n created_at: toISOStringSafe(new Date()),\n};\n```\n\n### Error: \"Argument of type 'null' is not assignable to parameter\"\n\n**Cause**: Trying to pass null or undefined to toISOStringSafe\n\n```typescript\n// \u274C WRONG\nconst date = toISOStringSafe(nullableDate); // Type error if nullable!\n\n// \u2705 CORRECT\nconst date = nullableDate ? toISOStringSafe(nullableDate) : null;\n```\n\n### Error: \"Type 'string | null' is not assignable to type 'string & tags.Format<'date-time'>'\"\n\n**Cause**: Nullable date field being assigned to required date field\n\n```typescript\n// \u274C WRONG (if API expects non-nullable)\nreturn {\n created_at: user.created_at ? toISOStringSafe(user.created_at) : null, // ERROR!\n};\n\n// \u2705 CORRECT (provide default for required fields)\nreturn {\n created_at: user.created_at \n ? toISOStringSafe(user.created_at) \n : toISOStringSafe(new Date()), // Default to current time\n};\n```\n\n## \uD83D\uDCCB Date Type Checklist\n\nBefore implementing any date-related functionality, verify:\n\n1. \u2705 **NO Date type declarations** - Search for `: Date` in your code\n2. \u2705 **All Date objects wrapped in toISOStringSafe()** - Never use .toISOString() directly\n3. \u2705 **Null checks before toISOStringSafe()** - Function cannot handle null\n4. \u2705 **Proper type annotations** - Use `string & tags.Format<'date-time'>`\n5. \u2705 **Schema verification** - Check if date fields actually exist in Prisma schema\n6. \u2705 **API contract alignment** - Verify if fields are nullable or required in DTOs\n\n## \uD83C\uDFAF Quick Reference\n\n### DO \u2705\n- `toISOStringSafe(new Date())`\n- `toISOStringSafe(dateString)` for existing strings\n- `value ? toISOStringSafe(value) : null` for nullable values\n- `string & tags.Format<'date-time'>` for type declarations\n- Check null/undefined BEFORE calling toISOStringSafe\n- Check Prisma schema for date field existence\n\n### DON'T \u274C\n- `const date: Date = new Date()` - storing Date in variables\n- `new Date().toISOString()` - use toISOStringSafe instead\n- `toISOStringSafe(nullableValue)` - function doesn't accept null\n- `toISOStringSafe()` - function requires a parameter\n- Assume date fields exist (like deleted_at)\n- Use Date type in function signatures\n\n## \uD83D\uDD0D Exception: new Date() Usage\n\nThe ONLY acceptable use of `new Date()` is as an immediate argument to `toISOStringSafe()`:\n\n```typescript\n// \u2705 ONLY ALLOWED PATTERN\nconst timestamp = toISOStringSafe(new Date());\n\n// \u274C NEVER STORE Date IN VARIABLE\nconst now = new Date(); // FORBIDDEN!\nconst timestamp = toISOStringSafe(now); // VIOLATION!\n```\n\n## \uD83D\uDCDD Summary\n\nThe Date type handling in Realize Agent follows a strict pattern:\n1. **Never** declare Date types in TypeScript\n2. **Always** use `string & tags.Format<'date-time'>` for type declarations\n3. **Always** use `toISOStringSafe()` for Date/string to ISO conversions\n4. **Always** check null/undefined before calling `toISOStringSafe()` - it doesn't accept null\n5. **Always** pass a parameter to `toISOStringSafe()` - it's not optional\n6. **Always** verify schema before using date fields\n\nFollowing these rules ensures type safety, prevents runtime errors, and maintains consistency across the entire codebase." /* AutoBeSystemPromptConstant.REALIZE_DATE */,
13
- },
14
- ...failures.map((f, i, array) => ({
15
- id: (0, uuid_1.v7)(),
16
- created_at: new Date().toISOString(),
17
- type: "assistantMessage",
18
- text: utils_1.StringUtil.trim `
19
- # ${i === array.length - 1 ? "Latest Date Type Failure" : "Previous Date Type Failure"}
20
-
21
- ## Generated TypeScript Code
22
- \`\`\`typescript
23
- ${f.script}
24
- \`\`\`
25
-
26
- ## Date-Related Compile Errors
27
- ${f.diagnostics
28
- .map((d) => {
29
- const location = d.file
30
- ? `[${d.file}${d.start ? `:${d.start}` : ""}]`
31
- : "[Unknown location]";
32
- const code = d.code ? `TS${d.code}` : "";
33
- const messageText = d.messageText || "Date type error";
34
- return `- ${location} ${code}: ${messageText}`;
35
- })
36
- .join("\n")}
37
-
38
- ## Required Fixes:
39
- - Replace all Date type declarations with string & tags.Format<"date-time">
40
- - Wrap Date objects with toISOStringSafe(value)
41
- - Check null/undefined BEFORE calling toISOStringSafe (it doesn't accept null)
42
- - Remove Date variable declarations (const now = new Date() is forbidden)
43
- - toISOStringSafe requires a parameter - it's not optional
44
- `,
45
- })),
46
- ];
47
- exports.transformCommonCorrectDateHistories = transformCommonCorrectDateHistories;
48
- //# sourceMappingURL=transformCommonCorrectDateHistories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformCommonCorrectDateHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/common/histories/transformCommonCorrectDateHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAS1B,8DAA8D;AACvD,MAAM,mCAAmC,GAAG,CACjD,QAAoB,EAGpB,EAAE,CAAC;IACH;QACE,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE,eAAe;QACrB,IAAI,+wTAAyC;KAC9C;IACD,GAAG,QAAQ,CAAC,GAAG,CACb,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CACd,CAAC;QACC,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;cACf,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,4BAA4B;;;;YAIpF,CAAC,CAAC,MAAM;;;;YAIR,CAAC,CAAC,WAAW;aACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACT,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI;gBACrB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG;gBAC9C,CAAC,CAAC,oBAAoB,CAAC;YACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,IAAI,iBAAiB,CAAC;YACvD,OAAO,KAAK,QAAQ,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACjD,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC;;;;;;;;SAQd;KACF,CAAkD,CACtD;CACF,CAAC;AA9CW,QAAA,mCAAmC,uCA8C9C"}
@@ -1,35 +0,0 @@
1
- import typia from "typia";
2
- /** Application interface for Date type correction in generated code */
3
- export interface IAutoBeCommonCorrectDateApplication {
4
- /**
5
- * Rewrite the function to fix Date type issues
6
- *
7
- * @param props - Correction properties
8
- */
9
- rewrite(props: IAutoBeCommonCorrectDateApplication.IProps): void;
10
- /** Reject the correction task if Date issues cannot be fixed */
11
- reject(): void;
12
- }
13
- export declare namespace IAutoBeCommonCorrectDateApplication {
14
- /** Properties for Date type correction */
15
- interface IProps {
16
- /** The correction revision containing the fixed code */
17
- revise: {
18
- /** Optional: Analysis of Date type errors found */
19
- analysis?: string & typia.tags.MaxLength<4000>;
20
- /** Optional: Strategy for fixing Date issues */
21
- strategy?: string & typia.tags.MaxLength<2000>;
22
- /**
23
- * Final corrected code with all Date type issues resolved
24
- *
25
- * Must follow these rules:
26
- *
27
- * - No ': Date' type declarations
28
- * - All dates use 'string & tags.Format<"date-time">'
29
- * - All Date objects wrapped with toISOStringSafe()
30
- * - Null checks before toISOStringSafe()
31
- */
32
- final: string;
33
- };
34
- }
35
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAutoBeCommonCorrectDateApplication.js","sourceRoot":"","sources":["../../../../src/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeFunction } from "@autobe/interface";
2
- import { ILlmSchema } from "@samchon/openapi";
3
- import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare const orchestrateRealizeCorrectDate: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, authorizations: AutoBeRealizeAuthorization[], functions: AutoBeRealizeFunction[], progress: AutoBeProgressEventBase, life?: number) => Promise<AutoBeRealizeFunction[]>;