@autobe/agent 0.14.5 → 0.15.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 (178) hide show
  1. package/lib/AutoBeMockAgent.js +1 -1
  2. package/lib/AutoBeMockAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -9
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/index.mjs +3557 -2635
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +4 -9
  8. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -1
  9. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -8
  10. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  11. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +1 -1
  12. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -1
  13. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +1 -1
  14. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -1
  15. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
  16. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +65 -0
  17. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
  18. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
  19. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
  20. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
  21. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +4 -0
  22. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +28 -0
  23. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
  24. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
  25. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
  26. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
  27. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
  28. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +28 -0
  29. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
  30. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
  31. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +63 -0
  32. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
  33. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
  34. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
  35. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
  36. package/lib/orchestrate/interface/orchestrateInterface.js +14 -9
  37. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  38. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
  39. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +13 -40
  40. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  41. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +3 -2
  42. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +52 -32
  43. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  44. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
  45. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +350 -0
  46. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
  47. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +252 -226
  48. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  49. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
  50. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +411 -0
  51. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
  52. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
  53. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js +3 -0
  54. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
  55. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +23 -0
  56. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js +3 -0
  57. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
  58. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
  59. package/lib/orchestrate/{realize/structures/IAutoBeRealizeDecoratorApplication.js → interface/structures/IAutoBeInterfaceGroupApplication.js} +1 -1
  60. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
  61. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +122 -0
  62. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js +3 -0
  63. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
  64. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
  65. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js +3 -0
  66. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
  67. package/lib/orchestrate/interface/{OpenApiEndpointComparator.d.ts → utils/OpenApiEndpointComparator.d.ts} +1 -0
  68. package/lib/orchestrate/interface/{OpenApiEndpointComparator.js → utils/OpenApiEndpointComparator.js} +6 -0
  69. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
  70. package/lib/orchestrate/realize/orchestrateRealize.js +17 -3
  71. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  72. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +81 -88
  73. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  74. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
  75. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +513 -0
  76. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
  77. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +3 -2
  78. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
  79. package/lib/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.d.ts → IAutoBeRealizeAuthorizationApplication.d.ts} +9 -9
  80. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js +3 -0
  81. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
  82. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +33 -0
  83. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +3 -0
  84. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
  85. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +34 -13
  86. package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +4 -0
  87. package/lib/orchestrate/realize/transformRealizeAuthorization.js +43 -0
  88. package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +1 -0
  89. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
  90. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +71 -0
  91. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
  92. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +5 -5
  93. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
  94. package/lib/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
  95. package/lib/orchestrate/realize/utils/InternalFileSystem.js +17 -0
  96. package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
  97. package/lib/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
  98. package/lib/orchestrate/realize/utils/ProviderFileSystem.js +8 -0
  99. package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
  100. package/lib/orchestrate/realize/utils/replaceImportStatements.js +2 -2
  101. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  102. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +36 -36
  103. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -1
  104. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +1 -0
  105. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
  106. package/lib/orchestrate/test/orchestrateTestCorrect.js +2 -0
  107. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  108. package/lib/orchestrate/test/orchestrateTestScenario.js +29 -13
  109. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  110. package/lib/orchestrate/test/orchestrateTestWrite.js +2 -0
  111. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  112. package/lib/orchestrate/test/transformTestWriteHistories.js +3 -2
  113. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  114. package/lib/utils/arrayToRecord.d.ts +17 -0
  115. package/lib/utils/arrayToRecord.js +19 -0
  116. package/lib/utils/arrayToRecord.js.map +1 -0
  117. package/lib/utils/backoffRetry.js +0 -1
  118. package/lib/utils/backoffRetry.js.map +1 -1
  119. package/package.json +6 -5
  120. package/src/AutoBeMockAgent.ts +1 -1
  121. package/src/constants/AutoBeSystemPromptConstant.ts +11 -9
  122. package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +1 -3
  123. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +1 -3
  124. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +75 -0
  125. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +69 -0
  126. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +34 -0
  127. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +32 -0
  128. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +34 -0
  129. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +66 -0
  130. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +34 -0
  131. package/src/orchestrate/interface/orchestrateInterface.ts +17 -8
  132. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +22 -97
  133. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +48 -55
  134. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +109 -0
  135. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +83 -120
  136. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +197 -0
  137. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +58 -0
  138. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +24 -0
  139. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +112 -0
  140. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +125 -0
  141. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +76 -0
  142. package/src/orchestrate/interface/{OpenApiEndpointComparator.ts → utils/OpenApiEndpointComparator.ts} +8 -0
  143. package/src/orchestrate/realize/orchestrateRealize.ts +25 -3
  144. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -54
  145. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +179 -0
  146. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +3 -6
  147. package/src/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.ts → IAutoBeRealizeAuthorizationApplication.ts} +11 -9
  148. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +40 -0
  149. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +42 -24
  150. package/src/orchestrate/realize/{transformRealizeDecorator.ts → transformRealizeAuthorization.ts} +13 -2
  151. package/src/orchestrate/realize/{transformRealizeDecoratorCorrectHistories.ts → transformRealizeAuthorizationCorrectHistories.ts} +15 -7
  152. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +4 -4
  153. package/src/orchestrate/realize/utils/InternalFileSystem.ts +12 -0
  154. package/src/orchestrate/realize/utils/ProviderFileSystem.ts +4 -0
  155. package/src/orchestrate/realize/utils/replaceImportStatements.ts +2 -2
  156. package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +59 -53
  157. package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +1 -0
  158. package/src/orchestrate/test/orchestrateTestCorrect.ts +3 -0
  159. package/src/orchestrate/test/orchestrateTestScenario.ts +4 -2
  160. package/src/orchestrate/test/orchestrateTestWrite.ts +8 -1
  161. package/src/utils/arrayToRecord.ts +49 -0
  162. package/src/utils/backoffRetry.ts +0 -1
  163. package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +0 -1
  164. package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +0 -4
  165. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +0 -473
  166. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +0 -1
  167. package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +0 -3
  168. package/lib/orchestrate/interface/transformInterfaceHistories.js +0 -149
  169. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +0 -1
  170. package/lib/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.js.map +0 -1
  171. package/lib/orchestrate/realize/transformRealizeDecorator.d.ts +0 -4
  172. package/lib/orchestrate/realize/transformRealizeDecorator.js +0 -32
  173. package/lib/orchestrate/realize/transformRealizeDecorator.js.map +0 -1
  174. package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.d.ts +0 -5
  175. package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js +0 -62
  176. package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js.map +0 -1
  177. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +0 -292
  178. package/src/orchestrate/interface/transformInterfaceHistories.ts +0 -152
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformInterfaceSchemaHistories = void 0;
4
+ const uuid_1 = require("uuid");
5
+ const transformInterfaceAssetHistories_1 = require("./transformInterfaceAssetHistories");
6
+ const transformInterfaceSchemaHistories = (state, operations) => [
7
+ {
8
+ type: "systemMessage",
9
+ id: (0, uuid_1.v4)(),
10
+ created_at: new Date().toISOString(),
11
+ text: "# AutoAPI Schema Agent System Prompt\n\nYou are AutoAPI Schema Agent, an expert in creating comprehensive schema definitions for OpenAPI specifications in the `AutoBeOpenApi.IJsonSchemaDescriptive` format. Your specialized role focuses on the third phase of a multi-agent orchestration process for large-scale API design.\n\nYour mission is to analyze the provided API operations, paths, methods, Prisma schema files, and ERD diagrams to construct a complete and consistent set of schema definitions that accurately represent all entities and their relationships in the system.\n\n## 1. Context and Your Role in the Multi-Agent Process\n\nYou are the third agent in a three-phase process:\n1. **Phase 1** (completed): Analysis of requirements, Prisma schema, and ERD to define API paths and methods\n2. **Phase 2** (completed): Creation of detailed API operations based on the defined paths and methods\n3. **Phase 3** (your role): Construction of comprehensive schema definitions for all entities\n\nYou will receive:\n- The complete list of API operations from Phase 2\n- The original Prisma schema with detailed comments\n- ERD diagrams in Mermaid format\n- Requirement analysis documents\n\n## 2. Primary Responsibilities\n\nYour specific tasks are:\n\n1. **Extract All Entity Types**: Analyze all API operations and identify every distinct entity type referenced\n2. **Define Complete Schema Definitions**: Create detailed schema definitions for every entity and its variants\n3. **Maintain Type Naming Conventions**: Follow the established type naming patterns\n4. **Ensure Schema Completeness**: Verify that ALL entities in the Prisma schema have corresponding schema definitions\n5. **Create Type Variants**: Define all necessary type variants for each entity (.ICreate, .IUpdate, .ISummary, etc.)\n6. **Document Thoroughly**: Provide comprehensive descriptions for all schema definitions\n7. **Validate Consistency**: Ensure schema definitions align with API operations\n8. **Use Named References Only**: NEVER use inline/anonymous object definitions - ALL object types must be defined as named types in the schemas record and referenced using $ref\n\n## 3. Schema Design Principles\n\n### 3.1. Type Naming Conventions\n\n- **Main Entity Types**: Use `IEntityName` format\n- **Operation-Specific Types**:\n - `IEntityName.ICreate`: Request body for creation operations (POST)\n - `IEntityName.IUpdate`: Request body for update operations (PUT or PATCH)\n - `IEntityName.ISummary`: Simplified response version with essential properties\n - `IEntityName.IRequest`: Request parameters for list operations (search/filter/pagination)\n - `IEntityName.IAbridge`: Intermediate view with more detail than Summary but less than full entity\n - `IEntityName.IInvert`: Alternative representation of an entity from a different perspective\n- **Container Types**: \n - `IPageIEntityName`: Paginated results container (use the standard IPage structure)\n\n### 3.2. Schema Definition Requirements\n\n- **Completeness**: Include ALL properties from the Prisma schema for each entity\n- **Type Accuracy**: Map Prisma types to appropriate OpenAPI types and formats\n- **Required Fields**: Accurately mark required fields based on Prisma schema constraints\n- **Relationships**: Properly handle entity relationships (references to other entities)\n- **Enumerations**: Define all enum types referenced in entity schemas\n- **Detailed Documentation**: \n - Schema descriptions must reference related Prisma schema table comments\n - Property descriptions must reference related Prisma schema column comments\n - All descriptions must be organized in multiple paragraphs for better readability\n- **Named References Only**: \n - Every object type MUST be defined as a named type in the schemas record\n - NEVER use inline/anonymous object definitions anywhere in the schema\n - All property types that are objects must use $ref to reference a named type\n - This applies to EVERY object in the schema, including nested objects and arrays of objects\n\n### 3.3. \uD83D\uDD34 CRITICAL Security Requirements\n\n#### Response Types - NEVER expose sensitive fields:\n- **Password fields**: NEVER include fields like `password`, `hashed_password`, `encrypted_password`, `salt`, etc. in ANY response type\n- **Security tokens**: NEVER expose `refresh_token`, `api_key`, `secret_key`, or similar security credentials\n- **Internal system fields**: Avoid exposing internal implementation details like `password_reset_token`, `email_verification_code`\n- **Sensitive personal data**: Be cautious with fields containing sensitive information based on your domain\n\n**Example of FORBIDDEN response properties**:\n```typescript\n// \u274C NEVER include these in response types\ninterface IUser {\n id: string;\n email: string;\n hashed_password: string; // FORBIDDEN\n salt: string; // FORBIDDEN\n refresh_token: string; // FORBIDDEN\n api_secret: string; // FORBIDDEN\n}\n\n// \u2705 Correct response type\ninterface IUser {\n id: string;\n email: string;\n name: string;\n created_at: string;\n // Password and security fields are intentionally omitted\n}\n```\n\n#### Request Types - NEVER accept actor IDs directly:\n- **Actor identification**: NEVER accept fields like `user_id`, `member_id`, `creator_id`, `author_id` in request bodies\n- **Authentication source**: The authenticated user's identity comes from the authentication decorator, NOT from request body\n- **Security principle**: Clients should NEVER be able to specify \"who they are\" - this must come from verified authentication\n\n**Example of FORBIDDEN request properties**:\n```typescript\n// \u274C NEVER accept actor IDs in request types\ninterface IPostCreate {\n title: string;\n content: string;\n author_id: string; // FORBIDDEN - comes from authentication\n created_by: string; // FORBIDDEN - comes from authentication\n}\n\n// \u2705 Correct request type\ninterface IPostCreate {\n title: string;\n content: string;\n category_id: string; // OK - selecting a category\n // author_id will be set by the server using authenticated user info\n}\n```\n\n**Why this matters**:\n1. **Security**: Prevents users from impersonating others or claiming false ownership\n2. **Data integrity**: Ensures the true actor is recorded for audit trails\n3. **Authorization**: Enables proper ownership verification in provider functions\n\n**Remember**: The authenticated user information is provided by the decorator at the controller level and passed to the provider function - it should NEVER come from client input.\n\n### 3.4. Standard Type Definitions\n\nFor paginated results, use the standard `IPage<T>` interface:\n\n```typescript\n/**\n * A page.\n *\n * Collection of records with pagination information.\n *\n * @author Samchon\n */\nexport interface IPage<T extends object> {\n /**\n * Page information.\n */\n pagination: IPage.IPagination;\n\n /**\n * List of records.\n */\n data: T[];\n}\nexport namespace IPage {\n /**\n * Page information.\n */\n export interface IPagination {\n /**\n * Current page number.\n */\n current: number & tags.Type<\"uint32\">;\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit: number & tags.Type<\"uint32\">;\n\n /**\n * Total records in the database.\n */\n records: number & tags.Type<\"uint32\">;\n\n /**\n * Total pages.\n *\n * Equal to {@link records} / {@link limit} with ceiling.\n */\n pages: number & tags.Type<\"uint32\">;\n }\n\n /**\n * Page request data\n */\n export interface IRequest {\n /**\n * Page number.\n */\n page?: null | (number & tags.Type<\"uint32\">);\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit?: null | (number & tags.Type<\"uint32\">);\n }\n}\n```\n\n## 4. Implementation Strategy\n\n### 4.1. Comprehensive Entity Identification\n\n1. **Extract All Entity References**:\n - Analyze all API operation paths for entity identifiers\n - Examine request and response bodies in API operations\n - Review the Prisma schema to identify ALL entities\n\n2. **Create Entity Tracking System**:\n - List ALL entities from the Prisma schema\n - Cross-reference with entities mentioned in API operations\n - Identify any entities that might be missing schema definitions\n\n### 4.2. Schema Definition Process\n\n1. **For Each Entity**:\n - Define the main entity schema (`IEntityName`)\n - Create all necessary variant types based on API operations\n - Ensure all properties are documented with descriptions from Prisma schema\n - Mark required fields based on Prisma schema constraints\n - **CRITICAL**: Apply security filtering - remove sensitive fields from response types\n\n2. **For Relationship Handling**:\n - Identify all relationships from the ERD and Prisma schema\n - Define appropriate property types for relationships (IDs, nested objects, arrays)\n - Document relationship constraints and cardinality\n - **IMPORTANT**: For \"belongs to\" relationships, never accept the owner ID in requests\n\n3. **For Variant Types**:\n - Create `.ICreate` types with appropriate required/optional fields for creation\n - **NEVER include**: creator_id, author_id, user_id, created_by fields\n - These fields will be populated from authenticated user context\n - Define `.IUpdate` types with all fields made optional for updates\n - **NEVER include**: updater_id, modified_by, last_updated_by fields\n - **NEVER allow**: changing ownership fields like author_id or creator_id\n - Build `.ISummary` types with essential fields for list views\n - Include only safe, public-facing properties\n - Define `.IRequest` types with search/filter/sort parameters\n - May include filters like \"my_posts_only\" but not \"user_id\" parameters\n\n4. **Security Checklist for Each Type**:\n - \u2713 No password or hash fields in any response type\n - \u2713 No security tokens or keys in any response type\n - \u2713 No actor ID fields in any request type\n - \u2713 No internal system fields exposed in responses\n - \u2713 Ownership fields are read-only (never in request types)\n\n### 4.3. Schema Completeness Verification\n\n1. **Entity Coverage Check**:\n - Verify every entity in the Prisma schema has at least one schema definition\n - Check that all entities referenced in API operations have schema definitions\n\n2. **Property Coverage Check**:\n - Ensure all properties from the Prisma schema are included in entity schemas\n - Verify property types align with Prisma schema definitions\n\n3. **Variant Type Verification**:\n - Confirm necessary variant types exist based on API operations\n - Ensure variant types have appropriate property subsets and constraints\n\n## 5. Documentation Quality Requirements\n\n### 5.1. **Schema Type Descriptions**\n- Must reference related Prisma schema table description comments\n- Must be extremely detailed and comprehensive\n- Must be organized in multiple paragraphs\n- Should explain the entity's role in the business domain\n- Should describe relationships with other entities\n\n### 5.2. **Property Descriptions**\n- Must reference related Prisma schema column description comments\n- Must explain the purpose, constraints, and format of each property\n- Should note business rules that apply to the property\n- Should provide examples when helpful\n- Should use multiple paragraphs for complex properties\n\n## 6. Output Format\n\nYour output should be the complete `schemas` record of the OpenAPI document:\n\n```typescript\nconst schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive> = {\n // Main entity types\n IEntityName: { \n type: \"object\", \n properties: {\n propertyName: {\n type: \"string\",\n description: \"Detailed property description referencing Prisma schema column comments.\\n\\nMultiple paragraphs where appropriate.\"\n }\n // ...more properties\n // SECURITY: Never include password, hashed_password, salt, or other sensitive fields in response types\n },\n required: [...],\n description: \"Extremely detailed explanation about IEntityName referencing Prisma schema table comments.\\n\\nMultiple paragraphs focusing on different aspects of the entity.\",\n },\n // Variant types\n \"IEntityName.ICreate\": { \n // SECURITY: Never include author_id, creator_id, user_id - these come from authentication context\n ... \n },\n \"IEntityName.IUpdate\": { \n // SECURITY: Never allow updating ownership fields like author_id or creator_id\n ... \n },\n \"IEntityName.ISummary\": { ... },\n \"IEntityName.IRequest\": { ... },\n \n // Repeat for ALL entities\n \n // Standard types\n \"IPage\": { ... },\n \"IPage.IPagination\": { ... },\n \"IPage.IRequest\": { ... },\n \n // Enumerations\n \"EEnumName\": { ... }\n}\n```\n\n## 7. Critical Success Factors\n\n### 7.1. Absolute Completeness Principles\n\n- **Process ALL Entities**: EVERY entity defined in the Prisma schema MUST have corresponding schema definitions.\n- **Complete Property Coverage**: ALL properties of each entity MUST be included in schema definitions.\n- **Variant Type Comprehensiveness**: ALL necessary variant types MUST be defined based on API operations.\n- **No Simplification**: Complex entities or relationships MUST be faithfully represented without simplification.\n- **Verification of Completeness**: Before final output, verify that ALL entities and properties have been defined.\n\n### 7.2. High-Volume Processing Strategy\n\n- **Batch Processing**: If there are many entities, process them in groups, but ALL groups MUST be completed.\n- **No Prioritization**: ALL entities and their properties have equal importance and must be processed.\n- **Systematic Approach**: Use a methodical approach to ensure no entity or property is overlooked.\n- **Detailed Tracking**: Maintain a tracking system to verify completeness of schema definitions.\n\n### 7.3. Critical Warnings\n\n- **Partial Implementation Prohibited**: \"Defining schemas for only some entities and omitting others\" is a CRITICAL ERROR.\n- **Property Omission Prohibited**: \"Including only some properties of an entity\" is a SERIOUS ERROR.\n- **No Simplification**: \"Simplifying complex entities or relationships\" is NOT ACCEPTABLE.\n- **Ignore Capacity Limitations**: Processing only some entities due to their quantity is a SERIOUS ERROR.\n- **Named Types Required**: Using inline/anonymous object definitions instead of named type references ($ref) is a CRITICAL ERROR. EVERY object type must be defined in the schemas record and referenced by name.\n- **Security Violations**: Including password fields in responses or actor IDs in requests is a CRITICAL SECURITY ERROR.\n- **Authentication Bypass**: Accepting user identity from request body instead of authentication context is a CRITICAL SECURITY ERROR.\n\n## 8. Execution Process\n\n1. **Initialization**:\n - Analyze all input data (API operations, Prisma schema, ERD)\n - Create a complete inventory of entities and their relationships\n\n2. **Schema Development**:\n - Systematically define schema definitions for each entity and its variants\n - Document all definitions and properties thoroughly\n\n3. **Verification**:\n - Validate completeness against the Prisma schema\n - Verify consistency with API operations\n - Ensure all relationships are properly handled\n\n4. **Output Generation**:\n - Produce the complete `schemas` record in the required format\n - Verify the output meets all quality and completeness requirements\n\nRemember that your role is CRITICAL to the success of the entire API design process. The schemas you define will be the foundation for ALL data exchange in the API. Thoroughness, accuracy, and completeness are your highest priorities.\n\n## 9. Integration with Previous Phases\n\n- Ensure your schema definitions align perfectly with the API operations defined in Phase 2\n- Reference the same entities and property names used in the API paths from Phase 1\n- Maintain consistency in naming, typing, and structure throughout the entire API design\n\n## 10. Final Output Format\n\nYour final output should be the complete `schemas` record that can be directly integrated with the API operations from Phase 2 to form a complete `AutoBeOpenApi.IDocument` object.\n\nAlways aim to create schema definitions that are intuitive, well-documented, and accurately represent the business domain. Your schema definitions should meet ALL business requirements while being extensible and maintainable. Remember to define schemas for EVERY SINGLE independent entity table in the Prisma schema. NO ENTITY OR PROPERTY SHOULD BE OMITTED FOR ANY REASON." /* AutoBeSystemPromptConstant.INTERFACE_SCHEMA */,
12
+ },
13
+ ...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(state),
14
+ {
15
+ type: "assistantMessage",
16
+ id: (0, uuid_1.v4)(),
17
+ created_at: new Date().toISOString(),
18
+ text: [
19
+ "Here is the list of API operations you have to implement its types:",
20
+ "",
21
+ "```json",
22
+ JSON.stringify(operations),
23
+ "```",
24
+ ].join("\n"),
25
+ },
26
+ ];
27
+ exports.transformInterfaceSchemaHistories = transformInterfaceSchemaHistories;
28
+ //# sourceMappingURL=transformInterfaceSchemaHistories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformInterfaceSchemaHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,iCAAiC,GAAG,CAC/C,KAAkB,EAClB,UAAsC,EAGtC,EAAE,CAAC;IACH;QACE,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,gkhBAA6C;KAClD;IACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC;IAC1C;QACE,IAAI,EAAE,kBAAkB;QACxB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE;YACJ,qEAAqE;YACrE,EAAE;YACF,SAAS;YACT,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;YAC1B,KAAK;SACN,CAAC,IAAI,CAAC,IAAI,CAAC;KACb;CACF,CAAC;AAzBW,QAAA,iCAAiC,qCAyB5C"}
@@ -12,11 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.orchestrateInterface = void 0;
13
13
  const uuid_1 = require("uuid");
14
14
  const orchestrateInterfaceComplement_1 = require("./orchestrateInterfaceComplement");
15
- const orchestrateInterfaceComponents_1 = require("./orchestrateInterfaceComponents");
16
15
  const orchestrateInterfaceEndpoints_1 = require("./orchestrateInterfaceEndpoints");
16
+ const orchestrateInterfaceGroups_1 = require("./orchestrateInterfaceGroups");
17
17
  const orchestrateInterfaceOperations_1 = require("./orchestrateInterfaceOperations");
18
+ const orchestrateInterfaceSchemas_1 = require("./orchestrateInterfaceSchemas");
18
19
  const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
19
- var _a, _b, _c, _d, _e, _f;
20
+ var _a, _b, _c, _d, _e, _f, _g, _h;
20
21
  // ENDPOINTS
21
22
  const start = new Date();
22
23
  ctx.dispatch({
@@ -25,7 +26,7 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
25
26
  reason: props.reason,
26
27
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
27
28
  });
28
- const init = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx);
29
+ const init = yield (0, orchestrateInterfaceGroups_1.orchestrateInterfaceGroups)(ctx);
29
30
  if (init.type === "assistantMessage") {
30
31
  ctx.dispatch(init);
31
32
  ctx.histories().push(init);
@@ -33,21 +34,25 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
33
34
  }
34
35
  else
35
36
  ctx.dispatch(init);
36
- // OPERATIONS
37
- const operations = yield (0, orchestrateInterfaceOperations_1.orchestrateInterfaceOperations)(ctx, init.endpoints);
37
+ // ENDPOINTS & OPERATIONS
38
+ const endpoints = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx, init.groups);
39
+ const operations = yield (0, orchestrateInterfaceOperations_1.orchestrateInterfaceOperations)(ctx, endpoints);
38
40
  // TYPE SCHEMAS
39
41
  const document = {
40
42
  operations,
41
- components: yield (0, orchestrateInterfaceComponents_1.orchestrateInterfaceComponents)(ctx, operations),
43
+ components: {
44
+ authorization: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.roles) !== null && _d !== void 0 ? _d : [],
45
+ schemas: yield (0, orchestrateInterfaceSchemas_1.orchestrateInterfaceSchemas)(ctx, operations),
46
+ },
42
47
  };
43
- document.components = yield (0, orchestrateInterfaceComplement_1.orchestrateInterfaceComplement)(ctx, document);
48
+ document.components.schemas = yield (0, orchestrateInterfaceComplement_1.orchestrateInterfaceComplement)(ctx, document);
44
49
  // DO COMPILE
45
50
  const result = {
46
51
  type: "interface",
47
52
  id: (0, uuid_1.v4)(),
48
53
  document,
49
54
  reason: props.reason,
50
- step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
55
+ step: (_f = (_e = ctx.state().analyze) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
51
56
  created_at: start.toISOString(),
52
57
  completed_at: new Date().toISOString(),
53
58
  };
@@ -58,7 +63,7 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
58
63
  document: result.document,
59
64
  created_at: start.toISOString(),
60
65
  reason: props.reason,
61
- step: (_f = (_e = ctx.state().analyze) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
66
+ step: (_h = (_g = ctx.state().analyze) === null || _g === void 0 ? void 0 : _g.step) !== null && _h !== void 0 ? _h : 0,
62
67
  });
63
68
  return result;
64
69
  });
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateInterface.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA,+BAA0B;AAI1B,qFAAkF;AAClF,qFAAkF;AAClF,mFAAgF;AAChF,qFAAkF;AAE3E,MAAM,oBAAoB,GAC/B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACmC,EAAE;;IACnE,YAAY;IACZ,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACrC,CAAC,CAAC;IAEH,MAAM,IAAI,GACR,MAAM,IAAA,6DAA6B,EAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACrC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnB,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;;QAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE1B,aAAa;IACb,MAAM,UAAU,GACd,MAAM,IAAA,+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,QAAQ,CAAC,UAAU,CAAC,OAAO,GAAG,MAAM,IAAA,+DAA8B,EAChE,GAAG,EACH,QAAQ,CACT,CAAC;IAEF,aAAa;IACb,MAAM,MAAM,GAA2B;QACrC,IAAI,EAAE,WAAW;QACjB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,QAAQ;QACR,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;QACpC,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC,CAAC;IACF,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC;IAC/B,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACE,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAA,CAAC;AA7DS,QAAA,oBAAoB,wBA6D7B"}
@@ -1,4 +1,4 @@
1
1
  import { AutoBeOpenApi } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, document: AutoBeOpenApi.IDocument, life?: number): Promise<AutoBeOpenApi.IComponents>;
4
+ export declare function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, document: AutoBeOpenApi.IDocument, life?: number): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
@@ -52,11 +52,10 @@ const core_1 = require("@agentica/core");
52
52
  const openapi_1 = require("@samchon/openapi");
53
53
  const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
54
54
  const typia_1 = __importDefault(require("typia"));
55
- const uuid_1 = require("uuid");
56
55
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
57
56
  const enforceToolCall_1 = require("../../utils/enforceToolCall");
58
57
  const forceRetry_1 = require("../../utils/forceRetry");
59
- const transformInterfaceHistories_1 = require("./transformInterfaceHistories");
58
+ const transformInterfaceComplementHistories_1 = require("./histories/transformInterfaceComplementHistories");
60
59
  function orchestrateInterfaceComplement(ctx, document, life = 8) {
61
60
  return (0, forceRetry_1.forceRetry)(() => step(ctx, document, life));
62
61
  }
@@ -64,8 +63,9 @@ function step(ctx, document, retry) {
64
63
  return __awaiter(this, void 0, void 0, function* () {
65
64
  var _a, _b, _c;
66
65
  const missed = getMissed(document);
67
- if (missed.length === 0 || retry <= 0)
68
- return document.components;
66
+ if (missed.length === 0 || retry <= 0) {
67
+ return document.components.schemas;
68
+ }
69
69
  const pointer = {
70
70
  value: null,
71
71
  };
@@ -75,31 +75,7 @@ function step(ctx, document, retry) {
75
75
  config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})), { executor: {
76
76
  describe: null,
77
77
  } }),
78
- histories: [
79
- ...(0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# OpenAPI Schema Complement Agent\n\nYou are an AI agent specialized in complementing missing schema definitions in OpenAPI documents. Your primary responsibility is to identify and fill in schema types that are referenced via `$ref` but not yet defined in the `components.schemas` section.\n\n## Your Role\n\nYou analyze OpenAPI documents to find missing schema definitions and generate complete, accurate JSON Schema definitions for those missing types. You work as part of a larger OpenAPI document generation workflow, specifically handling the final step of ensuring all referenced schemas are properly defined.\n\n## Key Responsibilities\n\n1. **Identify Missing Schemas**: Scan the OpenAPI document for `$ref` references pointing to `#/components/schemas/[ISchemaName]` that don't have corresponding definitions\n2. **Generate Schema Definitions**: Create complete JSON Schema definitions for missing types based on context clues from API operations, database schemas, and usage patterns\n3. **Handle Nested References**: When creating new schemas, identify any new `$ref` references introduced in those schemas and ensure they are also defined\n4. **Iterative Completion**: Continue the process recursively until all referenced schemas (including nested ones) are properly defined\n5. **Ensure Completeness**: Make sure all generated schemas follow JSON Schema specifications and are consistent with OpenAPI 3.0+ standards\n\n## Function Calling\n\nYou have access to the `complementComponents` function which you should call when you identify missing schemas:\n\n```typescript\ncomplementComponents({\n schemas: {\n ISchemaName: {\n // Complete JSON Schema definition\n description: \"Description must be clear and detailed\"\n }\n }\n})\n```\n\n## Guidelines for Schema Generation\n\n1. **Type Inference**: Infer appropriate types based on context (API operations, database fields, naming conventions)\n2. **Property Requirements**: Determine which properties should be required vs optional based on usage patterns\n3. **Data Formats**: Apply appropriate formats (email, date-time, uri, etc.) when evident from context\n4. **Nested References**: Handle schemas that reference other schemas appropriately\n5. **Validation Rules**: Include reasonable validation constraints (minLength, maxLength, pattern, etc.) when applicable\n6. **Recursive Schema Detection**: When creating new schemas, scan them for additional `$ref` references and ensure those referenced schemas are also created\n7. **Dependency Chain Completion**: Continue generating schemas until no more missing references exist in the entire schema dependency chain\n8. **Comprehensive Descriptions**: Add detailed, clear descriptions to every schema and property that explain:\n - What the schema/property represents\n - Its purpose and usage context\n - Any business logic or constraints\n - Examples of valid values when helpful\n - Relationships to other entities or concepts\n\n## Response Format\n\n- Analyze the provided OpenAPI document systematically\n- Identify all missing schema references (including those in newly created schemas)\n- Generate appropriate schema definitions for all missing references\n- Recursively check for new `$ref` references introduced in generated schemas\n- Call the `complementComponents` function with all missing schemas (may require multiple calls if nested dependencies are discovered)\n- Provide a brief summary of what schemas were added and any dependency chains that were resolved\n\n## Quality Standards\n\n- Ensure all generated schemas are valid JSON Schema\n- Maintain consistency with existing schema patterns in the document\n- Use descriptive and clear property names\n- **Add comprehensive descriptions**: Every schema object and property must include detailed descriptions that are:\n - Clear and understandable to anyone reading the API documentation\n - Specific about the purpose and usage of each field\n - Include examples or context when helpful\n - Explain any business rules or constraints\n - Describe relationships between different entities\n- Follow OpenAPI best practices for schema design\n- Make the API documentation self-explanatory through excellent descriptions\n\nFocus on accuracy, completeness, and maintaining the integrity of the OpenAPI specification." /* AutoBeSystemPromptConstant.INTERFACE_COMPLEMENT */),
80
- {
81
- id: (0, uuid_1.v4)(),
82
- created_at: new Date().toISOString(),
83
- type: "assistantMessage",
84
- text: [
85
- "Here is the OpenAPI document what you've made:",
86
- "",
87
- "```json",
88
- JSON.stringify(document),
89
- "```",
90
- ].join("\n"),
91
- },
92
- {
93
- id: (0, uuid_1.v4)(),
94
- created_at: new Date().toISOString(),
95
- type: "assistantMessage",
96
- text: [
97
- "You have missed below schema types in the document.components.schemas:",
98
- "",
99
- ...missed.map((s) => `- ${s}`),
100
- ].join("\n"),
101
- },
102
- ],
78
+ histories: (0, transformInterfaceComplementHistories_1.transformInterfaceComplementHistories)(ctx.state(), document, missed),
103
79
  controllers: [
104
80
  createApplication({
105
81
  model: ctx.model,
@@ -129,11 +105,8 @@ function step(ctx, document, retry) {
129
105
  step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
130
106
  created_at: new Date().toISOString(),
131
107
  });
132
- const newComponents = {
133
- schemas: Object.assign(Object.assign({}, pointer.value), document.components.schemas),
134
- authorization: document.components.authorization,
135
- };
136
- return step(ctx, Object.assign(Object.assign({}, document), { components: newComponents }), retry - 1);
108
+ const newSchemas = Object.assign(Object.assign({}, pointer.value), document.components.schemas);
109
+ return step(ctx, Object.assign(Object.assign({}, document), { components: Object.assign(Object.assign({}, document.components), { schemas: newSchemas }) }), retry - 1);
137
110
  });
138
111
  }
139
112
  const getMissed = (document) => {
@@ -183,7 +156,7 @@ const claude = {
183
156
  {
184
157
  name: "complementComponents",
185
158
  parameters: {
186
- description: "Current Type: {@link IComplementComponentsProps}",
159
+ description: "Current Type: {@link IAutoBeInterfaceComplementApplication.IProps}",
187
160
  type: "object",
188
161
  properties: {
189
162
  schemas: {
@@ -257,11 +230,11 @@ const claude = {
257
230
  _report = __typia_transform__validateReport._validateReport(errors);
258
231
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
259
232
  path: _path + "",
260
- expected: "IComplementComponentsProps",
233
+ expected: "IAutoBeInterfaceComplementApplication.IProps",
261
234
  value: input
262
235
  })) && _vo0(input, _path + "", true) || _report(true, {
263
236
  path: _path + "",
264
- expected: "IComplementComponentsProps",
237
+ expected: "IAutoBeInterfaceComplementApplication.IProps",
265
238
  value: input
266
239
  }))(input, "$input", true);
267
240
  const success = 0 === errors.length;
@@ -294,7 +267,7 @@ const collection = {
294
267
  {
295
268
  name: "complementComponents",
296
269
  parameters: {
297
- description: "Current Type: {@link IComplementComponentsProps}\n\n### Description of {@link schemas} property:\n\n> A collection of missing schema definitions that need to be added to the\n> OpenAPI document's `components.schemas` section.\n> \n> This object contains schema definitions for types that are referenced but\n> not yet defined:\n> \n> - Key: Schema name (`string`): The name of the schema type that will be\n> referenced in $ref statements\n> - Value: `AutoBeOpenApi.IJsonSchema` - The complete JSON Schema definition\n> for that type\n> \n> Example structure:\n> \n> ```typescript\n> {\n> \"UserProfile\": {\n> \"type\": \"object\",\n> \"properties\": {\n> \"id\": { \"type\": \"string\" },\n> \"name\": { \"type\": \"string\" },\n> \"email\": { \"type\": \"string\", \"format\": \"email\" }\n> },\n> \"required\": [\"id\", \"name\", \"email\"]\n> }\n> }\n> ```\n> \n> Each schema definition follows the JSON Schema specification and will be\n> directly inserted into the OpenAPI document's components.schemas section,\n> making them available for $ref references throughout the API\n> specification.",
270
+ description: "Current Type: {@link IAutoBeInterfaceComplementApplication.IProps}\n\n### Description of {@link schemas} property:\n\n> A collection of missing schema definitions that need to be added to the\n> OpenAPI document's `components.schemas` section.\n> \n> This object contains schema definitions for types that are referenced but\n> not yet defined:\n> \n> - Key: Schema name (`string`): The name of the schema type that will be\n> referenced in $ref statements\n> - Value: `AutoBeOpenApi.IJsonSchema` - The complete JSON Schema definition\n> for that type\n> \n> Example structure:\n> \n> ```typescript\n> {\n> \"UserProfile\": {\n> \"type\": \"object\",\n> \"properties\": {\n> \"id\": { \"type\": \"string\" },\n> \"name\": { \"type\": \"string\" },\n> \"email\": { \"type\": \"string\", \"format\": \"email\" }\n> },\n> \"required\": [\"id\", \"name\", \"email\"]\n> }\n> }\n> ```\n> \n> Each schema definition follows the JSON Schema specification and will be\n> directly inserted into the OpenAPI document's components.schemas section,\n> making them available for $ref references throughout the API\n> specification.",
298
271
  type: "object",
299
272
  properties: {
300
273
  schemas: {
@@ -367,11 +340,11 @@ const collection = {
367
340
  _report = __typia_transform__validateReport._validateReport(errors);
368
341
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
369
342
  path: _path + "",
370
- expected: "IComplementComponentsProps",
343
+ expected: "IAutoBeInterfaceComplementApplication.IProps",
371
344
  value: input
372
345
  })) && _vo0(input, _path + "", true) || _report(true, {
373
346
  path: _path + "",
374
- expected: "IComplementComponentsProps",
347
+ expected: "IAutoBeInterfaceComplementApplication.IProps",
375
348
  value: input
376
349
  }))(input, "$input", true);
377
350
  const success = 0 === errors.length;
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateInterfaceComplement.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComplement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,wEAMC;;;AAzBD,yCAAoE;AAEpE,8CAI0B;AAC1B,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,iEAA8D;AAC9D,uDAAoD;AACpD,+EAA4E;AAE5E,SAAgB,8BAA8B,CAC5C,GAAyB,EACzB,QAAiC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AC;IACL,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,SAAS,iBAAiB,CAAiC,KAK1D;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACyB,CAAC;IACvC,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,OAAO,EAAE;YACP,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC7B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC;SACqB;KACzB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
1
+ {"version":3,"file":"orchestrateInterfaceComplement.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComplement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,wEAMC;;;AAxBD,yCAAoE;AAEpE,8CAI0B;AAC1B,2FAAwF;AAExF,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,uDAAoD;AACpD,6GAA0G;AAG1G,SAAgB,8BAA8B,CAC5C,GAAyB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -1,4 +1,5 @@
1
- import { AutoBeAssistantMessageHistory, AutoBeInterfaceEndpointsEvent } from "@autobe/interface";
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ import { AutoBeInterfaceGroup } from "@autobe/interface/src/histories/contents/AutoBeInterfaceGroup";
2
3
  import { ILlmSchema } from "@samchon/openapi";
3
4
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceEndpoints<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, content?: string): Promise<AutoBeInterfaceEndpointsEvent | AutoBeAssistantMessageHistory>;
5
+ export declare function orchestrateInterfaceEndpoints<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, groups: AutoBeInterfaceGroup[], content?: string): Promise<AutoBeOpenApi.IEndpoint[]>;