@autobe/agent 0.18.0 → 0.20.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/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.js +8 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeMockAgent.js +10 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +213 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +79 -19
- 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/transformAnalyzeReviewHistories.js +41 -0
- 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.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
- 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 +10 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
- 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 +24 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- 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 +36 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
- 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 +362 -178
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
- 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 +59 -57
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- 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.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
- 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.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- 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/histories/transformTestCorrectHistories.js +17 -16
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- 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/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +4799 -2637
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +18 -3
- package/src/AutoBeMockAgent.ts +13 -15
- package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -0
- package/src/factory/consentFunctionCall.ts +129 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeContext.ts +108 -20
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
- 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 -29
- 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 +37 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
- 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 +17 -6
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
- package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +18 -8
- package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
- package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
- package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
- package/lib/agent/src/utils/pipe.d.ts +0 -5
- package/lib/agent/src/utils/pipe.js +0 -14
- package/lib/agent/src/utils/pipe.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/utils/pipe.d.ts +0 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
- package/src/orchestrate/internal/IProgress.ts +0 -4
- package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/internal/compile.ts +0 -84
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/utils/pipe.ts +0 -39
- /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
|
@@ -49,43 +49,63 @@ exports.orchestrateInterfaceSchemasReview = orchestrateInterfaceSchemasReview;
|
|
|
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 OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
52
53
|
const typia_1 = __importDefault(require("typia"));
|
|
54
|
+
const uuid_1 = require("uuid");
|
|
55
|
+
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
53
56
|
const transformInterfaceSchemasReviewHistories_1 = require("./histories/transformInterfaceSchemasReviewHistories");
|
|
57
|
+
const validateAuthorizationSchema_1 = require("./utils/validateAuthorizationSchema");
|
|
54
58
|
function orchestrateInterfaceSchemasReview(ctx, operations, schemas, progress) {
|
|
55
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
content
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
try {
|
|
62
|
+
const pointer = {
|
|
63
|
+
value: null,
|
|
64
|
+
};
|
|
65
|
+
const { tokenUsage } = yield ctx.conversate({
|
|
66
|
+
source: "interfaceSchemasReview",
|
|
67
|
+
controller: createController({
|
|
68
|
+
model: ctx.model,
|
|
69
|
+
pointer,
|
|
70
|
+
operations,
|
|
71
|
+
schemas,
|
|
72
|
+
}),
|
|
73
|
+
histories: (0, transformInterfaceSchemasReviewHistories_1.transformInterfaceSchemasReviewHistories)(ctx.state(), operations, schemas),
|
|
74
|
+
enforceFunctionCall: true,
|
|
75
|
+
message: "Review type schemas.",
|
|
76
|
+
});
|
|
77
|
+
if (pointer.value === null) {
|
|
78
|
+
console.error("Failed to extract review information.");
|
|
79
|
+
++progress.completed;
|
|
80
|
+
return {};
|
|
81
|
+
}
|
|
82
|
+
const content = (_a = OpenApiV3_1Emender_1.OpenApiV3_1Emender.convertComponents({
|
|
83
|
+
schemas: pointer.value.content,
|
|
84
|
+
}).schemas) !== null && _a !== void 0 ? _a : {};
|
|
85
|
+
ctx.dispatch({
|
|
86
|
+
type: "interfaceSchemasReview",
|
|
87
|
+
id: (0, uuid_1.v7)(),
|
|
88
|
+
schemas: schemas,
|
|
89
|
+
review: pointer.value.review,
|
|
90
|
+
plan: pointer.value.plan,
|
|
91
|
+
content,
|
|
92
|
+
tokenUsage,
|
|
93
|
+
step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
|
|
94
|
+
total: progress.total,
|
|
95
|
+
completed: ++progress.completed,
|
|
96
|
+
created_at: new Date().toISOString(),
|
|
97
|
+
});
|
|
98
|
+
return content;
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.error("Error occurred during interface schemas review:", error);
|
|
102
|
+
++progress.completed;
|
|
103
|
+
return {};
|
|
104
|
+
}
|
|
86
105
|
});
|
|
87
106
|
}
|
|
88
107
|
function createController(props) {
|
|
108
|
+
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
89
109
|
const validate = (next) => {
|
|
90
110
|
const result = (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
|
|
91
111
|
const value = input[key];
|
|
@@ -156,24 +176,192 @@ function createController(props) {
|
|
|
156
176
|
if (result.success === false)
|
|
157
177
|
return result;
|
|
158
178
|
const errors = [];
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
179
|
+
(0, validateAuthorizationSchema_1.validateAuthorizationSchema)({
|
|
180
|
+
errors,
|
|
181
|
+
schemas: result.data.content,
|
|
182
|
+
path: "$input.content",
|
|
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";
|
|
168
191
|
});
|
|
169
|
-
|
|
170
|
-
|
|
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
|
+
});
|
|
359
|
+
if (errors.length !== 0)
|
|
171
360
|
return {
|
|
172
361
|
success: false,
|
|
173
362
|
errors,
|
|
174
|
-
data:
|
|
363
|
+
data: next,
|
|
175
364
|
};
|
|
176
|
-
}
|
|
177
365
|
return result;
|
|
178
366
|
};
|
|
179
367
|
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
|
|
@@ -188,159 +376,158 @@ function createController(props) {
|
|
|
188
376
|
},
|
|
189
377
|
};
|
|
190
378
|
}
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
required: [
|
|
219
|
-
"review",
|
|
220
|
-
"plan",
|
|
221
|
-
"content"
|
|
222
|
-
],
|
|
223
|
-
additionalProperties: false,
|
|
224
|
-
$defs: {
|
|
225
|
-
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
226
|
-
description: "Construct a type with a set of properties K of type T",
|
|
227
|
-
type: "object",
|
|
228
|
-
properties: {},
|
|
229
|
-
required: [],
|
|
230
|
-
additionalProperties: {
|
|
231
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
379
|
+
const collection = {
|
|
380
|
+
chatgpt: (validate) => (() => {
|
|
381
|
+
const application = {
|
|
382
|
+
model: "chatgpt",
|
|
383
|
+
options: {
|
|
384
|
+
reference: true,
|
|
385
|
+
strict: false,
|
|
386
|
+
separate: null
|
|
387
|
+
},
|
|
388
|
+
functions: [
|
|
389
|
+
{
|
|
390
|
+
name: "review",
|
|
391
|
+
parameters: {
|
|
392
|
+
description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.\n\n### Description of {@link content} property:\n\n> Final validated and enhanced schemas ready for production use.\n> \n> DO:\n> - Include valid OpenAPI schema definitions\n> - Include all entities that were in the original input\n> - Provide fixed versions if original schemas have issues\n> - Rename entities correctly if names are wrong\n> - Include created variants if schemas are missing them\n> \n> DO NOT:\n> - Return an empty object {} (this will delete all schemas)\n> - Return undefined or null\n> - Include explanations or excuses in schema descriptions\n> - Leave broken schemas unfixed\n> \n> When original schemas are beyond repair, recreate them properly based on\n> entity names and context. This field becomes the final schemas used by\n> the system, so it must always contain complete, valid schemas.",
|
|
393
|
+
type: "object",
|
|
394
|
+
properties: {
|
|
395
|
+
review: {
|
|
396
|
+
description: "Issues and problems found during schema analysis.\n\nDO: Document only problems that need fixing.\nDO NOT: Include positive feedback, compliments, or confirmations\n\nFocus exclusively on issues organized by severity:\n\nSeverity levels:\n- Security vulnerabilities (exposed passwords, missing auth boundaries)\n- Missing required variants, incorrect type mappings\n- Missing format specifications, incomplete relationships\n- Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
|
|
397
|
+
type: "string"
|
|
398
|
+
},
|
|
399
|
+
plan: {
|
|
400
|
+
description: "Action plan for addressing identified issues.\n\nMust specify concrete fixes categorized by priority:\n\n- For perfect schemas: \"No improvements required. All schemas meet AutoBE\n standards.\"\n- For fixable issues: List each fix with operation path and exact change\n- For critical problems: Describe how schemas were recreated or corrected\n\nNever leave this empty. Always provide a clear plan even if no changes\nare needed. The plan documents what was done to produce the content\nfield.",
|
|
401
|
+
type: "string"
|
|
402
|
+
},
|
|
403
|
+
content: {
|
|
404
|
+
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
232
405
|
}
|
|
233
406
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
407
|
+
required: [
|
|
408
|
+
"review",
|
|
409
|
+
"plan",
|
|
410
|
+
"content"
|
|
411
|
+
],
|
|
412
|
+
additionalProperties: false,
|
|
413
|
+
$defs: {
|
|
414
|
+
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
415
|
+
description: "Construct a type with a set of properties K of type T",
|
|
416
|
+
type: "object",
|
|
417
|
+
properties: {},
|
|
418
|
+
required: [],
|
|
419
|
+
additionalProperties: {
|
|
420
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
241
421
|
}
|
|
242
422
|
},
|
|
243
|
-
|
|
244
|
-
"description"
|
|
245
|
-
|
|
423
|
+
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
424
|
+
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
425
|
+
type: "object",
|
|
426
|
+
properties: {
|
|
427
|
+
description: {
|
|
428
|
+
description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
|
|
429
|
+
type: "string"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
required: [
|
|
433
|
+
"description"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
246
436
|
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
|
|
251
|
-
const value = input[key];
|
|
252
|
-
if (undefined === value)
|
|
253
|
-
return true;
|
|
254
|
-
return "object" === typeof value && null !== value && _io2(value);
|
|
255
|
-
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
256
|
-
path: _path + ".review",
|
|
257
|
-
expected: "string",
|
|
258
|
-
value: input.review
|
|
259
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
260
|
-
path: _path + ".plan",
|
|
261
|
-
expected: "string",
|
|
262
|
-
value: input.plan
|
|
263
|
-
}), ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || _report(_exceptionable, {
|
|
264
|
-
path: _path + ".content",
|
|
265
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
266
|
-
value: input.content
|
|
267
|
-
})) && _vo1(input.content, _path + ".content", true && _exceptionable) || _report(_exceptionable, {
|
|
268
|
-
path: _path + ".content",
|
|
269
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
270
|
-
value: input.content
|
|
271
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
437
|
+
},
|
|
438
|
+
description: "Analyzes and improves OpenAPI schema definitions.\n\nThis function receives schema definitions and performs comprehensive review\nand enhancement. It identifies issues, creates an improvement plan, and\nproduces refined schemas that meet quality standards.\n\nThe function populates three key outputs:\n\n- A detailed review of findings organized by severity\n- An actionable plan for improvements\n- Enhanced schemas with all issues resolved",
|
|
439
|
+
validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
|
|
272
440
|
const value = input[key];
|
|
273
441
|
if (undefined === value)
|
|
274
442
|
return true;
|
|
275
|
-
return
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
((input, _path, _exceptionable = true) =>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
443
|
+
return "object" === typeof value && null !== value && _io2(value);
|
|
444
|
+
}); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
445
|
+
path: _path + ".review",
|
|
446
|
+
expected: "string",
|
|
447
|
+
value: input.review
|
|
448
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
449
|
+
path: _path + ".plan",
|
|
450
|
+
expected: "string",
|
|
451
|
+
value: input.plan
|
|
452
|
+
}), ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || _report(_exceptionable, {
|
|
453
|
+
path: _path + ".content",
|
|
454
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
455
|
+
value: input.content
|
|
456
|
+
})) && _vo1(input.content, _path + ".content", true && _exceptionable) || _report(_exceptionable, {
|
|
457
|
+
path: _path + ".content",
|
|
458
|
+
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
459
|
+
value: input.content
|
|
460
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
461
|
+
const value = input[key];
|
|
462
|
+
if (undefined === value)
|
|
463
|
+
return true;
|
|
464
|
+
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
465
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
466
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
467
|
+
value: value
|
|
468
|
+
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
469
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
470
|
+
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
471
|
+
value: value
|
|
472
|
+
});
|
|
473
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
474
|
+
path: _path + ".description",
|
|
475
|
+
expected: "string",
|
|
476
|
+
value: input.description
|
|
477
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
478
|
+
if (false === __is(input)) {
|
|
479
|
+
errors = [];
|
|
480
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
481
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
482
|
+
path: _path + "",
|
|
483
|
+
expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
|
|
484
|
+
value: input
|
|
485
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
486
|
+
path: _path + "",
|
|
487
|
+
expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
|
|
488
|
+
value: input
|
|
489
|
+
}))(input, "$input", true);
|
|
490
|
+
const success = 0 === errors.length;
|
|
491
|
+
return success ? {
|
|
492
|
+
success,
|
|
493
|
+
data: input
|
|
494
|
+
} : {
|
|
495
|
+
success,
|
|
496
|
+
errors,
|
|
497
|
+
data: input
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
return {
|
|
501
|
+
success: true,
|
|
308
502
|
data: input
|
|
309
503
|
};
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
},
|
|
323
|
-
}), { equals: false }));
|
|
324
|
-
return application;
|
|
325
|
-
})();
|
|
326
|
-
const collection = {
|
|
327
|
-
chatgpt: (validate) => (() => {
|
|
504
|
+
}; })()
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
};
|
|
508
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
509
|
+
validate: {
|
|
510
|
+
review: validate,
|
|
511
|
+
},
|
|
512
|
+
}), { equals: false }));
|
|
513
|
+
return application;
|
|
514
|
+
})(),
|
|
515
|
+
claude: (validate) => (() => {
|
|
328
516
|
const application = {
|
|
329
|
-
model: "
|
|
517
|
+
model: "claude",
|
|
330
518
|
options: {
|
|
331
519
|
reference: true,
|
|
332
|
-
strict: false,
|
|
333
520
|
separate: null
|
|
334
521
|
},
|
|
335
522
|
functions: [
|
|
336
523
|
{
|
|
337
524
|
name: "review",
|
|
338
525
|
parameters: {
|
|
339
|
-
description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required
|
|
526
|
+
description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.",
|
|
340
527
|
type: "object",
|
|
341
528
|
properties: {
|
|
342
529
|
review: {
|
|
343
|
-
description: "Issues and problems found during schema analysis.\n\
|
|
530
|
+
description: "Issues and problems found during schema analysis.\n\nDO: Document only problems that need fixing.\nDO NOT: Include positive feedback, compliments, or confirmations\n\nFocus exclusively on issues organized by severity:\n\nSeverity levels:\n- Security vulnerabilities (exposed passwords, missing auth boundaries)\n- Missing required variants, incorrect type mappings\n- Missing format specifications, incomplete relationships\n- Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
|
|
344
531
|
type: "string"
|
|
345
532
|
},
|
|
346
533
|
plan: {
|
|
@@ -348,6 +535,7 @@ const collection = {
|
|
|
348
535
|
type: "string"
|
|
349
536
|
},
|
|
350
537
|
content: {
|
|
538
|
+
description: "Final validated and enhanced schemas ready for production use.\n\nDO:\n- Include valid OpenAPI schema definitions\n- Include all entities that were in the original input\n- Provide fixed versions if original schemas have issues\n- Rename entities correctly if names are wrong\n- Include created variants if schemas are missing them\n\nDO NOT:\n- Return an empty object {} (this will delete all schemas)\n- Return undefined or null\n- Include explanations or excuses in schema descriptions\n- Leave broken schemas unfixed\n\nWhen original schemas are beyond repair, recreate them properly based on\nentity names and context. This field becomes the final schemas used by\nthe system, so it must always contain complete, valid schemas.",
|
|
351
539
|
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
352
540
|
}
|
|
353
541
|
},
|
|
@@ -459,9 +647,5 @@ const collection = {
|
|
|
459
647
|
}), { equals: false }));
|
|
460
648
|
return application;
|
|
461
649
|
})(),
|
|
462
|
-
claude,
|
|
463
|
-
llama: claude,
|
|
464
|
-
deepseek: claude,
|
|
465
|
-
"3.1": claude,
|
|
466
650
|
};
|
|
467
651
|
//# sourceMappingURL=orchestrateInterfaceSchemasReview.js.map
|