@autobe/agent 0.30.4 → 0.30.5

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 (210) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
  4. package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
  5. package/lib/index.mjs +2918 -2842
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
  8. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
  9. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  10. package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
  11. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
  12. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
  13. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
  14. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
  15. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
  16. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
  17. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
  18. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
  19. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
  21. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
  22. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
  23. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
  24. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
  25. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
  26. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
  27. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
  28. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
  29. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
  30. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
  31. package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
  32. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
  33. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
  34. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
  35. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
  36. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
  37. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
  38. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
  39. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
  40. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
  41. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
  42. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
  43. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
  44. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
  45. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
  46. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
  47. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
  48. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
  49. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
  50. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
  51. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
  52. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
  53. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
  54. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
  55. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
  56. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
  57. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
  58. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
  59. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
  60. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
  61. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
  62. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
  64. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
  65. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  66. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
  67. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
  68. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
  69. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
  70. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
  71. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
  72. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
  73. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
  74. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
  75. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
  76. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
  77. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
  78. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
  79. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
  80. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
  81. package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
  82. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
  83. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
  84. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
  85. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  86. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
  87. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
  88. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
  89. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  90. package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
  91. package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
  92. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
  93. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
  94. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
  95. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  96. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
  97. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
  98. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
  99. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
  100. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
  101. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
  102. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
  103. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
  104. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
  105. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
  106. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
  107. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
  108. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
  109. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
  110. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
  111. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
  112. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
  113. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
  114. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
  115. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
  116. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
  117. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
  118. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
  119. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
  120. package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
  121. package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
  122. package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
  123. package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
  124. package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
  125. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
  126. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
  127. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
  128. package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
  129. package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
  130. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
  131. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
  132. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
  133. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
  134. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
  135. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
  136. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
  137. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
  138. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
  139. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
  140. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
  141. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
  142. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
  143. package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
  144. package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
  145. package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
  146. package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
  147. package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
  148. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
  149. package/package.json +5 -5
  150. package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
  151. package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
  152. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
  153. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
  154. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
  155. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
  156. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
  157. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
  158. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
  159. package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
  160. package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
  161. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
  162. package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
  163. package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
  164. package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
  165. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
  166. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
  167. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
  168. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
  169. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
  170. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
  171. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
  172. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
  173. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
  174. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
  175. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
  176. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
  177. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
  178. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
  179. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
  180. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
  181. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
  182. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
  183. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
  184. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
  185. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
  186. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
  187. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
  188. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
  189. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
  190. package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
  191. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
  192. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
  193. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
  194. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
  195. package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
  196. package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
  197. package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
  198. package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
  199. package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
  200. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
  201. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
  202. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
  203. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
  204. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
  205. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
  206. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
  207. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
  208. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
  209. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
  210. package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
@@ -96,7 +96,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
96
96
  properties: {
97
97
  thinking: {
98
98
  type: "string",
99
- description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on\nyour current state and explain your reasoning:\n\nFor preliminary requests (getDatabaseSchemas):\n\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature\ncompletion."
99
+ description: "Think before you act.\n\nFor preliminary requests: what critical information is missing?\n\nFor completion: what did you acquire, what did you accomplish, why is it\nsufficient? Summarize \u2014 don't enumerate every single item."
100
100
  },
101
101
  request: {
102
102
  oneOf: [
@@ -114,7 +114,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
114
114
  complete: "#/components/schemas/IAutoBeRealizeCollectorCorrectApplication.IComplete"
115
115
  }
116
116
  },
117
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getDatabaseSchemas) or final error correction (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
117
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls."
118
118
  }
119
119
  },
120
120
  required: [
@@ -127,7 +127,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
127
127
  properties: {
128
128
  type: {
129
129
  "const": "getDatabaseSchemas",
130
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getDatabaseSchemas\" indicates this is a preliminary\ndata request for database schemas."
130
+ description: "Type discriminator."
131
131
  },
132
132
  schemaNames: {
133
133
  type: "array",
@@ -135,40 +135,40 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
135
135
  type: "string"
136
136
  },
137
137
  minItems: 1,
138
- description: "List of database table names to retrieve.\n\nTable names from the database schema representing database entities (e.g.,\n\"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls."
138
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls."
139
139
  }
140
140
  },
141
141
  required: [
142
142
  "type",
143
143
  "schemaNames"
144
144
  ],
145
- description: "Request to retrieve database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific database table\nschemas needed for generating type-safe API operations."
145
+ description: "Request to retrieve database schema definitions for context."
146
146
  },
147
147
  "IAutoBeRealizeCollectorCorrectApplication.IComplete": {
148
148
  type: "object",
149
149
  properties: {
150
150
  type: {
151
151
  "const": "complete",
152
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request."
152
+ description: "Type discriminator for completion request."
153
153
  },
154
154
  think: {
155
155
  type: "string",
156
- description: "Systematic error analysis and correction strategy.\n\nMUST contain thorough analysis with these four mandatory sections:\n\n1. Error Inventory - Categorize ALL compilation errors by root cause type\n2. Root Cause Analysis - Identify WHY each error occurs (wrong field, type\n mismatch, etc.)\n3. Schema Verification - Cross-check error-related fields against actual\n database schema\n4. Correction Strategy - Specific fix for each error (not workarounds)\n\nThis forces you to understand the REAL problem (not guess) and plan\nsurgical fixes that address root causes, not symptoms."
156
+ description: "Systematic error analysis. MUST contain four sections:\n\n1. Error Inventory \u2014 categorize ALL compilation errors by root cause\n2. Root Cause Analysis \u2014 identify WHY each error occurs (wrong field, type\n mismatch, etc.)\n3. Schema Verification \u2014 cross-check error-related fields against actual\n database schema\n4. Correction Strategy \u2014 specific fix for each error (not workarounds)\n\nThis forces you to understand the REAL problem (not guess) and plan\nsurgical fixes that address root causes, not symptoms."
157
157
  },
158
158
  mappings: {
159
159
  type: "array",
160
160
  items: {
161
161
  $ref: "#/components/schemas/AutoBeRealizeCollectorMapping"
162
162
  },
163
- description: "Field-by-field mapping verification for complete coverage.\n\nReview EVERY field and relation from the database schema to ensure\ncorrect handling. This systematic approach catches errors beyond what the\ncompiler reports and prevents new issues.\n\nFor each database schema member, document:\n\n- `member`: Exact field/relation name from database schema\n- `kind`: Whether it's a scalar field, belongsTo, hasOne, or hasMany\n relation\n- `nullable`: Whether the field/relation is nullable (true/false for\n scalar/belongsTo, null for hasMany/hasOne)\n- `how`: Current state + correction plan (\"No change needed\", \"Fix:\n [problem] \u2192 [solution]\", etc.)\n\nThe `kind` property forces you to consciously identify whether each\nmember is a scalar or relation BEFORE deciding how to fix it. This\nprevents common correction errors like treating belongsTo relations as\nscalar fields.\n\nThe `nullable` property forces you to explicitly identify nullability\nconstraints BEFORE deciding correction strategy. This prevents errors\nlike assigning null to non-nullable fields or using null instead of\nundefined for optional belongsTo relations.\n\nEven fields without errors should be included with \"No change needed\" to\nensure complete review. Missing even a single field could hide bugs.\n\nThis structured verification:\n\n- Catches silent errors compiler didn't report\n- Ensures no fields accidentally omitted\n- Forces explicit classification (kind + nullable) before correction (how)\n- Prevents confusion between scalar fields and relations\n- Prevents null assignment errors through explicit nullability tracking\n- Documents correction decisions explicitly\n- Prevents regression in working fields\n\nThe validator will cross-check this against the database schema to ensure\nnothing was overlooked."
163
+ description: "Field-by-field mapping verification. For each database schema member:\n\n- `member`: Exact Prisma field/relation name \u2014 verify against schema\n- `kind`: scalar, belongsTo, hasOne, or hasMany\n- `nullable`: true/false for scalar/belongsTo, null for hasMany/hasOne\n- `how`: Current state + correction plan (\"No change needed\", \"Fix:\n [problem] \u2192 [solution]\")\n\nEven fields without errors must be included with \"No change needed\" to\nensure complete review. MUST include EVERY field/relation from the\ndatabase schema.\n\nMissing even a single field will cause validation failure."
164
164
  },
165
165
  draft: {
166
166
  type: "string",
167
- description: "Initial correction implementation.\n\nComplete corrected code that applies ALL fixes from the think phase\nstrategy. EVERY error in think Section 1 inventory MUST be addressed.\nImplement:\n\n- Field name corrections (exact names from database schema)\n- Type fixes (proper CreateInput types, nullable handling)\n- Neighbor collector reuse (replace inline logic if collector exists)\n- Relationship fixes (connect/create syntax)\n\nApply fixes surgically - change ONLY what's broken, preserve working\nlogic."
167
+ description: "Complete corrected code. EVERY error from think Section 1 MUST be\naddressed. Implement:\n\n- Field name corrections (exact names from database schema)\n- Type fixes (proper CreateInput types, nullable handling)\n- Neighbor collector reuse (replace inline logic if collector exists)\n- Relationship fixes (connect/create syntax)\n\nApply fixes surgically \u2014 change ONLY what's broken, preserve working\nlogic."
168
168
  },
169
169
  revise: {
170
170
  $ref: "#/components/schemas/IAutoBeRealizeCollectorCorrectApplication.IReviseProps",
171
- description: "Revision and finalization phase.\n\nReviews the draft corrections and produces the final, error-free code\nthat maintains all business requirements."
171
+ description: "Reviews draft corrections and produces final error-free code."
172
172
  }
173
173
  },
174
174
  required: [
@@ -178,14 +178,14 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
178
178
  "draft",
179
179
  "revise"
180
180
  ],
181
- description: "Request to correct collector implementation errors.\n\nExecutes three-phase error correction to resolve TypeScript compilation\nissues in collector functions. Applies systematic fixes following think \u2192\ndraft \u2192 revise pattern to ensure error-free production code."
181
+ description: "Correct collector compilation errors via think/draft/revise."
182
182
  },
183
183
  AutoBeRealizeCollectorMapping: {
184
184
  type: "object",
185
185
  properties: {
186
186
  member: {
187
187
  type: "string",
188
- description: "Exact field or relation name from Prisma schema.\n\nMUST match the schema exactly (case-sensitive). Examples:\n\n- Scalar fields: \"id\", \"email\", \"created_at\"\n- BelongsTo relations: \"customer\", \"article\"\n- HasMany relations: \"comments\", \"shopping_sale_tags\"\n\nDO NOT use database column names (e.g., \"customer_id\" is WRONG - use\n\"customer\").\n\nInclude ALL fields from the schema, even if they are optional or not used\nin this particular collector."
188
+ description: "Exact field or relation name from Prisma schema (case-sensitive).\n\n**Examples**:\n\n```typescript\n// Scalar fields\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n\n// BelongsTo relations \u2014 use Prisma RELATION name, NOT FK column name\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n\n// HasMany relations\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n```\n\nDO NOT use FK column names (e.g., \"customer_id\" is WRONG \u2014 use \"customer\").\nInclude ALL members even if unused in this collector."
189
189
  },
190
190
  kind: {
191
191
  oneOf: [
@@ -202,7 +202,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
202
202
  "const": "hasMany"
203
203
  }
204
204
  ],
205
- description: "The kind of Prisma schema member.\n\nExplicitly identifies whether this member is a scalar field or a relation,\nand if it's a relation, what type of relation it is. This classification\nforces the AI to think through the nature of each member before planning\nhow to handle it, preventing common mistakes like treating belongsTo\nrelations as scalar fields.\n\n**Possible values**:\n\n- `\"scalar\"`: Regular database column (id, email, created_at, total_price,\n etc.)\n- `\"belongsTo\"`: Foreign key relation pointing to parent entity (customer,\n article, category, etc.)\n- `\"hasOne\"`: One-to-one relation where this side owns the relationship\n- `\"hasMany\"`: One-to-many or many-to-many relation (comments, tags, reviews,\n etc.)\n\n**Why this matters**:\n\n- **Prevents confusion**: AI must consciously identify if \"customer\" is a\n relation (needs `{ connect: { id: ... } }`) or a scalar field\n- **Forces correct syntax**: belongsTo requires `connect`, hasMany requires\n `create`, scalar requires direct value assignment\n- **Enables Chain-of-Thought**: AI explicitly thinks about the kind before\n deciding the handling strategy in the `how` field\n- **Catches common errors**: Prevents treating FK relations as scalar IDs\n\n**Examples by kind**:\n\n```typescript\n// Scalar fields\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n\n// BelongsTo relations (FK pointing to parent)\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"article\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.article.id\" }\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n\n// HasMany relations (reverse side of FK)\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"reviews\", kind: \"hasMany\", nullable: null, how: \"Not applicable for this collector\" }\n```\n\nThe `kind` field works together with `nullable` and `how`: kind identifies\nWHAT it is, nullable identifies IF it's optional, how explains HOW to\nhandle it."
205
+ description: "Kind of Prisma schema member.\n\n- `\"scalar\"`: Regular column \u2192 direct value assignment\n- `\"belongsTo\"`: FK relation \u2192 `{ connect: { id } }`\n- `\"hasOne\"`: 1:1 relation this side owns\n- `\"hasMany\"`: 1:N or M:N \u2192 `{ create: [...] }` or omit\n\nThe kind forces explicit classification BEFORE deciding how to handle it,\npreventing confusion like treating belongsTo relations as scalar fields."
206
206
  },
207
207
  nullable: {
208
208
  oneOf: [
@@ -213,11 +213,11 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
213
213
  type: "boolean"
214
214
  }
215
215
  ],
216
- description: "Whether this member is nullable in the Prisma schema.\n\nThis property explicitly documents whether a field/relation can be null,\nforcing the AI to understand nullability constraints before deciding how to\nhandle the member. This prevents errors like assigning null to non-nullable\nfields or forgetting to handle optional relations properly.\n\n**Value semantics by kind**:\n\n- **For scalar fields** (`kind: \"scalar\"`):\n\n - `false`: Non-nullable column (e.g., `email String`, `id String`)\n\n - Must always have a value\n - Cannot use `null` or `undefined`\n - Example: `email: props.body.email` (required)\n - `true`: Nullable column (e.g., `description String?`, `deleted_at\n DateTime?`)\n\n - Can be null\n - Use `?? null` pattern for optional DTO values\n - Example: `description: props.body.description ?? null`\n- **For belongsTo relations** (`kind: \"belongsTo\"`):\n\n - `false`: Required foreign key (e.g., `customer_id String`)\n\n - Must always connect to parent entity\n - Cannot use `undefined`\n - Example: `customer: { connect: { id: props.customer.id } }`\n - `true`: Optional foreign key (e.g., `parent_id String?`, `category_id\n String?`)\n\n - Can be omitted\n - Use `undefined` (NOT `null`) when not provided\n - Example: `parent: props.body.parentId ? { connect: { id:\n props.body.parentId } } : undefined`\n- **For hasMany/hasOne relations** (`kind: \"hasMany\"` or `kind: \"hasOne\"`):\n\n - Always `null`: Nullability concept doesn't apply to relation arrays/objects\n\n - HasMany: Always optional (empty array or nested creates)\n - HasOne: Handled differently (create or omit)\n - The `nullable` property has no semantic meaning for these kinds\n\n**Why this matters**:\n\n- **Prevents null assignment errors**: Can't assign null to non-nullable\n fields\n- **Forces correct optional handling**: nullable: true \u2192 use `?? null` or\n `undefined`\n- **Catches required field omissions**: nullable: false \u2192 must provide value\n- **Enables proper FK handling**: nullable belongsTo \u2192 use `undefined` not\n `null`\n- **Supports Chain-of-Thought**: AI must think about nullability BEFORE\n deciding handling strategy\n\n**Examples**:\n\n```typescript\n// Non-nullable scalar (nullable: false)\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n\n// Nullable scalar (nullable: true)\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n{ member: \"deleted_at\", kind: \"scalar\", nullable: true, how: \"Default to null\" }\n{ member: \"completed_at\", kind: \"scalar\", nullable: true, how: \"From props.body.completedAt ?? null\" }\n\n// Required belongsTo (nullable: false)\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"article\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.article.id\" }\n\n// Optional belongsTo (nullable: true)\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n{ member: \"category\", kind: \"belongsTo\", nullable: true, how: \"Connect using props.body.categoryId or undefined\" }\n\n// HasMany relations (nullable: null - not applicable)\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"reviews\", kind: \"hasMany\", nullable: null, how: \"Not applicable for this collector\" }\n```\n\nThe `nullable` property works with `kind` to determine the correct Prisma\nsyntax: kind identifies WHAT it is, nullable identifies IF it's optional,\nhow explains HOW to handle it."
216
+ description: "Whether nullable in Prisma schema.\n\n- `false`: Non-nullable \u2014 must provide value\n- `true`: Nullable \u2014 use `?? null` for scalar, `undefined` for belongsTo\n- `null`: Not applicable (hasMany/hasOne)"
217
217
  },
218
218
  how: {
219
219
  type: "string",
220
- description: "Brief one-line explanation of how to obtain this field's value.\n\nKeep it concise and clear.\n\n**For Write Phase** (planning field generation):\n\n- \"Generate with v4()\"\n- \"From props.body.email\"\n- \"Connect using props.references.customer_id\"\n- \"Nested create with ShoppingSaleTagCollector\"\n- \"Query comment to get article_id\"\n- \"Default to new Date()\"\n- \"Undefined (nullable FK)\"\n- \"Not applicable for this collector\"\n- \"Not needed (optional has-many)\"\n\n**For Correct Phase** (documenting current state and fixes):\n\n- \"No change needed - correct\"\n- \"Already correct\"\n- \"Fix: Wrong name 'user_email' \u2192 'email'\"\n- \"Fix: Missing field - add with props.body.email\"\n- \"Fix: Wrong type - change to connect syntax\"\n- \"Fix: Should use CustomerCollector instead of inline\"\n- \"Fix: Using null instead of undefined\"\n- \"Fix: Fabricated field - remove it\"\n\nEven if a field is correct or not used, you MUST include it in the mapping\nand explain why. This ensures complete schema coverage.\n\nThis is NOT code - just a simple description of the strategy."
220
+ description: "Brief strategy for obtaining this field's value (NOT code).\n\nWrite phase: \"Generate with v4()\", \"From props.body.email\", \"Connect using\nprops.customer.id\", \"Nested create with TagCollector\".\n\nCorrect phase: \"No change needed\", \"Fix: Wrong name 'x' \u2192 'y'\".\n\nEven if correct or unused, you MUST include it. This ensures complete\nschema coverage."
221
221
  }
222
222
  },
223
223
  required: [
@@ -226,14 +226,14 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
226
226
  "nullable",
227
227
  "how"
228
228
  ],
229
- description: "Single field/relation mapping strategy for Prisma CreateInput generation.\n\nDocuments the handling strategy for one specific field or relation in the\nPrisma CreateInput. This structured approach ensures complete schema coverage\nby requiring explicit documentation for EVERY field - including those not\nused or not applicable.\n\n**Purpose**:\n\n- Prevents field omissions through systematic coverage verification\n- Forces explicit decision-making for each Prisma schema member\n- Enables validation before code generation (Write) or correction (Correct)\n- Creates clear documentation of field handling strategy\n\n**Usage Contexts**:\n\n- **Write Phase**: Plan how to generate each field from DTO \u2192 Prisma\n- **Correct Phase**: Document current state and correction plan for each field\n\nThe validator cross-checks mappings against the Prisma schema to ensure\nnothing is overlooked, rejecting incomplete mappings."
229
+ description: "Field/relation mapping for Prisma CreateInput generation.\n\nDocuments handling strategy for ONE Prisma schema member. EVERY field and\nrelation must be listed \u2014 the validator rejects incomplete mappings."
230
230
  },
231
231
  "IAutoBeRealizeCollectorCorrectApplication.IReviseProps": {
232
232
  type: "object",
233
233
  properties: {
234
234
  review: {
235
235
  type: "string",
236
- description: "Critical correction review and validation.\n\nMUST systematically verify using four checklists:\n\n1. Error Resolution - Confirm EVERY error from think Section 1 is fixed\n2. Root Cause Fix - Verify fixes address root causes (not workarounds/hacks)\n3. System Rules - Mandatory neighbor reuse, proper types, no fabricated\n fields\n4. No Regression - Confirm no NEW errors introduced, business logic intact\n\nIdentify any remaining issues with line numbers and root cause analysis.\nCatch Band-Aid fixes (type assertions, any casts) that hide real\nproblems."
236
+ description: "MUST systematically verify four checklists:\n\n1. Error Resolution \u2014 confirm EVERY error from think Section 1 is fixed\n2. Root Cause Fix \u2014 verify fixes address root causes (not workarounds/hacks)\n3. System Rules \u2014 neighbor reuse, proper types, no fabricated fields\n4. No Regression \u2014 confirm no NEW errors, business logic intact\n\nCatch Band-Aid fixes (type assertions, any casts) that hide real\nproblems."
237
237
  },
238
238
  final: {
239
239
  oneOf: [
@@ -244,7 +244,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
244
244
  type: "string"
245
245
  }
246
246
  ],
247
- description: "Final error-free collector code with all corrections applied.\n\nApply ALL remaining fixes identified in the review to produce\ncompilation-ready code. If review found issues (workarounds, new errors),\nthis MUST contain proper fixes.\n\nReturn `null` ONLY if draft is already perfect and review found zero\nissues."
247
+ description: "Final error-free code with all corrections applied, or null if draft\nneeds no changes."
248
248
  }
249
249
  },
250
250
  required: [
@@ -268,7 +268,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
268
268
  }
269
269
  }
270
270
  ],
271
- description: "Process collector correction task or preliminary data requests.\n\nSystematically analyzes and corrects TypeScript compilation errors in\ncollector functions through three-phase workflow (think \u2192 draft \u2192 revise).\nMaintains business logic integrity while resolving all compilation issues."
271
+ description: "Process collector correction task or preliminary data requests."
272
272
  }
273
273
  ]
274
274
  },
@@ -463,11 +463,11 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
463
463
  type: "object",
464
464
  properties: {
465
465
  thinking: {
466
- description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on\nyour current state and explain your reasoning:\n\nFor preliminary requests (getDatabaseSchemas):\n\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature\ncompletion.",
466
+ description: "Think before you act.\n\nFor preliminary requests: what critical information is missing?\n\nFor completion: what did you acquire, what did you accomplish, why is it\nsufficient? Summarize \u2014 don't enumerate every single item.",
467
467
  type: "string"
468
468
  },
469
469
  request: {
470
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getDatabaseSchemas) or final error correction (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
470
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls.",
471
471
  anyOf: [
472
472
  {
473
473
  $ref: "#/$defs/IAutoBePreliminaryGetDatabaseSchemas"
@@ -492,18 +492,18 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
492
492
  additionalProperties: false,
493
493
  $defs: {
494
494
  IAutoBePreliminaryGetDatabaseSchemas: {
495
- description: "Request to retrieve database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific database table\nschemas needed for generating type-safe API operations.",
495
+ description: "Request to retrieve database schema definitions for context.",
496
496
  type: "object",
497
497
  properties: {
498
498
  type: {
499
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getDatabaseSchemas\" indicates this is a preliminary\ndata request for database schemas.",
499
+ description: "Type discriminator.",
500
500
  type: "string",
501
501
  "enum": [
502
502
  "getDatabaseSchemas"
503
503
  ]
504
504
  },
505
505
  schemaNames: {
506
- description: "List of database table names to retrieve.\n\nTable names from the database schema representing database entities (e.g.,\n\"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls.",
506
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls.",
507
507
  type: "array",
508
508
  items: {
509
509
  type: "string"
@@ -517,33 +517,33 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
517
517
  ]
518
518
  },
519
519
  "IAutoBeRealizeCollectorCorrectApplication.IComplete": {
520
- description: "Request to correct collector implementation errors.\n\nExecutes three-phase error correction to resolve TypeScript compilation\nissues in collector functions. Applies systematic fixes following think \u2192\ndraft \u2192 revise pattern to ensure error-free production code.",
520
+ description: "Correct collector compilation errors via think/draft/revise.",
521
521
  type: "object",
522
522
  properties: {
523
523
  type: {
524
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
524
+ description: "Type discriminator for completion request.",
525
525
  type: "string",
526
526
  "enum": [
527
527
  "complete"
528
528
  ]
529
529
  },
530
530
  think: {
531
- description: "Systematic error analysis and correction strategy.\n\nMUST contain thorough analysis with these four mandatory sections:\n\n1. Error Inventory - Categorize ALL compilation errors by root cause type\n2. Root Cause Analysis - Identify WHY each error occurs (wrong field, type\n mismatch, etc.)\n3. Schema Verification - Cross-check error-related fields against actual\n database schema\n4. Correction Strategy - Specific fix for each error (not workarounds)\n\nThis forces you to understand the REAL problem (not guess) and plan\nsurgical fixes that address root causes, not symptoms.",
531
+ description: "Systematic error analysis. MUST contain four sections:\n\n1. Error Inventory \u2014 categorize ALL compilation errors by root cause\n2. Root Cause Analysis \u2014 identify WHY each error occurs (wrong field, type\n mismatch, etc.)\n3. Schema Verification \u2014 cross-check error-related fields against actual\n database schema\n4. Correction Strategy \u2014 specific fix for each error (not workarounds)\n\nThis forces you to understand the REAL problem (not guess) and plan\nsurgical fixes that address root causes, not symptoms.",
532
532
  type: "string"
533
533
  },
534
534
  mappings: {
535
- description: "Field-by-field mapping verification for complete coverage.\n\nReview EVERY field and relation from the database schema to ensure\ncorrect handling. This systematic approach catches errors beyond what the\ncompiler reports and prevents new issues.\n\nFor each database schema member, document:\n\n- `member`: Exact field/relation name from database schema\n- `kind`: Whether it's a scalar field, belongsTo, hasOne, or hasMany\n relation\n- `nullable`: Whether the field/relation is nullable (true/false for\n scalar/belongsTo, null for hasMany/hasOne)\n- `how`: Current state + correction plan (\"No change needed\", \"Fix:\n [problem] \u2192 [solution]\", etc.)\n\nThe `kind` property forces you to consciously identify whether each\nmember is a scalar or relation BEFORE deciding how to fix it. This\nprevents common correction errors like treating belongsTo relations as\nscalar fields.\n\nThe `nullable` property forces you to explicitly identify nullability\nconstraints BEFORE deciding correction strategy. This prevents errors\nlike assigning null to non-nullable fields or using null instead of\nundefined for optional belongsTo relations.\n\nEven fields without errors should be included with \"No change needed\" to\nensure complete review. Missing even a single field could hide bugs.\n\nThis structured verification:\n\n- Catches silent errors compiler didn't report\n- Ensures no fields accidentally omitted\n- Forces explicit classification (kind + nullable) before correction (how)\n- Prevents confusion between scalar fields and relations\n- Prevents null assignment errors through explicit nullability tracking\n- Documents correction decisions explicitly\n- Prevents regression in working fields\n\nThe validator will cross-check this against the database schema to ensure\nnothing was overlooked.",
535
+ description: "Field-by-field mapping verification. For each database schema member:\n\n- `member`: Exact Prisma field/relation name \u2014 verify against schema\n- `kind`: scalar, belongsTo, hasOne, or hasMany\n- `nullable`: true/false for scalar/belongsTo, null for hasMany/hasOne\n- `how`: Current state + correction plan (\"No change needed\", \"Fix:\n [problem] \u2192 [solution]\")\n\nEven fields without errors must be included with \"No change needed\" to\nensure complete review. MUST include EVERY field/relation from the\ndatabase schema.\n\nMissing even a single field will cause validation failure.",
536
536
  type: "array",
537
537
  items: {
538
538
  $ref: "#/$defs/AutoBeRealizeCollectorMapping"
539
539
  }
540
540
  },
541
541
  draft: {
542
- description: "Initial correction implementation.\n\nComplete corrected code that applies ALL fixes from the think phase\nstrategy. EVERY error in think Section 1 inventory MUST be addressed.\nImplement:\n\n- Field name corrections (exact names from database schema)\n- Type fixes (proper CreateInput types, nullable handling)\n- Neighbor collector reuse (replace inline logic if collector exists)\n- Relationship fixes (connect/create syntax)\n\nApply fixes surgically - change ONLY what's broken, preserve working\nlogic.",
542
+ description: "Complete corrected code. EVERY error from think Section 1 MUST be\naddressed. Implement:\n\n- Field name corrections (exact names from database schema)\n- Type fixes (proper CreateInput types, nullable handling)\n- Neighbor collector reuse (replace inline logic if collector exists)\n- Relationship fixes (connect/create syntax)\n\nApply fixes surgically \u2014 change ONLY what's broken, preserve working\nlogic.",
543
543
  type: "string"
544
544
  },
545
545
  revise: {
546
- description: "Revision and finalization phase.\n\nReviews the draft corrections and produces the final, error-free code\nthat maintains all business requirements.",
546
+ description: "Reviews draft corrections and produces final error-free code.",
547
547
  $ref: "#/$defs/IAutoBeRealizeCollectorCorrectApplication.IReviseProps"
548
548
  }
549
549
  },
@@ -556,15 +556,15 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
556
556
  ]
557
557
  },
558
558
  AutoBeRealizeCollectorMapping: {
559
- description: "Single field/relation mapping strategy for Prisma CreateInput generation.\n\nDocuments the handling strategy for one specific field or relation in the\nPrisma CreateInput. This structured approach ensures complete schema coverage\nby requiring explicit documentation for EVERY field - including those not\nused or not applicable.\n\n**Purpose**:\n\n- Prevents field omissions through systematic coverage verification\n- Forces explicit decision-making for each Prisma schema member\n- Enables validation before code generation (Write) or correction (Correct)\n- Creates clear documentation of field handling strategy\n\n**Usage Contexts**:\n\n- **Write Phase**: Plan how to generate each field from DTO \u2192 Prisma\n- **Correct Phase**: Document current state and correction plan for each field\n\nThe validator cross-checks mappings against the Prisma schema to ensure\nnothing is overlooked, rejecting incomplete mappings.",
559
+ description: "Field/relation mapping for Prisma CreateInput generation.\n\nDocuments handling strategy for ONE Prisma schema member. EVERY field and\nrelation must be listed \u2014 the validator rejects incomplete mappings.",
560
560
  type: "object",
561
561
  properties: {
562
562
  member: {
563
- description: "Exact field or relation name from Prisma schema.\n\nMUST match the schema exactly (case-sensitive). Examples:\n\n- Scalar fields: \"id\", \"email\", \"created_at\"\n- BelongsTo relations: \"customer\", \"article\"\n- HasMany relations: \"comments\", \"shopping_sale_tags\"\n\nDO NOT use database column names (e.g., \"customer_id\" is WRONG - use\n\"customer\").\n\nInclude ALL fields from the schema, even if they are optional or not used\nin this particular collector.",
563
+ description: "Exact field or relation name from Prisma schema (case-sensitive).\n\n**Examples**:\n\n```typescript\n// Scalar fields\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n\n// BelongsTo relations \u2014 use Prisma RELATION name, NOT FK column name\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n\n// HasMany relations\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n```\n\nDO NOT use FK column names (e.g., \"customer_id\" is WRONG \u2014 use \"customer\").\nInclude ALL members even if unused in this collector.",
564
564
  type: "string"
565
565
  },
566
566
  kind: {
567
- description: "The kind of Prisma schema member.\n\nExplicitly identifies whether this member is a scalar field or a relation,\nand if it's a relation, what type of relation it is. This classification\nforces the AI to think through the nature of each member before planning\nhow to handle it, preventing common mistakes like treating belongsTo\nrelations as scalar fields.\n\n**Possible values**:\n\n- `\"scalar\"`: Regular database column (id, email, created_at, total_price,\n etc.)\n- `\"belongsTo\"`: Foreign key relation pointing to parent entity (customer,\n article, category, etc.)\n- `\"hasOne\"`: One-to-one relation where this side owns the relationship\n- `\"hasMany\"`: One-to-many or many-to-many relation (comments, tags, reviews,\n etc.)\n\n**Why this matters**:\n\n- **Prevents confusion**: AI must consciously identify if \"customer\" is a\n relation (needs `{ connect: { id: ... } }`) or a scalar field\n- **Forces correct syntax**: belongsTo requires `connect`, hasMany requires\n `create`, scalar requires direct value assignment\n- **Enables Chain-of-Thought**: AI explicitly thinks about the kind before\n deciding the handling strategy in the `how` field\n- **Catches common errors**: Prevents treating FK relations as scalar IDs\n\n**Examples by kind**:\n\n```typescript\n// Scalar fields\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n\n// BelongsTo relations (FK pointing to parent)\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"article\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.article.id\" }\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n\n// HasMany relations (reverse side of FK)\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"reviews\", kind: \"hasMany\", nullable: null, how: \"Not applicable for this collector\" }\n```\n\nThe `kind` field works together with `nullable` and `how`: kind identifies\nWHAT it is, nullable identifies IF it's optional, how explains HOW to\nhandle it.",
567
+ description: "Kind of Prisma schema member.\n\n- `\"scalar\"`: Regular column \u2192 direct value assignment\n- `\"belongsTo\"`: FK relation \u2192 `{ connect: { id } }`\n- `\"hasOne\"`: 1:1 relation this side owns\n- `\"hasMany\"`: 1:N or M:N \u2192 `{ create: [...] }` or omit\n\nThe kind forces explicit classification BEFORE deciding how to handle it,\npreventing confusion like treating belongsTo relations as scalar fields.",
568
568
  type: "string",
569
569
  "enum": [
570
570
  "scalar",
@@ -574,7 +574,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
574
574
  ]
575
575
  },
576
576
  nullable: {
577
- description: "Whether this member is nullable in the Prisma schema.\n\nThis property explicitly documents whether a field/relation can be null,\nforcing the AI to understand nullability constraints before deciding how to\nhandle the member. This prevents errors like assigning null to non-nullable\nfields or forgetting to handle optional relations properly.\n\n**Value semantics by kind**:\n\n- **For scalar fields** (`kind: \"scalar\"`):\n\n - `false`: Non-nullable column (e.g., `email String`, `id String`)\n\n - Must always have a value\n - Cannot use `null` or `undefined`\n - Example: `email: props.body.email` (required)\n - `true`: Nullable column (e.g., `description String?`, `deleted_at\n DateTime?`)\n\n - Can be null\n - Use `?? null` pattern for optional DTO values\n - Example: `description: props.body.description ?? null`\n- **For belongsTo relations** (`kind: \"belongsTo\"`):\n\n - `false`: Required foreign key (e.g., `customer_id String`)\n\n - Must always connect to parent entity\n - Cannot use `undefined`\n - Example: `customer: { connect: { id: props.customer.id } }`\n - `true`: Optional foreign key (e.g., `parent_id String?`, `category_id\n String?`)\n\n - Can be omitted\n - Use `undefined` (NOT `null`) when not provided\n - Example: `parent: props.body.parentId ? { connect: { id:\n props.body.parentId } } : undefined`\n- **For hasMany/hasOne relations** (`kind: \"hasMany\"` or `kind: \"hasOne\"`):\n\n - Always `null`: Nullability concept doesn't apply to relation arrays/objects\n\n - HasMany: Always optional (empty array or nested creates)\n - HasOne: Handled differently (create or omit)\n - The `nullable` property has no semantic meaning for these kinds\n\n**Why this matters**:\n\n- **Prevents null assignment errors**: Can't assign null to non-nullable\n fields\n- **Forces correct optional handling**: nullable: true \u2192 use `?? null` or\n `undefined`\n- **Catches required field omissions**: nullable: false \u2192 must provide value\n- **Enables proper FK handling**: nullable belongsTo \u2192 use `undefined` not\n `null`\n- **Supports Chain-of-Thought**: AI must think about nullability BEFORE\n deciding handling strategy\n\n**Examples**:\n\n```typescript\n// Non-nullable scalar (nullable: false)\n{ member: \"id\", kind: \"scalar\", nullable: false, how: \"Generate with v4()\" }\n{ member: \"email\", kind: \"scalar\", nullable: false, how: \"From props.body.email\" }\n{ member: \"created_at\", kind: \"scalar\", nullable: false, how: \"Default to new Date()\" }\n\n// Nullable scalar (nullable: true)\n{ member: \"description\", kind: \"scalar\", nullable: true, how: \"From props.body.description ?? null\" }\n{ member: \"deleted_at\", kind: \"scalar\", nullable: true, how: \"Default to null\" }\n{ member: \"completed_at\", kind: \"scalar\", nullable: true, how: \"From props.body.completedAt ?? null\" }\n\n// Required belongsTo (nullable: false)\n{ member: \"customer\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.customer.id\" }\n{ member: \"article\", kind: \"belongsTo\", nullable: false, how: \"Connect using props.article.id\" }\n\n// Optional belongsTo (nullable: true)\n{ member: \"parent\", kind: \"belongsTo\", nullable: true, how: \"Undefined (nullable FK)\" }\n{ member: \"category\", kind: \"belongsTo\", nullable: true, how: \"Connect using props.body.categoryId or undefined\" }\n\n// HasMany relations (nullable: null - not applicable)\n{ member: \"comments\", kind: \"hasMany\", nullable: null, how: \"Not needed (optional has-many)\" }\n{ member: \"tags\", kind: \"hasMany\", nullable: null, how: \"Nested create with TagCollector\" }\n{ member: \"reviews\", kind: \"hasMany\", nullable: null, how: \"Not applicable for this collector\" }\n```\n\nThe `nullable` property works with `kind` to determine the correct Prisma\nsyntax: kind identifies WHAT it is, nullable identifies IF it's optional,\nhow explains HOW to handle it.",
577
+ description: "Whether nullable in Prisma schema.\n\n- `false`: Non-nullable \u2014 must provide value\n- `true`: Nullable \u2014 use `?? null` for scalar, `undefined` for belongsTo\n- `null`: Not applicable (hasMany/hasOne)",
578
578
  anyOf: [
579
579
  {
580
580
  type: "null"
@@ -585,7 +585,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
585
585
  ]
586
586
  },
587
587
  how: {
588
- description: "Brief one-line explanation of how to obtain this field's value.\n\nKeep it concise and clear.\n\n**For Write Phase** (planning field generation):\n\n- \"Generate with v4()\"\n- \"From props.body.email\"\n- \"Connect using props.references.customer_id\"\n- \"Nested create with ShoppingSaleTagCollector\"\n- \"Query comment to get article_id\"\n- \"Default to new Date()\"\n- \"Undefined (nullable FK)\"\n- \"Not applicable for this collector\"\n- \"Not needed (optional has-many)\"\n\n**For Correct Phase** (documenting current state and fixes):\n\n- \"No change needed - correct\"\n- \"Already correct\"\n- \"Fix: Wrong name 'user_email' \u2192 'email'\"\n- \"Fix: Missing field - add with props.body.email\"\n- \"Fix: Wrong type - change to connect syntax\"\n- \"Fix: Should use CustomerCollector instead of inline\"\n- \"Fix: Using null instead of undefined\"\n- \"Fix: Fabricated field - remove it\"\n\nEven if a field is correct or not used, you MUST include it in the mapping\nand explain why. This ensures complete schema coverage.\n\nThis is NOT code - just a simple description of the strategy.",
588
+ description: "Brief strategy for obtaining this field's value (NOT code).\n\nWrite phase: \"Generate with v4()\", \"From props.body.email\", \"Connect using\nprops.customer.id\", \"Nested create with TagCollector\".\n\nCorrect phase: \"No change needed\", \"Fix: Wrong name 'x' \u2192 'y'\".\n\nEven if correct or unused, you MUST include it. This ensures complete\nschema coverage.",
589
589
  type: "string"
590
590
  }
591
591
  },
@@ -600,11 +600,11 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
600
600
  type: "object",
601
601
  properties: {
602
602
  review: {
603
- description: "Critical correction review and validation.\n\nMUST systematically verify using four checklists:\n\n1. Error Resolution - Confirm EVERY error from think Section 1 is fixed\n2. Root Cause Fix - Verify fixes address root causes (not workarounds/hacks)\n3. System Rules - Mandatory neighbor reuse, proper types, no fabricated\n fields\n4. No Regression - Confirm no NEW errors introduced, business logic intact\n\nIdentify any remaining issues with line numbers and root cause analysis.\nCatch Band-Aid fixes (type assertions, any casts) that hide real\nproblems.",
603
+ description: "MUST systematically verify four checklists:\n\n1. Error Resolution \u2014 confirm EVERY error from think Section 1 is fixed\n2. Root Cause Fix \u2014 verify fixes address root causes (not workarounds/hacks)\n3. System Rules \u2014 neighbor reuse, proper types, no fabricated fields\n4. No Regression \u2014 confirm no NEW errors, business logic intact\n\nCatch Band-Aid fixes (type assertions, any casts) that hide real\nproblems.",
604
604
  type: "string"
605
605
  },
606
606
  final: {
607
- description: "Final error-free collector code with all corrections applied.\n\nApply ALL remaining fixes identified in the review to produce\ncompilation-ready code. If review found issues (workarounds, new errors),\nthis MUST contain proper fixes.\n\nReturn `null` ONLY if draft is already perfect and review found zero\nissues.",
607
+ description: "Final error-free code with all corrections applied, or null if draft\nneeds no changes.",
608
608
  anyOf: [
609
609
  {
610
610
  type: "null"
@@ -622,7 +622,7 @@ const orchestrateRealizeCollectorCorrectOverall = (ctx, props) => __awaiter(void
622
622
  }
623
623
  }
624
624
  },
625
- description: "Process collector correction task or preliminary data requests.\n\nSystematically analyzes and corrects TypeScript compilation errors in\ncollector functions through three-phase workflow (think \u2192 draft \u2192 revise).\nMaintains business logic integrity while resolving all compilation issues.",
625
+ description: "Process collector correction task or preliminary data requests.",
626
626
  validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io2 = input => "complete" === input.type && "string" === typeof input.think && (Array.isArray(input.mappings) && input.mappings.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io4(input.revise)); const _io3 = input => "string" === typeof input.member && ("scalar" === input.kind || "belongsTo" === input.kind || "hasOne" === input.kind || "hasMany" === input.kind) && (null === input.nullable || "boolean" === typeof input.nullable) && "string" === typeof input.how; const _io4 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _iu0 = input => (() => {
627
627
  if ("getDatabaseSchemas" === input.type)
628
628
  return _io1(input);