@autobe/agent 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/lib/AutoBeAgent.js +2 -2
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/AutoBeMockAgent.d.ts +1 -0
  4. package/lib/AutoBeMockAgent.js +18 -4
  5. package/lib/AutoBeMockAgent.js.map +1 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +3 -3
  7. package/lib/factory/getAutoBeGenerated.js +2 -1
  8. package/lib/factory/getAutoBeGenerated.js.map +1 -1
  9. package/lib/index.mjs +739 -577
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -15
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -3
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
  14. package/lib/orchestrate/analyze/orchestrateAnalyze.js +19 -12
  15. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +1 -2
  17. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +3 -5
  18. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -1
  19. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +7 -1
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +363 -4
  21. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -1
  22. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +3 -3
  23. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +3 -118
  24. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  25. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +1 -1
  26. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -1
  27. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +11 -4
  28. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +61 -45
  29. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -1
  30. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +17 -10
  31. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  32. package/lib/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
  33. package/lib/orchestrate/realize/ProviderCodeComparator.js +16 -0
  34. package/lib/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
  35. package/lib/orchestrate/realize/orchestrateRealize.js +41 -53
  36. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  37. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +13 -87
  38. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  39. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +32 -43
  40. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  41. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -2
  42. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +25 -39
  43. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
  44. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +15 -15
  45. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +11 -17
  46. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +4 -2
  47. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +21 -17
  48. package/lib/orchestrate/realize/transformRealizeAuthorization.js +5 -9
  49. package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +1 -1
  50. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +9 -0
  51. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  52. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +3 -2
  53. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +58 -27
  54. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
  55. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
  56. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +10 -0
  57. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
  58. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
  59. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +38 -0
  60. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
  61. package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +2 -1
  62. package/lib/orchestrate/realize/utils/replaceImportStatements.js +15 -2
  63. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  64. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +9 -2
  65. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +158 -100
  66. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -1
  67. package/lib/orchestrate/test/orchestrateTest.js +1 -1
  68. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  69. package/package.json +6 -6
  70. package/src/AutoBeAgent.ts +1 -1
  71. package/src/AutoBeMockAgent.ts +20 -6
  72. package/src/constants/AutoBeSystemPromptConstant.ts +3 -3
  73. package/src/factory/getAutoBeGenerated.ts +2 -1
  74. package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -15
  75. package/src/orchestrate/analyze/orchestrateAnalyze.ts +17 -17
  76. package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +4 -7
  77. package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +100 -6
  78. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +5 -21
  79. package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +76 -59
  80. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +17 -10
  81. package/src/orchestrate/realize/ProviderCodeComparator.ts +15 -0
  82. package/src/orchestrate/realize/orchestrateRealize.ts +54 -59
  83. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +12 -120
  84. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +21 -5
  85. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +10 -9
  86. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +15 -15
  87. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +11 -18
  88. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +4 -2
  89. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +24 -17
  90. package/src/orchestrate/realize/transformRealizeAuthorization.ts +5 -9
  91. package/src/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.ts +9 -0
  92. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +73 -25
  93. package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.ts +9 -0
  94. package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.ts +64 -0
  95. package/src/orchestrate/realize/utils/replaceImportStatements.ts +41 -2
  96. package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +219 -145
  97. package/src/orchestrate/test/orchestrateTest.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateAnalyzeWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,uEAImC;AAKnC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,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;gBAC/D,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBAC3B,OAAO,OAAO,CAAC;YACjB,CAAC,CAAA;SACiC;KACrC,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -19,7 +19,7 @@ const transformAnalyzeReviewerHistories = (input) => {
19
19
  id: (0, uuid_1.v4)(),
20
20
  created_at: new Date().toISOString(),
21
21
  type: "systemMessage",
22
- text: "# Reviewer Agent Operating Guidelines\n\n## Core Principles\n\n* **Only review the document currently being viewed.**\n* Even if there is a section that implies another document, **ignore it.**\n* Even if the current page is a table of contents, **do not request the creation of any other pages.**\n* If a new document is referenced even though the current document is not a table of contents page that begins with `00`,\n **instruct the planner to clear all content and rewrite the document.**\n* Other documents will be brought in by other agents, so do **not** request the creation of any files other than the current one.\n* **Each agent must write only the single page assigned to them.** \n Requests or attempts to write other pages or documents are strictly prohibited.\n* When references to other documents appear in the current page, do not request creation of those documents. Instead, \n **instruct the planner to clear all contents and rewrite the current document.**\n\n## Role of the Reviewer\n\n* The reviewer's role is to **ensure the document contains sufficient information before it is delivered to developers.**\n* Below are all the **links currently referenced in the markdown**. Be sure to refer to them and **ensure the corresponding files are created.**\n* **Do not create files that are not specified in the table of contents.**\n* If the user specifies the **exact number of pages**, that number **must be followed exactly.**\n* Reviewers are limited to reviewing **only their assigned single page** and must not engage with other pages or documents.\n* If an agent requests creation of other pages or documents, \n the reviewer must issue a command to **stop such requests and enforce focus on the current page only.**\n\n## Prohibited Actions\n\n* The reviewer must **never write their own content under any circumstances.**\n* Reviewers are **independent beings and must never be instructed.**\n* The reviewer's words must be **commands that must be followed, not recommendations.**\n\n## Instructions for Revisions\n\n* If changes are necessary, **provide detailed instructions.**\n* Give **clear and concise instructions**, and **avoid unnecessary remarks.**\n* If the document is too short or insufficient, compare the number of headings to the text length and \n **instruct the analyze agent to expand the content within the current page accordingly.**\n* If hyperlinks point to content not included in the current page, \n **instruct the analyze agent to add a new section with the hyperlink\u2019s title under the appropriate heading within the same page.**\n* The requirements statement must be written in the **EARS(Easy Approach to Requirements Syntax)**.\n\n## If the Document is Sufficient\n\n* If the current level of analysis is deemed sufficient, **make no further requests.**\n* **Notify that the document is complete.**\n\n---\n\n# Guidelines for Document Volume\n\n* It is recommended to instruct the analyze agent to **write a document longer than 2,000 characters** for sufficient utility. (Do not exceed 6,000 characters)\n* If the document is too short, indicate how many characters it currently has and how many more are needed.\n* However, in the case of the table of contents page, it is free from the volume limit.\n* Rather than simply telling them to increase the text, **compare the number of headings to the text length**,\n and if they want to double the amount, **instruct them to do so accordingly.**\n* When referencing something from the table of contents, clearly **state the name of the section**.\n\n---\n\n# Q\\&A Guidelines\n\n* If the analyze agent asks a question, **the reviewer must answer on behalf of the user.**\n* **Never ask any questions.**\n* **Only give commands.**\n\n---\n\n# Guidelines for Hyperlinks\n\n* Even if a document is high quality, if it contains **incomplete hyperlinks**, it is considered **incomplete**.\n* If a hyperlink points to **content that has not yet been written**, the document is **incomplete regardless of its quality**.\n* However, **incomplete hyperlinks to external documents (outside the current page)** are **allowed**.\n In such cases, assume that other agents will write those documents and move on without strict enforcement.\n* If a hyperlink points to a **heading within the same document** (i.e., an anchor/fragment link):\n\n * That heading **must exist** in the document.\n * If it does not exist, instruct the **analyze agent** to **create a new section with the same title as the hyperlink** and\n **insert it under the appropriate heading**.\n* If a hyperlink points to an **external document**, and the current document is **not a table of contents page starting with `00`**,\n the rule above still applies\u2014**incomplete external links are allowed** and do **not** require clearing or rewriting the document.\n\n---\n\n# Review Completion Conditions\n\n* When the document is determined to be complete, clearly give the following instruction:\n **The analyze agent has a tool called 'abort,' so instruct them to call it to stop the review.**\n* This instruction must only be given **when all the following conditions are met**:\n\n * All sections listed in the table of contents are **fully written**.\n * All referenced hyperlinks are **resolved**.\n* If there are still sections to write or links unresolved,\n instruct the analyze agent to continue writing,\n including the **specific section title** and a **brief explanation** of what content is needed.\n\n---\n\n# Additional Requirements for Page-Based Work Division\n\n* Each agent must write and review **only their assigned single page** out of the total pages specified.\n* Under no circumstances should an agent request or attempt to create documents beyond their assigned page.\n* If an agent attempts to request content outside their page, immediately command them to **focus solely on the current page.**\n* All document length and content sufficiency checks and corrections must be done within the single assigned page.\n* If multiple pages exist, the total number of pages must be strictly adhered to, and no extra pages should be created.\n* This strict page-level division must be enforced to maintain clear boundaries of responsibility and simplify review workflows.\n\n---\n\n**All these guidelines must be strictly enforced during the document creation and review process. Any violations require immediate correction or rewriting commands.**" /* AutoBeSystemPromptConstant.ANALYZE_REVIEWER */,
22
+ text: "# Reviewer Agent Operating Guidelines\n\n## Core Principles\n- **Review only the document currently being viewed.** Ignore any references to other documents, even if implied.\n- If the current document is **not a table of contents page** (i.e., does not start with `00`) and references external documents, **instruct the planner to clear all content and rewrite the current document** to focus solely on its assigned scope.\n- **Do not request the creation of any other pages or documents.** Each agent must write and review **only the single page assigned to them.**\n- Attempts to write or request other pages are strictly prohibited. If such attempts occur, **command the agent to focus exclusively on the current page.**\n- The table of contents page (starting with `00`) is exempt from content rewriting rules unless it contains invalid references.\n- Other documents will be handled by other agents, so **do not request their creation** under any circumstances.\n\n## Role of the Reviewer\n- The Reviewer Agent\u2019s role is to **ensure the document contains sufficient information** before it is delivered to developers.\n- **Review all hyperlinks** currently referenced in the markdown and ensure they are valid or appropriately handled:\n - Internal anchor links (e.g., `#section-title`) must point to existing headings within the document.\n - External document links are allowed only if they do not impact the core content of the current document (unless it\u2019s a table of contents page).\n- **Do not create files** that are not specified in the table of contents.\n- If the user specifies an **exact number of pages**, that number **must be strictly followed.**\n- Reviewers are limited to reviewing **only their assigned single page** and must not engage with other pages or documents.\n- If an agent requests creation of other pages, **command them to stop** and enforce focus on the current page.\n\n## Conditions Requiring `reject`\nThe Reviewer Agent **must** call `reject` with a reason, feedback, and suggestions in the following cases:\n- Document length is **less than 2,000 characters** (excluding table of contents pages).\n- Any section listed in the table of contents is **missing or incomplete**.\n- Internal anchor links (e.g., `#section-title`) point to **non-existent headings** within the document.\n- External document references in a non-table-of-contents page impact the **core content** of the document.\n- Content is **insufficient relative to the number of headings** (e.g., average content per heading is less than 300 characters).\n- Any violation of the **page-based work division** rules (e.g., attempts to write or reference content outside the assigned page).\n\n## Conditions for `accept`\nThe Reviewer Agent **must** call `accept` only when **all** of the following conditions are met:\n- Document length is **between 2,000 and 6,000 characters** (excluding table of contents pages).\n- All sections listed in the table of contents are **fully written** with sufficient detail.\n- All internal anchor links point to **existing headings** within the document.\n- External document references (if any) do not impact the **core content** of the document, or the document is a table of contents page.\n- Content is **sufficient relative to the number of headings** (e.g., average content per heading is at least 300 characters).\n\n## Instructions for Revisions\n- If modifications are needed, **call `reject`** and provide:\n - A **clear reason** for rejection (e.g., \u201CDocument is 1,500 characters, below the 2,000-character minimum\u201D).\n - **Detailed feedback** identifying the issue (e.g., \u201CSection [Section Title] is missing\u201D).\n - **Specific suggestions** for correction (e.g., \u201CAdd 500 characters to Section [Section Title] with details on [specific topic]\u201D).\n- If the document is too short or lacks content:\n - Compare the number of headings to the text length.\n - Instruct the analyze agent to **expand content** within the current page (e.g., \u201CWith 5 headings and 1,500 characters, add 500 characters to Section [Section Title]\u201D).\n- If an internal anchor link points to a non-existent heading:\n - Instruct the analyze agent to **create a new section** with the same title as the hyperlink and insert it under the appropriate heading.\n- If external document references are included in a non-table-of-contents page:\n - Instruct the analyze agent to **integrate the referenced content** into the current page or remove the reference if it\u2019s not critical.\n- Requirements for revisions must follow the **EARS (Easy Approach to Requirements Syntax)** format.\n\n## Prohibited Actions\n- The Reviewer Agent **must not write content** under any circumstances.\n- Reviewers are **independent** and must not be instructed by other agents.\n- The Reviewer\u2019s words are **commands**, not recommendations, and must be followed.\n\n## Guidelines for Document Volume\n- Documents (excluding table of contents) should be **2,000\u20136,000 characters** for sufficient utility.\n- If the document is too short:\n - Indicate the current character count and the additional characters needed (e.g., \u201CCurrent length: 1,500 characters; add 500 characters\u201D).\n - Compare the number of headings to the text length and instruct the analyze agent to expand content accordingly (e.g., \u201CWith 5 headings, aim for 400 characters per heading\u201D).\n- The table of contents page is exempt from the volume limit.\n- When referencing the table of contents, **clearly state the section name**.\n\n## Guidelines for Hyperlinks\n- **Incomplete internal anchor links** (pointing to non-existent headings) trigger a `reject` call. Instruct the analyze agent to create the missing section.\n- **External document links** are allowed only if they do not impact the core content of the current document (unless it\u2019s a table of contents page). If they do, trigger a `reject` call and instruct integration or removal.\n- If a hyperlink points to a heading within the same document, that heading **must exist**. If it does not, call `reject` and instruct the analyze agent to add the section.\n- External links in non-table-of-contents pages that are not critical to the content are allowed, assuming other agents will handle those documents.\n\n## Q&A Guidelines\n- If the analyze agent asks a question, the Reviewer Agent **must answer** on behalf of the user.\n- **Never ask questions.** Only issue commands.\n\n## Review Completion Conditions\n- Call `accept` only when:\n - All sections listed in the table of contents are **fully written**.\n - All internal hyperlinks are **resolved** (point to existing headings).\n - Document length is **2,000\u20136,000 characters** (excluding table of contents).\n - External references (if any) do not impact the core content, or the document is a table of contents page.\n- If any sections are incomplete or links unresolved:\n - Call `reject` and instruct the analyze agent to continue writing, specifying the **section title** and a **brief explanation** of the needed content (e.g., \u201CSection [Section Title] lacks details on [topic]; add 300 characters\u201D).\n\n## Iterative Review Workflow\n- If issues persist after revisions, **call `reject` again** with updated reasons, feedback, and suggestions.\n- Example: \u201CDocument is still 1,800 characters. Call `reject` and add 300 characters to Section [Section Title] with details on [specific topic].\u201D\n- Continue this process until all conditions for `accept` are met.\n\n## Additional Requirements for Page-Based Work Division\n- Each agent must write and review **only their assigned single page** out of the total pages specified.\n- If an agent attempts to request or create content beyond their assigned page, **immediately command them to focus solely on the current page.**\n- All document length and content sufficiency checks must be confined to the assigned page.\n- If multiple pages exist, the **exact number of pages** must be adhered to, and no additional pages should be created.\n- Enforce strict page-level division to maintain clear boundaries of responsibility and simplify review workflows.\n\n## Enforcement\n- All guidelines must be **strictly enforced**. Any violations (e.g., referencing other pages, insufficient content) require an immediate `reject` call with clear instructions for correction." /* AutoBeSystemPromptConstant.ANALYZE_REVIEWER */,
23
23
  },
24
24
  ];
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"transformAnalyzeReviewerHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAInB,MAAM,iCAAiC,GAAG,CAAC,KAGjD,EAEC,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,6BAA6B;gBAC7B,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;gBAC3B,KAAK;aACN,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,eAAe;YACrB,IAAI,w3MAA6C;SAClD;KACF,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,iCAAiC,qCAyB5C"}
1
+ {"version":3,"file":"transformAnalyzeReviewerHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAInB,MAAM,iCAAiC,GAAG,CAAC,KAGjD,EAEC,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,6BAA6B;gBAC7B,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;gBAC3B,KAAK;aACN,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,eAAe;YACrB,IAAI,6yQAA6C;SAClD;KACF,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,iCAAiC,qCAyB5C"}
@@ -3,7 +3,14 @@ import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IFile } from "./AutoBeAnalyzeFileSystem";
5
5
  import { AutoBeAnalyzePointer } from "./AutoBeAnalyzePointer";
6
- export declare function writeDocumentUntilReviewPassed<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, pointer: AutoBeAnalyzePointer, totalFiles: Pick<IFile, "filename" | "reason">[], filename: string, roles: AutoBeAnalyzeRole[], progress: {
7
- total: number;
8
- completed: number;
9
- }, retry?: number): Promise<AutoBeAnalyzePointer>;
6
+ export declare function writeDocumentUntilReviewPassed<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
7
+ totalFiles: Pick<IFile, "filename" | "reason">[];
8
+ filename: string;
9
+ roles: AutoBeAnalyzeRole[];
10
+ progress: {
11
+ total: number;
12
+ completed: number;
13
+ };
14
+ retry?: number;
15
+ prevReview?: string;
16
+ }): Promise<AutoBeAnalyzePointer>;
@@ -12,52 +12,68 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.writeDocumentUntilReviewPassed = writeDocumentUntilReviewPassed;
13
13
  const orchestrateAnalyzeReviewer_1 = require("./orchestrateAnalyzeReviewer");
14
14
  const orchestrateAnalyzeWrite_1 = require("./orchestrateAnalyzeWrite");
15
- function writeDocumentUntilReviewPassed(ctx_1, pointer_1, totalFiles_1, filename_1, roles_1, progress_1) {
16
- return __awaiter(this, arguments, void 0, function* (ctx, pointer, totalFiles, filename, roles, progress, retry = 3) {
17
- var _a, _b, _c, _d;
18
- const isAborted = { value: false };
19
- let review = null;
20
- for (let i = 0; i < retry; i++) {
21
- if (isAborted.value === true) {
22
- return pointer;
23
- }
24
- // Write the document until the review is passed.
25
- const write = "Write Document OR Abort.";
26
- const writer = (0, orchestrateAnalyzeWrite_1.orchestrateAnalyzeWrite)(ctx, {
27
- totalFiles: totalFiles,
28
- roles: roles,
29
- targetFile: filename,
30
- review,
31
- }, pointer, isAborted);
32
- yield writer.conversate(review !== null && review !== void 0 ? review : write).finally(() => {
33
- const tokenUsage = writer.getTokenUsage();
34
- ctx.usage().record(tokenUsage, ["analyze"]);
35
- });
36
- if (pointer.value === null) {
37
- throw new Error("Failed to write document by unknown reason.");
38
- }
39
- ctx.dispatch({
40
- type: "analyzeWrite",
41
- files: Object.assign({}, pointer.value.files),
42
- total: progress.total,
43
- completed: ++progress.completed,
44
- step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
45
- created_at: new Date().toISOString(),
46
- });
47
- // Do review
48
- review = yield (0, orchestrateAnalyzeReviewer_1.orchestrateAnalyzeReviewer)(ctx, pointer.value);
49
- if (review !== null)
50
- ctx.dispatch({
51
- type: "analyzeReview",
52
- files: Object.assign({}, pointer.value.files),
53
- review,
54
- total: progress.total,
55
- completed: progress.completed,
56
- step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
57
- created_at: new Date().toISOString(),
58
- });
15
+ function writeDocumentUntilReviewPassed(ctx, props) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ var _a, _b, _c, _d, _e, _f, _g;
18
+ const retry = (_a = props.retry) !== null && _a !== void 0 ? _a : 3;
19
+ const pointer = {
20
+ value: { files: {} },
21
+ };
22
+ /**
23
+ * `retry` means the number of times to retry the review. so if `retry` is -1,
24
+ * it means not execute this logic.
25
+ */
26
+ if (retry === -1) {
27
+ return pointer;
59
28
  }
60
- return pointer;
29
+ let isToolCalled = false;
30
+ const writer = (0, orchestrateAnalyzeWrite_1.orchestrateAnalyzeWrite)(ctx, {
31
+ totalFiles: props.totalFiles,
32
+ roles: props.roles,
33
+ targetFile: props.filename,
34
+ review: (_b = props.prevReview) !== null && _b !== void 0 ? _b : "",
35
+ setDocument: (v) => {
36
+ var _a;
37
+ isToolCalled = true;
38
+ pointer.value = { files: Object.assign(Object.assign({}, (_a = pointer.value) === null || _a === void 0 ? void 0 : _a.files), v) };
39
+ },
40
+ });
41
+ yield writer.conversate("Write Document.").finally(() => {
42
+ const tokenUsage = writer.getTokenUsage();
43
+ ctx.usage().record(tokenUsage, ["analyze"]);
44
+ });
45
+ if (isToolCalled === false) {
46
+ throw new Error("Failed to write document by unknown reason.");
47
+ }
48
+ ctx.dispatch({
49
+ type: "analyzeWrite",
50
+ files: Object.assign({}, (_c = pointer.value) === null || _c === void 0 ? void 0 : _c.files),
51
+ total: props.progress.total,
52
+ completed: ++props.progress.completed,
53
+ step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
54
+ created_at: new Date().toISOString(),
55
+ });
56
+ const reviewResult = yield (0, orchestrateAnalyzeReviewer_1.orchestrateAnalyzeReviewer)(ctx, pointer.value);
57
+ if (reviewResult.type === "accept") {
58
+ return pointer;
59
+ }
60
+ ctx.dispatch({
61
+ type: "analyzeReview",
62
+ files: Object.assign({}, pointer.value.files),
63
+ review: reviewResult.value,
64
+ total: props.progress.total,
65
+ completed: props.progress.completed,
66
+ step: (_g = (_f = ctx.state().analyze) === null || _f === void 0 ? void 0 : _f.step) !== null && _g !== void 0 ? _g : 0,
67
+ created_at: new Date().toISOString(),
68
+ });
69
+ return yield writeDocumentUntilReviewPassed(ctx, {
70
+ totalFiles: props.totalFiles,
71
+ filename: props.filename,
72
+ roles: props.roles,
73
+ progress: props.progress,
74
+ retry: retry - 1,
75
+ prevReview: reviewResult.value,
76
+ });
61
77
  });
62
78
  }
63
79
  //# sourceMappingURL=writeDocumentUntilReviewPassed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeDocumentUntilReviewPassed.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts"],"names":[],"mappings":";;;;;;;;;;;AAUA,wEAoEC;AAvED,6EAA0E;AAC1E,uEAAoE;AAEpE,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,OAA6B,EAC7B,UAAgD,EAChD,QAAgB,EAChB,KAA0B,EAC1B,QAA8C,EAC9C,KAAK,GAAG,CAAC;;QAET,MAAM,SAAS,GAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACtD,IAAI,MAAM,GAAkB,IAAI,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,IAAI,SAAS,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC7B,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,iDAAiD;YACjD,MAAM,KAAK,GAAG,0BAAmC,CAAC;YAClD,MAAM,MAAM,GAAG,IAAA,iDAAuB,EACpC,GAAG,EACH;gBACE,UAAU,EAAE,UAAU;gBACtB,KAAK,EAAE,KAAK;gBACZ,UAAU,EAAE,QAAQ;gBACpB,MAAM;aACP,EACD,OAAO,EACP,SAAS,CACV,CAAC;YA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WAAW,EAAE;iBACrC,CAAC,CAAC;QACP,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA"}
1
+ {"version":3,"file":"writeDocumentUntilReviewPassed.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts"],"names":[],"mappings":";;;;;;;;;;;AAYA,wEAmFC;AAtFD,6EAA0E;AAC1E,uEAAoE;AAEpE,SAAsB,8BAA8B,CAGlD,GAAyB,EACzB,KAOC;;;QAED,MAAM,KAAK,GAAG,MAAA,KAAK,CAAC,KAAK,mCAAI,CAAC,CAAC;QAC/B,MAAM,OAAO,GAA+C;YAC1D,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;SACrB,CAAC;QAEF;;;WAGG;QACH,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,MAAM,MAAM,GAAG,IAAA,iDAAuB,EAAC,GAAG,EAAE;YAC1C,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,UAAU,EAAE,KAAK,CAAC,QAAQ;YAC1B,MAAM,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,EAAE;YAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;;gBACjB,YAAY,GAAG,IAAI,CAAC;gBACpB,OAAO,CAAC,KAAK,GAAG,EAAE,KAAK,kCAAO,MAAA,OAAO,CAAC,KAAK,0CAAE,KAAK,GAAK,CAAC,CAAE,EAAE,CAAC;YAC/D,CAAC;SACF,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE;YACtD,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;YAC1C,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,UAAU,EAA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AQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,GAAG,CAAC;YAChB,UAAU,EAAE,YAAY,CAAC,KAAK;SAC/B,CAAC,CAAC;IACL,CAAC;CAAA"}
@@ -33,9 +33,6 @@ const transformPrismaComponentsHistories = (state, prefix = null) => {
33
33
  "Call the provided tool function to generate Prisma DB schema",
34
34
  "referencing below requirement analysis report.",
35
35
  "",
36
- "## User Request",
37
- state.analyze.reason,
38
- "",
39
36
  `## Requirement Analysis Report`,
40
37
  "",
41
38
  "```json",
@@ -62,14 +59,24 @@ const transformPrismaComponentsHistories = (state, prefix = null) => {
62
59
  "",
63
60
  "* `mv_shopping_daily_stats`",
64
61
  "",
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
62
  "",
72
- "* Create separate tables: `User`, `Admin`, `Moderator` (or with prefix: `shopping_user`, `shopping_admin`, `shopping_moderator`)",
63
+ state.analyze.roles.length > 0
64
+ ? [
65
+ "## User Role Handling",
66
+ "",
67
+ `The Requirement Analysis Report contains the following user roles: ${state.analyze.roles.join(", ")}.`,
68
+ "",
69
+ "**Do not normalize** user roles into a single table.",
70
+ "Instead, create separate tables for each distinct role mentioned in the requirements.",
71
+ "",
72
+ "Create separate tables for each role:",
73
+ "",
74
+ state.analyze.roles
75
+ .map((role) => `* ${prefix}_${role.name.toLowerCase()}`)
76
+ .join("\n"),
77
+ "",
78
+ ].join("\n")
79
+ : "",
73
80
  ].join("\n"),
74
81
  },
75
82
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"transformPrismaComponentsHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaComponentsHistories.ts"],"names":[],"mappings":";;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;gBAC7B,EAAE;gBACF,uBAAuB;gBACvB,EAAE;gBACF,yHAAyH;gBACzH,uFAAuF;gBACvF,EAAE;gBACF,4EAA4E;gBAC5E,EAAE;gBACF,kIAAkI;aACnI,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA5EW,QAAA,kCAAkC,sCA4E7C"}
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,mtTAA6C;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,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;gBAC7B,EAAE;gBACF,EAAE;gBACF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;oBAC5B,CAAC,CAAC;wBACE,uBAAuB;wBACvB,EAAE;wBACF,sEAAsE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;wBACvG,EAAE;wBACF,sDAAsD;wBACtD,uFAAuF;wBACvF,EAAE;wBACF,uCAAuC;wBACvC,EAAE;wBACF,KAAK,CAAC,OAAO,CAAC,KAAK;6BAChB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;6BACvD,IAAI,CAAC,IAAI,CAAC;wBACb,EAAE;qBACH,CAAC,IAAI,CAAC,IAAI,CAAC;oBACd,CAAC,CAAC,EAAE;aACP,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAnFW,QAAA,kCAAkC,sCAmF7C"}
@@ -0,0 +1,5 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ export declare namespace ProviderCodeComparator {
3
+ function hashCode(e: AutoBeOpenApi.IEndpoint): number;
4
+ function equals(x: AutoBeOpenApi.IEndpoint, y: AutoBeOpenApi.IEndpoint): boolean;
5
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProviderCodeComparator = void 0;
4
+ const tstl_1 = require("tstl");
5
+ var ProviderCodeComparator;
6
+ (function (ProviderCodeComparator) {
7
+ function hashCode(e) {
8
+ return (0, tstl_1.hash)(e.path, e.method);
9
+ }
10
+ ProviderCodeComparator.hashCode = hashCode;
11
+ function equals(x, y) {
12
+ return x.path === y.path && x.method === y.method;
13
+ }
14
+ ProviderCodeComparator.equals = equals;
15
+ })(ProviderCodeComparator || (exports.ProviderCodeComparator = ProviderCodeComparator = {}));
16
+ //# sourceMappingURL=ProviderCodeComparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProviderCodeComparator.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/ProviderCodeComparator.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B,IAAiB,sBAAsB,CAWtC;AAXD,WAAiB,sBAAsB;IACrC,SAAgB,QAAQ,CAAC,CAA0B;QACjD,OAAO,IAAA,WAAI,EAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAFe,+BAAQ,WAEvB,CAAA;IAED,SAAgB,MAAM,CACpB,CAA0B,EAC1B,CAA0B;QAE1B,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC;IACpD,CAAC;IALe,6BAAM,SAKrB,CAAA;AACH,CAAC,EAXgB,sBAAsB,sCAAtB,sBAAsB,QAWtC"}
@@ -11,76 +11,64 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.orchestrateRealize = void 0;
13
13
  const uuid_1 = require("uuid");
14
+ const getAutoBeGenerated_1 = require("../../factory/getAutoBeGenerated");
14
15
  const orchestrateRealizeAuthorization_1 = require("./orchestrateRealizeAuthorization");
15
16
  const writeCodeUntilCompilePassed_1 = require("./writeCodeUntilCompilePassed");
16
17
  const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18
- props;
19
- const ops = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document.operations;
20
- if (!ops) {
18
+ var _a, _b, _c, _d, _e, _f, _g;
19
+ const operations = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document.operations;
20
+ if (!operations) {
21
21
  throw new Error("Can't do realize agent because operations are nothing.");
22
22
  }
23
+ const start = new Date();
23
24
  ctx.dispatch({
24
25
  type: "realizeStart",
25
26
  created_at: new Date().toISOString(),
26
27
  reason: props.reason,
27
28
  step: (_c = (_b = ctx.state().test) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
28
29
  });
30
+ // generate authorizations and functions
29
31
  const authorizations = yield (0, orchestrateRealizeAuthorization_1.orchestrateRealizeAuthorization)(ctx);
30
- const files = yield (0, writeCodeUntilCompilePassed_1.writeCodeUntilCompilePassed)(ctx, ops, authorizations, 3);
31
- const now = new Date().toISOString();
32
- const realize = ctx.state().realize;
33
- if (realize !== null) {
34
- realize.functions = files;
35
- }
36
- else {
37
- const history = (ctx.state().realize = {
38
- type: "realize",
39
- compiled: {
40
- type: "success",
41
- },
42
- functions: Object.assign(Object.assign({}, files), authorizations
43
- .flatMap((el) => {
44
- return [
45
- {
46
- [el.decorator.location]: el.decorator.content,
47
- },
48
- {
49
- [el.payload.location]: el.payload.content,
50
- },
51
- {
52
- [el.payload.location]: el.payload.content,
53
- },
54
- ];
55
- })
56
- .reduce((acc, cur) => Object.assign(acc, cur))),
57
- completed_at: now,
58
- created_at: now,
59
- id: (0, uuid_1.v4)(),
60
- reason: props.reason,
61
- step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
62
- authorizations: (_g = (_f = ctx.state().realize) === null || _f === void 0 ? void 0 : _f.authorizations) !== null && _g !== void 0 ? _g : [],
63
- });
64
- ctx.histories().push(history);
65
- }
66
- ctx.dispatch({
67
- type: "assistantMessage",
68
- text: "Any codes can not be generated.",
69
- created_at: now,
32
+ const result = yield (0, writeCodeUntilCompilePassed_1.writeCodeUntilCompilePassed)(ctx)({
33
+ operations,
34
+ authorizations,
35
+ retry: 4,
36
+ });
37
+ const functions = result.functions;
38
+ // compile controllers
39
+ const compiler = yield ctx.compiler();
40
+ const controllers = yield compiler.realize.controller({
41
+ document: ctx.state().interface.document,
42
+ functions,
43
+ authorizations,
70
44
  });
71
- return {
45
+ const history = {
72
46
  type: "realize",
73
- compiled: {
74
- type: "success",
75
- },
76
- functions: files,
77
- completed_at: now,
78
- created_at: now,
47
+ compiled: result.compiled,
48
+ authorizations,
49
+ functions,
50
+ controllers,
51
+ completed_at: new Date().toISOString(),
52
+ created_at: start.toISOString(),
79
53
  id: (0, uuid_1.v4)(),
80
54
  reason: props.reason,
81
- step: (_j = (_h = ctx.state().analyze) === null || _h === void 0 ? void 0 : _h.step) !== null && _j !== void 0 ? _j : 0,
82
- authorizations: (_l = (_k = ctx.state().realize) === null || _k === void 0 ? void 0 : _k.authorizations) !== null && _l !== void 0 ? _l : [],
55
+ step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
83
56
  };
57
+ // report
58
+ ctx.dispatch({
59
+ type: "realizeComplete",
60
+ created_at: new Date().toISOString(),
61
+ functions: history.functions,
62
+ authorizations: history.authorizations,
63
+ controllers: history.controllers,
64
+ compiled: yield compiler.typescript.compile({
65
+ files: yield (0, getAutoBeGenerated_1.getAutoBeGenerated)(compiler, Object.assign(Object.assign({}, ctx.state()), { realize: history }), [...ctx.histories(), history], ctx.usage()),
66
+ }),
67
+ step: (_g = (_f = ctx.state().analyze) === null || _f === void 0 ? void 0 : _f.step) !== null && _g !== void 0 ? _g : 0,
68
+ });
69
+ ctx.state().realize = history;
70
+ ctx.histories().push(history);
71
+ return history;
84
72
  });
85
73
  exports.orchestrateRealize = orchestrateRealize;
86
74
  //# sourceMappingURL=orchestrateRealize.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,+BAA0B;AAI1B,uFAAoF;AACpF,+EAA4E;AAErE,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,KAAK,CAAC;IACN,MAAM,GAAG,GAAG,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,QAAQ,CAAC,UAAU,CAAC;IACvD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IAED,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,0CAAE,IAAI,mCAAI,CAAC;KAClC,CAAC,CAAC;IAEH,MAAM,cAAc,GAClB,MAAM,IAAA,iEAA+B,EAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,MAAM,IAAA,yDAA2B,EAC7C,GAAG,EACH,GAAG,EACH,cAAc,EACd,CAAC,CACF,CAAC;IAEF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC;IACpC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,GAA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AE,KAAK;QAChB,YAAY,EAAE,GAAG;QACjB,UAAU,EAAE,GAAG;QACf,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;QACpC,cAAc,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,cAAc,mCAAI,EAAE;KAC1D,CAAC;AACJ,CAAC,CAAA,CAAC;AArFS,QAAA,kBAAkB,sBAqF3B"}
1
+ {"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,+BAA0B;AAI1B,yEAAsE;AACtE,uFAAoF;AACpF,+EAA4E;AAErE,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,MAAM,UAAU,GACd,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,QAAQ,CAAC,UAAU,CAAC;IAC7C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,0CAAE,IAAI,mCAAI,CAAC;KAClC,CAAC,CAAC;IAEH,wCAAwC;IACxC,MAAM,cAAc,GAClB,MAAM,IAAA,iEAA+B,EAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,MA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