@autobe/agent 0.9.2 → 0.10.1

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 (168) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  6. package/lib/context/AutoBeTokenUsage.js +56 -1
  7. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +288 -653
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4225 -6681
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  19. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  20. package/lib/orchestrate/index.d.ts +2 -2
  21. package/lib/orchestrate/index.js +4 -4
  22. package/lib/orchestrate/index.js.map +1 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
  24. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
  26. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
  28. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
  30. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  32. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
  34. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
  38. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  40. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  42. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  43. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
  45. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  49. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  50. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  52. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
  53. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  54. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  55. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  56. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  57. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  58. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  59. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  60. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  61. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  62. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  63. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  64. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  65. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  66. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  67. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  68. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  69. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  70. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  71. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  72. package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
  73. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  74. package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
  75. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
  78. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  79. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  80. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  81. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  82. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  83. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  86. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  88. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  89. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  92. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  93. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  94. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  95. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  96. package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
  97. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  98. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  99. package/lib/utils/backoffRetry.d.ts +4 -7
  100. package/lib/utils/backoffRetry.js +19 -37
  101. package/lib/utils/backoffRetry.js.map +1 -1
  102. package/lib/utils/forceRetry.d.ts +1 -0
  103. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  104. package/lib/utils/forceRetry.js.map +1 -0
  105. package/package.json +9 -12
  106. package/src/AutoBeAgent.ts +17 -3
  107. package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
  108. package/src/context/AutoBeTokenUsage.ts +85 -1
  109. package/src/factory/createAutoBeApplication.ts +2 -3
  110. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  111. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  112. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  113. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  114. package/src/orchestrate/index.ts +2 -2
  115. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  117. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  118. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  119. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  120. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  121. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  122. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  123. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  124. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  125. package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
  126. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
  127. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  130. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  131. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  132. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  133. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  134. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  135. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  136. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  137. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  138. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  139. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  140. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  141. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  142. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  143. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  144. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  145. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  146. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  147. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  148. package/src/structures/IAutoBeConfig.ts +9 -0
  149. package/src/utils/backoffRetry.ts +25 -36
  150. package/src/utils/forceRetry.ts +13 -0
  151. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  152. package/lib/factory/invertOpenApiDocument.js +0 -51
  153. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  154. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  155. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  156. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  157. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  158. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  159. package/lib/utils/StringUtil.d.ts +0 -4
  160. package/lib/utils/StringUtil.js +0 -43
  161. package/lib/utils/StringUtil.js.map +0 -1
  162. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  163. package/lib/utils/types/BackoffOptions.js.map +0 -1
  164. package/src/factory/invertOpenApiDocument.ts +0 -63
  165. package/src/orchestrate/orchestrateRealize.ts +0 -18
  166. package/src/utils/StringUtil.ts +0 -45
  167. package/src/utils/types/BackoffOptions.ts +0 -15
  168. /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -61,6 +61,15 @@ const transformPrismaComponentsHistories = (state, prefix = null) => {
61
61
  "For example:",
62
62
  "",
63
63
  "* `mv_shopping_daily_stats`",
64
+ "",
65
+ "## User Role Handling",
66
+ "",
67
+ "If the Requirement Analysis Report contains User Role information, **do not normalize** user roles into a single table.",
68
+ "Instead, create separate tables for each distinct role mentioned in the requirements.",
69
+ "",
70
+ "For example, if the requirements mention User, Admin, and Moderator roles:",
71
+ "",
72
+ "* Create separate tables: `User`, `Admin`, `Moderator` (or with prefix: `shopping_user`, `shopping_admin`, `shopping_moderator`)",
64
73
  ].join("\n"),
65
74
  },
66
75
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"transformPrismaComponentsHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaComponentsHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAKnB,MAAM,kCAAkC,GAAG,CAChD,KAAkB,EAClB,SAAwB,IAAI,EAG5B,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C;oBAC5C,+BAA+B;oBAC/B,8CAA8C;iBAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;IACJ,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,iiGAA6C;SAClD;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,0CAA0C;gBAC1C,EAAE;gBACF,8DAA8D;gBAC9D,gDAAgD;gBAChD,EAAE;gBACF,iBAAiB;gBACjB,KAAK,CAAC,OAAO,CAAC,MAAM;gBACpB,EAAE;gBACF,gCAAgC;gBAChC,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACnC,KAAK;gBACL,WAAW;gBACX,EAAE;gBACF,kCAAkC,MAAM,EAAE;gBAC1C,EAAE;gBACF,2FAA2F;gBAC3F,gDAAgD;gBAChD,kEAAkE;gBAClE,yHAAyH;gBACzH,EAAE;gBACF,mBAAmB;gBACnB,EAAE;gBACF,+DAA+D;gBAC/D,EAAE;gBACF,oBAAoB;gBACpB,2BAA2B;gBAC3B,EAAE;gBACF,uIAAuI;gBACvI,cAAc;gBACd,EAAE;gBACF,6BAA6B;aAC9B,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAnEW,QAAA,kCAAkC,sCAmE7C"}
1
+ {"version":3,"file":"transformPrismaComponentsHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaComponentsHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAKnB,MAAM,kCAAkC,GAAG,CAChD,KAAkB,EAClB,SAAwB,IAAI,EAG5B,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU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,CAAC;AA5EW,QAAA,kCAAkC,sCA4E7C"}
@@ -48,6 +48,14 @@ const transformPrismaSchemaHistories = (analyze, component) => {
48
48
  ...component.tables.map((table) => ` - ${table}`),
49
49
  ` - Entire tables you can reference:`,
50
50
  ...component.entireTables.map((table) => ` - ${table}`),
51
+ "",
52
+ "## User Role Rules",
53
+ "",
54
+ "**CRITICAL**: For User Role tables (User, Admin, Moderator, etc.):",
55
+ "1. **Separate tables** - Each role = independent table (User, Admin, Moderator tables)",
56
+ "2. **No `role` field** - Never include role enum fields in any table",
57
+ "",
58
+ "You can use TPT (Table Per Type) pattern with FK relationships if needed, or completely separate tables.",
51
59
  ].join("\n"),
52
60
  },
53
61
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"transformPrismaSchemaHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaSchemaHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAInB,MAAM,8BAA8B,GAAG,CAC5C,OAA6B,EAC7B,SAIC,EAGD,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,8oWAA0C;SAC/C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,oCAAoC;gBACpC,wCAAwC;gBACxC,sCAAsC;gBACtC,EAAE;;aAEH,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,0CAA0C;gBAC1C,EAAE;gBACF,8DAA8D;gBAC9D,gDAAgD;gBAChD,EAAE;gBACF,iBAAiB;gBACjB,OAAO,CAAC,MAAM;gBACd,EAAE;gBACF,gCAAgC;gBAChC,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC7B,KAAK;gBACL,EAAE;gBACF,YAAY;gBACZ,EAAE;gBACF,wBAAwB,SAAS,CAAC,QAAQ,EAAE;gBAC5C,mCAAmC;gBACnC,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC;gBACpD,sCAAsC;gBACtC,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC;aAC3D,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA1DW,QAAA,8BAA8B,kCA0DzC"}
1
+ {"version":3,"file":"transformPrismaSchemaHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaSchemaHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAInB,MAAM,8BAA8B,GAAG,CAC5C,OAA6B,EAC7B,SAIC,EAGD,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,8oWAA0C;SAC/C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,oCAAoC;gBACpC,wCAAwC;gBACxC,sCAAsC;gBACtC,EAAE;;aAEH,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,0CAA0C;gBAC1C,EAAE;gBACF,8DAA8D;gBAC9D,gDAAgD;gBAChD,EAAE;gBACF,iBAAiB;gBACjB,OAAO,CAAC,MAAM;gBACd,EAAE;gBACF,gCAAgC;gBAChC,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC7B,KAAK;gBACL,EAAE;gBACF,YAAY;gBACZ,EAAE;gBACF,wBAAwB,SAAS,CAAC,QAAQ,EAAE;gBAC5C,mCAAmC;gBACnC,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC;gBACpD,sCAAsC;gBACtC,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC;gBAC1D,EAAE;gBACF,oBAAoB;gBACpB,EAAE;gBACF,oEAAoE;gBACpE,wFAAwF;gBACxF,sEAAsE;gBACtE,EAAE;gBACF,0GAA0G;aAC3G,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAlEW,QAAA,8BAA8B,kCAkEzC"}
@@ -0,0 +1,11 @@
1
+ import { AutoBeAssistantMessageHistory, AutoBeRealizeHistory } from "@autobe/interface";
2
+ import { ILlmSchema } from "@samchon/openapi";
3
+ import { AutoBeContext } from "../../context/AutoBeContext";
4
+ import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
5
+ export declare const orchestrateRealize: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeRealizeHistory>;
6
+ export declare const FAILED: unique symbol;
7
+ export type FAILED = typeof FAILED;
8
+ export declare function pipe<A, B>(a: A, ab: (a: A) => Promise<B | FAILED>): Promise<B | FAILED>;
9
+ export declare function pipe<A, B, C>(a: A, ab: (a: A) => Promise<B | FAILED>, bc: (b: B) => Promise<C | FAILED>): Promise<C | FAILED>;
10
+ export declare function pipe<A, B, C, D>(a: A, ab: (a: A) => Promise<B | FAILED>, bc: (b: B) => Promise<C | FAILED>, cd: (c: C) => Promise<D | FAILED>): Promise<D | FAILED>;
11
+ export declare function pipe<A, B, C, D>(a: A, ab: (a: A) => Promise<B | FAILED>, bc: (b: B) => Promise<C | FAILED>, cd: (c: C) => Promise<D | FAILED>): Promise<D | FAILED>;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FAILED = exports.orchestrateRealize = void 0;
13
+ exports.pipe = pipe;
14
+ const uuid_1 = require("uuid");
15
+ const orchestrateRealizeCoder_1 = require("./orchestrateRealizeCoder");
16
+ const orchestrateRealizePlanner_1 = require("./orchestrateRealizePlanner");
17
+ const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
18
+ var _a, _b, _c, _d, _e;
19
+ props;
20
+ const ops = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document.operations;
21
+ if (!ops) {
22
+ throw new Error();
23
+ }
24
+ const files = Object.assign(Object.assign({}, (_b = ctx.state().interface) === null || _b === void 0 ? void 0 : _b.files), (_c = ctx.state().test) === null || _c === void 0 ? void 0 : _c.files.reduce((acc, file) => {
25
+ acc[file.location] = file.content;
26
+ return acc;
27
+ }, {}));
28
+ const codes = yield Promise.all(ops.map((op) => __awaiter(void 0, void 0, void 0, function* () {
29
+ return ({
30
+ operation: op,
31
+ result: yield pipe(op, (op) => (0, orchestrateRealizePlanner_1.orchestrateRealizePlanner)(ctx, op), (p) => (0, orchestrateRealizeCoder_1.orchestrateRealizeCoder)(ctx, op, p, files)),
32
+ });
33
+ })));
34
+ const successes = [];
35
+ const failures = [];
36
+ for (const code of codes) {
37
+ if (code.result === exports.FAILED) {
38
+ failures.push({
39
+ operation: code.operation,
40
+ result: code.result,
41
+ });
42
+ }
43
+ else {
44
+ successes.push({
45
+ operation: code.operation,
46
+ result: code.result,
47
+ });
48
+ }
49
+ }
50
+ const now = new Date().toISOString();
51
+ ctx.dispatch({
52
+ type: "assistantMessage",
53
+ text: "Any codes can not be generated.",
54
+ created_at: now,
55
+ });
56
+ return {
57
+ type: "realize",
58
+ compiled: 1,
59
+ files: {},
60
+ completed_at: now,
61
+ created_at: now,
62
+ id: (0, uuid_1.v4)(),
63
+ reason: props.reason,
64
+ step: (_e = (_d = ctx.state().test) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
65
+ };
66
+ });
67
+ exports.orchestrateRealize = orchestrateRealize;
68
+ exports.FAILED = Symbol("FAILED");
69
+ function pipe(a, ...fns) {
70
+ return fns.reduce((prev, fn) => {
71
+ return prev.then((result) => {
72
+ if (result === exports.FAILED)
73
+ return exports.FAILED;
74
+ return fn(result);
75
+ });
76
+ }, Promise.resolve(a));
77
+ }
78
+ //# sourceMappingURL=orchestrateRealize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsHA,oBAUC;AA1HD,+BAA0B;AAI1B,uEAAoE;AACpE,2EAAwE;AAGjE,MAAM,kBAA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zB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ import { ILlmSchema } from "@samchon/openapi";
3
+ import { AutoBeContext } from "../../context/AutoBeContext";
4
+ import { FAILED } from "./orchestrateRealize";
5
+ import { RealizePlannerOutput } from "./orchestrateRealizePlanner";
6
+ import { IAutoBeRealizeCoderApplication } from "./structures/IAutoBeRealizeCoderApplication";
7
+ /**
8
+ * Generates a TypeScript function implementation based on the given plan.
9
+ *
10
+ * This function transforms the plan (function name, input/output schema,
11
+ * constraints, and scenarios) into a complete TypeScript function as a string.
12
+ * It is responsible only for producing the code logic, and does not handle
13
+ * imports, exports, or formatting.
14
+ *
15
+ * Import statements are handled separately and will be injected automatically.
16
+ * Any unused imports will be removed by tooling (e.g. eslint).
17
+ *
18
+ * Type annotations should be omitted whenever possible to favor TypeScript's
19
+ * type inference, unless explicit types are critical to correctness.
20
+ *
21
+ * @param ctx - AutoBE execution context
22
+ * @param props - Planning result describing what function to generate
23
+ * @returns The generated function name and TypeScript code
24
+ */
25
+ export declare const orchestrateRealizeCoder: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation, props: RealizePlannerOutput, files: Record<string, string>) => Promise<IAutoBeRealizeCoderApplication.RealizeCoderOutput | FAILED>;
@@ -0,0 +1,326 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.orchestrateRealizeCoder = void 0;
49
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
50
+ const core_1 = require("@agentica/core");
51
+ const typia_1 = __importDefault(require("typia"));
52
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
+ const enforceToolCall_1 = require("../../utils/enforceToolCall");
54
+ const getTestScenarioArtifacts_1 = require("../test/compile/getTestScenarioArtifacts");
55
+ const orchestrateRealize_1 = require("./orchestrateRealize");
56
+ const transformRealizeCoderHistories_1 = require("./transformRealizeCoderHistories");
57
+ /**
58
+ * Generates a TypeScript function implementation based on the given plan.
59
+ *
60
+ * This function transforms the plan (function name, input/output schema,
61
+ * constraints, and scenarios) into a complete TypeScript function as a string.
62
+ * It is responsible only for producing the code logic, and does not handle
63
+ * imports, exports, or formatting.
64
+ *
65
+ * Import statements are handled separately and will be injected automatically.
66
+ * Any unused imports will be removed by tooling (e.g. eslint).
67
+ *
68
+ * Type annotations should be omitted whenever possible to favor TypeScript's
69
+ * type inference, unless explicit types are critical to correctness.
70
+ *
71
+ * @param ctx - AutoBE execution context
72
+ * @param props - Planning result describing what function to generate
73
+ * @returns The generated function name and TypeScript code
74
+ */
75
+ const orchestrateRealizeCoder = (ctx, operation, props, files) => __awaiter(void 0, void 0, void 0, function* () {
76
+ const artifacts = yield (0, getTestScenarioArtifacts_1.getTestScenarioArtifacts)(ctx, {
77
+ endpoint: {
78
+ method: operation.method,
79
+ path: operation.path,
80
+ },
81
+ dependencies: [],
82
+ });
83
+ const pointer = {
84
+ value: null,
85
+ };
86
+ const controller = createApplication({
87
+ model: ctx.model,
88
+ build: (props) => {
89
+ pointer.value = props.result;
90
+ },
91
+ });
92
+ const agent = new core_1.MicroAgentica({
93
+ controllers: [controller],
94
+ model: ctx.model,
95
+ vendor: ctx.vendor,
96
+ config: Object.assign(Object.assign({}, ctx.config), { executor: {
97
+ describe: null,
98
+ } }),
99
+ histories: (0, transformRealizeCoderHistories_1.transformRealizeCoderHistories)(ctx.state(), props, artifacts),
100
+ });
101
+ (0, enforceToolCall_1.enforceToolCall)(agent);
102
+ yield agent.conversate("Write code.");
103
+ const tokenUsage = agent.getTokenUsage();
104
+ ctx.usage().record(tokenUsage, ["realize"]);
105
+ if (pointer.value === null) {
106
+ return orchestrateRealize_1.FAILED;
107
+ }
108
+ pointer.value.implementationCode = yield ctx.compiler.typescript.beautify(pointer.value.implementationCode);
109
+ pointer.value.implementationCode = pointer.value.implementationCode
110
+ .replaceAll('import { MyGlobal } from "../MyGlobal";', "")
111
+ .replaceAll('import typia, { tags } from "typia";', "")
112
+ .replaceAll('import { Prisma } from "@prisma/client";', "")
113
+ .replaceAll('import { jwtDecode } from "./jwtDecode"', "");
114
+ pointer.value.implementationCode = [
115
+ 'import { MyGlobal } from "../MyGlobal";',
116
+ 'import typia, { tags } from "typia";',
117
+ 'import { Prisma } from "@prisma/client";',
118
+ 'import { jwtDecode } from "./jwtDecode"',
119
+ "",
120
+ pointer.value.implementationCode,
121
+ ].join("\n");
122
+ files[`src/providers/${props.functionName}.ts`] =
123
+ pointer.value.implementationCode;
124
+ return Object.assign(Object.assign({}, pointer.value), { functionName: props.functionName });
125
+ });
126
+ exports.orchestrateRealizeCoder = orchestrateRealizeCoder;
127
+ function createApplication(props) {
128
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
129
+ const application = collection[props.model];
130
+ return {
131
+ protocol: "class",
132
+ name: "Write code",
133
+ application,
134
+ execute: {
135
+ programing: (next) => {
136
+ props.build(next);
137
+ },
138
+ },
139
+ };
140
+ }
141
+ const claude = {
142
+ model: "claude",
143
+ options: {
144
+ reference: true,
145
+ separate: null
146
+ },
147
+ functions: [
148
+ {
149
+ name: "programing",
150
+ parameters: {
151
+ description: "Current Type: {@link IAutoBeRealizeCoderApplication.IProps}",
152
+ type: "object",
153
+ properties: {
154
+ result: {
155
+ $ref: "#/$defs/IAutoBeRealizeCoderApplication.RealizeCoderOutput"
156
+ }
157
+ },
158
+ required: [
159
+ "result"
160
+ ],
161
+ additionalProperties: false,
162
+ $defs: {
163
+ "IAutoBeRealizeCoderApplication.RealizeCoderOutput": {
164
+ description: "The result of the code generation step, representing a fully generated\nTypeScript function.",
165
+ type: "object",
166
+ properties: {
167
+ functionName: {
168
+ description: "The name of the function to be generated.\n\nThis name will be used as the function's identifier and as the export\nname in the provider file.",
169
+ type: "string"
170
+ },
171
+ implementationCode: {
172
+ description: "The raw TypeScript code string implementing the function.\n\n- The implementation must be valid TypeScript code.\n- It should focus solely on the logic of the function.\n- Import statements do **not** need to be included. They will be\n automatically inserted by the system.\n- Any unused imports will be automatically removed by eslint.\n- Type annotations (e.g. for parameters and return types) should be omitted\n if they can be inferred.",
173
+ type: "string"
174
+ }
175
+ },
176
+ required: [
177
+ "functionName",
178
+ "implementationCode"
179
+ ]
180
+ }
181
+ }
182
+ },
183
+ validate: (() => { const _io0 = input => "object" === typeof input.result && null !== input.result && _io1(input.result); const _io1 = input => "string" === typeof input.functionName && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.result && null !== input.result || _report(_exceptionable, {
184
+ path: _path + ".result",
185
+ expected: "IAutoBeRealizeCoderApplication.RealizeCoderOutput",
186
+ value: input.result
187
+ })) && _vo1(input.result, _path + ".result", true && _exceptionable) || _report(_exceptionable, {
188
+ path: _path + ".result",
189
+ expected: "IAutoBeRealizeCoderApplication.RealizeCoderOutput",
190
+ value: input.result
191
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.functionName || _report(_exceptionable, {
192
+ path: _path + ".functionName",
193
+ expected: "string",
194
+ value: input.functionName
195
+ }), "string" === typeof input.implementationCode || _report(_exceptionable, {
196
+ path: _path + ".implementationCode",
197
+ expected: "string",
198
+ value: input.implementationCode
199
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
200
+ if (false === __is(input)) {
201
+ errors = [];
202
+ _report = __typia_transform__validateReport._validateReport(errors);
203
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
204
+ path: _path + "",
205
+ expected: "IAutoBeRealizeCoderApplication.IProps",
206
+ value: input
207
+ })) && _vo0(input, _path + "", true) || _report(true, {
208
+ path: _path + "",
209
+ expected: "IAutoBeRealizeCoderApplication.IProps",
210
+ value: input
211
+ }))(input, "$input", true);
212
+ const success = 0 === errors.length;
213
+ return success ? {
214
+ success,
215
+ data: input
216
+ } : {
217
+ success,
218
+ errors,
219
+ data: input
220
+ };
221
+ }
222
+ return {
223
+ success: true,
224
+ data: input
225
+ };
226
+ }; })()
227
+ }
228
+ ]
229
+ };
230
+ const collection = {
231
+ chatgpt: {
232
+ model: "chatgpt",
233
+ options: {
234
+ reference: true,
235
+ strict: false,
236
+ separate: null
237
+ },
238
+ functions: [
239
+ {
240
+ name: "programing",
241
+ parameters: {
242
+ description: "Current Type: {@link IAutoBeRealizeCoderApplication.IProps}",
243
+ type: "object",
244
+ properties: {
245
+ result: {
246
+ $ref: "#/$defs/IAutoBeRealizeCoderApplication.RealizeCoderOutput"
247
+ }
248
+ },
249
+ required: [
250
+ "result"
251
+ ],
252
+ additionalProperties: false,
253
+ $defs: {
254
+ "IAutoBeRealizeCoderApplication.RealizeCoderOutput": {
255
+ description: "The result of the code generation step, representing a fully generated\nTypeScript function.",
256
+ type: "object",
257
+ properties: {
258
+ functionName: {
259
+ description: "The name of the function to be generated.\n\nThis name will be used as the function's identifier and as the export\nname in the provider file.",
260
+ type: "string"
261
+ },
262
+ implementationCode: {
263
+ description: "The raw TypeScript code string implementing the function.\n\n- The implementation must be valid TypeScript code.\n- It should focus solely on the logic of the function.\n- Import statements do **not** need to be included. They will be\n automatically inserted by the system.\n- Any unused imports will be automatically removed by eslint.\n- Type annotations (e.g. for parameters and return types) should be omitted\n if they can be inferred.",
264
+ type: "string"
265
+ }
266
+ },
267
+ required: [
268
+ "functionName",
269
+ "implementationCode"
270
+ ]
271
+ }
272
+ }
273
+ },
274
+ validate: (() => { const _io0 = input => "object" === typeof input.result && null !== input.result && _io1(input.result); const _io1 = input => "string" === typeof input.functionName && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.result && null !== input.result || _report(_exceptionable, {
275
+ path: _path + ".result",
276
+ expected: "IAutoBeRealizeCoderApplication.RealizeCoderOutput",
277
+ value: input.result
278
+ })) && _vo1(input.result, _path + ".result", true && _exceptionable) || _report(_exceptionable, {
279
+ path: _path + ".result",
280
+ expected: "IAutoBeRealizeCoderApplication.RealizeCoderOutput",
281
+ value: input.result
282
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.functionName || _report(_exceptionable, {
283
+ path: _path + ".functionName",
284
+ expected: "string",
285
+ value: input.functionName
286
+ }), "string" === typeof input.implementationCode || _report(_exceptionable, {
287
+ path: _path + ".implementationCode",
288
+ expected: "string",
289
+ value: input.implementationCode
290
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
291
+ if (false === __is(input)) {
292
+ errors = [];
293
+ _report = __typia_transform__validateReport._validateReport(errors);
294
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
295
+ path: _path + "",
296
+ expected: "IAutoBeRealizeCoderApplication.IProps",
297
+ value: input
298
+ })) && _vo0(input, _path + "", true) || _report(true, {
299
+ path: _path + "",
300
+ expected: "IAutoBeRealizeCoderApplication.IProps",
301
+ value: input
302
+ }))(input, "$input", true);
303
+ const success = 0 === errors.length;
304
+ return success ? {
305
+ success,
306
+ data: input
307
+ } : {
308
+ success,
309
+ errors,
310
+ data: input
311
+ };
312
+ }
313
+ return {
314
+ success: true,
315
+ data: input
316
+ };
317
+ }; })()
318
+ }
319
+ ]
320
+ },
321
+ claude,
322
+ llama: claude,
323
+ deepseek: claude,
324
+ "3.1": claude,
325
+ };
326
+ //# sourceMappingURL=orchestrateRealizeCoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateRealizeCoder.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealizeCoder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,uFAAoF;AAEpF,6DAA8C;AAG9C,qFAAkF;AAElF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,uBAAuB,GAAG,CACrC,GAAyB,EACzB,SAAmC,EACnC,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ import { ILlmSchema } from "@samchon/openapi";
3
+ import { AutoBeContext } from "../../context/AutoBeContext";
4
+ export interface RealizePlannerOutput {
5
+ /**
6
+ * The name of the function to be generated.
7
+ *
8
+ * Derived from the Swagger path and method. The function name must be written
9
+ * in snake_case. It serves as the entry point in both code generation and
10
+ * test code.
11
+ *
12
+ * Once the function is generated, the function name and file name will be the
13
+ * same. The generated file will be located at
14
+ * `src/providers/${function_name}.ts`.
15
+ */
16
+ functionName: string;
17
+ /**
18
+ * Definition of path and query parameters extracted from the OpenAPI spec.
19
+ *
20
+ * Includes input values passed via URL path or query string. Used for type
21
+ * definitions, validation, and function signature construction.
22
+ */
23
+ parameters: AutoBeOpenApi.IParameter[];
24
+ /**
25
+ * Schema definition for the request body input.
26
+ *
27
+ * Extracted from the requestBody section of Swagger. Represents the input
28
+ * data passed in the body (e.g., JSON). Used for generating function
29
+ * arguments or DTOs.
30
+ */
31
+ inputSchema: AutoBeOpenApi.IRequestBody | null;
32
+ /**
33
+ * Schema definition for the response body.
34
+ *
35
+ * Extracted from the responses section of Swagger. Used to define the return
36
+ * type and expected output in test code.
37
+ */
38
+ outputSchema: AutoBeOpenApi.IResponseBody | null;
39
+ /**
40
+ * Natural language description of the function’s purpose.
41
+ *
42
+ * Extracted from the summary or description field of Swagger. Used for code
43
+ * documentation, test scenario generation, and conveying function intent.
44
+ */
45
+ description: string;
46
+ /**
47
+ * HTTP method information.
48
+ *
49
+ * Extracted from the Swagger operation method. Used to define the request
50
+ * type during code and test generation.
51
+ */
52
+ operationType: "get" | "post" | "put" | "delete" | "patch";
53
+ /**
54
+ * List of scenario descriptions for test code generation.
55
+ *
56
+ * Each scenario describes the expected behavior of the function under certain
57
+ * conditions. Used as a basis for TDD-style automated test generation.
58
+ */
59
+ testScenarios: string[];
60
+ }
61
+ /**
62
+ * Generates a planning result that defines what kind of function should be
63
+ * created, based solely on the provided Swagger (OpenAPI) operation — without
64
+ * using an LLM.
65
+ *
66
+ * This function analyzes the structure of the OpenAPI operation (such as the
67
+ * path, method, parameters, request/response schema, and descriptions) to
68
+ * determine the appropriate function name, input/output types, and purpose of
69
+ * the function.
70
+ *
71
+ * The result of this function (`RealizePlannerOutput`) will be passed to the
72
+ * next step in the AutoBE pipeline, which is responsible for generating the
73
+ * actual implementation code.
74
+ *
75
+ * @param ctx - AutoBE context including model and configuration
76
+ * @param operation - A single OpenAPI operation object to analyze and plan
77
+ * @returns A planning object containing all structural information needed to
78
+ * generate the function
79
+ */
80
+ export declare const orchestrateRealizePlanner: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation) => Promise<RealizePlannerOutput>;