@autobe/agent 0.0.0 → 0.3.6

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.
Files changed (166) hide show
  1. package/LICENSE +21 -21
  2. package/lib/AutoBeAgent.d.ts +9 -7
  3. package/lib/AutoBeAgent.js +106 -14
  4. package/lib/AutoBeAgent.js.map +1 -1
  5. package/lib/analyze/AnalyzeAgent.d.ts +24 -0
  6. package/lib/analyze/AnalyzeAgent.js +817 -0
  7. package/lib/analyze/AnalyzeAgent.js.map +1 -0
  8. package/lib/analyze/CreateReviewerAgent.d.ts +16 -0
  9. package/lib/analyze/CreateReviewerAgent.js +97 -0
  10. package/lib/analyze/CreateReviewerAgent.js.map +1 -0
  11. package/lib/analyze/Planning.d.ts +63 -0
  12. package/lib/{orchestrate/orchestratePrisma.js → analyze/Planning.js} +28 -11
  13. package/lib/analyze/Planning.js.map +1 -0
  14. package/lib/constants/AutoBeSystemPromptConstant.d.ts +14 -0
  15. package/lib/constants/AutoBeSystemPromptConstant.js +4 -0
  16. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
  17. package/lib/context/AutoBeContext.d.ts +7 -3
  18. package/lib/context/IAutoBeApplication.d.ts +72 -32
  19. package/lib/context/IAutoBeApplicationProps.d.ts +22 -2
  20. package/lib/context/IAutoBeApplicationResult.d.ts +0 -1
  21. package/lib/context/assertSchemaModel.d.ts +2 -0
  22. package/lib/context/assertSchemaModel.js +15 -0
  23. package/lib/context/assertSchemaModel.js.map +1 -0
  24. package/lib/{internal/transformAgenticaHistory.d.ts → factory/createAgenticaHistory.d.ts} +1 -1
  25. package/lib/{internal/transformAgenticaHistory.js → factory/createAgenticaHistory.js} +3 -4
  26. package/lib/factory/createAgenticaHistory.js.map +1 -0
  27. package/lib/factory/createAutoBeApplication.js +1195 -0
  28. package/lib/factory/createAutoBeApplication.js.map +1 -0
  29. package/lib/factory/createAutoBeState.js.map +1 -0
  30. package/lib/factory/index.d.ts +2 -0
  31. package/lib/factory/index.js +19 -0
  32. package/lib/factory/index.js.map +1 -0
  33. package/lib/factory/invertOpenApiDocument.d.ts +3 -0
  34. package/lib/factory/invertOpenApiDocument.js +51 -0
  35. package/lib/factory/invertOpenApiDocument.js.map +1 -0
  36. package/lib/index.d.ts +3 -3
  37. package/lib/index.js +4 -4
  38. package/lib/index.js.map +1 -1
  39. package/lib/index.mjs +5455 -547
  40. package/lib/index.mjs.map +1 -1
  41. package/lib/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
  42. package/lib/orchestrate/facade/transformFacadeStateMessage.js +46 -0
  43. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
  44. package/lib/orchestrate/index.d.ts +2 -2
  45. package/lib/orchestrate/index.js +2 -2
  46. package/lib/orchestrate/index.js.map +1 -1
  47. package/lib/orchestrate/interface/OpenApiEndpointComparator.d.ts +5 -0
  48. package/lib/orchestrate/interface/OpenApiEndpointComparator.js +16 -0
  49. package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +1 -0
  50. package/lib/orchestrate/interface/orchestrateInterface.d.ts +5 -0
  51. package/lib/orchestrate/interface/orchestrateInterface.js +61 -0
  52. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
  53. package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +4 -0
  54. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +702 -0
  55. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -0
  56. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +4 -0
  57. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +452 -0
  58. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
  59. package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
  60. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +2065 -0
  61. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
  62. package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +3 -0
  63. package/lib/orchestrate/interface/transformInterfaceHistories.js +94 -0
  64. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -0
  65. package/lib/orchestrate/orchestrateAnalyze.d.ts +1 -3
  66. package/lib/orchestrate/orchestrateAnalyze.js +60 -6
  67. package/lib/orchestrate/orchestrateAnalyze.js.map +1 -1
  68. package/lib/orchestrate/{orchestratePrisma.d.ts → prisma/orchestratePrisma.d.ts} +3 -6
  69. package/lib/orchestrate/prisma/orchestratePrisma.js +103 -0
  70. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
  71. package/lib/orchestrate/prisma/orchestratePrismaCompiler.d.ts +6 -0
  72. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js +436 -0
  73. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js.map +1 -0
  74. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
  75. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +437 -0
  76. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
  77. package/lib/orchestrate/prisma/orchestratePrismaSchema.d.ts +7 -0
  78. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +369 -0
  79. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
  80. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +3 -0
  81. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js +44 -0
  82. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js.map +1 -0
  83. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +3 -0
  84. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +42 -0
  85. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -0
  86. package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +3 -0
  87. package/lib/orchestrate/prisma/transformPrismaHistories.js +46 -0
  88. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -0
  89. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +3 -0
  90. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +46 -0
  91. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -0
  92. package/lib/structures/IAutoBeConfig.d.ts +4 -4
  93. package/lib/utils/StringUtil.d.ts +4 -0
  94. package/lib/utils/StringUtil.js +43 -0
  95. package/lib/utils/StringUtil.js.map +1 -0
  96. package/lib/utils/divideArray.d.ts +4 -0
  97. package/lib/utils/divideArray.js +19 -0
  98. package/lib/utils/divideArray.js.map +1 -0
  99. package/lib/utils/emplaceMap.d.ts +1 -0
  100. package/lib/utils/emplaceMap.js +13 -0
  101. package/lib/utils/emplaceMap.js.map +1 -0
  102. package/package.json +29 -8
  103. package/src/AutoBeAgent.ts +227 -101
  104. package/src/analyze/AnalyzeAgent.ts +167 -0
  105. package/src/analyze/CreateReviewerAgent.ts +126 -0
  106. package/src/analyze/Planning.ts +75 -0
  107. package/src/constants/AutoBeSystemPromptConstant.ts +15 -0
  108. package/src/context/AutoBeContext.ts +19 -15
  109. package/src/context/AutoBeState.ts +15 -15
  110. package/src/context/AutoBeTokenUsage.ts +3 -3
  111. package/src/context/IAutoBeApplication.ts +112 -72
  112. package/src/context/IAutoBeApplicationProps.ts +27 -6
  113. package/src/context/IAutoBeApplicationResult.ts +3 -4
  114. package/src/context/assertSchemaModel.ts +17 -0
  115. package/src/{internal/transformAgenticaHistory.ts → factory/createAgenticaHistory.ts} +51 -54
  116. package/src/{internal → factory}/createAutoBeApplication.ts +52 -47
  117. package/src/{internal → factory}/createAutoBeState.ts +14 -14
  118. package/src/factory/index.ts +2 -0
  119. package/src/factory/invertOpenApiDocument.ts +63 -0
  120. package/src/index.ts +13 -12
  121. package/src/orchestrate/facade/transformFacadeStateMessage.ts +58 -0
  122. package/src/orchestrate/index.ts +5 -5
  123. package/src/orchestrate/interface/OpenApiEndpointComparator.ts +15 -0
  124. package/src/orchestrate/interface/orchestrateInterface.ts +66 -0
  125. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +324 -0
  126. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +140 -0
  127. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +247 -0
  128. package/src/orchestrate/interface/transformInterfaceHistories.ts +98 -0
  129. package/src/orchestrate/orchestrateAnalyze.ts +86 -21
  130. package/src/orchestrate/orchestrateRealize.ts +18 -18
  131. package/src/orchestrate/orchestrateTest.ts +18 -18
  132. package/src/orchestrate/prisma/orchestratePrisma.ts +117 -0
  133. package/src/orchestrate/prisma/orchestratePrismaCompiler.ts +194 -0
  134. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +176 -0
  135. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +181 -0
  136. package/src/orchestrate/prisma/transformPrismaCompilerHistories.ts +49 -0
  137. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +46 -0
  138. package/src/orchestrate/prisma/transformPrismaHistories.ts +50 -0
  139. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +50 -0
  140. package/src/structures/IAutoBeConfig.ts +25 -25
  141. package/src/structures/IAutoBeProps.ts +13 -13
  142. package/src/structures/IAutoBeVendor.ts +3 -3
  143. package/src/utils/StringUtil.ts +45 -0
  144. package/src/utils/divideArray.ts +16 -0
  145. package/src/utils/emplaceMap.ts +14 -0
  146. package/lib/factory/transformRouteDocument.d.ts +0 -3
  147. package/lib/factory/transformRouteDocument.js +0 -50
  148. package/lib/factory/transformRouteDocument.js.map +0 -1
  149. package/lib/internal/createAutoBeApplication.js +0 -1452
  150. package/lib/internal/createAutoBeApplication.js.map +0 -1
  151. package/lib/internal/createAutoBeState.js.map +0 -1
  152. package/lib/internal/transformAgenticaHistory.js.map +0 -1
  153. package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
  154. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +0 -2
  155. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +0 -1
  156. package/lib/orchestrate/orchestrateInterface.d.ts +0 -8
  157. package/lib/orchestrate/orchestrateInterface.js +0 -22
  158. package/lib/orchestrate/orchestrateInterface.js.map +0 -1
  159. package/lib/orchestrate/orchestratePrisma.js.map +0 -1
  160. package/src/factory/transformRouteDocument.ts +0 -49
  161. package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
  162. package/src/orchestrate/orchestrateInterface.ts +0 -21
  163. package/src/orchestrate/orchestratePrisma.ts +0 -21
  164. /package/lib/{internal → factory}/createAutoBeApplication.d.ts +0 -0
  165. /package/lib/{internal → factory}/createAutoBeState.d.ts +0 -0
  166. /package/lib/{internal → factory}/createAutoBeState.js +0 -0
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ //# sourceMappingURL=AutoBeSystemPromptConstant.js.map
@@ -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
- histories: AutoBeHistory[];
11
- usage: () => AutoBeTokenUsage;
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 analyzes requirements and creates specification
13
- * documents.
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
- * 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.
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
- * 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.
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 analyzes requirements specifications to generate
34
- * database schemas in Prisma format.
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
- * 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.
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
- * 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.
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
- * The reason of the function call.
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
- reason: string;
25
+ userPlanningRequirements?: string;
6
26
  }
@@ -1,4 +1,3 @@
1
1
  export interface IAutoBeApplicationResult {
2
2
  success: boolean;
3
- description: string;
4
3
  }
@@ -0,0 +1,2 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ export declare function assertSchemaModel<Model extends ILlmSchema.Model>(model: Model): asserts model is Exclude<Model, "gemini" | "3.0">;
@@ -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 transformAgenticaHistory<Model extends ILlmSchema.Model>(props: {
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.transformAgenticaHistory = transformAgenticaHistory;
4
- function transformAgenticaHistory(props) {
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=transformAgenticaHistory.js.map
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"}