@autobe/agent 0.7.3 → 0.9.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.
Files changed (100) hide show
  1. package/lib/AutoBeAgent.d.ts +183 -12
  2. package/lib/AutoBeAgent.js +249 -65
  3. package/lib/AutoBeAgent.js.map +1 -1
  4. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
  5. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  6. package/lib/context/AutoBeContext.d.ts +2 -2
  7. package/lib/factory/index.d.ts +0 -1
  8. package/lib/factory/index.js +0 -1
  9. package/lib/factory/index.js.map +1 -1
  10. package/lib/index.mjs +1024 -663
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +7 -8
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -5
  15. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  16. package/lib/orchestrate/interface/orchestrateInterface.js +1 -1
  17. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  18. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +6 -8
  19. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  20. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +9 -6
  21. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  22. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +3 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  24. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +5 -8
  25. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  26. package/lib/orchestrate/prisma/orchestratePrisma.js +1 -1
  27. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  28. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +5 -1
  29. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  30. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +3 -6
  31. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  32. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +11 -7
  33. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  34. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +1 -1
  35. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +1 -1
  36. package/lib/orchestrate/test/orchestrateTest.js +4 -8
  37. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  38. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +2 -2
  39. package/lib/orchestrate/test/orchestrateTestCorrect.js +90 -60
  40. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  41. package/lib/orchestrate/test/orchestrateTestProgress.d.ts +3 -2
  42. package/lib/orchestrate/test/orchestrateTestProgress.js +75 -50
  43. package/lib/orchestrate/test/orchestrateTestProgress.js.map +1 -1
  44. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  45. package/lib/orchestrate/test/orchestrateTestScenario.js +617 -208
  46. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  47. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +123 -0
  48. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js +3 -0
  49. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
  50. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +2 -1
  51. package/lib/orchestrate/test/transformTestCorrectHistories.js +14 -10
  52. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  53. package/lib/orchestrate/test/transformTestProgressHistories.d.ts +7 -1
  54. package/lib/orchestrate/test/transformTestProgressHistories.js +20 -20
  55. package/lib/orchestrate/test/transformTestProgressHistories.js.map +1 -1
  56. package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +1 -2
  57. package/lib/orchestrate/test/transformTestScenarioHistories.js +1 -77
  58. package/lib/orchestrate/test/transformTestScenarioHistories.js.map +1 -1
  59. package/lib/structures/IAutoBeConfig.d.ts +48 -10
  60. package/lib/structures/IAutoBeProps.d.ts +87 -0
  61. package/lib/structures/IAutoBeVendor.d.ts +64 -22
  62. package/lib/utils/backoffRetry.d.ts +7 -0
  63. package/lib/utils/backoffRetry.js +73 -0
  64. package/lib/utils/backoffRetry.js.map +1 -0
  65. package/lib/utils/enforceToolCall.d.ts +3 -0
  66. package/lib/utils/enforceToolCall.js +13 -0
  67. package/lib/utils/enforceToolCall.js.map +1 -0
  68. package/lib/utils/types/BackoffOptions.d.ts +12 -0
  69. package/lib/utils/types/BackoffOptions.js +3 -0
  70. package/lib/utils/types/BackoffOptions.js.map +1 -0
  71. package/package.json +5 -5
  72. package/src/AutoBeAgent.ts +252 -52
  73. package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
  74. package/src/context/AutoBeContext.ts +7 -2
  75. package/src/factory/index.ts +0 -1
  76. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +5 -10
  77. package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -6
  78. package/src/orchestrate/interface/orchestrateInterface.ts +1 -1
  79. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +12 -11
  80. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +7 -6
  81. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +2 -1
  82. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +4 -9
  83. package/src/orchestrate/prisma/orchestratePrisma.ts +1 -0
  84. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -1
  85. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +6 -7
  86. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +10 -7
  87. package/src/orchestrate/test/orchestrateTest.ts +6 -13
  88. package/src/orchestrate/test/orchestrateTestCorrect.ts +127 -78
  89. package/src/orchestrate/test/orchestrateTestProgress.ts +88 -47
  90. package/src/orchestrate/test/orchestrateTestScenario.ts +194 -105
  91. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +132 -0
  92. package/src/orchestrate/test/transformTestCorrectHistories.ts +14 -10
  93. package/src/orchestrate/test/transformTestProgressHistories.ts +25 -22
  94. package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -79
  95. package/src/structures/IAutoBeConfig.ts +48 -10
  96. package/src/structures/IAutoBeProps.ts +91 -0
  97. package/src/structures/IAutoBeVendor.ts +64 -22
  98. package/src/utils/backoffRetry.ts +84 -0
  99. package/src/utils/enforceToolCall.ts +13 -0
  100. package/src/utils/types/BackoffOptions.ts +15 -0
@@ -0,0 +1,132 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+
3
+ export interface IAutoBeTestScenarioApplication {
4
+ /**
5
+ * Make test scenarios for the given endpoints.
6
+ *
7
+ * @param props Properties containing the endpoints and test scenarios.
8
+ */
9
+ makeScenario(props: IAutoBeTestScenarioApplication.IProps): void;
10
+ }
11
+
12
+ export namespace IAutoBeTestScenarioApplication {
13
+ export interface IProps {
14
+ /** Array of test scenario groups. */
15
+ scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[];
16
+ }
17
+
18
+ export interface IScenarioGroup {
19
+ /** Target API endpoint to test. */
20
+ endpoint: AutoBeOpenApi.IEndpoint;
21
+
22
+ /** Array of test scenarios. */
23
+ scenarios: IScenario[];
24
+ }
25
+
26
+ /**
27
+ * Represents a test scenario for a single API operation.
28
+ *
29
+ * This interface extends `AutoBeOpenApi.IEndpoint`, inheriting its HTTP
30
+ * method and path information, and adds two key properties:
31
+ *
32
+ * - `draft`: A free-form, human-readable test scenario description for the API
33
+ * endpoint.
34
+ * - `dependsOn`: A list of other API endpoints that must be invoked beforehand
35
+ * in order to prepare the context for this test. Each dependency includes
36
+ * the purpose of the dependency.
37
+ *
38
+ * This structure is intended to help organize test specifications for complex
39
+ * workflows and ensure that all prerequisites are explicitly declared.
40
+ */
41
+ export interface IScenario {
42
+ /**
43
+ * A detailed natural language description of how this API endpoint should
44
+ * be tested. This should include both successful and failure scenarios,
45
+ * business rule validations, edge cases, and any sequence of steps
46
+ * necessary to perform the test. A subsequent agent will use this draft to
47
+ * generate multiple test scenarios.
48
+ */
49
+ draft: string;
50
+
51
+ /**
52
+ * Descriptive function name derived from the user scenario.
53
+ *
54
+ * The function name serves as a concise, technical identifier that clearly
55
+ * represents the specific user scenario being described. It should be
56
+ * immediately understandable and directly correspond to the user situation
57
+ * without requiring additional context.
58
+ *
59
+ * ## Naming Convention
60
+ *
61
+ * - Must start with `test_` prefix (mandatory requirement)
62
+ * - Use snake_case formatting throughout
63
+ * - Include the primary user action (create, get, update, delete, list, etc.)
64
+ * - Specify the target resource (user, product, order, profile, etc.)
65
+ * - Add scenario-specific context (valid_data, invalid_email, not_found,
66
+ * etc.)
67
+ *
68
+ * ## Content Structure
69
+ *
70
+ * Function names should follow this pattern:
71
+ * `test_[user_action]_[resource]_[scenario_context]`
72
+ *
73
+ * Where:
74
+ *
75
+ * - `user_action`: What the user is trying to do
76
+ * - `resource`: What the user is interacting with
77
+ * - `scenario_context`: The specific situation or condition
78
+ *
79
+ * ## User-Focused Examples
80
+ *
81
+ * - `test_create_user_profile_with_complete_information` - User providing all
82
+ * available profile data
83
+ * - `test_retrieve_user_profile_when_profile_exists` - User accessing their
84
+ * existing profile
85
+ * - `test_update_user_email_with_valid_new_address` - User changing their
86
+ * email to a valid new one
87
+ * - `test_delete_user_account_when_user_lacks_permission` - User attempting
88
+ * account deletion without authorization
89
+ * - `test_search_user_profiles_with_pagination_preferences` - User browsing
90
+ * profiles with specific pagination
91
+ *
92
+ * ## Clarity Guidelines
93
+ *
94
+ * - Prioritize clarity over brevity
95
+ * - Avoid technical jargon or implementation terms
96
+ * - Use terminology that reflects user perspective
97
+ * - Ensure the name alone conveys the user's intent
98
+ * - Make it understandable to non-technical stakeholders
99
+ * - Keep consistent with user scenario description
100
+ *
101
+ * ## Single Endpoint Alignment
102
+ *
103
+ * Function names must reflect scenarios that:
104
+ *
105
+ * - Accomplish user goals through this single endpoint only
106
+ * - Don't imply dependency on other API operations
107
+ * - Represent complete user interactions
108
+ */
109
+ functionName: string;
110
+
111
+ /**
112
+ * A list of other API endpoints that must be executed before this test
113
+ * scenario. This helps express dependencies such as data creation or
114
+ * authentication steps required to reach the intended test state.
115
+ */
116
+ dependsOn: IDependsOn[];
117
+ }
118
+
119
+ export interface IDependsOn {
120
+ /** Target API endpoint that must be executed before the main operation. */
121
+ endpoint: AutoBeOpenApi.IEndpoint;
122
+
123
+ /**
124
+ * A concise exscenarioation of why this API call is required before
125
+ * executing the test for the main operation.
126
+ *
127
+ * Example: "Creates a category so that a product can be linked to it during
128
+ * creation."
129
+ */
130
+ purpose: string;
131
+ }
132
+ }
@@ -1,11 +1,11 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeOpenApi } from "@autobe/interface";
2
3
  import { v4 } from "uuid";
3
4
 
4
5
  import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
5
6
 
6
7
  export const transformTestCorrectHistories = (
7
- apiFiles: Record<string, string>,
8
- dtoFiles: Record<string, string>,
8
+ document: AutoBeOpenApi.IDocument | null,
9
9
  ): Array<
10
10
  IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
11
11
  > => {
@@ -33,15 +33,19 @@ export const transformTestCorrectHistories = (
33
33
  "- Keep all tests deterministic and reliable.",
34
34
  "",
35
35
  "## File References",
36
- "### API Files",
37
- "```typescript",
38
- JSON.stringify(apiFiles, null, 2),
39
- "```",
40
- "",
41
- "### DTO Files",
42
- "```typescript",
43
- JSON.stringify(dtoFiles, null, 2),
36
+ "### OpenAPI Like Document",
37
+ "```json",
38
+ JSON.stringify(document),
44
39
  "```",
40
+ // "### API Files",
41
+ // "```typescript",
42
+ // JSON.stringify(apiFiles, null, 2),
43
+ // "```",
44
+ // "",
45
+ // "### DTO Files",
46
+ // "```typescript",
47
+ // JSON.stringify(dtoFiles, null, 2),
48
+ // "```",
45
49
  "",
46
50
  "Now Fix the E2E test function based on the given error information.",
47
51
  "Only output a single `async function` named `test_api_{...}`. No explanation, no commentary.",
@@ -1,12 +1,15 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeTestScenarioEvent } from "@autobe/interface";
2
3
  import { v4 } from "uuid";
3
4
 
4
5
  import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
5
6
 
6
- export const transformTestProgressHistories = (
7
- apiFiles: Record<string, string>,
8
- dtoFiles: Record<string, string>,
9
- ): Array<
7
+ export const transformTestProgressHistories = (props: {
8
+ scenario: AutoBeTestScenarioEvent.IScenario;
9
+ dto: Record<string, string>;
10
+ sdk: Record<string, string>;
11
+ e2e: Record<string, string>;
12
+ }): Array<
10
13
  IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
11
14
  > => {
12
15
  return [
@@ -21,30 +24,30 @@ export const transformTestProgressHistories = (
21
24
  created_at: new Date().toISOString(),
22
25
  type: "assistantMessage",
23
26
  text: [
24
- "You are the world's best E2E test code generator.",
25
- "You will be given a **scenario**, and your job is to generate the corresponding **E2E test code** using only the provided API functions and DTOs.",
27
+ "Here is the list of input material composition.",
26
28
  "",
27
- "## Rules",
28
- "- Follow the base E2E test style strictly. Never use other frameworks like Jest or Mocha.",
29
- "- Use `TestValidator.equals(...)` and `typia.assert(...)` to verify results.",
30
- "- Use `HubApi.functional.XXX` for all API calls. These are defined in API Files.",
31
- "- Use helper functions like `generate_random_xxx(...)` **only if** they already exist in the base test imports.",
32
- "- Do not invent new helpers or use utilities that are not explicitly shown.",
33
- "- Keep all tests deterministic and reliable.",
29
+ "Make e2e test functions based on the following information.",
34
30
  "",
35
- "## File References",
36
- "### API Files",
37
- "```typescript",
38
- JSON.stringify(apiFiles, null, 2),
31
+ "## Secnario Plan",
32
+ "```json",
33
+ JSON.stringify(props.scenario),
39
34
  "```",
40
35
  "",
41
- "### DTO Files",
42
- "```typescript",
43
- JSON.stringify(dtoFiles, null, 2),
36
+ "## DTO Definitions",
37
+ "```json",
38
+ JSON.stringify(props.dto),
39
+ "```",
40
+ "",
41
+ "## API (SDK) Functions",
42
+ "```json",
43
+ JSON.stringify(props.sdk),
44
+ "```",
45
+ "",
46
+ "## E2E Mockup Functions",
47
+ "```json",
48
+ JSON.stringify(props.e2e),
44
49
  "```",
45
50
  "",
46
- "Now generate the E2E test function based on the given scenario.",
47
- "Only output a single `async function` named `test_api_{...}`. No explanation, no commentary.",
48
51
  ].join("\n"),
49
52
  },
50
53
  ];
@@ -1,5 +1,4 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
- import { AutoBeOpenApi } from "@autobe/interface";
3
2
  import { v4 } from "uuid";
4
3
 
5
4
  import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
@@ -7,8 +6,6 @@ import { AutoBeState } from "../../context/AutoBeState";
7
6
 
8
7
  export const transformTestScenarioHistories = (
9
8
  state: AutoBeState,
10
- endponits: AutoBeOpenApi.IEndpoint[],
11
- files: Record<string, string>,
12
9
  ): Array<
13
10
  IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
14
11
  > => {
@@ -87,47 +84,6 @@ export const transformTestScenarioHistories = (
87
84
  type: "systemMessage",
88
85
  text: AutoBeSystemPromptConstant.TEST,
89
86
  },
90
- {
91
- id: v4(),
92
- created_at: new Date().toISOString(),
93
- type: "systemMessage",
94
- text: [
95
- "# Result of Analyze Agent",
96
- "- The following document contains the user requirements that were extracted through conversations with the user by the Analyze Agent.",
97
- "- The database schema was designed based on these requirements, so you may refer to this document when writing test code or reviewing the schema.",
98
- "",
99
- `## User Request`,
100
- "",
101
- `- ${state.analyze.reason}`,
102
- "",
103
- `## Requirement Analysis Report`,
104
- "",
105
- "```json",
106
- JSON.stringify(state.analyze.files),
107
- "```",
108
- ].join("\n"),
109
- },
110
- {
111
- id: v4(),
112
- created_at: new Date().toISOString(),
113
- type: "systemMessage",
114
- text: [
115
- "# Result of Prisma Agent",
116
- "- Given the following database schema and entity-relationship diagram, write appropriate test code to validate the constraints and relationships defined in the schema. For example, if there is a unique column, include a test that ensures its uniqueness.",
117
- "- The test code should strictly adhere to the schema and relationships—no violations of constraints should occur.",
118
- "- Use the information from the schema and diagram to design meaningful and accurate test cases.",
119
- "",
120
- "## Prisma DB Schema",
121
- "```json",
122
- JSON.stringify(state.prisma.schemas),
123
- "```",
124
- "",
125
- "## Entity Relationship Diagrams",
126
- "```json",
127
- JSON.stringify(state.prisma.compiled.diagrams),
128
- "```",
129
- ].join("\n"),
130
- },
131
87
  {
132
88
  id: v4(),
133
89
  created_at: new Date().toISOString(),
@@ -145,40 +101,5 @@ export const transformTestScenarioHistories = (
145
101
  "```",
146
102
  ].join("\n"),
147
103
  },
148
- {
149
- id: v4(),
150
- created_at: new Date().toISOString(),
151
- type: "systemMessage",
152
- text: AutoBeSystemPromptConstant.TEST,
153
- },
154
- {
155
- id: v4(),
156
- created_at: new Date().toISOString(),
157
- type: "systemMessage",
158
- text: [
159
- `This is a description of different APIs.`,
160
- `Different APIs may have to be called to create one.`,
161
- `Check which functions have been developed.`,
162
- "```json",
163
- JSON.stringify(endponits, null, 2),
164
- "```",
165
- ].join("\n"),
166
- },
167
- {
168
- id: v4(),
169
- created_at: new Date().toISOString(),
170
- type: "systemMessage",
171
- text: [
172
- "Below is basically the generated test code,",
173
- "which is a test to verify that the API is simply called and successful.",
174
- "Since there is already an automatically generated API,",
175
- "when a user requests to create a test scenario, two or more APIs must be combined,",
176
- "but a test in which the currently given endpoint is the main must be created.",
177
- '"Input Test Files" should be selected from the list of files here.',
178
- "```json",
179
- JSON.stringify(files, null, 2),
180
- "```",
181
- ].join("\n"),
182
- },
183
104
  ];
184
105
  };
@@ -1,25 +1,63 @@
1
+ /**
2
+ * Interface defining behavioral configuration for AutoBeAgent localization and
3
+ * context.
4
+ *
5
+ * This interface customizes the agent's communication style, language
6
+ * preferences, and geographical context to provide personalized vibe coding
7
+ * experiences. The configuration enables culturally appropriate interactions
8
+ * and regionally aware development decisions throughout the automated
9
+ * development pipeline.
10
+ *
11
+ * Locale and timezone settings influence not only the language of communication
12
+ * but also contextual understanding of regulatory requirements, business
13
+ * practices, and temporal considerations that may affect requirements analysis,
14
+ * database design, API specifications, and implementation approaches.
15
+ *
16
+ * @author Samchon
17
+ */
1
18
  export interface IAutoBeConfig {
2
19
  /**
3
- * Locale of the A.I. chatbot.
20
+ * Language and cultural locale preference for AI agent communication.
4
21
  *
5
- * If you configure this property, the A.I. chatbot will conversate with the
6
- * given locale. You can get the locale value by
22
+ * Configures the language and cultural context for all AI assistant responses
23
+ * throughout the vibe coding process. When specified, the agent will
24
+ * communicate in the preferred language while respecting cultural conventions
25
+ * and linguistic nuances during requirements gathering, progress updates, and
26
+ * guidance provision.
27
+ *
28
+ * The locale setting also influences the agent's understanding of regional
29
+ * business practices, regulatory considerations, and cultural expectations
30
+ * that may impact software design decisions and implementation approaches.
31
+ *
32
+ * Common formats follow BCP 47 language tags such as "en-US", "ko-KR",
33
+ * "ja-JP", "zh-CN", "de-DE", etc. Platform-specific detection methods:
7
34
  *
8
35
  * - Browser: `navigator.language`
9
- * - NodeJS: `process.env.LANG.split(".")[0]`
36
+ * - Node.js: `process.env.LANG.split(".")[0]`
10
37
  *
11
- * @default your_locale
38
+ * @default System locale or "en" if unavailable
12
39
  */
13
40
  locale?: string;
14
41
 
15
42
  /**
16
- * Timezone of the A.I. chatbot.
43
+ * Geographic timezone for temporal context and time-sensitive operations.
44
+ *
45
+ * Provides timezone awareness for proper handling of time-related
46
+ * considerations during the vibe coding process. This includes scheduling
47
+ * references, temporal business logic requirements, timestamp handling in
48
+ * generated code, and time-based communications that need to be
49
+ * contextualized for the user's local time.
50
+ *
51
+ * Timezone awareness ensures that generated applications properly handle time
52
+ * zones, that scheduling-related requirements are interpreted correctly, and
53
+ * that temporal references in documentation and code comments reflect the
54
+ * user's geographical context.
17
55
  *
18
- * If you configure this property, the A.I. chatbot will consider the given
19
- * timezone. You can get the timezone value by
20
- * `Intl.DateTimeFormat().resolvedOptions().timeZone`.
56
+ * Format follows IANA Time Zone Database identifiers such as
57
+ * "America/New_York", "Asia/Seoul", "Europe/London", "Pacific/Auckland", etc.
58
+ * Platform detection: `Intl.DateTimeFormat().resolvedOptions().timeZone`
21
59
  *
22
- * @default your_timezone
60
+ * @default System timezone or "UTC" if unavailable
23
61
  */
24
62
  timezone?: string;
25
63
  }
@@ -4,10 +4,101 @@ import { ILlmSchema } from "@samchon/openapi";
4
4
  import { IAutoBeConfig } from "./IAutoBeConfig";
5
5
  import { IAutoBeVendor } from "./IAutoBeVendor";
6
6
 
7
+ /**
8
+ * Configuration properties for initializing an AutoBeAgent instance.
9
+ *
10
+ * This interface defines all the essential parameters required to create and
11
+ * configure an AutoBeAgent for vibe coding operations. The properties establish
12
+ * the AI model capabilities, vendor connectivity, compilation infrastructure,
13
+ * behavioral context, and optional session continuity through conversation
14
+ * histories.
15
+ *
16
+ * The configuration enables type-safe AI function calling through
17
+ * model-specific schema generation, ensures compatibility with various AI
18
+ * service providers, and provides the compilation tools necessary for the
19
+ * sophisticated AST-based development pipeline that transforms conversations
20
+ * into working software.
21
+ *
22
+ * @author Samchon
23
+ */
7
24
  export interface IAutoBeProps<Model extends ILlmSchema.Model> {
25
+ /**
26
+ * AI model type specification for type-safe function calling schema
27
+ * generation.
28
+ *
29
+ * Determines the specific AI model schema used for generating function
30
+ * calling interfaces through
31
+ * [`typia.llm.application()`](https://typia.io/docs/llm/application). This
32
+ * type parameter ensures compile-time type safety and enables model-specific
33
+ * optimizations in the AI function calling interface generation process.
34
+ *
35
+ * Common values include "chatgpt" for OpenAI models, "claude" for Anthropic
36
+ * models, "deepseek" for DeepSeek models, and "llama" for Meta Llama models.
37
+ * The choice affects function calling capabilities, parameter limitations,
38
+ * and schema requirements throughout the vibe coding pipeline.
39
+ *
40
+ * Note that Google Gemini ("gemini") is not supported due to its lack of
41
+ * reference types and union types support required for OpenAPI document
42
+ * composition in the vibe coding process.
43
+ */
8
44
  model: Model;
45
+
46
+ /**
47
+ * AI vendor configuration for service provider integration.
48
+ *
49
+ * Defines the complete AI service connection including the OpenAI SDK
50
+ * instance, model identifier, request options, and concurrency controls. This
51
+ * configuration enables the AutoBeAgent to connect with various AI providers
52
+ * while maintaining consistent functionality across the entire automated
53
+ * development workflow.
54
+ *
55
+ * The vendor settings determine the AI capabilities available for
56
+ * requirements analysis, database design, API specification, testing, and
57
+ * implementation phases of the vibe coding process.
58
+ */
9
59
  vendor: IAutoBeVendor;
60
+
61
+ /**
62
+ * Compilation infrastructure for TypeScript, Prisma, and OpenAPI operations.
63
+ *
64
+ * Provides the essential compilation tools required for the sophisticated
65
+ * AST-based development pipeline. The compiler handles validation,
66
+ * transformation, and code generation across all development phases including
67
+ * Prisma schema compilation, OpenAPI document validation, and TypeScript code
68
+ * compilation.
69
+ *
70
+ * For high-performance scenarios with multiple concurrent users, the compiler
71
+ * can be separated into dedicated worker processes to prevent blocking the
72
+ * main agent during computationally intensive compilation operations.
73
+ */
10
74
  compiler: IAutoBeCompiler;
75
+
76
+ /**
77
+ * Optional conversation and development histories for session continuation.
78
+ *
79
+ * Enables resuming previous vibe coding sessions by providing the
80
+ * chronological record of past conversations, development activities, and
81
+ * generated artifacts. When provided, the agent reconstructs its internal
82
+ * state from these histories, allowing seamless continuation of development
83
+ * work.
84
+ *
85
+ * This capability supports iterative development workflows where users can
86
+ * return to modify, enhance, or extend previously generated applications
87
+ * while maintaining full context of earlier decisions and implementations.
88
+ */
11
89
  histories?: AutoBeHistory[] | undefined;
90
+
91
+ /**
92
+ * Optional behavioral configuration for localization and context.
93
+ *
94
+ * Customizes the agent's communication style, language preferences, and
95
+ * geographical context to provide personalized vibe coding experiences.
96
+ * Configuration includes locale settings for internationalized responses and
97
+ * timezone information for temporal context awareness.
98
+ *
99
+ * These settings influence how the agent communicates with users, interprets
100
+ * regional requirements (such as regulatory considerations), and handles
101
+ * time-sensitive operations throughout the development process.
102
+ */
12
103
  config?: IAutoBeConfig | undefined;
13
104
  }
@@ -1,47 +1,89 @@
1
1
  import OpenAI from "openai";
2
2
 
3
3
  /**
4
- * LLM service vendor for Agentica Chat.
4
+ * Interface representing AI vendor configuration for the AutoBeAgent.
5
5
  *
6
- * `IAgenticaVendor` is a type represents an LLM (Large Language Model) vendor
7
- * of the {@link AutoBeAgent}.
6
+ * Defines the connection parameters and settings required to integrate with AI
7
+ * service providers that power the vibe coding pipeline. While utilizing the
8
+ * OpenAI SDK as the connection interface, this configuration supports various
9
+ * LLM vendors beyond OpenAI through flexible endpoint and authentication
10
+ * configuration, enabling integration with Claude, DeepSeek, Meta Llama, and
11
+ * other providers that follow OpenAI-compatible API patterns.
8
12
  *
9
- * Currently, {@link AutoBeAgent} supports OpenAI SDK. However, it does not mean
10
- * that you can use only OpenAI's GPT model in the {@link AutoBeAgent}. The
11
- * OpenAI SDK is just a connection tool to the LLM vendor's API, and you can use
12
- * other LLM vendors by configuring its `baseURL` and API key.
13
+ * The vendor configuration determines the AI capabilities available throughout
14
+ * the entire automated development workflow, from requirements analysis and
15
+ * database design through API specification, testing, and final implementation.
16
+ * Different vendors may offer varying performance characteristics, cost
17
+ * structures, and feature support that can be optimized for specific vibe
18
+ * coding needs.
13
19
  *
14
- * Therefore, if you want to use another LLM vendor like Claude or Gemini,
15
- * please configure the `baseURL` to the {@link api}, and set
16
- * {@link IAutoBeProps.model schema model} as "cluade" or "gemini".
20
+ * Concurrent request management is built-in to prevent API rate limiting and
21
+ * optimize resource utilization across multiple development phases and parallel
22
+ * operations within the vibe coding pipeline.
17
23
  *
18
24
  * @author Samchon
19
25
  */
20
26
  export interface IAutoBeVendor {
21
- /** OpenAI API instance. */
27
+ /**
28
+ * OpenAI SDK instance configured for the target AI vendor.
29
+ *
30
+ * Provides the API connection interface used by the AutoBeAgent to
31
+ * communicate with AI services. While this uses the OpenAI SDK, it can be
32
+ * configured to connect with various LLM providers by setting the appropriate
33
+ * `baseURL` and authentication credentials. The SDK serves as a universal
34
+ * connector that abstracts the underlying API communication protocols.
35
+ *
36
+ * For non-OpenAI vendors, configure the SDK with the vendor's API endpoint
37
+ * and authentication requirements to enable seamless integration with the
38
+ * vibe coding system.
39
+ */
22
40
  api: OpenAI;
23
41
 
24
42
  /**
25
- * Chat model to be used.
43
+ * Specific model identifier to use for AI operations.
44
+ *
45
+ * Specifies the exact model name or identifier that should be used for vibe
46
+ * coding tasks. Supports both official OpenAI chat models and custom model
47
+ * identifiers for third-party hosting services, cloud providers, or
48
+ * alternative LLM vendors. The model choice significantly impacts the
49
+ * quality, performance, and cost of the automated development process.
26
50
  *
27
- * `({}) & string` means to support third party hosting cloud(eg. openRouter,
28
- * aws)
51
+ * Examples include "gpt-4", "gpt-3.5-turbo" for OpenAI, or vendor-specific
52
+ * identifiers like "claude-3-sonnet", "deepseek-chat-v3", "llama3.3-70b" when
53
+ * using alternative providers through compatible APIs.
29
54
  */
30
55
  model: OpenAI.ChatModel | ({} & string);
31
56
 
32
- /** Options for the request. */
57
+ /**
58
+ * Optional request configuration for API calls.
59
+ *
60
+ * Additional request options that will be applied to all API calls made
61
+ * through the OpenAI SDK. This can include custom headers, timeouts, retry
62
+ * policies, or other HTTP client configuration that may be required for
63
+ * specific vendor integrations or enterprise environments.
64
+ *
65
+ * These options provide fine-grained control over the API communication
66
+ * behavior and can be used to optimize performance or meet specific
67
+ * infrastructure requirements.
68
+ */
33
69
  options?: OpenAI.RequestOptions | undefined;
34
70
 
35
71
  /**
36
- * Number of concurrent requests allowed.
72
+ * Maximum number of concurrent API requests allowed.
73
+ *
74
+ * Controls the concurrency level for AI API calls to prevent rate limiting,
75
+ * manage resource consumption, and optimize system performance. The vibe
76
+ * coding pipeline may make multiple parallel requests during development
77
+ * phases, and this setting ensures controlled resource utilization.
37
78
  *
38
- * If you configure this property, {@link AutoBeAgent} will constrain the
39
- * number of concurrent requests to the LLM vendor. If you want to share the
40
- * semaphore instance with other agents, you can directly assign the
41
- * {@link Semaphore} instance to this property.
79
+ * A reasonable default provides balanced performance while respecting typical
80
+ * API rate limits. Lower values reduce resource consumption but may slow
81
+ * development progress, while higher values can improve performance but risk
82
+ * hitting rate limits or overwhelming the AI service.
42
83
  *
43
- * Otherwise, it will not limit the number of concurrent requests, and the
44
- * {@link AutoBeAgent} will send requests asynchronously without any limit.
84
+ * Set to undefined to disable concurrency limiting, allowing unlimited
85
+ * parallel requests (use with caution based on your API limits and
86
+ * infrastructure capacity).
45
87
  *
46
88
  * @default 16
47
89
  */