@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Wrtn Technologies
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AutoBeHistory, AutoBeUserMessageContent } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "./context/AutoBeContext";
|
|
4
|
+
import { AutoBeTokenUsage } from "./context/AutoBeTokenUsage";
|
|
5
|
+
import { IAutoBeProps } from "./structures/IAutoBeProps";
|
|
6
|
+
export declare class AutoBeAgent<Model extends ILlmSchema.Model> {
|
|
7
|
+
private readonly props;
|
|
8
|
+
private readonly agentica_;
|
|
9
|
+
private readonly histories_;
|
|
10
|
+
private readonly context_;
|
|
11
|
+
private readonly state_;
|
|
12
|
+
/**
|
|
13
|
+
* Initializer constructor.
|
|
14
|
+
*
|
|
15
|
+
* @param props Properties to construct the agent
|
|
16
|
+
*/
|
|
17
|
+
constructor(props: IAutoBeProps<Model>);
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
clone(): AutoBeAgent<Model>;
|
|
22
|
+
conversate(content: string | AutoBeUserMessageContent | AutoBeUserMessageContent[]): Promise<AutoBeHistory[]>;
|
|
23
|
+
getHistories(): AutoBeHistory[];
|
|
24
|
+
getTokenUsage(): AutoBeTokenUsage;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
getContext(): AutoBeContext<Model>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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.AutoBeAgent = void 0;
|
|
13
|
+
const core_1 = require("@agentica/core");
|
|
14
|
+
const createAutoBeApplication_1 = require("./internal/createAutoBeApplication");
|
|
15
|
+
const createAutoBeState_1 = require("./internal/createAutoBeState");
|
|
16
|
+
const transformAgenticaHistory_1 = require("./internal/transformAgenticaHistory");
|
|
17
|
+
class AutoBeAgent {
|
|
18
|
+
/* -----------------------------------------------------------
|
|
19
|
+
CONSTRUCTOR
|
|
20
|
+
----------------------------------------------------------- */
|
|
21
|
+
/**
|
|
22
|
+
* Initializer constructor.
|
|
23
|
+
*
|
|
24
|
+
* @param props Properties to construct the agent
|
|
25
|
+
*/
|
|
26
|
+
constructor(props) {
|
|
27
|
+
var _a, _b, _c;
|
|
28
|
+
this.props = props;
|
|
29
|
+
this.histories_ = (_b = (_a = props.histories) === null || _a === void 0 ? void 0 : _a.slice()) !== null && _b !== void 0 ? _b : [];
|
|
30
|
+
this.state_ = (0, createAutoBeState_1.createAutoBeState)(this.histories_);
|
|
31
|
+
this.context_ = {
|
|
32
|
+
model: props.model,
|
|
33
|
+
vendor: props.vendor,
|
|
34
|
+
compiler: props.compiler,
|
|
35
|
+
histories: this.histories_,
|
|
36
|
+
usage: () => this.agentica_.getTokenUsage(),
|
|
37
|
+
state: () => this.state_,
|
|
38
|
+
};
|
|
39
|
+
this.agentica_ = new core_1.MicroAgentica({
|
|
40
|
+
model: props.model,
|
|
41
|
+
vendor: props.vendor,
|
|
42
|
+
config: Object.assign(Object.assign({}, ((_c = props.config) !== null && _c !== void 0 ? _c : {})), { executor: {
|
|
43
|
+
describe: null,
|
|
44
|
+
} }),
|
|
45
|
+
controllers: [
|
|
46
|
+
(0, createAutoBeApplication_1.createAutoBeController)({
|
|
47
|
+
model: props.model,
|
|
48
|
+
context: this.context_,
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
this.agentica_.getHistories().push(...this.histories_
|
|
53
|
+
.map((history) => (0, transformAgenticaHistory_1.transformAgenticaHistory)({
|
|
54
|
+
operations: this.agentica_.getOperations(),
|
|
55
|
+
history,
|
|
56
|
+
}))
|
|
57
|
+
.filter((h) => h !== null));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
clone() {
|
|
63
|
+
return new AutoBeAgent(Object.assign(Object.assign({}, this.props), { histories: this.histories_.slice() }));
|
|
64
|
+
}
|
|
65
|
+
/* -----------------------------------------------------------
|
|
66
|
+
ACCESSORS
|
|
67
|
+
----------------------------------------------------------- */
|
|
68
|
+
conversate(content) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
content;
|
|
71
|
+
return [];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
getHistories() {
|
|
75
|
+
return this.histories_;
|
|
76
|
+
}
|
|
77
|
+
getTokenUsage() {
|
|
78
|
+
return this.agentica_.getTokenUsage();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
getContext() {
|
|
84
|
+
return this.context_;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.AutoBeAgent = AutoBeAgent;
|
|
88
|
+
//# sourceMappingURL=AutoBeAgent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeAgent.js","sourceRoot":"","sources":["../src/AutoBeAgent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA+C;AAO/C,gFAA4E;AAC5E,oEAAiE;AACjE,kFAA+E;AAG/E,MAAa,WAAW;IAMtB;;kEAE8D;IAC9D;;;;OAIG;IACH,YAAoC,KAA0B;;QAA1B,UAAK,GAAL,KAAK,CAAqB;QAC5D,IAAI,CAAC,UAAU,GAAG,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,KAAK,EAAE,mCAAI,EAAE,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,IAAA,qCAAiB,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG;YACd,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;YAC3C,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM;SACzB,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,IAAI,oBAAa,CAAC;YACjC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,MAAM,kCACD,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,KACvB,QAAQ,EAAE;oBACR,QAAQ,EAAE,IAAI;iBACf,GACF;YACD,WAAW,EAAE;gBACX,IAAA,gDAAsB,EAAC;oBACrB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;iBACvB,CAAC;aACH;SACF,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,IAAI,CAChC,GAAG,IAAI,CAAC,UAAU;aACf,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CACf,IAAA,mDAAwB,EAAC;YACvB,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;YAC1C,OAAO;SACR,CAAC,CACH;aACA,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAC7B,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,KAAK;QACV,OAAO,IAAI,WAAW,iCACjB,IAAI,CAAC,KAAK,KACb,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAClC,CAAC;IACL,CAAC;IAED;;kEAE8D;IACjD,UAAU,CACrB,OAAuE;;YAEvE,OAAO,CAAC;YACR,OAAO,EAAE,CAAC;QACZ,CAAC;KAAA;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAEM,aAAa;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAxFD,kCAwFC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AutoBeHistory, IAutoBeCompiler } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
4
|
+
import { AutoBeState } from "./AutoBeState";
|
|
5
|
+
import { AutoBeTokenUsage } from "./AutoBeTokenUsage";
|
|
6
|
+
export interface AutoBeContext<Model extends ILlmSchema.Model> {
|
|
7
|
+
model: Model;
|
|
8
|
+
vendor: IAutoBeVendor;
|
|
9
|
+
compiler: IAutoBeCompiler;
|
|
10
|
+
histories: AutoBeHistory[];
|
|
11
|
+
usage: () => AutoBeTokenUsage;
|
|
12
|
+
state: () => AutoBeState;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeContext.js","sourceRoot":"","sources":["../../src/context/AutoBeContext.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AutoBeAnalyzeHistory, AutoBeInterfaceHistory, AutoBePrismaHistory, AutoBeRealizeHistory, AutoBeTestHistory } from "@autobe/interface";
|
|
2
|
+
export interface AutoBeState {
|
|
3
|
+
analyze: AutoBeAnalyzeHistory | null;
|
|
4
|
+
prisma: AutoBePrismaHistory | null;
|
|
5
|
+
interface: AutoBeInterfaceHistory | null;
|
|
6
|
+
test: AutoBeTestHistory | null;
|
|
7
|
+
realize: AutoBeRealizeHistory | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeState.js","sourceRoot":"","sources":["../../src/context/AutoBeState.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeTokenUsage.js","sourceRoot":"","sources":["../../src/context/AutoBeTokenUsage.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AAEtC,QAAA,gBAAgB,GAAG,yBAAkB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IAutoBeApplicationProps } from "./IAutoBeApplicationProps";
|
|
2
|
+
import { IAutoBeApplicationResult } from "./IAutoBeApplicationResult";
|
|
3
|
+
/**
|
|
4
|
+
* Application for AutoBE function calling.
|
|
5
|
+
*
|
|
6
|
+
* @author Samchon
|
|
7
|
+
*/
|
|
8
|
+
export interface IAutoBeApplication {
|
|
9
|
+
/**
|
|
10
|
+
* Run Analyze Agent.
|
|
11
|
+
*
|
|
12
|
+
* Analyze agent analyzes requirements and creates specification
|
|
13
|
+
* documents.
|
|
14
|
+
*
|
|
15
|
+
* The Analyze agent serves as the foundation of the entire development
|
|
16
|
+
* process. It not only captures initial requirements but also
|
|
17
|
+
* continuously refines understanding through iterative conversation
|
|
18
|
+
* with users. When requirements are ambiguous or incomplete, it
|
|
19
|
+
* proactively formulates targeted questions to elicit necessary
|
|
20
|
+
* information before proceeding with development.
|
|
21
|
+
*
|
|
22
|
+
* Additionally, once other agents have generated code, the Analyze
|
|
23
|
+
* agent can interpret change requests in the context of existing
|
|
24
|
+
* implementations, assessing the impact and feasibility of modifications
|
|
25
|
+
* while maintaining system integrity. This comprehensive approach
|
|
26
|
+
* ensures that all subsequent development stages work from a clear,
|
|
27
|
+
* complete, and consistent specification.
|
|
28
|
+
*/
|
|
29
|
+
analyze(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Run prisma agent.
|
|
32
|
+
*
|
|
33
|
+
* Prisma agent analyzes requirements specifications to generate
|
|
34
|
+
* database schemas in Prisma format.
|
|
35
|
+
*
|
|
36
|
+
* The Prisma agent references the requirements specification document
|
|
37
|
+
* created by the {@link analyze} function to craft the `prisma.schema`
|
|
38
|
+
* file. For each entity and attribute in the database schema, it
|
|
39
|
+
* provides comprehensive documentation including the rationale behind
|
|
40
|
+
* its creation, its purpose, and conceptual explanations. The agent
|
|
41
|
+
* employs normalization techniques to ensure high-quality database
|
|
42
|
+
* design.
|
|
43
|
+
*
|
|
44
|
+
* Once the DB schema file is written, the Prisma agent compiles it using
|
|
45
|
+
* the built-in Prisma compiler. If compilation errors occur, these are
|
|
46
|
+
* fed back to the AI agent, enabling a self-correction process through
|
|
47
|
+
* compiler feedback. After successful compilation, this schema file is
|
|
48
|
+
* then subjected to a quality assurance process through an internal
|
|
49
|
+
* review agent that verifies and refines the schema.
|
|
50
|
+
*
|
|
51
|
+
* Note that, never use this function without calling the
|
|
52
|
+
* {@link analyze} function at least once.
|
|
53
|
+
*/
|
|
54
|
+
prisma(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Run interface agent.
|
|
57
|
+
*/
|
|
58
|
+
interface(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Run test program agent.
|
|
61
|
+
*/
|
|
62
|
+
test(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Run realize agent.
|
|
65
|
+
*/
|
|
66
|
+
realize(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplication.js","sourceRoot":"","sources":["../../src/context/IAutoBeApplication.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplicationProps.js","sourceRoot":"","sources":["../../src/context/IAutoBeApplicationProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplicationResult.js","sourceRoot":"","sources":["../../src/context/IAutoBeApplicationResult.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformRouteDocument = transformRouteDocument;
|
|
4
|
+
function transformRouteDocument(route) {
|
|
5
|
+
var _a;
|
|
6
|
+
var _b;
|
|
7
|
+
const paths = {};
|
|
8
|
+
for (const op of route.operations) {
|
|
9
|
+
(_a = paths[_b = op.path]) !== null && _a !== void 0 ? _a : (paths[_b] = {});
|
|
10
|
+
paths[op.path][op.method] = {
|
|
11
|
+
parameters: op.parameters.map((p) => ({
|
|
12
|
+
name: p.name,
|
|
13
|
+
in: "path",
|
|
14
|
+
schema: p.schema,
|
|
15
|
+
description: p.description,
|
|
16
|
+
required: true,
|
|
17
|
+
})),
|
|
18
|
+
requestBody: op.body
|
|
19
|
+
? {
|
|
20
|
+
content: {
|
|
21
|
+
"application/json": {
|
|
22
|
+
schema: op.body.schema,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
description: op.description,
|
|
26
|
+
required: true,
|
|
27
|
+
}
|
|
28
|
+
: undefined,
|
|
29
|
+
responses: op.response
|
|
30
|
+
? {
|
|
31
|
+
[op.method === "post" ? 201 : 200]: {
|
|
32
|
+
content: {
|
|
33
|
+
"application/json": {
|
|
34
|
+
schema: op.response.schema,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
description: op.description,
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
: undefined,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
openapi: "3.1.0",
|
|
45
|
+
paths,
|
|
46
|
+
components: route.components,
|
|
47
|
+
"x-samchon-emended-v4": true,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=transformRouteDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformRouteDocument.js","sourceRoot":"","sources":["../../src/factory/transformRouteDocument.ts"],"names":[],"mappings":";;AAGA,wDA6CC;AA7CD,SAAgB,sBAAsB,CACpC,KAA2B;;;IAE3B,MAAM,KAAK,GAAkC,EAAE,CAAC;IAChD,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAClC,MAAA,KAAK,MAAC,EAAE,CAAC,IAAI,qCAAb,KAAK,OAAc,EAAE,EAAC;QACtB,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG;YAC1B,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACpC,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,EAAE,EAAE,MAAM;gBACV,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;YACH,WAAW,EAAE,EAAE,CAAC,IAAI;gBAClB,CAAC,CAAC;oBACE,OAAO,EAAE;wBACP,kBAAkB,EAAE;4BAClB,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM;yBACvB;qBACF;oBACD,WAAW,EAAE,EAAE,CAAC,WAAW;oBAC3B,QAAQ,EAAE,IAAI;iBACf;gBACH,CAAC,CAAC,SAAS;YACb,SAAS,EAAE,EAAE,CAAC,QAAQ;gBACpB,CAAC,CAAC;oBACE,CAAC,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;wBAClC,OAAO,EAAE;4BACP,kBAAkB,EAAE;gCAClB,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM;6BAC3B;yBACF;wBACD,WAAW,EAAE,EAAE,CAAC,WAAW;qBAC5B;iBACF;gBACH,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,KAAK;QACL,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,sBAAsB,EAAE,IAAI;KAC7B,CAAC;AACJ,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./AutoBeAgent";
|
|
2
|
+
export * from "./context/AutoBeTokenUsage";
|
|
3
|
+
export * from "./structures/IAutoBeProps";
|
|
4
|
+
export * from "./structures/IAutoBeConfig";
|
|
5
|
+
export * from "./structures/IAutoBeVendor";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export * as orchestrate from "./orchestrate";
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.orchestrate = void 0;
|
|
40
|
+
__exportStar(require("./AutoBeAgent"), exports);
|
|
41
|
+
__exportStar(require("./context/AutoBeTokenUsage"), exports);
|
|
42
|
+
__exportStar(require("./structures/IAutoBeProps"), exports);
|
|
43
|
+
__exportStar(require("./structures/IAutoBeConfig"), exports);
|
|
44
|
+
__exportStar(require("./structures/IAutoBeVendor"), exports);
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
exports.orchestrate = __importStar(require("./orchestrate"));
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA8B;AAE9B,6DAA2C;AAE3C,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAE3C;;GAEG;AACH,6DAA6C"}
|