@autobe/agent 0.21.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent/src/AutoBeAgent.js +2 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -27
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.js +4 -4
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +13 -10
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1261 -1628
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3468 -105
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3674 -360
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -141
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.js +59 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +2 -13
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +33 -22
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +25 -18
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +5 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +2 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +16 -17
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +21 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +123 -75
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +46 -40
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +117 -45
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -27
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/index.mjs +13871 -3912
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -141
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +10 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +33 -22
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +3 -1
- package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +2 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/structures/IAutoBeConfig.d.ts +2 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +2 -0
- package/src/constants/AutoBeConfigConstant.ts +3 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -27
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +3 -3
- package/src/factory/consentFunctionCall.ts +2 -0
- package/src/factory/createAutoBeContext.ts +145 -136
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
- package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +13 -117
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +35 -93
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +74 -97
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -146
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +66 -0
- package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +2 -2
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
- package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +33 -22
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
- package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
- package/src/orchestrate/test/compile/completeTestCode.ts +18 -31
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +12 -0
- package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
- package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +26 -26
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +19 -0
- package/src/orchestrate/test/orchestrateTest.ts +6 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +44 -20
- package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
- package/src/orchestrate/test/orchestrateTestWrite.ts +20 -10
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
- package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
- package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
- package/src/structures/IAutoBeConfig.ts +3 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +0 -35
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +0 -41
|
@@ -46,24 +46,79 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateRealizeCorrect = orchestrateRealizeCorrect;
|
|
49
|
+
exports.correct = correct;
|
|
49
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
51
|
const utils_1 = require("@autobe/utils");
|
|
51
52
|
const typia_1 = __importDefault(require("typia"));
|
|
52
53
|
const uuid_1 = require("uuid");
|
|
53
54
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
54
|
-
const
|
|
55
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
55
56
|
const transformRealizeCorrectHistories_1 = require("./histories/transformRealizeCorrectHistories");
|
|
57
|
+
const compileRealizeFiles_1 = require("./internal/compileRealizeFiles");
|
|
58
|
+
const getRealizeWriteDto_1 = require("./utils/getRealizeWriteDto");
|
|
56
59
|
const replaceImportStatements_1 = require("./utils/replaceImportStatements");
|
|
57
|
-
function orchestrateRealizeCorrect(
|
|
60
|
+
function orchestrateRealizeCorrect(ctx_1, scenarios_1, authorizations_1, functions_1, failures_1, progress_1) {
|
|
61
|
+
return __awaiter(this, arguments, void 0, function* (ctx, scenarios, authorizations, functions, failures, progress, life = 5) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const event = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, { authorizations, functions });
|
|
64
|
+
if (event.result.type === "failure")
|
|
65
|
+
ctx.dispatch(event);
|
|
66
|
+
if (event.result.type === "success") {
|
|
67
|
+
console.debug("compilation success!");
|
|
68
|
+
return event;
|
|
69
|
+
}
|
|
70
|
+
else if (--life <= 0)
|
|
71
|
+
return event;
|
|
72
|
+
const locations = (_b = (_a = (event.result.type === "failure"
|
|
73
|
+
? Array.from(new Set(event.result.diagnostics.map((d) => d.file)))
|
|
74
|
+
: null)) === null || _a === void 0 ? void 0 : _a.filter((el) => el !== null)) !== null && _b !== void 0 ? _b : [];
|
|
75
|
+
progress.total += Object.keys(locations).length;
|
|
76
|
+
const diagnostics = event.result.type === "failure" ? event.result.diagnostics : [];
|
|
77
|
+
const diagnosticsByFile = diagnostics.reduce((acc, diagnostic) => {
|
|
78
|
+
const location = diagnostic.file;
|
|
79
|
+
if (!acc[location]) {
|
|
80
|
+
acc[location] = [];
|
|
81
|
+
}
|
|
82
|
+
acc[location].push(diagnostic);
|
|
83
|
+
return acc;
|
|
84
|
+
}, {});
|
|
85
|
+
for (const [location, diagnostics] of Object.entries(diagnosticsByFile)) {
|
|
86
|
+
const func = functions.find((el) => el.location === location);
|
|
87
|
+
if (func) {
|
|
88
|
+
failures.push({
|
|
89
|
+
function: func,
|
|
90
|
+
diagnostics,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
yield (0, executeCachedBatch_1.executeCachedBatch)(locations.map((location) => () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
var _a;
|
|
96
|
+
const scenario = scenarios.find((el) => el.location === location);
|
|
97
|
+
const func = functions.find((el) => el.location === location);
|
|
98
|
+
const ReailzeFunctionFailures = failures.filter((f) => f.function.location === location);
|
|
99
|
+
if (ReailzeFunctionFailures.length && scenario) {
|
|
100
|
+
const correctEvent = yield correct(ctx, {
|
|
101
|
+
totalAuthorizations: authorizations,
|
|
102
|
+
authorization: (_a = scenario.decoratorEvent) !== null && _a !== void 0 ? _a : null,
|
|
103
|
+
scenario,
|
|
104
|
+
function: func,
|
|
105
|
+
failures: ReailzeFunctionFailures,
|
|
106
|
+
progress: progress,
|
|
107
|
+
});
|
|
108
|
+
func.content = correctEvent.content;
|
|
109
|
+
}
|
|
110
|
+
return func;
|
|
111
|
+
})));
|
|
112
|
+
return orchestrateRealizeCorrect(ctx, scenarios, authorizations, functions, failures, progress, life);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function correct(ctx, props) {
|
|
58
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
117
|
var _a, _b, _c;
|
|
60
|
-
const artifacts = yield (0, getTestScenarioArtifacts_1.getTestScenarioArtifacts)(ctx, {
|
|
61
|
-
endpoint: props.scenario.operation,
|
|
62
|
-
dependencies: [],
|
|
63
|
-
});
|
|
64
118
|
const pointer = {
|
|
65
119
|
value: null,
|
|
66
120
|
};
|
|
121
|
+
const dto = yield (0, getRealizeWriteDto_1.getRealizeWriteDto)(ctx, props.scenario.operation);
|
|
67
122
|
const { tokenUsage } = yield ctx.conversate({
|
|
68
123
|
source: "realizeCorrect",
|
|
69
124
|
controller: createController({
|
|
@@ -75,27 +130,29 @@ function orchestrateRealizeCorrect(ctx, props) {
|
|
|
75
130
|
histories: (0, transformRealizeCorrectHistories_1.transformRealizeCorrectHistories)({
|
|
76
131
|
state: ctx.state(),
|
|
77
132
|
scenario: props.scenario,
|
|
78
|
-
artifacts,
|
|
79
133
|
authorization: props.authorization,
|
|
80
|
-
code: props.
|
|
81
|
-
|
|
134
|
+
code: props.function.content,
|
|
135
|
+
dto,
|
|
136
|
+
failures: props.failures.filter((f) => f.function.location === props.function.location),
|
|
82
137
|
totalAuthorizations: props.totalAuthorizations,
|
|
83
138
|
}),
|
|
84
139
|
enforceFunctionCall: true,
|
|
85
140
|
message: utils_1.StringUtil.trim `
|
|
86
|
-
Correct the TypeScript code implementation
|
|
87
|
-
|
|
88
|
-
1. Ensure that the code is production-ready and follows best practices.
|
|
141
|
+
Correct the TypeScript code implementation.
|
|
89
142
|
`,
|
|
90
143
|
});
|
|
91
144
|
if (pointer.value === null)
|
|
92
145
|
throw new Error("Failed to correct implementation code.");
|
|
93
|
-
pointer.value.implementationCode = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx
|
|
146
|
+
pointer.value.revise.implementationCode = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
|
|
147
|
+
operation: props.scenario.operation,
|
|
148
|
+
code: pointer.value.revise.implementationCode,
|
|
149
|
+
decoratorType: (_a = props.authorization) === null || _a === void 0 ? void 0 : _a.payload.name,
|
|
150
|
+
});
|
|
94
151
|
const event = {
|
|
95
152
|
type: "realizeCorrect",
|
|
96
153
|
id: (0, uuid_1.v7)(),
|
|
97
154
|
location: props.scenario.location,
|
|
98
|
-
content: pointer.value.implementationCode,
|
|
155
|
+
content: pointer.value.revise.implementationCode,
|
|
99
156
|
tokenUsage,
|
|
100
157
|
completed: ++props.progress.completed,
|
|
101
158
|
total: props.progress.total,
|
|
@@ -130,73 +187,89 @@ const claude = {
|
|
|
130
187
|
{
|
|
131
188
|
name: "review",
|
|
132
189
|
parameters: {
|
|
133
|
-
description: "
|
|
190
|
+
description: " Properties containing the multi-phase error correction process\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeCorrectApplication.IProps} type:\n\n> Properties for error correction following Chain of Thinking (CoT).\n> \n> All phases are wrapped in a `revise` object for systematic error\n> resolution.",
|
|
134
191
|
type: "object",
|
|
135
192
|
properties: {
|
|
136
|
-
|
|
137
|
-
description: "
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
plan: {
|
|
141
|
-
description: "Step 1.\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n\nDO NOT:\n\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active\n without checking\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
|
|
142
|
-
type: "string"
|
|
143
|
-
},
|
|
144
|
-
prisma_schemas: {
|
|
145
|
-
description: "Step 2.\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
|
|
146
|
-
type: "string"
|
|
147
|
-
},
|
|
148
|
-
draft_without_date_type: {
|
|
149
|
-
description: "Step 3.\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system\nautomatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
|
|
150
|
-
type: "string"
|
|
151
|
-
},
|
|
152
|
-
review: {
|
|
153
|
-
description: "Step 4.\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.",
|
|
154
|
-
type: "string"
|
|
155
|
-
},
|
|
156
|
-
withCompilerFeedback: {
|
|
157
|
-
description: "\uD83D\uDEE0 Phase 4-2: With compiler feedback (optional)\n\nA correction pass that applies fixes for compile-time errors that arose\nduring the review stage (if any).\n\n\u2705 Must:\n\n- Only include this field if TypeScript errors are detected in the Review\n phase.\n- Resolve all TypeScript errors without using `as any`.\n- Provide safe brand casting only if required (e.g., `as string &\n tags.Format<'uuid'>`).\n- If no TypeScript errors exist, this field MUST contain the text: \"No\n TypeScript errors detected - skipping this phase\"",
|
|
158
|
-
type: "string"
|
|
159
|
-
},
|
|
160
|
-
implementationCode: {
|
|
161
|
-
description: "Step 5.\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
|
|
162
|
-
type: "string"
|
|
193
|
+
revise: {
|
|
194
|
+
description: "Revision process containing all error correction phases.",
|
|
195
|
+
$ref: "#/$defs/IAutoBeRealizeCorrectApplication.IRevise"
|
|
163
196
|
}
|
|
164
197
|
},
|
|
165
198
|
required: [
|
|
166
|
-
"
|
|
167
|
-
"plan",
|
|
168
|
-
"prisma_schemas",
|
|
169
|
-
"draft_without_date_type",
|
|
170
|
-
"review",
|
|
171
|
-
"withCompilerFeedback",
|
|
172
|
-
"implementationCode"
|
|
199
|
+
"revise"
|
|
173
200
|
],
|
|
174
201
|
additionalProperties: false,
|
|
175
|
-
$defs: {
|
|
202
|
+
$defs: {
|
|
203
|
+
"IAutoBeRealizeCorrectApplication.IRevise": {
|
|
204
|
+
type: "object",
|
|
205
|
+
properties: {
|
|
206
|
+
errorAnalysis: {
|
|
207
|
+
description: "Step 1: Compilation error analysis and resolution strategy.",
|
|
208
|
+
type: "string"
|
|
209
|
+
},
|
|
210
|
+
plan: {
|
|
211
|
+
description: "Step 2: Provider function implementation plan.",
|
|
212
|
+
type: "string"
|
|
213
|
+
},
|
|
214
|
+
prismaSchemas: {
|
|
215
|
+
description: "Step 3: Relevant Prisma schema definitions.",
|
|
216
|
+
type: "string"
|
|
217
|
+
},
|
|
218
|
+
draftWithoutDateType: {
|
|
219
|
+
description: "Step 4: Initial draft without using native Date type.",
|
|
220
|
+
type: "string"
|
|
221
|
+
},
|
|
222
|
+
review: {
|
|
223
|
+
description: "Step 5: Refined version with improved completeness.",
|
|
224
|
+
type: "string"
|
|
225
|
+
},
|
|
226
|
+
withCompilerFeedback: {
|
|
227
|
+
description: "Step 6: Corrected implementation after compiler feedback.",
|
|
228
|
+
type: "string"
|
|
229
|
+
},
|
|
230
|
+
implementationCode: {
|
|
231
|
+
description: "Step 7: Final complete TypeScript function implementation.",
|
|
232
|
+
type: "string"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
required: [
|
|
236
|
+
"implementationCode"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
}
|
|
176
240
|
},
|
|
177
|
-
|
|
241
|
+
description: "Reviews and corrects TypeScript compilation errors.\n\nFixes TypeScript compilation errors while preserving original business\nlogic, applying minimal intervention principle.",
|
|
242
|
+
validate: (() => { const _io0 = input => "object" === typeof input.revise && null !== input.revise && _io1(input.revise); const _io1 = input => (undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis) && (undefined === input.plan || "string" === typeof input.plan) && (undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas) && (undefined === input.draftWithoutDateType || "string" === typeof input.draftWithoutDateType) && (undefined === input.review || "string" === typeof input.review) && (undefined === input.withCompilerFeedback || "string" === typeof input.withCompilerFeedback) && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
243
|
+
path: _path + ".revise",
|
|
244
|
+
expected: "IAutoBeRealizeCorrectApplication.IRevise",
|
|
245
|
+
value: input.revise
|
|
246
|
+
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
247
|
+
path: _path + ".revise",
|
|
248
|
+
expected: "IAutoBeRealizeCorrectApplication.IRevise",
|
|
249
|
+
value: input.revise
|
|
250
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis || _report(_exceptionable, {
|
|
178
251
|
path: _path + ".errorAnalysis",
|
|
179
|
-
expected: "string",
|
|
252
|
+
expected: "(string | undefined)",
|
|
180
253
|
value: input.errorAnalysis
|
|
181
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
254
|
+
}), undefined === input.plan || "string" === typeof input.plan || _report(_exceptionable, {
|
|
182
255
|
path: _path + ".plan",
|
|
183
|
-
expected: "string",
|
|
256
|
+
expected: "(string | undefined)",
|
|
184
257
|
value: input.plan
|
|
185
|
-
}), "string" === typeof input.
|
|
186
|
-
path: _path + ".
|
|
187
|
-
expected: "string",
|
|
188
|
-
value: input.
|
|
189
|
-
}), "string" === typeof input.
|
|
190
|
-
path: _path + ".
|
|
191
|
-
expected: "string",
|
|
192
|
-
value: input.
|
|
193
|
-
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
258
|
+
}), undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas || _report(_exceptionable, {
|
|
259
|
+
path: _path + ".prismaSchemas",
|
|
260
|
+
expected: "(string | undefined)",
|
|
261
|
+
value: input.prismaSchemas
|
|
262
|
+
}), undefined === input.draftWithoutDateType || "string" === typeof input.draftWithoutDateType || _report(_exceptionable, {
|
|
263
|
+
path: _path + ".draftWithoutDateType",
|
|
264
|
+
expected: "(string | undefined)",
|
|
265
|
+
value: input.draftWithoutDateType
|
|
266
|
+
}), undefined === input.review || "string" === typeof input.review || _report(_exceptionable, {
|
|
194
267
|
path: _path + ".review",
|
|
195
|
-
expected: "string",
|
|
268
|
+
expected: "(string | undefined)",
|
|
196
269
|
value: input.review
|
|
197
|
-
}), "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
|
|
270
|
+
}), undefined === input.withCompilerFeedback || "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
|
|
198
271
|
path: _path + ".withCompilerFeedback",
|
|
199
|
-
expected: "string",
|
|
272
|
+
expected: "(string | undefined)",
|
|
200
273
|
value: input.withCompilerFeedback
|
|
201
274
|
}), "string" === typeof input.implementationCode || _report(_exceptionable, {
|
|
202
275
|
path: _path + ".implementationCode",
|
|
@@ -245,73 +318,88 @@ const collection = {
|
|
|
245
318
|
{
|
|
246
319
|
name: "review",
|
|
247
320
|
parameters: {
|
|
248
|
-
description: "
|
|
321
|
+
description: " Properties containing the multi-phase error correction process\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeCorrectApplication.IProps} type:\n\n> Properties for error correction following Chain of Thinking (CoT).\n> \n> All phases are wrapped in a `revise` object for systematic error\n> resolution.\n\n### Description of {@link revise} property:\n\n> Revision process containing all error correction phases.",
|
|
249
322
|
type: "object",
|
|
250
323
|
properties: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
type: "string"
|
|
254
|
-
},
|
|
255
|
-
plan: {
|
|
256
|
-
description: "Step 1.\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n\nDO NOT:\n\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active\n without checking\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
|
|
257
|
-
type: "string"
|
|
258
|
-
},
|
|
259
|
-
prisma_schemas: {
|
|
260
|
-
description: "Step 2.\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
|
|
261
|
-
type: "string"
|
|
262
|
-
},
|
|
263
|
-
draft_without_date_type: {
|
|
264
|
-
description: "Step 3.\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system\nautomatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
|
|
265
|
-
type: "string"
|
|
266
|
-
},
|
|
267
|
-
review: {
|
|
268
|
-
description: "Step 4.\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.",
|
|
269
|
-
type: "string"
|
|
270
|
-
},
|
|
271
|
-
withCompilerFeedback: {
|
|
272
|
-
description: "\uD83D\uDEE0 Phase 4-2: With compiler feedback (optional)\n\nA correction pass that applies fixes for compile-time errors that arose\nduring the review stage (if any).\n\n\u2705 Must:\n\n- Only include this field if TypeScript errors are detected in the Review\n phase.\n- Resolve all TypeScript errors without using `as any`.\n- Provide safe brand casting only if required (e.g., `as string &\n tags.Format<'uuid'>`).\n- If no TypeScript errors exist, this field MUST contain the text: \"No\n TypeScript errors detected - skipping this phase\"",
|
|
273
|
-
type: "string"
|
|
274
|
-
},
|
|
275
|
-
implementationCode: {
|
|
276
|
-
description: "Step 5.\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
|
|
277
|
-
type: "string"
|
|
324
|
+
revise: {
|
|
325
|
+
$ref: "#/$defs/IAutoBeRealizeCorrectApplication.IRevise"
|
|
278
326
|
}
|
|
279
327
|
},
|
|
280
328
|
required: [
|
|
281
|
-
"
|
|
282
|
-
"plan",
|
|
283
|
-
"prisma_schemas",
|
|
284
|
-
"draft_without_date_type",
|
|
285
|
-
"review",
|
|
286
|
-
"withCompilerFeedback",
|
|
287
|
-
"implementationCode"
|
|
329
|
+
"revise"
|
|
288
330
|
],
|
|
289
331
|
additionalProperties: false,
|
|
290
|
-
$defs: {
|
|
332
|
+
$defs: {
|
|
333
|
+
"IAutoBeRealizeCorrectApplication.IRevise": {
|
|
334
|
+
type: "object",
|
|
335
|
+
properties: {
|
|
336
|
+
errorAnalysis: {
|
|
337
|
+
description: "Step 1: Compilation error analysis and resolution strategy.",
|
|
338
|
+
type: "string"
|
|
339
|
+
},
|
|
340
|
+
plan: {
|
|
341
|
+
description: "Step 2: Provider function implementation plan.",
|
|
342
|
+
type: "string"
|
|
343
|
+
},
|
|
344
|
+
prismaSchemas: {
|
|
345
|
+
description: "Step 3: Relevant Prisma schema definitions.",
|
|
346
|
+
type: "string"
|
|
347
|
+
},
|
|
348
|
+
draftWithoutDateType: {
|
|
349
|
+
description: "Step 4: Initial draft without using native Date type.",
|
|
350
|
+
type: "string"
|
|
351
|
+
},
|
|
352
|
+
review: {
|
|
353
|
+
description: "Step 5: Refined version with improved completeness.",
|
|
354
|
+
type: "string"
|
|
355
|
+
},
|
|
356
|
+
withCompilerFeedback: {
|
|
357
|
+
description: "Step 6: Corrected implementation after compiler feedback.",
|
|
358
|
+
type: "string"
|
|
359
|
+
},
|
|
360
|
+
implementationCode: {
|
|
361
|
+
description: "Step 7: Final complete TypeScript function implementation.",
|
|
362
|
+
type: "string"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
required: [
|
|
366
|
+
"implementationCode"
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
}
|
|
291
370
|
},
|
|
292
|
-
|
|
371
|
+
description: "Reviews and corrects TypeScript compilation errors.\n\nFixes TypeScript compilation errors while preserving original business\nlogic, applying minimal intervention principle.",
|
|
372
|
+
validate: (() => { const _io0 = input => "object" === typeof input.revise && null !== input.revise && _io1(input.revise); const _io1 = input => (undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis) && (undefined === input.plan || "string" === typeof input.plan) && (undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas) && (undefined === input.draftWithoutDateType || "string" === typeof input.draftWithoutDateType) && (undefined === input.review || "string" === typeof input.review) && (undefined === input.withCompilerFeedback || "string" === typeof input.withCompilerFeedback) && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
373
|
+
path: _path + ".revise",
|
|
374
|
+
expected: "IAutoBeRealizeCorrectApplication.IRevise",
|
|
375
|
+
value: input.revise
|
|
376
|
+
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
377
|
+
path: _path + ".revise",
|
|
378
|
+
expected: "IAutoBeRealizeCorrectApplication.IRevise",
|
|
379
|
+
value: input.revise
|
|
380
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis || _report(_exceptionable, {
|
|
293
381
|
path: _path + ".errorAnalysis",
|
|
294
|
-
expected: "string",
|
|
382
|
+
expected: "(string | undefined)",
|
|
295
383
|
value: input.errorAnalysis
|
|
296
|
-
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
384
|
+
}), undefined === input.plan || "string" === typeof input.plan || _report(_exceptionable, {
|
|
297
385
|
path: _path + ".plan",
|
|
298
|
-
expected: "string",
|
|
386
|
+
expected: "(string | undefined)",
|
|
299
387
|
value: input.plan
|
|
300
|
-
}), "string" === typeof input.
|
|
301
|
-
path: _path + ".
|
|
302
|
-
expected: "string",
|
|
303
|
-
value: input.
|
|
304
|
-
}), "string" === typeof input.
|
|
305
|
-
path: _path + ".
|
|
306
|
-
expected: "string",
|
|
307
|
-
value: input.
|
|
308
|
-
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
388
|
+
}), undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas || _report(_exceptionable, {
|
|
389
|
+
path: _path + ".prismaSchemas",
|
|
390
|
+
expected: "(string | undefined)",
|
|
391
|
+
value: input.prismaSchemas
|
|
392
|
+
}), undefined === input.draftWithoutDateType || "string" === typeof input.draftWithoutDateType || _report(_exceptionable, {
|
|
393
|
+
path: _path + ".draftWithoutDateType",
|
|
394
|
+
expected: "(string | undefined)",
|
|
395
|
+
value: input.draftWithoutDateType
|
|
396
|
+
}), undefined === input.review || "string" === typeof input.review || _report(_exceptionable, {
|
|
309
397
|
path: _path + ".review",
|
|
310
|
-
expected: "string",
|
|
398
|
+
expected: "(string | undefined)",
|
|
311
399
|
value: input.review
|
|
312
|
-
}), "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
|
|
400
|
+
}), undefined === input.withCompilerFeedback || "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
|
|
313
401
|
path: _path + ".withCompilerFeedback",
|
|
314
|
-
expected: "string",
|
|
402
|
+
expected: "(string | undefined)",
|
|
315
403
|
value: input.withCompilerFeedback
|
|
316
404
|
}), "string" === typeof input.implementationCode || _report(_exceptionable, {
|
|
317
405
|
path: _path + ".implementationCode",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealizeCorrect.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateRealizeCorrect.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,8DAmFC;AAED,0BA+DC;;AArKD,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,mGAAgG;AAChG,wEAAqE;AAIrE,mEAAgE;AAChE,6EAA0E;AAE1E,SAAsB,yBAAyB;yDAC7C,GAAyB,EACzB,SAAyC,EACzC,cAA4C,EAC5C,SAAkC,EAClC,QAAyC,EACzC,QAAmB,EACnB,OAAe,CAAC;;QAEhB,MAAM,KAAK,GAAG,MAAM,IAAA,yCAAmB,EAAC,GAAG,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5E,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAEzD,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,IAAI,EAAE,IAAI,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAErC,MAAM,SAAS,GACb,MAAA,MAAA,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YAC9B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,C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KAAsE;IAC7E,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import {
|
|
4
|
+
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
5
5
|
/**
|
|
6
6
|
* Generates a planning result that defines what kind of function should be
|
|
7
7
|
* created, based solely on the provided Swagger (OpenAPI) operation — without
|
|
@@ -22,4 +22,4 @@ import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeSc
|
|
|
22
22
|
* @returns A planning object containing all structural information needed to
|
|
23
23
|
* generate the function
|
|
24
24
|
*/
|
|
25
|
-
export declare const orchestrateRealizeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation, authorization?: AutoBeRealizeAuthorization) =>
|
|
25
|
+
export declare const orchestrateRealizeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation, authorization?: AutoBeRealizeAuthorization) => IAutoBeRealizeScenarioResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealizeScenario.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeScenario.ts"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,0BAA0B,GAAG,CACxC,GAAyB,EACzB,SAAmC,EACnC,aAA0C,
|
|
1
|
+
{"version":3,"file":"orchestrateRealizeScenario.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeScenario.ts"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,0BAA0B,GAAG,CACxC,GAAyB,EACzB,SAAmC,EACnC,aAA0C,EACZ,EAAE;;IAChC,MAAM,SAAS,GACb,MAAA,MAAA,GAAG;SACA,KAAK,EAAE;SACP,IAAI,0CAAE,KAAK,CAAC,MAAM,CACjB,CAAC,EAAE,EAAE,EAAE,CACL,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;QAChD,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAC/C,mCAAI,EAAE,CAAC;IAEZ,MAAM,YAAY,GAAG,GAAG,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI;SACvD,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;SACpB,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;SACpB,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;SACpB,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC;IACzB,OAAO;QACL,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,iBAAiB,YAAY,KAAK;QAC5C,SAAS,EAAE,SAAS;QACpB,cAAc,EAAE,aAAa;KAC9B,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,0BAA0B,8BA0BrC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import {
|
|
4
|
+
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
5
5
|
export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
6
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
7
7
|
authorization: AutoBeRealizeAuthorization | null;
|
|
8
|
-
scenario:
|
|
8
|
+
scenario: IAutoBeRealizeScenarioResult;
|
|
9
9
|
progress: AutoBeProgressEventBase;
|
|
10
10
|
promptCacheKey: string;
|
|
11
11
|
}): Promise<AutoBeRealizeWriteEvent>;
|