@autobe/agent 0.30.4 → 0.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
- package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
- package/lib/index.mjs +2918 -2842
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
- package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
- package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
- package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
- package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
- package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
- package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
- package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
- package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
- package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
- package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
- package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
- package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
- package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
- package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
- package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
- package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
- package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
- package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
- package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
- package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
- package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
- package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
- package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
- package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
- package/package.json +5 -5
- package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
- package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
- package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
- package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
- package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
- package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
- package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
- package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
- package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
- package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
- package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
- package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
- package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
|
@@ -157,7 +157,7 @@ function execute(ctx, failure) {
|
|
|
157
157
|
properties: {
|
|
158
158
|
thinking: {
|
|
159
159
|
type: "string",
|
|
160
|
-
description: "Think before you act.\n\
|
|
160
|
+
description: "Think before you act.\n\nFor preliminary requests: what critical information is missing and why?\nBe brief \u2014 state the gap, don't list everything you have.\n\nFor completion: what key assets did you acquire, what did you accomplish,\nwhy is it sufficient? Summarize \u2014 don't enumerate every single item."
|
|
161
161
|
},
|
|
162
162
|
request: {
|
|
163
163
|
oneOf: [
|
|
@@ -187,7 +187,7 @@ function execute(ctx, failure) {
|
|
|
187
187
|
complete: "#/components/schemas/IAutoBeDatabaseCorrectApplication.IComplete"
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
description: "
|
|
190
|
+
description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls."
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
193
|
required: [
|
|
@@ -200,7 +200,7 @@ function execute(ctx, failure) {
|
|
|
200
200
|
properties: {
|
|
201
201
|
type: {
|
|
202
202
|
"const": "getAnalysisSections",
|
|
203
|
-
description: "Type discriminator
|
|
203
|
+
description: "Type discriminator."
|
|
204
204
|
},
|
|
205
205
|
sectionIds: {
|
|
206
206
|
type: "array",
|
|
@@ -210,21 +210,21 @@ function execute(ctx, failure) {
|
|
|
210
210
|
},
|
|
211
211
|
minItems: 1,
|
|
212
212
|
maxItems: 100,
|
|
213
|
-
description: "
|
|
213
|
+
description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls."
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
required: [
|
|
217
217
|
"type",
|
|
218
218
|
"sectionIds"
|
|
219
219
|
],
|
|
220
|
-
description: "Request to retrieve individual analysis sections by numeric ID
|
|
220
|
+
description: "Request to retrieve individual analysis sections by numeric ID."
|
|
221
221
|
},
|
|
222
222
|
IAutoBePreliminaryGetDatabaseSchemas: {
|
|
223
223
|
type: "object",
|
|
224
224
|
properties: {
|
|
225
225
|
type: {
|
|
226
226
|
"const": "getDatabaseSchemas",
|
|
227
|
-
description: "Type discriminator
|
|
227
|
+
description: "Type discriminator."
|
|
228
228
|
},
|
|
229
229
|
schemaNames: {
|
|
230
230
|
type: "array",
|
|
@@ -232,21 +232,21 @@ function execute(ctx, failure) {
|
|
|
232
232
|
type: "string"
|
|
233
233
|
},
|
|
234
234
|
minItems: 1,
|
|
235
|
-
description: "
|
|
235
|
+
description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls."
|
|
236
236
|
}
|
|
237
237
|
},
|
|
238
238
|
required: [
|
|
239
239
|
"type",
|
|
240
240
|
"schemaNames"
|
|
241
241
|
],
|
|
242
|
-
description: "Request to retrieve database schema definitions for context
|
|
242
|
+
description: "Request to retrieve database schema definitions for context."
|
|
243
243
|
},
|
|
244
244
|
IAutoBePreliminaryGetPreviousAnalysisSections: {
|
|
245
245
|
type: "object",
|
|
246
246
|
properties: {
|
|
247
247
|
type: {
|
|
248
248
|
"const": "getPreviousAnalysisSections",
|
|
249
|
-
description: "Type discriminator
|
|
249
|
+
description: "Type discriminator."
|
|
250
250
|
},
|
|
251
251
|
sectionIds: {
|
|
252
252
|
type: "array",
|
|
@@ -255,21 +255,21 @@ function execute(ctx, failure) {
|
|
|
255
255
|
minimum: 0
|
|
256
256
|
},
|
|
257
257
|
minItems: 1,
|
|
258
|
-
description: "
|
|
258
|
+
description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls."
|
|
259
259
|
}
|
|
260
260
|
},
|
|
261
261
|
required: [
|
|
262
262
|
"type",
|
|
263
263
|
"sectionIds"
|
|
264
264
|
],
|
|
265
|
-
description: "Request to retrieve
|
|
265
|
+
description: "Request to retrieve analysis sections from the previous iteration by numeric\nID."
|
|
266
266
|
},
|
|
267
267
|
IAutoBePreliminaryGetPreviousDatabaseSchemas: {
|
|
268
268
|
type: "object",
|
|
269
269
|
properties: {
|
|
270
270
|
type: {
|
|
271
271
|
"const": "getPreviousDatabaseSchemas",
|
|
272
|
-
description: "Type discriminator
|
|
272
|
+
description: "Type discriminator."
|
|
273
273
|
},
|
|
274
274
|
schemaNames: {
|
|
275
275
|
type: "array",
|
|
@@ -277,32 +277,32 @@ function execute(ctx, failure) {
|
|
|
277
277
|
type: "string"
|
|
278
278
|
},
|
|
279
279
|
minItems: 1,
|
|
280
|
-
description: "
|
|
280
|
+
description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls."
|
|
281
281
|
}
|
|
282
282
|
},
|
|
283
283
|
required: [
|
|
284
284
|
"type",
|
|
285
285
|
"schemaNames"
|
|
286
286
|
],
|
|
287
|
-
description: "Request to retrieve database schemas from
|
|
287
|
+
description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles."
|
|
288
288
|
},
|
|
289
289
|
"IAutoBeDatabaseCorrectApplication.IComplete": {
|
|
290
290
|
type: "object",
|
|
291
291
|
properties: {
|
|
292
292
|
type: {
|
|
293
293
|
"const": "complete",
|
|
294
|
-
description: "Type discriminator for
|
|
294
|
+
description: "Type discriminator for completion request."
|
|
295
295
|
},
|
|
296
296
|
planning: {
|
|
297
297
|
type: "string",
|
|
298
|
-
description: "
|
|
298
|
+
description: "Execution plan for fixing validation errors. Required steps:\n\n1. Error scope analysis \u2014 list all validation errors, extract affected table\n names, categorize by type (duplications, references, types, indexes)\n2. Targeted fix strategy \u2014 focus ONLY on models in errors, outline minimal\n changes per model\n3. Model-specific fix plan \u2014 detail corrections per affected model\n4. Minimal scope validation \u2014 confirm which models are in/out of output\n5. Targeted impact assessment \u2014 verify fixes don't break references from\n unchanged models\n\nPreserve all business logic and cross-model references."
|
|
299
299
|
},
|
|
300
300
|
models: {
|
|
301
301
|
type: "array",
|
|
302
302
|
items: {
|
|
303
303
|
$ref: "#/components/schemas/AutoBeDatabase.IModel"
|
|
304
304
|
},
|
|
305
|
-
description: "Models with validation errors that need correction.\n\nContains ONLY models
|
|
305
|
+
description: "Models with validation errors that need correction.\n\nContains ONLY models from IAutoBeDatabaseValidation.IError[]. Output\ncorrected versions of these models only. Cross-model references must stay\nvalid but target models are not modified."
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
required: [
|
|
@@ -310,7 +310,7 @@ function execute(ctx, failure) {
|
|
|
310
310
|
"planning",
|
|
311
311
|
"models"
|
|
312
312
|
],
|
|
313
|
-
description: "
|
|
313
|
+
description: "Fix validation errors in affected models only, preserving design intent and\nbusiness logic."
|
|
314
314
|
},
|
|
315
315
|
"AutoBeDatabase.IModel": {
|
|
316
316
|
type: "object",
|
|
@@ -318,15 +318,15 @@ function execute(ctx, failure) {
|
|
|
318
318
|
name: {
|
|
319
319
|
type: "string",
|
|
320
320
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
321
|
-
description: "
|
|
321
|
+
description: "MUST use snake_case. Materialized views use \"mv_\" prefix."
|
|
322
322
|
},
|
|
323
323
|
description: {
|
|
324
324
|
type: "string",
|
|
325
|
-
description: "
|
|
325
|
+
description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax."
|
|
326
326
|
},
|
|
327
327
|
material: {
|
|
328
328
|
type: "boolean",
|
|
329
|
-
description: "
|
|
329
|
+
description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix."
|
|
330
330
|
},
|
|
331
331
|
stance: {
|
|
332
332
|
oneOf: [
|
|
@@ -346,46 +346,46 @@ function execute(ctx, failure) {
|
|
|
346
346
|
"const": "session"
|
|
347
347
|
}
|
|
348
348
|
],
|
|
349
|
-
description: "
|
|
349
|
+
description: "Architectural role of this model, guiding API endpoint generation.\n\n- \"primary\": Core entity users manage independently (full CRUD APIs). Use\n when users need to create, search, or manage entities outside their\n parent context.\n- \"actor\": Authenticated user type with its own identity, credentials, and\n auth flow. Generates auth endpoints.\n- \"session\": Login session table belonging to exactly one actor.\n Append-only audit trail, managed via auth flows.\n- \"subsidiary\": Supporting entity managed through its parent, rarely needs\n standalone endpoints.\n- \"snapshot\": Point-in-time versioning record, typically append-only and\n read-only from user perspective."
|
|
350
350
|
},
|
|
351
351
|
primaryField: {
|
|
352
352
|
$ref: "#/components/schemas/AutoBeDatabase.IPrimaryField",
|
|
353
|
-
description: "
|
|
353
|
+
description: "Primary key field (UUID)."
|
|
354
354
|
},
|
|
355
355
|
foreignFields: {
|
|
356
356
|
type: "array",
|
|
357
357
|
items: {
|
|
358
358
|
$ref: "#/components/schemas/AutoBeDatabase.IForeignField"
|
|
359
359
|
},
|
|
360
|
-
description: "
|
|
360
|
+
description: "Foreign key fields establishing relationships to other models."
|
|
361
361
|
},
|
|
362
362
|
plainFields: {
|
|
363
363
|
type: "array",
|
|
364
364
|
items: {
|
|
365
365
|
$ref: "#/components/schemas/AutoBeDatabase.IPlainField"
|
|
366
366
|
},
|
|
367
|
-
description: "
|
|
367
|
+
description: "Regular data fields (names, timestamps, flags, amounts, etc.)."
|
|
368
368
|
},
|
|
369
369
|
uniqueIndexes: {
|
|
370
370
|
type: "array",
|
|
371
371
|
items: {
|
|
372
372
|
$ref: "#/components/schemas/AutoBeDatabase.IUniqueIndex"
|
|
373
373
|
},
|
|
374
|
-
description: "
|
|
374
|
+
description: "Unique indexes for data integrity constraints."
|
|
375
375
|
},
|
|
376
376
|
plainIndexes: {
|
|
377
377
|
type: "array",
|
|
378
378
|
items: {
|
|
379
379
|
$ref: "#/components/schemas/AutoBeDatabase.IPlainIndex"
|
|
380
380
|
},
|
|
381
|
-
description: "
|
|
381
|
+
description: "Regular indexes for query performance."
|
|
382
382
|
},
|
|
383
383
|
ginIndexes: {
|
|
384
384
|
type: "array",
|
|
385
385
|
items: {
|
|
386
386
|
$ref: "#/components/schemas/AutoBeDatabase.IGinIndex"
|
|
387
387
|
},
|
|
388
|
-
description: "
|
|
388
|
+
description: "GIN indexes for PostgreSQL full-text search (trigram)."
|
|
389
389
|
}
|
|
390
390
|
},
|
|
391
391
|
required: [
|
|
@@ -400,7 +400,7 @@ function execute(ctx, failure) {
|
|
|
400
400
|
"plainIndexes",
|
|
401
401
|
"ginIndexes"
|
|
402
402
|
],
|
|
403
|
-
description: "
|
|
403
|
+
description: "A single Prisma model (database table)."
|
|
404
404
|
},
|
|
405
405
|
"AutoBeDatabase.IPrimaryField": {
|
|
406
406
|
type: "object",
|
|
@@ -408,15 +408,14 @@ function execute(ctx, failure) {
|
|
|
408
408
|
name: {
|
|
409
409
|
type: "string",
|
|
410
410
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
411
|
-
description: "
|
|
411
|
+
description: "MUST use snake_case."
|
|
412
412
|
},
|
|
413
413
|
type: {
|
|
414
|
-
"const": "uuid"
|
|
415
|
-
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."
|
|
414
|
+
"const": "uuid"
|
|
416
415
|
},
|
|
417
416
|
description: {
|
|
418
417
|
type: "string",
|
|
419
|
-
description: "
|
|
418
|
+
description: "Business purpose of this primary key. MUST be written in English."
|
|
420
419
|
}
|
|
421
420
|
},
|
|
422
421
|
required: [
|
|
@@ -424,7 +423,7 @@ function execute(ctx, failure) {
|
|
|
424
423
|
"type",
|
|
425
424
|
"description"
|
|
426
425
|
],
|
|
427
|
-
description: "
|
|
426
|
+
description: "Primary key field of a model."
|
|
428
427
|
},
|
|
429
428
|
"AutoBeDatabase.IForeignField": {
|
|
430
429
|
type: "object",
|
|
@@ -432,27 +431,26 @@ function execute(ctx, failure) {
|
|
|
432
431
|
name: {
|
|
433
432
|
type: "string",
|
|
434
433
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
435
|
-
description: "
|
|
434
|
+
description: "MUST use snake_case. Convention: \"{target_model}_id\"."
|
|
436
435
|
},
|
|
437
436
|
type: {
|
|
438
|
-
"const": "uuid"
|
|
439
|
-
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."
|
|
437
|
+
"const": "uuid"
|
|
440
438
|
},
|
|
441
439
|
description: {
|
|
442
440
|
type: "string",
|
|
443
|
-
description: "
|
|
441
|
+
description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English."
|
|
444
442
|
},
|
|
445
443
|
relation: {
|
|
446
444
|
$ref: "#/components/schemas/AutoBeDatabase.IRelation",
|
|
447
|
-
description: "Prisma relation configuration
|
|
445
|
+
description: "Prisma relation configuration."
|
|
448
446
|
},
|
|
449
447
|
unique: {
|
|
450
448
|
type: "boolean",
|
|
451
|
-
description: "
|
|
449
|
+
description: "True for 1:1 relationships, false for 1:N."
|
|
452
450
|
},
|
|
453
451
|
nullable: {
|
|
454
452
|
type: "boolean",
|
|
455
|
-
description: "
|
|
453
|
+
description: "True if the relationship is optional."
|
|
456
454
|
}
|
|
457
455
|
},
|
|
458
456
|
required: [
|
|
@@ -463,7 +461,7 @@ function execute(ctx, failure) {
|
|
|
463
461
|
"unique",
|
|
464
462
|
"nullable"
|
|
465
463
|
],
|
|
466
|
-
description: "
|
|
464
|
+
description: "Foreign key field establishing a relationship to another model."
|
|
467
465
|
},
|
|
468
466
|
"AutoBeDatabase.IRelation": {
|
|
469
467
|
type: "object",
|
|
@@ -471,16 +469,16 @@ function execute(ctx, failure) {
|
|
|
471
469
|
name: {
|
|
472
470
|
type: "string",
|
|
473
471
|
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
474
|
-
description: "
|
|
472
|
+
description: "Relation property name in this model. MUST use camelCase."
|
|
475
473
|
},
|
|
476
474
|
targetModel: {
|
|
477
475
|
type: "string",
|
|
478
|
-
description: "
|
|
476
|
+
description: "Must match an existing model name in the schema."
|
|
479
477
|
},
|
|
480
478
|
oppositeName: {
|
|
481
479
|
type: "string",
|
|
482
480
|
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
483
|
-
description: "
|
|
481
|
+
description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1."
|
|
484
482
|
}
|
|
485
483
|
},
|
|
486
484
|
required: [
|
|
@@ -488,7 +486,7 @@ function execute(ctx, failure) {
|
|
|
488
486
|
"targetModel",
|
|
489
487
|
"oppositeName"
|
|
490
488
|
],
|
|
491
|
-
description: "
|
|
489
|
+
description: "Prisma"
|
|
492
490
|
},
|
|
493
491
|
"AutoBeDatabase.IPlainField": {
|
|
494
492
|
type: "object",
|
|
@@ -496,7 +494,7 @@ function execute(ctx, failure) {
|
|
|
496
494
|
name: {
|
|
497
495
|
type: "string",
|
|
498
496
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
499
|
-
description: "
|
|
497
|
+
description: "MUST use snake_case."
|
|
500
498
|
},
|
|
501
499
|
type: {
|
|
502
500
|
oneOf: [
|
|
@@ -522,15 +520,15 @@ function execute(ctx, failure) {
|
|
|
522
520
|
"const": "datetime"
|
|
523
521
|
}
|
|
524
522
|
],
|
|
525
|
-
description: "
|
|
523
|
+
description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime."
|
|
526
524
|
},
|
|
527
525
|
description: {
|
|
528
526
|
type: "string",
|
|
529
|
-
description: "
|
|
527
|
+
description: "Business purpose of this field. MUST be written in English."
|
|
530
528
|
},
|
|
531
529
|
nullable: {
|
|
532
530
|
type: "boolean",
|
|
533
|
-
description: "Whether this field can
|
|
531
|
+
description: "Whether this field can be null."
|
|
534
532
|
}
|
|
535
533
|
},
|
|
536
534
|
required: [
|
|
@@ -539,7 +537,7 @@ function execute(ctx, failure) {
|
|
|
539
537
|
"description",
|
|
540
538
|
"nullable"
|
|
541
539
|
],
|
|
542
|
-
description: "
|
|
540
|
+
description: "A regular data field (not a primary or foreign key)."
|
|
543
541
|
},
|
|
544
542
|
"AutoBeDatabase.IUniqueIndex": {
|
|
545
543
|
type: "object",
|
|
@@ -551,18 +549,18 @@ function execute(ctx, failure) {
|
|
|
551
549
|
},
|
|
552
550
|
minItems: 1,
|
|
553
551
|
uniqueItems: true,
|
|
554
|
-
description: "
|
|
552
|
+
description: "Field names forming the unique constraint. All must exist in the model."
|
|
555
553
|
},
|
|
556
554
|
unique: {
|
|
557
555
|
"const": true,
|
|
558
|
-
description: "
|
|
556
|
+
description: "Always true. Distinguishes from plain indexes."
|
|
559
557
|
}
|
|
560
558
|
},
|
|
561
559
|
required: [
|
|
562
560
|
"fieldNames",
|
|
563
561
|
"unique"
|
|
564
562
|
],
|
|
565
|
-
description: "
|
|
563
|
+
description: "Unique index constraint (@@unique)."
|
|
566
564
|
},
|
|
567
565
|
"AutoBeDatabase.IPlainIndex": {
|
|
568
566
|
type: "object",
|
|
@@ -574,26 +572,26 @@ function execute(ctx, failure) {
|
|
|
574
572
|
},
|
|
575
573
|
minItems: 1,
|
|
576
574
|
uniqueItems: true,
|
|
577
|
-
description: "
|
|
575
|
+
description: "Field names to index. Order matters for composite indexes."
|
|
578
576
|
}
|
|
579
577
|
},
|
|
580
578
|
required: [
|
|
581
579
|
"fieldNames"
|
|
582
580
|
],
|
|
583
|
-
description: "
|
|
581
|
+
description: "Regular index for query performance (@@index)."
|
|
584
582
|
},
|
|
585
583
|
"AutoBeDatabase.IGinIndex": {
|
|
586
584
|
type: "object",
|
|
587
585
|
properties: {
|
|
588
586
|
fieldName: {
|
|
589
587
|
type: "string",
|
|
590
|
-
description: "
|
|
588
|
+
description: "Must be a string field containing searchable text."
|
|
591
589
|
}
|
|
592
590
|
},
|
|
593
591
|
required: [
|
|
594
592
|
"fieldName"
|
|
595
593
|
],
|
|
596
|
-
description: "
|
|
594
|
+
description: "GIN index for PostgreSQL full-text search (gin_trgm_ops)."
|
|
597
595
|
}
|
|
598
596
|
}
|
|
599
597
|
},
|
|
@@ -611,7 +609,7 @@ function execute(ctx, failure) {
|
|
|
611
609
|
}
|
|
612
610
|
}
|
|
613
611
|
],
|
|
614
|
-
description: "Process schema correction task or preliminary data requests
|
|
612
|
+
description: "Process schema correction task or preliminary data requests."
|
|
615
613
|
}
|
|
616
614
|
]
|
|
617
615
|
},
|
|
@@ -1134,11 +1132,11 @@ function createController(props) {
|
|
|
1134
1132
|
type: "object",
|
|
1135
1133
|
properties: {
|
|
1136
1134
|
thinking: {
|
|
1137
|
-
description: "Think before you act.\n\
|
|
1135
|
+
description: "Think before you act.\n\nFor preliminary requests: what critical information is missing and why?\nBe brief \u2014 state the gap, don't list everything you have.\n\nFor completion: what key assets did you acquire, what did you accomplish,\nwhy is it sufficient? Summarize \u2014 don't enumerate every single item.",
|
|
1138
1136
|
type: "string"
|
|
1139
1137
|
},
|
|
1140
1138
|
request: {
|
|
1141
|
-
description: "
|
|
1139
|
+
description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls.",
|
|
1142
1140
|
anyOf: [
|
|
1143
1141
|
{
|
|
1144
1142
|
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisSections"
|
|
@@ -1175,18 +1173,18 @@ function createController(props) {
|
|
|
1175
1173
|
additionalProperties: false,
|
|
1176
1174
|
$defs: {
|
|
1177
1175
|
IAutoBePreliminaryGetAnalysisSections: {
|
|
1178
|
-
description: "Request to retrieve individual analysis sections by numeric ID
|
|
1176
|
+
description: "Request to retrieve individual analysis sections by numeric ID.",
|
|
1179
1177
|
type: "object",
|
|
1180
1178
|
properties: {
|
|
1181
1179
|
type: {
|
|
1182
|
-
description: "Type discriminator
|
|
1180
|
+
description: "Type discriminator.",
|
|
1183
1181
|
type: "string",
|
|
1184
1182
|
"enum": [
|
|
1185
1183
|
"getAnalysisSections"
|
|
1186
1184
|
]
|
|
1187
1185
|
},
|
|
1188
1186
|
sectionIds: {
|
|
1189
|
-
description: "
|
|
1187
|
+
description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls.",
|
|
1190
1188
|
type: "array",
|
|
1191
1189
|
items: {
|
|
1192
1190
|
type: "integer",
|
|
@@ -1202,18 +1200,18 @@ function createController(props) {
|
|
|
1202
1200
|
]
|
|
1203
1201
|
},
|
|
1204
1202
|
IAutoBePreliminaryGetDatabaseSchemas: {
|
|
1205
|
-
description: "Request to retrieve database schema definitions for context
|
|
1203
|
+
description: "Request to retrieve database schema definitions for context.",
|
|
1206
1204
|
type: "object",
|
|
1207
1205
|
properties: {
|
|
1208
1206
|
type: {
|
|
1209
|
-
description: "Type discriminator
|
|
1207
|
+
description: "Type discriminator.",
|
|
1210
1208
|
type: "string",
|
|
1211
1209
|
"enum": [
|
|
1212
1210
|
"getDatabaseSchemas"
|
|
1213
1211
|
]
|
|
1214
1212
|
},
|
|
1215
1213
|
schemaNames: {
|
|
1216
|
-
description: "
|
|
1214
|
+
description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls.",
|
|
1217
1215
|
type: "array",
|
|
1218
1216
|
items: {
|
|
1219
1217
|
type: "string"
|
|
@@ -1227,18 +1225,18 @@ function createController(props) {
|
|
|
1227
1225
|
]
|
|
1228
1226
|
},
|
|
1229
1227
|
IAutoBePreliminaryGetPreviousAnalysisSections: {
|
|
1230
|
-
description: "Request to retrieve
|
|
1228
|
+
description: "Request to retrieve analysis sections from the previous iteration by numeric\nID.",
|
|
1231
1229
|
type: "object",
|
|
1232
1230
|
properties: {
|
|
1233
1231
|
type: {
|
|
1234
|
-
description: "Type discriminator
|
|
1232
|
+
description: "Type discriminator.",
|
|
1235
1233
|
type: "string",
|
|
1236
1234
|
"enum": [
|
|
1237
1235
|
"getPreviousAnalysisSections"
|
|
1238
1236
|
]
|
|
1239
1237
|
},
|
|
1240
1238
|
sectionIds: {
|
|
1241
|
-
description: "
|
|
1239
|
+
description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls.",
|
|
1242
1240
|
type: "array",
|
|
1243
1241
|
items: {
|
|
1244
1242
|
type: "integer",
|
|
@@ -1253,18 +1251,18 @@ function createController(props) {
|
|
|
1253
1251
|
]
|
|
1254
1252
|
},
|
|
1255
1253
|
IAutoBePreliminaryGetPreviousDatabaseSchemas: {
|
|
1256
|
-
description: "Request to retrieve database schemas from
|
|
1254
|
+
description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles.",
|
|
1257
1255
|
type: "object",
|
|
1258
1256
|
properties: {
|
|
1259
1257
|
type: {
|
|
1260
|
-
description: "Type discriminator
|
|
1258
|
+
description: "Type discriminator.",
|
|
1261
1259
|
type: "string",
|
|
1262
1260
|
"enum": [
|
|
1263
1261
|
"getPreviousDatabaseSchemas"
|
|
1264
1262
|
]
|
|
1265
1263
|
},
|
|
1266
1264
|
schemaNames: {
|
|
1267
|
-
description: "
|
|
1265
|
+
description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls.",
|
|
1268
1266
|
type: "array",
|
|
1269
1267
|
items: {
|
|
1270
1268
|
type: "string"
|
|
@@ -1278,22 +1276,22 @@ function createController(props) {
|
|
|
1278
1276
|
]
|
|
1279
1277
|
},
|
|
1280
1278
|
"IAutoBeDatabaseCorrectApplication.IComplete": {
|
|
1281
|
-
description: "
|
|
1279
|
+
description: "Fix validation errors in affected models only, preserving design intent and\nbusiness logic.",
|
|
1282
1280
|
type: "object",
|
|
1283
1281
|
properties: {
|
|
1284
1282
|
type: {
|
|
1285
|
-
description: "Type discriminator for
|
|
1283
|
+
description: "Type discriminator for completion request.",
|
|
1286
1284
|
type: "string",
|
|
1287
1285
|
"enum": [
|
|
1288
1286
|
"complete"
|
|
1289
1287
|
]
|
|
1290
1288
|
},
|
|
1291
1289
|
planning: {
|
|
1292
|
-
description: "
|
|
1290
|
+
description: "Execution plan for fixing validation errors. Required steps:\n\n1. Error scope analysis \u2014 list all validation errors, extract affected table\n names, categorize by type (duplications, references, types, indexes)\n2. Targeted fix strategy \u2014 focus ONLY on models in errors, outline minimal\n changes per model\n3. Model-specific fix plan \u2014 detail corrections per affected model\n4. Minimal scope validation \u2014 confirm which models are in/out of output\n5. Targeted impact assessment \u2014 verify fixes don't break references from\n unchanged models\n\nPreserve all business logic and cross-model references.",
|
|
1293
1291
|
type: "string"
|
|
1294
1292
|
},
|
|
1295
1293
|
models: {
|
|
1296
|
-
description: "Models with validation errors that need correction.\n\nContains ONLY models
|
|
1294
|
+
description: "Models with validation errors that need correction.\n\nContains ONLY models from IAutoBeDatabaseValidation.IError[]. Output\ncorrected versions of these models only. Cross-model references must stay\nvalid but target models are not modified.",
|
|
1297
1295
|
type: "array",
|
|
1298
1296
|
items: {
|
|
1299
1297
|
$ref: "#/$defs/AutoBeDatabase.IModel"
|
|
@@ -1307,24 +1305,24 @@ function createController(props) {
|
|
|
1307
1305
|
]
|
|
1308
1306
|
},
|
|
1309
1307
|
"AutoBeDatabase.IModel": {
|
|
1310
|
-
description: "
|
|
1308
|
+
description: "A single Prisma model (database table).",
|
|
1311
1309
|
type: "object",
|
|
1312
1310
|
properties: {
|
|
1313
1311
|
name: {
|
|
1314
|
-
description: "
|
|
1312
|
+
description: "MUST use snake_case. Materialized views use \"mv_\" prefix.",
|
|
1315
1313
|
type: "string",
|
|
1316
1314
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1317
1315
|
},
|
|
1318
1316
|
description: {
|
|
1319
|
-
description: "
|
|
1317
|
+
description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax.",
|
|
1320
1318
|
type: "string"
|
|
1321
1319
|
},
|
|
1322
1320
|
material: {
|
|
1323
|
-
description: "
|
|
1321
|
+
description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix.",
|
|
1324
1322
|
type: "boolean"
|
|
1325
1323
|
},
|
|
1326
1324
|
stance: {
|
|
1327
|
-
description: "
|
|
1325
|
+
description: "Architectural role of this model, guiding API endpoint generation.\n\n- \"primary\": Core entity users manage independently (full CRUD APIs). Use\n when users need to create, search, or manage entities outside their\n parent context.\n- \"actor\": Authenticated user type with its own identity, credentials, and\n auth flow. Generates auth endpoints.\n- \"session\": Login session table belonging to exactly one actor.\n Append-only audit trail, managed via auth flows.\n- \"subsidiary\": Supporting entity managed through its parent, rarely needs\n standalone endpoints.\n- \"snapshot\": Point-in-time versioning record, typically append-only and\n read-only from user perspective.",
|
|
1328
1326
|
type: "string",
|
|
1329
1327
|
"enum": [
|
|
1330
1328
|
"primary",
|
|
@@ -1335,39 +1333,39 @@ function createController(props) {
|
|
|
1335
1333
|
]
|
|
1336
1334
|
},
|
|
1337
1335
|
primaryField: {
|
|
1338
|
-
description: "
|
|
1336
|
+
description: "Primary key field (UUID).",
|
|
1339
1337
|
$ref: "#/$defs/AutoBeDatabase.IPrimaryField"
|
|
1340
1338
|
},
|
|
1341
1339
|
foreignFields: {
|
|
1342
|
-
description: "
|
|
1340
|
+
description: "Foreign key fields establishing relationships to other models.",
|
|
1343
1341
|
type: "array",
|
|
1344
1342
|
items: {
|
|
1345
1343
|
$ref: "#/$defs/AutoBeDatabase.IForeignField"
|
|
1346
1344
|
}
|
|
1347
1345
|
},
|
|
1348
1346
|
plainFields: {
|
|
1349
|
-
description: "
|
|
1347
|
+
description: "Regular data fields (names, timestamps, flags, amounts, etc.).",
|
|
1350
1348
|
type: "array",
|
|
1351
1349
|
items: {
|
|
1352
1350
|
$ref: "#/$defs/AutoBeDatabase.IPlainField"
|
|
1353
1351
|
}
|
|
1354
1352
|
},
|
|
1355
1353
|
uniqueIndexes: {
|
|
1356
|
-
description: "
|
|
1354
|
+
description: "Unique indexes for data integrity constraints.",
|
|
1357
1355
|
type: "array",
|
|
1358
1356
|
items: {
|
|
1359
1357
|
$ref: "#/$defs/AutoBeDatabase.IUniqueIndex"
|
|
1360
1358
|
}
|
|
1361
1359
|
},
|
|
1362
1360
|
plainIndexes: {
|
|
1363
|
-
description: "
|
|
1361
|
+
description: "Regular indexes for query performance.",
|
|
1364
1362
|
type: "array",
|
|
1365
1363
|
items: {
|
|
1366
1364
|
$ref: "#/$defs/AutoBeDatabase.IPlainIndex"
|
|
1367
1365
|
}
|
|
1368
1366
|
},
|
|
1369
1367
|
ginIndexes: {
|
|
1370
|
-
description: "
|
|
1368
|
+
description: "GIN indexes for PostgreSQL full-text search (trigram).",
|
|
1371
1369
|
type: "array",
|
|
1372
1370
|
items: {
|
|
1373
1371
|
$ref: "#/$defs/AutoBeDatabase.IGinIndex"
|
|
@@ -1388,23 +1386,22 @@ function createController(props) {
|
|
|
1388
1386
|
]
|
|
1389
1387
|
},
|
|
1390
1388
|
"AutoBeDatabase.IPrimaryField": {
|
|
1391
|
-
description: "
|
|
1389
|
+
description: "Primary key field of a model.",
|
|
1392
1390
|
type: "object",
|
|
1393
1391
|
properties: {
|
|
1394
1392
|
name: {
|
|
1395
|
-
description: "
|
|
1393
|
+
description: "MUST use snake_case.",
|
|
1396
1394
|
type: "string",
|
|
1397
1395
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1398
1396
|
},
|
|
1399
1397
|
type: {
|
|
1400
|
-
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.",
|
|
1401
1398
|
type: "string",
|
|
1402
1399
|
"enum": [
|
|
1403
1400
|
"uuid"
|
|
1404
1401
|
]
|
|
1405
1402
|
},
|
|
1406
1403
|
description: {
|
|
1407
|
-
description: "
|
|
1404
|
+
description: "Business purpose of this primary key. MUST be written in English.",
|
|
1408
1405
|
type: "string"
|
|
1409
1406
|
}
|
|
1410
1407
|
},
|
|
@@ -1415,35 +1412,34 @@ function createController(props) {
|
|
|
1415
1412
|
]
|
|
1416
1413
|
},
|
|
1417
1414
|
"AutoBeDatabase.IForeignField": {
|
|
1418
|
-
description: "
|
|
1415
|
+
description: "Foreign key field establishing a relationship to another model.",
|
|
1419
1416
|
type: "object",
|
|
1420
1417
|
properties: {
|
|
1421
1418
|
name: {
|
|
1422
|
-
description: "
|
|
1419
|
+
description: "MUST use snake_case. Convention: \"{target_model}_id\".",
|
|
1423
1420
|
type: "string",
|
|
1424
1421
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1425
1422
|
},
|
|
1426
1423
|
type: {
|
|
1427
|
-
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.",
|
|
1428
1424
|
type: "string",
|
|
1429
1425
|
"enum": [
|
|
1430
1426
|
"uuid"
|
|
1431
1427
|
]
|
|
1432
1428
|
},
|
|
1433
1429
|
description: {
|
|
1434
|
-
description: "
|
|
1430
|
+
description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English.",
|
|
1435
1431
|
type: "string"
|
|
1436
1432
|
},
|
|
1437
1433
|
relation: {
|
|
1438
|
-
description: "Prisma relation configuration
|
|
1434
|
+
description: "Prisma relation configuration.",
|
|
1439
1435
|
$ref: "#/$defs/AutoBeDatabase.IRelation"
|
|
1440
1436
|
},
|
|
1441
1437
|
unique: {
|
|
1442
|
-
description: "
|
|
1438
|
+
description: "True for 1:1 relationships, false for 1:N.",
|
|
1443
1439
|
type: "boolean"
|
|
1444
1440
|
},
|
|
1445
1441
|
nullable: {
|
|
1446
|
-
description: "
|
|
1442
|
+
description: "True if the relationship is optional.",
|
|
1447
1443
|
type: "boolean"
|
|
1448
1444
|
}
|
|
1449
1445
|
},
|
|
@@ -1457,20 +1453,20 @@ function createController(props) {
|
|
|
1457
1453
|
]
|
|
1458
1454
|
},
|
|
1459
1455
|
"AutoBeDatabase.IRelation": {
|
|
1460
|
-
description: "
|
|
1456
|
+
description: "Prisma",
|
|
1461
1457
|
type: "object",
|
|
1462
1458
|
properties: {
|
|
1463
1459
|
name: {
|
|
1464
|
-
description: "
|
|
1460
|
+
description: "Relation property name in this model. MUST use camelCase.",
|
|
1465
1461
|
type: "string",
|
|
1466
1462
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1467
1463
|
},
|
|
1468
1464
|
targetModel: {
|
|
1469
|
-
description: "
|
|
1465
|
+
description: "Must match an existing model name in the schema.",
|
|
1470
1466
|
type: "string"
|
|
1471
1467
|
},
|
|
1472
1468
|
oppositeName: {
|
|
1473
|
-
description: "
|
|
1469
|
+
description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1.",
|
|
1474
1470
|
type: "string",
|
|
1475
1471
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1476
1472
|
}
|
|
@@ -1482,16 +1478,16 @@ function createController(props) {
|
|
|
1482
1478
|
]
|
|
1483
1479
|
},
|
|
1484
1480
|
"AutoBeDatabase.IPlainField": {
|
|
1485
|
-
description: "
|
|
1481
|
+
description: "A regular data field (not a primary or foreign key).",
|
|
1486
1482
|
type: "object",
|
|
1487
1483
|
properties: {
|
|
1488
1484
|
name: {
|
|
1489
|
-
description: "
|
|
1485
|
+
description: "MUST use snake_case.",
|
|
1490
1486
|
type: "string",
|
|
1491
1487
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1492
1488
|
},
|
|
1493
1489
|
type: {
|
|
1494
|
-
description: "
|
|
1490
|
+
description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime.",
|
|
1495
1491
|
type: "string",
|
|
1496
1492
|
"enum": [
|
|
1497
1493
|
"string",
|
|
@@ -1504,11 +1500,11 @@ function createController(props) {
|
|
|
1504
1500
|
]
|
|
1505
1501
|
},
|
|
1506
1502
|
description: {
|
|
1507
|
-
description: "
|
|
1503
|
+
description: "Business purpose of this field. MUST be written in English.",
|
|
1508
1504
|
type: "string"
|
|
1509
1505
|
},
|
|
1510
1506
|
nullable: {
|
|
1511
|
-
description: "Whether this field can
|
|
1507
|
+
description: "Whether this field can be null.",
|
|
1512
1508
|
type: "boolean"
|
|
1513
1509
|
}
|
|
1514
1510
|
},
|
|
@@ -1520,11 +1516,11 @@ function createController(props) {
|
|
|
1520
1516
|
]
|
|
1521
1517
|
},
|
|
1522
1518
|
"AutoBeDatabase.IUniqueIndex": {
|
|
1523
|
-
description: "
|
|
1519
|
+
description: "Unique index constraint (@@unique).",
|
|
1524
1520
|
type: "object",
|
|
1525
1521
|
properties: {
|
|
1526
1522
|
fieldNames: {
|
|
1527
|
-
description: "
|
|
1523
|
+
description: "Field names forming the unique constraint. All must exist in the model.",
|
|
1528
1524
|
type: "array",
|
|
1529
1525
|
items: {
|
|
1530
1526
|
type: "string"
|
|
@@ -1533,7 +1529,7 @@ function createController(props) {
|
|
|
1533
1529
|
uniqueItems: true
|
|
1534
1530
|
},
|
|
1535
1531
|
unique: {
|
|
1536
|
-
description: "
|
|
1532
|
+
description: "Always true. Distinguishes from plain indexes.",
|
|
1537
1533
|
type: "boolean",
|
|
1538
1534
|
"enum": [
|
|
1539
1535
|
true
|
|
@@ -1546,11 +1542,11 @@ function createController(props) {
|
|
|
1546
1542
|
]
|
|
1547
1543
|
},
|
|
1548
1544
|
"AutoBeDatabase.IPlainIndex": {
|
|
1549
|
-
description: "
|
|
1545
|
+
description: "Regular index for query performance (@@index).",
|
|
1550
1546
|
type: "object",
|
|
1551
1547
|
properties: {
|
|
1552
1548
|
fieldNames: {
|
|
1553
|
-
description: "
|
|
1549
|
+
description: "Field names to index. Order matters for composite indexes.",
|
|
1554
1550
|
type: "array",
|
|
1555
1551
|
items: {
|
|
1556
1552
|
type: "string"
|
|
@@ -1564,11 +1560,11 @@ function createController(props) {
|
|
|
1564
1560
|
]
|
|
1565
1561
|
},
|
|
1566
1562
|
"AutoBeDatabase.IGinIndex": {
|
|
1567
|
-
description: "
|
|
1563
|
+
description: "GIN index for PostgreSQL full-text search (gin_trgm_ops).",
|
|
1568
1564
|
type: "object",
|
|
1569
1565
|
properties: {
|
|
1570
1566
|
fieldName: {
|
|
1571
|
-
description: "
|
|
1567
|
+
description: "Must be a string field containing searchable text.",
|
|
1572
1568
|
type: "string"
|
|
1573
1569
|
}
|
|
1574
1570
|
},
|
|
@@ -1578,7 +1574,7 @@ function createController(props) {
|
|
|
1578
1574
|
}
|
|
1579
1575
|
}
|
|
1580
1576
|
},
|
|
1581
|
-
description: "Process schema correction task or preliminary data requests
|
|
1577
|
+
description: "Process schema correction task or preliminary data requests.",
|
|
1582
1578
|
validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.length <= 100 && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io2 = input => "getDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = input => "getPreviousAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io4 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io5 = input => "complete" === input.type && "string" === typeof input.planning && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io6(elem))); const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || "actor" === input.stance || "session" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io7(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io10(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io13(elem))); const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io8 = 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 && _io9(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io9 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel && ("string" === typeof input.oppositeName && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.oppositeName)); const _io10 = 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 _io11 = 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 _io12 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.fieldName; const _iu0 = input => (() => {
|
|
1583
1579
|
if ("getAnalysisSections" === input.type)
|
|
1584
1580
|
return _io1(input);
|