@autobe/agent 0.9.2 → 0.10.1

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 (168) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  6. package/lib/context/AutoBeTokenUsage.js +56 -1
  7. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +288 -653
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4225 -6681
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  19. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  20. package/lib/orchestrate/index.d.ts +2 -2
  21. package/lib/orchestrate/index.js +4 -4
  22. package/lib/orchestrate/index.js.map +1 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
  24. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
  26. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
  28. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
  30. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  32. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
  34. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
  38. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  40. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  42. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  43. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
  45. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  49. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  50. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  52. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
  53. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  54. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  55. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  56. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  57. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  58. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  59. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  60. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  61. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  62. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  63. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  64. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  65. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  66. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  67. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  68. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  69. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  70. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  71. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  72. package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
  73. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  74. package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
  75. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
  78. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  79. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  80. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  81. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  82. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  83. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  86. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  88. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  89. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  92. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  93. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  94. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  95. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  96. package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
  97. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  98. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  99. package/lib/utils/backoffRetry.d.ts +4 -7
  100. package/lib/utils/backoffRetry.js +19 -37
  101. package/lib/utils/backoffRetry.js.map +1 -1
  102. package/lib/utils/forceRetry.d.ts +1 -0
  103. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  104. package/lib/utils/forceRetry.js.map +1 -0
  105. package/package.json +9 -12
  106. package/src/AutoBeAgent.ts +17 -3
  107. package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
  108. package/src/context/AutoBeTokenUsage.ts +85 -1
  109. package/src/factory/createAutoBeApplication.ts +2 -3
  110. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  111. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  112. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  113. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  114. package/src/orchestrate/index.ts +2 -2
  115. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  117. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  118. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  119. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  120. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  121. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  122. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  123. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  124. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  125. package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
  126. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
  127. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  130. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  131. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  132. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  133. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  134. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  135. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  136. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  137. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  138. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  139. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  140. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  141. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  142. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  143. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  144. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  145. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  146. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  147. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  148. package/src/structures/IAutoBeConfig.ts +9 -0
  149. package/src/utils/backoffRetry.ts +25 -36
  150. package/src/utils/forceRetry.ts +13 -0
  151. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  152. package/lib/factory/invertOpenApiDocument.js +0 -51
  153. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  154. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  155. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  156. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  157. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  158. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  159. package/lib/utils/StringUtil.d.ts +0 -4
  160. package/lib/utils/StringUtil.js +0 -43
  161. package/lib/utils/StringUtil.js.map +0 -1
  162. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  163. package/lib/utils/types/BackoffOptions.js.map +0 -1
  164. package/src/factory/invertOpenApiDocument.ts +0 -63
  165. package/src/orchestrate/orchestrateRealize.ts +0 -18
  166. package/src/utils/StringUtil.ts +0 -45
  167. package/src/utils/types/BackoffOptions.ts +0 -15
  168. /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
@@ -91,9 +91,10 @@ function step(ctx, application, life) {
91
91
  const agentica = new core_1.MicroAgentica({
92
92
  model: ctx.model,
93
93
  vendor: ctx.vendor,
94
- config: Object.assign({}, ((_c = ctx.config) !== null && _c !== void 0 ? _c : {})),
94
+ config: Object.assign(Object.assign({}, ((_c = ctx.config) !== null && _c !== void 0 ? _c : {})), { executor: {
95
+ describe: null,
96
+ } }),
95
97
  histories: (0, transformPrismaCorrectHistories_1.transformPrismaCorrectHistories)(result),
96
- tokenUsage: ctx.usage(),
97
98
  controllers: [
98
99
  createApplication({
99
100
  model: ctx.model,
@@ -105,7 +106,12 @@ function step(ctx, application, life) {
105
106
  });
106
107
  (0, enforceToolCall_1.enforceToolCall)(agentica);
107
108
  // REQUEST CORRECTION
108
- yield agentica.conversate("Resolve the compilation errors in the provided Prisma schema files.");
109
+ yield agentica
110
+ .conversate("Resolve the compilation errors in the provided Prisma schema files.")
111
+ .finally(() => {
112
+ const tokenUsage = agentica.getTokenUsage();
113
+ ctx.usage().record(tokenUsage, ["prisma"]);
114
+ });
109
115
  if (pointer.value === null) {
110
116
  console.error("Unreachable error: PrismaCompilerAgent.pointer.value is null");
111
117
  return result; // unreachable
@@ -168,261 +174,7 @@ const claude = {
168
174
  description: "ONLY the specific models that contain validation errors and need\ncorrection.\n\n\uD83D\uDCE5 Input Structure:\n\n- Contains ONLY models mentioned in IAutoBePrismaValidation.IError[] array\n- Each model has specific validation errors that need targeted correction\n- Models not mentioned in errors are excluded from this input\n- Represents minimal scope for error correction\n\n\uD83D\uDD0D Expected Validation Issues (Model-Specific):\n\n- Duplicate field/relation names within these specific models\n- Invalid foreign key references from these models to other models\n- Single foreign key fields in index arrays within these models\n- Invalid naming conventions within these specific models\n- Type validation errors in fields of these models\n\n\uD83D\uDCDD Model Content Analysis (Targeted Scope):\n\n- Complete field definitions for each error model only\n- Relationships from these models (may reference unchanged models)\n- Indexes within these models that need correction\n- Business descriptions specific to these models\n- Cross-model references that need validation (read-only for targets)\n\n\u26A0\uFE0F Processing Notes (Focused Approach):\n\n- Input contains ONLY models with validation errors\n- May reference other models not included in this input\n- Cross-model references must be validated but target models won't be\n modified\n- Output should return corrected versions of ONLY these input models\n- All business logic and descriptions within these models must be preserved\n- Corrections must not break references from unchanged models\n\n\uD83C\uDFAF Correction Scope:\n\n- Fix validation errors within these specific models\n- Update internal model structure (fields, relations, indexes)\n- Correct references to external models (without modifying targets)\n- Maintain compatibility with unchanged models in the full schema\n- Return corrected versions of ONLY these models",
169
175
  type: "array",
170
176
  items: {
171
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
172
- type: "object",
173
- properties: {
174
- name: {
175
- title: "Name of the Prisma model (database table name)",
176
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"",
177
- type: "string",
178
- pattern: "^[a-z][a-z0-9_]*$"
179
- },
180
- description: {
181
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
182
- type: "string"
183
- },
184
- material: {
185
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
186
- type: "boolean"
187
- },
188
- primaryField: {
189
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
190
- type: "object",
191
- properties: {
192
- name: {
193
- title: "Name of the primary key field",
194
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.",
195
- type: "string",
196
- pattern: "^[a-z][a-z0-9_]*$"
197
- },
198
- type: {
199
- title: "Data type of the primary key field",
200
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
201
- "const": "uuid"
202
- },
203
- description: {
204
- title: "Description of the primary key field's purpose",
205
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
206
- type: "string"
207
- }
208
- },
209
- required: [
210
- "name",
211
- "type",
212
- "description"
213
- ]
214
- },
215
- foreignFields: {
216
- title: "Array of foreign key fields that reference other models",
217
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
218
- type: "array",
219
- items: {
220
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
221
- type: "object",
222
- properties: {
223
- name: {
224
- title: "Name of the foreign key field",
225
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)",
226
- type: "string",
227
- pattern: "^[a-z][a-z0-9_]*$"
228
- },
229
- type: {
230
- title: "Data type of the foreign key field",
231
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
232
- "const": "uuid"
233
- },
234
- description: {
235
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
236
- type: "string"
237
- },
238
- relation: {
239
- title: "Prisma relation configuration defining the association details",
240
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
241
- type: "object",
242
- properties: {
243
- name: {
244
- title: "Name of the relation property in the Prisma model",
245
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"",
246
- type: "string",
247
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
248
- },
249
- targetModel: {
250
- title: "Name of the target model being referenced",
251
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
252
- type: "string"
253
- }
254
- },
255
- required: [
256
- "name",
257
- "targetModel"
258
- ]
259
- },
260
- unique: {
261
- title: "Whether this foreign key has a unique constraint",
262
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
263
- type: "boolean"
264
- },
265
- nullable: {
266
- title: "Whether this foreign key can be null (optional relationship)",
267
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
268
- type: "boolean"
269
- }
270
- },
271
- required: [
272
- "name",
273
- "type",
274
- "description",
275
- "relation",
276
- "unique",
277
- "nullable"
278
- ]
279
- }
280
- },
281
- plainFields: {
282
- title: "Array of regular data fields that don't reference other models",
283
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
284
- type: "array",
285
- items: {
286
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
287
- type: "object",
288
- properties: {
289
- name: {
290
- title: "Name of the field in the database table",
291
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
292
- type: "string",
293
- pattern: "^[a-z][a-z0-9_]*$"
294
- },
295
- type: {
296
- title: "Data type of the field for Prisma schema generation",
297
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
298
- oneOf: [
299
- {
300
- "const": "string"
301
- },
302
- {
303
- "const": "boolean"
304
- },
305
- {
306
- "const": "uuid"
307
- },
308
- {
309
- "const": "uri"
310
- },
311
- {
312
- "const": "int"
313
- },
314
- {
315
- "const": "double"
316
- },
317
- {
318
- "const": "datetime"
319
- }
320
- ]
321
- },
322
- description: {
323
- title: "Description explaining the business purpose and usage of this field",
324
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
325
- type: "string"
326
- },
327
- nullable: {
328
- title: "Whether this field can contain null values",
329
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
330
- type: "boolean"
331
- }
332
- },
333
- required: [
334
- "name",
335
- "type",
336
- "description",
337
- "nullable"
338
- ]
339
- }
340
- },
341
- uniqueIndexes: {
342
- title: "Array of unique indexes for enforcing data integrity constraints",
343
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
344
- type: "array",
345
- items: {
346
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
347
- type: "object",
348
- properties: {
349
- fieldNames: {
350
- title: "Array of field names that together form the unique constraint",
351
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
352
- type: "array",
353
- items: {
354
- type: "string"
355
- },
356
- minItems: 1,
357
- uniqueItems: true
358
- },
359
- unique: {
360
- title: "Explicit marker indicating this is a unique index",
361
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
362
- "const": true
363
- }
364
- },
365
- required: [
366
- "fieldNames",
367
- "unique"
368
- ]
369
- }
370
- },
371
- plainIndexes: {
372
- title: "Array of regular indexes for query performance optimization",
373
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
374
- type: "array",
375
- items: {
376
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
377
- type: "object",
378
- properties: {
379
- fieldNames: {
380
- title: "Array of field names to include in the performance index",
381
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
382
- type: "array",
383
- items: {
384
- type: "string"
385
- },
386
- minItems: 1,
387
- uniqueItems: true
388
- }
389
- },
390
- required: [
391
- "fieldNames"
392
- ]
393
- }
394
- },
395
- ginIndexes: {
396
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
397
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
398
- type: "array",
399
- items: {
400
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
401
- type: "object",
402
- properties: {
403
- fieldName: {
404
- title: "Name of the text field to index for full-text search capabilities",
405
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
406
- type: "string"
407
- }
408
- },
409
- required: [
410
- "fieldName"
411
- ]
412
- }
413
- }
414
- },
415
- required: [
416
- "name",
417
- "description",
418
- "material",
419
- "primaryField",
420
- "foreignFields",
421
- "plainFields",
422
- "uniqueIndexes",
423
- "plainIndexes",
424
- "ginIndexes"
425
- ]
177
+ $ref: "#/$defs/AutoBePrisma.IModel"
426
178
  }
427
179
  }
428
180
  },
@@ -431,7 +183,260 @@ const claude = {
431
183
  "models"
432
184
  ],
433
185
  additionalProperties: false,
434
- $defs: {}
186
+ $defs: {
187
+ "AutoBePrisma.IModel": {
188
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
189
+ type: "object",
190
+ properties: {
191
+ name: {
192
+ description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"",
193
+ type: "string",
194
+ pattern: "^[a-z][a-z0-9_]*$"
195
+ },
196
+ description: {
197
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
198
+ type: "string"
199
+ },
200
+ material: {
201
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
202
+ type: "boolean"
203
+ },
204
+ primaryField: {
205
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
206
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
207
+ },
208
+ foreignFields: {
209
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
210
+ type: "array",
211
+ items: {
212
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
213
+ }
214
+ },
215
+ plainFields: {
216
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
217
+ type: "array",
218
+ items: {
219
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
220
+ }
221
+ },
222
+ uniqueIndexes: {
223
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
224
+ type: "array",
225
+ items: {
226
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
227
+ }
228
+ },
229
+ plainIndexes: {
230
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
231
+ type: "array",
232
+ items: {
233
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
234
+ }
235
+ },
236
+ ginIndexes: {
237
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
238
+ type: "array",
239
+ items: {
240
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
241
+ }
242
+ }
243
+ },
244
+ required: [
245
+ "name",
246
+ "description",
247
+ "material",
248
+ "primaryField",
249
+ "foreignFields",
250
+ "plainFields",
251
+ "uniqueIndexes",
252
+ "plainIndexes",
253
+ "ginIndexes"
254
+ ]
255
+ },
256
+ "AutoBePrisma.IPrimaryField": {
257
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
258
+ type: "object",
259
+ properties: {
260
+ name: {
261
+ description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.",
262
+ type: "string",
263
+ pattern: "^[a-z][a-z0-9_]*$"
264
+ },
265
+ type: {
266
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
267
+ "const": "uuid"
268
+ },
269
+ description: {
270
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
271
+ type: "string"
272
+ }
273
+ },
274
+ required: [
275
+ "name",
276
+ "type",
277
+ "description"
278
+ ]
279
+ },
280
+ "AutoBePrisma.IForeignField": {
281
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
282
+ type: "object",
283
+ properties: {
284
+ name: {
285
+ description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)",
286
+ type: "string",
287
+ pattern: "^[a-z][a-z0-9_]*$"
288
+ },
289
+ type: {
290
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
291
+ "const": "uuid"
292
+ },
293
+ description: {
294
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
295
+ type: "string"
296
+ },
297
+ relation: {
298
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
299
+ type: "object",
300
+ properties: {
301
+ name: {
302
+ description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"",
303
+ type: "string",
304
+ pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
305
+ },
306
+ targetModel: {
307
+ description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
308
+ type: "string"
309
+ }
310
+ },
311
+ required: [
312
+ "name",
313
+ "targetModel"
314
+ ]
315
+ },
316
+ unique: {
317
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
318
+ type: "boolean"
319
+ },
320
+ nullable: {
321
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
322
+ type: "boolean"
323
+ }
324
+ },
325
+ required: [
326
+ "name",
327
+ "type",
328
+ "description",
329
+ "relation",
330
+ "unique",
331
+ "nullable"
332
+ ]
333
+ },
334
+ "AutoBePrisma.IPlainField": {
335
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
336
+ type: "object",
337
+ properties: {
338
+ name: {
339
+ description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
340
+ type: "string",
341
+ pattern: "^[a-z][a-z0-9_]*$"
342
+ },
343
+ type: {
344
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
345
+ oneOf: [
346
+ {
347
+ "const": "string"
348
+ },
349
+ {
350
+ "const": "boolean"
351
+ },
352
+ {
353
+ "const": "uuid"
354
+ },
355
+ {
356
+ "const": "uri"
357
+ },
358
+ {
359
+ "const": "int"
360
+ },
361
+ {
362
+ "const": "double"
363
+ },
364
+ {
365
+ "const": "datetime"
366
+ }
367
+ ]
368
+ },
369
+ description: {
370
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
371
+ type: "string"
372
+ },
373
+ nullable: {
374
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
375
+ type: "boolean"
376
+ }
377
+ },
378
+ required: [
379
+ "name",
380
+ "type",
381
+ "description",
382
+ "nullable"
383
+ ]
384
+ },
385
+ "AutoBePrisma.IUniqueIndex": {
386
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
387
+ type: "object",
388
+ properties: {
389
+ fieldNames: {
390
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
391
+ type: "array",
392
+ items: {
393
+ type: "string"
394
+ },
395
+ minItems: 1,
396
+ uniqueItems: true
397
+ },
398
+ unique: {
399
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
400
+ "const": true
401
+ }
402
+ },
403
+ required: [
404
+ "fieldNames",
405
+ "unique"
406
+ ]
407
+ },
408
+ "AutoBePrisma.IPlainIndex": {
409
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
410
+ type: "object",
411
+ properties: {
412
+ fieldNames: {
413
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
414
+ type: "array",
415
+ items: {
416
+ type: "string"
417
+ },
418
+ minItems: 1,
419
+ uniqueItems: true
420
+ }
421
+ },
422
+ required: [
423
+ "fieldNames"
424
+ ]
425
+ },
426
+ "AutoBePrisma.IGinIndex": {
427
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
428
+ type: "object",
429
+ properties: {
430
+ fieldName: {
431
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
432
+ type: "string"
433
+ }
434
+ },
435
+ required: [
436
+ "fieldName"
437
+ ]
438
+ }
439
+ }
435
440
  },
436
441
  description: "Fixes validation errors in specific AutoBePrisma models while preserving\nALL existing business logic and model descriptions.\n\n## Core Rules\n\n1. Fix ONLY validation errors in provided models - never remove business\n descriptions\n2. Apply minimal changes to error models only - preserve original design\n intent\n3. Return ONLY corrected models - unchanged models remain in original schema\n4. Maintain referential integrity with unchanged models\n\n## Targeted Scope\n\n- Process ONLY models with validation errors from IError[] array\n- Exclude models without errors from processing and output\n- Minimize context usage by returning corrected models only\n- Preserve unchanged models in their original state\n\n## Fix Strategy\n\n- Resolve validation errors within specific models only\n- Fix field duplications, invalid references, and type mismatches\n- Update cross-model references without modifying target models\n- Ensure naming conventions and index rules compliance in corrected models",
437
442
  validate: (() => { const _io0 = input => "string" === typeof input.planning && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.planning || _report(_exceptionable, {
@@ -740,248 +745,7 @@ const collection = {
740
745
  description: "ONLY the specific models that contain validation errors and need\ncorrection.\n\n\uD83D\uDCE5 Input Structure:\n\n- Contains ONLY models mentioned in IAutoBePrismaValidation.IError[] array\n- Each model has specific validation errors that need targeted correction\n- Models not mentioned in errors are excluded from this input\n- Represents minimal scope for error correction\n\n\uD83D\uDD0D Expected Validation Issues (Model-Specific):\n\n- Duplicate field/relation names within these specific models\n- Invalid foreign key references from these models to other models\n- Single foreign key fields in index arrays within these models\n- Invalid naming conventions within these specific models\n- Type validation errors in fields of these models\n\n\uD83D\uDCDD Model Content Analysis (Targeted Scope):\n\n- Complete field definitions for each error model only\n- Relationships from these models (may reference unchanged models)\n- Indexes within these models that need correction\n- Business descriptions specific to these models\n- Cross-model references that need validation (read-only for targets)\n\n\u26A0\uFE0F Processing Notes (Focused Approach):\n\n- Input contains ONLY models with validation errors\n- May reference other models not included in this input\n- Cross-model references must be validated but target models won't be\n modified\n- Output should return corrected versions of ONLY these input models\n- All business logic and descriptions within these models must be preserved\n- Corrections must not break references from unchanged models\n\n\uD83C\uDFAF Correction Scope:\n\n- Fix validation errors within these specific models\n- Update internal model structure (fields, relations, indexes)\n- Correct references to external models (without modifying targets)\n- Maintain compatibility with unchanged models in the full schema\n- Return corrected versions of ONLY these models",
741
746
  type: "array",
742
747
  items: {
743
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
744
- type: "object",
745
- properties: {
746
- name: {
747
- title: "Name of the Prisma model (database table name)",
748
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
749
- type: "string"
750
- },
751
- description: {
752
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
753
- type: "string"
754
- },
755
- material: {
756
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
757
- type: "boolean"
758
- },
759
- primaryField: {
760
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
761
- type: "object",
762
- properties: {
763
- name: {
764
- title: "Name of the primary key field",
765
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
766
- type: "string"
767
- },
768
- type: {
769
- title: "Data type of the primary key field",
770
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
771
- type: "string",
772
- "enum": [
773
- "uuid"
774
- ]
775
- },
776
- description: {
777
- title: "Description of the primary key field's purpose",
778
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
779
- type: "string"
780
- }
781
- },
782
- required: [
783
- "name",
784
- "type",
785
- "description"
786
- ]
787
- },
788
- foreignFields: {
789
- title: "Array of foreign key fields that reference other models",
790
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
791
- type: "array",
792
- items: {
793
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
794
- type: "object",
795
- properties: {
796
- name: {
797
- title: "Name of the foreign key field",
798
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
799
- type: "string"
800
- },
801
- type: {
802
- title: "Data type of the foreign key field",
803
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
804
- type: "string",
805
- "enum": [
806
- "uuid"
807
- ]
808
- },
809
- description: {
810
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
811
- type: "string"
812
- },
813
- relation: {
814
- title: "Prisma relation configuration defining the association details",
815
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
816
- type: "object",
817
- properties: {
818
- name: {
819
- title: "Name of the relation property in the Prisma model",
820
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"\n\n\n@pattern ^[a-zA-Z_][a-zA-Z0-9_]*$",
821
- type: "string"
822
- },
823
- targetModel: {
824
- title: "Name of the target model being referenced",
825
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
826
- type: "string"
827
- }
828
- },
829
- required: [
830
- "name",
831
- "targetModel"
832
- ]
833
- },
834
- unique: {
835
- title: "Whether this foreign key has a unique constraint",
836
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
837
- type: "boolean"
838
- },
839
- nullable: {
840
- title: "Whether this foreign key can be null (optional relationship)",
841
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
842
- type: "boolean"
843
- }
844
- },
845
- required: [
846
- "name",
847
- "type",
848
- "description",
849
- "relation",
850
- "unique",
851
- "nullable"
852
- ]
853
- }
854
- },
855
- plainFields: {
856
- title: "Array of regular data fields that don't reference other models",
857
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
858
- type: "array",
859
- items: {
860
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
861
- type: "object",
862
- properties: {
863
- name: {
864
- title: "Name of the field in the database table",
865
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
866
- type: "string"
867
- },
868
- type: {
869
- title: "Data type of the field for Prisma schema generation",
870
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
871
- type: "string",
872
- "enum": [
873
- "string",
874
- "boolean",
875
- "uuid",
876
- "uri",
877
- "int",
878
- "double",
879
- "datetime"
880
- ]
881
- },
882
- description: {
883
- title: "Description explaining the business purpose and usage of this field",
884
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
885
- type: "string"
886
- },
887
- nullable: {
888
- title: "Whether this field can contain null values",
889
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
890
- type: "boolean"
891
- }
892
- },
893
- required: [
894
- "name",
895
- "type",
896
- "description",
897
- "nullable"
898
- ]
899
- }
900
- },
901
- uniqueIndexes: {
902
- title: "Array of unique indexes for enforcing data integrity constraints",
903
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
904
- type: "array",
905
- items: {
906
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
907
- type: "object",
908
- properties: {
909
- fieldNames: {
910
- title: "Array of field names that together form the unique constraint",
911
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
912
- type: "array",
913
- items: {
914
- type: "string"
915
- }
916
- },
917
- unique: {
918
- title: "Explicit marker indicating this is a unique index",
919
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
920
- type: "boolean",
921
- "enum": [
922
- true
923
- ]
924
- }
925
- },
926
- required: [
927
- "fieldNames",
928
- "unique"
929
- ]
930
- }
931
- },
932
- plainIndexes: {
933
- title: "Array of regular indexes for query performance optimization",
934
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
935
- type: "array",
936
- items: {
937
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
938
- type: "object",
939
- properties: {
940
- fieldNames: {
941
- title: "Array of field names to include in the performance index",
942
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
943
- type: "array",
944
- items: {
945
- type: "string"
946
- }
947
- }
948
- },
949
- required: [
950
- "fieldNames"
951
- ]
952
- }
953
- },
954
- ginIndexes: {
955
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
956
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
957
- type: "array",
958
- items: {
959
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
960
- type: "object",
961
- properties: {
962
- fieldName: {
963
- title: "Name of the text field to index for full-text search capabilities",
964
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
965
- type: "string"
966
- }
967
- },
968
- required: [
969
- "fieldName"
970
- ]
971
- }
972
- }
973
- },
974
- required: [
975
- "name",
976
- "description",
977
- "material",
978
- "primaryField",
979
- "foreignFields",
980
- "plainFields",
981
- "uniqueIndexes",
982
- "plainIndexes",
983
- "ginIndexes"
984
- ]
748
+ $ref: "#/$defs/AutoBePrisma.IModel"
985
749
  }
986
750
  }
987
751
  },
@@ -990,585 +754,246 @@ const collection = {
990
754
  "models"
991
755
  ],
992
756
  additionalProperties: false,
993
- $defs: {}
994
- },
995
- description: "Fixes validation errors in specific AutoBePrisma models while preserving\nALL existing business logic and model descriptions.\n\n## Core Rules\n\n1. Fix ONLY validation errors in provided models - never remove business\n descriptions\n2. Apply minimal changes to error models only - preserve original design\n intent\n3. Return ONLY corrected models - unchanged models remain in original schema\n4. Maintain referential integrity with unchanged models\n\n## Targeted Scope\n\n- Process ONLY models with validation errors from IError[] array\n- Exclude models without errors from processing and output\n- Minimize context usage by returning corrected models only\n- Preserve unchanged models in their original state\n\n## Fix Strategy\n\n- Resolve validation errors within specific models only\n- Fix field duplications, invalid references, and type mismatches\n- Update cross-model references without modifying target models\n- Ensure naming conventions and index rules compliance in corrected models",
996
- validate: (() => { const _io0 = input => "string" === typeof input.planning && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.planning || _report(_exceptionable, {
997
- path: _path + ".planning",
998
- expected: "string",
999
- value: input.planning
1000
- }), (Array.isArray(input.models) || _report(_exceptionable, {
1001
- path: _path + ".models",
1002
- expected: "Array<AutoBePrisma.IModel>",
1003
- value: input.models
1004
- })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1005
- path: _path + ".models[" + _index9 + "]",
1006
- expected: "AutoBePrisma.IModel",
1007
- value: elem
1008
- })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1009
- path: _path + ".models[" + _index9 + "]",
1010
- expected: "AutoBePrisma.IModel",
1011
- value: elem
1012
- })).every(flag => flag) || _report(_exceptionable, {
1013
- path: _path + ".models",
1014
- expected: "Array<AutoBePrisma.IModel>",
1015
- value: input.models
1016
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1017
- path: _path + ".name",
1018
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1019
- value: input.name
1020
- })) || _report(_exceptionable, {
1021
- path: _path + ".name",
1022
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1023
- value: input.name
1024
- }), "string" === typeof input.description || _report(_exceptionable, {
1025
- path: _path + ".description",
1026
- expected: "string",
1027
- value: input.description
1028
- }), "boolean" === typeof input.material || _report(_exceptionable, {
1029
- path: _path + ".material",
1030
- expected: "boolean",
1031
- value: input.material
1032
- }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1033
- path: _path + ".primaryField",
1034
- expected: "AutoBePrisma.IPrimaryField",
1035
- value: input.primaryField
1036
- })) && _vo2(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1037
- path: _path + ".primaryField",
1038
- expected: "AutoBePrisma.IPrimaryField",
1039
- value: input.primaryField
1040
- }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1041
- path: _path + ".foreignFields",
1042
- expected: "Array<AutoBePrisma.IForeignField>",
1043
- value: input.foreignFields
1044
- })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1045
- path: _path + ".foreignFields[" + _index10 + "]",
1046
- expected: "AutoBePrisma.IForeignField",
1047
- value: elem
1048
- })) && _vo3(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
1049
- path: _path + ".foreignFields[" + _index10 + "]",
1050
- expected: "AutoBePrisma.IForeignField",
1051
- value: elem
1052
- })).every(flag => flag) || _report(_exceptionable, {
1053
- path: _path + ".foreignFields",
1054
- expected: "Array<AutoBePrisma.IForeignField>",
1055
- value: input.foreignFields
1056
- }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1057
- path: _path + ".plainFields",
1058
- expected: "Array<AutoBePrisma.IPlainField>",
1059
- value: input.plainFields
1060
- })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1061
- path: _path + ".plainFields[" + _index11 + "]",
1062
- expected: "AutoBePrisma.IPlainField",
1063
- value: elem
1064
- })) && _vo5(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1065
- path: _path + ".plainFields[" + _index11 + "]",
1066
- expected: "AutoBePrisma.IPlainField",
1067
- value: elem
1068
- })).every(flag => flag) || _report(_exceptionable, {
1069
- path: _path + ".plainFields",
1070
- expected: "Array<AutoBePrisma.IPlainField>",
1071
- value: input.plainFields
1072
- }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1073
- path: _path + ".uniqueIndexes",
1074
- expected: "Array<AutoBePrisma.IUniqueIndex>",
1075
- value: input.uniqueIndexes
1076
- })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1077
- path: _path + ".uniqueIndexes[" + _index12 + "]",
1078
- expected: "AutoBePrisma.IUniqueIndex",
1079
- value: elem
1080
- })) && _vo6(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1081
- path: _path + ".uniqueIndexes[" + _index12 + "]",
1082
- expected: "AutoBePrisma.IUniqueIndex",
1083
- value: elem
1084
- })).every(flag => flag) || _report(_exceptionable, {
1085
- path: _path + ".uniqueIndexes",
1086
- expected: "Array<AutoBePrisma.IUniqueIndex>",
1087
- value: input.uniqueIndexes
1088
- }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1089
- path: _path + ".plainIndexes",
1090
- expected: "Array<AutoBePrisma.IPlainIndex>",
1091
- value: input.plainIndexes
1092
- })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1093
- path: _path + ".plainIndexes[" + _index13 + "]",
1094
- expected: "AutoBePrisma.IPlainIndex",
1095
- value: elem
1096
- })) && _vo7(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1097
- path: _path + ".plainIndexes[" + _index13 + "]",
1098
- expected: "AutoBePrisma.IPlainIndex",
1099
- value: elem
1100
- })).every(flag => flag) || _report(_exceptionable, {
1101
- path: _path + ".plainIndexes",
1102
- expected: "Array<AutoBePrisma.IPlainIndex>",
1103
- value: input.plainIndexes
1104
- }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1105
- path: _path + ".ginIndexes",
1106
- expected: "Array<AutoBePrisma.IGinIndex>",
1107
- value: input.ginIndexes
1108
- })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1109
- path: _path + ".ginIndexes[" + _index14 + "]",
1110
- expected: "AutoBePrisma.IGinIndex",
1111
- value: elem
1112
- })) && _vo8(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1113
- path: _path + ".ginIndexes[" + _index14 + "]",
1114
- expected: "AutoBePrisma.IGinIndex",
1115
- value: elem
1116
- })).every(flag => flag) || _report(_exceptionable, {
1117
- path: _path + ".ginIndexes",
1118
- expected: "Array<AutoBePrisma.IGinIndex>",
1119
- value: input.ginIndexes
1120
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1121
- path: _path + ".name",
1122
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1123
- value: input.name
1124
- })) || _report(_exceptionable, {
1125
- path: _path + ".name",
1126
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1127
- value: input.name
1128
- }), "uuid" === input.type || _report(_exceptionable, {
1129
- path: _path + ".type",
1130
- expected: "\"uuid\"",
1131
- value: input.type
1132
- }), "string" === typeof input.description || _report(_exceptionable, {
1133
- path: _path + ".description",
1134
- expected: "string",
1135
- value: input.description
1136
- })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1137
- path: _path + ".name",
1138
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1139
- value: input.name
1140
- })) || _report(_exceptionable, {
1141
- path: _path + ".name",
1142
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1143
- value: input.name
1144
- }), "uuid" === input.type || _report(_exceptionable, {
1145
- path: _path + ".type",
1146
- expected: "\"uuid\"",
1147
- value: input.type
1148
- }), "string" === typeof input.description || _report(_exceptionable, {
1149
- path: _path + ".description",
1150
- expected: "string",
1151
- value: input.description
1152
- }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1153
- path: _path + ".relation",
1154
- expected: "__type",
1155
- value: input.relation
1156
- })) && _vo4(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1157
- path: _path + ".relation",
1158
- expected: "__type",
1159
- value: input.relation
1160
- }), "boolean" === typeof input.unique || _report(_exceptionable, {
1161
- path: _path + ".unique",
1162
- expected: "boolean",
1163
- value: input.unique
1164
- }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1165
- path: _path + ".nullable",
1166
- expected: "boolean",
1167
- value: input.nullable
1168
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) || _report(_exceptionable, {
1169
- path: _path + ".name",
1170
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1171
- value: input.name
1172
- })) || _report(_exceptionable, {
1173
- path: _path + ".name",
1174
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1175
- value: input.name
1176
- }), "string" === typeof input.targetModel || _report(_exceptionable, {
1177
- path: _path + ".targetModel",
1178
- expected: "string",
1179
- value: input.targetModel
1180
- })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1181
- path: _path + ".name",
1182
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1183
- value: input.name
1184
- })) || _report(_exceptionable, {
1185
- path: _path + ".name",
1186
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1187
- value: input.name
1188
- }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1189
- path: _path + ".type",
1190
- expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1191
- value: input.type
1192
- }), "string" === typeof input.description || _report(_exceptionable, {
1193
- path: _path + ".description",
1194
- expected: "string",
1195
- value: input.description
1196
- }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1197
- path: _path + ".nullable",
1198
- expected: "boolean",
1199
- value: input.nullable
1200
- })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1201
- path: _path + ".fieldNames",
1202
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1203
- value: input.fieldNames
1204
- })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1205
- path: _path + ".fieldNames",
1206
- expected: "Array<> & MinItems<1>",
1207
- value: input.fieldNames
1208
- })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1209
- path: _path + ".fieldNames",
1210
- expected: "Array<> & UniqueItems<true>",
1211
- value: input.fieldNames
1212
- })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
1213
- path: _path + ".fieldNames[" + _index15 + "]",
1214
- expected: "string",
1215
- value: elem
1216
- })).every(flag => flag)) || _report(_exceptionable, {
1217
- path: _path + ".fieldNames",
1218
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1219
- value: input.fieldNames
1220
- }), true === input.unique || _report(_exceptionable, {
1221
- path: _path + ".unique",
1222
- expected: "true",
1223
- value: input.unique
1224
- })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1225
- path: _path + ".fieldNames",
1226
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1227
- value: input.fieldNames
1228
- })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1229
- path: _path + ".fieldNames",
1230
- expected: "Array<> & MinItems<1>",
1231
- value: input.fieldNames
1232
- })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1233
- path: _path + ".fieldNames",
1234
- expected: "Array<> & UniqueItems<true>",
1235
- value: input.fieldNames
1236
- })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
1237
- path: _path + ".fieldNames[" + _index16 + "]",
1238
- expected: "string",
1239
- value: elem
1240
- })).every(flag => flag)) || _report(_exceptionable, {
1241
- path: _path + ".fieldNames",
1242
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1243
- value: input.fieldNames
1244
- })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1245
- path: _path + ".fieldName",
1246
- expected: "string",
1247
- value: input.fieldName
1248
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1249
- if (false === __is(input)) {
1250
- errors = [];
1251
- _report = __typia_transform__validateReport._validateReport(errors);
1252
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1253
- path: _path + "",
1254
- expected: "IModifyPrismaSchemaFilesProps",
1255
- value: input
1256
- })) && _vo0(input, _path + "", true) || _report(true, {
1257
- path: _path + "",
1258
- expected: "IModifyPrismaSchemaFilesProps",
1259
- value: input
1260
- }))(input, "$input", true);
1261
- const success = 0 === errors.length;
1262
- return success ? {
1263
- success,
1264
- data: input
1265
- } : {
1266
- success,
1267
- errors,
1268
- data: input
1269
- };
1270
- }
1271
- return {
1272
- success: true,
1273
- data: input
1274
- };
1275
- }; })()
1276
- }
1277
- ]
1278
- },
1279
- claude,
1280
- llama: claude,
1281
- deepseek: claude,
1282
- "3.1": claude,
1283
- "3.0": {
1284
- model: "3.0",
1285
- options: {
1286
- constraint: true,
1287
- recursive: 3,
1288
- separate: null
1289
- },
1290
- functions: [
1291
- {
1292
- name: "correctPrismaSchemaFiles",
1293
- parameters: {
1294
- type: "object",
1295
- properties: {
1296
- planning: {
1297
- type: "string",
1298
- description: "Detailed execution plan for fixing `AutoBePrisma` validation errors in\nspecific models.\n\n\uD83C\uDFAF Purpose: Enable systematic reasoning and step-by-step error resolution\napproach for targeted model validation issues\n\n\uD83D\uDCCB Required Planning Content:\n\n1. **Error Scope Analysis**\n\n - List all validation errors from IAutoBePrismaValidation.IError[] array\n - Extract unique table names from errors to identify affected models\n - Categorize errors by type (field duplications, references, types, indexes)\n - Identify which models need correction vs. which remain unchanged\n2. **Targeted Fix Strategy**\n\n - Focus ONLY on models mentioned in validation errors\n - Outline minimal changes needed for each affected model\n - Plan cross-model reference updates (if any) without modifying non-error\n models\n - Ensure unchanged models maintain valid references to corrected models\n3. **Model-Specific Fix Plan**\n\n - Model-by-model modification plan for ONLY affected models\n - Exact field additions, renames, or type corrections required\n - Reference updates within corrected models only\n - Index corrections limited to affected models\n4. **Minimal Scope Validation**\n\n - Confirm which models will be included in output (error models only)\n - List models that will remain unchanged in original schema\n - Identify cross-model dependencies without including unchanged models\n - Preserve all business logic within corrected models\n5. **Targeted Impact Assessment**\n\n - Potential effects of fixes on unchanged models (reference validation)\n - Verification points for corrected models only\n - Ensure no new validation errors in targeted models\n - Confirm minimal output scope compliance\n\n\uD83D\uDCA1 Example Planning Structure:\n\n ## Error Scope\n - Target Models: shopping_customers, shopping_orders (2 models only)\n - Unchanged Models: All others remain in original schema\n\n ## Targeted Fixes\n - shopping_customers: Remove duplicate 'email' field\n - shopping_orders: Update targetModel reference to 'shopping_customers'\n\n ## Output Scope\n - Return: Only shopping_customers and shopping_orders models\n - Preserve: All other models unchanged in original schema\n\n ## Cross-Model Impact\n - Verify: shopping_orders still references shopping_customers correctly\n - No changes needed in other models referencing these"
757
+ $defs: {
758
+ "AutoBePrisma.IModel": {
759
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)\n\n### Description of {@link primaryField} property:\n\n> The primary key field of the model.\n> \n> In all uploaded schemas, primary keys are always UUID type with \"@\\id\"\n> directive. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\n> mapping.",
760
+ type: "object",
761
+ properties: {
762
+ name: {
763
+ description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
764
+ type: "string"
765
+ },
766
+ description: {
767
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
768
+ type: "string"
769
+ },
770
+ material: {
771
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
772
+ type: "boolean"
773
+ },
774
+ primaryField: {
775
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
776
+ },
777
+ foreignFields: {
778
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
779
+ type: "array",
780
+ items: {
781
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
782
+ }
783
+ },
784
+ plainFields: {
785
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
786
+ type: "array",
787
+ items: {
788
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
789
+ }
790
+ },
791
+ uniqueIndexes: {
792
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
793
+ type: "array",
794
+ items: {
795
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
796
+ }
797
+ },
798
+ plainIndexes: {
799
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
800
+ type: "array",
801
+ items: {
802
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
803
+ }
804
+ },
805
+ ginIndexes: {
806
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
807
+ type: "array",
808
+ items: {
809
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
810
+ }
811
+ }
812
+ },
813
+ required: [
814
+ "name",
815
+ "description",
816
+ "material",
817
+ "primaryField",
818
+ "foreignFields",
819
+ "plainFields",
820
+ "uniqueIndexes",
821
+ "plainIndexes",
822
+ "ginIndexes"
823
+ ]
1299
824
  },
1300
- models: {
1301
- type: "array",
1302
- items: {
1303
- type: "object",
1304
- properties: {
1305
- name: {
1306
- type: "string",
1307
- pattern: "^[a-z][a-z0-9_]*$",
1308
- title: "Name of the Prisma model (database table name)",
1309
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\""
1310
- },
1311
- description: {
1312
- type: "string",
1313
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\""
1314
- },
1315
- material: {
1316
- type: "boolean",
1317
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices"
1318
- },
1319
- primaryField: {
1320
- type: "object",
1321
- properties: {
1322
- name: {
1323
- type: "string",
1324
- pattern: "^[a-z][a-z0-9_]*$",
1325
- title: "Name of the primary key field",
1326
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table."
1327
- },
1328
- type: {
1329
- type: "string",
1330
- "enum": [
1331
- "uuid"
1332
- ],
1333
- title: "Data type of the primary key field",
1334
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation."
1335
- },
1336
- description: {
1337
- type: "string",
1338
- title: "Description of the primary key field's purpose",
1339
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance."
1340
- }
1341
- },
1342
- required: [
1343
- "name",
1344
- "type",
1345
- "description"
1346
- ],
1347
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
1348
- additionalProperties: false
1349
- },
1350
- foreignFields: {
1351
- type: "array",
1352
- items: {
1353
- type: "object",
1354
- properties: {
1355
- name: {
1356
- type: "string",
1357
- pattern: "^[a-z][a-z0-9_]*$",
1358
- title: "Name of the foreign key field",
1359
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)"
1360
- },
1361
- type: {
1362
- type: "string",
1363
- "enum": [
1364
- "uuid"
1365
- ],
1366
- title: "Data type of the foreign key field",
1367
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema."
1368
- },
1369
- description: {
1370
- type: "string",
1371
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning."
1372
- },
1373
- relation: {
1374
- type: "object",
1375
- properties: {
1376
- name: {
1377
- type: "string",
1378
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$",
1379
- title: "Name of the relation property in the Prisma model",
1380
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\""
1381
- },
1382
- targetModel: {
1383
- type: "string",
1384
- title: "Name of the target model being referenced",
1385
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\""
1386
- }
1387
- },
1388
- required: [
1389
- "name",
1390
- "targetModel"
1391
- ],
1392
- title: "Prisma relation configuration defining the association details",
1393
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
1394
- additionalProperties: false
1395
- },
1396
- unique: {
1397
- type: "boolean",
1398
- title: "Whether this foreign key has a unique constraint",
1399
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality."
1400
- },
1401
- nullable: {
1402
- type: "boolean",
1403
- title: "Whether this foreign key can be null (optional relationship)",
1404
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations."
1405
- }
1406
- },
1407
- required: [
1408
- "name",
1409
- "type",
1410
- "description",
1411
- "relation",
1412
- "unique",
1413
- "nullable"
1414
- ],
1415
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
1416
- additionalProperties: false
1417
- },
1418
- title: "Array of foreign key fields that reference other models",
1419
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships."
1420
- },
1421
- plainFields: {
1422
- type: "array",
1423
- items: {
1424
- type: "object",
1425
- properties: {
1426
- name: {
1427
- type: "string",
1428
- pattern: "^[a-z][a-z0-9_]*$",
1429
- title: "Name of the field in the database table",
1430
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative"
1431
- },
1432
- type: {
1433
- type: "string",
1434
- "enum": [
1435
- "string",
1436
- "boolean",
1437
- "uuid",
1438
- "uri",
1439
- "int",
1440
- "double",
1441
- "datetime"
1442
- ],
1443
- title: "Data type of the field for Prisma schema generation",
1444
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time"
1445
- },
1446
- description: {
1447
- type: "string",
1448
- title: "Description explaining the business purpose and usage of this field",
1449
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\""
1450
- },
1451
- nullable: {
1452
- type: "boolean",
1453
- title: "Whether this field can contain null values",
1454
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data."
1455
- }
1456
- },
1457
- required: [
1458
- "name",
1459
- "type",
1460
- "description",
1461
- "nullable"
1462
- ],
1463
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
1464
- additionalProperties: false
1465
- },
1466
- title: "Array of regular data fields that don't reference other models",
1467
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing."
1468
- },
1469
- uniqueIndexes: {
1470
- type: "array",
1471
- items: {
1472
- type: "object",
1473
- properties: {
1474
- fieldNames: {
1475
- type: "array",
1476
- items: {
1477
- type: "string"
1478
- },
1479
- minItems: 1,
1480
- uniqueItems: true,
1481
- title: "Array of field names that together form the unique constraint",
1482
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]"
1483
- },
1484
- unique: {
1485
- type: "boolean",
1486
- "enum": [
1487
- true
1488
- ],
1489
- title: "Explicit marker indicating this is a unique index",
1490
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\"."
1491
- }
1492
- },
1493
- required: [
1494
- "fieldNames",
1495
- "unique"
1496
- ],
1497
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
1498
- additionalProperties: false
1499
- },
1500
- title: "Array of unique indexes for enforcing data integrity constraints",
1501
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname)."
1502
- },
1503
- plainIndexes: {
1504
- type: "array",
1505
- items: {
1506
- type: "object",
1507
- properties: {
1508
- fieldNames: {
1509
- type: "array",
1510
- items: {
1511
- type: "string"
1512
- },
1513
- minItems: 1,
1514
- uniqueItems: true,
1515
- title: "Array of field names to include in the performance index",
1516
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]"
1517
- }
1518
- },
1519
- required: [
1520
- "fieldNames"
1521
- ],
1522
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
1523
- additionalProperties: false
825
+ "AutoBePrisma.IPrimaryField": {
826
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
827
+ type: "object",
828
+ properties: {
829
+ name: {
830
+ description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
831
+ type: "string"
832
+ },
833
+ type: {
834
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
835
+ type: "string",
836
+ "enum": [
837
+ "uuid"
838
+ ]
839
+ },
840
+ description: {
841
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
842
+ type: "string"
843
+ }
844
+ },
845
+ required: [
846
+ "name",
847
+ "type",
848
+ "description"
849
+ ]
850
+ },
851
+ "AutoBePrisma.IForeignField": {
852
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
853
+ type: "object",
854
+ properties: {
855
+ name: {
856
+ description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
857
+ type: "string"
858
+ },
859
+ type: {
860
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
861
+ type: "string",
862
+ "enum": [
863
+ "uuid"
864
+ ]
865
+ },
866
+ description: {
867
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
868
+ type: "string"
869
+ },
870
+ relation: {
871
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
872
+ type: "object",
873
+ properties: {
874
+ name: {
875
+ description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"\n\n\n@pattern ^[a-zA-Z_][a-zA-Z0-9_]*$",
876
+ type: "string"
1524
877
  },
1525
- title: "Array of regular indexes for query performance optimization",
1526
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields."
878
+ targetModel: {
879
+ description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
880
+ type: "string"
881
+ }
1527
882
  },
1528
- ginIndexes: {
1529
- type: "array",
1530
- items: {
1531
- type: "object",
1532
- properties: {
1533
- fieldName: {
1534
- type: "string",
1535
- title: "Name of the text field to index for full-text search capabilities",
1536
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search."
1537
- }
1538
- },
1539
- required: [
1540
- "fieldName"
1541
- ],
1542
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
1543
- additionalProperties: false
1544
- },
1545
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
1546
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies."
883
+ required: [
884
+ "name",
885
+ "targetModel"
886
+ ]
887
+ },
888
+ unique: {
889
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
890
+ type: "boolean"
891
+ },
892
+ nullable: {
893
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
894
+ type: "boolean"
895
+ }
896
+ },
897
+ required: [
898
+ "name",
899
+ "type",
900
+ "description",
901
+ "relation",
902
+ "unique",
903
+ "nullable"
904
+ ]
905
+ },
906
+ "AutoBePrisma.IPlainField": {
907
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
908
+ type: "object",
909
+ properties: {
910
+ name: {
911
+ description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
912
+ type: "string"
913
+ },
914
+ type: {
915
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
916
+ type: "string",
917
+ "enum": [
918
+ "string",
919
+ "boolean",
920
+ "uuid",
921
+ "uri",
922
+ "int",
923
+ "double",
924
+ "datetime"
925
+ ]
926
+ },
927
+ description: {
928
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
929
+ type: "string"
930
+ },
931
+ nullable: {
932
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
933
+ type: "boolean"
934
+ }
935
+ },
936
+ required: [
937
+ "name",
938
+ "type",
939
+ "description",
940
+ "nullable"
941
+ ]
942
+ },
943
+ "AutoBePrisma.IUniqueIndex": {
944
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
945
+ type: "object",
946
+ properties: {
947
+ fieldNames: {
948
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
949
+ type: "array",
950
+ items: {
951
+ type: "string"
1547
952
  }
1548
953
  },
1549
- required: [
1550
- "name",
1551
- "description",
1552
- "material",
1553
- "primaryField",
1554
- "foreignFields",
1555
- "plainFields",
1556
- "uniqueIndexes",
1557
- "plainIndexes",
1558
- "ginIndexes"
1559
- ],
1560
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
1561
- additionalProperties: false
954
+ unique: {
955
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
956
+ type: "boolean",
957
+ "enum": [
958
+ true
959
+ ]
960
+ }
1562
961
  },
1563
- description: "ONLY the specific models that contain validation errors and need\ncorrection.\n\n\uD83D\uDCE5 Input Structure:\n\n- Contains ONLY models mentioned in IAutoBePrismaValidation.IError[] array\n- Each model has specific validation errors that need targeted correction\n- Models not mentioned in errors are excluded from this input\n- Represents minimal scope for error correction\n\n\uD83D\uDD0D Expected Validation Issues (Model-Specific):\n\n- Duplicate field/relation names within these specific models\n- Invalid foreign key references from these models to other models\n- Single foreign key fields in index arrays within these models\n- Invalid naming conventions within these specific models\n- Type validation errors in fields of these models\n\n\uD83D\uDCDD Model Content Analysis (Targeted Scope):\n\n- Complete field definitions for each error model only\n- Relationships from these models (may reference unchanged models)\n- Indexes within these models that need correction\n- Business descriptions specific to these models\n- Cross-model references that need validation (read-only for targets)\n\n\u26A0\uFE0F Processing Notes (Focused Approach):\n\n- Input contains ONLY models with validation errors\n- May reference other models not included in this input\n- Cross-model references must be validated but target models won't be\n modified\n- Output should return corrected versions of ONLY these input models\n- All business logic and descriptions within these models must be preserved\n- Corrections must not break references from unchanged models\n\n\uD83C\uDFAF Correction Scope:\n\n- Fix validation errors within these specific models\n- Update internal model structure (fields, relations, indexes)\n- Correct references to external models (without modifying targets)\n- Maintain compatibility with unchanged models in the full schema\n- Return corrected versions of ONLY these models"
962
+ required: [
963
+ "fieldNames",
964
+ "unique"
965
+ ]
966
+ },
967
+ "AutoBePrisma.IPlainIndex": {
968
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
969
+ type: "object",
970
+ properties: {
971
+ fieldNames: {
972
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
973
+ type: "array",
974
+ items: {
975
+ type: "string"
976
+ }
977
+ }
978
+ },
979
+ required: [
980
+ "fieldNames"
981
+ ]
982
+ },
983
+ "AutoBePrisma.IGinIndex": {
984
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
985
+ type: "object",
986
+ properties: {
987
+ fieldName: {
988
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
989
+ type: "string"
990
+ }
991
+ },
992
+ required: [
993
+ "fieldName"
994
+ ]
1564
995
  }
1565
- },
1566
- required: [
1567
- "planning",
1568
- "models"
1569
- ],
1570
- description: "Current Type: {@link IModifyPrismaSchemaFilesProps}",
1571
- additionalProperties: false
996
+ }
1572
997
  },
1573
998
  description: "Fixes validation errors in specific AutoBePrisma models while preserving\nALL existing business logic and model descriptions.\n\n## Core Rules\n\n1. Fix ONLY validation errors in provided models - never remove business\n descriptions\n2. Apply minimal changes to error models only - preserve original design\n intent\n3. Return ONLY corrected models - unchanged models remain in original schema\n4. Maintain referential integrity with unchanged models\n\n## Targeted Scope\n\n- Process ONLY models with validation errors from IError[] array\n- Exclude models without errors from processing and output\n- Minimize context usage by returning corrected models only\n- Preserve unchanged models in their original state\n\n## Fix Strategy\n\n- Resolve validation errors within specific models only\n- Fix field duplications, invalid references, and type mismatches\n- Update cross-model references without modifying target models\n- Ensure naming conventions and index rules compliance in corrected models",
1574
999
  validate: (() => { const _io0 = input => "string" === typeof input.planning && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.planning || _report(_exceptionable, {
@@ -1854,5 +1279,9 @@ const collection = {
1854
1279
  }
1855
1280
  ]
1856
1281
  },
1282
+ claude,
1283
+ llama: claude,
1284
+ deepseek: claude,
1285
+ "3.1": claude,
1857
1286
  };
1858
1287
  //# sourceMappingURL=orchestratePrismaCorrect.js.map