@autobe/agent 0.26.0 → 0.28.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/AutoBeAgent.d.ts +2 -1
- package/lib/AutoBeAgent.js +27 -7
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +2 -4
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -11
- package/lib/context/AutoBeContext.d.ts +4 -1
- package/lib/context/AutoBeTokenUsage.d.ts +1 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/context/assertSchemaModel.d.ts +1 -1
- package/lib/context/assertSchemaModel.js +4 -7
- package/lib/context/assertSchemaModel.js.map +1 -1
- package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
- package/lib/factory/createAutoBeContext.d.ts +2 -1
- package/lib/factory/createAutoBeContext.js +78 -27
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +24065 -12997
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +166 -87
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +639 -322
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +146 -76
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +168 -4
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
- package/lib/orchestrate/facade/createAutoBeFacadeController.js +1308 -0
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
- package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +15 -8
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +874 -49
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1858 -67
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +251 -133
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +257 -135
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +341 -227
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +761 -49
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +911 -50
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +207 -4
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +109 -2
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +5 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1904 -77
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1858 -67
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +23 -23
- package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +391 -197
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1168 -591
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +1186 -600
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +6 -3
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +2 -1
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +362 -180
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +399 -199
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +133 -4
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +171 -7
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +132 -3
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +2 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +134 -3
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +169 -4
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +257 -4
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -4
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +141 -3
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/utils/TokenUsageComputer.d.ts +5 -0
- package/lib/utils/TokenUsageComputer.js +29 -0
- package/lib/utils/TokenUsageComputer.js.map +1 -0
- package/package.json +10 -10
- package/src/AutoBeAgent.ts +40 -6
- package/src/AutoBeMockAgent.ts +2 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -11
- package/src/context/AutoBeContext.ts +8 -0
- package/src/context/AutoBeTokenUsage.ts +1 -1
- package/src/context/assertSchemaModel.ts +5 -8
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
- package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
- package/src/factory/createAutoBeContext.ts +96 -36
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +9 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +15 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -11
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +20 -3
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +136 -0
- package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +17 -6
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +16 -11
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +16 -13
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +19 -15
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +16 -2
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +13 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +11 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +24 -16
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +13 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +15 -10
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -10
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +9 -11
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +2 -1
- package/src/orchestrate/realize/orchestrateRealize.ts +3 -2
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +15 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +15 -10
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +14 -3
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +21 -6
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +13 -2
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
- package/src/orchestrate/test/orchestrateTest.ts +3 -2
- package/src/orchestrate/test/orchestrateTestCorrect.ts +14 -2
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +21 -3
- package/src/orchestrate/test/orchestrateTestScenario.ts +13 -2
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +13 -2
- package/src/orchestrate/test/orchestrateTestWrite.ts +13 -2
- package/src/utils/TokenUsageComputer.ts +35 -0
- package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js +0 -942
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/src/factory/createAutoBeApplication.ts +0 -123
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
- /package/lib/orchestrate/facade/{transformFacadeStateMessage.js → structures/transformFacadeStateMessage.js} +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.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": "0.
|
|
23
|
+
"@agentica/core": "^0.34.0",
|
|
24
24
|
"@prisma/internals": "^6.16.2",
|
|
25
|
-
"@samchon/openapi": "^
|
|
26
|
-
"openai": "^
|
|
25
|
+
"@samchon/openapi": "^5.0.0",
|
|
26
|
+
"openai": "^6.7.0",
|
|
27
27
|
"tstl": "^3.0.0",
|
|
28
|
-
"typia": "^
|
|
28
|
+
"typia": "^10.0.0",
|
|
29
29
|
"uuid": "^11.1.0",
|
|
30
|
-
"@autobe/interface": "^0.
|
|
31
|
-
"@autobe/utils": "^0.
|
|
30
|
+
"@autobe/interface": "^0.28.0",
|
|
31
|
+
"@autobe/utils": "^0.28.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"rollup": "^4.40.1",
|
|
40
40
|
"ts-node": "^10.9.2",
|
|
41
41
|
"ts-patch": "^3.3.0",
|
|
42
|
-
"typescript": "~5.9.
|
|
43
|
-
"@autobe/compiler": "^0.
|
|
44
|
-
"@autobe/filesystem": "^0.
|
|
42
|
+
"typescript": "~5.9.3",
|
|
43
|
+
"@autobe/compiler": "^0.28.0",
|
|
44
|
+
"@autobe/filesystem": "^0.28.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"ai",
|
package/src/AutoBeAgent.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AutoBeAssistantMessageHistory,
|
|
10
10
|
AutoBeHistory,
|
|
11
11
|
AutoBePhase,
|
|
12
|
+
AutoBeProcessAggregateCollection,
|
|
12
13
|
AutoBeUserMessageContent,
|
|
13
14
|
AutoBeUserMessageHistory,
|
|
14
15
|
IAutoBeAgent,
|
|
@@ -23,13 +24,14 @@ import { AutoBeConfigConstant } from "./constants/AutoBeConfigConstant";
|
|
|
23
24
|
import { AutoBeContext } from "./context/AutoBeContext";
|
|
24
25
|
import { AutoBeState } from "./context/AutoBeState";
|
|
25
26
|
import { AutoBeTokenUsage } from "./context/AutoBeTokenUsage";
|
|
27
|
+
import { AutoBeProcessAggregateFactory } from "./factory/AutoBeProcessAggregateFactory";
|
|
26
28
|
import { createAgenticaHistory } from "./factory/createAgenticaHistory";
|
|
27
|
-
import { createAutoBeController } from "./factory/createAutoBeApplication";
|
|
28
29
|
import { createAutoBeContext } from "./factory/createAutoBeContext";
|
|
29
30
|
import { createAutoBeState } from "./factory/createAutoBeState";
|
|
30
31
|
import { getCommonPrompt } from "./factory/getCommonPrompt";
|
|
31
32
|
import { supportMistral } from "./factory/supportMistral";
|
|
32
|
-
import {
|
|
33
|
+
import { createAutoBeFacadeController } from "./orchestrate/facade/createAutoBeFacadeController";
|
|
34
|
+
import { transformFacadeStateMessage } from "./orchestrate/facade/structures/transformFacadeStateMessage";
|
|
33
35
|
import { IAutoBeProps } from "./structures/IAutoBeProps";
|
|
34
36
|
import { randomBackoffStrategy } from "./utils/backoffRetry";
|
|
35
37
|
|
|
@@ -79,6 +81,9 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
79
81
|
/** @internal */
|
|
80
82
|
private readonly usage_: AutoBeTokenUsage;
|
|
81
83
|
|
|
84
|
+
/** @internal */
|
|
85
|
+
private readonly aggregates_: AutoBeProcessAggregateCollection;
|
|
86
|
+
|
|
82
87
|
/* -----------------------------------------------------------
|
|
83
88
|
CONSTRUCTOR
|
|
84
89
|
----------------------------------------------------------- */
|
|
@@ -129,9 +134,26 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
129
134
|
const compiler = new Singleton(async () =>
|
|
130
135
|
props.compiler(compilerListener),
|
|
131
136
|
);
|
|
137
|
+
|
|
138
|
+
// CONTEXT
|
|
139
|
+
this.aggregates_ = !!props.histories?.length
|
|
140
|
+
? AutoBeProcessAggregateFactory.reduce(
|
|
141
|
+
props.histories
|
|
142
|
+
.filter(
|
|
143
|
+
(h) =>
|
|
144
|
+
h.type === "analyze" ||
|
|
145
|
+
h.type === "prisma" ||
|
|
146
|
+
h.type === "interface" ||
|
|
147
|
+
h.type === "test" ||
|
|
148
|
+
h.type === "realize",
|
|
149
|
+
)
|
|
150
|
+
.map((h) => h.aggregates),
|
|
151
|
+
)
|
|
152
|
+
: AutoBeProcessAggregateFactory.createCollection();
|
|
132
153
|
this.context_ = createAutoBeContext({
|
|
133
154
|
model: props.model,
|
|
134
155
|
vendor: props.vendor,
|
|
156
|
+
aggregates: this.aggregates_,
|
|
135
157
|
config: {
|
|
136
158
|
backoffStrategy: randomBackoffStrategy,
|
|
137
159
|
...props.config,
|
|
@@ -144,6 +166,8 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
144
166
|
usage: () => this.usage_,
|
|
145
167
|
dispatch: (event) => this.dispatch(event),
|
|
146
168
|
});
|
|
169
|
+
|
|
170
|
+
// AGENTICA
|
|
147
171
|
this.agentica_ = new MicroAgentica({
|
|
148
172
|
vendor,
|
|
149
173
|
model: props.model,
|
|
@@ -159,15 +183,13 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
159
183
|
},
|
|
160
184
|
},
|
|
161
185
|
controllers: [
|
|
162
|
-
|
|
186
|
+
createAutoBeFacadeController({
|
|
163
187
|
model: props.model,
|
|
164
|
-
context: this.
|
|
188
|
+
context: this.getContext(),
|
|
165
189
|
}),
|
|
166
190
|
],
|
|
167
191
|
});
|
|
168
192
|
supportMistral(this.agentica_, props.vendor);
|
|
169
|
-
|
|
170
|
-
// HISTORIES MANIPULATION
|
|
171
193
|
this.agentica_.getHistories().push(
|
|
172
194
|
...this.histories_
|
|
173
195
|
.map((history) =>
|
|
@@ -310,6 +332,18 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
310
332
|
return this.usage_;
|
|
311
333
|
}
|
|
312
334
|
|
|
335
|
+
public getAggregates(
|
|
336
|
+
latest: boolean = false,
|
|
337
|
+
): AutoBeProcessAggregateCollection {
|
|
338
|
+
if (latest === false) return this.aggregates_;
|
|
339
|
+
const state: AutoBeState = this.context_.state();
|
|
340
|
+
return AutoBeProcessAggregateFactory.reduce(
|
|
341
|
+
[state.analyze, state.prisma, state.interface, state.test, state.realize]
|
|
342
|
+
.filter((x) => x !== null)
|
|
343
|
+
.map((x) => x.aggregates),
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
313
347
|
public getPhase(): AutoBePhase | null {
|
|
314
348
|
if (this.state_.analyze === null) return null;
|
|
315
349
|
else if (this.state_.realize?.step === this.state_.analyze.step)
|
package/src/AutoBeMockAgent.ts
CHANGED
|
@@ -190,10 +190,8 @@ const sleepMap: Record<AutoBeEvent.Type, number> = {
|
|
|
190
190
|
interfaceOperationReview: 400,
|
|
191
191
|
interfaceAuthorization: 400,
|
|
192
192
|
interfaceSchema: 400,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
interfaceSchemaContentReview: 400,
|
|
196
|
-
interfaceSchemaRename: 400,
|
|
193
|
+
interfaceSchemaReview: 200,
|
|
194
|
+
interfaceSchemaRename: 200,
|
|
197
195
|
interfaceComplement: 2_000,
|
|
198
196
|
interfaceComplete: 1_000,
|
|
199
197
|
interfacePrerequisite: 400,
|