@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
@@ -71,6 +71,7 @@ export namespace AutoBeContext {
71
71
  histories: Array<IMicroAgenticaHistoryJson>;
72
72
  enforceFunctionCall: boolean;
73
73
  message: string;
74
+ promptCacheKey?: string;
74
75
  }
75
76
  export interface IResult<Model extends ILlmSchema.Model> {
76
77
  histories: MicroAgenticaHistory<Model>[];
@@ -10,7 +10,7 @@ import {
10
10
  } from "@autobe/interface";
11
11
  import { IPointer } from "tstl";
12
12
  import typia from "typia";
13
- import { v4 } from "uuid";
13
+ import { v7 } from "uuid";
14
14
 
15
15
  import { AutoBeSystemPromptConstant } from "../constants/AutoBeSystemPromptConstant";
16
16
  import { IAutoBeConfig } from "../structures/IAutoBeConfig";
@@ -37,13 +37,13 @@ export const consentFunctionCall = async (props: {
37
37
  },
38
38
  histories: [
39
39
  {
40
- id: v4(),
40
+ id: v7(),
41
41
  type: "systemMessage",
42
42
  text: AutoBeSystemPromptConstant.CONSENT_FUNCTION_CALL,
43
43
  created_at: new Date().toISOString(),
44
44
  } satisfies IAgenticaHistoryJson.ISystemMessage,
45
45
  {
46
- id: v4(),
46
+ id: v7(),
47
47
  type: "assistantMessage",
48
48
  text: props.assistantMessage,
49
49
  created_at: new Date().toISOString(),
@@ -79,6 +79,7 @@ export const consentFunctionCall = async (props: {
79
79
  }
80
80
  props.dispatch({
81
81
  type: "consentFunctionCall",
82
+ id: v7(),
82
83
  source: props.source,
83
84
  assistantMessage: props.assistantMessage,
84
85
  result: pointer.value,
@@ -25,7 +25,7 @@ import {
25
25
  } from "@autobe/interface";
26
26
  import { ILlmSchema } from "@samchon/openapi";
27
27
  import typia from "typia";
28
- import { v4 } from "uuid";
28
+ import { v7 } from "uuid";
29
29
 
30
30
  import { AutoBeContext } from "../context/AutoBeContext";
31
31
  import { AutoBeState } from "../context/AutoBeState";
@@ -82,6 +82,8 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
82
82
  event.body.tool_choice = "required";
83
83
  if (event.body.parallel_tool_calls !== undefined)
84
84
  delete event.body.parallel_tool_calls;
85
+ if (next.promptCacheKey)
86
+ event.body.prompt_cache_key = next.promptCacheKey;
85
87
  await props.dispatch({
86
88
  ...event,
87
89
  type: "vendorRequest",
@@ -109,6 +111,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
109
111
  void props
110
112
  .dispatch({
111
113
  type: "jsonValidateError",
114
+ id: v7(),
112
115
  source: next.source,
113
116
  result: event.result,
114
117
  created_at: event.created_at,
@@ -218,7 +221,7 @@ const createDispatch = (props: {
218
221
  event,
219
222
  history: {
220
223
  type: "analyze",
221
- id: v4(),
224
+ id: v7(),
222
225
  reason: analyzeStart?.reason ?? "",
223
226
  prefix: event.prefix,
224
227
  roles: event.roles,
@@ -236,7 +239,7 @@ const createDispatch = (props: {
236
239
  event,
237
240
  history: {
238
241
  type: "prisma",
239
- id: v4(),
242
+ id: v7(),
240
243
  reason: prismaStart?.reason ?? "",
241
244
  schemas: event.schemas,
242
245
  result: event.result,
@@ -254,7 +257,7 @@ const createDispatch = (props: {
254
257
  event,
255
258
  history: {
256
259
  type: "interface",
257
- id: v4(),
260
+ id: v7(),
258
261
  reason: interfaceStart?.reason ?? "",
259
262
  authorizations: event.authorizations,
260
263
  document: event.document,
@@ -271,7 +274,7 @@ const createDispatch = (props: {
271
274
  event,
272
275
  history: {
273
276
  type: "test",
274
- id: v4(),
277
+ id: v7(),
275
278
  reason: testStart?.reason ?? "",
276
279
  files: event.files,
277
280
  compiled: event.compiled,
@@ -288,7 +291,7 @@ const createDispatch = (props: {
288
291
  event,
289
292
  history: {
290
293
  type: "realize",
291
- id: v4(),
294
+ id: v7(),
292
295
  reason: realizeStart?.reason ?? "",
293
296
  authorizations: event.authorizations,
294
297
  functions: event.functions,
@@ -1,19 +1,18 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
3
3
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
4
+ import { StringUtil } from "@autobe/utils";
4
5
  import { ILlmSchema } from "@samchon/openapi";
5
- import { v4 } from "uuid";
6
+ import { v7 } from "uuid";
6
7
 
7
8
  import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
8
9
  import { AutoBeContext } from "../../../context/AutoBeContext";
9
10
  import { transformAnalyzeWriteHistories } from "./transformAnalyzeWriteHistories";
10
11
 
11
- export const transformAnalyzeReviewerHistories = <
12
- Model extends ILlmSchema.Model,
13
- >(
12
+ export const transformAnalyzeReviewHistories = <Model extends ILlmSchema.Model>(
14
13
  ctx: AutoBeContext<Model>,
15
14
  scenario: AutoBeAnalyzeScenarioEvent,
16
- otherFiles: AutoBeAnalyzeFile[],
15
+ allFiles: AutoBeAnalyzeFile[],
17
16
  myFile: AutoBeAnalyzeFile,
18
17
  ): Array<
19
18
  | IAgenticaHistoryJson.IUserMessage
@@ -21,40 +20,34 @@ export const transformAnalyzeReviewerHistories = <
21
20
  | IAgenticaHistoryJson.ISystemMessage
22
21
  > => {
23
22
  return [
24
- ...transformAnalyzeWriteHistories(ctx, scenario, myFile),
23
+ ...transformAnalyzeWriteHistories(ctx, scenario, myFile).slice(0, -1),
25
24
  {
26
- id: v4(),
25
+ id: v7(),
27
26
  created_at: new Date().toISOString(),
28
- type: "assistantMessage",
29
- text: [
30
- "Here are the other documents written in other agents:",
31
- "",
32
- "```json",
33
- JSON.stringify(otherFiles),
34
- "```",
35
- "",
36
- "And here is the target document to review what you have written:",
37
- "",
38
- "```json",
39
- JSON.stringify(myFile),
40
- "```",
41
- ].join("\n"),
27
+ type: "systemMessage",
28
+ text: AutoBeSystemPromptConstant.ANALYZE_REVIEW,
42
29
  },
43
30
  {
44
- id: v4(),
31
+ id: v7(),
45
32
  created_at: new Date().toISOString(),
46
- type: "systemMessage",
47
- text: AutoBeSystemPromptConstant.ANALYZE_REVIEW,
33
+ type: "assistantMessage",
34
+ text: StringUtil.trim`
35
+ Here are the all documents written:
36
+
37
+ \`\`\`json
38
+ ${JSON.stringify(allFiles)}
39
+ \`\`\`
40
+ `,
48
41
  },
49
42
  {
50
- id: v4(),
43
+ id: v7(),
51
44
  created_at: new Date().toISOString(),
52
45
  type: "assistantMessage",
53
- text: [
54
- `Review the ${myFile.filename} document.`,
55
- "",
56
- "Note that, never review others.",
57
- ].join("\n"),
46
+ text: StringUtil.trim`
47
+ Review the ${myFile.filename} document.
48
+
49
+ Note that, never review others.
50
+ `,
58
51
  },
59
52
  ];
60
53
  };
@@ -1,6 +1,7 @@
1
1
  import { IMicroAgenticaHistoryJson } from "@agentica/core";
2
+ import { StringUtil } from "@autobe/utils";
2
3
  import { ILlmSchema } from "@samchon/openapi";
3
- import { v4 } from "uuid";
4
+ import { v7 } from "uuid";
4
5
 
5
6
  import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
6
7
  import { AutoBeContext } from "../../../context/AutoBeContext";
@@ -13,21 +14,23 @@ export function transformAnalyzeSceHistories<Model extends ILlmSchema.Model>(
13
14
  .histories()
14
15
  .filter((h) => h.type === "userMessage" || h.type === "assistantMessage"),
15
16
  {
16
- id: v4(),
17
+ id: v7(),
17
18
  type: "systemMessage",
18
19
  text: AutoBeSystemPromptConstant.ANALYZE_SCENARIO,
19
20
  created_at: new Date().toISOString(),
20
21
  },
21
22
  {
22
- id: v4(),
23
+ id: v7(),
23
24
  type: "systemMessage",
24
- text: [
25
- "One agent per page of the document you specify will write according to the instructions below.",
26
- "You should also refer to the content to define the document list.",
27
- "```",
28
- AutoBeSystemPromptConstant.ANALYZE_WRITE,
29
- "```",
30
- ].join("\n"),
25
+ text: StringUtil.trim`
26
+ > One agent per page of the document you specify will
27
+ > write according to the instructions below. You should also refer
28
+ > to the content to define the document list.
29
+
30
+ ----------------------
31
+
32
+ ${AutoBeSystemPromptConstant.ANALYZE_WRITE}
33
+ `,
31
34
  created_at: new Date().toISOString(),
32
35
  },
33
36
  ];
@@ -1,8 +1,9 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
3
3
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
4
+ import { StringUtil } from "@autobe/utils";
4
5
  import { ILlmSchema } from "@samchon/openapi";
5
- import { v4 } from "uuid";
6
+ import { v7 } from "uuid";
6
7
 
7
8
  import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
8
9
  import { AutoBeContext } from "../../../context/AutoBeContext";
@@ -15,64 +16,62 @@ export const transformAnalyzeWriteHistories = <Model extends ILlmSchema.Model>(
15
16
  | IAgenticaHistoryJson.IUserMessage
16
17
  | IAgenticaHistoryJson.IAssistantMessage
17
18
  | IAgenticaHistoryJson.ISystemMessage
18
- > => {
19
- return [
20
- ...ctx
21
- .histories()
22
- .filter((h) => h.type === "userMessage" || h.type === "assistantMessage")
23
- .map((h) => {
24
- const text =
25
- h.type === "userMessage"
26
- ? h.contents
27
- .filter((el) => el.type === "text")
28
- .map((el) => el.text)
29
- .join("\n")
30
- : h.text;
19
+ > => [
20
+ ...ctx
21
+ .histories()
22
+ .filter((h) => h.type === "userMessage" || h.type === "assistantMessage")
23
+ .map((h) => {
24
+ const text =
25
+ h.type === "userMessage"
26
+ ? h.contents
27
+ .filter((el) => el.type === "text")
28
+ .map((el) => el.text)
29
+ .join("\n")
30
+ : h.text;
31
+ return {
32
+ ...h,
33
+ text,
34
+ };
35
+ }),
36
+ {
37
+ id: v7(),
38
+ created_at: new Date().toISOString(),
39
+ type: "systemMessage",
40
+ text: AutoBeSystemPromptConstant.ANALYZE_WRITE,
41
+ },
42
+ {
43
+ id: v7(),
44
+ created_at: new Date().toISOString(),
45
+ type: "assistantMessage",
46
+ text: StringUtil.trim`
47
+ ## Language
48
+
49
+ The language of the document is ${JSON.stringify(scenario.language ?? "en-US")}.
50
+
51
+ ## Metadata
52
+
53
+ Prefix name of the service to create is ${scenario.prefix}
54
+ and here is the list of the roles to reference.
55
+
56
+ \`\`\`json
57
+ ${JSON.stringify(scenario.roles)}
58
+ \`\`\`
59
+
60
+ Here is the entire list of the documents that would be published
61
+ in someday, and your role is to writing a document of them:
62
+
63
+ ## The other documents that would be published in someday
31
64
 
32
- return {
33
- ...h,
34
- text,
35
- };
36
- }),
37
- {
38
- id: v4(),
39
- created_at: new Date().toISOString(),
40
- type: "systemMessage",
41
- text: AutoBeSystemPromptConstant.ANALYZE_WRITE,
42
- },
43
- {
44
- id: v4(),
45
- created_at: new Date().toISOString(),
46
- type: "assistantMessage",
47
- text: [
48
- "## Metadata",
49
- "",
50
- `Prefix name of the service to create is ${scenario.prefix},`,
51
- "and here is the list of the roles to reference:",
52
- "",
53
- "```json",
54
- JSON.stringify(scenario.roles),
55
- "```",
56
- "",
57
- "Here is the entire list of the documents that would be published",
58
- "in someday, and your role is to writing a document of them:",
59
- "",
60
- "## The other documents that would be published in someday",
61
- "```json",
62
- JSON.stringify(
63
- scenario.files.filter((f) => f.filename !== file.filename),
64
- ),
65
- "```",
66
- "",
67
- "## The document to write",
68
- "```json",
69
- JSON.stringify(file),
70
- "```",
71
- "",
72
- "## Language",
73
- "",
74
- `The language of the document is ${scenario.language ?? "en-US"}.`,
75
- ].join("\n"),
76
- },
77
- ];
78
- };
65
+ \`\`\`json
66
+ ${JSON.stringify(
67
+ scenario.files.filter((f) => f.filename !== file.filename),
68
+ )}
69
+ \`\`\`
70
+
71
+ ## The document to write
72
+ \`\`\`json
73
+ ${JSON.stringify(file)}
74
+ \`\`\`
75
+ `,
76
+ },
77
+ ];
@@ -8,9 +8,11 @@ import {
8
8
  } from "@autobe/interface";
9
9
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
10
10
  import { ILlmSchema } from "@samchon/openapi";
11
+ import { v7 } from "uuid";
11
12
 
12
13
  import { AutoBeContext } from "../../context/AutoBeContext";
13
14
  import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
15
+ import { executeCachedBatch } from "../../utils/executeCachedBatch";
14
16
  import { orchestrateAnalyzeReview } from "./orchestrateAnalyzeReview";
15
17
  import { orchestrateAnalyzeScenario } from "./orchestrateAnalyzeScenario";
16
18
  import { orchestrateAnalyzeWrite } from "./orchestrateAnalyzeWrite";
@@ -26,6 +28,7 @@ export const orchestrateAnalyze =
26
28
 
27
29
  ctx.dispatch({
28
30
  type: "analyzeStart",
31
+ id: v7(),
29
32
  reason: props.reason,
30
33
  step,
31
34
  created_at: startTime.toISOString(),
@@ -43,13 +46,16 @@ export const orchestrateAnalyze =
43
46
  total: scenario.files.length,
44
47
  completed: 0,
45
48
  };
46
- const fileList: AutoBeAnalyzeFile[] = await Promise.all(
47
- scenario.files.map(async (file) => {
49
+ const fileList: AutoBeAnalyzeFile[] = await executeCachedBatch(
50
+ scenario.files.map((file) => async (promptCacheKey) => {
48
51
  const event: AutoBeAnalyzeWriteEvent = await orchestrateAnalyzeWrite(
49
52
  ctx,
50
- scenario,
51
- file,
52
- writeProgress,
53
+ {
54
+ scenario,
55
+ file,
56
+ progress: writeProgress,
57
+ promptCacheKey,
58
+ },
53
59
  );
54
60
  return event.file;
55
61
  }),
@@ -60,17 +66,17 @@ export const orchestrateAnalyze =
60
66
  total: fileList.length,
61
67
  completed: 0,
62
68
  };
63
- const newFiles: AutoBeAnalyzeFile[] = await Promise.all(
64
- fileList.map(async (file, i) => {
69
+ const newFiles: AutoBeAnalyzeFile[] = await executeCachedBatch(
70
+ fileList.map((file) => async (promptCacheKey) => {
65
71
  try {
66
72
  const event: AutoBeAnalyzeReviewEvent =
67
- await orchestrateAnalyzeReview(
68
- ctx,
73
+ await orchestrateAnalyzeReview(ctx, {
69
74
  scenario,
70
- fileList.filter((_, j) => j !== i), // other files
71
- file,
72
- reviewProgress,
73
- );
75
+ allFiles: fileList, // all files
76
+ myFile: file,
77
+ progress: reviewProgress,
78
+ promptCacheKey,
79
+ });
74
80
  return {
75
81
  ...event.file,
76
82
  content: event.content,
@@ -84,6 +90,7 @@ export const orchestrateAnalyze =
84
90
  // Complete the analysis
85
91
  return ctx.dispatch({
86
92
  type: "analyzeComplete",
93
+ id: v7(),
87
94
  roles: scenario.roles,
88
95
  prefix: scenario.prefix,
89
96
  files: newFiles,
@@ -8,18 +8,22 @@ import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/Auto
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";
14
- import { transformAnalyzeReviewerHistories } from "./histories/transformAnalyzeReviewerHistories";
15
+ import { transformAnalyzeReviewHistories } from "./histories/transformAnalyzeReviewHistories";
15
16
  import { IAutoBeAnalyzeReviewApplication } from "./structures/IAutoBeAnalyzeReviewApplication";
16
17
 
17
18
  export const orchestrateAnalyzeReview = async <Model extends ILlmSchema.Model>(
18
19
  ctx: AutoBeContext<Model>,
19
- scenario: AutoBeAnalyzeScenarioEvent,
20
- otherFiles: AutoBeAnalyzeFile[],
21
- myFile: AutoBeAnalyzeFile,
22
- progress: AutoBeProgressEventBase,
20
+ props: {
21
+ scenario: AutoBeAnalyzeScenarioEvent;
22
+ allFiles: AutoBeAnalyzeFile[];
23
+ myFile: AutoBeAnalyzeFile;
24
+ progress: AutoBeProgressEventBase;
25
+ promptCacheKey: string;
26
+ },
23
27
  ): Promise<AutoBeAnalyzeReviewEvent> => {
24
28
  const pointer: IPointer<IAutoBeAnalyzeReviewApplication.IProps | null> = {
25
29
  value: null,
@@ -31,9 +35,15 @@ export const orchestrateAnalyzeReview = async <Model extends ILlmSchema.Model>(
31
35
  pointer,
32
36
  }),
33
37
  histories: [
34
- ...transformAnalyzeReviewerHistories(ctx, scenario, otherFiles, myFile),
38
+ ...transformAnalyzeReviewHistories(
39
+ ctx,
40
+ props.scenario,
41
+ props.allFiles,
42
+ props.myFile,
43
+ ),
35
44
  ],
36
45
  enforceFunctionCall: true,
46
+ promptCacheKey: props.promptCacheKey,
37
47
  message: "Review the requirement document",
38
48
  });
39
49
  if (pointer.value === null)
@@ -41,13 +51,14 @@ export const orchestrateAnalyzeReview = async <Model extends ILlmSchema.Model>(
41
51
 
42
52
  const event: AutoBeAnalyzeReviewEvent = {
43
53
  type: "analyzeReview",
44
- file: myFile,
54
+ id: v7(),
55
+ file: props.myFile,
45
56
  plan: pointer.value.plan,
46
57
  review: pointer.value.review,
47
58
  content: pointer.value.content,
48
59
  tokenUsage,
49
- total: progress.total,
50
- completed: ++progress.completed,
60
+ total: props.progress.total,
61
+ completed: ++props.progress.completed,
51
62
  step: (ctx.state().analyze?.step ?? -1) + 1,
52
63
  created_at: new Date().toISOString(),
53
64
  };
@@ -6,10 +6,11 @@ import {
6
6
  AutoBeAnalyzeScenarioEvent,
7
7
  AutoBeAssistantMessageHistory,
8
8
  } from "@autobe/interface";
9
+ import { StringUtil } from "@autobe/utils";
9
10
  import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
10
11
  import { IPointer } from "tstl";
11
12
  import typia from "typia";
12
- import { v4 } from "uuid";
13
+ import { v7 } from "uuid";
13
14
 
14
15
  import { AutoBeContext } from "../../context/AutoBeContext";
15
16
  import { assertSchemaModel } from "../../context/assertSchemaModel";
@@ -29,23 +30,23 @@ export const orchestrateAnalyzeScenario = async <
29
30
  source: "analyzeScenario",
30
31
  controller: createController<Model>({
31
32
  model: ctx.model,
32
- pointer,
33
+ build: (value) => (pointer.value = value),
33
34
  }),
34
35
  histories: transformAnalyzeSceHistories(ctx),
35
36
  enforceFunctionCall: false,
36
- message: [
37
- `Design a complete list of documents and user roles for this project.`,
38
- `Define user roles that can authenticate via API and create appropriate documentation files.`,
39
- `You must respect the number of documents specified by the user.`,
40
- `Note that the user's locale is in ${ctx.locale}.`,
41
- ].join("\n"),
37
+ message: StringUtil.trim`
38
+ Design a complete list of documents and user roles for this project.
39
+ Define user roles that can authenticate via API and create appropriate documentation files.
40
+ You must respect the number of documents specified by the user.
41
+ Note that the user's locale is in ${ctx.locale}.
42
+ `,
42
43
  });
43
44
  if (histories.at(-1)?.type === "assistantMessage")
44
45
  return {
45
46
  ...(histories.at(-1)! as AgenticaAssistantMessageHistory),
46
47
  created_at: start.toISOString(),
47
48
  completed_at: new Date().toISOString(),
48
- id: v4(),
49
+ id: v7(),
49
50
  } satisfies AutoBeAssistantMessageHistory;
50
51
  else if (pointer.value === null) {
51
52
  // unreachable
@@ -53,6 +54,7 @@ export const orchestrateAnalyzeScenario = async <
53
54
  }
54
55
  return {
55
56
  type: "analyzeScenario",
57
+ id: v7(),
56
58
  prefix: pointer.value.prefix,
57
59
  language: pointer.value.language,
58
60
  roles: pointer.value.roles,
@@ -65,7 +67,7 @@ export const orchestrateAnalyzeScenario = async <
65
67
 
66
68
  function createController<Model extends ILlmSchema.Model>(props: {
67
69
  model: Model;
68
- pointer: IPointer<IAutoBeAnalyzeScenarioApplication.IProps | null>;
70
+ build: (value: IAutoBeAnalyzeScenarioApplication.IProps) => void;
69
71
  }): IAgenticaController.IClass<Model> {
70
72
  assertSchemaModel(props.model);
71
73
  const application: ILlmApplication<Model> = collection[
@@ -77,7 +79,7 @@ function createController<Model extends ILlmSchema.Model>(props: {
77
79
  application,
78
80
  execute: {
79
81
  compose: (input) => {
80
- props.pointer.value = input;
82
+ props.build(input);
81
83
  },
82
84
  } satisfies IAutoBeAnalyzeScenarioApplication,
83
85
  };
@@ -2,11 +2,13 @@ import { IAgenticaController } from "@agentica/core";
2
2
  import {
3
3
  AutoBeAnalyzeScenarioEvent,
4
4
  AutoBeAnalyzeWriteEvent,
5
+ AutoBeProgressEventBase,
5
6
  } from "@autobe/interface";
6
7
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
7
8
  import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
8
9
  import { IPointer } from "tstl";
9
10
  import typia from "typia";
11
+ import { v7 } from "uuid";
10
12
 
11
13
  import { AutoBeContext } from "../../context/AutoBeContext";
12
14
  import { assertSchemaModel } from "../../context/assertSchemaModel";
@@ -15,13 +17,14 @@ import { IAutoBeAnalyzeWriteApplication } from "./structures/IAutoBeAnalyzeWrite
15
17
 
16
18
  export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
17
19
  ctx: AutoBeContext<Model>,
18
- scenario: AutoBeAnalyzeScenarioEvent,
19
- file: AutoBeAnalyzeFile.Scenario,
20
- progress: {
21
- total: number;
22
- completed: number;
20
+ props: {
21
+ scenario: AutoBeAnalyzeScenarioEvent;
22
+ file: AutoBeAnalyzeFile.Scenario;
23
+ progress: AutoBeProgressEventBase;
24
+ promptCacheKey: string;
23
25
  },
24
26
  ): Promise<AutoBeAnalyzeWriteEvent> => {
27
+ const { scenario, file, progress, promptCacheKey } = props;
25
28
  const pointer: IPointer<IAutoBeAnalyzeWriteApplication.IProps | null> = {
26
29
  value: null,
27
30
  };
@@ -33,6 +36,7 @@ export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
33
36
  }),
34
37
  histories: transformAnalyzeWriteHistories(ctx, scenario, file),
35
38
  enforceFunctionCall: true,
39
+ promptCacheKey,
36
40
  message: "Write requirement analysis report.",
37
41
  });
38
42
  if (pointer.value === null) {
@@ -42,6 +46,7 @@ export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
42
46
 
43
47
  const event: AutoBeAnalyzeWriteEvent = {
44
48
  type: "analyzeWrite",
49
+ id: v7(),
45
50
  file: {
46
51
  ...file,
47
52
  content: pointer.value.content,