@autobe/agent 0.30.4 → 0.30.5

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 (210) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
  4. package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
  5. package/lib/index.mjs +2918 -2842
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
  8. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
  9. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  10. package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
  11. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
  12. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
  13. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
  14. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
  15. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
  16. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
  17. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
  18. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
  19. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
  21. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
  22. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
  23. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
  24. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
  25. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
  26. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
  27. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
  28. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
  29. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
  30. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
  31. package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
  32. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
  33. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
  34. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
  35. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
  36. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
  37. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
  38. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
  39. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
  40. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
  41. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
  42. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
  43. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
  44. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
  45. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
  46. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
  47. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
  48. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
  49. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
  50. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
  51. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
  52. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
  53. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
  54. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
  55. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
  56. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
  57. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
  58. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
  59. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
  60. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
  61. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
  62. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
  64. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
  65. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  66. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
  67. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
  68. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
  69. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
  70. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
  71. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
  72. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
  73. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
  74. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
  75. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
  76. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
  77. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
  78. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
  79. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
  80. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
  81. package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
  82. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
  83. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
  84. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
  85. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  86. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
  87. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
  88. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
  89. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  90. package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
  91. package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
  92. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
  93. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
  94. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
  95. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  96. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
  97. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
  98. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
  99. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
  100. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
  101. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
  102. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
  103. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
  104. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
  105. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
  106. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
  107. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
  108. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
  109. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
  110. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
  111. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
  112. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
  113. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
  114. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
  115. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
  116. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
  117. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
  118. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
  119. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
  120. package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
  121. package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
  122. package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
  123. package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
  124. package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
  125. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
  126. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
  127. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
  128. package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
  129. package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
  130. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
  131. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
  132. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
  133. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
  134. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
  135. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
  136. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
  137. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
  138. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
  139. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
  140. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
  141. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
  142. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
  143. package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
  144. package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
  145. package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
  146. package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
  147. package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
  148. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
  149. package/package.json +5 -5
  150. package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
  151. package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
  152. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
  153. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
  154. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
  155. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
  156. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
  157. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
  158. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
  159. package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
  160. package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
  161. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
  162. package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
  163. package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
  164. package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
  165. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
  166. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
  167. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
  168. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
  169. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
  170. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
  171. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
  172. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
  173. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
  174. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
  175. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
  176. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
  177. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
  178. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
  179. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
  180. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
  181. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
  182. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
  183. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
  184. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
  185. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
  186. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
  187. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
  188. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
  189. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
  190. package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
  191. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
  192. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
  193. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
  194. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
  195. package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
  196. package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
  197. package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
  198. package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
  199. package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
  200. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
  201. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
  202. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
  203. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
  204. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
  205. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
  206. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
  207. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
  208. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
  209. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
  210. package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
@@ -2,26 +2,18 @@ import { IAutoBePreliminaryGetAnalysisSections } from "../../common/structures/I
2
2
  import { IAutoBePreliminaryGetDatabaseSchemas } from "../../common/structures/IAutoBePreliminaryGetDatabaseSchemas";
3
3
  import { IAutoBePreliminaryGetInterfaceSchemas } from "../../common/structures/IAutoBePreliminaryGetInterfaceSchemas";
4
4
  /**
5
- * Function calling interface for planning transformer DTO generation.
5
+ * Plans whether a single DTO needs a transformer. Sets databaseSchemaName to
6
+ * null for non-transformable DTOs.
6
7
  *
7
- * Guides the AI agent through analyzing a single DTO type and determining
8
- * whether it needs a transformer. Each DTO is analyzed independently, enabling
9
- * parallel processing across all DTOs.
10
- *
11
- * The planning follows a structured RAG workflow: preliminary context gathering
12
- * (database schemas, DTO schemas) → eligibility analysis → plan generation.
13
- *
14
- * **Key Decisions**: Not all DTOs require transformers. The agent must
15
- * distinguish transformable DTOs (Read DTO + DB-backed + Direct mapping) from
8
+ * **Key Decisions**: Not all DTOs require transformers. Distinguish
9
+ * transformable DTOs (Read DTO + DB-backed + direct mapping) from
16
10
  * non-transformable DTOs (request params, pagination wrappers, business logic
17
- * types) and set databaseSchemaName to null for non-transformable ones.
11
+ * types).
18
12
  */
19
13
  export interface IAutoBeRealizeTransformerPlanApplication {
20
14
  /**
21
- * Process transformer planning task or preliminary data requests.
22
- *
23
15
  * Analyzes the given DTO type and generates a plan entry determining whether
24
- * a transformer is needed. Returns exactly ONE plan entry for the given DTO.
16
+ * a transformer is needed. Returns exactly ONE plan entry.
25
17
  *
26
18
  * @param props Request containing either preliminary data request or complete
27
19
  * plan
@@ -33,106 +25,51 @@ export declare namespace IAutoBeRealizeTransformerPlanApplication {
33
25
  /**
34
26
  * Think before you act.
35
27
  *
36
- * Before requesting preliminary data or completing your plan, reflect on
37
- * your current state and explain your reasoning:
38
- *
39
- * For preliminary requests:
40
- *
41
- * - What schemas (database or DTO) are missing that you need?
42
- * - Why do you need them for planning?
43
- * - Be brief - state the gap, don't list everything you have.
44
- *
45
- * For completion:
28
+ * For preliminary requests: what schemas (database or DTO) are missing?
46
29
  *
47
- * - Is this DTO transformable or non-transformable?
48
- * - What database table does it map to (if transformable)?
49
- * - Why is it non-transformable (if applicable)?
50
- *
51
- * This reflection helps you avoid duplicate requests and premature
52
- * completion.
30
+ * For completion: is this DTO transformable or non-transformable? What
31
+ * database table does it map to (if transformable)?
53
32
  */
54
33
  thinking: string;
55
34
  /**
56
- * Type discriminator for the request.
57
- *
58
- * Determines which action to perform:
59
- *
60
- * - "getDatabaseSchemas": Retrieve database table schemas for DB structure
61
- * - "getInterfaceSchemas": Retrieve DTO type definitions for API contracts
62
- * - "complete": Generate final transformer plan
63
- *
64
- * The preliminary types are removed from the union after their respective
65
- * data has been provided, physically preventing repeated calls.
35
+ * Action to perform. Exhausted preliminary types are removed from the
36
+ * union, physically preventing repeated calls.
66
37
  */
67
38
  request: IComplete | IAutoBePreliminaryGetAnalysisSections | IAutoBePreliminaryGetDatabaseSchemas | IAutoBePreliminaryGetInterfaceSchemas;
68
39
  }
69
40
  /**
70
- * Request to complete transformer planning.
71
- *
72
- * Generates a plan with exactly ONE entry for the given DTO, indicating
73
- * whether it is transformable (has database schema name) or non-transformable
74
- * (null).
41
+ * Generates exactly ONE plan entry indicating transformable (has DB schema
42
+ * name) or not (null).
75
43
  */
76
44
  interface IComplete {
77
45
  /** Type discriminator for completion request. */
78
46
  type: "complete";
79
47
  /**
80
- * Plan entry for the given DTO.
81
- *
82
- * Must contain exactly ONE entry with:
83
- *
84
- * - DTO type name matching the given DTO
85
- * - Chain of thought explaining the analysis
86
- * - Database schema name if transformable, or null if not
87
- *
88
- * Use databaseSchemaName to distinguish:
89
- *
90
- * - Non-null: Transformable DTO, transformer will be generated
91
- * - Null: Non-transformable DTO, no transformer needed
48
+ * Exactly ONE entry. databaseSchemaName non-null = transformable, null = no
49
+ * transformer needed.
92
50
  */
93
51
  plans: IPlan[];
94
52
  }
95
- /**
96
- * Plan for a single DTO analysis result.
97
- *
98
- * Records the planning decision for one DTO from the operation response.
99
- */
53
+ /** Planning decision for one DTO. */
100
54
  interface IPlan {
101
55
  /**
102
- * DTO type name being analyzed.
103
- *
104
- * The TypeScript interface type from the operation response.
105
- *
106
- * Example: "IShoppingSaleUnitStock", "IShoppingCategory", "IPage.IRequest"
56
+ * TypeScript interface type from the operation response (e.g.,
57
+ * "IShoppingSaleUnitStock").
107
58
  */
108
59
  dtoTypeName: string;
109
60
  /**
110
- * Chain of thought for this DTO's planning decision.
111
- *
112
- * Explains the agent's reasoning:
61
+ * Reasoning for this DTO's planning decision.
113
62
  *
114
- * - For transformable DTOs: Why a transformer is needed, which database table
115
- * it maps to
116
- * - For non-transformable DTOs: Why no transformer is needed (request param,
117
- * pagination wrapper, business logic, etc.)
63
+ * Transformable: "Transforms shopping_sales to IShoppingSale with nested
64
+ * category and tags".
118
65
  *
119
- * Example (transformable): "Transforms shopping_sales to IShoppingSale with
120
- * nested category and tags"
121
- *
122
- * Example (non-transformable): "IPage.IRequest is pagination parameter, not
123
- * database-backed"
66
+ * Non-transformable: "IPage.IRequest is pagination parameter, not
67
+ * DB-backed".
124
68
  */
125
69
  thinking: string;
126
70
  /**
127
- * Database schema name if transformable, null if not.
128
- *
129
- * - **Non-null**: The database table name this DTO maps to. A transformer
130
- * will be generated for this DTO.
131
- * - **Null**: This DTO is non-transformable (request param, pagination
132
- * wrapper, business logic type). No transformer will be generated.
133
- *
134
- * Example (transformable): "shopping_sales", "shopping_categories" Example
135
- * (non-transformable): null
71
+ * Database table name if transformable (e.g., "shopping_sales"), null if
72
+ * non-transformable (request param, pagination wrapper, business logic).
136
73
  */
137
74
  databaseSchemaName: string | null;
138
75
  }
@@ -1,31 +1,13 @@
1
1
  import { AutoBeRealizeTransformerSelectMapping, AutoBeRealizeTransformerTransformMapping } from "@autobe/interface";
2
2
  import { IAutoBePreliminaryGetDatabaseSchemas } from "../../common/structures/IAutoBePreliminaryGetDatabaseSchemas";
3
3
  /**
4
- * Function calling interface for generating DTO transformer functions.
5
- *
6
- * Guides the AI agent through creating reusable transformer modules that
7
- * convert database query results to API response DTOs (DB → API). Each
8
- * transformer includes type-safe conversion logic and Prisma select
9
- * specifications for efficient data loading.
10
- *
11
- * The generation follows a structured RAG workflow: preliminary context
12
- * gathering (database schemas only) → implementation planning → code generation
13
- * → review and refinement. All necessary DTO type information is obtained
14
- * transitively from the DTO type names provided in the plan
15
- * (AutoBeRealizeTransformerPlan).
16
- *
17
- * The planning phase has already filtered out incompatible DTO types (e.g.,
18
- * IPage*, *.IRequest, *.ICreate, *.IUpdate), so the write phase only receives
19
- * DTOs that require transformers.
4
+ * Generates transformer functions that convert Prisma query results to API
5
+ * response DTOs (DB → API) via plan/draft/revise workflow.
20
6
  */
21
7
  export interface IAutoBeRealizeTransformerWriteApplication {
22
8
  /**
23
9
  * Process transformer generation task or preliminary data requests.
24
10
  *
25
- * Generates complete transformer module through three-phase workflow (plan →
26
- * draft → revise). Ensures type safety, proper Prisma payload types, and
27
- * correct DTO mapping.
28
- *
29
11
  * @param props Request containing either preliminary data request or complete
30
12
  * task
31
13
  */
@@ -36,77 +18,37 @@ export declare namespace IAutoBeRealizeTransformerWriteApplication {
36
18
  /**
37
19
  * Think before you act.
38
20
  *
39
- * Before requesting preliminary data or completing your task, reflect on
40
- * your current state and explain your reasoning:
41
- *
42
- * For preliminary requests:
43
- *
44
- * - What database schemas are missing that you need?
45
- * - Why do you need them for transformer generation?
46
- * - Be brief - state the gap, don't list everything you have.
47
- *
48
- * For completion:
49
- *
50
- * - What schemas did you acquire?
51
- * - What transformer patterns did you implement?
52
- * - Why is it sufficient to complete?
53
- * - Summarize - don't enumerate every field mapping.
21
+ * For preliminary requests: what database schemas are missing and why?
54
22
  *
55
- * Note: All necessary DTO type information is available transitively from
56
- * the DTO type names in the plan. You only need to request database
57
- * schemas.
23
+ * For completion: what schemas did you acquire, what patterns did you
24
+ * implement, and why is it sufficient? Summarize don't enumerate every
25
+ * field.
58
26
  *
59
- * This reflection helps you avoid duplicate requests and premature
60
- * completion.
27
+ * Note: All DTO type information is available transitively from the plan's
28
+ * DTO type names. You only need to request database schemas.
61
29
  */
62
30
  thinking: string;
63
31
  /**
64
- * Type discriminator for the request.
65
- *
66
- * Determines which action to perform:
67
- *
68
- * - "getDatabaseSchemas": Retrieve database table schemas for DB structure
69
- * - "complete": Generate final transformer implementation
70
- *
71
- * All necessary DTO type information is obtained transitively from the DTO
72
- * type names provided in the plan (AutoBeRealizeTransformerPlan). Each DTO
73
- * type name allows the system to recursively fetch all referenced types,
74
- * providing complete type information without requiring explicit schema
75
- * requests.
76
- *
77
- * The preliminary types are removed from the union after their respective
78
- * data has been provided, physically preventing repeated calls.
32
+ * Action to perform. Exhausted preliminary types are removed from the
33
+ * union, physically preventing repeated calls.
79
34
  */
80
35
  request: IComplete | IAutoBePreliminaryGetDatabaseSchemas;
81
36
  }
82
37
  /**
83
- * Request to generate transformer module implementation.
84
- *
85
- * Executes three-phase generation to create complete transformer with:
86
- *
87
- * - `select()` function: Returns Prisma include/select specification
88
- * - `transform()` function: Converts Prisma payload to DTO
89
- *
90
- * Follows plan → draft → revise pattern to ensure type safety and correct
91
- * field mappings.
92
- *
93
- * Note: The database schema name is provided as input from the planning
94
- * phase, so it doesn't need to be returned in the response.
38
+ * Generate transformer module (select + transform functions) via
39
+ * plan/draft/revise.
95
40
  */
96
41
  interface IComplete {
97
42
  /** Type discriminator for completion request. */
98
43
  type: "complete";
99
44
  /**
100
- * Transformer implementation plan and strategy.
45
+ * Transformer implementation plan. MUST contain four sections:
101
46
  *
102
- * MUST contain thorough analysis with these four mandatory sections:
103
- *
104
- * 1. Database Schema Field Inventory - List ALL fields with exact names from
105
- * schema
106
- * 2. DTO Property Inventory - List ALL properties with types
107
- * 3. Field-by-Field Mapping Strategy - Explicit table for BOTH select() and
47
+ * 1. Database Schema Field Inventory — ALL fields with exact names from schema
48
+ * 2. DTO Property Inventory — ALL properties with types
49
+ * 3. Field-by-Field Mapping Strategy explicit table for BOTH select() and
108
50
  * transform()
109
- * 4. Edge Cases and Special Handling - Type casts (Decimal, DateTime),
51
+ * 4. Edge Cases and Special Handling type casts (Decimal, DateTime),
110
52
  * nullables
111
53
  *
112
54
  * This forces you to READ the actual schema (not imagine it) and creates an
@@ -114,105 +56,47 @@ export declare namespace IAutoBeRealizeTransformerWriteApplication {
114
56
  */
115
57
  plan: string;
116
58
  /**
117
- * Database field-by-field selection mapping for the select() function.
118
- *
119
- * Documents which database fields/relations must be selected from the
120
- * database to enable the transform() function. This ensures no required
121
- * data is missing from the query.
59
+ * Database field-by-field selection mapping for select().
122
60
  *
123
- * MUST include EVERY database field needed by transform() - no exceptions.
61
+ * MUST include EVERY database field needed by transform() no exceptions.
124
62
  * Each mapping specifies:
125
63
  *
126
- * - `member`: Exact database field/relation name (snake_case)
127
- * - `kind`: Whether it's a scalar field, belongsTo, hasOne, or hasMany
128
- * relation
129
- * - `nullable`: Whether the field/relation is nullable (true/false for
130
- * scalar/belongsTo, null for hasMany/hasOne)
131
- * - `how`: Why this field is being selected (which DTO property needs it)
64
+ * - `member`: Exact Prisma field/relation name (snake_case) — read from the
65
+ * Relation Mapping Table and member list, NOT from DTO property names
66
+ * - `kind`: scalar, belongsTo, hasOne, or hasMany
67
+ * - `nullable`: true/false for scalar/belongsTo, null for hasMany/hasOne
68
+ * - `how`: Which DTO property needs it
132
69
  *
133
70
  * The `kind` property forces explicit classification of each member BEFORE
134
- * deciding what to select, preventing confusion between scalars and
135
- * relations, and ensuring correct select syntax.
136
- *
137
- * The `nullable` property documents schema constraints that affect how
138
- * transform() will handle the data, enabling proper null handling in
139
- * transformations.
140
- *
141
- * Missing even a single required field will cause validation failure and
142
- * trigger regeneration.
71
+ * deciding select syntax, preventing confusion between scalars and
72
+ * relations.
143
73
  *
144
- * This structured approach:
145
- *
146
- * - Prevents missing field selections through systematic coverage
147
- * - Forces explicit decision-making for each database field (kind + nullable
148
- *
149
- * - How)
150
- * - Ensures select() and transform() are perfectly aligned
151
- * - Documents what data to load from database
152
- * - Prevents confusion between scalar fields and relations
153
- * - Documents nullability constraints for transform() planning
154
- * - Enables validation before code generation
155
- *
156
- * **Common selection patterns by kind**:
157
- *
158
- * - **Scalar fields (nullable: true/false)**: For direct mapping or type
159
- * conversion
160
- * - **Computation sources (nullable: true/false)**: Fields needed for
161
- * computed DTO properties
162
- * - **Aggregations (nullable: false)**: _count, _sum, _avg for DTO statistics
163
- * - **BelongsTo relations (nullable: true/false)**: For nested object
164
- * transformers
165
- * - **HasMany relations (nullable: null)**: For array transformers
166
- *
167
- * The validator will cross-check this list against the database schema and
168
- * DTO requirements to ensure complete coverage.
74
+ * Missing even a single required field will cause validation failure.
169
75
  */
170
76
  selectMappings: AutoBeRealizeTransformerSelectMapping[];
171
77
  /**
172
- * DTO property-by-property transformation mapping for the transform()
173
- * function.
174
- *
175
- * Documents how to transform database payload data into each DTO property.
176
- * This ensures complete DTO coverage and correct transformation logic.
78
+ * DTO property-by-property transformation mapping for transform().
177
79
  *
178
- * MUST include EVERY property from the DTO type definition - no exceptions.
80
+ * MUST include EVERY property from the DTO type definition no exceptions.
179
81
  * Each mapping specifies:
180
82
  *
181
83
  * - `property`: Exact DTO property name (camelCase)
182
- * - `how`: How to obtain this property value from Prisma payload
183
- *
184
- * Missing even a single property will cause validation failure and trigger
185
- * regeneration.
186
- *
187
- * This structured approach:
188
- *
189
- * - Prevents property omissions through systematic coverage
190
- * - Forces explicit decision-making for each property transformation
191
- * - Documents transformation logic (direct mapping, type conversion,
192
- * computation, nested transformation)
193
- * - Ensures select() and transform() are aligned
194
- * - Enables validation before code generation
84
+ * - `how`: How to obtain from Prisma payload
195
85
  *
196
86
  * **Common transformation patterns**:
197
87
  *
198
- * - **Direct mapping**: Simple field renaming (snake_case → camelCase)
199
- * - **Type conversion**: Decimal → Number, DateTime → ISO string
200
- * - **Nullable handling**: DateTime? → string | null
201
- * - **Computed properties**: Calculate from multiple database fields
202
- * - **Aggregation**: Use _count, _sum, _avg from database
203
- * - **Nested objects**: Reuse neighbor transformers
204
- * - **Arrays**: Map with ArrayUtil.asyncMap + neighbor transformer
88
+ * - Direct mapping: snake_case → camelCase
89
+ * - Type conversion: Decimal → Number, DateTime → ISO string
90
+ * - Nullable: DateTime? → string | null
91
+ * - Nested objects: Reuse neighbor transformers
92
+ * - Arrays: ArrayUtil.asyncMap + neighbor transformer
205
93
  *
206
- * The validator will cross-check this list against the actual DTO type
207
- * definition and reject incomplete mappings.
94
+ * Missing even a single property will cause validation failure.
208
95
  */
209
96
  transformMappings: AutoBeRealizeTransformerTransformMapping[];
210
97
  /**
211
- * Initial transformer implementation draft.
212
- *
213
- * Complete implementation that strictly follows the plan's mapping table.
214
- * EVERY field in the plan's Section 3 MUST appear in BOTH select() and
215
- * transform(). Implement:
98
+ * Complete implementation following plan's mapping table. EVERY field from
99
+ * plan Section 3 MUST appear in BOTH select() and transform(). Implement:
216
100
  *
217
101
  * - Transform() first, select() second, Payload last (correct order)
218
102
  * - All field mappings from plan with correct transformations
@@ -220,43 +104,26 @@ export declare namespace IAutoBeRealizeTransformerWriteApplication {
220
104
  * - ALWAYS use `select`, NEVER use `include`
221
105
  */
222
106
  draft: string;
223
- /**
224
- * Revision and finalization phase.
225
- *
226
- * Reviews the draft implementation and produces the final code with all
227
- * improvements and corrections applied.
228
- */
107
+ /** Reviews draft and produces final code. */
229
108
  revise: IReviseProps;
230
109
  }
231
110
  interface IReviseProps {
232
111
  /**
233
- * Critical review and improvement analysis.
234
- *
235
- * MUST systematically verify using four checklists:
112
+ * MUST systematically verify four checklists:
236
113
  *
237
- * 1. Schema Fidelity - Cross-check EVERY field name against plan Section 1
238
- * inventory
239
- * 2. Plan Adherence - Verify EVERY mapping from Section 3 in BOTH select() and
114
+ * 1. Schema Fidelity cross-check EVERY field name against plan Section 1
115
+ * 2. Plan Adherence — verify EVERY mapping from Section 3 in BOTH select() and
240
116
  * transform()
241
- * 3. System Rules - Mandatory neighbor reuse, function order, select (not
242
- * include)
243
- * 4. Type Safety - Type casts (Decimal→Number, DateTime→ISO), nullable
244
- * handling
117
+ * 3. System Rules neighbor reuse, function order, select (not include)
118
+ * 4. Type Safety — Decimal→Number, DateTime→ISO, nullable handling
245
119
  *
246
- * Identify specific issues with line numbers and provide clear reasoning.
247
- * This catches hallucinated fields, missing transformations, and rule
248
- * violations.
120
+ * Identify issues with line numbers. This catches hallucinated fields,
121
+ * missing transformations, and rule violations.
249
122
  */
250
123
  review: string;
251
124
  /**
252
- * Final transformer code with all review improvements applied.
253
- *
254
- * Apply ALL fixes identified in the review to produce production-ready
255
- * code. If review found issues, this MUST contain the corrected
256
- * implementation.
257
- *
258
- * Return `null` ONLY if the draft is already perfect and review found zero
259
- * issues.
125
+ * Final transformer code with all review improvements applied, or null if
126
+ * draft needs no changes.
260
127
  */
261
128
  final: string | null;
262
129
  }
@@ -4,9 +4,11 @@ import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
4
4
  * errors.
5
5
  *
6
6
  * Parses TS2339 "Property 'X' does not exist on type 'Y'" diagnostics,
7
- * deduplicates by (property, type) pair, and returns a short explanation when Y
8
- * appears to be a Prisma model type (snake_case naming).
7
+ * deduplicates by property name, and returns a short explanation.
9
8
  *
10
- * Returns empty string if no TS2339 diagnostics on Prisma-like types are found.
9
+ * Handles both simple type names (e.g., `shopping_sales`) and inline Prisma
10
+ * GetPayload types (e.g., `{ id: string; body: string; ... }`).
11
+ *
12
+ * Returns empty string if no TS2339 diagnostics are found.
11
13
  */
12
14
  export declare function generateTS2339Hints(diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[]): string;
@@ -6,30 +6,43 @@ exports.generateTS2339Hints = generateTS2339Hints;
6
6
  * errors.
7
7
  *
8
8
  * Parses TS2339 "Property 'X' does not exist on type 'Y'" diagnostics,
9
- * deduplicates by (property, type) pair, and returns a short explanation when Y
10
- * appears to be a Prisma model type (snake_case naming).
9
+ * deduplicates by property name, and returns a short explanation.
11
10
  *
12
- * Returns empty string if no TS2339 diagnostics on Prisma-like types are found.
11
+ * Handles both simple type names (e.g., `shopping_sales`) and inline Prisma
12
+ * GetPayload types (e.g., `{ id: string; body: string; ... }`).
13
+ *
14
+ * Returns empty string if no TS2339 diagnostics are found.
13
15
  */
14
16
  function generateTS2339Hints(diagnostics) {
15
- const TS2339_PATTERN = /^Property '(\w+)' does not exist on type '(\w+)'\.?$/;
16
- const PRISMA_MODEL_PATTERN = /^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)+$/;
17
+ // Match both simple types and inline object types
18
+ const TS2339_SIMPLE = /^Property '(\w+)' does not exist on type '(\w+)'\.?$/;
19
+ const TS2339_INLINE = /^Property '(\w+)' does not exist on type '\{[^}]*\}'\.?$/;
17
20
  const seen = new Set();
18
21
  const hints = [];
19
22
  for (const diag of diagnostics) {
20
23
  if (Number(diag.code) !== 2339)
21
24
  continue;
22
- const match = diag.messageText.match(TS2339_PATTERN);
23
- if (match === null)
24
- continue;
25
- const [, property, typeName] = match;
26
- if (!PRISMA_MODEL_PATTERN.test(typeName))
25
+ // Try simple type match first
26
+ const simpleMatch = diag.messageText.match(TS2339_SIMPLE);
27
+ if (simpleMatch !== null) {
28
+ const [, property, typeName] = simpleMatch;
29
+ const key = `${property}`;
30
+ if (!seen.has(key)) {
31
+ seen.add(key);
32
+ hints.push({ property: property, modelType: typeName });
33
+ }
27
34
  continue;
28
- const key = `${property}::${typeName}`;
29
- if (seen.has(key))
30
- continue;
31
- seen.add(key);
32
- hints.push({ property, modelType: typeName });
35
+ }
36
+ // Try inline object type match (Prisma GetPayload output)
37
+ const inlineMatch = diag.messageText.match(TS2339_INLINE);
38
+ if (inlineMatch !== null) {
39
+ const [, property] = inlineMatch;
40
+ const key = `${property}`;
41
+ if (!seen.has(key)) {
42
+ seen.add(key);
43
+ hints.push({ property: property, modelType: "(Prisma Payload)" });
44
+ }
45
+ }
33
46
  }
34
47
  if (hints.length === 0)
35
48
  return "";
@@ -39,11 +52,16 @@ function generateTS2339Hints(diagnostics) {
39
52
  return [
40
53
  "## TS2339 Relation Field Hints",
41
54
  "",
42
- "These TS2339 errors are caused by accessing **Prisma relation fields** not available on the base model type.",
43
- "- For transformers: add the missing relation to `select()` using `NeighborTransformer.select()`",
44
- "- For collectors: use the **relation property name** (left side of schema definition) with `{ connect }` syntax",
55
+ "These TS2339 errors are caused by accessing fields not available on the Prisma Payload type.",
56
+ "This usually means the field is MISSING from your `select()` object.",
57
+ "",
58
+ "**Fix**: For each property below, add it to `select()`:",
59
+ "- Scalar field → `fieldName: true`",
60
+ "- Relation (has neighbor transformer) → `relation: NeighborTransformer.select()`",
61
+ "- Relation (no transformer) → `relation: { select: { ... } }`",
62
+ "- Aggregate count → `_count: { select: { relation: true } }`",
45
63
  "",
46
- "Affected:",
64
+ "Affected properties:",
47
65
  lines,
48
66
  ].join("\n");
49
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generateTS2339Hints.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/utils/generateTS2339Hints.ts"],"names":[],"mappings":";;AAYA,kDAyCC;AAnDD;;;;;;;;;GASG;AACH,SAAgB,mBAAmB,CACjC,WAAyD;IAEzD,MAAM,cAAc,GAAG,sDAAsD,CAAC;IAC9E,MAAM,oBAAoB,GAAG,oCAAoC,CAAC;IAElE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,KAAK,GAAmD,EAAE,CAAC;IAEjE,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI;YAAE,SAAS;QAEzC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACrD,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QAE7B,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;QACrC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC;YAAE,SAAS;QAEnD,MAAM,GAAG,GAAG,GAAG,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACvC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEd,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,KAAK;SAChB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,WAAW,CAAC,CAAC,SAAS,IAAI,CAAC;SACvD,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,gCAAgC;QAChC,EAAE;QACF,8GAA8G;QAC9G,iGAAiG;QACjG,iHAAiH;QACjH,EAAE;QACF,WAAW;QACX,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"generateTS2339Hints.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/utils/generateTS2339Hints.ts"],"names":[],"mappings":";;AAcA,kDA2DC;AAvED;;;;;;;;;;;GAWG;AACH,SAAgB,mBAAmB,CACjC,WAAyD;IAEzD,kDAAkD;IAClD,MAAM,aAAa,GAAG,sDAAsD,CAAC;IAC7E,MAAM,aAAa,GACjB,0DAA0D,CAAC;IAE7D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,KAAK,GAAmD,EAAE,CAAC;IAEjE,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI;YAAE,SAAS;QAEzC,8BAA8B;QAC9B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC1D,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,WAAW,CAAC;YAC3C,MAAM,GAAG,GAAG,GAAG,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAS,EAAE,SAAS,EAAE,QAAS,EAAE,CAAC,CAAC;YAC5D,CAAC;YACD,SAAS;QACX,CAAC;QAED,0DAA0D;QAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC1D,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,WAAW,CAAC;YACjC,MAAM,GAAG,GAAG,GAAG,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,KAAK;SAChB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,WAAW,CAAC,CAAC,SAAS,IAAI,CAAC;SACvD,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,gCAAgC;QAChC,EAAE;QACF,8FAA8F;QAC9F,sEAAsE;QACtE,EAAE;QACF,yDAAyD;QACzD,oCAAoC;QACpC,kFAAkF;QAClF,+DAA+D;QAC/D,8DAA8D;QAC9D,EAAE;QACF,sBAAsB;QACtB,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -273,12 +273,12 @@ const systemPrompt = new tstl_1.Singleton(() => "<!--\nfilename: TEST_OPERATION_
273
273
  type: "object",
274
274
  properties: {
275
275
  path: {
276
- description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
276
+ description: "HTTP path of the API operation.\n\nMust start with `/`. Parameters use curly braces: `{paramName}`. Resource\nnames in camelCase. No quotes, spaces, role prefixes (`/admin/`), or API\nversion prefixes (`/api/v1/`).\n\nAllowed characters: letters, digits, `/`, `{`, `}`, `-`, `_`, `.`",
277
277
  type: "string",
278
278
  pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
279
279
  },
280
280
  method: {
281
- description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
281
+ description: "HTTP method (lowercase only).\n\nUse `patch` (not `get`) when a read operation needs a complex\n{@link requestBody}. `get` cannot have a request body.",
282
282
  type: "string",
283
283
  "enum": [
284
284
  "get",