@autobe/agent 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.js +8 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeMockAgent.js +10 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +213 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +79 -19
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +41 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +10 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +24 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +36 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +362 -178
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +59 -57
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +17 -16
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +4799 -2637
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +18 -3
- package/src/AutoBeMockAgent.ts +13 -15
- package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -0
- package/src/factory/consentFunctionCall.ts +129 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeContext.ts +108 -20
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -29
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +37 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +17 -6
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
- package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +18 -8
- package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
- package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
- package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
- package/lib/agent/src/utils/pipe.d.ts +0 -5
- package/lib/agent/src/utils/pipe.js +0 -14
- package/lib/agent/src/utils/pipe.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/utils/pipe.d.ts +0 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
- package/src/orchestrate/internal/IProgress.ts +0 -4
- package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/internal/compile.ts +0 -84
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/utils/pipe.ts +0 -39
- /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
|
@@ -30,19 +30,16 @@ export declare namespace IAutoBeInterfaceSchemasReviewApplication {
|
|
|
30
30
|
/**
|
|
31
31
|
* Issues and problems found during schema analysis.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* - Positive feedback about what's already correct
|
|
36
|
-
* - Compliments about well-structured schemas
|
|
37
|
-
* - Confirmation that certain aspects meet standards
|
|
33
|
+
* DO: Document only problems that need fixing.
|
|
34
|
+
* DO NOT: Include positive feedback, compliments, or confirmations
|
|
38
35
|
*
|
|
39
36
|
* Focus exclusively on issues organized by severity:
|
|
40
37
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* -
|
|
44
|
-
* -
|
|
45
|
-
* -
|
|
38
|
+
* Severity levels:
|
|
39
|
+
* - Security vulnerabilities (exposed passwords, missing auth boundaries)
|
|
40
|
+
* - Missing required variants, incorrect type mappings
|
|
41
|
+
* - Missing format specifications, incomplete relationships
|
|
42
|
+
* - Documentation improvements, style consistency
|
|
46
43
|
*
|
|
47
44
|
* Each issue must include the specific schema name and what needs to be
|
|
48
45
|
* fixed. If there are no issues at all, simply state: "No issues found."
|
|
@@ -66,21 +63,18 @@ export declare namespace IAutoBeInterfaceSchemasReviewApplication {
|
|
|
66
63
|
/**
|
|
67
64
|
* Final validated and enhanced schemas ready for production use.
|
|
68
65
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* -
|
|
72
|
-
* -
|
|
73
|
-
* -
|
|
74
|
-
* -
|
|
75
|
-
* - If entity names are wrong, MUST contain renamed correct versions
|
|
76
|
-
* - If schemas are missing variants, MUST include the created variants
|
|
77
|
-
*
|
|
78
|
-
* FORBIDDEN:
|
|
66
|
+
* DO:
|
|
67
|
+
* - Include valid OpenAPI schema definitions
|
|
68
|
+
* - Include all entities that were in the original input
|
|
69
|
+
* - Provide fixed versions if original schemas have issues
|
|
70
|
+
* - Rename entities correctly if names are wrong
|
|
71
|
+
* - Include created variants if schemas are missing them
|
|
79
72
|
*
|
|
80
|
-
*
|
|
81
|
-
* -
|
|
82
|
-
* -
|
|
83
|
-
* -
|
|
73
|
+
* DO NOT:
|
|
74
|
+
* - Return an empty object {} (this will delete all schemas)
|
|
75
|
+
* - Return undefined or null
|
|
76
|
+
* - Include explanations or excuses in schema descriptions
|
|
77
|
+
* - Leave broken schemas unfixed
|
|
84
78
|
*
|
|
85
79
|
* When original schemas are beyond repair, recreate them properly based on
|
|
86
80
|
* entity names and context. This field becomes the final schemas used by
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
import { IValidation } from "typia";
|
|
3
|
+
export declare const validateAuthorizationSchema: (props: {
|
|
4
|
+
errors: IValidation.IError[];
|
|
5
|
+
schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
|
|
6
|
+
path: string;
|
|
7
|
+
}) => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AutoBeAssistantMessageHistory } from "@autobe/interface";
|
|
2
1
|
import { AutoBePrismaComponentsEvent } from "@autobe/interface/src/events/AutoBePrismaComponentsEvent";
|
|
3
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
export declare function orchestratePrismaComponents<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<
|
|
4
|
+
export declare function orchestratePrismaComponents<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<AutoBePrismaComponentsEvent>;
|
|
@@ -8,6 +8,7 @@ export declare function transformRealizeCorrectHistories(props: {
|
|
|
8
8
|
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
9
|
artifacts: IAutoBeTestScenarioArtifacts;
|
|
10
10
|
authorization: AutoBeRealizeAuthorization | null;
|
|
11
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
11
12
|
code: string;
|
|
12
13
|
diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
|
|
13
14
|
}): Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
export declare const transformRealizeWriteAuthorizationsHistories: (operation: AutoBeOpenApi.IOperation, payloads: Record<string, string>) => Array<IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -3,9 +3,12 @@ import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
|
3
3
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
4
|
import { IAutoBeTestScenarioArtifacts } from "../../test/structures/IAutoBeTestScenarioArtifacts";
|
|
5
5
|
import { IAutoBeRealizeScenarioApplication } from "../structures/IAutoBeRealizeScenarioApplication";
|
|
6
|
-
export declare const transformRealizeWriteHistories: (props:
|
|
6
|
+
export declare const transformRealizeWriteHistories: (props: IProps) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
7
|
+
interface IProps {
|
|
7
8
|
state: AutoBeState;
|
|
8
9
|
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
10
|
artifacts: IAutoBeTestScenarioArtifacts;
|
|
10
11
|
authorization: AutoBeRealizeAuthorization | null;
|
|
11
|
-
|
|
12
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AutoBeRealizeAuthorization, AutoBeRealizeFunction, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
4
|
+
export declare function compileRealizeFiles<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
|
+
authorizations: AutoBeRealizeAuthorization[];
|
|
6
|
+
functions: AutoBeRealizeFunction[];
|
|
7
|
+
}): Promise<IAutoBeTypeScriptCompileResult>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
5
|
-
export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
7
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
8
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
|
+
code: string;
|
|
10
|
+
diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
|
|
11
|
+
progress: AutoBeProgressEventBase;
|
|
12
|
+
}): Promise<AutoBeRealizeCorrectEvent>;
|
|
@@ -2,72 +2,6 @@ import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
5
|
-
export interface IAutoBeRealizeScenario {
|
|
6
|
-
/**
|
|
7
|
-
* The name of the function to be generated.
|
|
8
|
-
*
|
|
9
|
-
* Derived from the Swagger path and method. The function name must be written
|
|
10
|
-
* in snake_case. It serves as the entry point in both code generation and
|
|
11
|
-
* test code.
|
|
12
|
-
*
|
|
13
|
-
* Once the function is generated, the function name and file name will be the
|
|
14
|
-
* same. The generated file will be located at
|
|
15
|
-
* `src/providers/${function_name}.ts`.
|
|
16
|
-
*/
|
|
17
|
-
functionName: string;
|
|
18
|
-
/**
|
|
19
|
-
* Definition of path and query parameters extracted from the OpenAPI spec.
|
|
20
|
-
*
|
|
21
|
-
* Includes input values passed via URL path or query string. Used for type
|
|
22
|
-
* definitions, validation, and function signature construction.
|
|
23
|
-
*/
|
|
24
|
-
parameters: AutoBeOpenApi.IParameter[];
|
|
25
|
-
/**
|
|
26
|
-
* Schema definition for the request body input.
|
|
27
|
-
*
|
|
28
|
-
* Extracted from the requestBody section of Swagger. Represents the input
|
|
29
|
-
* data passed in the body (e.g., JSON). Used for generating function
|
|
30
|
-
* arguments or DTOs.
|
|
31
|
-
*/
|
|
32
|
-
inputSchema: AutoBeOpenApi.IRequestBody | null;
|
|
33
|
-
/**
|
|
34
|
-
* Schema definition for the response body.
|
|
35
|
-
*
|
|
36
|
-
* Extracted from the responses section of Swagger. Used to define the return
|
|
37
|
-
* type and expected output in test code.
|
|
38
|
-
*/
|
|
39
|
-
outputSchema: AutoBeOpenApi.IResponseBody | null;
|
|
40
|
-
/**
|
|
41
|
-
* Natural language description of the function’s purpose.
|
|
42
|
-
*
|
|
43
|
-
* Extracted from the summary or description field of Swagger. Used for code
|
|
44
|
-
* documentation, test scenario generation, and conveying function intent.
|
|
45
|
-
*/
|
|
46
|
-
description: string;
|
|
47
|
-
/**
|
|
48
|
-
* HTTP method information.
|
|
49
|
-
*
|
|
50
|
-
* Extracted from the Swagger operation method. Used to define the request
|
|
51
|
-
* type during code and test generation.
|
|
52
|
-
*/
|
|
53
|
-
method: "get" | "post" | "put" | "delete" | "patch";
|
|
54
|
-
/**
|
|
55
|
-
* List of scenario descriptions for test code generation.
|
|
56
|
-
*
|
|
57
|
-
* Each scenario describes the expected behavior of the function under certain
|
|
58
|
-
* conditions. Used as a basis for TDD-style automated test generation.
|
|
59
|
-
*/
|
|
60
|
-
testScenarios: string[];
|
|
61
|
-
/**
|
|
62
|
-
* Optional decorator event for customizing code generation behavior.
|
|
63
|
-
*
|
|
64
|
-
* Provides additional metadata or instructions that can modify how the
|
|
65
|
-
* function implementation is generated. Can include custom annotations,
|
|
66
|
-
* middleware configurations, or special handling directives that affect the
|
|
67
|
-
* final code output.
|
|
68
|
-
*/
|
|
69
|
-
decoratorEvent?: AutoBeRealizeAuthorization;
|
|
70
|
-
}
|
|
71
5
|
/**
|
|
72
6
|
* Generates a planning result that defines what kind of function should be
|
|
73
7
|
* created, based solely on the provided Swagger (OpenAPI) operation — without
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
5
|
-
export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
7
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
8
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
|
+
progress: AutoBeProgressEventBase;
|
|
10
|
+
promptCacheKey: string;
|
|
11
|
+
}): Promise<AutoBeRealizeWriteEvent>;
|
|
@@ -34,7 +34,7 @@ export declare namespace IAutoBeRealizeAuthorizationApplication {
|
|
|
34
34
|
* called by the decorator to verify JWT tokens and return authenticated
|
|
35
35
|
* user information for the specified role.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
37
|
+
* DO: Use camelCase naming convention.
|
|
38
38
|
*/
|
|
39
39
|
name: string & CamelPattern;
|
|
40
40
|
/**
|
|
@@ -55,7 +55,7 @@ export declare namespace IAutoBeRealizeAuthorizationApplication {
|
|
|
55
55
|
* authorize users for the specific role, injecting the authenticated user
|
|
56
56
|
* payload as a method parameter.
|
|
57
57
|
*
|
|
58
|
-
*
|
|
58
|
+
* DO: Use PascalCase naming convention.
|
|
59
59
|
*/
|
|
60
60
|
name: string & PascalPattern;
|
|
61
61
|
/**
|
|
@@ -75,7 +75,7 @@ export declare namespace IAutoBeRealizeAuthorizationApplication {
|
|
|
75
75
|
* authenticated user data that will be injected into Controller methods
|
|
76
76
|
* when using the decorator.
|
|
77
77
|
*
|
|
78
|
-
*
|
|
78
|
+
* DO: Use PascalCase naming convention.
|
|
79
79
|
*/
|
|
80
80
|
name: string & PascalPattern;
|
|
81
81
|
/**
|
|
@@ -12,16 +12,18 @@ export declare namespace IAutoBeRealizeWriteApplication {
|
|
|
12
12
|
* function according to the Realize Coder Agent specification. Before
|
|
13
13
|
* writing the actual code, think through the logic and structure.
|
|
14
14
|
*
|
|
15
|
-
* The plan
|
|
15
|
+
* The plan follows a SCHEMA-FIRST APPROACH:
|
|
16
16
|
*
|
|
17
|
-
* 📋 STEP 1 - PRISMA SCHEMA VERIFICATION
|
|
17
|
+
* 📋 STEP 1 - PRISMA SCHEMA VERIFICATION:
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
* -
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* DO:
|
|
20
|
+
* - Examine the actual Prisma schema model definition
|
|
21
|
+
* - List EVERY field that exists in the model with exact types
|
|
22
|
+
* - Explicitly note fields that DO NOT exist
|
|
23
|
+
*
|
|
24
|
+
* DO NOT:
|
|
25
|
+
* - Assume common fields exist without verification
|
|
26
|
+
* - Use fields like deleted_at, created_by, updated_by, is_deleted, is_active without checking
|
|
25
27
|
*
|
|
26
28
|
* 📋 STEP 2 - FIELD INVENTORY:
|
|
27
29
|
*
|
|
@@ -155,8 +157,9 @@ export declare namespace IAutoBeRealizeWriteApplication {
|
|
|
155
157
|
* Draft WITHOUT using native Date type.
|
|
156
158
|
*
|
|
157
159
|
* This is the initial drafting phase where you outline the basic skeleton
|
|
158
|
-
* of the function.
|
|
159
|
-
*
|
|
160
|
+
* of the function.
|
|
161
|
+
*
|
|
162
|
+
* DO NOT: Use the native Date type.
|
|
160
163
|
*
|
|
161
164
|
* - The function signature must correctly include `user`, `parameters`, and
|
|
162
165
|
* `body` arguments.
|
|
@@ -165,13 +168,13 @@ export declare namespace IAutoBeRealizeWriteApplication {
|
|
|
165
168
|
* - Mark any incomplete or missing parts clearly with placeholders (e.g.,
|
|
166
169
|
* comments or temporary values).
|
|
167
170
|
*
|
|
168
|
-
*
|
|
171
|
+
* Import rules:
|
|
172
|
+
*
|
|
173
|
+
* DO NOT:
|
|
174
|
+
* - Add any new import statements manually
|
|
175
|
+
* - Write import statements directly (this causes compile errors)
|
|
169
176
|
*
|
|
170
|
-
*
|
|
171
|
-
* - All necessary imports are provided globally or by the system
|
|
172
|
-
* automatically.
|
|
173
|
-
* - Writing import statements directly is prohibited and may cause compile
|
|
174
|
-
* errors. If import errors occur, check your environment configuration.
|
|
177
|
+
* Note: All necessary imports are provided globally or by the system automatically.
|
|
175
178
|
*
|
|
176
179
|
* ✅ Requirements:
|
|
177
180
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
-
|
|
3
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
+
export declare const transformTestScenarioHistories: (state: AutoBeState, entire: AutoBeOpenApi.IOperation[], include: AutoBeOpenApi.IOperation[], exclude: Pick<AutoBeOpenApi.IOperation, "method" | "path">[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -30,7 +30,7 @@ export declare namespace IAutoBeTestCorrectApplication {
|
|
|
30
30
|
* AI analyzes the original test scenario, business requirements, and
|
|
31
31
|
* intended functionality without being influenced by compilation errors.
|
|
32
32
|
* This clean analysis establishes a clear understanding of what the test
|
|
33
|
-
*
|
|
33
|
+
* accomplishes, the expected business workflow, and the correct API
|
|
34
34
|
* integration patterns.
|
|
35
35
|
*
|
|
36
36
|
* This step ensures that error correction doesn't lose sight of the
|
|
@@ -67,17 +67,18 @@ export declare namespace IAutoBeTestCorrectApplication {
|
|
|
67
67
|
* AI generates the first corrected version of the test code based on error
|
|
68
68
|
* analysis and correction strategies. This draft addresses all identified
|
|
69
69
|
* compilation errors while preserving the original business logic and test
|
|
70
|
-
* workflow. The code
|
|
71
|
-
*
|
|
70
|
+
* workflow. The code is compilation-error-free and follows all established
|
|
71
|
+
* conventions.
|
|
72
72
|
*
|
|
73
73
|
* The implementation incorporates lessons learned from error analysis to
|
|
74
74
|
* produce properly typed, syntactically correct code that maintains the
|
|
75
75
|
* intended test functionality. All type safety requirements and framework
|
|
76
|
-
* conventions
|
|
76
|
+
* conventions are followed in this corrected implementation.
|
|
77
77
|
*
|
|
78
78
|
* Workflow: Error correction → TypeScript implementation → Functional
|
|
79
|
-
* preservation
|
|
80
|
-
*
|
|
79
|
+
* preservation
|
|
80
|
+
*
|
|
81
|
+
* DO: Resolve all compilation errors while maintaining original test intent
|
|
81
82
|
*/
|
|
82
83
|
draft: string;
|
|
83
84
|
/**
|
|
@@ -57,7 +57,7 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
57
57
|
*
|
|
58
58
|
* ## Naming Convention
|
|
59
59
|
*
|
|
60
|
-
*
|
|
60
|
+
* DO: Use snake_case naming convention.
|
|
61
61
|
*
|
|
62
62
|
* - Must start with `test_api_` prefix (mandatory requirement)
|
|
63
63
|
* - ALWAYS start with business feature, NOT action verbs
|
|
@@ -32,8 +32,8 @@ export declare namespace IAutoBeTestWriteApplication {
|
|
|
32
32
|
*
|
|
33
33
|
* AI determines the appropriate domain category based on the scenario
|
|
34
34
|
* analysis. This classification drives file structure, test categorization,
|
|
35
|
-
* and logical grouping. The domain must be a single, lowercase word
|
|
36
|
-
* represents the primary API resource.
|
|
35
|
+
* and logical grouping. The domain must be a single, lowercase word in
|
|
36
|
+
* snake_case format that represents the primary API resource.
|
|
37
37
|
*
|
|
38
38
|
* Workflow: Scenario analysis → Domain identification → Test organization
|
|
39
39
|
* structure
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const executeCachedBatch: <T>(tasks: Array<(user: string) => Promise<T>>, promptCacheKey?: string) => Promise<T[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "AI backend server code generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agentica/core": "
|
|
23
|
+
"@agentica/core": "0.32.3-dev.3",
|
|
24
24
|
"@prisma/internals": "^6.7.0",
|
|
25
25
|
"@samchon/openapi": "^4.7.1",
|
|
26
26
|
"openai": "^5.12.2",
|
|
27
27
|
"tstl": "^3.0.0",
|
|
28
28
|
"typia": "^9.7.1",
|
|
29
29
|
"uuid": "^11.1.0",
|
|
30
|
-
"@autobe/interface": "^0.
|
|
31
|
-
"@autobe/utils": "^0.
|
|
30
|
+
"@autobe/interface": "^0.20.0",
|
|
31
|
+
"@autobe/utils": "^0.20.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"ts-node": "^10.9.2",
|
|
41
41
|
"ts-patch": "^3.3.0",
|
|
42
42
|
"typescript": "~5.9.2",
|
|
43
|
-
"@autobe/compiler": "^0.
|
|
44
|
-
"@autobe/filesystem": "^0.
|
|
43
|
+
"@autobe/compiler": "^0.20.0",
|
|
44
|
+
"@autobe/filesystem": "^0.20.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"ai",
|
package/src/AutoBeAgent.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "@autobe/interface";
|
|
14
14
|
import { ILlmSchema } from "@samchon/openapi";
|
|
15
15
|
import { Semaphore, Singleton } from "tstl";
|
|
16
|
-
import {
|
|
16
|
+
import { v7 } from "uuid";
|
|
17
17
|
|
|
18
18
|
import { AutoBeAgentBase } from "./AutoBeAgentBase";
|
|
19
19
|
import { AutoBeContext } from "./context/AutoBeContext";
|
|
@@ -197,10 +197,12 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
197
197
|
});
|
|
198
198
|
previous = current;
|
|
199
199
|
};
|
|
200
|
+
|
|
201
|
+
// SHIFT EVENTS
|
|
200
202
|
this.agentica_.on("assistantMessage", async (message) => {
|
|
201
203
|
const start = new Date();
|
|
202
204
|
const history: AutoBeAssistantMessageHistory = {
|
|
203
|
-
id:
|
|
205
|
+
id: v7(),
|
|
204
206
|
type: "assistantMessage",
|
|
205
207
|
text: await message.join(),
|
|
206
208
|
created_at: start.toISOString(),
|
|
@@ -210,6 +212,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
210
212
|
this.histories_.push(history);
|
|
211
213
|
this.dispatch({
|
|
212
214
|
type: "assistantMessage",
|
|
215
|
+
id: history.id,
|
|
213
216
|
text: history.text,
|
|
214
217
|
created_at: history.created_at,
|
|
215
218
|
}).catch(() => {});
|
|
@@ -220,6 +223,18 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
220
223
|
this.agentica_.on("request", (e) => {
|
|
221
224
|
if (e.body.parallel_tool_calls !== undefined)
|
|
222
225
|
delete e.body.parallel_tool_calls;
|
|
226
|
+
void this.dispatch({
|
|
227
|
+
...e,
|
|
228
|
+
type: "vendorRequest",
|
|
229
|
+
source: "facade",
|
|
230
|
+
}).catch(() => {});
|
|
231
|
+
});
|
|
232
|
+
this.agentica_.on("response", (e) => {
|
|
233
|
+
void this.dispatch({
|
|
234
|
+
...e,
|
|
235
|
+
type: "vendorResponse",
|
|
236
|
+
source: "facade",
|
|
237
|
+
}).catch(() => {});
|
|
223
238
|
});
|
|
224
239
|
}
|
|
225
240
|
|
|
@@ -239,7 +254,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
239
254
|
): Promise<AutoBeHistory[]> {
|
|
240
255
|
const index: number = this.histories_.length;
|
|
241
256
|
const userMessageHistory: AutoBeUserMessageHistory = {
|
|
242
|
-
id:
|
|
257
|
+
id: v7(),
|
|
243
258
|
type: "userMessage",
|
|
244
259
|
contents:
|
|
245
260
|
typeof content === "string"
|
package/src/AutoBeMockAgent.ts
CHANGED
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
IAutoBeAgent,
|
|
9
9
|
IAutoBeCompiler,
|
|
10
10
|
IAutoBeCompilerListener,
|
|
11
|
+
IAutoBePlaygroundReplay,
|
|
11
12
|
} from "@autobe/interface";
|
|
12
13
|
import { Singleton, randint, sleep_for } from "tstl";
|
|
13
|
-
import {
|
|
14
|
+
import { v7 } from "uuid";
|
|
14
15
|
|
|
15
16
|
import { AutoBeAgentBase } from "./AutoBeAgentBase";
|
|
16
17
|
import { AutoBeState } from "./context/AutoBeState";
|
|
@@ -49,7 +50,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
49
50
|
): Promise<AutoBeHistory[]> {
|
|
50
51
|
// THE USER-MESSAGE
|
|
51
52
|
const userMessage: AutoBeUserMessageHistory = {
|
|
52
|
-
id:
|
|
53
|
+
id: v7(),
|
|
53
54
|
type: "userMessage",
|
|
54
55
|
contents:
|
|
55
56
|
typeof content === "string"
|
|
@@ -71,7 +72,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
71
72
|
if (state.realize !== null) {
|
|
72
73
|
await sleep_for(2_000);
|
|
73
74
|
const assistantMessage: AutoBeAssistantMessageHistory = {
|
|
74
|
-
id:
|
|
75
|
+
id: v7(),
|
|
75
76
|
type: "assistantMessage",
|
|
76
77
|
text: [
|
|
77
78
|
"AutoBE has successfully realized the application.",
|
|
@@ -93,7 +94,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
93
94
|
if (snapshots === null) {
|
|
94
95
|
this.histories_.push(userMessage);
|
|
95
96
|
this.histories_.push({
|
|
96
|
-
id:
|
|
97
|
+
id: v7(),
|
|
97
98
|
type: "assistantMessage",
|
|
98
99
|
text: [
|
|
99
100
|
"The histories are prepared until current state.",
|
|
@@ -113,7 +114,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
113
114
|
}
|
|
114
115
|
this.histories_.push(userMessage);
|
|
115
116
|
this.histories_.push(
|
|
116
|
-
this.props_.
|
|
117
|
+
this.props_.replay.histories.find((h) => h.type === type)!,
|
|
117
118
|
);
|
|
118
119
|
};
|
|
119
120
|
if (state.analyze === null) await take("analyze");
|
|
@@ -135,7 +136,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
135
136
|
private getEventSnapshots(
|
|
136
137
|
state: "analyze" | "prisma" | "interface" | "test" | "realize",
|
|
137
138
|
): AutoBeEventSnapshot[] | null {
|
|
138
|
-
return this.props_.
|
|
139
|
+
return this.props_.replay[state] ?? null;
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
export namespace AutoBeMockAgent {
|
|
@@ -143,21 +144,18 @@ export namespace AutoBeMockAgent {
|
|
|
143
144
|
compiler: (
|
|
144
145
|
listener: IAutoBeCompilerListener,
|
|
145
146
|
) => IAutoBeCompiler | Promise<IAutoBeCompiler>;
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
export interface IPreset {
|
|
149
|
-
histories: AutoBeHistory[];
|
|
150
|
-
analyze?: AutoBeEventSnapshot[] | null;
|
|
151
|
-
prisma?: AutoBeEventSnapshot[] | null;
|
|
152
|
-
interface?: AutoBeEventSnapshot[] | null;
|
|
153
|
-
test?: AutoBeEventSnapshot[] | null;
|
|
154
|
-
realize?: AutoBeEventSnapshot[] | null;
|
|
147
|
+
replay: IAutoBePlaygroundReplay;
|
|
155
148
|
}
|
|
156
149
|
}
|
|
157
150
|
|
|
158
151
|
const sleepMap: Record<AutoBeEvent.Type, number> = {
|
|
159
152
|
userMessage: 1_000,
|
|
160
153
|
assistantMessage: 1_000,
|
|
154
|
+
vendorRequest: 0,
|
|
155
|
+
vendorResponse: 0,
|
|
156
|
+
jsonParseError: 0,
|
|
157
|
+
jsonValidateError: 0,
|
|
158
|
+
consentFunctionCall: 0,
|
|
161
159
|
// ANALYZE
|
|
162
160
|
analyzeStart: 1_000,
|
|
163
161
|
analyzeScenario: 1_000,
|