@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
|
@@ -113,7 +113,7 @@ function process(ctx, props) {
|
|
|
113
113
|
properties: {
|
|
114
114
|
thinking: {
|
|
115
115
|
type: "string",
|
|
116
|
-
description: "Think before you act.\n\
|
|
116
|
+
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."
|
|
117
117
|
},
|
|
118
118
|
request: {
|
|
119
119
|
oneOf: [
|
|
@@ -139,7 +139,7 @@ function process(ctx, props) {
|
|
|
139
139
|
complete: "#/components/schemas/IAutoBeDatabaseSchemaApplication.IComplete"
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
-
description: "
|
|
142
|
+
description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls."
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
required: [
|
|
@@ -152,7 +152,7 @@ function process(ctx, props) {
|
|
|
152
152
|
properties: {
|
|
153
153
|
type: {
|
|
154
154
|
"const": "getPreviousAnalysisSections",
|
|
155
|
-
description: "Type discriminator
|
|
155
|
+
description: "Type discriminator."
|
|
156
156
|
},
|
|
157
157
|
sectionIds: {
|
|
158
158
|
type: "array",
|
|
@@ -161,21 +161,21 @@ function process(ctx, props) {
|
|
|
161
161
|
minimum: 0
|
|
162
162
|
},
|
|
163
163
|
minItems: 1,
|
|
164
|
-
description: "
|
|
164
|
+
description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls."
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
required: [
|
|
168
168
|
"type",
|
|
169
169
|
"sectionIds"
|
|
170
170
|
],
|
|
171
|
-
description: "Request to retrieve
|
|
171
|
+
description: "Request to retrieve analysis sections from the previous iteration by numeric\nID."
|
|
172
172
|
},
|
|
173
173
|
IAutoBePreliminaryGetAnalysisSections: {
|
|
174
174
|
type: "object",
|
|
175
175
|
properties: {
|
|
176
176
|
type: {
|
|
177
177
|
"const": "getAnalysisSections",
|
|
178
|
-
description: "Type discriminator
|
|
178
|
+
description: "Type discriminator."
|
|
179
179
|
},
|
|
180
180
|
sectionIds: {
|
|
181
181
|
type: "array",
|
|
@@ -185,21 +185,21 @@ function process(ctx, props) {
|
|
|
185
185
|
},
|
|
186
186
|
minItems: 1,
|
|
187
187
|
maxItems: 100,
|
|
188
|
-
description: "
|
|
188
|
+
description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls."
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
required: [
|
|
192
192
|
"type",
|
|
193
193
|
"sectionIds"
|
|
194
194
|
],
|
|
195
|
-
description: "Request to retrieve individual analysis sections by numeric ID
|
|
195
|
+
description: "Request to retrieve individual analysis sections by numeric ID."
|
|
196
196
|
},
|
|
197
197
|
IAutoBePreliminaryGetPreviousDatabaseSchemas: {
|
|
198
198
|
type: "object",
|
|
199
199
|
properties: {
|
|
200
200
|
type: {
|
|
201
201
|
"const": "getPreviousDatabaseSchemas",
|
|
202
|
-
description: "Type discriminator
|
|
202
|
+
description: "Type discriminator."
|
|
203
203
|
},
|
|
204
204
|
schemaNames: {
|
|
205
205
|
type: "array",
|
|
@@ -207,29 +207,29 @@ function process(ctx, props) {
|
|
|
207
207
|
type: "string"
|
|
208
208
|
},
|
|
209
209
|
minItems: 1,
|
|
210
|
-
description: "
|
|
210
|
+
description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls."
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
required: [
|
|
214
214
|
"type",
|
|
215
215
|
"schemaNames"
|
|
216
216
|
],
|
|
217
|
-
description: "Request to retrieve database schemas from
|
|
217
|
+
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."
|
|
218
218
|
},
|
|
219
219
|
"IAutoBeDatabaseSchemaApplication.IComplete": {
|
|
220
220
|
type: "object",
|
|
221
221
|
properties: {
|
|
222
222
|
type: {
|
|
223
223
|
"const": "complete",
|
|
224
|
-
description: "Type discriminator for
|
|
224
|
+
description: "Type discriminator for completion request."
|
|
225
225
|
},
|
|
226
226
|
plan: {
|
|
227
227
|
type: "string",
|
|
228
|
-
description: "
|
|
228
|
+
description: "Database design plan for the target table and any child tables (1NF\ndecomposition).\n\nChild table naming: singular form of targetTable as prefix (e.g.,\n\"shopping_order_items\"). Never recreate existing tables from\notherComponents. Strict 1NF/2NF/3NF adherence. Junction tables:\n{table1}_{table2}. Materialized views: mv_ prefix."
|
|
229
229
|
},
|
|
230
230
|
definition: {
|
|
231
231
|
$ref: "#/components/schemas/AutoBeDatabaseSchemaDefinition",
|
|
232
|
-
description: "Schema definition
|
|
232
|
+
description: "Schema definition with exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} (the target table).\nAdditional child tables go in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as name + description\npairs.\n\nKey rules: UUID \"id\" primary keys, data types limited to\nuuid/string/int/double/ datetime/boolean/uri, no derived values, strict\n3NF, mv_ prefix for materialized views, consistent\ncreated_at/updated_at/deleted_at, PlainIndexes never single FK."
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
required: [
|
|
@@ -237,28 +237,28 @@ function process(ctx, props) {
|
|
|
237
237
|
"plan",
|
|
238
238
|
"definition"
|
|
239
239
|
],
|
|
240
|
-
description: "
|
|
240
|
+
description: "Generate production-ready database schema models with normalization and\nindexing."
|
|
241
241
|
},
|
|
242
242
|
AutoBeDatabaseSchemaDefinition: {
|
|
243
243
|
type: "object",
|
|
244
244
|
properties: {
|
|
245
245
|
model: {
|
|
246
246
|
$ref: "#/components/schemas/AutoBeDatabase.IModel",
|
|
247
|
-
description: "The single database table model produced by this call
|
|
247
|
+
description: "The single database table model produced by this call."
|
|
248
248
|
},
|
|
249
249
|
newDesigns: {
|
|
250
250
|
type: "array",
|
|
251
251
|
items: {
|
|
252
252
|
$ref: "#/components/schemas/AutoBeDatabaseComponentTableDesign"
|
|
253
253
|
},
|
|
254
|
-
description: "
|
|
254
|
+
description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call."
|
|
255
255
|
}
|
|
256
256
|
},
|
|
257
257
|
required: [
|
|
258
258
|
"model",
|
|
259
259
|
"newDesigns"
|
|
260
260
|
],
|
|
261
|
-
description: "
|
|
261
|
+
description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget."
|
|
262
262
|
},
|
|
263
263
|
"AutoBeDatabase.IModel": {
|
|
264
264
|
type: "object",
|
|
@@ -266,15 +266,15 @@ function process(ctx, props) {
|
|
|
266
266
|
name: {
|
|
267
267
|
type: "string",
|
|
268
268
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
269
|
-
description: "
|
|
269
|
+
description: "MUST use snake_case. Materialized views use \"mv_\" prefix."
|
|
270
270
|
},
|
|
271
271
|
description: {
|
|
272
272
|
type: "string",
|
|
273
|
-
description: "
|
|
273
|
+
description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax."
|
|
274
274
|
},
|
|
275
275
|
material: {
|
|
276
276
|
type: "boolean",
|
|
277
|
-
description: "
|
|
277
|
+
description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix."
|
|
278
278
|
},
|
|
279
279
|
stance: {
|
|
280
280
|
oneOf: [
|
|
@@ -294,46 +294,46 @@ function process(ctx, props) {
|
|
|
294
294
|
"const": "session"
|
|
295
295
|
}
|
|
296
296
|
],
|
|
297
|
-
description: "
|
|
297
|
+
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."
|
|
298
298
|
},
|
|
299
299
|
primaryField: {
|
|
300
300
|
$ref: "#/components/schemas/AutoBeDatabase.IPrimaryField",
|
|
301
|
-
description: "
|
|
301
|
+
description: "Primary key field (UUID)."
|
|
302
302
|
},
|
|
303
303
|
foreignFields: {
|
|
304
304
|
type: "array",
|
|
305
305
|
items: {
|
|
306
306
|
$ref: "#/components/schemas/AutoBeDatabase.IForeignField"
|
|
307
307
|
},
|
|
308
|
-
description: "
|
|
308
|
+
description: "Foreign key fields establishing relationships to other models."
|
|
309
309
|
},
|
|
310
310
|
plainFields: {
|
|
311
311
|
type: "array",
|
|
312
312
|
items: {
|
|
313
313
|
$ref: "#/components/schemas/AutoBeDatabase.IPlainField"
|
|
314
314
|
},
|
|
315
|
-
description: "
|
|
315
|
+
description: "Regular data fields (names, timestamps, flags, amounts, etc.)."
|
|
316
316
|
},
|
|
317
317
|
uniqueIndexes: {
|
|
318
318
|
type: "array",
|
|
319
319
|
items: {
|
|
320
320
|
$ref: "#/components/schemas/AutoBeDatabase.IUniqueIndex"
|
|
321
321
|
},
|
|
322
|
-
description: "
|
|
322
|
+
description: "Unique indexes for data integrity constraints."
|
|
323
323
|
},
|
|
324
324
|
plainIndexes: {
|
|
325
325
|
type: "array",
|
|
326
326
|
items: {
|
|
327
327
|
$ref: "#/components/schemas/AutoBeDatabase.IPlainIndex"
|
|
328
328
|
},
|
|
329
|
-
description: "
|
|
329
|
+
description: "Regular indexes for query performance."
|
|
330
330
|
},
|
|
331
331
|
ginIndexes: {
|
|
332
332
|
type: "array",
|
|
333
333
|
items: {
|
|
334
334
|
$ref: "#/components/schemas/AutoBeDatabase.IGinIndex"
|
|
335
335
|
},
|
|
336
|
-
description: "
|
|
336
|
+
description: "GIN indexes for PostgreSQL full-text search (trigram)."
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
339
|
required: [
|
|
@@ -348,7 +348,7 @@ function process(ctx, props) {
|
|
|
348
348
|
"plainIndexes",
|
|
349
349
|
"ginIndexes"
|
|
350
350
|
],
|
|
351
|
-
description: "
|
|
351
|
+
description: "A single Prisma model (database table)."
|
|
352
352
|
},
|
|
353
353
|
"AutoBeDatabase.IPrimaryField": {
|
|
354
354
|
type: "object",
|
|
@@ -356,15 +356,14 @@ function process(ctx, props) {
|
|
|
356
356
|
name: {
|
|
357
357
|
type: "string",
|
|
358
358
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
359
|
-
description: "
|
|
359
|
+
description: "MUST use snake_case."
|
|
360
360
|
},
|
|
361
361
|
type: {
|
|
362
|
-
"const": "uuid"
|
|
363
|
-
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."
|
|
362
|
+
"const": "uuid"
|
|
364
363
|
},
|
|
365
364
|
description: {
|
|
366
365
|
type: "string",
|
|
367
|
-
description: "
|
|
366
|
+
description: "Business purpose of this primary key. MUST be written in English."
|
|
368
367
|
}
|
|
369
368
|
},
|
|
370
369
|
required: [
|
|
@@ -372,7 +371,7 @@ function process(ctx, props) {
|
|
|
372
371
|
"type",
|
|
373
372
|
"description"
|
|
374
373
|
],
|
|
375
|
-
description: "
|
|
374
|
+
description: "Primary key field of a model."
|
|
376
375
|
},
|
|
377
376
|
"AutoBeDatabase.IForeignField": {
|
|
378
377
|
type: "object",
|
|
@@ -380,27 +379,26 @@ function process(ctx, props) {
|
|
|
380
379
|
name: {
|
|
381
380
|
type: "string",
|
|
382
381
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
383
|
-
description: "
|
|
382
|
+
description: "MUST use snake_case. Convention: \"{target_model}_id\"."
|
|
384
383
|
},
|
|
385
384
|
type: {
|
|
386
|
-
"const": "uuid"
|
|
387
|
-
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."
|
|
385
|
+
"const": "uuid"
|
|
388
386
|
},
|
|
389
387
|
description: {
|
|
390
388
|
type: "string",
|
|
391
|
-
description: "
|
|
389
|
+
description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English."
|
|
392
390
|
},
|
|
393
391
|
relation: {
|
|
394
392
|
$ref: "#/components/schemas/AutoBeDatabase.IRelation",
|
|
395
|
-
description: "Prisma relation configuration
|
|
393
|
+
description: "Prisma relation configuration."
|
|
396
394
|
},
|
|
397
395
|
unique: {
|
|
398
396
|
type: "boolean",
|
|
399
|
-
description: "
|
|
397
|
+
description: "True for 1:1 relationships, false for 1:N."
|
|
400
398
|
},
|
|
401
399
|
nullable: {
|
|
402
400
|
type: "boolean",
|
|
403
|
-
description: "
|
|
401
|
+
description: "True if the relationship is optional."
|
|
404
402
|
}
|
|
405
403
|
},
|
|
406
404
|
required: [
|
|
@@ -411,7 +409,7 @@ function process(ctx, props) {
|
|
|
411
409
|
"unique",
|
|
412
410
|
"nullable"
|
|
413
411
|
],
|
|
414
|
-
description: "
|
|
412
|
+
description: "Foreign key field establishing a relationship to another model."
|
|
415
413
|
},
|
|
416
414
|
"AutoBeDatabase.IRelation": {
|
|
417
415
|
type: "object",
|
|
@@ -419,16 +417,16 @@ function process(ctx, props) {
|
|
|
419
417
|
name: {
|
|
420
418
|
type: "string",
|
|
421
419
|
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
422
|
-
description: "
|
|
420
|
+
description: "Relation property name in this model. MUST use camelCase."
|
|
423
421
|
},
|
|
424
422
|
targetModel: {
|
|
425
423
|
type: "string",
|
|
426
|
-
description: "
|
|
424
|
+
description: "Must match an existing model name in the schema."
|
|
427
425
|
},
|
|
428
426
|
oppositeName: {
|
|
429
427
|
type: "string",
|
|
430
428
|
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
431
|
-
description: "
|
|
429
|
+
description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1."
|
|
432
430
|
}
|
|
433
431
|
},
|
|
434
432
|
required: [
|
|
@@ -436,7 +434,7 @@ function process(ctx, props) {
|
|
|
436
434
|
"targetModel",
|
|
437
435
|
"oppositeName"
|
|
438
436
|
],
|
|
439
|
-
description: "
|
|
437
|
+
description: "Prisma"
|
|
440
438
|
},
|
|
441
439
|
"AutoBeDatabase.IPlainField": {
|
|
442
440
|
type: "object",
|
|
@@ -444,7 +442,7 @@ function process(ctx, props) {
|
|
|
444
442
|
name: {
|
|
445
443
|
type: "string",
|
|
446
444
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
447
|
-
description: "
|
|
445
|
+
description: "MUST use snake_case."
|
|
448
446
|
},
|
|
449
447
|
type: {
|
|
450
448
|
oneOf: [
|
|
@@ -470,15 +468,15 @@ function process(ctx, props) {
|
|
|
470
468
|
"const": "datetime"
|
|
471
469
|
}
|
|
472
470
|
],
|
|
473
|
-
description: "
|
|
471
|
+
description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime."
|
|
474
472
|
},
|
|
475
473
|
description: {
|
|
476
474
|
type: "string",
|
|
477
|
-
description: "
|
|
475
|
+
description: "Business purpose of this field. MUST be written in English."
|
|
478
476
|
},
|
|
479
477
|
nullable: {
|
|
480
478
|
type: "boolean",
|
|
481
|
-
description: "Whether this field can
|
|
479
|
+
description: "Whether this field can be null."
|
|
482
480
|
}
|
|
483
481
|
},
|
|
484
482
|
required: [
|
|
@@ -487,7 +485,7 @@ function process(ctx, props) {
|
|
|
487
485
|
"description",
|
|
488
486
|
"nullable"
|
|
489
487
|
],
|
|
490
|
-
description: "
|
|
488
|
+
description: "A regular data field (not a primary or foreign key)."
|
|
491
489
|
},
|
|
492
490
|
"AutoBeDatabase.IUniqueIndex": {
|
|
493
491
|
type: "object",
|
|
@@ -499,18 +497,18 @@ function process(ctx, props) {
|
|
|
499
497
|
},
|
|
500
498
|
minItems: 1,
|
|
501
499
|
uniqueItems: true,
|
|
502
|
-
description: "
|
|
500
|
+
description: "Field names forming the unique constraint. All must exist in the model."
|
|
503
501
|
},
|
|
504
502
|
unique: {
|
|
505
503
|
"const": true,
|
|
506
|
-
description: "
|
|
504
|
+
description: "Always true. Distinguishes from plain indexes."
|
|
507
505
|
}
|
|
508
506
|
},
|
|
509
507
|
required: [
|
|
510
508
|
"fieldNames",
|
|
511
509
|
"unique"
|
|
512
510
|
],
|
|
513
|
-
description: "
|
|
511
|
+
description: "Unique index constraint (@@unique)."
|
|
514
512
|
},
|
|
515
513
|
"AutoBeDatabase.IPlainIndex": {
|
|
516
514
|
type: "object",
|
|
@@ -522,45 +520,45 @@ function process(ctx, props) {
|
|
|
522
520
|
},
|
|
523
521
|
minItems: 1,
|
|
524
522
|
uniqueItems: true,
|
|
525
|
-
description: "
|
|
523
|
+
description: "Field names to index. Order matters for composite indexes."
|
|
526
524
|
}
|
|
527
525
|
},
|
|
528
526
|
required: [
|
|
529
527
|
"fieldNames"
|
|
530
528
|
],
|
|
531
|
-
description: "
|
|
529
|
+
description: "Regular index for query performance (@@index)."
|
|
532
530
|
},
|
|
533
531
|
"AutoBeDatabase.IGinIndex": {
|
|
534
532
|
type: "object",
|
|
535
533
|
properties: {
|
|
536
534
|
fieldName: {
|
|
537
535
|
type: "string",
|
|
538
|
-
description: "
|
|
536
|
+
description: "Must be a string field containing searchable text."
|
|
539
537
|
}
|
|
540
538
|
},
|
|
541
539
|
required: [
|
|
542
540
|
"fieldName"
|
|
543
541
|
],
|
|
544
|
-
description: "
|
|
542
|
+
description: "GIN index for PostgreSQL full-text search (gin_trgm_ops)."
|
|
545
543
|
},
|
|
546
544
|
AutoBeDatabaseComponentTableDesign: {
|
|
547
545
|
type: "object",
|
|
548
546
|
properties: {
|
|
549
547
|
description: {
|
|
550
548
|
type: "string",
|
|
551
|
-
description: "
|
|
549
|
+
description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English."
|
|
552
550
|
},
|
|
553
551
|
name: {
|
|
554
552
|
type: "string",
|
|
555
553
|
pattern: "^[a-z][a-z0-9_]*$",
|
|
556
|
-
description: "
|
|
554
|
+
description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\")."
|
|
557
555
|
}
|
|
558
556
|
},
|
|
559
557
|
required: [
|
|
560
558
|
"description",
|
|
561
559
|
"name"
|
|
562
560
|
],
|
|
563
|
-
description: "Table design with name and description
|
|
561
|
+
description: "Table design with name and description."
|
|
564
562
|
}
|
|
565
563
|
}
|
|
566
564
|
},
|
|
@@ -578,7 +576,7 @@ function process(ctx, props) {
|
|
|
578
576
|
}
|
|
579
577
|
}
|
|
580
578
|
],
|
|
581
|
-
description: "Process schema generation task or preliminary data
|
|
579
|
+
description: "Process schema generation task or retrieve preliminary data."
|
|
582
580
|
}
|
|
583
581
|
]
|
|
584
582
|
},
|
|
@@ -1103,11 +1101,11 @@ function createController(props) {
|
|
|
1103
1101
|
type: "object",
|
|
1104
1102
|
properties: {
|
|
1105
1103
|
thinking: {
|
|
1106
|
-
description: "Think before you act.\n\
|
|
1104
|
+
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.",
|
|
1107
1105
|
type: "string"
|
|
1108
1106
|
},
|
|
1109
1107
|
request: {
|
|
1110
|
-
description: "
|
|
1108
|
+
description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls.",
|
|
1111
1109
|
anyOf: [
|
|
1112
1110
|
{
|
|
1113
1111
|
$ref: "#/$defs/IAutoBePreliminaryGetPreviousAnalysisSections"
|
|
@@ -1140,18 +1138,18 @@ function createController(props) {
|
|
|
1140
1138
|
additionalProperties: false,
|
|
1141
1139
|
$defs: {
|
|
1142
1140
|
IAutoBePreliminaryGetPreviousAnalysisSections: {
|
|
1143
|
-
description: "Request to retrieve
|
|
1141
|
+
description: "Request to retrieve analysis sections from the previous iteration by numeric\nID.",
|
|
1144
1142
|
type: "object",
|
|
1145
1143
|
properties: {
|
|
1146
1144
|
type: {
|
|
1147
|
-
description: "Type discriminator
|
|
1145
|
+
description: "Type discriminator.",
|
|
1148
1146
|
type: "string",
|
|
1149
1147
|
"enum": [
|
|
1150
1148
|
"getPreviousAnalysisSections"
|
|
1151
1149
|
]
|
|
1152
1150
|
},
|
|
1153
1151
|
sectionIds: {
|
|
1154
|
-
description: "
|
|
1152
|
+
description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls.",
|
|
1155
1153
|
type: "array",
|
|
1156
1154
|
items: {
|
|
1157
1155
|
type: "integer",
|
|
@@ -1166,18 +1164,18 @@ function createController(props) {
|
|
|
1166
1164
|
]
|
|
1167
1165
|
},
|
|
1168
1166
|
IAutoBePreliminaryGetAnalysisSections: {
|
|
1169
|
-
description: "Request to retrieve individual analysis sections by numeric ID
|
|
1167
|
+
description: "Request to retrieve individual analysis sections by numeric ID.",
|
|
1170
1168
|
type: "object",
|
|
1171
1169
|
properties: {
|
|
1172
1170
|
type: {
|
|
1173
|
-
description: "Type discriminator
|
|
1171
|
+
description: "Type discriminator.",
|
|
1174
1172
|
type: "string",
|
|
1175
1173
|
"enum": [
|
|
1176
1174
|
"getAnalysisSections"
|
|
1177
1175
|
]
|
|
1178
1176
|
},
|
|
1179
1177
|
sectionIds: {
|
|
1180
|
-
description: "
|
|
1178
|
+
description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls.",
|
|
1181
1179
|
type: "array",
|
|
1182
1180
|
items: {
|
|
1183
1181
|
type: "integer",
|
|
@@ -1193,18 +1191,18 @@ function createController(props) {
|
|
|
1193
1191
|
]
|
|
1194
1192
|
},
|
|
1195
1193
|
IAutoBePreliminaryGetPreviousDatabaseSchemas: {
|
|
1196
|
-
description: "Request to retrieve database schemas from
|
|
1194
|
+
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.",
|
|
1197
1195
|
type: "object",
|
|
1198
1196
|
properties: {
|
|
1199
1197
|
type: {
|
|
1200
|
-
description: "Type discriminator
|
|
1198
|
+
description: "Type discriminator.",
|
|
1201
1199
|
type: "string",
|
|
1202
1200
|
"enum": [
|
|
1203
1201
|
"getPreviousDatabaseSchemas"
|
|
1204
1202
|
]
|
|
1205
1203
|
},
|
|
1206
1204
|
schemaNames: {
|
|
1207
|
-
description: "
|
|
1205
|
+
description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls.",
|
|
1208
1206
|
type: "array",
|
|
1209
1207
|
items: {
|
|
1210
1208
|
type: "string"
|
|
@@ -1218,22 +1216,22 @@ function createController(props) {
|
|
|
1218
1216
|
]
|
|
1219
1217
|
},
|
|
1220
1218
|
"IAutoBeDatabaseSchemaApplication.IComplete": {
|
|
1221
|
-
description: "
|
|
1219
|
+
description: "Generate production-ready database schema models with normalization and\nindexing.",
|
|
1222
1220
|
type: "object",
|
|
1223
1221
|
properties: {
|
|
1224
1222
|
type: {
|
|
1225
|
-
description: "Type discriminator for
|
|
1223
|
+
description: "Type discriminator for completion request.",
|
|
1226
1224
|
type: "string",
|
|
1227
1225
|
"enum": [
|
|
1228
1226
|
"complete"
|
|
1229
1227
|
]
|
|
1230
1228
|
},
|
|
1231
1229
|
plan: {
|
|
1232
|
-
description: "
|
|
1230
|
+
description: "Database design plan for the target table and any child tables (1NF\ndecomposition).\n\nChild table naming: singular form of targetTable as prefix (e.g.,\n\"shopping_order_items\"). Never recreate existing tables from\notherComponents. Strict 1NF/2NF/3NF adherence. Junction tables:\n{table1}_{table2}. Materialized views: mv_ prefix.",
|
|
1233
1231
|
type: "string"
|
|
1234
1232
|
},
|
|
1235
1233
|
definition: {
|
|
1236
|
-
description: "Schema definition
|
|
1234
|
+
description: "Schema definition with exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} (the target table).\nAdditional child tables go in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as name + description\npairs.\n\nKey rules: UUID \"id\" primary keys, data types limited to\nuuid/string/int/double/ datetime/boolean/uri, no derived values, strict\n3NF, mv_ prefix for materialized views, consistent\ncreated_at/updated_at/deleted_at, PlainIndexes never single FK.",
|
|
1237
1235
|
$ref: "#/$defs/AutoBeDatabaseSchemaDefinition"
|
|
1238
1236
|
}
|
|
1239
1237
|
},
|
|
@@ -1244,15 +1242,15 @@ function createController(props) {
|
|
|
1244
1242
|
]
|
|
1245
1243
|
},
|
|
1246
1244
|
AutoBeDatabaseSchemaDefinition: {
|
|
1247
|
-
description: "
|
|
1245
|
+
description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget.",
|
|
1248
1246
|
type: "object",
|
|
1249
1247
|
properties: {
|
|
1250
1248
|
model: {
|
|
1251
|
-
description: "The single database table model produced by this call
|
|
1249
|
+
description: "The single database table model produced by this call.",
|
|
1252
1250
|
$ref: "#/$defs/AutoBeDatabase.IModel"
|
|
1253
1251
|
},
|
|
1254
1252
|
newDesigns: {
|
|
1255
|
-
description: "
|
|
1253
|
+
description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call.",
|
|
1256
1254
|
type: "array",
|
|
1257
1255
|
items: {
|
|
1258
1256
|
$ref: "#/$defs/AutoBeDatabaseComponentTableDesign"
|
|
@@ -1265,24 +1263,24 @@ function createController(props) {
|
|
|
1265
1263
|
]
|
|
1266
1264
|
},
|
|
1267
1265
|
"AutoBeDatabase.IModel": {
|
|
1268
|
-
description: "
|
|
1266
|
+
description: "A single Prisma model (database table).",
|
|
1269
1267
|
type: "object",
|
|
1270
1268
|
properties: {
|
|
1271
1269
|
name: {
|
|
1272
|
-
description: "
|
|
1270
|
+
description: "MUST use snake_case. Materialized views use \"mv_\" prefix.",
|
|
1273
1271
|
type: "string",
|
|
1274
1272
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1275
1273
|
},
|
|
1276
1274
|
description: {
|
|
1277
|
-
description: "
|
|
1275
|
+
description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax.",
|
|
1278
1276
|
type: "string"
|
|
1279
1277
|
},
|
|
1280
1278
|
material: {
|
|
1281
|
-
description: "
|
|
1279
|
+
description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix.",
|
|
1282
1280
|
type: "boolean"
|
|
1283
1281
|
},
|
|
1284
1282
|
stance: {
|
|
1285
|
-
description: "
|
|
1283
|
+
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.",
|
|
1286
1284
|
type: "string",
|
|
1287
1285
|
"enum": [
|
|
1288
1286
|
"primary",
|
|
@@ -1293,39 +1291,39 @@ function createController(props) {
|
|
|
1293
1291
|
]
|
|
1294
1292
|
},
|
|
1295
1293
|
primaryField: {
|
|
1296
|
-
description: "
|
|
1294
|
+
description: "Primary key field (UUID).",
|
|
1297
1295
|
$ref: "#/$defs/AutoBeDatabase.IPrimaryField"
|
|
1298
1296
|
},
|
|
1299
1297
|
foreignFields: {
|
|
1300
|
-
description: "
|
|
1298
|
+
description: "Foreign key fields establishing relationships to other models.",
|
|
1301
1299
|
type: "array",
|
|
1302
1300
|
items: {
|
|
1303
1301
|
$ref: "#/$defs/AutoBeDatabase.IForeignField"
|
|
1304
1302
|
}
|
|
1305
1303
|
},
|
|
1306
1304
|
plainFields: {
|
|
1307
|
-
description: "
|
|
1305
|
+
description: "Regular data fields (names, timestamps, flags, amounts, etc.).",
|
|
1308
1306
|
type: "array",
|
|
1309
1307
|
items: {
|
|
1310
1308
|
$ref: "#/$defs/AutoBeDatabase.IPlainField"
|
|
1311
1309
|
}
|
|
1312
1310
|
},
|
|
1313
1311
|
uniqueIndexes: {
|
|
1314
|
-
description: "
|
|
1312
|
+
description: "Unique indexes for data integrity constraints.",
|
|
1315
1313
|
type: "array",
|
|
1316
1314
|
items: {
|
|
1317
1315
|
$ref: "#/$defs/AutoBeDatabase.IUniqueIndex"
|
|
1318
1316
|
}
|
|
1319
1317
|
},
|
|
1320
1318
|
plainIndexes: {
|
|
1321
|
-
description: "
|
|
1319
|
+
description: "Regular indexes for query performance.",
|
|
1322
1320
|
type: "array",
|
|
1323
1321
|
items: {
|
|
1324
1322
|
$ref: "#/$defs/AutoBeDatabase.IPlainIndex"
|
|
1325
1323
|
}
|
|
1326
1324
|
},
|
|
1327
1325
|
ginIndexes: {
|
|
1328
|
-
description: "
|
|
1326
|
+
description: "GIN indexes for PostgreSQL full-text search (trigram).",
|
|
1329
1327
|
type: "array",
|
|
1330
1328
|
items: {
|
|
1331
1329
|
$ref: "#/$defs/AutoBeDatabase.IGinIndex"
|
|
@@ -1346,23 +1344,22 @@ function createController(props) {
|
|
|
1346
1344
|
]
|
|
1347
1345
|
},
|
|
1348
1346
|
"AutoBeDatabase.IPrimaryField": {
|
|
1349
|
-
description: "
|
|
1347
|
+
description: "Primary key field of a model.",
|
|
1350
1348
|
type: "object",
|
|
1351
1349
|
properties: {
|
|
1352
1350
|
name: {
|
|
1353
|
-
description: "
|
|
1351
|
+
description: "MUST use snake_case.",
|
|
1354
1352
|
type: "string",
|
|
1355
1353
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1356
1354
|
},
|
|
1357
1355
|
type: {
|
|
1358
|
-
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.",
|
|
1359
1356
|
type: "string",
|
|
1360
1357
|
"enum": [
|
|
1361
1358
|
"uuid"
|
|
1362
1359
|
]
|
|
1363
1360
|
},
|
|
1364
1361
|
description: {
|
|
1365
|
-
description: "
|
|
1362
|
+
description: "Business purpose of this primary key. MUST be written in English.",
|
|
1366
1363
|
type: "string"
|
|
1367
1364
|
}
|
|
1368
1365
|
},
|
|
@@ -1373,35 +1370,34 @@ function createController(props) {
|
|
|
1373
1370
|
]
|
|
1374
1371
|
},
|
|
1375
1372
|
"AutoBeDatabase.IForeignField": {
|
|
1376
|
-
description: "
|
|
1373
|
+
description: "Foreign key field establishing a relationship to another model.",
|
|
1377
1374
|
type: "object",
|
|
1378
1375
|
properties: {
|
|
1379
1376
|
name: {
|
|
1380
|
-
description: "
|
|
1377
|
+
description: "MUST use snake_case. Convention: \"{target_model}_id\".",
|
|
1381
1378
|
type: "string",
|
|
1382
1379
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1383
1380
|
},
|
|
1384
1381
|
type: {
|
|
1385
|
-
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.",
|
|
1386
1382
|
type: "string",
|
|
1387
1383
|
"enum": [
|
|
1388
1384
|
"uuid"
|
|
1389
1385
|
]
|
|
1390
1386
|
},
|
|
1391
1387
|
description: {
|
|
1392
|
-
description: "
|
|
1388
|
+
description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English.",
|
|
1393
1389
|
type: "string"
|
|
1394
1390
|
},
|
|
1395
1391
|
relation: {
|
|
1396
|
-
description: "Prisma relation configuration
|
|
1392
|
+
description: "Prisma relation configuration.",
|
|
1397
1393
|
$ref: "#/$defs/AutoBeDatabase.IRelation"
|
|
1398
1394
|
},
|
|
1399
1395
|
unique: {
|
|
1400
|
-
description: "
|
|
1396
|
+
description: "True for 1:1 relationships, false for 1:N.",
|
|
1401
1397
|
type: "boolean"
|
|
1402
1398
|
},
|
|
1403
1399
|
nullable: {
|
|
1404
|
-
description: "
|
|
1400
|
+
description: "True if the relationship is optional.",
|
|
1405
1401
|
type: "boolean"
|
|
1406
1402
|
}
|
|
1407
1403
|
},
|
|
@@ -1415,20 +1411,20 @@ function createController(props) {
|
|
|
1415
1411
|
]
|
|
1416
1412
|
},
|
|
1417
1413
|
"AutoBeDatabase.IRelation": {
|
|
1418
|
-
description: "
|
|
1414
|
+
description: "Prisma",
|
|
1419
1415
|
type: "object",
|
|
1420
1416
|
properties: {
|
|
1421
1417
|
name: {
|
|
1422
|
-
description: "
|
|
1418
|
+
description: "Relation property name in this model. MUST use camelCase.",
|
|
1423
1419
|
type: "string",
|
|
1424
1420
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1425
1421
|
},
|
|
1426
1422
|
targetModel: {
|
|
1427
|
-
description: "
|
|
1423
|
+
description: "Must match an existing model name in the schema.",
|
|
1428
1424
|
type: "string"
|
|
1429
1425
|
},
|
|
1430
1426
|
oppositeName: {
|
|
1431
|
-
description: "
|
|
1427
|
+
description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1.",
|
|
1432
1428
|
type: "string",
|
|
1433
1429
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1434
1430
|
}
|
|
@@ -1440,16 +1436,16 @@ function createController(props) {
|
|
|
1440
1436
|
]
|
|
1441
1437
|
},
|
|
1442
1438
|
"AutoBeDatabase.IPlainField": {
|
|
1443
|
-
description: "
|
|
1439
|
+
description: "A regular data field (not a primary or foreign key).",
|
|
1444
1440
|
type: "object",
|
|
1445
1441
|
properties: {
|
|
1446
1442
|
name: {
|
|
1447
|
-
description: "
|
|
1443
|
+
description: "MUST use snake_case.",
|
|
1448
1444
|
type: "string",
|
|
1449
1445
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1450
1446
|
},
|
|
1451
1447
|
type: {
|
|
1452
|
-
description: "
|
|
1448
|
+
description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime.",
|
|
1453
1449
|
type: "string",
|
|
1454
1450
|
"enum": [
|
|
1455
1451
|
"string",
|
|
@@ -1462,11 +1458,11 @@ function createController(props) {
|
|
|
1462
1458
|
]
|
|
1463
1459
|
},
|
|
1464
1460
|
description: {
|
|
1465
|
-
description: "
|
|
1461
|
+
description: "Business purpose of this field. MUST be written in English.",
|
|
1466
1462
|
type: "string"
|
|
1467
1463
|
},
|
|
1468
1464
|
nullable: {
|
|
1469
|
-
description: "Whether this field can
|
|
1465
|
+
description: "Whether this field can be null.",
|
|
1470
1466
|
type: "boolean"
|
|
1471
1467
|
}
|
|
1472
1468
|
},
|
|
@@ -1478,11 +1474,11 @@ function createController(props) {
|
|
|
1478
1474
|
]
|
|
1479
1475
|
},
|
|
1480
1476
|
"AutoBeDatabase.IUniqueIndex": {
|
|
1481
|
-
description: "
|
|
1477
|
+
description: "Unique index constraint (@@unique).",
|
|
1482
1478
|
type: "object",
|
|
1483
1479
|
properties: {
|
|
1484
1480
|
fieldNames: {
|
|
1485
|
-
description: "
|
|
1481
|
+
description: "Field names forming the unique constraint. All must exist in the model.",
|
|
1486
1482
|
type: "array",
|
|
1487
1483
|
items: {
|
|
1488
1484
|
type: "string"
|
|
@@ -1491,7 +1487,7 @@ function createController(props) {
|
|
|
1491
1487
|
uniqueItems: true
|
|
1492
1488
|
},
|
|
1493
1489
|
unique: {
|
|
1494
|
-
description: "
|
|
1490
|
+
description: "Always true. Distinguishes from plain indexes.",
|
|
1495
1491
|
type: "boolean",
|
|
1496
1492
|
"enum": [
|
|
1497
1493
|
true
|
|
@@ -1504,11 +1500,11 @@ function createController(props) {
|
|
|
1504
1500
|
]
|
|
1505
1501
|
},
|
|
1506
1502
|
"AutoBeDatabase.IPlainIndex": {
|
|
1507
|
-
description: "
|
|
1503
|
+
description: "Regular index for query performance (@@index).",
|
|
1508
1504
|
type: "object",
|
|
1509
1505
|
properties: {
|
|
1510
1506
|
fieldNames: {
|
|
1511
|
-
description: "
|
|
1507
|
+
description: "Field names to index. Order matters for composite indexes.",
|
|
1512
1508
|
type: "array",
|
|
1513
1509
|
items: {
|
|
1514
1510
|
type: "string"
|
|
@@ -1522,11 +1518,11 @@ function createController(props) {
|
|
|
1522
1518
|
]
|
|
1523
1519
|
},
|
|
1524
1520
|
"AutoBeDatabase.IGinIndex": {
|
|
1525
|
-
description: "
|
|
1521
|
+
description: "GIN index for PostgreSQL full-text search (gin_trgm_ops).",
|
|
1526
1522
|
type: "object",
|
|
1527
1523
|
properties: {
|
|
1528
1524
|
fieldName: {
|
|
1529
|
-
description: "
|
|
1525
|
+
description: "Must be a string field containing searchable text.",
|
|
1530
1526
|
type: "string"
|
|
1531
1527
|
}
|
|
1532
1528
|
},
|
|
@@ -1535,15 +1531,15 @@ function createController(props) {
|
|
|
1535
1531
|
]
|
|
1536
1532
|
},
|
|
1537
1533
|
AutoBeDatabaseComponentTableDesign: {
|
|
1538
|
-
description: "Table design with name and description
|
|
1534
|
+
description: "Table design with name and description.",
|
|
1539
1535
|
type: "object",
|
|
1540
1536
|
properties: {
|
|
1541
1537
|
description: {
|
|
1542
|
-
description: "
|
|
1538
|
+
description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English.",
|
|
1543
1539
|
type: "string"
|
|
1544
1540
|
},
|
|
1545
1541
|
name: {
|
|
1546
|
-
description: "
|
|
1542
|
+
description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\").",
|
|
1547
1543
|
type: "string",
|
|
1548
1544
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
1549
1545
|
}
|
|
@@ -1555,7 +1551,7 @@ function createController(props) {
|
|
|
1555
1551
|
}
|
|
1556
1552
|
}
|
|
1557
1553
|
},
|
|
1558
|
-
description: "Process schema generation task or preliminary data
|
|
1554
|
+
description: "Process schema generation task or retrieve preliminary data.",
|
|
1559
1555
|
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 => "getPreviousAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io3 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io4 = input => "complete" === input.type && "string" === typeof input.plan && ("object" === typeof input.definition && null !== input.definition && _io5(input.definition)); const _io5 = input => "object" === typeof input.model && null !== input.model && _io6(input.model) && (Array.isArray(input.newDesigns) && input.newDesigns.every(elem => "object" === typeof elem && null !== elem && _io14(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 _io14 = input => "string" === typeof input.description && ("string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name)); const _iu0 = input => (() => {
|
|
1560
1556
|
if ("getPreviousAnalysisSections" === input.type)
|
|
1561
1557
|
return _io2(input);
|