@autobe/agent 0.19.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent/src/AutoBeAgent.js +3 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.js +4 -3
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
- package/lib/agent/src/factory/consentFunctionCall.js +3 -2
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +11 -6
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.js → transformAnalyzeReviewHistories.js} +24 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +31 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +19 -5
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +9 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +11 -9
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -46
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +13 -13
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +23 -22
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +32 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +3 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +28 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +11 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +80 -54
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1635 -1180
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +30 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +178 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +54 -54
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +18 -29
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +37 -34
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +38 -25
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +3 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +2 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +3 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +19 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +28 -21
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +58 -56
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +12 -3
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +35 -30
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/{orchestrate/realize/internal/compile.d.ts → agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +6 -6
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +26 -12
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +9 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +3 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +12 -8
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +25 -21
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +44 -27
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +63 -60
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +118 -96
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -5
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +17 -8
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +30 -18
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +18 -18
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/index.mjs +3265 -1702
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
- package/lib/{agent/src/orchestrate/realize/internal/compile.d.ts → orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +4 -3
- package/src/AutoBeMockAgent.ts +5 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +12 -11
- package/src/context/AutoBeContext.ts +3 -0
- package/src/factory/consentFunctionCall.ts +4 -3
- package/src/factory/createAutoBeContext.ts +11 -7
- package/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.ts → transformAnalyzeReviewHistories.ts} +23 -30
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +60 -61
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +20 -13
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +20 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -11
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -48
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -19
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +31 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +4 -2
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +36 -29
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +18 -10
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +120 -10
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +82 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +57 -55
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +4 -2
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +26 -13
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +42 -40
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +17 -13
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +14 -5
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +35 -30
- package/src/orchestrate/realize/internal/{compile.ts → compileRealizeFiles.ts} +15 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +59 -40
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +19 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +10 -10
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +7 -77
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +6 -2
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +10 -5
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +2 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +50 -37
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +27 -7
- package/src/orchestrate/test/orchestrateTest.ts +7 -9
- package/src/orchestrate/test/orchestrateTestCorrect.ts +39 -25
- package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
- package/src/orchestrate/test/orchestrateTestWrite.ts +17 -18
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -74
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/src/orchestrate/test/histories/transformTestHistories.ts +0 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceOperationsReview.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceOperationsReview.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,oFA0DC;;;AAjED,kDAA0B;AAC1B,+BAA0B;AAG1B,yHAAsH;AAGtH,SAAsB,oCAAoC,CAGxD,GAAyB,EACzB,UAAsC,EACtC,QAAiC;;;QAEjC,IAAI,CAAC;YACH,MAAM,KAAK,GAAyB,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,0CAAE,MAAM,CAAC,IAAI,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHAI5B;YACA,QAAQ,EAAE;gBACR,gBAAgB,EAAE,QAAQ;aAC3B;SACF;;QAAC;CACL,CAAC"}
|
|
@@ -49,10 +49,13 @@ exports.orchestrateInterfaceSchemas = orchestrateInterfaceSchemas;
|
|
|
49
49
|
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
50
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
51
51
|
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
52
|
+
const utils_1 = require("@autobe/utils");
|
|
52
53
|
const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
53
54
|
const typia_1 = __importDefault(require("typia"));
|
|
55
|
+
const uuid_1 = require("uuid");
|
|
54
56
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
55
57
|
const divideArray_1 = require("../../utils/divideArray");
|
|
58
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
56
59
|
const transformInterfaceSchemaHistories_1 = require("./histories/transformInterfaceSchemaHistories");
|
|
57
60
|
const orchestrateInterfaceSchemasReview_1 = require("./orchestrateInterfaceSchemasReview");
|
|
58
61
|
const validateAuthorizationSchema_1 = require("./utils/validateAuthorizationSchema");
|
|
@@ -84,8 +87,8 @@ function orchestrateInterfaceSchemas(ctx_1, operations_1) {
|
|
|
84
87
|
IAuthorizationToken: authTokenSchema,
|
|
85
88
|
}
|
|
86
89
|
: {};
|
|
87
|
-
for (const y of yield
|
|
88
|
-
const row = yield divideAndConquer(ctx, operations, it, 3, progress);
|
|
90
|
+
for (const y of yield (0, executeCachedBatch_1.executeCachedBatch)(matrix.map((it) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const row = yield divideAndConquer(ctx, operations, it, 3, progress, promptCacheKey);
|
|
89
92
|
const newbie = yield (0, orchestrateInterfaceSchemasReview_1.orchestrateInterfaceSchemasReview)(ctx, operations, row, reviewProgress);
|
|
90
93
|
return Object.assign(Object.assign({}, row), newbie);
|
|
91
94
|
})))) {
|
|
@@ -96,14 +99,14 @@ function orchestrateInterfaceSchemas(ctx_1, operations_1) {
|
|
|
96
99
|
return x;
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
|
-
function divideAndConquer(ctx, operations, typeNames, retry, progress) {
|
|
102
|
+
function divideAndConquer(ctx, operations, typeNames, retry, progress, promptCacheKey) {
|
|
100
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
104
|
const remained = new Set(typeNames);
|
|
102
105
|
const schemas = {};
|
|
103
106
|
for (let i = 0; i < retry; ++i) {
|
|
104
107
|
if (remained.size === 0)
|
|
105
108
|
break;
|
|
106
|
-
const newbie = yield process(ctx, operations, schemas, remained, progress);
|
|
109
|
+
const newbie = yield process(ctx, operations, schemas, remained, progress, promptCacheKey);
|
|
107
110
|
for (const key of Object.keys(newbie)) {
|
|
108
111
|
schemas[key] = newbie[key];
|
|
109
112
|
remained.delete(key);
|
|
@@ -112,7 +115,7 @@ function divideAndConquer(ctx, operations, typeNames, retry, progress) {
|
|
|
112
115
|
return schemas;
|
|
113
116
|
});
|
|
114
117
|
}
|
|
115
|
-
function process(ctx, operations, oldbie, remained, progress) {
|
|
118
|
+
function process(ctx, operations, oldbie, remained, progress, promptCacheKey) {
|
|
116
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
120
|
var _a, _b, _c;
|
|
118
121
|
const already = Object.keys(oldbie);
|
|
@@ -132,25 +135,27 @@ function process(ctx, operations, oldbie, remained, progress) {
|
|
|
132
135
|
pointer,
|
|
133
136
|
}),
|
|
134
137
|
enforceFunctionCall: true,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
promptCacheKey,
|
|
139
|
+
message: utils_1.StringUtil.trim `
|
|
140
|
+
Make type components please.
|
|
141
|
+
|
|
142
|
+
Here is the list of request/response bodies' type names from
|
|
143
|
+
OpenAPI operations. Make type components of them. If more object
|
|
144
|
+
types are required during making the components, please make them
|
|
145
|
+
too.
|
|
146
|
+
|
|
147
|
+
${Array.from(remained)
|
|
148
|
+
.map((k) => ` - \`${k}\``)
|
|
149
|
+
.join("\n")}${already.length !== 0
|
|
150
|
+
? utils_1.StringUtil.trim `
|
|
151
|
+
|
|
152
|
+
> By the way, here is the list of components schemas what you've
|
|
153
|
+
> already made. So, you don't need to make them again.
|
|
154
|
+
>
|
|
155
|
+
${already.map((k) => `> - \`${k}\``).join("\n")}
|
|
156
|
+
`
|
|
157
|
+
: ""}
|
|
158
|
+
`,
|
|
154
159
|
});
|
|
155
160
|
if (pointer.value === null)
|
|
156
161
|
throw new Error("Failed to create components.");
|
|
@@ -159,6 +164,7 @@ function process(ctx, operations, oldbie, remained, progress) {
|
|
|
159
164
|
}).schemas) !== null && _a !== void 0 ? _a : {};
|
|
160
165
|
ctx.dispatch({
|
|
161
166
|
type: "interfaceSchemas",
|
|
167
|
+
id: (0, uuid_1.v7)(),
|
|
162
168
|
schemas,
|
|
163
169
|
tokenUsage,
|
|
164
170
|
completed: (progress.completed += Object.keys(schemas).length),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceSchemas.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceSchemas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceSchemas.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceSchemas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,kEA0DC;;;;AA1ED,yCAA2C;AAE3C,2FAAwF;AAExF,kDAAoC;AACpC,+BAA0B;AAG1B,uEAAoE;AACpE,yDAAsD;AACtD,uEAAoE;AACpE,qGAAkG;AAClG,2FAAwF;AAExF,qFAAkF;AAElF,SAAsB,2BAA2B;yDAG/C,GAAyB,EACzB,UAAsC,EACtC,WAAmB,CAAC;;QAEpB,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;QACzC,KAAK,MAAM,EAAE,IAAI,UAAU,EAAE,CAAC;YAC5B,IAAI,EAAE,CAAC,WAAW,KAAK,IAAI;gBAAE,SAAS,CAAC,GAAG,CAAC,E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CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CACjD,CACC,QAAQ,CAC2D,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,OAAO,EAAE;YACP,cAAc,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC7B,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC,CAAA;SAC0C;KAC9C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACqC;YAClE,QAAQ,EAAE;gBACR,cAAc,EAAE,QAAQ;aACzB;SACF;;QAAC;IACJ,MAAM,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACqC;YACjE,QAAQ,EAAE;gBACR,cAAc,EAAE,QAAQ;aACzB;SACF;;QAAC;CACL,CAAC;AAoDF,MAAM,eAAe,GACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyC,UAAU,CAAC,OAAQ;KACzD,mBAA2D,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { AutoBeOpenApi } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress:
|
|
5
|
-
total: number;
|
|
6
|
-
completed: number;
|
|
7
|
-
}): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
4
|
+
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: AutoBeProgressEventBase): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
@@ -51,6 +51,7 @@ const __typia_transform__validateReport = __importStar(require("typia/lib/intern
|
|
|
51
51
|
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
52
52
|
const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
53
53
|
const typia_1 = __importDefault(require("typia"));
|
|
54
|
+
const uuid_1 = require("uuid");
|
|
54
55
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
55
56
|
const transformInterfaceSchemasReviewHistories_1 = require("./histories/transformInterfaceSchemasReviewHistories");
|
|
56
57
|
const validateAuthorizationSchema_1 = require("./utils/validateAuthorizationSchema");
|
|
@@ -66,6 +67,7 @@ function orchestrateInterfaceSchemasReview(ctx, operations, schemas, progress) {
|
|
|
66
67
|
controller: createController({
|
|
67
68
|
model: ctx.model,
|
|
68
69
|
pointer,
|
|
70
|
+
operations,
|
|
69
71
|
schemas,
|
|
70
72
|
}),
|
|
71
73
|
histories: (0, transformInterfaceSchemasReviewHistories_1.transformInterfaceSchemasReviewHistories)(ctx.state(), operations, schemas),
|
|
@@ -82,6 +84,7 @@ function orchestrateInterfaceSchemasReview(ctx, operations, schemas, progress) {
|
|
|
82
84
|
}).schemas) !== null && _a !== void 0 ? _a : {};
|
|
83
85
|
ctx.dispatch({
|
|
84
86
|
type: "interfaceSchemasReview",
|
|
87
|
+
id: (0, uuid_1.v7)(),
|
|
85
88
|
schemas: schemas,
|
|
86
89
|
review: pointer.value.review,
|
|
87
90
|
plan: pointer.value.plan,
|
|
@@ -178,6 +181,181 @@ function createController(props) {
|
|
|
178
181
|
schemas: result.data.content,
|
|
179
182
|
path: "$input.content",
|
|
180
183
|
});
|
|
184
|
+
Object.entries(result.data.content).forEach(([tagName, jsonDescriptive]) => {
|
|
185
|
+
var _a;
|
|
186
|
+
const index = props.operations.find((op) => {
|
|
187
|
+
var _a;
|
|
188
|
+
return ((_a = op.responseBody) === null || _a === void 0 ? void 0 : _a.typeName) === tagName &&
|
|
189
|
+
op.method === "patch" &&
|
|
190
|
+
op.name === "index";
|
|
191
|
+
});
|
|
192
|
+
// The index API should return the `IPage<T>` type.
|
|
193
|
+
if (index) {
|
|
194
|
+
// First check if the schema has the correct object structure
|
|
195
|
+
if (!("type" in jsonDescriptive) ||
|
|
196
|
+
jsonDescriptive.type !== "object") {
|
|
197
|
+
errors.push({
|
|
198
|
+
path: `$input.content.${tagName}`,
|
|
199
|
+
expected: `{ type: "object", properties: { ... } }`,
|
|
200
|
+
value: jsonDescriptive,
|
|
201
|
+
description: `IPage schema must have type: "object". Found: ${JSON.stringify(jsonDescriptive)}`,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
else if (!("properties" in jsonDescriptive)) {
|
|
205
|
+
errors.push({
|
|
206
|
+
path: `$input.content.${tagName}`,
|
|
207
|
+
expected: `Schema with "properties" field`,
|
|
208
|
+
value: jsonDescriptive,
|
|
209
|
+
description: `IPage schema must have a "properties" field containing "pagination" and "data" properties.`,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
else if ((() => { const _io0 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu1(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type; const _io1 = input => Object.keys(input).every(key => {
|
|
213
|
+
const value = input[key];
|
|
214
|
+
if (undefined === value)
|
|
215
|
+
return true;
|
|
216
|
+
return "object" === typeof value && null !== value && _io2(value);
|
|
217
|
+
}); const _io2 = input => "string" === typeof input.description; const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]; const _io7 = input => "boolean" === input.type; const _io8 = input => "object" === typeof input.items && null !== input.items && _iu1(input.items) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type; const _io9 = input => "string" === typeof input.$ref; const _io10 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io12(input.discriminator)); const _io11 = input => "null" === input.type; const _io12 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io13(input.mapping)); const _io13 = input => Object.keys(input).every(key => {
|
|
218
|
+
const value = input[key];
|
|
219
|
+
if (undefined === value)
|
|
220
|
+
return true;
|
|
221
|
+
return "string" === typeof value;
|
|
222
|
+
}); const _iu0 = input => (() => {
|
|
223
|
+
if ("number" === input.type)
|
|
224
|
+
return _io4(input);
|
|
225
|
+
else if ("integer" === input.type)
|
|
226
|
+
return _io3(input);
|
|
227
|
+
else if ("string" === input.type)
|
|
228
|
+
return _io5(input);
|
|
229
|
+
else if (undefined !== input["const"])
|
|
230
|
+
return _io6(input);
|
|
231
|
+
else if ("null" === input.type)
|
|
232
|
+
return _io11(input);
|
|
233
|
+
else if ("boolean" === input.type)
|
|
234
|
+
return _io7(input);
|
|
235
|
+
else if ("array" === input.type)
|
|
236
|
+
return _io8(input);
|
|
237
|
+
else if ("object" === input.type)
|
|
238
|
+
return _io0(input);
|
|
239
|
+
else if (undefined !== input.$ref)
|
|
240
|
+
return _io9(input);
|
|
241
|
+
else
|
|
242
|
+
return false;
|
|
243
|
+
})(); const _iu1 = input => (() => {
|
|
244
|
+
if ("number" === input.type)
|
|
245
|
+
return _io4(input);
|
|
246
|
+
else if ("integer" === input.type)
|
|
247
|
+
return _io3(input);
|
|
248
|
+
else if ("string" === input.type)
|
|
249
|
+
return _io5(input);
|
|
250
|
+
else if (undefined !== input["const"])
|
|
251
|
+
return _io6(input);
|
|
252
|
+
else if ("null" === input.type)
|
|
253
|
+
return _io11(input);
|
|
254
|
+
else if ("boolean" === input.type)
|
|
255
|
+
return _io7(input);
|
|
256
|
+
else if ("array" === input.type)
|
|
257
|
+
return _io8(input);
|
|
258
|
+
else if ("object" === input.type)
|
|
259
|
+
return _io0(input);
|
|
260
|
+
else if (undefined !== input.$ref)
|
|
261
|
+
return _io9(input);
|
|
262
|
+
else if (undefined !== input.oneOf)
|
|
263
|
+
return _io10(input);
|
|
264
|
+
else
|
|
265
|
+
return false;
|
|
266
|
+
})(); return input => "object" === typeof input && null !== input && _io0(input); })()(jsonDescriptive)) {
|
|
267
|
+
(_a = jsonDescriptive.properties) !== null && _a !== void 0 ? _a : (jsonDescriptive.properties = {});
|
|
268
|
+
// Check pagination property
|
|
269
|
+
const pagination = jsonDescriptive.properties["pagination"];
|
|
270
|
+
if (!pagination || !("$ref" in pagination)) {
|
|
271
|
+
errors.push({
|
|
272
|
+
path: `$input.content.${tagName}.properties.pagination`,
|
|
273
|
+
expected: `{ $ref: "#/components/schemas/IPage.IPagination" }`,
|
|
274
|
+
value: pagination,
|
|
275
|
+
description: `IPage must have a "pagination" property with $ref to IPage.IPagination.`,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
// Check data property
|
|
279
|
+
const data = jsonDescriptive.properties["data"];
|
|
280
|
+
if (!(() => { const _io0 = input => "object" === typeof input.items && null !== input.items && _iu1(input.items) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type; const _io1 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io2 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io3 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io4 = input => "string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]; const _io5 = input => "boolean" === input.type; const _io6 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io7(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu1(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type; const _io7 = input => Object.keys(input).every(key => {
|
|
281
|
+
const value = input[key];
|
|
282
|
+
if (undefined === value)
|
|
283
|
+
return true;
|
|
284
|
+
return "object" === typeof value && null !== value && _io8(value);
|
|
285
|
+
}); const _io8 = input => "string" === typeof input.description; const _io9 = input => "string" === typeof input.$ref; const _io10 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io12(input.discriminator)); const _io11 = input => "null" === input.type; const _io12 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io13(input.mapping)); const _io13 = input => Object.keys(input).every(key => {
|
|
286
|
+
const value = input[key];
|
|
287
|
+
if (undefined === value)
|
|
288
|
+
return true;
|
|
289
|
+
return "string" === typeof value;
|
|
290
|
+
}); const _iu0 = input => (() => {
|
|
291
|
+
if ("number" === input.type)
|
|
292
|
+
return _io2(input);
|
|
293
|
+
else if ("integer" === input.type)
|
|
294
|
+
return _io1(input);
|
|
295
|
+
else if ("string" === input.type)
|
|
296
|
+
return _io3(input);
|
|
297
|
+
else if (undefined !== input["const"])
|
|
298
|
+
return _io4(input);
|
|
299
|
+
else if ("null" === input.type)
|
|
300
|
+
return _io11(input);
|
|
301
|
+
else if ("boolean" === input.type)
|
|
302
|
+
return _io5(input);
|
|
303
|
+
else if ("array" === input.type)
|
|
304
|
+
return _io0(input);
|
|
305
|
+
else if ("object" === input.type)
|
|
306
|
+
return _io6(input);
|
|
307
|
+
else if (undefined !== input.$ref)
|
|
308
|
+
return _io9(input);
|
|
309
|
+
else
|
|
310
|
+
return false;
|
|
311
|
+
})(); const _iu1 = input => (() => {
|
|
312
|
+
if ("number" === input.type)
|
|
313
|
+
return _io2(input);
|
|
314
|
+
else if ("integer" === input.type)
|
|
315
|
+
return _io1(input);
|
|
316
|
+
else if ("string" === input.type)
|
|
317
|
+
return _io3(input);
|
|
318
|
+
else if (undefined !== input["const"])
|
|
319
|
+
return _io4(input);
|
|
320
|
+
else if ("null" === input.type)
|
|
321
|
+
return _io11(input);
|
|
322
|
+
else if ("boolean" === input.type)
|
|
323
|
+
return _io5(input);
|
|
324
|
+
else if ("array" === input.type)
|
|
325
|
+
return _io0(input);
|
|
326
|
+
else if ("object" === input.type)
|
|
327
|
+
return _io6(input);
|
|
328
|
+
else if (undefined !== input.$ref)
|
|
329
|
+
return _io9(input);
|
|
330
|
+
else if (undefined !== input.oneOf)
|
|
331
|
+
return _io10(input);
|
|
332
|
+
else
|
|
333
|
+
return false;
|
|
334
|
+
})(); return input => "object" === typeof input && null !== input && _io0(input); })()(data)) {
|
|
335
|
+
errors.push({
|
|
336
|
+
path: `$input.content.${tagName}.properties.data`,
|
|
337
|
+
expected: `AutoBeOpenApi.IJsonSchema.IArray`,
|
|
338
|
+
value: data,
|
|
339
|
+
description: `The 'data' property must be an array for the index operation.`,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
// Check if array items have proper type reference (not 'any')
|
|
344
|
+
const arraySchema = data;
|
|
345
|
+
if (!arraySchema.items ||
|
|
346
|
+
!("$ref" in arraySchema.items) ||
|
|
347
|
+
arraySchema.items.$ref === "#/components/schemas/any") {
|
|
348
|
+
errors.push({
|
|
349
|
+
path: `$input.content.${tagName}.properties.data.items`,
|
|
350
|
+
expected: `Reference to a specific type (e.g., $ref to ISummary type)`,
|
|
351
|
+
value: arraySchema.items,
|
|
352
|
+
description: `The 'data' array must have a specific item type, not 'any[]'. Use a proper type reference like '{Entity}.ISummary' for paginated results.`,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
});
|
|
181
359
|
if (errors.length !== 0)
|
|
182
360
|
return {
|
|
183
361
|
success: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceSchemasReview.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceSchemasReview.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,8EA+DC;;;;AA1ED,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,mHAAgH;AAEhH,qFAAkF;AAElF,SAAsB,iCAAiC,CAGrD,GAAyB,EACzB,UAAsC,EACtC,OAGC,EACD,QAAiC;;;QAEjC,IAAI,CAAC;YACH,MAAM,OAAO,GACX;gBACE,KAAK,EAAE,IAAI;aACZ,CAAC;YACJ,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;gBAC1C,MAAM,EAAE,wBAAwB;gBAChC,UAAU,EAAE,gBAAgB,CAAC;oBAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,OAAO;oBACP,UAAU;oBACV,OAAO;iBACR,CAAC;gBACF,SAAS,EAAE,IAAA,mFAAwC,EACjD,GAAG,CAAC,KAAK,EAAE,EACX,UAAU,EACV,OAAO,CACR;gBACD,mBAAmB,EAAE,IAAI;gBACzB,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;YACH,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;gBACvD,EAAE,QAAQ,CAAC,SAAS,CAAC;gBACrB,OAAO,EAAE,CAAC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utoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for reviewing and refining API endpoints through holistic analysis.
|
|
4
|
+
*
|
|
5
|
+
* This application performs comprehensive review of all endpoints generated
|
|
6
|
+
* through divide-and-conquer strategy, ensuring consistency, eliminating
|
|
7
|
+
* redundancy, and preventing over-engineering across the entire API surface.
|
|
8
|
+
*/
|
|
9
|
+
export interface IAutoBeInterfaceEndpointsReviewApplication {
|
|
10
|
+
/**
|
|
11
|
+
* Reviews and refines the complete collection of API endpoints.
|
|
12
|
+
*
|
|
13
|
+
* This method consolidates all endpoints generated independently by different
|
|
14
|
+
* groups and performs holistic review to:
|
|
15
|
+
* - Ensure naming consistency across all endpoints
|
|
16
|
+
* - Remove duplicate or overlapping endpoints
|
|
17
|
+
* - Eliminate over-engineered solutions
|
|
18
|
+
* - Standardize path structures and HTTP methods
|
|
19
|
+
* - Verify REST API design principles
|
|
20
|
+
*
|
|
21
|
+
* The review process examines the entire API as a cohesive system rather
|
|
22
|
+
* than individual endpoints, ensuring the final API is intuitive, maintainable,
|
|
23
|
+
* and follows best practices.
|
|
24
|
+
*
|
|
25
|
+
* @param next - The review results and refined endpoint collection
|
|
26
|
+
*/
|
|
27
|
+
reviewEndpoints(next: IAutoBeInterfaceEndpointsReviewApplication.IProps): void;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace IAutoBeInterfaceEndpointsReviewApplication {
|
|
30
|
+
interface IProps {
|
|
31
|
+
/**
|
|
32
|
+
* Comprehensive review analysis of all collected endpoints.
|
|
33
|
+
*
|
|
34
|
+
* Contains detailed findings from the holistic review including:
|
|
35
|
+
* - Identified inconsistencies in naming conventions
|
|
36
|
+
* - Duplicate endpoints that serve the same purpose
|
|
37
|
+
* - Over-engineered solutions that add unnecessary complexity
|
|
38
|
+
* - Violations of REST API design principles
|
|
39
|
+
* - Recommendations for improvement and standardization
|
|
40
|
+
*
|
|
41
|
+
* The review provides actionable feedback for creating a clean,
|
|
42
|
+
* consistent, and maintainable API structure.
|
|
43
|
+
*/
|
|
44
|
+
review: string;
|
|
45
|
+
/**
|
|
46
|
+
* Refined collection of API endpoints after review and cleanup.
|
|
47
|
+
*
|
|
48
|
+
* The final optimized set of endpoints after:
|
|
49
|
+
* - Removing duplicates and redundant endpoints
|
|
50
|
+
* - Standardizing naming conventions across all paths
|
|
51
|
+
* - Simplifying over-engineered solutions
|
|
52
|
+
* - Ensuring consistent REST patterns
|
|
53
|
+
* - Aligning HTTP methods with their semantic meanings
|
|
54
|
+
*
|
|
55
|
+
* This collection represents the production-ready API structure
|
|
56
|
+
* that balances functionality with simplicity and maintainability.
|
|
57
|
+
*/
|
|
58
|
+
endpoints: AutoBeOpenApi.IEndpoint[];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeInterfaceEndpointsReviewApplication.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts"],"names":[],"mappings":""}
|
package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts
CHANGED
|
@@ -85,6 +85,44 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
87
|
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
|
|
88
|
+
/**
|
|
89
|
+
* Prisma schema models relevant to this operation.
|
|
90
|
+
*
|
|
91
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
92
|
+
* in this operation, including their fields, relations, and database
|
|
93
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
94
|
+
* operation design.
|
|
95
|
+
*
|
|
96
|
+
* The schema information serves multiple critical purposes:
|
|
97
|
+
*
|
|
98
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
99
|
+
* the database schema and have the correct types
|
|
100
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
101
|
+
* properly defined and can support the operation's data access patterns
|
|
102
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
103
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
104
|
+
* determine if the operation should perform logical deletion instead of
|
|
105
|
+
* physical removal
|
|
106
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
107
|
+
* fields, and default values to generate accurate request/response
|
|
108
|
+
* schemas
|
|
109
|
+
*
|
|
110
|
+
* Example content might include:
|
|
111
|
+
*
|
|
112
|
+
* ```prisma
|
|
113
|
+
* model User {
|
|
114
|
+
* id String @id @default(uuid())
|
|
115
|
+
* email String @unique
|
|
116
|
+
* name String
|
|
117
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
118
|
+
* posts Post[]
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
123
|
+
* database structure and business logic requirements.
|
|
124
|
+
*/
|
|
125
|
+
prisma_schemas: string;
|
|
88
126
|
/**
|
|
89
127
|
* Authorization roles required to access this API operation.
|
|
90
128
|
*
|
|
@@ -128,5 +128,83 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
|
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
130
|
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
|
|
131
|
+
/**
|
|
132
|
+
* Prisma schema models relevant to this operation.
|
|
133
|
+
*
|
|
134
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
135
|
+
* in this operation, including their fields, relations, and database
|
|
136
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
137
|
+
* operation design.
|
|
138
|
+
*
|
|
139
|
+
* The schema information serves multiple critical purposes:
|
|
140
|
+
*
|
|
141
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
142
|
+
* the database schema and have the correct types
|
|
143
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
144
|
+
* properly defined and can support the operation's data access patterns
|
|
145
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
146
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
147
|
+
* determine if the operation should perform logical deletion instead of
|
|
148
|
+
* physical removal
|
|
149
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
150
|
+
* fields, and default values to generate accurate request/response
|
|
151
|
+
* schemas
|
|
152
|
+
*
|
|
153
|
+
* Example content might include:
|
|
154
|
+
*
|
|
155
|
+
* ```prisma
|
|
156
|
+
* model User {
|
|
157
|
+
* id String @id @default(uuid())
|
|
158
|
+
* email String @unique
|
|
159
|
+
* name String
|
|
160
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
161
|
+
* posts Post[]
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
166
|
+
* database structure and business logic requirements.
|
|
167
|
+
*/
|
|
168
|
+
prisma_schemas: string;
|
|
169
|
+
/**
|
|
170
|
+
* Primary Prisma model name for this operation.
|
|
171
|
+
*
|
|
172
|
+
* Identifies the main database table/model that this operation targets.
|
|
173
|
+
* This must match exactly with the Prisma model name defined in the schema.
|
|
174
|
+
* When soft deletion is specified, this model name indicates which table
|
|
175
|
+
* should be soft-deleted.
|
|
176
|
+
*
|
|
177
|
+
* For example:
|
|
178
|
+
* - In a "GET /users/:id" operation, this would be "User"
|
|
179
|
+
* - In a "POST /articles" operation, this would be "Article"
|
|
180
|
+
* - In a "DELETE /comments/:id" with soft delete, this specifies the "Comment" model to soft-delete
|
|
181
|
+
*
|
|
182
|
+
* This property is essential for:
|
|
183
|
+
* - Determining the primary entity for CRUD operations
|
|
184
|
+
* - Identifying which table to apply soft deletion to
|
|
185
|
+
* - Validating operations against the correct Prisma model
|
|
186
|
+
* - Generating appropriate database queries and validations
|
|
187
|
+
*/
|
|
188
|
+
model_name: string;
|
|
189
|
+
/**
|
|
190
|
+
* Soft delete column name for the Prisma models.
|
|
191
|
+
*
|
|
192
|
+
* Specifies the column name used for soft deletion in the database tables
|
|
193
|
+
* associated with this operation. When set to a non-null value, it indicates
|
|
194
|
+
* that the related entities support soft deletion through this column
|
|
195
|
+
* (typically a timestamp field like `deleted_at` or `deletedAt`).
|
|
196
|
+
*
|
|
197
|
+
* When null, it means the entities involved in this operation use hard
|
|
198
|
+
* deletion or don't support deletion at all. This information is crucial
|
|
199
|
+
* for generating appropriate CRUD operations and ensuring data integrity
|
|
200
|
+
* policies are correctly implemented.
|
|
201
|
+
*
|
|
202
|
+
* Common soft delete patterns:
|
|
203
|
+
* - `"deleted_at"`: Records deletion timestamp
|
|
204
|
+
* - `"deletedAt"`: Camel-cased deletion timestamp
|
|
205
|
+
* - `"is_deleted"`: Boolean flag for deletion status
|
|
206
|
+
* - `null`: No soft deletion (hard delete only)
|
|
207
|
+
*/
|
|
208
|
+
soft_delete_column: string | null;
|
|
131
209
|
}
|
|
132
210
|
}
|