@autobe/agent 0.19.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent/src/AutoBeAgent.js +3 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.js +4 -3
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
- package/lib/agent/src/factory/consentFunctionCall.js +3 -2
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +11 -6
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.js → transformAnalyzeReviewHistories.js} +24 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +31 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +19 -5
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +9 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +11 -9
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -46
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +13 -13
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +23 -22
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +32 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +3 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +28 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +11 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +80 -54
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1635 -1180
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +30 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +178 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +54 -54
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +18 -29
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +37 -34
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +38 -25
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +3 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +2 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +3 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +19 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +28 -21
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +58 -56
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +12 -3
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +35 -30
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/{orchestrate/realize/internal/compile.d.ts → agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +6 -6
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +26 -12
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +9 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +3 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +12 -8
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +25 -21
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +44 -27
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +63 -60
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +118 -96
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -5
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +17 -8
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +30 -18
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +18 -18
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/index.mjs +3265 -1702
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
- package/lib/{agent/src/orchestrate/realize/internal/compile.d.ts → orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +4 -3
- package/src/AutoBeMockAgent.ts +5 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +12 -11
- package/src/context/AutoBeContext.ts +3 -0
- package/src/factory/consentFunctionCall.ts +4 -3
- package/src/factory/createAutoBeContext.ts +11 -7
- package/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.ts → transformAnalyzeReviewHistories.ts} +23 -30
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +60 -61
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +20 -13
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +20 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -11
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -48
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -19
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +31 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +4 -2
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +36 -29
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +18 -10
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +120 -10
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +82 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +57 -55
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +4 -2
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +26 -13
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +42 -40
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +17 -13
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +14 -5
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +35 -30
- package/src/orchestrate/realize/internal/{compile.ts → compileRealizeFiles.ts} +15 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +59 -40
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +19 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +10 -10
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +7 -77
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +6 -2
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +10 -5
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +2 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +50 -37
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +27 -7
- package/src/orchestrate/test/orchestrateTest.ts +7 -9
- package/src/orchestrate/test/orchestrateTestCorrect.ts +39 -25
- package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
- package/src/orchestrate/test/orchestrateTestWrite.ts +17 -18
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -74
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/src/orchestrate/test/histories/transformTestHistories.ts +0 -77
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeAnalyzeRole } from "@autobe/interface";
|
|
3
|
+
import { StringUtil } from "@autobe/utils";
|
|
3
4
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
-
import {
|
|
5
|
+
import { v7 } from "uuid";
|
|
5
6
|
|
|
6
7
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
8
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
@@ -16,33 +17,35 @@ export const transformRealizeAuthorizationHistories = <
|
|
|
16
17
|
> => {
|
|
17
18
|
return [
|
|
18
19
|
{
|
|
19
|
-
id:
|
|
20
|
+
id: v7(),
|
|
20
21
|
created_at: new Date().toISOString(),
|
|
21
22
|
type: "systemMessage",
|
|
22
23
|
text: AutoBeSystemPromptConstant.REALIZE_AUTHORIZATION,
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
id:
|
|
26
|
+
id: v7(),
|
|
26
27
|
created_at: new Date().toISOString(),
|
|
27
28
|
type: "systemMessage",
|
|
28
|
-
text:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
JSON.stringify(role)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
text: StringUtil.trim`
|
|
30
|
+
## Role
|
|
31
|
+
\`\`\`json
|
|
32
|
+
${JSON.stringify(role)}
|
|
33
|
+
\`\`\`
|
|
34
|
+
|
|
35
|
+
## Prisma Schema
|
|
36
|
+
|
|
37
|
+
\`\`\`json
|
|
38
|
+
${JSON.stringify(ctx.state().prisma?.schemas)}
|
|
39
|
+
\`\`\`
|
|
40
|
+
|
|
41
|
+
## Component Naming Convention
|
|
42
|
+
|
|
43
|
+
Please follow this naming convention for the authorization components:
|
|
44
|
+
|
|
45
|
+
- Provider Name: ${role.name}Authorize (e.g. ${role.name}Authorize)
|
|
46
|
+
- Decorator Name: ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Auth (e.g. ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Auth)
|
|
47
|
+
- Payload Name: ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Payload (e.g. ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Payload)
|
|
48
|
+
`,
|
|
46
49
|
},
|
|
47
50
|
];
|
|
48
51
|
};
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
AutoBeRealizeAuthorization,
|
|
4
4
|
IAutoBeTypeScriptCompileResult,
|
|
5
5
|
} from "@autobe/interface";
|
|
6
|
+
import { StringUtil } from "@autobe/utils";
|
|
6
7
|
import { ILlmSchema } from "@samchon/openapi";
|
|
7
|
-
import {
|
|
8
|
+
import { v7 } from "uuid";
|
|
8
9
|
|
|
9
10
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
10
11
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
@@ -21,26 +22,26 @@ export const transformRealizeAuthorizationCorrectHistories = <
|
|
|
21
22
|
> => {
|
|
22
23
|
return [
|
|
23
24
|
{
|
|
24
|
-
id:
|
|
25
|
+
id: v7(),
|
|
25
26
|
created_at: new Date().toISOString(),
|
|
26
27
|
type: "systemMessage",
|
|
27
28
|
text: AutoBeSystemPromptConstant.REALIZE_AUTHORIZATION,
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
|
-
id:
|
|
31
|
+
id: v7(),
|
|
31
32
|
created_at: new Date().toISOString(),
|
|
32
33
|
type: "systemMessage",
|
|
33
34
|
text: AutoBeSystemPromptConstant.REALIZE_AUTHORIZATION_CORRECT,
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
|
-
id:
|
|
37
|
+
id: v7(),
|
|
37
38
|
created_at: new Date().toISOString(),
|
|
38
39
|
type: "assistantMessage",
|
|
39
|
-
text:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
text: StringUtil.trim`
|
|
41
|
+
## Generated TypeScript Code
|
|
42
|
+
|
|
43
|
+
\`\`\`json
|
|
44
|
+
${JSON.stringify({
|
|
44
45
|
provider: {
|
|
45
46
|
location: auth.provider.location,
|
|
46
47
|
name: auth.provider.name,
|
|
@@ -56,38 +57,39 @@ export const transformRealizeAuthorizationCorrectHistories = <
|
|
|
56
57
|
name: auth.payload.name,
|
|
57
58
|
content: auth.payload.content,
|
|
58
59
|
},
|
|
59
|
-
} satisfies Omit<AutoBeRealizeAuthorization, "role">)}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Object.keys(templateFiles)
|
|
60
|
+
} satisfies Omit<AutoBeRealizeAuthorization, "role">)}
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
## Prisma Schema
|
|
64
|
+
|
|
65
|
+
\`\`\`json
|
|
66
|
+
${JSON.stringify(ctx.state().prisma?.schemas)}
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
## File Paths
|
|
70
|
+
|
|
71
|
+
${Object.keys(templateFiles)
|
|
71
72
|
.map((path) => `- ${path}`)
|
|
72
|
-
.join("\n")
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
JSON.stringify(diagnostics)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
73
|
+
.join("\n")}
|
|
74
|
+
|
|
75
|
+
## Compile Errors
|
|
76
|
+
|
|
77
|
+
Fix the compilation error in the provided code.
|
|
78
|
+
|
|
79
|
+
\`\`\`json
|
|
80
|
+
${JSON.stringify(diagnostics)}
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
## Component Naming Convention
|
|
84
|
+
|
|
85
|
+
If the name of the component is not correct, please correct it.
|
|
86
|
+
|
|
87
|
+
Please follow this naming convention for the authorization components:
|
|
88
|
+
|
|
89
|
+
- Provider Name: ${auth.role.name.toLowerCase()}Authorize (e.g. ${auth.role.name.toLowerCase()}Authorize)
|
|
90
|
+
- Decorator Name: ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Auth (e.g. ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Auth)
|
|
91
|
+
- Payload Name: ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Payload (e.g. ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Payload)
|
|
92
|
+
`,
|
|
91
93
|
},
|
|
92
94
|
];
|
|
93
95
|
};
|
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
AutoBeRealizeAuthorization,
|
|
4
4
|
IAutoBeTypeScriptCompileResult,
|
|
5
5
|
} from "@autobe/interface";
|
|
6
|
-
import {
|
|
6
|
+
import { StringUtil } from "@autobe/utils";
|
|
7
|
+
import { v7 } from "uuid";
|
|
7
8
|
|
|
8
9
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
9
10
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
@@ -25,22 +26,25 @@ export function transformRealizeCorrectHistories(props: {
|
|
|
25
26
|
return [
|
|
26
27
|
...transformRealizeWriteHistories(props),
|
|
27
28
|
{
|
|
28
|
-
id:
|
|
29
|
+
id: v7(),
|
|
29
30
|
type: "assistantMessage",
|
|
30
|
-
text:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
text: StringUtil.trim`
|
|
32
|
+
Below is the code you made before. It's also something to review.
|
|
33
|
+
|
|
34
|
+
\`\`\`typescript
|
|
35
|
+
${props.code}
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
The code has a compilation error:
|
|
39
|
+
|
|
40
|
+
\`\`\`json
|
|
41
|
+
${JSON.stringify(props.diagnostic)}
|
|
42
|
+
\`\`\`
|
|
43
|
+
`,
|
|
40
44
|
created_at: new Date().toISOString(),
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
|
-
id:
|
|
47
|
+
id: v7(),
|
|
44
48
|
type: "systemMessage",
|
|
45
49
|
text: AutoBeSystemPromptConstant.REALIZE_CORRECT,
|
|
46
50
|
created_at: new Date().toISOString(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
3
|
import { StringUtil } from "@autobe/utils";
|
|
4
|
-
import {
|
|
4
|
+
import { v7 } from "uuid";
|
|
5
5
|
|
|
6
6
|
export const transformRealizeWriteAuthorizationsHistories = (
|
|
7
7
|
operation: AutoBeOpenApi.IOperation,
|
|
@@ -12,7 +12,7 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
12
12
|
operation.authorizationType === "login"
|
|
13
13
|
? [
|
|
14
14
|
{
|
|
15
|
-
id:
|
|
15
|
+
id: v7(),
|
|
16
16
|
created_at: new Date().toISOString(),
|
|
17
17
|
type: "systemMessage" as const,
|
|
18
18
|
text: StringUtil.trim`
|
|
@@ -50,7 +50,10 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
50
50
|
**NOTE**: The jsonwebtoken library is automatically imported as jwt. Use it to generate tokens with the EXACT payload structure:
|
|
51
51
|
|
|
52
52
|
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
53
|
+
|
|
54
|
+
\`\`\`json
|
|
53
55
|
${JSON.stringify(payloads)}
|
|
56
|
+
\`\`\`
|
|
54
57
|
|
|
55
58
|
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
56
59
|
|
|
@@ -105,7 +108,7 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
105
108
|
operation.authorizationType === "join"
|
|
106
109
|
? [
|
|
107
110
|
{
|
|
108
|
-
id:
|
|
111
|
+
id: v7(),
|
|
109
112
|
created_at: new Date().toISOString(),
|
|
110
113
|
type: "systemMessage" as const,
|
|
111
114
|
text: StringUtil.trim`
|
|
@@ -151,7 +154,10 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
151
154
|
**NOTE**: The jsonwebtoken library is automatically imported as jwt. After successful registration, generate tokens with the EXACT payload structure:
|
|
152
155
|
|
|
153
156
|
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
157
|
+
|
|
158
|
+
\`\`\`json
|
|
154
159
|
${JSON.stringify(payloads)}
|
|
160
|
+
\`\`\`
|
|
155
161
|
|
|
156
162
|
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
157
163
|
|
|
@@ -195,7 +201,7 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
195
201
|
operation.authorizationType === "refresh"
|
|
196
202
|
? [
|
|
197
203
|
{
|
|
198
|
-
id:
|
|
204
|
+
id: v7(),
|
|
199
205
|
created_at: new Date().toISOString(),
|
|
200
206
|
type: "systemMessage" as const,
|
|
201
207
|
text: StringUtil.trim`
|
|
@@ -223,7 +229,10 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
223
229
|
3. Generate a new access token with THE SAME payload structure as the original
|
|
224
230
|
|
|
225
231
|
**CRITICAL**: Use the predefined payload structures for consistency:
|
|
232
|
+
|
|
233
|
+
\`\`\`json
|
|
226
234
|
${JSON.stringify(payloads)}
|
|
235
|
+
\`\`\`
|
|
227
236
|
|
|
228
237
|
// JWT is already imported: import jwt from "jsonwebtoken";
|
|
229
238
|
|
|
@@ -282,4 +291,4 @@ export const transformRealizeWriteAuthorizationsHistories = (
|
|
|
282
291
|
: [];
|
|
283
292
|
|
|
284
293
|
return [...loginGuide, ...joinGuide, ...refreshGuide];
|
|
285
|
-
};
|
|
294
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
3
|
-
import {
|
|
3
|
+
import { StringUtil } from "@autobe/utils";
|
|
4
|
+
import { v7 } from "uuid";
|
|
4
5
|
|
|
5
6
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
7
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
@@ -47,13 +48,16 @@ export const transformRealizeWriteHistories = (
|
|
|
47
48
|
|
|
48
49
|
const input =
|
|
49
50
|
propsFields.length > 0
|
|
50
|
-
?
|
|
51
|
+
? StringUtil.trim`
|
|
52
|
+
props: {
|
|
53
|
+
${propsFields.map((field) => ` ${field},`).join("\n")}
|
|
54
|
+
}`
|
|
51
55
|
: `// No props parameter needed - function should have no parameters`;
|
|
52
56
|
|
|
53
57
|
if (props.state.analyze === null)
|
|
54
58
|
return [
|
|
55
59
|
{
|
|
56
|
-
id:
|
|
60
|
+
id: v7(),
|
|
57
61
|
created_at: new Date().toISOString(),
|
|
58
62
|
type: "systemMessage",
|
|
59
63
|
text: [
|
|
@@ -66,7 +70,7 @@ export const transformRealizeWriteHistories = (
|
|
|
66
70
|
else if (props.state.prisma === null)
|
|
67
71
|
return [
|
|
68
72
|
{
|
|
69
|
-
id:
|
|
73
|
+
id: v7(),
|
|
70
74
|
created_at: new Date().toISOString(),
|
|
71
75
|
type: "systemMessage",
|
|
72
76
|
text: [
|
|
@@ -79,7 +83,7 @@ export const transformRealizeWriteHistories = (
|
|
|
79
83
|
else if (props.state.analyze.step !== props.state.prisma.step)
|
|
80
84
|
return [
|
|
81
85
|
{
|
|
82
|
-
id:
|
|
86
|
+
id: v7(),
|
|
83
87
|
created_at: new Date().toISOString(),
|
|
84
88
|
type: "systemMessage",
|
|
85
89
|
text: [
|
|
@@ -93,7 +97,7 @@ export const transformRealizeWriteHistories = (
|
|
|
93
97
|
else if (props.state.prisma.compiled.type !== "success")
|
|
94
98
|
return [
|
|
95
99
|
{
|
|
96
|
-
id:
|
|
100
|
+
id: v7(),
|
|
97
101
|
created_at: new Date().toISOString(),
|
|
98
102
|
type: "systemMessage",
|
|
99
103
|
text: [
|
|
@@ -107,7 +111,7 @@ export const transformRealizeWriteHistories = (
|
|
|
107
111
|
else if (props.state.interface === null)
|
|
108
112
|
return [
|
|
109
113
|
{
|
|
110
|
-
id:
|
|
114
|
+
id: v7(),
|
|
111
115
|
created_at: new Date().toISOString(),
|
|
112
116
|
type: "systemMessage",
|
|
113
117
|
text: [
|
|
@@ -125,14 +129,14 @@ export const transformRealizeWriteHistories = (
|
|
|
125
129
|
|
|
126
130
|
return [
|
|
127
131
|
{
|
|
128
|
-
id:
|
|
132
|
+
id: v7(),
|
|
129
133
|
created_at: new Date().toISOString(),
|
|
130
134
|
type: "systemMessage",
|
|
131
135
|
text: AutoBeSystemPromptConstant.REALIZE_WRITE_TOTAL,
|
|
132
136
|
},
|
|
133
137
|
...authorizationHistories,
|
|
134
138
|
{
|
|
135
|
-
id:
|
|
139
|
+
id: v7(),
|
|
136
140
|
created_at: new Date().toISOString(),
|
|
137
141
|
type: "systemMessage",
|
|
138
142
|
text: AutoBeSystemPromptConstant.REALIZE_WRITE_ARTIFACT.replaceAll(
|
|
@@ -144,33 +148,34 @@ export const transformRealizeWriteHistories = (
|
|
|
144
148
|
.replaceAll(`{input}`, input),
|
|
145
149
|
},
|
|
146
150
|
{
|
|
147
|
-
id:
|
|
151
|
+
id: v7(),
|
|
148
152
|
created_at: new Date().toISOString(),
|
|
149
153
|
type: "systemMessage",
|
|
150
|
-
text:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
text: StringUtil.trim`
|
|
155
|
+
Write new code based on the following operation.
|
|
156
|
+
|
|
157
|
+
\`\`\`json
|
|
158
|
+
${JSON.stringify(props.scenario)}
|
|
159
|
+
\`\`\`
|
|
160
|
+
`,
|
|
156
161
|
},
|
|
157
162
|
{
|
|
158
|
-
id:
|
|
163
|
+
id: v7(),
|
|
159
164
|
created_at: new Date().toISOString(),
|
|
160
165
|
type: "assistantMessage",
|
|
161
|
-
text:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
text: StringUtil.trim`
|
|
167
|
+
I understand your request.
|
|
168
|
+
|
|
169
|
+
To summarize:
|
|
170
|
+
- I must **never use the native \`Date\` type** in any code or type definitions.
|
|
171
|
+
- Instead, all date and datetime values must be handled as \`string & tags.Format<'date-time'>\`.
|
|
172
|
+
- This rule is **strict** and applies everywhere, including domain types, API inputs/outputs, and Prisma models.
|
|
173
|
+
- Even if a library or tool returns a \`Date\`, I must convert it to the correct string format before use.
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
|
|
177
|
+
I'll make sure to follow all these rules strictly. Let's proceed with this in mind.
|
|
178
|
+
`,
|
|
174
179
|
},
|
|
175
180
|
];
|
|
176
181
|
};
|
|
@@ -2,13 +2,15 @@ import {
|
|
|
2
2
|
AutoBeRealizeAuthorization,
|
|
3
3
|
AutoBeRealizeFunction,
|
|
4
4
|
AutoBeRealizeValidateEvent,
|
|
5
|
+
IAutoBeCompiler,
|
|
5
6
|
IAutoBeTypeScriptCompileResult,
|
|
6
7
|
} from "@autobe/interface";
|
|
7
8
|
import { ILlmSchema } from "@samchon/openapi";
|
|
9
|
+
import { v7 } from "uuid";
|
|
8
10
|
|
|
9
11
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
10
12
|
|
|
11
|
-
export async function
|
|
13
|
+
export async function compileRealizeFiles<Model extends ILlmSchema.Model>(
|
|
12
14
|
ctx: AutoBeContext<Model>,
|
|
13
15
|
props: {
|
|
14
16
|
authorizations: AutoBeRealizeAuthorization[];
|
|
@@ -19,11 +21,14 @@ export async function compile<Model extends ILlmSchema.Model>(
|
|
|
19
21
|
const payloads: Record<string, string> = Object.fromEntries(
|
|
20
22
|
props.authorizations.map((el) => [el.payload.location, el.payload.content]),
|
|
21
23
|
);
|
|
22
|
-
const compiler = await ctx.compiler();
|
|
23
|
-
const templateFiles
|
|
24
|
-
|
|
24
|
+
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
25
|
+
const templateFiles: Record<string, string> =
|
|
26
|
+
await compiler.realize.getTemplate();
|
|
27
|
+
const nodeModules: Record<string, string> =
|
|
28
|
+
prisma?.type === "success" ? prisma.nodeModules : {};
|
|
25
29
|
|
|
26
|
-
const filterTsFiles = (location: string) =>
|
|
30
|
+
const filterTsFiles = (location: string) =>
|
|
31
|
+
location.startsWith("src/") && location.endsWith(".ts");
|
|
27
32
|
|
|
28
33
|
const files: Record<string, string> = {
|
|
29
34
|
...nodeModules,
|
|
@@ -41,17 +46,17 @@ export async function compile<Model extends ILlmSchema.Model>(
|
|
|
41
46
|
),
|
|
42
47
|
};
|
|
43
48
|
|
|
44
|
-
const compiled =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
const compiled: IAutoBeTypeScriptCompileResult =
|
|
50
|
+
await compiler.typescript.compile({
|
|
51
|
+
files: files,
|
|
52
|
+
});
|
|
48
53
|
if (compiled.type === "success") {
|
|
49
54
|
return compiled;
|
|
50
|
-
} else if (compiled.type === "failure") {
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
const event: AutoBeRealizeValidateEvent = {
|
|
54
58
|
type: "realizeValidate",
|
|
59
|
+
id: v7(),
|
|
55
60
|
result: compiled,
|
|
56
61
|
files: Object.fromEntries(
|
|
57
62
|
compiled.type === "failure"
|
|
@@ -62,6 +67,5 @@ export async function compile<Model extends ILlmSchema.Model>(
|
|
|
62
67
|
created_at: new Date().toISOString(),
|
|
63
68
|
};
|
|
64
69
|
ctx.dispatch(event);
|
|
65
|
-
|
|
66
70
|
return compiled;
|
|
67
71
|
}
|