@autobe/agent 0.19.1 → 0.20.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 (222) hide show
  1. package/lib/agent/src/AutoBeAgent.js +3 -2
  2. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  3. package/lib/agent/src/AutoBeMockAgent.js +3 -3
  4. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +6 -6
  5. package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
  6. package/lib/agent/src/factory/consentFunctionCall.js +3 -2
  7. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
  8. package/lib/agent/src/factory/createAutoBeContext.js +8 -5
  9. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  10. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  11. package/lib/agent/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.js → transformAnalyzeReviewHistories.js} +24 -29
  12. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
  13. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
  14. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  15. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +31 -29
  16. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  17. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +19 -5
  18. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  19. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
  20. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +9 -6
  21. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  22. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +11 -9
  23. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  24. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  25. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -1
  26. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  27. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -46
  28. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  29. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +13 -13
  30. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  31. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
  32. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  33. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +23 -22
  34. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  35. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
  36. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
  37. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  38. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
  39. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  40. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
  41. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +31 -30
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  45. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +3 -1
  46. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  47. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +22 -18
  48. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  49. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +2 -0
  50. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  51. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
  52. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  53. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +2 -0
  54. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  55. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +74 -48
  56. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  57. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +24 -4
  58. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +30 -24
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +178 -0
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  64. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
  65. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +38 -0
  66. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +54 -54
  67. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  68. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +18 -29
  69. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  70. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +37 -34
  71. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  72. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +38 -25
  73. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  74. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +3 -1
  75. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  76. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +2 -0
  77. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  78. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +3 -0
  79. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  80. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +19 -9
  81. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  82. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +28 -21
  83. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  84. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
  85. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  86. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +58 -56
  87. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  88. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
  89. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  90. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +12 -3
  91. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
  92. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +35 -30
  93. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  94. package/lib/{orchestrate/realize/internal/compile.d.ts → agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
  95. package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +6 -6
  96. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
  97. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +26 -12
  98. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  99. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +9 -3
  100. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  101. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +3 -1
  102. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  103. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
  104. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +8 -4
  105. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  106. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  107. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  108. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
  109. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +21 -17
  110. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  111. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
  112. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  113. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +16 -15
  114. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  115. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
  116. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
  117. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +62 -59
  118. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  119. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +2 -2
  120. package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -5
  121. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  122. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +16 -7
  123. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  124. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +20 -8
  125. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  126. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
  127. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  128. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
  129. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  130. package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
  131. package/lib/agent/src/utils/executeCachedBatch.js +23 -0
  132. package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
  133. package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -6
  134. package/lib/context/AutoBeContext.d.ts +1 -0
  135. package/lib/index.mjs +1044 -270
  136. package/lib/index.mjs.map +1 -1
  137. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  138. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
  139. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  140. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  141. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
  142. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +38 -0
  143. package/lib/{agent/src/orchestrate/realize/internal/compile.d.ts → orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
  144. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
  145. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  146. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
  147. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
  148. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  149. package/lib/utils/executeCachedBatch.d.ts +1 -0
  150. package/package.json +6 -6
  151. package/src/AutoBeAgent.ts +4 -3
  152. package/src/AutoBeMockAgent.ts +4 -4
  153. package/src/constants/AutoBeSystemPromptConstant.ts +6 -6
  154. package/src/context/AutoBeContext.ts +1 -0
  155. package/src/factory/consentFunctionCall.ts +4 -3
  156. package/src/factory/createAutoBeContext.ts +9 -6
  157. package/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.ts → transformAnalyzeReviewHistories.ts} +23 -30
  158. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
  159. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +60 -61
  160. package/src/orchestrate/analyze/orchestrateAnalyze.ts +20 -13
  161. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +20 -9
  162. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -11
  163. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -5
  164. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -48
  165. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
  166. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
  167. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -19
  168. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
  169. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
  170. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
  171. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
  172. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
  173. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +31 -30
  174. package/src/orchestrate/interface/orchestrateInterface.ts +4 -2
  175. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +36 -29
  176. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
  177. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
  178. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
  179. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
  180. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +2 -0
  181. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
  182. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
  183. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
  184. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +40 -1
  185. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +57 -55
  186. package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
  187. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
  188. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
  189. package/src/orchestrate/prisma/orchestratePrisma.ts +4 -2
  190. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +2 -0
  191. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
  192. package/src/orchestrate/prisma/orchestratePrismaReview.ts +26 -13
  193. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
  194. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
  195. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +42 -40
  196. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +17 -13
  197. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +14 -5
  198. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +35 -30
  199. package/src/orchestrate/realize/internal/{compile.ts → compileRealizeFiles.ts} +15 -11
  200. package/src/orchestrate/realize/orchestrateRealize.ts +59 -40
  201. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +19 -10
  202. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
  203. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +10 -10
  204. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
  205. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
  206. package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
  207. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
  208. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
  209. package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
  210. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
  211. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
  212. package/src/orchestrate/test/orchestrateTest.ts +7 -9
  213. package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
  214. package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
  215. package/src/orchestrate/test/orchestrateTestWrite.ts +16 -17
  216. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
  217. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
  218. package/src/utils/executeCachedBatch.ts +15 -0
  219. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
  220. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
  221. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
  222. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
@@ -2,13 +2,15 @@ import {
2
2
  AutoBeRealizeAuthorization,
3
3
  AutoBeRealizeFunction,
4
4
  AutoBeRealizeValidateEvent,
5
+ IAutoBeCompiler,
5
6
  IAutoBeTypeScriptCompileResult,
6
7
  } from "@autobe/interface";
7
8
  import { ILlmSchema } from "@samchon/openapi";
9
+ import { v7 } from "uuid";
8
10
 
9
11
  import { AutoBeContext } from "../../../context/AutoBeContext";
10
12
 
11
- export async function compile<Model extends ILlmSchema.Model>(
13
+ export async function compileRealizeFiles<Model extends ILlmSchema.Model>(
12
14
  ctx: AutoBeContext<Model>,
13
15
  props: {
14
16
  authorizations: AutoBeRealizeAuthorization[];
@@ -19,11 +21,14 @@ export async function compile<Model extends ILlmSchema.Model>(
19
21
  const payloads: Record<string, string> = Object.fromEntries(
20
22
  props.authorizations.map((el) => [el.payload.location, el.payload.content]),
21
23
  );
22
- const compiler = await ctx.compiler();
23
- const templateFiles = await compiler.realize.getTemplate();
24
- const nodeModules = prisma?.type === "success" ? prisma.nodeModules : {};
24
+ const compiler: IAutoBeCompiler = await ctx.compiler();
25
+ const templateFiles: Record<string, string> =
26
+ await compiler.realize.getTemplate();
27
+ const nodeModules: Record<string, string> =
28
+ prisma?.type === "success" ? prisma.nodeModules : {};
25
29
 
26
- const filterTsFiles = (location: string) => location.endsWith(".ts");
30
+ const filterTsFiles = (location: string) =>
31
+ location.startsWith("src/") && location.endsWith(".ts");
27
32
 
28
33
  const files: Record<string, string> = {
29
34
  ...nodeModules,
@@ -41,17 +46,17 @@ export async function compile<Model extends ILlmSchema.Model>(
41
46
  ),
42
47
  };
43
48
 
44
- const compiled = await compiler.typescript.compile({
45
- files: files,
46
- });
47
-
49
+ const compiled: IAutoBeTypeScriptCompileResult =
50
+ await compiler.typescript.compile({
51
+ files: files,
52
+ });
48
53
  if (compiled.type === "success") {
49
54
  return compiled;
50
- } else if (compiled.type === "failure") {
51
55
  }
52
56
 
53
57
  const event: AutoBeRealizeValidateEvent = {
54
58
  type: "realizeValidate",
59
+ id: v7(),
55
60
  result: compiled,
56
61
  files: Object.fromEntries(
57
62
  compiled.type === "failure"
@@ -62,6 +67,5 @@ export async function compile<Model extends ILlmSchema.Model>(
62
67
  created_at: new Date().toISOString(),
63
68
  };
64
69
  ctx.dispatch(event);
65
-
66
70
  return compiled;
67
71
  }
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AutoBeAssistantMessageHistory,
3
3
  AutoBeOpenApi,
4
+ AutoBeProgressEventBase,
4
5
  AutoBeRealizeAuthorization,
5
6
  AutoBeRealizeFunction,
6
7
  AutoBeRealizeHistory,
@@ -9,12 +10,13 @@ import {
9
10
  IAutoBeTypeScriptCompileResult,
10
11
  } from "@autobe/interface";
11
12
  import { ILlmSchema } from "@samchon/openapi";
12
- import { v4 } from "uuid";
13
+ import { v7 } from "uuid";
13
14
 
14
15
  import { AutoBeContext } from "../../context/AutoBeContext";
15
16
  import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
17
+ import { executeCachedBatch } from "../../utils/executeCachedBatch";
16
18
  import { predicateStateMessage } from "../../utils/predicateStateMessage";
17
- import { compile } from "./internal/compile";
19
+ import { compileRealizeFiles } from "./internal/compileRealizeFiles";
18
20
  import { orchestrateRealizeAuthorization } from "./orchestrateRealizeAuthorization";
19
21
  import { orchestrateRealizeCorrect } from "./orchestrateRealizeCorrect";
20
22
  import { orchestrateRealizeScenario } from "./orchestrateRealizeScenario";
@@ -40,13 +42,14 @@ export const orchestrateRealize =
40
42
  if (predicate !== null)
41
43
  return ctx.assistantMessage({
42
44
  type: "assistantMessage",
43
- id: v4(),
45
+ id: v7(),
44
46
  created_at: start.toISOString(),
45
47
  text: predicate,
46
48
  completed_at: new Date().toISOString(),
47
49
  });
48
50
  ctx.dispatch({
49
51
  type: "realizeStart",
52
+ id: v7(),
50
53
  created_at: start.toISOString(),
51
54
  reason: props.reason,
52
55
  step: ctx.state().test?.step ?? 0,
@@ -66,14 +69,18 @@ export const orchestrateRealize =
66
69
  return orchestrateRealizeScenario(ctx, operation, authorization);
67
70
  });
68
71
 
69
- const writeProgress = { total: scenarios.length, completed: 0 };
70
- const writeEvents: AutoBeRealizeWriteEvent[] = await Promise.all(
71
- scenarios.map(async (scenario) => {
72
- const code = orchestrateRealizeWrite(ctx, {
72
+ const writeProgress: AutoBeProgressEventBase = {
73
+ total: scenarios.length,
74
+ completed: 0,
75
+ };
76
+ const writeEvents: AutoBeRealizeWriteEvent[] = await executeCachedBatch(
77
+ scenarios.map((scenario) => async (promptCacheKey) => {
78
+ const code = await orchestrateRealizeWrite(ctx, {
73
79
  totalAuthorizations: authorizations,
74
80
  authorization: scenario.decoratorEvent ?? null,
75
81
  scenario,
76
82
  progress: writeProgress,
83
+ promptCacheKey,
77
84
  });
78
85
  return code;
79
86
  }),
@@ -96,12 +103,16 @@ export const orchestrateRealize =
96
103
  };
97
104
  });
98
105
 
99
- let compilation = await compile(ctx, { authorizations, functions });
106
+ let compilation = await compileRealizeFiles(ctx, {
107
+ authorizations,
108
+ functions,
109
+ });
100
110
 
101
111
  if (compilation.type !== "success") {
102
- const MAX_CORRECTION_ATTEMPTS = 3 as const;
112
+ const MAX_CORRECTION_ATTEMPTS = 5 as const;
103
113
 
104
114
  const reviewProgress = {
115
+ id: v7(),
105
116
  total: writeEvents.length,
106
117
  completed: writeEvents.length,
107
118
  };
@@ -117,37 +128,45 @@ export const orchestrateRealize =
117
128
  reviewProgress.total += Object.keys(failedFiles).length;
118
129
  const failure: IAutoBeTypeScriptCompileResult.IFailure = compilation;
119
130
 
120
- await Promise.all(
121
- Object.entries(failedFiles).map(async ([location, content]) => {
122
- const diagnostic:
123
- | IAutoBeTypeScriptCompileResult.IDiagnostic
124
- | undefined = failure.diagnostics.find(
125
- (el) => el.file === location,
126
- );
127
-
128
- const scenario = scenarios.find((el) => el.location === location);
129
- if (diagnostic && scenario) {
130
- const correctEvent = await orchestrateRealizeCorrect(ctx, {
131
- totalAuthorizations: authorizations,
132
- authorization: scenario.decoratorEvent ?? null,
133
- scenario,
134
- code: content,
135
- diagnostic,
136
- progress: reviewProgress,
137
- });
138
-
139
- const corrected = functions.find(
140
- (el) => el.location === correctEvent.location,
141
- );
142
-
143
- if (corrected) {
144
- corrected.content = correctEvent.content;
145
- }
146
- }
147
- }),
131
+ await executeCachedBatch(
132
+ Object.entries(failedFiles).map(
133
+ ([location, content]) =>
134
+ async () => {
135
+ const diagnostic:
136
+ | IAutoBeTypeScriptCompileResult.IDiagnostic
137
+ | undefined = failure.diagnostics.find(
138
+ (el) => el.file === location,
139
+ );
140
+
141
+ const scenario = scenarios.find(
142
+ (el) => el.location === location,
143
+ );
144
+ if (diagnostic && scenario) {
145
+ const correctEvent = await orchestrateRealizeCorrect(ctx, {
146
+ totalAuthorizations: authorizations,
147
+ authorization: scenario.decoratorEvent ?? null,
148
+ scenario,
149
+ code: content,
150
+ diagnostic,
151
+ progress: reviewProgress,
152
+ });
153
+
154
+ const corrected = functions.find(
155
+ (el) => el.location === correctEvent.location,
156
+ );
157
+
158
+ if (corrected) {
159
+ corrected.content = correctEvent.content;
160
+ }
161
+ }
162
+ },
163
+ ),
148
164
  );
149
165
 
150
- compilation = await compile(ctx, { authorizations, functions });
166
+ compilation = await compileRealizeFiles(ctx, {
167
+ authorizations,
168
+ functions,
169
+ });
151
170
  if (compilation.type === "success") {
152
171
  break;
153
172
  }
@@ -162,14 +181,14 @@ export const orchestrateRealize =
162
181
  functions,
163
182
  authorizations,
164
183
  });
165
-
166
184
  return ctx.dispatch({
167
185
  type: "realizeComplete",
186
+ id: v7(),
168
187
  created_at: new Date().toISOString(),
169
188
  functions,
170
189
  authorizations,
171
190
  controllers,
172
- compiled: await compile(ctx, { authorizations, functions }),
191
+ compiled: await compileRealizeFiles(ctx, { authorizations, functions }),
173
192
  step: ctx.state().analyze?.step ?? 0,
174
193
  elapsed: new Date().getTime() - start.getTime(),
175
194
  });
@@ -9,9 +9,11 @@ import {
9
9
  import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
10
10
  import { IPointer } from "tstl";
11
11
  import typia from "typia";
12
+ import { v7 } from "uuid";
12
13
 
13
14
  import { AutoBeContext } from "../../context/AutoBeContext";
14
15
  import { assertSchemaModel } from "../../context/assertSchemaModel";
16
+ import { executeCachedBatch } from "../../utils/executeCachedBatch";
15
17
  import { transformRealizeAuthorizationHistories } from "./histories/transformRealizeAuthorization";
16
18
  import { orchestrateRealizeAuthorizationCorrect } from "./orchestrateRealizeAuthorizationCorrect";
17
19
  import { IAutoBeRealizeAuthorizationApplication } from "./structures/IAutoBeRealizeAuthorizationApplication";
@@ -29,6 +31,7 @@ export async function orchestrateRealizeAuthorization<
29
31
  >(ctx: AutoBeContext<Model>): Promise<AutoBeRealizeAuthorization[]> {
30
32
  ctx.dispatch({
31
33
  type: "realizeAuthorizationStart",
34
+ id: v7(),
32
35
  step: ctx.state().test?.step ?? 0,
33
36
  created_at: new Date().toISOString(),
34
37
  });
@@ -39,20 +42,23 @@ export async function orchestrateRealizeAuthorization<
39
42
  completed: 0,
40
43
  };
41
44
  const templateFiles = await (await ctx.compiler()).realize.getTemplate();
42
- const authorizations: AutoBeRealizeAuthorization[] = await Promise.all(
43
- roles.map((role) =>
44
- process(
45
- ctx,
46
- role,
47
- InternalFileSystem.DEFAULT.map((el) => ({
48
- [el]: templateFiles[el],
49
- })).reduce((acc, cur) => Object.assign(acc, cur), {}),
50
- progress,
51
- ),
45
+ const authorizations: AutoBeRealizeAuthorization[] = await executeCachedBatch(
46
+ roles.map(
47
+ (role) => (promptCacheKey) =>
48
+ process(
49
+ ctx,
50
+ role,
51
+ InternalFileSystem.DEFAULT.map((el) => ({
52
+ [el]: templateFiles[el],
53
+ })).reduce((acc, cur) => Object.assign(acc, cur), {}),
54
+ progress,
55
+ promptCacheKey,
56
+ ),
52
57
  ),
53
58
  );
54
59
  ctx.dispatch({
55
60
  type: "realizeAuthorizationComplete",
61
+ id: v7(),
56
62
  created_at: new Date().toISOString(),
57
63
  step: ctx.state().test?.step ?? 0,
58
64
  });
@@ -64,6 +70,7 @@ async function process<Model extends ILlmSchema.Model>(
64
70
  role: AutoBeAnalyzeRole,
65
71
  templateFiles: Record<string, string>,
66
72
  progress: AutoBeProgressEventBase,
73
+ promptCacheKey: string,
67
74
  ): Promise<AutoBeRealizeAuthorization> {
68
75
  const pointer: IPointer<IAutoBeRealizeAuthorizationApplication.IProps | null> =
69
76
  {
@@ -79,6 +86,7 @@ async function process<Model extends ILlmSchema.Model>(
79
86
  },
80
87
  }),
81
88
  enforceFunctionCall: true,
89
+ promptCacheKey,
82
90
  message: "Create Authorization Provider and Decorator.",
83
91
  });
84
92
  if (pointer.value === null) throw new Error("Failed to create decorator.");
@@ -114,6 +122,7 @@ async function process<Model extends ILlmSchema.Model>(
114
122
 
115
123
  ctx.dispatch({
116
124
  type: "realizeAuthorizationWrite",
125
+ id: v7(),
117
126
  created_at: new Date().toISOString(),
118
127
  authorization: authorization,
119
128
  tokenUsage,
@@ -8,6 +8,7 @@ import {
8
8
  import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
9
9
  import { IPointer } from "tstl";
10
10
  import typia from "typia";
11
+ import { v7 } from "uuid";
11
12
 
12
13
  import { AutoBeContext } from "../../context/AutoBeContext";
13
14
  import { assertSchemaModel } from "../../context/assertSchemaModel";
@@ -58,6 +59,7 @@ export async function orchestrateRealizeAuthorizationCorrect<
58
59
 
59
60
  ctx.dispatch({
60
61
  type: "realizeAuthorizationValidate",
62
+ id: v7(),
61
63
  created_at: new Date().toISOString(),
62
64
  authorization: authorization,
63
65
  result: compiled,
@@ -120,6 +122,7 @@ export async function orchestrateRealizeAuthorizationCorrect<
120
122
  ctx.dispatch({
121
123
  ...pointer.value,
122
124
  type: "realizeAuthorizationCorrect",
125
+ id: v7(),
123
126
  created_at: new Date().toISOString(),
124
127
  authorization: result,
125
128
  result: compiled,
@@ -1,11 +1,14 @@
1
1
  import {
2
+ AutoBeProgressEventBase,
2
3
  AutoBeRealizeAuthorization,
3
4
  AutoBeRealizeCorrectEvent,
4
5
  IAutoBeTypeScriptCompileResult,
5
6
  } from "@autobe/interface";
7
+ import { StringUtil } from "@autobe/utils";
6
8
  import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
7
9
  import { IPointer } from "tstl";
8
10
  import typia from "typia";
11
+ import { v7 } from "uuid";
9
12
 
10
13
  import { AutoBeContext } from "../../context/AutoBeContext";
11
14
  import { assertSchemaModel } from "../../context/assertSchemaModel";
@@ -24,7 +27,7 @@ export async function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(
24
27
  scenario: IAutoBeRealizeScenarioApplication.IProps;
25
28
  code: string;
26
29
  diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
27
- progress: IProgress;
30
+ progress: AutoBeProgressEventBase;
28
31
  },
29
32
  ): Promise<AutoBeRealizeCorrectEvent> {
30
33
  const artifacts: IAutoBeTestScenarioArtifacts =
@@ -54,10 +57,11 @@ export async function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(
54
57
  totalAuthorizations: props.totalAuthorizations,
55
58
  }),
56
59
  enforceFunctionCall: true,
57
- message: [
58
- `Correct the TypeScript code implementation to strictly follow these rules:`,
59
- `1. Ensure that the code is production-ready and follows best practices.`,
60
- ].join("\n"),
60
+ message: StringUtil.trim`
61
+ Correct the TypeScript code implementation to strictly follow these rules:
62
+
63
+ 1. Ensure that the code is production-ready and follows best practices.
64
+ `,
61
65
  });
62
66
 
63
67
  if (pointer.value === null)
@@ -71,6 +75,7 @@ export async function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(
71
75
 
72
76
  const event: AutoBeRealizeCorrectEvent = {
73
77
  type: "realizeCorrect",
78
+ id: v7(),
74
79
  location: props.scenario.location,
75
80
  content: pointer.value.implementationCode,
76
81
  tokenUsage,
@@ -115,8 +120,3 @@ const collection = {
115
120
  deepseek: claude,
116
121
  "3.1": claude,
117
122
  };
118
-
119
- export interface IProgress {
120
- total: number;
121
- completed: number;
122
- }
@@ -4,80 +4,6 @@ import { ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeContext } from "../../context/AutoBeContext";
5
5
  import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
6
6
 
7
- export interface IAutoBeRealizeScenario {
8
- /**
9
- * The name of the function to be generated.
10
- *
11
- * Derived from the Swagger path and method. The function name must be written
12
- * in snake_case. It serves as the entry point in both code generation and
13
- * test code.
14
- *
15
- * Once the function is generated, the function name and file name will be the
16
- * same. The generated file will be located at
17
- * `src/providers/${function_name}.ts`.
18
- */
19
- functionName: string;
20
-
21
- /**
22
- * Definition of path and query parameters extracted from the OpenAPI spec.
23
- *
24
- * Includes input values passed via URL path or query string. Used for type
25
- * definitions, validation, and function signature construction.
26
- */
27
- parameters: AutoBeOpenApi.IParameter[];
28
-
29
- /**
30
- * Schema definition for the request body input.
31
- *
32
- * Extracted from the requestBody section of Swagger. Represents the input
33
- * data passed in the body (e.g., JSON). Used for generating function
34
- * arguments or DTOs.
35
- */
36
- inputSchema: AutoBeOpenApi.IRequestBody | null;
37
-
38
- /**
39
- * Schema definition for the response body.
40
- *
41
- * Extracted from the responses section of Swagger. Used to define the return
42
- * type and expected output in test code.
43
- */
44
- outputSchema: AutoBeOpenApi.IResponseBody | null;
45
-
46
- /**
47
- * Natural language description of the function’s purpose.
48
- *
49
- * Extracted from the summary or description field of Swagger. Used for code
50
- * documentation, test scenario generation, and conveying function intent.
51
- */
52
- description: string;
53
-
54
- /**
55
- * HTTP method information.
56
- *
57
- * Extracted from the Swagger operation method. Used to define the request
58
- * type during code and test generation.
59
- */
60
- method: "get" | "post" | "put" | "delete" | "patch";
61
-
62
- /**
63
- * List of scenario descriptions for test code generation.
64
- *
65
- * Each scenario describes the expected behavior of the function under certain
66
- * conditions. Used as a basis for TDD-style automated test generation.
67
- */
68
- testScenarios: string[];
69
-
70
- /**
71
- * Optional decorator event for customizing code generation behavior.
72
- *
73
- * Provides additional metadata or instructions that can modify how the
74
- * function implementation is generated. Can include custom annotations,
75
- * middleware configurations, or special handling directives that affect the
76
- * final code output.
77
- */
78
- decoratorEvent?: AutoBeRealizeAuthorization;
79
- }
80
-
81
7
  /**
82
8
  * Generates a planning result that defines what kind of function should be
83
9
  * created, based solely on the provided Swagger (OpenAPI) operation — without
@@ -1,10 +1,13 @@
1
1
  import {
2
+ AutoBeProgressEventBase,
2
3
  AutoBeRealizeAuthorization,
3
4
  AutoBeRealizeWriteEvent,
4
5
  } from "@autobe/interface";
6
+ import { StringUtil } from "@autobe/utils";
5
7
  import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
6
8
  import { IPointer } from "tstl";
7
9
  import typia from "typia";
10
+ import { v7 } from "uuid";
8
11
 
9
12
  import { AutoBeContext } from "../../context/AutoBeContext";
10
13
  import { assertSchemaModel } from "../../context/assertSchemaModel";
@@ -21,7 +24,8 @@ export async function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(
21
24
  totalAuthorizations: AutoBeRealizeAuthorization[];
22
25
  authorization: AutoBeRealizeAuthorization | null;
23
26
  scenario: IAutoBeRealizeScenarioApplication.IProps;
24
- progress: IProgress;
27
+ progress: AutoBeProgressEventBase;
28
+ promptCacheKey: string;
25
29
  },
26
30
  ): Promise<AutoBeRealizeWriteEvent> {
27
31
  const artifacts: IAutoBeTestScenarioArtifacts =
@@ -48,23 +52,24 @@ export async function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(
48
52
  },
49
53
  }),
50
54
  enforceFunctionCall: true,
51
- message: [
52
- `Write complete, production-ready TypeScript code that strictly follows these rules:`,
53
- "",
54
- `DO NOT:`,
55
- `- Use the native \`Date\` type anywhere`,
56
- `- Use \`as\` for type assertions`,
57
- ``,
58
- `DO:`,
59
- `- Write all date/datetime values as \`string & tags.Format<'date-time'>\``,
60
- `- Generate UUIDs using \`v4()\` and type as \`string & tags.Format<'uuid'>\``,
61
- `- Resolve types properly without assertions`,
62
- `- Type all functions with clear parameter and return types`,
63
- `6. Do not skip validations or default values where necessary.`,
64
- `7. Follow functional, immutable, and consistent code structure.`,
65
- "",
66
- `Use \`@nestia/e2e\` test structure if relevant.`,
67
- ].join("\n"),
55
+ promptCacheKey: props.promptCacheKey,
56
+ message: StringUtil.trim`
57
+ Write complete, production-ready TypeScript code that strictly follows these rules:
58
+
59
+ DO NOT:
60
+ - Use the native \`Date\` type anywhere
61
+ - Use \`as\` for type assertions
62
+
63
+ DO:
64
+ - Write all date/datetime values as \`string & tags.Format<'date-time'>\`
65
+ - Generate UUIDs using \`v4()\` and type as \`string & tags.Format<'uuid'>\`
66
+ - Resolve types properly without assertions
67
+ - Type all functions with clear parameter and return types
68
+ 6. Do not skip validations or default values where necessary.
69
+ 7. Follow functional, immutable, and consistent code structure.
70
+
71
+ Use \`@nestia/e2e\` test structure if relevant.
72
+ `,
68
73
  });
69
74
  if (pointer.value === null) throw new Error("Failed to write code.");
70
75
 
@@ -76,6 +81,7 @@ export async function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(
76
81
 
77
82
  const event: AutoBeRealizeWriteEvent = {
78
83
  type: "realizeWrite",
84
+ id: v7(),
79
85
  location: props.scenario.location,
80
86
  content: pointer.value.implementationCode,
81
87
  tokenUsage,
@@ -121,8 +127,3 @@ const collection = {
121
127
  deepseek: claude,
122
128
  "3.1": claude,
123
129
  };
124
-
125
- export interface IProgress {
126
- total: number;
127
- completed: number;
128
- }
@@ -1,3 +1,5 @@
1
+ import { StringUtil } from "@autobe/utils";
2
+
1
3
  import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
2
4
 
3
5
  export function completeTestCode(
@@ -18,18 +20,20 @@ export function completeTestCode(
18
20
  'string & Format<"uuid">',
19
21
  'string & tags.Format<"uuid">',
20
22
  );
21
- code = [
22
- `import { ArrayUtil, RandomGenerator, TestValidator } from "@nestia/e2e";`,
23
- `import { IConnection } from "@nestia/fetcher";`,
24
- `import typia, { tags } from "typia";`,
25
- "",
26
- `import api from "@ORGANIZATION/PROJECT-api";`,
27
- ...typeReferences.map(
28
- (ref) =>
29
- `import type { ${ref} } from "@ORGANIZATION/PROJECT-api/lib/structures/${ref}";`,
30
- ),
31
- "",
32
- code,
33
- ].join("\n");
23
+ code = StringUtil.trim`
24
+ import { ArrayUtil, RandomGenerator, TestValidator } from "@nestia/e2e";
25
+ import { IConnection } from "@nestia/fetcher";
26
+ import typia, { tags } from "typia";
27
+
28
+ import api from "@ORGANIZATION/PROJECT-api";
29
+ ${typeReferences
30
+ .map(
31
+ (ref) =>
32
+ `import type { ${ref} } from "@ORGANIZATION/PROJECT-api/lib/structures/${ref}";`,
33
+ )
34
+ .join("\n")}
35
+
36
+ ${code}
37
+ `;
34
38
  return code;
35
39
  }
@@ -1,6 +1,6 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
3
- import { v4 } from "uuid";
3
+ import { v7 } from "uuid";
4
4
 
5
5
  import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
6
6
  import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
@@ -14,13 +14,13 @@ export const transformTestCorrectHistories = (
14
14
  > => {
15
15
  return [
16
16
  {
17
- id: v4(),
17
+ id: v7(),
18
18
  created_at: new Date().toISOString(),
19
19
  type: "systemMessage",
20
20
  text: AutoBeSystemPromptConstant.TEST_WRITE,
21
21
  },
22
22
  {
23
- id: v4(),
23
+ id: v7(),
24
24
  created_at: new Date().toISOString(),
25
25
  type: "assistantMessage",
26
26
  text: [
@@ -43,7 +43,7 @@ export const transformTestCorrectHistories = (
43
43
  ].join("\n"),
44
44
  },
45
45
  {
46
- id: v4(),
46
+ id: v7(),
47
47
  created_at: new Date().toISOString(),
48
48
  type: "systemMessage",
49
49
  text: AutoBeSystemPromptConstant.TEST_CORRECT,