@autobe/agent 0.0.0 → 0.3.9
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 -21
- package/lib/AutoBeAgent.d.ts +9 -7
- package/lib/AutoBeAgent.js +106 -14
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/analyze/AnalyzeAgent.d.ts +24 -0
- package/lib/analyze/AnalyzeAgent.js +817 -0
- package/lib/analyze/AnalyzeAgent.js.map +1 -0
- package/lib/analyze/CreateReviewerAgent.d.ts +16 -0
- package/lib/analyze/CreateReviewerAgent.js +97 -0
- package/lib/analyze/CreateReviewerAgent.js.map +1 -0
- package/lib/analyze/Planning.d.ts +63 -0
- package/lib/{orchestrate/orchestratePrisma.js → analyze/Planning.js} +28 -11
- package/lib/analyze/Planning.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +14 -0
- package/lib/constants/AutoBeSystemPromptConstant.js +4 -0
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/context/AutoBeContext.d.ts +7 -3
- package/lib/context/IAutoBeApplication.d.ts +72 -32
- package/lib/context/IAutoBeApplicationProps.d.ts +22 -2
- package/lib/context/IAutoBeApplicationResult.d.ts +0 -1
- package/lib/context/assertSchemaModel.d.ts +2 -0
- package/lib/context/assertSchemaModel.js +15 -0
- package/lib/context/assertSchemaModel.js.map +1 -0
- package/lib/{internal/transformAgenticaHistory.d.ts → factory/createAgenticaHistory.d.ts} +1 -1
- package/lib/{internal/transformAgenticaHistory.js → factory/createAgenticaHistory.js} +3 -4
- package/lib/factory/createAgenticaHistory.js.map +1 -0
- package/lib/factory/createAutoBeApplication.js +1195 -0
- package/lib/factory/createAutoBeApplication.js.map +1 -0
- package/lib/factory/createAutoBeState.js.map +1 -0
- package/lib/factory/index.d.ts +2 -0
- package/lib/factory/index.js +19 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/factory/invertOpenApiDocument.d.ts +3 -0
- package/lib/factory/invertOpenApiDocument.js +51 -0
- package/lib/factory/invertOpenApiDocument.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +5455 -547
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +46 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/index.d.ts +2 -2
- package/lib/orchestrate/index.js +2 -2
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/OpenApiEndpointComparator.d.ts +5 -0
- package/lib/orchestrate/interface/OpenApiEndpointComparator.js +16 -0
- package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +61 -0
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +702 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +452 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +2065 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +3 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js +94 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -0
- package/lib/orchestrate/orchestrateAnalyze.d.ts +1 -3
- package/lib/orchestrate/orchestrateAnalyze.js +60 -6
- package/lib/orchestrate/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/{orchestratePrisma.d.ts → prisma/orchestratePrisma.d.ts} +3 -6
- package/lib/orchestrate/prisma/orchestratePrisma.js +103 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.d.ts +6 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.js +436 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +437 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +369 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js +44 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +42 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.js +46 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +46 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/structures/IAutoBeConfig.d.ts +4 -4
- package/lib/utils/StringUtil.d.ts +4 -0
- package/lib/utils/StringUtil.js +43 -0
- package/lib/utils/StringUtil.js.map +1 -0
- package/lib/utils/divideArray.d.ts +4 -0
- package/lib/utils/divideArray.js +19 -0
- package/lib/utils/divideArray.js.map +1 -0
- package/lib/utils/emplaceMap.d.ts +1 -0
- package/lib/utils/emplaceMap.js +13 -0
- package/lib/utils/emplaceMap.js.map +1 -0
- package/package.json +29 -8
- package/src/AutoBeAgent.ts +227 -101
- package/src/analyze/AnalyzeAgent.ts +167 -0
- package/src/analyze/CreateReviewerAgent.ts +126 -0
- package/src/analyze/Planning.ts +75 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +15 -0
- package/src/context/AutoBeContext.ts +19 -15
- package/src/context/AutoBeState.ts +15 -15
- package/src/context/AutoBeTokenUsage.ts +3 -3
- package/src/context/IAutoBeApplication.ts +112 -72
- package/src/context/IAutoBeApplicationProps.ts +27 -6
- package/src/context/IAutoBeApplicationResult.ts +3 -4
- package/src/context/assertSchemaModel.ts +17 -0
- package/src/{internal/transformAgenticaHistory.ts → factory/createAgenticaHistory.ts} +51 -54
- package/src/{internal → factory}/createAutoBeApplication.ts +52 -47
- package/src/{internal → factory}/createAutoBeState.ts +14 -14
- package/src/factory/index.ts +2 -0
- package/src/factory/invertOpenApiDocument.ts +63 -0
- package/src/index.ts +13 -12
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +58 -0
- package/src/orchestrate/index.ts +5 -5
- package/src/orchestrate/interface/OpenApiEndpointComparator.ts +15 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +66 -0
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +324 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +140 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +247 -0
- package/src/orchestrate/interface/transformInterfaceHistories.ts +98 -0
- package/src/orchestrate/orchestrateAnalyze.ts +86 -21
- package/src/orchestrate/orchestrateRealize.ts +18 -18
- package/src/orchestrate/orchestrateTest.ts +18 -18
- package/src/orchestrate/prisma/orchestratePrisma.ts +117 -0
- package/src/orchestrate/prisma/orchestratePrismaCompiler.ts +194 -0
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +176 -0
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +181 -0
- package/src/orchestrate/prisma/transformPrismaCompilerHistories.ts +49 -0
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +46 -0
- package/src/orchestrate/prisma/transformPrismaHistories.ts +50 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +50 -0
- package/src/structures/IAutoBeConfig.ts +25 -25
- package/src/structures/IAutoBeProps.ts +13 -13
- package/src/structures/IAutoBeVendor.ts +3 -3
- package/src/utils/StringUtil.ts +45 -0
- package/src/utils/divideArray.ts +16 -0
- package/src/utils/emplaceMap.ts +14 -0
- package/lib/factory/transformRouteDocument.d.ts +0 -3
- package/lib/factory/transformRouteDocument.js +0 -50
- package/lib/factory/transformRouteDocument.js.map +0 -1
- package/lib/internal/createAutoBeApplication.js +0 -1452
- package/lib/internal/createAutoBeApplication.js.map +0 -1
- package/lib/internal/createAutoBeState.js.map +0 -1
- package/lib/internal/transformAgenticaHistory.js.map +0 -1
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +0 -2
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +0 -1
- package/lib/orchestrate/orchestrateInterface.d.ts +0 -8
- package/lib/orchestrate/orchestrateInterface.js +0 -22
- package/lib/orchestrate/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/orchestratePrisma.js.map +0 -1
- package/src/factory/transformRouteDocument.ts +0 -49
- package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
- package/src/orchestrate/orchestrateInterface.ts +0 -21
- package/src/orchestrate/orchestratePrisma.ts +0 -21
- /package/lib/{internal → factory}/createAutoBeApplication.d.ts +0 -0
- /package/lib/{internal → factory}/createAutoBeState.d.ts +0 -0
- /package/lib/{internal → factory}/createAutoBeState.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeSystemPromptConstant.js","sourceRoot":"","sources":["../../src/constants/AutoBeSystemPromptConstant.ts"],"names":[],"mappings":";;AAcC,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { AutoBeHistory, IAutoBeCompiler } from "@autobe/interface";
|
|
1
|
+
import { AutoBeEvent, AutoBeHistory, IAutoBeCompiler } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
3
4
|
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
4
5
|
import { AutoBeState } from "./AutoBeState";
|
|
5
6
|
import { AutoBeTokenUsage } from "./AutoBeTokenUsage";
|
|
6
7
|
export interface AutoBeContext<Model extends ILlmSchema.Model> {
|
|
7
8
|
model: Model;
|
|
8
9
|
vendor: IAutoBeVendor;
|
|
10
|
+
config: IAutoBeConfig | undefined;
|
|
9
11
|
compiler: IAutoBeCompiler;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
files: () => Record<string, string>;
|
|
13
|
+
histories: () => AutoBeHistory[];
|
|
12
14
|
state: () => AutoBeState;
|
|
15
|
+
usage: () => AutoBeTokenUsage;
|
|
16
|
+
dispatch: (event: AutoBeEvent) => void;
|
|
13
17
|
}
|
|
@@ -9,59 +9,99 @@ export interface IAutoBeApplication {
|
|
|
9
9
|
/**
|
|
10
10
|
* Run Analyze Agent.
|
|
11
11
|
*
|
|
12
|
-
* Analyze agent
|
|
13
|
-
*
|
|
12
|
+
* Executes the Analyze agent to process user requirements and generate a
|
|
13
|
+
* structured specification document. This agent analyzes all conversation
|
|
14
|
+
* history between users and AI, separates business logic from technical
|
|
15
|
+
* requirements, and establishes development priorities and scope.
|
|
14
16
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* information before proceeding with development.
|
|
17
|
+
* **IMPORTANT**: Only call this function when sufficient requirements have
|
|
18
|
+
* been discussed to generate a comprehensive specification. The context must
|
|
19
|
+
* contain enough detail about the system's purpose, core features, data
|
|
20
|
+
* models, and business rules. If requirements are unclear or incomplete,
|
|
21
|
+
* continue gathering information through conversation instead.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* ensures that all subsequent development stages work from a clear,
|
|
27
|
-
* complete, and consistent specification.
|
|
23
|
+
* The agent will automatically generate follow-up questions for any ambiguous
|
|
24
|
+
* requirements and continuously refine its understanding through iterative
|
|
25
|
+
* conversation. When executed after other agents have generated code, it can
|
|
26
|
+
* also interpret change requests in the context of existing implementations.
|
|
28
27
|
*/
|
|
29
28
|
analyze(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
30
29
|
/**
|
|
31
30
|
* Run prisma agent.
|
|
32
31
|
*
|
|
33
|
-
* Prisma agent
|
|
34
|
-
*
|
|
32
|
+
* Executes the Prisma agent to generate database schema files and ERD
|
|
33
|
+
* documentation. This agent reads the requirements specification created by
|
|
34
|
+
* the {@link analyze Analyze agent} and produces a complete Prisma schema with
|
|
35
|
+
* comprehensive documentation for each entity and attribute.
|
|
35
36
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* employs normalization techniques to ensure high-quality database
|
|
42
|
-
* design.
|
|
37
|
+
* **PREREQUISITE**: Only call this function after the {@link analyze} function
|
|
38
|
+
* has been successfully executed and a requirements specification document
|
|
39
|
+
* has been generated. The Prisma agent depends on the structured requirements
|
|
40
|
+
* analysis to design the database schema properly. Without a completed
|
|
41
|
+
* requirements specification, this function should NOT be called.
|
|
43
42
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
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.
|
|
43
|
+
* The agent will automatically validate the generated schema using the Prisma
|
|
44
|
+
* compiler, self-correct any compilation errors through feedback loops, and
|
|
45
|
+
* generate ERD documentation using prisma-markdown. An internal review
|
|
46
|
+
* process ensures schema quality and optimization.
|
|
53
47
|
*/
|
|
54
48
|
prisma(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
55
49
|
/**
|
|
56
50
|
* Run interface agent.
|
|
51
|
+
*
|
|
52
|
+
* Executes the Interface agent to design and generate API interfaces. This
|
|
53
|
+
* agent creates OpenAPI schemas and TypeScript/NestJS code based on the
|
|
54
|
+
* requirements specification and ERD documentation from previous agents.
|
|
55
|
+
*
|
|
56
|
+
* The agent follows a sophisticated pipeline: first constructing formal
|
|
57
|
+
* OpenAPI Operation Schemas and JSON Schemas, then validating these schemas,
|
|
58
|
+
* and finally transforming them into NestJS controllers and DTOs. Each
|
|
59
|
+
* generated interface includes comprehensive JSDoc comments and undergoes
|
|
60
|
+
* internal review for consistency.
|
|
57
61
|
*/
|
|
58
62
|
interface(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
59
63
|
/**
|
|
60
64
|
* Run test program agent.
|
|
65
|
+
*
|
|
66
|
+
* Executes the Test agent to generate comprehensive E2E test suites for all
|
|
67
|
+
* {@link interface API interfaces}. This agent synthesizes outputs from
|
|
68
|
+
* previous agents to create tests that validate both individual endpoints and
|
|
69
|
+
* their interactions.
|
|
70
|
+
*
|
|
71
|
+
* **PREREQUISITE**: Only call this function after the {@link interface}
|
|
72
|
+
* function has been successfully executed and API interfaces have been
|
|
73
|
+
* generated. The Test agent requires the completed API interface definitions,
|
|
74
|
+
* OpenAPI schemas, and TypeScript code to generate appropriate test
|
|
75
|
+
* scenarios. Without completed interface design, this function should NOT be
|
|
76
|
+
* called.
|
|
77
|
+
*
|
|
78
|
+
* The agent will analyze dependency relationships between API functions,
|
|
79
|
+
* structure integrated test scenarios with correct execution sequences, and
|
|
80
|
+
* enhance pre-generated test scaffolds with business logic validation.
|
|
81
|
+
* TypeScript compiler validation and internal review ensure test quality and
|
|
82
|
+
* optimal coverage.
|
|
61
83
|
*/
|
|
62
84
|
test(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
63
85
|
/**
|
|
64
86
|
* Run realize agent.
|
|
87
|
+
*
|
|
88
|
+
* Executes the Realize agent to implement the actual business logic for each
|
|
89
|
+
* API endpoint. This agent synthesizes all outputs from previous agents to
|
|
90
|
+
* generate fully functional service provider code.
|
|
91
|
+
*
|
|
92
|
+
* **PREREQUISITE**: Only call this function after the {@link interface}
|
|
93
|
+
* function has been successfully executed and API interfaces have been
|
|
94
|
+
* generated. The Realize agent requires the completed API interface
|
|
95
|
+
* definitions to implement the corresponding service logic. It also benefits
|
|
96
|
+
* from having test code available for validation. Without completed interface
|
|
97
|
+
* design, this function should NOT be called.
|
|
98
|
+
*
|
|
99
|
+
* The agent will create service implementations with multiple validation
|
|
100
|
+
* layers: TypeScript compiler feedback, runtime validation through test
|
|
101
|
+
* execution, and quality optimization through internal review. The generated
|
|
102
|
+
* code handles database interactions through Prisma, implements security and
|
|
103
|
+
* validation checks, and processes business rules according to
|
|
104
|
+
* specifications.
|
|
65
105
|
*/
|
|
66
106
|
realize(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
67
107
|
}
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
export interface IAutoBeApplicationProps {
|
|
2
|
+
/** The reason of the function call. */
|
|
3
|
+
reason: string;
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* This prompt defines how to convert a user's planning-oriented requirements into a structured message for an internal agent.
|
|
6
|
+
*
|
|
7
|
+
* All content the user provides must be included in the message. However, if some parts of the user's input are inappropriate or insufficient from a planning standpoint, you are allowed to add **supplementary remarks**—but only under strict rules.
|
|
8
|
+
*
|
|
9
|
+
* <Supplementary Remark Rules>
|
|
10
|
+
*
|
|
11
|
+
* 1. **Definition**
|
|
12
|
+
* A supplementary remark is additional information that may differ from the user's original intent. Because of this, **you must clearly indicate that it is *not* part of the user’s thinking**.
|
|
13
|
+
*
|
|
14
|
+
* 2. **When to Supplement**
|
|
15
|
+
* - If the user's input reveals a lack of technical understanding (e.g., suggesting "put all data into one table"), and the plan is not an MVP or PoC, it's encouraged to make reasonable additions for a more scalable or robust structure.
|
|
16
|
+
* - If there are clear gaps in the user's planning logic, you may supplement the content to ensure completeness.
|
|
17
|
+
*
|
|
18
|
+
* 3. **When Not to Supplement**
|
|
19
|
+
* - If the user's input is vague or ambiguous, **do not assume or add extra details**. Instead, it’s better to ask the user follow-up questions to clarify their intent.
|
|
20
|
+
* - If the user has made no comment on design, **do not impose design-related decisions** (e.g., colors, fonts, tone). However, you may state explicitly that no design requirements were provided.
|
|
21
|
+
* - Generic advice like "UX should be good" can be omitted unless it adds value, as such goals are assumed in all services.
|
|
22
|
+
*
|
|
23
|
+
* </Supplementary Remark Rules>
|
|
4
24
|
*/
|
|
5
|
-
|
|
25
|
+
userPlanningRequirements?: string;
|
|
6
26
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertSchemaModel = assertSchemaModel;
|
|
4
|
+
function assertSchemaModel(model) {
|
|
5
|
+
if (model === "gemini")
|
|
6
|
+
throw new Error([
|
|
7
|
+
"Error on AutoBeAgent.constructor(): gemini is not supported",
|
|
8
|
+
"because it does not follow standard JSON schema specification.",
|
|
9
|
+
"@autobe requires union type (`oneOf` or `anyOf`) for backend code generation,",
|
|
10
|
+
"but gemini has banned them. Please wait until when `@agentica`",
|
|
11
|
+
"supports prompt based function calling which can detour gemini's",
|
|
12
|
+
"restriction of JSON schema specification.",
|
|
13
|
+
].join(" "));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=assertSchemaModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertSchemaModel.js","sourceRoot":"","sources":["../../src/context/assertSchemaModel.ts"],"names":[],"mappings":";;AAEA,8CAcC;AAdD,SAAgB,iBAAiB,CAC/B,KAAY;IAEZ,IAAI,KAAK,KAAK,QAAQ;QACpB,MAAM,IAAI,KAAK,CACb;YACE,6DAA6D;YAC7D,gEAAgE;YAChE,+EAA+E;YAC/E,gEAAgE;YAChE,kEAAkE;YAClE,2CAA2C;SAC5C,CAAC,IAAI,CAAC,GAAG,CAAC,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgenticaOperation, MicroAgenticaHistory } from "@agentica/core";
|
|
2
2
|
import { AutoBeHistory } from "@autobe/interface";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function createAgenticaHistory<Model extends ILlmSchema.Model>(props: {
|
|
5
5
|
operations: readonly AgenticaOperation<Model>[];
|
|
6
6
|
history: AutoBeHistory;
|
|
7
7
|
}): MicroAgenticaHistory<Model> | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.createAgenticaHistory = createAgenticaHistory;
|
|
4
|
+
function createAgenticaHistory(props) {
|
|
5
5
|
if (props.history.type === "userMessage")
|
|
6
6
|
return Object.assign(Object.assign({}, props.history), { toJSON: () => props.history });
|
|
7
7
|
else if (props.history.type === "assistantMessage")
|
|
@@ -19,9 +19,8 @@ function transformAgenticaHistory(props) {
|
|
|
19
19
|
success: props.history.type === "analyze" || props.history.type === "interface"
|
|
20
20
|
? true
|
|
21
21
|
: props.history.result.type === "success",
|
|
22
|
-
description: props.history.description,
|
|
23
22
|
},
|
|
24
23
|
};
|
|
25
24
|
return Object.assign(Object.assign({}, partial), { protocol: operation.protocol, operation: operation, toJSON: () => (Object.assign(Object.assign({}, partial), { protocol: operation.protocol, operation: operation.toJSON() })) });
|
|
26
25
|
}
|
|
27
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=createAgenticaHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAgenticaHistory.js","sourceRoot":"","sources":["../../src/factory/createAgenticaHistory.ts"],"names":[],"mappings":";;AAQA,sDA0CC;AA1CD,SAAgB,qBAAqB,CAAiC,KAGrE;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;SAC9C;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"}
|