@autobe/agent 0.17.1 → 0.19.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/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +34 -1
- package/lib/agent/src/AutoBeAgent.js.map +1 -0
- package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
- package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
- package/lib/agent/src/AutoBeMockAgent.d.ts +7 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +40 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +28 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
- package/lib/agent/src/context/AutoBeContext.js.map +1 -0
- package/lib/agent/src/context/AutoBeState.d.ts +8 -0
- package/lib/agent/src/context/AutoBeState.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +117 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +33 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
- package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
- package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +212 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/agent/src/factory/createAutoBeContext.js +271 -0
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
- package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
- package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/agent/src/factory/index.d.ts +1 -0
- package/lib/agent/src/factory/index.js.map +1 -0
- package/lib/agent/src/index.d.ts +6 -0
- package/lib/agent/src/index.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +61 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +69 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +714 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +244 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/agent/src/orchestrate/index.d.ts +5 -0
- package/lib/agent/src/orchestrate/index.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +41 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +34 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1731 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +42 -36
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +24 -38
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1774 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1328 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +561 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +473 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +93 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +171 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +107 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- 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.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +79 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +52 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +40 -14
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -48
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +154 -83
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +180 -248
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1662 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/{orchestrate/realize/transformRealizeCoderHistories.js → agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js} +31 -92
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js +44 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +130 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +352 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +345 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
- package/lib/{orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts → agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts} +22 -88
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +6 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +34 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +101 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +16 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +31 -47
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +961 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +122 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
- package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
- package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
- package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
- package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
- package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
- package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
- package/lib/agent/src/utils/backoffRetry.js.map +1 -0
- package/lib/agent/src/utils/divideArray.d.ts +4 -0
- package/lib/agent/src/utils/divideArray.js.map +1 -0
- package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
- package/lib/agent/src/utils/emplaceMap.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 +24 -28
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +11323 -5336
- package/lib/index.mjs.map +1 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +64 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +279 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +51 -3
- package/src/AutoBeMockAgent.ts +44 -16
- package/src/constants/AutoBeSystemPromptConstant.ts +24 -28
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +40 -2
- package/src/factory/consentFunctionCall.ts +128 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +149 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +60 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +78 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +66 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +99 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +53 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +17 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +69 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +57 -10
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +209 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +18 -48
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +216 -107
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +101 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +180 -96
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +145 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +67 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +139 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +92 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +55 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +19 -49
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +124 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +48 -0
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +28 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +49 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +67 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +125 -30
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +122 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +128 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.ts → IAutoBeRealizeWriteApplication.ts} +22 -95
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +10 -1
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
- package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
- package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +121 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +17 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +241 -168
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/AutoBeAgent.js.map +0 -1
- package/lib/AutoBeAgentBase.js.map +0 -1
- package/lib/AutoBeMockAgent.js.map +0 -1
- package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/context/AutoBeContext.js.map +0 -1
- package/lib/context/AutoBeState.js.map +0 -1
- package/lib/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/context/IAutoBeApplication.js.map +0 -1
- package/lib/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/context/assertSchemaModel.js.map +0 -1
- package/lib/factory/createAgenticaHistory.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/factory/createAutoBeContext.js +0 -141
- package/lib/factory/createAutoBeContext.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/index.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +0 -1643
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +0 -411
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -85
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -52
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/orchestrate/realize/RealizePipe.d.ts +0 -5
- package/lib/orchestrate/realize/RealizePipe.js +0 -14
- package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
- package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
- package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/orchestrate/test/transformTestCorrectHistories.js +0 -34
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
- package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
- package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
- package/lib/structures/IAutoBeConfig.js.map +0 -1
- package/lib/structures/IAutoBeProps.js.map +0 -1
- package/lib/structures/IAutoBeVendor.js.map +0 -1
- package/lib/utils/arrayToRecord.js.map +0 -1
- package/lib/utils/backoffRetry.js.map +0 -1
- package/lib/utils/divideArray.js.map +0 -1
- package/lib/utils/emplaceMap.js.map +0 -1
- package/lib/utils/enforceToolCall.d.ts +0 -3
- package/lib/utils/enforceToolCall.js +0 -13
- package/lib/utils/enforceToolCall.js.map +0 -1
- package/lib/utils/forceRetry.d.ts +0 -1
- package/lib/utils/forceRetry.js +0 -26
- package/lib/utils/forceRetry.js.map +0 -1
- package/lib/utils/pipe.d.ts +0 -5
- package/lib/utils/pipe.js +0 -14
- package/lib/utils/pipe.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
- package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
- package/src/orchestrate/realize/RealizePipe.ts +0 -39
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/orchestrate/realize/transformRealizeAuthorization.ts +0 -44
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
- package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
- package/src/utils/enforceToolCall.ts +0 -13
- package/src/utils/forceRetry.ts +0 -13
- package/src/utils/pipe.ts +0 -39
- /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
- /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{index.js → agent/src/index.js} +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
- /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
- /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
- /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
- /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { StringUtil } from "@autobe/utils";
|
|
4
|
+
import { v4 } from "uuid";
|
|
5
|
+
|
|
6
|
+
export const transformRealizeWriteAuthorizationsHistories = (
|
|
7
|
+
operation: AutoBeOpenApi.IOperation,
|
|
8
|
+
payloads: Record<string, string>,
|
|
9
|
+
): Array<IAgenticaHistoryJson.ISystemMessage> => {
|
|
10
|
+
// Login operation 가이드
|
|
11
|
+
const loginGuide =
|
|
12
|
+
operation.authorizationType === "login"
|
|
13
|
+
? [
|
|
14
|
+
{
|
|
15
|
+
id: v4(),
|
|
16
|
+
created_at: new Date().toISOString(),
|
|
17
|
+
type: "systemMessage" as const,
|
|
18
|
+
text: StringUtil.trim`
|
|
19
|
+
# Authorization Type: Login
|
|
20
|
+
|
|
21
|
+
This is a **login** operation that authenticates users.
|
|
22
|
+
|
|
23
|
+
## Implementation Guidelines for Login:
|
|
24
|
+
|
|
25
|
+
### Login Operation Requirements
|
|
26
|
+
- This is a login endpoint that authenticates users
|
|
27
|
+
- Must validate credentials (username/email and password)
|
|
28
|
+
- Should return authentication tokens (access and refresh tokens)
|
|
29
|
+
- Must NOT require authentication decorator (this endpoint creates authentication)
|
|
30
|
+
- Should check if user exists and password matches
|
|
31
|
+
|
|
32
|
+
### MANDATORY: Use MyGlobal.password for Password Verification
|
|
33
|
+
|
|
34
|
+
**CRITICAL**: You MUST use MyGlobal.password utilities for password verification to ensure consistency with the join operation:
|
|
35
|
+
|
|
36
|
+
\`\`\`typescript
|
|
37
|
+
// Example: Password verification in login
|
|
38
|
+
const isValid = await MyGlobal.password.verify(
|
|
39
|
+
body.password, // plain password from request
|
|
40
|
+
user.password_hash // hashed password from database
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
if (!isValid) {
|
|
44
|
+
throw new Error("Invalid credentials");
|
|
45
|
+
}
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
### JWT Token Generation
|
|
49
|
+
|
|
50
|
+
**NOTE**: The jsonwebtoken library is automatically imported as jwt. Use it to generate tokens with the EXACT payload structure:
|
|
51
|
+
|
|
52
|
+
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
53
|
+
${JSON.stringify(payloads)}
|
|
54
|
+
|
|
55
|
+
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
56
|
+
|
|
57
|
+
// Generate access token with the EXACT payload structure for the user type
|
|
58
|
+
// DO NOT use type annotations like: const payload: MemberPayload = {...}
|
|
59
|
+
// Just create the payload object directly
|
|
60
|
+
|
|
61
|
+
const accessToken = jwt.sign(
|
|
62
|
+
{
|
|
63
|
+
userId: user.id,
|
|
64
|
+
email: user.email,
|
|
65
|
+
// ... other required fields from the payload structure above
|
|
66
|
+
},
|
|
67
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
68
|
+
{
|
|
69
|
+
expiresIn: '1h',
|
|
70
|
+
issuer: 'autobe' // MUST use 'autobe' as issuer
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// Generate refresh token (optional)
|
|
75
|
+
const refreshToken = jwt.sign(
|
|
76
|
+
{
|
|
77
|
+
userId: user.id,
|
|
78
|
+
tokenType: 'refresh'
|
|
79
|
+
},
|
|
80
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
81
|
+
{
|
|
82
|
+
expiresIn: '7d',
|
|
83
|
+
issuer: 'autobe' // MUST use 'autobe' as issuer
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
// Decode tokens if needed (e.g., for verification)
|
|
88
|
+
const decoded = jwt.verify(token, MyGlobal.env.JWT_SECRET_KEY, {
|
|
89
|
+
issuer: 'autobe' // Verify issuer is 'autobe'
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
**DO NOT**:
|
|
93
|
+
- Implement your own password hashing logic
|
|
94
|
+
- Use bcrypt, argon2, or any other hashing library directly
|
|
95
|
+
- Try to hash and compare manually
|
|
96
|
+
|
|
97
|
+
**IMPORTANT**: Since this is a login operation, it must be publicly accessible without authentication.
|
|
98
|
+
`,
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
: [];
|
|
102
|
+
|
|
103
|
+
// Join (registration) operation 가이드
|
|
104
|
+
const joinGuide =
|
|
105
|
+
operation.authorizationType === "join"
|
|
106
|
+
? [
|
|
107
|
+
{
|
|
108
|
+
id: v4(),
|
|
109
|
+
created_at: new Date().toISOString(),
|
|
110
|
+
type: "systemMessage" as const,
|
|
111
|
+
text: StringUtil.trim`
|
|
112
|
+
# Authorization Type: Join (Registration)
|
|
113
|
+
|
|
114
|
+
This is a **join** operation for user registration.
|
|
115
|
+
|
|
116
|
+
## Implementation Guidelines for Join:
|
|
117
|
+
|
|
118
|
+
### Join (Registration) Operation Requirements
|
|
119
|
+
- This is a user registration endpoint
|
|
120
|
+
- Must validate all required user information
|
|
121
|
+
- Should check for duplicate accounts (email, username, etc.)
|
|
122
|
+
- Must hash passwords before storing (NEVER store plain passwords)
|
|
123
|
+
- Should create a new user record in the database
|
|
124
|
+
- Must NOT require authentication decorator (public endpoint)
|
|
125
|
+
|
|
126
|
+
### MANDATORY: Use MyGlobal.password for Password Hashing
|
|
127
|
+
|
|
128
|
+
**CRITICAL**: You MUST use MyGlobal.password utilities for password hashing to ensure consistency across all authentication operations:
|
|
129
|
+
|
|
130
|
+
\`\`\`typescript
|
|
131
|
+
// Example: Password hashing in join/registration
|
|
132
|
+
const hashedPassword = await MyGlobal.password.hash(body.password);
|
|
133
|
+
|
|
134
|
+
// Store the hashed password in database
|
|
135
|
+
await MyGlobal.prisma.users.create({
|
|
136
|
+
data: {
|
|
137
|
+
email: body.email,
|
|
138
|
+
password_hash: hashedPassword, // Store the hash, never plain password
|
|
139
|
+
// ... other fields
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
**DO NOT**:
|
|
145
|
+
- Store plain passwords in the database
|
|
146
|
+
- Use bcrypt, argon2, or any other hashing library directly
|
|
147
|
+
- Implement your own hashing logic
|
|
148
|
+
|
|
149
|
+
### JWT Token Generation After Registration
|
|
150
|
+
|
|
151
|
+
**NOTE**: The jsonwebtoken library is automatically imported as jwt. After successful registration, generate tokens with the EXACT payload structure:
|
|
152
|
+
|
|
153
|
+
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
154
|
+
${JSON.stringify(payloads)}
|
|
155
|
+
|
|
156
|
+
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
157
|
+
|
|
158
|
+
// After creating the user, generate tokens with EXACT payload structure
|
|
159
|
+
// DO NOT use type annotations like: const payload: UserPayload = {...}
|
|
160
|
+
// Just create the payload object directly in jwt.sign()
|
|
161
|
+
|
|
162
|
+
const accessToken = jwt.sign(
|
|
163
|
+
{
|
|
164
|
+
userId: newUser.id,
|
|
165
|
+
email: newUser.email,
|
|
166
|
+
// ... other required fields from the payload structure above
|
|
167
|
+
},
|
|
168
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
169
|
+
{
|
|
170
|
+
expiresIn: '1h',
|
|
171
|
+
issuer: 'autobe' // MUST use 'autobe' as issuer
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
const refreshToken = jwt.sign(
|
|
176
|
+
{
|
|
177
|
+
userId: newUser.id,
|
|
178
|
+
tokenType: 'refresh'
|
|
179
|
+
},
|
|
180
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
181
|
+
{
|
|
182
|
+
expiresIn: '7d',
|
|
183
|
+
issuer: 'autobe' // MUST use 'autobe' as issuer
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
**IMPORTANT**: Since this is a registration operation, it must be publicly accessible. Always hash passwords before storing.
|
|
188
|
+
`,
|
|
189
|
+
},
|
|
190
|
+
]
|
|
191
|
+
: [];
|
|
192
|
+
|
|
193
|
+
// Refresh token operation 가이드
|
|
194
|
+
const refreshGuide =
|
|
195
|
+
operation.authorizationType === "refresh"
|
|
196
|
+
? [
|
|
197
|
+
{
|
|
198
|
+
id: v4(),
|
|
199
|
+
created_at: new Date().toISOString(),
|
|
200
|
+
type: "systemMessage" as const,
|
|
201
|
+
text: StringUtil.trim`
|
|
202
|
+
# Authorization Type: Refresh Token
|
|
203
|
+
|
|
204
|
+
This is a **refresh** token operation for renewing expired access tokens.
|
|
205
|
+
|
|
206
|
+
## Implementation Guidelines for Refresh:
|
|
207
|
+
|
|
208
|
+
### Refresh Token Operation Requirements
|
|
209
|
+
- This endpoint refreshes expired access tokens
|
|
210
|
+
- Must validate the refresh token first
|
|
211
|
+
- Should check if refresh token is not expired or revoked
|
|
212
|
+
- Must generate a new access token with THE SAME payload structure
|
|
213
|
+
- May also rotate the refresh token for security
|
|
214
|
+
- Should handle invalid/expired refresh tokens gracefully
|
|
215
|
+
- Typically requires the refresh token in request body or headers
|
|
216
|
+
- Must NOT require standard authentication (uses refresh token instead)
|
|
217
|
+
|
|
218
|
+
### CRITICAL: Refresh Token Implementation
|
|
219
|
+
|
|
220
|
+
**IMPORTANT**: When refreshing tokens, you MUST:
|
|
221
|
+
1. Decode and verify the refresh token
|
|
222
|
+
2. Extract the user information from the decoded token
|
|
223
|
+
3. Generate a new access token with THE SAME payload structure as the original
|
|
224
|
+
|
|
225
|
+
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
226
|
+
${JSON.stringify(payloads)}
|
|
227
|
+
|
|
228
|
+
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
229
|
+
|
|
230
|
+
// Step 1: Verify and decode the refresh token
|
|
231
|
+
const decoded = jwt.verify(body.refreshToken, MyGlobal.env.JWT_SECRET_KEY, {
|
|
232
|
+
issuer: 'autobe'
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// Step 2: Get user data (from decoded token or database)
|
|
236
|
+
const user = await MyGlobal.prisma.users.findUnique({
|
|
237
|
+
where: { id: decoded.userId }
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
if (!user) {
|
|
241
|
+
throw new Error("User not found");
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Step 3: Generate new access token with SAME payload structure as login/join
|
|
245
|
+
const newAccessToken = jwt.sign(
|
|
246
|
+
{
|
|
247
|
+
userId: user.id,
|
|
248
|
+
email: user.email,
|
|
249
|
+
// ... other required fields from the payload structure above
|
|
250
|
+
// MUST match the structure used in login/join operations
|
|
251
|
+
},
|
|
252
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
253
|
+
{
|
|
254
|
+
expiresIn: '1h',
|
|
255
|
+
issuer: 'autobe'
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
// Optional: Rotate refresh token
|
|
260
|
+
const newRefreshToken = jwt.sign(
|
|
261
|
+
{
|
|
262
|
+
userId: user.id,
|
|
263
|
+
tokenType: 'refresh'
|
|
264
|
+
},
|
|
265
|
+
MyGlobal.env.JWT_SECRET_KEY,
|
|
266
|
+
{
|
|
267
|
+
expiresIn: '7d',
|
|
268
|
+
issuer: 'autobe'
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
**DO NOT**:
|
|
273
|
+
- Generate new access tokens with different payload structures
|
|
274
|
+
- Use random IDs like v4() in the payload
|
|
275
|
+
- Create tokens without verifying the refresh token first
|
|
276
|
+
- Use type annotations like: const payload: UserPayload = {...}
|
|
277
|
+
|
|
278
|
+
**IMPORTANT**: The new access token MUST have the same payload structure as the original token from login/join operations.
|
|
279
|
+
`,
|
|
280
|
+
},
|
|
281
|
+
]
|
|
282
|
+
: [];
|
|
283
|
+
|
|
284
|
+
return [...loginGuide, ...joinGuide, ...refreshGuide];
|
|
285
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
|
|
5
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
7
|
+
import { IAutoBeTestScenarioArtifacts } from "../../test/structures/IAutoBeTestScenarioArtifacts";
|
|
8
|
+
import { IAutoBeRealizeScenarioApplication } from "../structures/IAutoBeRealizeScenarioApplication";
|
|
9
|
+
import { transformRealizeWriteAuthorizationsHistories } from "./transformRealizeWriteAuthorizationsHistories";
|
|
10
|
+
|
|
11
|
+
export const transformRealizeWriteHistories = (
|
|
12
|
+
props: IProps,
|
|
13
|
+
): Array<
|
|
14
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
15
|
+
> => {
|
|
16
|
+
const payloads = Object.fromEntries(
|
|
17
|
+
props.totalAuthorizations.map((el) => [
|
|
18
|
+
el.payload.location,
|
|
19
|
+
el.payload.content,
|
|
20
|
+
]),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const [operation] = props.artifacts.document.operations;
|
|
24
|
+
|
|
25
|
+
const propsFields: string[] = [];
|
|
26
|
+
|
|
27
|
+
// payload 추가
|
|
28
|
+
if (props.authorization && operation.authorizationRole) {
|
|
29
|
+
propsFields.push(
|
|
30
|
+
`${operation.authorizationRole}: ${props.authorization.payload.name};`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// parameters 추가
|
|
35
|
+
operation.parameters.forEach((parameter) => {
|
|
36
|
+
const format =
|
|
37
|
+
"format" in parameter.schema
|
|
38
|
+
? ` & tags.Format<'${parameter.schema.format}'>`
|
|
39
|
+
: "";
|
|
40
|
+
propsFields.push(`${parameter.name}: ${parameter.schema.type}${format};`);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// body 추가
|
|
44
|
+
if (operation.requestBody?.typeName) {
|
|
45
|
+
propsFields.push(`body: ${operation.requestBody.typeName};`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const input =
|
|
49
|
+
propsFields.length > 0
|
|
50
|
+
? `props: {\n${propsFields.map((field) => ` ${field}`).join("\n")}\n}`
|
|
51
|
+
: `// No props parameter needed - function should have no parameters`;
|
|
52
|
+
|
|
53
|
+
if (props.state.analyze === null)
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
id: v4(),
|
|
57
|
+
created_at: new Date().toISOString(),
|
|
58
|
+
type: "systemMessage",
|
|
59
|
+
text: [
|
|
60
|
+
"Requirement analysis is not yet completed.",
|
|
61
|
+
"Don't call the any tool function,",
|
|
62
|
+
"but say to process the requirement analysis.",
|
|
63
|
+
].join(" "),
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
else if (props.state.prisma === null)
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
id: v4(),
|
|
70
|
+
created_at: new Date().toISOString(),
|
|
71
|
+
type: "systemMessage",
|
|
72
|
+
text: [
|
|
73
|
+
"Prisma DB schema generation is not yet completed.",
|
|
74
|
+
"Don't call the any tool function,",
|
|
75
|
+
"but say to process the Prisma DB schema generation.",
|
|
76
|
+
].join(" "),
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
else if (props.state.analyze.step !== props.state.prisma.step)
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
id: v4(),
|
|
83
|
+
created_at: new Date().toISOString(),
|
|
84
|
+
type: "systemMessage",
|
|
85
|
+
text: [
|
|
86
|
+
"Prisma DB schema generation has not been updated",
|
|
87
|
+
"for the latest requirement analysis.",
|
|
88
|
+
"Don't call the any tool function,",
|
|
89
|
+
"but say to re-process the Prisma DB schema generation.",
|
|
90
|
+
].join(" "),
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
else if (props.state.prisma.compiled.type !== "success")
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
id: v4(),
|
|
97
|
+
created_at: new Date().toISOString(),
|
|
98
|
+
type: "systemMessage",
|
|
99
|
+
text: [
|
|
100
|
+
"Prisma DB schema generation has not been updated",
|
|
101
|
+
"for the latest requirement analysis.",
|
|
102
|
+
"Don't call the any tool function,",
|
|
103
|
+
"but say to re-process the Prisma DB schema generation.",
|
|
104
|
+
].join(" "),
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
else if (props.state.interface === null)
|
|
108
|
+
return [
|
|
109
|
+
{
|
|
110
|
+
id: v4(),
|
|
111
|
+
created_at: new Date().toISOString(),
|
|
112
|
+
type: "systemMessage",
|
|
113
|
+
text: [
|
|
114
|
+
"Interface generation is not yet completed.",
|
|
115
|
+
"Don't call the any tool function,",
|
|
116
|
+
"but say to process the interface generation.",
|
|
117
|
+
].join(" "),
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// Get authorization-specific histories if authorizationType is set
|
|
122
|
+
const authorizationHistories = operation.authorizationType
|
|
123
|
+
? transformRealizeWriteAuthorizationsHistories(operation, payloads)
|
|
124
|
+
: [];
|
|
125
|
+
|
|
126
|
+
return [
|
|
127
|
+
{
|
|
128
|
+
id: v4(),
|
|
129
|
+
created_at: new Date().toISOString(),
|
|
130
|
+
type: "systemMessage",
|
|
131
|
+
text: AutoBeSystemPromptConstant.REALIZE_WRITE_TOTAL,
|
|
132
|
+
},
|
|
133
|
+
...authorizationHistories,
|
|
134
|
+
{
|
|
135
|
+
id: v4(),
|
|
136
|
+
created_at: new Date().toISOString(),
|
|
137
|
+
type: "systemMessage",
|
|
138
|
+
text: AutoBeSystemPromptConstant.REALIZE_WRITE_ARTIFACT.replaceAll(
|
|
139
|
+
`{prisma_schemas}`,
|
|
140
|
+
JSON.stringify(props.state.prisma.schemas),
|
|
141
|
+
)
|
|
142
|
+
.replaceAll(`{artifacts_sdk}`, JSON.stringify(props.artifacts.sdk))
|
|
143
|
+
.replaceAll(`{artifacts_dto}`, JSON.stringify(props.artifacts.dto))
|
|
144
|
+
.replaceAll(`{input}`, input),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: v4(),
|
|
148
|
+
created_at: new Date().toISOString(),
|
|
149
|
+
type: "systemMessage",
|
|
150
|
+
text: [
|
|
151
|
+
"Write new code based on the following operation.",
|
|
152
|
+
"```json",
|
|
153
|
+
JSON.stringify(props.scenario),
|
|
154
|
+
"```",
|
|
155
|
+
].join("\n"),
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: v4(),
|
|
159
|
+
created_at: new Date().toISOString(),
|
|
160
|
+
type: "assistantMessage",
|
|
161
|
+
text: [
|
|
162
|
+
`I understand your request.`,
|
|
163
|
+
``,
|
|
164
|
+
`To summarize:`,
|
|
165
|
+
`- I must **never use the native \`Date\` type** in any code or type definitions.`,
|
|
166
|
+
`- Instead, all date and datetime values must be handled as \`string & tags.Format<'date-time'>\`.`,
|
|
167
|
+
`- This rule is **strict** and applies everywhere, including domain types, API inputs/outputs, and Prisma models.`,
|
|
168
|
+
`- Even if a library or tool returns a \`Date\`, I must convert it to the correct string format before use.`,
|
|
169
|
+
``,
|
|
170
|
+
`Especially regarding the \`Date\` type: I understand that using it can lead to type inconsistency and runtime issues, so I will completely avoid it in all circumstances.`,
|
|
171
|
+
``,
|
|
172
|
+
`I'll make sure to follow all these rules strictly. Let’s proceed with this in mind.`,
|
|
173
|
+
].join("\n"),
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
interface IProps {
|
|
179
|
+
state: AutoBeState;
|
|
180
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
181
|
+
artifacts: IAutoBeTestScenarioArtifacts;
|
|
182
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
183
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
184
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeRealizeAuthorization,
|
|
3
|
+
AutoBeRealizeFunction,
|
|
4
|
+
AutoBeRealizeValidateEvent,
|
|
5
|
+
IAutoBeTypeScriptCompileResult,
|
|
6
|
+
} from "@autobe/interface";
|
|
7
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
8
|
+
|
|
9
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
10
|
+
|
|
11
|
+
export async function compile<Model extends ILlmSchema.Model>(
|
|
12
|
+
ctx: AutoBeContext<Model>,
|
|
13
|
+
props: {
|
|
14
|
+
authorizations: AutoBeRealizeAuthorization[];
|
|
15
|
+
functions: AutoBeRealizeFunction[];
|
|
16
|
+
},
|
|
17
|
+
): Promise<IAutoBeTypeScriptCompileResult> {
|
|
18
|
+
const prisma = ctx.state().prisma?.compiled;
|
|
19
|
+
const payloads: Record<string, string> = Object.fromEntries(
|
|
20
|
+
props.authorizations.map((el) => [el.payload.location, el.payload.content]),
|
|
21
|
+
);
|
|
22
|
+
const compiler = await ctx.compiler();
|
|
23
|
+
const templateFiles = await compiler.realize.getTemplate();
|
|
24
|
+
const nodeModules = prisma?.type === "success" ? prisma.nodeModules : {};
|
|
25
|
+
|
|
26
|
+
const filterTsFiles = (location: string) => location.endsWith(".ts");
|
|
27
|
+
|
|
28
|
+
const files: Record<string, string> = {
|
|
29
|
+
...nodeModules,
|
|
30
|
+
...payloads,
|
|
31
|
+
...Object.fromEntries(
|
|
32
|
+
Object.entries(await ctx.files({ dbms: "sqlite" })).filter(([key]) =>
|
|
33
|
+
filterTsFiles(key),
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
|
+
...Object.fromEntries(
|
|
37
|
+
Object.entries(templateFiles).filter(([key]) => filterTsFiles(key)),
|
|
38
|
+
),
|
|
39
|
+
...Object.fromEntries(
|
|
40
|
+
props.functions.map((el) => [el.location, el.content]),
|
|
41
|
+
),
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const compiled = await compiler.typescript.compile({
|
|
45
|
+
files: files,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (compiled.type === "success") {
|
|
49
|
+
return compiled;
|
|
50
|
+
} else if (compiled.type === "failure") {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const event: AutoBeRealizeValidateEvent = {
|
|
54
|
+
type: "realizeValidate",
|
|
55
|
+
result: compiled,
|
|
56
|
+
files: Object.fromEntries(
|
|
57
|
+
compiled.type === "failure"
|
|
58
|
+
? compiled.diagnostics.map((d) => [d.file, d.code])
|
|
59
|
+
: [],
|
|
60
|
+
),
|
|
61
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
62
|
+
created_at: new Date().toISOString(),
|
|
63
|
+
};
|
|
64
|
+
ctx.dispatch(event);
|
|
65
|
+
|
|
66
|
+
return compiled;
|
|
67
|
+
}
|