@autobe/agent 0.0.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/LICENSE +21 -0
- package/lib/AutoBeAgent.d.ts +29 -0
- package/lib/AutoBeAgent.js +88 -0
- package/lib/AutoBeAgent.js.map +1 -0
- package/lib/context/AutoBeContext.d.ts +13 -0
- package/lib/context/AutoBeContext.js +3 -0
- package/lib/context/AutoBeContext.js.map +1 -0
- package/lib/context/AutoBeState.d.ts +8 -0
- package/lib/context/AutoBeState.js +3 -0
- package/lib/context/AutoBeState.js.map +1 -0
- package/lib/context/AutoBeTokenUsage.d.ts +2 -0
- package/lib/context/AutoBeTokenUsage.js +6 -0
- package/lib/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/context/IAutoBeApplication.d.ts +67 -0
- package/lib/context/IAutoBeApplication.js +3 -0
- package/lib/context/IAutoBeApplication.js.map +1 -0
- package/lib/context/IAutoBeApplicationProps.d.ts +6 -0
- package/lib/context/IAutoBeApplicationProps.js +3 -0
- package/lib/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/context/IAutoBeApplicationResult.js +3 -0
- package/lib/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/factory/transformRouteDocument.d.ts +3 -0
- package/lib/factory/transformRouteDocument.js +50 -0
- package/lib/factory/transformRouteDocument.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +49 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +1548 -0
- package/lib/index.mjs.map +1 -0
- package/lib/internal/createAutoBeApplication.d.ts +7 -0
- package/lib/internal/createAutoBeApplication.js +1452 -0
- package/lib/internal/createAutoBeApplication.js.map +1 -0
- package/lib/internal/createAutoBeState.d.ts +3 -0
- package/lib/internal/createAutoBeState.js +16 -0
- package/lib/internal/createAutoBeState.js.map +1 -0
- package/lib/internal/transformAgenticaHistory.d.ts +7 -0
- package/lib/internal/transformAgenticaHistory.js +27 -0
- package/lib/internal/transformAgenticaHistory.js.map +1 -0
- package/lib/orchestrate/index.d.ts +5 -0
- package/lib/orchestrate/index.js +14 -0
- package/lib/orchestrate/index.js.map +1 -0
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +2 -0
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +1 -0
- package/lib/orchestrate/orchestrateAnalyze.d.ts +8 -0
- package/lib/orchestrate/orchestrateAnalyze.js +22 -0
- package/lib/orchestrate/orchestrateAnalyze.js.map +1 -0
- package/lib/orchestrate/orchestrateInterface.d.ts +8 -0
- package/lib/orchestrate/orchestrateInterface.js +22 -0
- package/lib/orchestrate/orchestrateInterface.js.map +1 -0
- package/lib/orchestrate/orchestratePrisma.d.ts +8 -0
- package/lib/orchestrate/orchestratePrisma.js +22 -0
- package/lib/orchestrate/orchestratePrisma.js.map +1 -0
- package/lib/orchestrate/orchestrateRealize.d.ts +5 -0
- package/lib/orchestrate/orchestrateRealize.js +19 -0
- package/lib/orchestrate/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/orchestrateTest.d.ts +5 -0
- package/lib/orchestrate/orchestrateTest.js +19 -0
- package/lib/orchestrate/orchestrateTest.js.map +1 -0
- package/lib/structures/IAutoBeConfig.d.ts +24 -0
- package/lib/structures/IAutoBeConfig.js +3 -0
- package/lib/structures/IAutoBeConfig.js.map +1 -0
- package/lib/structures/IAutoBeProps.d.ts +11 -0
- package/lib/structures/IAutoBeProps.js +3 -0
- package/lib/structures/IAutoBeProps.js.map +1 -0
- package/lib/structures/IAutoBeVendor.d.ts +2 -0
- package/lib/structures/IAutoBeVendor.js +3 -0
- package/lib/structures/IAutoBeVendor.js.map +1 -0
- package/package.json +67 -0
- package/src/AutoBeAgent.ts +101 -0
- package/src/context/AutoBeContext.ts +15 -0
- package/src/context/AutoBeState.ts +15 -0
- package/src/context/AutoBeTokenUsage.ts +3 -0
- package/src/context/IAutoBeApplication.ts +72 -0
- package/src/context/IAutoBeApplicationProps.ts +6 -0
- package/src/context/IAutoBeApplicationResult.ts +4 -0
- package/src/factory/transformRouteDocument.ts +49 -0
- package/src/index.ts +12 -0
- package/src/internal/createAutoBeApplication.ts +47 -0
- package/src/internal/createAutoBeState.ts +14 -0
- package/src/internal/transformAgenticaHistory.ts +54 -0
- package/src/orchestrate/index.ts +5 -0
- package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
- package/src/orchestrate/orchestrateAnalyze.ts +21 -0
- package/src/orchestrate/orchestrateInterface.ts +21 -0
- package/src/orchestrate/orchestratePrisma.ts +21 -0
- package/src/orchestrate/orchestrateRealize.ts +18 -0
- package/src/orchestrate/orchestrateTest.ts +18 -0
- package/src/structures/IAutoBeConfig.ts +25 -0
- package/src/structures/IAutoBeProps.ts +13 -0
- package/src/structures/IAutoBeVendor.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAutoBeApplication.js","sourceRoot":"","sources":["../../src/internal/createAutoBeApplication.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAutoBeState = void 0;
|
|
4
|
+
const createAutoBeState = (histories) => {
|
|
5
|
+
var _a, _b, _c, _d, _e;
|
|
6
|
+
const reversed = histories.slice().reverse();
|
|
7
|
+
return {
|
|
8
|
+
analyze: (_a = reversed.find((h) => h.type === "analyze")) !== null && _a !== void 0 ? _a : null,
|
|
9
|
+
prisma: (_b = reversed.find((h) => h.type === "prisma")) !== null && _b !== void 0 ? _b : null,
|
|
10
|
+
interface: (_c = reversed.find((h) => h.type === "interface")) !== null && _c !== void 0 ? _c : null,
|
|
11
|
+
test: (_d = reversed.find((h) => h.type === "test")) !== null && _d !== void 0 ? _d : null,
|
|
12
|
+
realize: (_e = reversed.find((h) => h.type === "realize")) !== null && _e !== void 0 ? _e : null,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.createAutoBeState = createAutoBeState;
|
|
16
|
+
//# sourceMappingURL=createAutoBeState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAutoBeState.js","sourceRoot":"","sources":["../../src/internal/createAutoBeState.ts"],"names":[],"mappings":";;;AAIO,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAAe,EAAE;;IAC3E,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;IAC7C,OAAO;QACL,OAAO,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,mCAAI,IAAI;QAC3D,MAAM,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,mCAAI,IAAI;QACzD,SAAS,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,mCAAI,IAAI;QAC/D,IAAI,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,mCAAI,IAAI;QACrD,OAAO,EAAE,MAAA,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,mCAAI,IAAI;KAC5D,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgenticaOperation, MicroAgenticaHistory } from "@agentica/core";
|
|
2
|
+
import { AutoBeHistory } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
export declare function transformAgenticaHistory<Model extends ILlmSchema.Model>(props: {
|
|
5
|
+
operations: readonly AgenticaOperation<Model>[];
|
|
6
|
+
history: AutoBeHistory;
|
|
7
|
+
}): MicroAgenticaHistory<Model> | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformAgenticaHistory = transformAgenticaHistory;
|
|
4
|
+
function transformAgenticaHistory(props) {
|
|
5
|
+
if (props.history.type === "userMessage")
|
|
6
|
+
return Object.assign(Object.assign({}, props.history), { toJSON: () => props.history });
|
|
7
|
+
else if (props.history.type === "assistantMessage")
|
|
8
|
+
return Object.assign(Object.assign({}, props.history), { toJSON: () => props.history });
|
|
9
|
+
const operation = props.operations.find((op) => op.function.name === props.history.type);
|
|
10
|
+
if (operation === undefined)
|
|
11
|
+
return null;
|
|
12
|
+
const partial = {
|
|
13
|
+
id: props.history.id,
|
|
14
|
+
type: "execute",
|
|
15
|
+
arguments: {
|
|
16
|
+
reason: props.history.reason,
|
|
17
|
+
},
|
|
18
|
+
value: {
|
|
19
|
+
success: props.history.type === "analyze" || props.history.type === "interface"
|
|
20
|
+
? true
|
|
21
|
+
: props.history.result.type === "success",
|
|
22
|
+
description: props.history.description,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
return Object.assign(Object.assign({}, partial), { protocol: operation.protocol, operation: operation, toJSON: () => (Object.assign(Object.assign({}, partial), { protocol: operation.protocol, operation: operation.toJSON() })) });
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=transformAgenticaHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformAgenticaHistory.js","sourceRoot":"","sources":["../../src/internal/transformAgenticaHistory.ts"],"names":[],"mappings":";;AAQA,4DA6CC;AA7CD,SAAgB,wBAAwB,CAEtC,KAGD;IACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa;QACtC,uCACK,KAAK,CAAC,OAAO,KAChB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAmC,IACvD;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,kBAAkB;QAChD,uCACK,KAAK,CAAC,OAAO,KAChB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAwC,IAC5D;IAEJ,MAAM,SAAS,GAAyC,KAAK,CAAC,UAAU,CAAC,IAAI,CAC3E,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,CAChD,CAAC;IACF,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE;QACpB,IAAI,EAAE,SAAkB;QACxB,SAAS,EAAE;YACT,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;SAC7B;QACD,KAAK,EAAE;YACL,OAAO,EACL,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBACpE,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YAC7C,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACvC;KACF,CAAC;IACF,uCACK,OAAO,KACV,QAAQ,EAAE,SAAS,CAAC,QAAmB,EACvC,SAAS,EAAE,SAA2C,EACtD,MAAM,EAAE,GAAG,EAAE,CAAC,iCACT,OAAO,KACV,QAAQ,EAAE,SAAS,CAAC,QAAmB,EACvC,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAC7B,IACF;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { orchestrateAnalyze as analyze } from "./orchestrateAnalyze";
|
|
2
|
+
export { orchestrateInterface as interface } from "./orchestrateInterface";
|
|
3
|
+
export { orchestratePrisma as prisma } from "./orchestratePrisma";
|
|
4
|
+
export { orchestrateTest as test } from "./orchestrateTest";
|
|
5
|
+
export { orchestrateRealize as realize } from "./orchestrateRealize";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.realize = exports.test = exports.prisma = exports.interface = exports.analyze = void 0;
|
|
4
|
+
var orchestrateAnalyze_1 = require("./orchestrateAnalyze");
|
|
5
|
+
Object.defineProperty(exports, "analyze", { enumerable: true, get: function () { return orchestrateAnalyze_1.orchestrateAnalyze; } });
|
|
6
|
+
var orchestrateInterface_1 = require("./orchestrateInterface");
|
|
7
|
+
Object.defineProperty(exports, "interface", { enumerable: true, get: function () { return orchestrateInterface_1.orchestrateInterface; } });
|
|
8
|
+
var orchestratePrisma_1 = require("./orchestratePrisma");
|
|
9
|
+
Object.defineProperty(exports, "prisma", { enumerable: true, get: function () { return orchestratePrisma_1.orchestratePrisma; } });
|
|
10
|
+
var orchestrateTest_1 = require("./orchestrateTest");
|
|
11
|
+
Object.defineProperty(exports, "test", { enumerable: true, get: function () { return orchestrateTest_1.orchestrateTest; } });
|
|
12
|
+
var orchestrateRealize_1 = require("./orchestrateRealize");
|
|
13
|
+
Object.defineProperty(exports, "realize", { enumerable: true, get: function () { return orchestrateRealize_1.orchestrateRealize; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestrate/index.ts"],"names":[],"mappings":";;;AAAA,2DAAqE;AAA5D,6GAAA,kBAAkB,OAAW;AACtC,+DAA2E;AAAlE,iHAAA,oBAAoB,OAAa;AAC1C,yDAAkE;AAAzD,2GAAA,iBAAiB,OAAU;AACpC,qDAA4D;AAAnD,uGAAA,eAAe,OAAQ;AAChC,2DAAqE;AAA5D,6GAAA,kBAAkB,OAAW"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeInterfaceAgent.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/AutoBeInterfaceAgent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AutoBeAnalyzeHistory, AutoBeAssistantMessageHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
+
/**
|
|
6
|
+
* @todo Kakasoo
|
|
7
|
+
*/
|
|
8
|
+
export declare const orchestrateAnalyze: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeAnalyzeHistory>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.orchestrateAnalyze = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* @todo Kakasoo
|
|
15
|
+
*/
|
|
16
|
+
const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
ctx;
|
|
18
|
+
props;
|
|
19
|
+
return null;
|
|
20
|
+
});
|
|
21
|
+
exports.orchestrateAnalyze = orchestrateAnalyze;
|
|
22
|
+
//# sourceMappingURL=orchestrateAnalyze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateAnalyze.js","sourceRoot":"","sources":["../../src/orchestrate/orchestrateAnalyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA;;GAEG;AACI,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;IACjE,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,kBAAkB,sBAQ3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AutoBeAnalyzeHistory, AutoBeAssistantMessageHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
+
/**
|
|
6
|
+
* @todo Samchon
|
|
7
|
+
*/
|
|
8
|
+
export declare const orchestrateInterface: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeAnalyzeHistory>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.orchestrateInterface = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* @todo Samchon
|
|
15
|
+
*/
|
|
16
|
+
const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
ctx;
|
|
18
|
+
props;
|
|
19
|
+
return null;
|
|
20
|
+
});
|
|
21
|
+
exports.orchestrateInterface = orchestrateInterface;
|
|
22
|
+
//# sourceMappingURL=orchestrateInterface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateInterface.js","sourceRoot":"","sources":["../../src/orchestrate/orchestrateInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA;;GAEG;AACI,MAAM,oBAAoB,GAC/B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;IACjE,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,oBAAoB,wBAQ7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AutoBeAssistantMessageHistory, AutoBePrismaHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
+
/**
|
|
6
|
+
* @todo Michael
|
|
7
|
+
*/
|
|
8
|
+
export declare const orchestratePrisma: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBePrismaHistory>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.orchestratePrisma = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* @todo Michael
|
|
15
|
+
*/
|
|
16
|
+
const orchestratePrisma = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
ctx;
|
|
18
|
+
props;
|
|
19
|
+
return null;
|
|
20
|
+
});
|
|
21
|
+
exports.orchestratePrisma = orchestratePrisma;
|
|
22
|
+
//# sourceMappingURL=orchestratePrisma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestratePrisma.js","sourceRoot":"","sources":["../../src/orchestrate/orchestratePrisma.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA;;GAEG;AACI,MAAM,iBAAiB,GAC5B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACgC,EAAE;IAChE,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,iBAAiB,qBAQ1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AutoBeAssistantMessageHistory, AutoBeRealizeHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
+
export declare const orchestrateRealize: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeRealizeHistory>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.orchestrateRealize = void 0;
|
|
13
|
+
const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
ctx;
|
|
15
|
+
props;
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
exports.orchestrateRealize = orchestrateRealize;
|
|
19
|
+
//# sourceMappingURL=orchestrateRealize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../src/orchestrate/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AASO,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;IACjE,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,kBAAkB,sBAQ3B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AutoBeAssistantMessageHistory, AutoBeTestHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
+
export declare const orchestrateTest: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeTestHistory>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.orchestrateTest = void 0;
|
|
13
|
+
const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
ctx;
|
|
15
|
+
props;
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
exports.orchestrateTest = orchestrateTest;
|
|
19
|
+
//# sourceMappingURL=orchestrateTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateTest.js","sourceRoot":"","sources":["../../src/orchestrate/orchestrateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;AASO,MAAM,eAAe,GAC1B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EAC8B,EAAE;IAC9D,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,eAAe,mBAQxB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface IAutoBeConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Locale of the A.I. chatbot.
|
|
4
|
+
*
|
|
5
|
+
* If you configure this property, the A.I. chatbot will conversate with
|
|
6
|
+
* the given locale. You can get the locale value by
|
|
7
|
+
*
|
|
8
|
+
* - Browser: `navigator.language`
|
|
9
|
+
* - NodeJS: `process.env.LANG.split(".")[0]`
|
|
10
|
+
*
|
|
11
|
+
* @default your_locale
|
|
12
|
+
*/
|
|
13
|
+
locale?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Timezone of the A.I. chatbot.
|
|
16
|
+
*
|
|
17
|
+
* If you configure this property, the A.I. chatbot will consider the
|
|
18
|
+
* given timezone. You can get the timezone value by
|
|
19
|
+
* `Intl.DateTimeFormat().resolvedOptions().timeZone`.
|
|
20
|
+
*
|
|
21
|
+
* @default your_timezone
|
|
22
|
+
*/
|
|
23
|
+
timezone?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeConfig.js","sourceRoot":"","sources":["../../src/structures/IAutoBeConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AutoBeHistory, IAutoBeCompiler } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { IAutoBeConfig } from "./IAutoBeConfig";
|
|
4
|
+
import { IAutoBeVendor } from "./IAutoBeVendor";
|
|
5
|
+
export interface IAutoBeProps<Model extends ILlmSchema.Model> {
|
|
6
|
+
model: Model;
|
|
7
|
+
vendor: IAutoBeVendor;
|
|
8
|
+
compiler: IAutoBeCompiler;
|
|
9
|
+
histories?: AutoBeHistory[] | undefined;
|
|
10
|
+
config?: IAutoBeConfig | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeProps.js","sourceRoot":"","sources":["../../src/structures/IAutoBeProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeVendor.js","sourceRoot":"","sources":["../../src/structures/IAutoBeVendor.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autobe/agent",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "AI backend server code generator",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"author": "Wrtn Technologies",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib",
|
|
10
|
+
"src",
|
|
11
|
+
"package.json",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@agentica/core": "^0.25.0",
|
|
17
|
+
"@samchon/openapi": "^4.3.0",
|
|
18
|
+
"openai": "^4.80.0",
|
|
19
|
+
"typia": "^9.3.0",
|
|
20
|
+
"@autobe/interface": "^0.0.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
24
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
25
|
+
"rimraf": "^6.0.1",
|
|
26
|
+
"rollup": "^4.40.1",
|
|
27
|
+
"ts-patch": "^3.3.0",
|
|
28
|
+
"typescript": "~5.8.3"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"ai",
|
|
32
|
+
"api",
|
|
33
|
+
"api-design",
|
|
34
|
+
"auto-generation",
|
|
35
|
+
"autobe",
|
|
36
|
+
"automation",
|
|
37
|
+
"backend",
|
|
38
|
+
"backend-development",
|
|
39
|
+
"code-generation",
|
|
40
|
+
"documentation",
|
|
41
|
+
"e2e-testing",
|
|
42
|
+
"erd",
|
|
43
|
+
"nestjs",
|
|
44
|
+
"openapi",
|
|
45
|
+
"orm",
|
|
46
|
+
"postgres",
|
|
47
|
+
"postgresql",
|
|
48
|
+
"prisma",
|
|
49
|
+
"requirements-analysis",
|
|
50
|
+
"rest",
|
|
51
|
+
"server",
|
|
52
|
+
"spiral-model",
|
|
53
|
+
"swagger",
|
|
54
|
+
"testing",
|
|
55
|
+
"typescript",
|
|
56
|
+
"vibe-coding",
|
|
57
|
+
"waterfall"
|
|
58
|
+
],
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "rimraf lib && rollup -c && tsc",
|
|
64
|
+
"dev": "rimraf lib && tsc --watch"
|
|
65
|
+
},
|
|
66
|
+
"typings": "lib/index.d.ts"
|
|
67
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { MicroAgentica } from "@agentica/core";
|
|
2
|
+
import { AutoBeHistory, AutoBeUserMessageContent } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
|
|
5
|
+
import { AutoBeContext } from "./context/AutoBeContext";
|
|
6
|
+
import { AutoBeState } from "./context/AutoBeState";
|
|
7
|
+
import { AutoBeTokenUsage } from "./context/AutoBeTokenUsage";
|
|
8
|
+
import { createAutoBeController } from "./internal/createAutoBeApplication";
|
|
9
|
+
import { createAutoBeState } from "./internal/createAutoBeState";
|
|
10
|
+
import { transformAgenticaHistory } from "./internal/transformAgenticaHistory";
|
|
11
|
+
import { IAutoBeProps } from "./structures/IAutoBeProps";
|
|
12
|
+
|
|
13
|
+
export class AutoBeAgent<Model extends ILlmSchema.Model> {
|
|
14
|
+
private readonly agentica_: MicroAgentica<Model>;
|
|
15
|
+
private readonly histories_: AutoBeHistory[];
|
|
16
|
+
private readonly context_: AutoBeContext<Model>;
|
|
17
|
+
private readonly state_: AutoBeState;
|
|
18
|
+
|
|
19
|
+
/* -----------------------------------------------------------
|
|
20
|
+
CONSTRUCTOR
|
|
21
|
+
----------------------------------------------------------- */
|
|
22
|
+
/**
|
|
23
|
+
* Initializer constructor.
|
|
24
|
+
*
|
|
25
|
+
* @param props Properties to construct the agent
|
|
26
|
+
*/
|
|
27
|
+
public constructor(private readonly props: IAutoBeProps<Model>) {
|
|
28
|
+
this.histories_ = props.histories?.slice() ?? [];
|
|
29
|
+
this.state_ = createAutoBeState(this.histories_);
|
|
30
|
+
this.context_ = {
|
|
31
|
+
model: props.model,
|
|
32
|
+
vendor: props.vendor,
|
|
33
|
+
compiler: props.compiler,
|
|
34
|
+
histories: this.histories_,
|
|
35
|
+
usage: () => this.agentica_.getTokenUsage(),
|
|
36
|
+
state: () => this.state_,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
this.agentica_ = new MicroAgentica({
|
|
40
|
+
model: props.model,
|
|
41
|
+
vendor: props.vendor,
|
|
42
|
+
config: {
|
|
43
|
+
...(props.config ?? {}),
|
|
44
|
+
executor: {
|
|
45
|
+
describe: null,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
controllers: [
|
|
49
|
+
createAutoBeController({
|
|
50
|
+
model: props.model,
|
|
51
|
+
context: this.context_,
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
});
|
|
55
|
+
this.agentica_.getHistories().push(
|
|
56
|
+
...this.histories_
|
|
57
|
+
.map((history) =>
|
|
58
|
+
transformAgenticaHistory({
|
|
59
|
+
operations: this.agentica_.getOperations(),
|
|
60
|
+
history,
|
|
61
|
+
}),
|
|
62
|
+
)
|
|
63
|
+
.filter((h) => h !== null),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
public clone(): AutoBeAgent<Model> {
|
|
71
|
+
return new AutoBeAgent<Model>({
|
|
72
|
+
...this.props,
|
|
73
|
+
histories: this.histories_.slice(),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* -----------------------------------------------------------
|
|
78
|
+
ACCESSORS
|
|
79
|
+
----------------------------------------------------------- */
|
|
80
|
+
public async conversate(
|
|
81
|
+
content: string | AutoBeUserMessageContent | AutoBeUserMessageContent[],
|
|
82
|
+
): Promise<AutoBeHistory[]> {
|
|
83
|
+
content;
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public getHistories(): AutoBeHistory[] {
|
|
88
|
+
return this.histories_;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public getTokenUsage(): AutoBeTokenUsage {
|
|
92
|
+
return this.agentica_.getTokenUsage();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
public getContext(): AutoBeContext<Model> {
|
|
99
|
+
return this.context_;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AutoBeHistory, IAutoBeCompiler } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
|
|
4
|
+
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
5
|
+
import { AutoBeState } from "./AutoBeState";
|
|
6
|
+
import { AutoBeTokenUsage } from "./AutoBeTokenUsage";
|
|
7
|
+
|
|
8
|
+
export interface AutoBeContext<Model extends ILlmSchema.Model> {
|
|
9
|
+
model: Model;
|
|
10
|
+
vendor: IAutoBeVendor;
|
|
11
|
+
compiler: IAutoBeCompiler;
|
|
12
|
+
histories: AutoBeHistory[];
|
|
13
|
+
usage: () => AutoBeTokenUsage;
|
|
14
|
+
state: () => AutoBeState;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeAnalyzeHistory,
|
|
3
|
+
AutoBeInterfaceHistory,
|
|
4
|
+
AutoBePrismaHistory,
|
|
5
|
+
AutoBeRealizeHistory,
|
|
6
|
+
AutoBeTestHistory,
|
|
7
|
+
} from "@autobe/interface";
|
|
8
|
+
|
|
9
|
+
export interface AutoBeState {
|
|
10
|
+
analyze: AutoBeAnalyzeHistory | null;
|
|
11
|
+
prisma: AutoBePrismaHistory | null;
|
|
12
|
+
interface: AutoBeInterfaceHistory | null;
|
|
13
|
+
test: AutoBeTestHistory | null;
|
|
14
|
+
realize: AutoBeRealizeHistory | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IAutoBeApplicationProps } from "./IAutoBeApplicationProps";
|
|
2
|
+
import { IAutoBeApplicationResult } from "./IAutoBeApplicationResult";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Application for AutoBE function calling.
|
|
6
|
+
*
|
|
7
|
+
* @author Samchon
|
|
8
|
+
*/
|
|
9
|
+
export interface IAutoBeApplication {
|
|
10
|
+
/**
|
|
11
|
+
* Run Analyze Agent.
|
|
12
|
+
*
|
|
13
|
+
* Analyze agent analyzes requirements and creates specification
|
|
14
|
+
* documents.
|
|
15
|
+
*
|
|
16
|
+
* The Analyze agent serves as the foundation of the entire development
|
|
17
|
+
* process. It not only captures initial requirements but also
|
|
18
|
+
* continuously refines understanding through iterative conversation
|
|
19
|
+
* with users. When requirements are ambiguous or incomplete, it
|
|
20
|
+
* proactively formulates targeted questions to elicit necessary
|
|
21
|
+
* information before proceeding with development.
|
|
22
|
+
*
|
|
23
|
+
* Additionally, once other agents have generated code, the Analyze
|
|
24
|
+
* agent can interpret change requests in the context of existing
|
|
25
|
+
* implementations, assessing the impact and feasibility of modifications
|
|
26
|
+
* while maintaining system integrity. This comprehensive approach
|
|
27
|
+
* ensures that all subsequent development stages work from a clear,
|
|
28
|
+
* complete, and consistent specification.
|
|
29
|
+
*/
|
|
30
|
+
analyze(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Run prisma agent.
|
|
34
|
+
*
|
|
35
|
+
* Prisma agent analyzes requirements specifications to generate
|
|
36
|
+
* database schemas in Prisma format.
|
|
37
|
+
*
|
|
38
|
+
* The Prisma agent references the requirements specification document
|
|
39
|
+
* created by the {@link analyze} function to craft the `prisma.schema`
|
|
40
|
+
* file. For each entity and attribute in the database schema, it
|
|
41
|
+
* provides comprehensive documentation including the rationale behind
|
|
42
|
+
* its creation, its purpose, and conceptual explanations. The agent
|
|
43
|
+
* employs normalization techniques to ensure high-quality database
|
|
44
|
+
* design.
|
|
45
|
+
*
|
|
46
|
+
* Once the DB schema file is written, the Prisma agent compiles it using
|
|
47
|
+
* the built-in Prisma compiler. If compilation errors occur, these are
|
|
48
|
+
* fed back to the AI agent, enabling a self-correction process through
|
|
49
|
+
* compiler feedback. After successful compilation, this schema file is
|
|
50
|
+
* then subjected to a quality assurance process through an internal
|
|
51
|
+
* review agent that verifies and refines the schema.
|
|
52
|
+
*
|
|
53
|
+
* Note that, never use this function without calling the
|
|
54
|
+
* {@link analyze} function at least once.
|
|
55
|
+
*/
|
|
56
|
+
prisma(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Run interface agent.
|
|
60
|
+
*/
|
|
61
|
+
interface(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Run test program agent.
|
|
65
|
+
*/
|
|
66
|
+
test(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Run realize agent.
|
|
70
|
+
*/
|
|
71
|
+
realize(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
72
|
+
}
|