@autobe/agent 0.26.0 → 0.28.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 (205) hide show
  1. package/lib/AutoBeAgent.d.ts +2 -1
  2. package/lib/AutoBeAgent.js +27 -7
  3. package/lib/AutoBeAgent.js.map +1 -1
  4. package/lib/AutoBeMockAgent.js +2 -4
  5. package/lib/AutoBeMockAgent.js.map +1 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -11
  7. package/lib/context/AutoBeContext.d.ts +4 -1
  8. package/lib/context/AutoBeTokenUsage.d.ts +1 -1
  9. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  10. package/lib/context/assertSchemaModel.d.ts +1 -1
  11. package/lib/context/assertSchemaModel.js +4 -7
  12. package/lib/context/assertSchemaModel.js.map +1 -1
  13. package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
  14. package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
  15. package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
  16. package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
  17. package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
  18. package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
  19. package/lib/factory/createAutoBeContext.d.ts +2 -1
  20. package/lib/factory/createAutoBeContext.js +78 -27
  21. package/lib/factory/createAutoBeContext.js.map +1 -1
  22. package/lib/index.mjs +24065 -12997
  23. package/lib/index.mjs.map +1 -1
  24. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
  25. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  26. package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -0
  27. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +166 -87
  29. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  30. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +639 -322
  31. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  32. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +146 -76
  33. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  34. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
  35. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
  36. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
  37. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
  38. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +168 -4
  39. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  40. package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
  41. package/lib/orchestrate/facade/createAutoBeFacadeController.js +1308 -0
  42. package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
  43. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
  44. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
  45. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
  46. package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
  47. package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
  48. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
  49. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
  53. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  56. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  57. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
  59. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  60. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  62. package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterface.js +15 -8
  64. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  65. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +874 -49
  66. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  67. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1858 -67
  68. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  69. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +251 -133
  70. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  71. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
  72. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +257 -135
  73. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +341 -227
  75. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  76. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +761 -49
  77. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  78. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +911 -50
  79. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  80. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +207 -4
  81. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
  82. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +109 -2
  83. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
  84. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +5 -3
  85. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1904 -77
  86. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  87. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1858 -67
  88. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  89. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +23 -23
  90. package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
  91. package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
  92. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  93. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +391 -197
  94. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  95. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1168 -591
  96. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  97. package/lib/orchestrate/prisma/orchestratePrismaReview.js +1186 -600
  98. package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  99. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +6 -3
  100. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  101. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +2 -2
  102. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
  103. package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
  104. package/lib/orchestrate/realize/orchestrateRealize.js +2 -1
  105. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  106. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +362 -180
  107. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  108. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +399 -199
  109. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  110. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +133 -4
  111. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  112. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +171 -7
  113. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
  114. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +132 -3
  115. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  116. package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
  117. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  118. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  119. package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
  120. package/lib/orchestrate/test/orchestrateTest.js +2 -1
  121. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  122. package/lib/orchestrate/test/orchestrateTestCorrect.js +134 -3
  123. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  124. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +169 -4
  125. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  126. package/lib/orchestrate/test/orchestrateTestScenario.js +257 -4
  127. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  128. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -4
  129. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  130. package/lib/orchestrate/test/orchestrateTestWrite.js +141 -3
  131. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  132. package/lib/utils/TokenUsageComputer.d.ts +5 -0
  133. package/lib/utils/TokenUsageComputer.js +29 -0
  134. package/lib/utils/TokenUsageComputer.js.map +1 -0
  135. package/package.json +10 -10
  136. package/src/AutoBeAgent.ts +40 -6
  137. package/src/AutoBeMockAgent.ts +2 -4
  138. package/src/constants/AutoBeSystemPromptConstant.ts +11 -11
  139. package/src/context/AutoBeContext.ts +8 -0
  140. package/src/context/AutoBeTokenUsage.ts +1 -1
  141. package/src/context/assertSchemaModel.ts +5 -8
  142. package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
  143. package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
  144. package/src/factory/createAutoBeContext.ts +96 -36
  145. package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -0
  146. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +9 -10
  147. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +15 -10
  148. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -11
  149. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
  150. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
  151. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
  152. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +20 -3
  153. package/src/orchestrate/facade/createAutoBeFacadeController.ts +136 -0
  154. package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
  155. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
  156. package/src/orchestrate/interface/orchestrateInterface.ts +17 -6
  157. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -2
  158. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +13 -2
  159. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +16 -11
  160. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +16 -13
  161. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +19 -15
  162. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +13 -2
  163. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +16 -2
  164. package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +13 -2
  165. package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +11 -2
  166. package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +24 -16
  167. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +13 -2
  168. package/src/orchestrate/prisma/orchestratePrisma.ts +2 -1
  169. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +15 -10
  170. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -10
  171. package/src/orchestrate/prisma/orchestratePrismaReview.ts +9 -11
  172. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +2 -1
  173. package/src/orchestrate/realize/orchestrateRealize.ts +3 -2
  174. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +15 -10
  175. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +15 -10
  176. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +14 -3
  177. package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +21 -6
  178. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +13 -2
  179. package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
  180. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
  181. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
  182. package/src/orchestrate/test/orchestrateTest.ts +3 -2
  183. package/src/orchestrate/test/orchestrateTestCorrect.ts +14 -2
  184. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +21 -3
  185. package/src/orchestrate/test/orchestrateTestScenario.ts +13 -2
  186. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +13 -2
  187. package/src/orchestrate/test/orchestrateTestWrite.ts +13 -2
  188. package/src/utils/TokenUsageComputer.ts +35 -0
  189. package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
  190. package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
  191. package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
  192. package/lib/factory/createAutoBeApplication.js +0 -942
  193. package/lib/factory/createAutoBeApplication.js.map +0 -1
  194. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
  195. package/src/factory/createAutoBeApplication.ts +0 -123
  196. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
  197. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
  198. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
  199. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
  200. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
  201. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
  202. /package/lib/orchestrate/facade/{transformFacadeStateMessage.js → structures/transformFacadeStateMessage.js} +0 -0
  203. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
  204. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
  205. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
@@ -59,7 +59,7 @@ function orchestratePrismaComponents(ctx_1, instruction_1) {
59
59
  value: null,
60
60
  };
61
61
  const prefix = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.prefix) !== null && _b !== void 0 ? _b : null;
62
- const { tokenUsage } = yield ctx.conversate({
62
+ const { metric, tokenUsage } = yield ctx.conversate({
63
63
  source: "prismaComponent",
64
64
  histories: (0, transformPrismaComponentsHistories_1.transformPrismaComponentsHistories)(ctx.state(), {
65
65
  prefix,
@@ -84,6 +84,7 @@ function orchestratePrismaComponents(ctx_1, instruction_1) {
84
84
  review: pointer.value.review,
85
85
  decision: pointer.value.decision,
86
86
  components: pointer.value.components,
87
+ metric,
87
88
  tokenUsage,
88
89
  step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
89
90
  };
@@ -91,7 +92,11 @@ function orchestratePrismaComponents(ctx_1, instruction_1) {
91
92
  }
92
93
  function createController(props) {
93
94
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
94
- const application = collection[props.model];
95
+ const application = collection[props.model === "chatgpt"
96
+ ? "chatgpt"
97
+ : props.model === "gemini"
98
+ ? "gemini"
99
+ : "claude"];
95
100
  return {
96
101
  protocol: "class",
97
102
  name: "Prisma Extract Files and Tables",
@@ -103,208 +108,401 @@ function createController(props) {
103
108
  },
104
109
  };
105
110
  }
106
- const claude = {
107
- model: "claude",
108
- options: {
109
- reference: true,
110
- separate: null
111
- },
112
- functions: [
113
- {
114
- name: "extractComponents",
115
- parameters: {
116
- description: "Current Type: {@link IAutoBePrismaComponentApplication.IProps}",
117
- type: "object",
118
- properties: {
119
- thinking: {
120
- description: "Initial thoughts on namespace classification criteria.\n\nContains the AI agent's initial analysis and reasoning about how to\norganize tables into different business domains/namespaces.\n\n**Example:**\n\n \"Based on the business requirements, I identify several key domains:\n - User-related entities should be grouped under 'Actors' namespace\n - Product and sales information under 'Sales' namespace\n - System configuration under 'Systematic' namespace\"",
121
- type: "string"
122
- },
123
- review: {
124
- description: "Review and refinement of the namespace classification.\n\nContains the AI agent's review process, considering relationships between\ntables and potential improvements to the initial classification.\n\n**Example:**\n\n \"Upon review, I noticed that 'shopping_channel_categories' has strong\n relationships with both channels and sales. However, since it primarily\n defines the channel structure, it should remain in 'Systematic' namespace.\"",
125
- type: "string"
126
- },
127
- decision: {
128
- description: "Final decision on namespace classification.\n\nContains the AI agent's final reasoning and rationale for the chosen\nnamespace organization, explaining why this structure best serves the\nbusiness requirements.\n\n**Example:**\n\n \"Final decision: Organize tables into 3 main namespaces:\n 1. Systematic - for channel and system configuration\n 2. Actors - for all user types (customers, citizens, administrators)\n 3. Sales - for product sales and related transactional data\n This structure provides clear separation of concerns and follows DDD principles.\"",
129
- type: "string"
130
- },
131
- components: {
132
- description: "Array of domain components that group related database tables.\n\nEach component represents a business domain and becomes one Prisma schema\nfile. Common domains include: Actors (users), Sales (products), Orders,\nCarts, etc.\n\n**Example:**\n\n```typescript\n{\n \"components\": [\n {\n \"filename\": \"schema-02-systematic.prisma\",\n \"namespace\": \"Systematic\",\n \"thinking\": \"These tables all relate to system configuration and channel management. They form the foundation of the platform.\",\n \"review\": \"Considering the relationships, shopping_channel_categories connects channels and sales, but it fundamentally defines channel structure.\",\n \"rationale\": \"Grouping all system configuration tables together provides a clear foundation layer that other domains can reference.\",\n \"tables\": [\n \"shopping_channels\",\n \"shopping_sections\",\n \"shopping_channel_categories\"\n ]\n },\n {\n \"filename\": \"schema-03-actors.prisma\",\n \"namespace\": \"Actors\",\n \"thinking\": \"All user-related entities should be grouped together as they share authentication and identity patterns.\",\n \"review\": \"While customers interact with sales, the customer entity itself is about identity, not transactions.\",\n \"rationale\": \"This component groups all actor-related tables to maintain separation between identity management and business transactions.\",\n \"tables\": [\n \"shopping_customers\",\n \"shopping_citizens\",\n \"shopping_administrators\"\n ]\n },\n {\n \"filename\": \"schema-04-sales.prisma\",\n \"namespace\": \"Sales\",\n \"thinking\": \"Product catalog and sales-related tables belong together as they form the core commerce functionality.\",\n \"review\": \"Sales snapshots are integral to the sales domain for tracking product history and price changes.\",\n \"rationale\": \"Consolidating all sales-related tables enables coherent management of the entire product lifecycle.\",\n \"tables\": [\n \"shopping_sales\",\n \"shopping_sale_snapshots\",\n \"shopping_sale_units\",\n \"shopping_sale_unit_options\"\n ]\n }\n ]\n}\n```\n\n**Notes:**\n\n- Table names must follow snake_case convention with domain prefix (e.g.,\n `shopping_customers`)\n- Each component becomes one `.prisma` file containing related models\n- Filename numbering indicates dependency order for schema generation\n- Namespace is used for documentation organization and domain grouping",
133
- type: "array",
134
- items: {
135
- $ref: "#/$defs/AutoBePrisma.IComponent"
111
+ const collection = {
112
+ chatgpt: {
113
+ model: "chatgpt",
114
+ options: {
115
+ reference: true,
116
+ strict: false,
117
+ separate: null
118
+ },
119
+ functions: [
120
+ {
121
+ name: "extractComponents",
122
+ parameters: {
123
+ description: "Current Type: {@link IAutoBePrismaComponentApplication.IProps}",
124
+ type: "object",
125
+ properties: {
126
+ thinking: {
127
+ description: "Initial thoughts on namespace classification criteria.\n\nContains the AI agent's initial analysis and reasoning about how to\norganize tables into different business domains/namespaces.\n\n**Example:**\n\n \"Based on the business requirements, I identify several key domains:\n - User-related entities should be grouped under 'Actors' namespace\n - Product and sales information under 'Sales' namespace\n - System configuration under 'Systematic' namespace\"",
128
+ type: "string"
136
129
  },
137
- minItems: 1
130
+ review: {
131
+ description: "Review and refinement of the namespace classification.\n\nContains the AI agent's review process, considering relationships between\ntables and potential improvements to the initial classification.\n\n**Example:**\n\n \"Upon review, I noticed that 'shopping_channel_categories' has strong\n relationships with both channels and sales. However, since it primarily\n defines the channel structure, it should remain in 'Systematic' namespace.\"",
132
+ type: "string"
133
+ },
134
+ decision: {
135
+ description: "Final decision on namespace classification.\n\nContains the AI agent's final reasoning and rationale for the chosen\nnamespace organization, explaining why this structure best serves the\nbusiness requirements.\n\n**Example:**\n\n \"Final decision: Organize tables into 3 main namespaces:\n 1. Systematic - for channel and system configuration\n 2. Actors - for all user types (customers, citizens, administrators)\n 3. Sales - for product sales and related transactional data\n This structure provides clear separation of concerns and follows DDD principles.\"",
136
+ type: "string"
137
+ },
138
+ components: {
139
+ description: "Array of domain components that group related database tables.\n\nEach component represents a business domain and becomes one Prisma schema\nfile. Common domains include: Actors (users), Sales (products), Orders,\nCarts, etc.\n\n**Example:**\n\n```typescript\n{\n \"components\": [\n {\n \"filename\": \"schema-02-systematic.prisma\",\n \"namespace\": \"Systematic\",\n \"thinking\": \"These tables all relate to system configuration and channel management. They form the foundation of the platform.\",\n \"review\": \"Considering the relationships, shopping_channel_categories connects channels and sales, but it fundamentally defines channel structure.\",\n \"rationale\": \"Grouping all system configuration tables together provides a clear foundation layer that other domains can reference.\",\n \"tables\": [\n \"shopping_channels\",\n \"shopping_sections\",\n \"shopping_channel_categories\"\n ]\n },\n {\n \"filename\": \"schema-03-actors.prisma\",\n \"namespace\": \"Actors\",\n \"thinking\": \"All user-related entities should be grouped together as they share authentication and identity patterns.\",\n \"review\": \"While customers interact with sales, the customer entity itself is about identity, not transactions.\",\n \"rationale\": \"This component groups all actor-related tables to maintain separation between identity management and business transactions.\",\n \"tables\": [\n \"shopping_customers\",\n \"shopping_citizens\",\n \"shopping_administrators\"\n ]\n },\n {\n \"filename\": \"schema-04-sales.prisma\",\n \"namespace\": \"Sales\",\n \"thinking\": \"Product catalog and sales-related tables belong together as they form the core commerce functionality.\",\n \"review\": \"Sales snapshots are integral to the sales domain for tracking product history and price changes.\",\n \"rationale\": \"Consolidating all sales-related tables enables coherent management of the entire product lifecycle.\",\n \"tables\": [\n \"shopping_sales\",\n \"shopping_sale_snapshots\",\n \"shopping_sale_units\",\n \"shopping_sale_unit_options\"\n ]\n }\n ]\n}\n```\n\n**Notes:**\n\n- Table names must follow snake_case convention with domain prefix (e.g.,\n `shopping_customers`)\n- Each component becomes one `.prisma` file containing related models\n- Filename numbering indicates dependency order for schema generation\n- Namespace is used for documentation organization and domain grouping\n\n\n@minItems 1",
140
+ type: "array",
141
+ items: {
142
+ $ref: "#/$defs/AutoBePrisma.IComponent"
143
+ }
144
+ }
145
+ },
146
+ required: [
147
+ "thinking",
148
+ "review",
149
+ "decision",
150
+ "components"
151
+ ],
152
+ additionalProperties: false,
153
+ $defs: {
154
+ "AutoBePrisma.IComponent": {
155
+ description: "Interface representing a logical grouping of database tables organized by\nbusiness domain for schema file generation.\n\nComponents provide a systematic way to organize database tables into\ncoherent groups following domain-driven design principles. Each component\nrepresents a specific business domain or functional area that will be\ngenerated as a separate Prisma schema file, ensuring maintainable and\nlogically structured database architecture.\n\nThis interface is primarily used during the database design phase when the\nPrisma agent analyzes requirements and determines the complete scope of\ntables needed, then organizes them into logical groups based on business\nrelationships and functional dependencies.\n\n## Usage in Schema Generation Process\n\nComponents serve as the blueprint for generating multiple Prisma schema\nfiles:\n\n1. **Requirements Analysis**: AI agent identifies all required tables from\n business requirements\n2. **Domain Grouping**: Tables are organized into components based on business\n domains and functional relationships\n3. **File Generation**: Each component becomes a separate .prisma file\n containing related models\n4. **Dependency Management**: Components are ordered to handle cross-domain\n relationships properly\n\n## Domain Organization Examples\n\nBased on typical business applications, components commonly include:\n\n- **Systematic**: Core system tables (channels, sections, configurations)\n- **Actors**: User management (customers, citizens, administrators)\n- **Sales**: Product catalog and sales entities\n- **Carts**: Shopping cart and item management\n- **Orders**: Order processing and fulfillment\n- **Coupons**: Discount and promotion systems\n- **Coins**: Digital currency and mileage systems\n- **Inquiries**: Customer support and FAQ systems\n- **Favorites**: User preference and wishlist management\n- **Articles**: Content management and BBS systems\n\n## Relationship to {@link AutoBePrisma.IFile}\n\nEach IComponent serves as a blueprint for generating one IFile during the\nschema generation process. The component's metadata (filename, namespace,\ntables) is used to structure the actual Prisma schema file with proper\nmodels, relationships, and indexes.",
156
+ type: "object",
157
+ properties: {
158
+ filename: {
159
+ description: "Target filename for the Prisma schema file containing this component's\ntables.\n\nFollows the naming convention `schema-{number}-{domain}.prisma` where the\nnumber indicates dependency order and domain represents the business\narea.\n\n\n@pattern ^[a-zA-Z0-9._-]+\\.prisma$",
160
+ type: "string"
161
+ },
162
+ namespace: {
163
+ description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\"",
164
+ type: "string"
165
+ },
166
+ thinking: {
167
+ description: "Initial thoughts on why these tables belong together.\n\n**Example:**\n\n \"These tables all relate to user management and authentication.\n They share common patterns like user identification and access control.\"",
168
+ type: "string"
169
+ },
170
+ review: {
171
+ description: "Review considerations for this component grouping.\n\n**Example:**\n\n \"Reviewed relationships with other domains. While customers create orders,\n the customer entity itself is fundamentally about user identity, not sales.\"",
172
+ type: "string"
173
+ },
174
+ rationale: {
175
+ description: "Final rationale for this component's composition.\n\n**Example:**\n\n \"This component groups all actor-related tables to maintain a clear\n separation between identity management and business transactions.\"",
176
+ type: "string"
177
+ },
178
+ tables: {
179
+ description: "Array of table names that will be included in this component's schema\nfile.\n\nContains all database table names that belong to this business domain,\nensuring logical grouping and proper organization of related data\nstructures.\n\n\n@minItems 1",
180
+ type: "array",
181
+ items: {
182
+ description: "@pattern ^[a-z][a-z0-9_]*$",
183
+ type: "string"
184
+ }
185
+ }
186
+ },
187
+ required: [
188
+ "filename",
189
+ "namespace",
190
+ "thinking",
191
+ "review",
192
+ "rationale",
193
+ "tables"
194
+ ]
195
+ }
138
196
  }
139
197
  },
140
- required: [
141
- "thinking",
142
- "review",
143
- "decision",
144
- "components"
145
- ],
146
- additionalProperties: false,
147
- $defs: {
148
- "AutoBePrisma.IComponent": {
149
- description: "Interface representing a logical grouping of database tables organized by\nbusiness domain for schema file generation.\n\nComponents provide a systematic way to organize database tables into\ncoherent groups following domain-driven design principles. Each component\nrepresents a specific business domain or functional area that will be\ngenerated as a separate Prisma schema file, ensuring maintainable and\nlogically structured database architecture.\n\nThis interface is primarily used during the database design phase when the\nPrisma agent analyzes requirements and determines the complete scope of\ntables needed, then organizes them into logical groups based on business\nrelationships and functional dependencies.\n\n## Usage in Schema Generation Process\n\nComponents serve as the blueprint for generating multiple Prisma schema\nfiles:\n\n1. **Requirements Analysis**: AI agent identifies all required tables from\n business requirements\n2. **Domain Grouping**: Tables are organized into components based on business\n domains and functional relationships\n3. **File Generation**: Each component becomes a separate .prisma file\n containing related models\n4. **Dependency Management**: Components are ordered to handle cross-domain\n relationships properly\n\n## Domain Organization Examples\n\nBased on typical business applications, components commonly include:\n\n- **Systematic**: Core system tables (channels, sections, configurations)\n- **Actors**: User management (customers, citizens, administrators)\n- **Sales**: Product catalog and sales entities\n- **Carts**: Shopping cart and item management\n- **Orders**: Order processing and fulfillment\n- **Coupons**: Discount and promotion systems\n- **Coins**: Digital currency and mileage systems\n- **Inquiries**: Customer support and FAQ systems\n- **Favorites**: User preference and wishlist management\n- **Articles**: Content management and BBS systems\n\n## Relationship to {@link AutoBePrisma.IFile}\n\nEach IComponent serves as a blueprint for generating one IFile during the\nschema generation process. The component's metadata (filename, namespace,\ntables) is used to structure the actual Prisma schema file with proper\nmodels, relationships, and indexes.",
150
- type: "object",
151
- properties: {
152
- filename: {
153
- description: "Target filename for the Prisma schema file containing this component's\ntables.\n\nFollows the naming convention `schema-{number}-{domain}.prisma` where the\nnumber indicates dependency order and domain represents the business\narea.",
154
- type: "string",
155
- pattern: "^[a-zA-Z0-9._-]+\\.prisma$"
156
- },
157
- namespace: {
158
- description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\"",
159
- type: "string"
160
- },
161
- thinking: {
162
- description: "Initial thoughts on why these tables belong together.\n\n**Example:**\n\n \"These tables all relate to user management and authentication.\n They share common patterns like user identification and access control.\"",
163
- type: "string"
164
- },
165
- review: {
166
- description: "Review considerations for this component grouping.\n\n**Example:**\n\n \"Reviewed relationships with other domains. While customers create orders,\n the customer entity itself is fundamentally about user identity, not sales.\"",
167
- type: "string"
168
- },
169
- rationale: {
170
- description: "Final rationale for this component's composition.\n\n**Example:**\n\n \"This component groups all actor-related tables to maintain a clear\n separation between identity management and business transactions.\"",
171
- type: "string"
198
+ description: "Organizes database tables into domain-based components for Prisma schema\ngeneration.\n\nTakes business requirements and groups related tables into logical domains,\nwith each component becoming a separate .prisma file.",
199
+ validate: (() => { const _io0 = input => "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.decision && (Array.isArray(input.components) && (1 <= input.components.length && input.components.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.rationale && (Array.isArray(input.tables) && (1 <= input.tables.length && input.tables.every(elem => "string" === typeof elem && RegExp("^[a-z][a-z0-9_]*$").test(elem)))); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
200
+ path: _path + ".thinking",
201
+ expected: "string",
202
+ value: input.thinking
203
+ }), "string" === typeof input.review || _report(_exceptionable, {
204
+ path: _path + ".review",
205
+ expected: "string",
206
+ value: input.review
207
+ }), "string" === typeof input.decision || _report(_exceptionable, {
208
+ path: _path + ".decision",
209
+ expected: "string",
210
+ value: input.decision
211
+ }), (Array.isArray(input.components) || _report(_exceptionable, {
212
+ path: _path + ".components",
213
+ expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
214
+ value: input.components
215
+ })) && ((1 <= input.components.length || _report(_exceptionable, {
216
+ path: _path + ".components",
217
+ expected: "Array<> & MinItems<1>",
218
+ value: input.components
219
+ })) && input.components.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
220
+ path: _path + ".components[" + _index3 + "]",
221
+ expected: "AutoBePrisma.IComponent",
222
+ value: elem
223
+ })) && _vo1(elem, _path + ".components[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
224
+ path: _path + ".components[" + _index3 + "]",
225
+ expected: "AutoBePrisma.IComponent",
226
+ value: elem
227
+ })).every(flag => flag)) || _report(_exceptionable, {
228
+ path: _path + ".components",
229
+ expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
230
+ value: input.components
231
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
232
+ path: _path + ".filename",
233
+ expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
234
+ value: input.filename
235
+ })) || _report(_exceptionable, {
236
+ path: _path + ".filename",
237
+ expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
238
+ value: input.filename
239
+ }), "string" === typeof input.namespace || _report(_exceptionable, {
240
+ path: _path + ".namespace",
241
+ expected: "string",
242
+ value: input.namespace
243
+ }), "string" === typeof input.thinking || _report(_exceptionable, {
244
+ path: _path + ".thinking",
245
+ expected: "string",
246
+ value: input.thinking
247
+ }), "string" === typeof input.review || _report(_exceptionable, {
248
+ path: _path + ".review",
249
+ expected: "string",
250
+ value: input.review
251
+ }), "string" === typeof input.rationale || _report(_exceptionable, {
252
+ path: _path + ".rationale",
253
+ expected: "string",
254
+ value: input.rationale
255
+ }), (Array.isArray(input.tables) || _report(_exceptionable, {
256
+ path: _path + ".tables",
257
+ expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
258
+ value: input.tables
259
+ })) && ((1 <= input.tables.length || _report(_exceptionable, {
260
+ path: _path + ".tables",
261
+ expected: "Array<> & MinItems<1>",
262
+ value: input.tables
263
+ })) && input.tables.map((elem, _index4) => "string" === typeof elem && (RegExp("^[a-z][a-z0-9_]*$").test(elem) || _report(_exceptionable, {
264
+ path: _path + ".tables[" + _index4 + "]",
265
+ expected: "string & SnakeCasePattern",
266
+ value: elem
267
+ })) || _report(_exceptionable, {
268
+ path: _path + ".tables[" + _index4 + "]",
269
+ expected: "(string & SnakeCasePattern)",
270
+ value: elem
271
+ })).every(flag => flag)) || _report(_exceptionable, {
272
+ path: _path + ".tables",
273
+ expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
274
+ value: input.tables
275
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
276
+ if (false === __is(input)) {
277
+ errors = [];
278
+ _report = __typia_transform__validateReport._validateReport(errors);
279
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
280
+ path: _path + "",
281
+ expected: "IAutoBePrismaComponentApplication.IProps",
282
+ value: input
283
+ })) && _vo0(input, _path + "", true) || _report(true, {
284
+ path: _path + "",
285
+ expected: "IAutoBePrismaComponentApplication.IProps",
286
+ value: input
287
+ }))(input, "$input", true);
288
+ const success = 0 === errors.length;
289
+ return success ? {
290
+ success,
291
+ data: input
292
+ } : {
293
+ success,
294
+ errors,
295
+ data: input
296
+ };
297
+ }
298
+ return {
299
+ success: true,
300
+ data: input
301
+ };
302
+ }; })()
303
+ }
304
+ ]
305
+ },
306
+ claude: {
307
+ model: "claude",
308
+ options: {
309
+ reference: true,
310
+ separate: null
311
+ },
312
+ functions: [
313
+ {
314
+ name: "extractComponents",
315
+ parameters: {
316
+ description: "Current Type: {@link IAutoBePrismaComponentApplication.IProps}",
317
+ type: "object",
318
+ properties: {
319
+ thinking: {
320
+ description: "Initial thoughts on namespace classification criteria.\n\nContains the AI agent's initial analysis and reasoning about how to\norganize tables into different business domains/namespaces.\n\n**Example:**\n\n \"Based on the business requirements, I identify several key domains:\n - User-related entities should be grouped under 'Actors' namespace\n - Product and sales information under 'Sales' namespace\n - System configuration under 'Systematic' namespace\"",
321
+ type: "string"
322
+ },
323
+ review: {
324
+ description: "Review and refinement of the namespace classification.\n\nContains the AI agent's review process, considering relationships between\ntables and potential improvements to the initial classification.\n\n**Example:**\n\n \"Upon review, I noticed that 'shopping_channel_categories' has strong\n relationships with both channels and sales. However, since it primarily\n defines the channel structure, it should remain in 'Systematic' namespace.\"",
325
+ type: "string"
326
+ },
327
+ decision: {
328
+ description: "Final decision on namespace classification.\n\nContains the AI agent's final reasoning and rationale for the chosen\nnamespace organization, explaining why this structure best serves the\nbusiness requirements.\n\n**Example:**\n\n \"Final decision: Organize tables into 3 main namespaces:\n 1. Systematic - for channel and system configuration\n 2. Actors - for all user types (customers, citizens, administrators)\n 3. Sales - for product sales and related transactional data\n This structure provides clear separation of concerns and follows DDD principles.\"",
329
+ type: "string"
330
+ },
331
+ components: {
332
+ description: "Array of domain components that group related database tables.\n\nEach component represents a business domain and becomes one Prisma schema\nfile. Common domains include: Actors (users), Sales (products), Orders,\nCarts, etc.\n\n**Example:**\n\n```typescript\n{\n \"components\": [\n {\n \"filename\": \"schema-02-systematic.prisma\",\n \"namespace\": \"Systematic\",\n \"thinking\": \"These tables all relate to system configuration and channel management. They form the foundation of the platform.\",\n \"review\": \"Considering the relationships, shopping_channel_categories connects channels and sales, but it fundamentally defines channel structure.\",\n \"rationale\": \"Grouping all system configuration tables together provides a clear foundation layer that other domains can reference.\",\n \"tables\": [\n \"shopping_channels\",\n \"shopping_sections\",\n \"shopping_channel_categories\"\n ]\n },\n {\n \"filename\": \"schema-03-actors.prisma\",\n \"namespace\": \"Actors\",\n \"thinking\": \"All user-related entities should be grouped together as they share authentication and identity patterns.\",\n \"review\": \"While customers interact with sales, the customer entity itself is about identity, not transactions.\",\n \"rationale\": \"This component groups all actor-related tables to maintain separation between identity management and business transactions.\",\n \"tables\": [\n \"shopping_customers\",\n \"shopping_citizens\",\n \"shopping_administrators\"\n ]\n },\n {\n \"filename\": \"schema-04-sales.prisma\",\n \"namespace\": \"Sales\",\n \"thinking\": \"Product catalog and sales-related tables belong together as they form the core commerce functionality.\",\n \"review\": \"Sales snapshots are integral to the sales domain for tracking product history and price changes.\",\n \"rationale\": \"Consolidating all sales-related tables enables coherent management of the entire product lifecycle.\",\n \"tables\": [\n \"shopping_sales\",\n \"shopping_sale_snapshots\",\n \"shopping_sale_units\",\n \"shopping_sale_unit_options\"\n ]\n }\n ]\n}\n```\n\n**Notes:**\n\n- Table names must follow snake_case convention with domain prefix (e.g.,\n `shopping_customers`)\n- Each component becomes one `.prisma` file containing related models\n- Filename numbering indicates dependency order for schema generation\n- Namespace is used for documentation organization and domain grouping",
333
+ type: "array",
334
+ items: {
335
+ $ref: "#/$defs/AutoBePrisma.IComponent"
172
336
  },
173
- tables: {
174
- description: "Array of table names that will be included in this component's schema\nfile.\n\nContains all database table names that belong to this business domain,\nensuring logical grouping and proper organization of related data\nstructures.",
175
- type: "array",
176
- items: {
337
+ minItems: 1
338
+ }
339
+ },
340
+ required: [
341
+ "thinking",
342
+ "review",
343
+ "decision",
344
+ "components"
345
+ ],
346
+ additionalProperties: false,
347
+ $defs: {
348
+ "AutoBePrisma.IComponent": {
349
+ description: "Interface representing a logical grouping of database tables organized by\nbusiness domain for schema file generation.\n\nComponents provide a systematic way to organize database tables into\ncoherent groups following domain-driven design principles. Each component\nrepresents a specific business domain or functional area that will be\ngenerated as a separate Prisma schema file, ensuring maintainable and\nlogically structured database architecture.\n\nThis interface is primarily used during the database design phase when the\nPrisma agent analyzes requirements and determines the complete scope of\ntables needed, then organizes them into logical groups based on business\nrelationships and functional dependencies.\n\n## Usage in Schema Generation Process\n\nComponents serve as the blueprint for generating multiple Prisma schema\nfiles:\n\n1. **Requirements Analysis**: AI agent identifies all required tables from\n business requirements\n2. **Domain Grouping**: Tables are organized into components based on business\n domains and functional relationships\n3. **File Generation**: Each component becomes a separate .prisma file\n containing related models\n4. **Dependency Management**: Components are ordered to handle cross-domain\n relationships properly\n\n## Domain Organization Examples\n\nBased on typical business applications, components commonly include:\n\n- **Systematic**: Core system tables (channels, sections, configurations)\n- **Actors**: User management (customers, citizens, administrators)\n- **Sales**: Product catalog and sales entities\n- **Carts**: Shopping cart and item management\n- **Orders**: Order processing and fulfillment\n- **Coupons**: Discount and promotion systems\n- **Coins**: Digital currency and mileage systems\n- **Inquiries**: Customer support and FAQ systems\n- **Favorites**: User preference and wishlist management\n- **Articles**: Content management and BBS systems\n\n## Relationship to {@link AutoBePrisma.IFile}\n\nEach IComponent serves as a blueprint for generating one IFile during the\nschema generation process. The component's metadata (filename, namespace,\ntables) is used to structure the actual Prisma schema file with proper\nmodels, relationships, and indexes.",
350
+ type: "object",
351
+ properties: {
352
+ filename: {
353
+ description: "Target filename for the Prisma schema file containing this component's\ntables.\n\nFollows the naming convention `schema-{number}-{domain}.prisma` where the\nnumber indicates dependency order and domain represents the business\narea.",
177
354
  type: "string",
178
- pattern: "^[a-z][a-z0-9_]*$"
355
+ pattern: "^[a-zA-Z0-9._-]+\\.prisma$"
179
356
  },
180
- minItems: 1
181
- }
182
- },
183
- required: [
184
- "filename",
185
- "namespace",
186
- "thinking",
187
- "review",
188
- "rationale",
189
- "tables"
190
- ]
357
+ namespace: {
358
+ description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\"",
359
+ type: "string"
360
+ },
361
+ thinking: {
362
+ description: "Initial thoughts on why these tables belong together.\n\n**Example:**\n\n \"These tables all relate to user management and authentication.\n They share common patterns like user identification and access control.\"",
363
+ type: "string"
364
+ },
365
+ review: {
366
+ description: "Review considerations for this component grouping.\n\n**Example:**\n\n \"Reviewed relationships with other domains. While customers create orders,\n the customer entity itself is fundamentally about user identity, not sales.\"",
367
+ type: "string"
368
+ },
369
+ rationale: {
370
+ description: "Final rationale for this component's composition.\n\n**Example:**\n\n \"This component groups all actor-related tables to maintain a clear\n separation between identity management and business transactions.\"",
371
+ type: "string"
372
+ },
373
+ tables: {
374
+ description: "Array of table names that will be included in this component's schema\nfile.\n\nContains all database table names that belong to this business domain,\nensuring logical grouping and proper organization of related data\nstructures.",
375
+ type: "array",
376
+ items: {
377
+ type: "string",
378
+ pattern: "^[a-z][a-z0-9_]*$"
379
+ },
380
+ minItems: 1
381
+ }
382
+ },
383
+ required: [
384
+ "filename",
385
+ "namespace",
386
+ "thinking",
387
+ "review",
388
+ "rationale",
389
+ "tables"
390
+ ]
391
+ }
191
392
  }
192
- }
193
- },
194
- description: "Organizes database tables into domain-based components for Prisma schema\ngeneration.\n\nTakes business requirements and groups related tables into logical domains,\nwith each component becoming a separate .prisma file.",
195
- validate: (() => { const _io0 = input => "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.decision && (Array.isArray(input.components) && (1 <= input.components.length && input.components.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.rationale && (Array.isArray(input.tables) && (1 <= input.tables.length && input.tables.every(elem => "string" === typeof elem && RegExp("^[a-z][a-z0-9_]*$").test(elem)))); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
196
- path: _path + ".thinking",
197
- expected: "string",
198
- value: input.thinking
199
- }), "string" === typeof input.review || _report(_exceptionable, {
200
- path: _path + ".review",
201
- expected: "string",
202
- value: input.review
203
- }), "string" === typeof input.decision || _report(_exceptionable, {
204
- path: _path + ".decision",
205
- expected: "string",
206
- value: input.decision
207
- }), (Array.isArray(input.components) || _report(_exceptionable, {
208
- path: _path + ".components",
209
- expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
210
- value: input.components
211
- })) && ((1 <= input.components.length || _report(_exceptionable, {
212
- path: _path + ".components",
213
- expected: "Array<> & MinItems<1>",
214
- value: input.components
215
- })) && input.components.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
216
- path: _path + ".components[" + _index3 + "]",
217
- expected: "AutoBePrisma.IComponent",
218
- value: elem
219
- })) && _vo1(elem, _path + ".components[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
220
- path: _path + ".components[" + _index3 + "]",
221
- expected: "AutoBePrisma.IComponent",
222
- value: elem
223
- })).every(flag => flag)) || _report(_exceptionable, {
224
- path: _path + ".components",
225
- expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
226
- value: input.components
227
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
228
- path: _path + ".filename",
229
- expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
230
- value: input.filename
231
- })) || _report(_exceptionable, {
232
- path: _path + ".filename",
233
- expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
234
- value: input.filename
235
- }), "string" === typeof input.namespace || _report(_exceptionable, {
236
- path: _path + ".namespace",
237
- expected: "string",
238
- value: input.namespace
239
- }), "string" === typeof input.thinking || _report(_exceptionable, {
240
- path: _path + ".thinking",
241
- expected: "string",
242
- value: input.thinking
243
- }), "string" === typeof input.review || _report(_exceptionable, {
244
- path: _path + ".review",
245
- expected: "string",
246
- value: input.review
247
- }), "string" === typeof input.rationale || _report(_exceptionable, {
248
- path: _path + ".rationale",
249
- expected: "string",
250
- value: input.rationale
251
- }), (Array.isArray(input.tables) || _report(_exceptionable, {
252
- path: _path + ".tables",
253
- expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
254
- value: input.tables
255
- })) && ((1 <= input.tables.length || _report(_exceptionable, {
256
- path: _path + ".tables",
257
- expected: "Array<> & MinItems<1>",
258
- value: input.tables
259
- })) && input.tables.map((elem, _index4) => "string" === typeof elem && (RegExp("^[a-z][a-z0-9_]*$").test(elem) || _report(_exceptionable, {
260
- path: _path + ".tables[" + _index4 + "]",
261
- expected: "string & SnakeCasePattern",
262
- value: elem
263
- })) || _report(_exceptionable, {
264
- path: _path + ".tables[" + _index4 + "]",
265
- expected: "(string & SnakeCasePattern)",
266
- value: elem
267
- })).every(flag => flag)) || _report(_exceptionable, {
268
- path: _path + ".tables",
269
- expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
270
- value: input.tables
271
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
272
- if (false === __is(input)) {
273
- errors = [];
274
- _report = __typia_transform__validateReport._validateReport(errors);
275
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
276
- path: _path + "",
277
- expected: "IAutoBePrismaComponentApplication.IProps",
278
- value: input
279
- })) && _vo0(input, _path + "", true) || _report(true, {
280
- path: _path + "",
281
- expected: "IAutoBePrismaComponentApplication.IProps",
282
- value: input
283
- }))(input, "$input", true);
284
- const success = 0 === errors.length;
285
- return success ? {
286
- success,
287
- data: input
288
- } : {
289
- success,
290
- errors,
393
+ },
394
+ description: "Organizes database tables into domain-based components for Prisma schema\ngeneration.\n\nTakes business requirements and groups related tables into logical domains,\nwith each component becoming a separate .prisma file.",
395
+ validate: (() => { const _io0 = input => "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.decision && (Array.isArray(input.components) && (1 <= input.components.length && input.components.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && "string" === typeof input.thinking && "string" === typeof input.review && "string" === typeof input.rationale && (Array.isArray(input.tables) && (1 <= input.tables.length && input.tables.every(elem => "string" === typeof elem && RegExp("^[a-z][a-z0-9_]*$").test(elem)))); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
396
+ path: _path + ".thinking",
397
+ expected: "string",
398
+ value: input.thinking
399
+ }), "string" === typeof input.review || _report(_exceptionable, {
400
+ path: _path + ".review",
401
+ expected: "string",
402
+ value: input.review
403
+ }), "string" === typeof input.decision || _report(_exceptionable, {
404
+ path: _path + ".decision",
405
+ expected: "string",
406
+ value: input.decision
407
+ }), (Array.isArray(input.components) || _report(_exceptionable, {
408
+ path: _path + ".components",
409
+ expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
410
+ value: input.components
411
+ })) && ((1 <= input.components.length || _report(_exceptionable, {
412
+ path: _path + ".components",
413
+ expected: "Array<> & MinItems<1>",
414
+ value: input.components
415
+ })) && input.components.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
416
+ path: _path + ".components[" + _index3 + "]",
417
+ expected: "AutoBePrisma.IComponent",
418
+ value: elem
419
+ })) && _vo1(elem, _path + ".components[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
420
+ path: _path + ".components[" + _index3 + "]",
421
+ expected: "AutoBePrisma.IComponent",
422
+ value: elem
423
+ })).every(flag => flag)) || _report(_exceptionable, {
424
+ path: _path + ".components",
425
+ expected: "(Array<AutoBePrisma.IComponent> & MinItems<1>)",
426
+ value: input.components
427
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
428
+ path: _path + ".filename",
429
+ expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
430
+ value: input.filename
431
+ })) || _report(_exceptionable, {
432
+ path: _path + ".filename",
433
+ expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
434
+ value: input.filename
435
+ }), "string" === typeof input.namespace || _report(_exceptionable, {
436
+ path: _path + ".namespace",
437
+ expected: "string",
438
+ value: input.namespace
439
+ }), "string" === typeof input.thinking || _report(_exceptionable, {
440
+ path: _path + ".thinking",
441
+ expected: "string",
442
+ value: input.thinking
443
+ }), "string" === typeof input.review || _report(_exceptionable, {
444
+ path: _path + ".review",
445
+ expected: "string",
446
+ value: input.review
447
+ }), "string" === typeof input.rationale || _report(_exceptionable, {
448
+ path: _path + ".rationale",
449
+ expected: "string",
450
+ value: input.rationale
451
+ }), (Array.isArray(input.tables) || _report(_exceptionable, {
452
+ path: _path + ".tables",
453
+ expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
454
+ value: input.tables
455
+ })) && ((1 <= input.tables.length || _report(_exceptionable, {
456
+ path: _path + ".tables",
457
+ expected: "Array<> & MinItems<1>",
458
+ value: input.tables
459
+ })) && input.tables.map((elem, _index4) => "string" === typeof elem && (RegExp("^[a-z][a-z0-9_]*$").test(elem) || _report(_exceptionable, {
460
+ path: _path + ".tables[" + _index4 + "]",
461
+ expected: "string & SnakeCasePattern",
462
+ value: elem
463
+ })) || _report(_exceptionable, {
464
+ path: _path + ".tables[" + _index4 + "]",
465
+ expected: "(string & SnakeCasePattern)",
466
+ value: elem
467
+ })).every(flag => flag)) || _report(_exceptionable, {
468
+ path: _path + ".tables",
469
+ expected: "(Array<string & SnakeCasePattern> & MinItems<1>)",
470
+ value: input.tables
471
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
472
+ if (false === __is(input)) {
473
+ errors = [];
474
+ _report = __typia_transform__validateReport._validateReport(errors);
475
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
476
+ path: _path + "",
477
+ expected: "IAutoBePrismaComponentApplication.IProps",
478
+ value: input
479
+ })) && _vo0(input, _path + "", true) || _report(true, {
480
+ path: _path + "",
481
+ expected: "IAutoBePrismaComponentApplication.IProps",
482
+ value: input
483
+ }))(input, "$input", true);
484
+ const success = 0 === errors.length;
485
+ return success ? {
486
+ success,
487
+ data: input
488
+ } : {
489
+ success,
490
+ errors,
491
+ data: input
492
+ };
493
+ }
494
+ return {
495
+ success: true,
291
496
  data: input
292
497
  };
293
- }
294
- return {
295
- success: true,
296
- data: input
297
- };
298
- }; })()
299
- }
300
- ]
301
- };
302
- const collection = {
303
- chatgpt: {
304
- model: "chatgpt",
498
+ }; })()
499
+ }
500
+ ]
501
+ },
502
+ gemini: {
503
+ model: "gemini",
305
504
  options: {
306
505
  reference: true,
307
- strict: false,
308
506
  separate: null
309
507
  },
310
508
  functions: [
@@ -494,9 +692,5 @@ const collection = {
494
692
  }
495
693
  ]
496
694
  },
497
- claude,
498
- llama: claude,
499
- deepseek: claude,
500
- "3.1": claude,
501
695
  };
502
696
  //# sourceMappingURL=orchestratePrismaComponent.js.map