@autobe/agent 0.0.0 → 0.3.6
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.
- package/LICENSE +21 -21
- package/lib/AutoBeAgent.d.ts +9 -7
- package/lib/AutoBeAgent.js +106 -14
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/analyze/AnalyzeAgent.d.ts +24 -0
- package/lib/analyze/AnalyzeAgent.js +817 -0
- package/lib/analyze/AnalyzeAgent.js.map +1 -0
- package/lib/analyze/CreateReviewerAgent.d.ts +16 -0
- package/lib/analyze/CreateReviewerAgent.js +97 -0
- package/lib/analyze/CreateReviewerAgent.js.map +1 -0
- package/lib/analyze/Planning.d.ts +63 -0
- package/lib/{orchestrate/orchestratePrisma.js → analyze/Planning.js} +28 -11
- package/lib/analyze/Planning.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +14 -0
- package/lib/constants/AutoBeSystemPromptConstant.js +4 -0
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/context/AutoBeContext.d.ts +7 -3
- package/lib/context/IAutoBeApplication.d.ts +72 -32
- package/lib/context/IAutoBeApplicationProps.d.ts +22 -2
- package/lib/context/IAutoBeApplicationResult.d.ts +0 -1
- package/lib/context/assertSchemaModel.d.ts +2 -0
- package/lib/context/assertSchemaModel.js +15 -0
- package/lib/context/assertSchemaModel.js.map +1 -0
- package/lib/{internal/transformAgenticaHistory.d.ts → factory/createAgenticaHistory.d.ts} +1 -1
- package/lib/{internal/transformAgenticaHistory.js → factory/createAgenticaHistory.js} +3 -4
- package/lib/factory/createAgenticaHistory.js.map +1 -0
- package/lib/factory/createAutoBeApplication.js +1195 -0
- package/lib/factory/createAutoBeApplication.js.map +1 -0
- package/lib/factory/createAutoBeState.js.map +1 -0
- package/lib/factory/index.d.ts +2 -0
- package/lib/factory/index.js +19 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/factory/invertOpenApiDocument.d.ts +3 -0
- package/lib/factory/invertOpenApiDocument.js +51 -0
- package/lib/factory/invertOpenApiDocument.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +5455 -547
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +46 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/index.d.ts +2 -2
- package/lib/orchestrate/index.js +2 -2
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/OpenApiEndpointComparator.d.ts +5 -0
- package/lib/orchestrate/interface/OpenApiEndpointComparator.js +16 -0
- package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +61 -0
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +702 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +452 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +2065 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +3 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js +94 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -0
- package/lib/orchestrate/orchestrateAnalyze.d.ts +1 -3
- package/lib/orchestrate/orchestrateAnalyze.js +60 -6
- package/lib/orchestrate/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/{orchestratePrisma.d.ts → prisma/orchestratePrisma.d.ts} +3 -6
- package/lib/orchestrate/prisma/orchestratePrisma.js +103 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.d.ts +6 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.js +436 -0
- package/lib/orchestrate/prisma/orchestratePrismaCompiler.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +437 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +369 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js +44 -0
- package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +42 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.js +46 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +46 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/structures/IAutoBeConfig.d.ts +4 -4
- package/lib/utils/StringUtil.d.ts +4 -0
- package/lib/utils/StringUtil.js +43 -0
- package/lib/utils/StringUtil.js.map +1 -0
- package/lib/utils/divideArray.d.ts +4 -0
- package/lib/utils/divideArray.js +19 -0
- package/lib/utils/divideArray.js.map +1 -0
- package/lib/utils/emplaceMap.d.ts +1 -0
- package/lib/utils/emplaceMap.js +13 -0
- package/lib/utils/emplaceMap.js.map +1 -0
- package/package.json +29 -8
- package/src/AutoBeAgent.ts +227 -101
- package/src/analyze/AnalyzeAgent.ts +167 -0
- package/src/analyze/CreateReviewerAgent.ts +126 -0
- package/src/analyze/Planning.ts +75 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +15 -0
- package/src/context/AutoBeContext.ts +19 -15
- package/src/context/AutoBeState.ts +15 -15
- package/src/context/AutoBeTokenUsage.ts +3 -3
- package/src/context/IAutoBeApplication.ts +112 -72
- package/src/context/IAutoBeApplicationProps.ts +27 -6
- package/src/context/IAutoBeApplicationResult.ts +3 -4
- package/src/context/assertSchemaModel.ts +17 -0
- package/src/{internal/transformAgenticaHistory.ts → factory/createAgenticaHistory.ts} +51 -54
- package/src/{internal → factory}/createAutoBeApplication.ts +52 -47
- package/src/{internal → factory}/createAutoBeState.ts +14 -14
- package/src/factory/index.ts +2 -0
- package/src/factory/invertOpenApiDocument.ts +63 -0
- package/src/index.ts +13 -12
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +58 -0
- package/src/orchestrate/index.ts +5 -5
- package/src/orchestrate/interface/OpenApiEndpointComparator.ts +15 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +66 -0
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +324 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +140 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +247 -0
- package/src/orchestrate/interface/transformInterfaceHistories.ts +98 -0
- package/src/orchestrate/orchestrateAnalyze.ts +86 -21
- package/src/orchestrate/orchestrateRealize.ts +18 -18
- package/src/orchestrate/orchestrateTest.ts +18 -18
- package/src/orchestrate/prisma/orchestratePrisma.ts +117 -0
- package/src/orchestrate/prisma/orchestratePrismaCompiler.ts +194 -0
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +176 -0
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +181 -0
- package/src/orchestrate/prisma/transformPrismaCompilerHistories.ts +49 -0
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +46 -0
- package/src/orchestrate/prisma/transformPrismaHistories.ts +50 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +50 -0
- package/src/structures/IAutoBeConfig.ts +25 -25
- package/src/structures/IAutoBeProps.ts +13 -13
- package/src/structures/IAutoBeVendor.ts +3 -3
- package/src/utils/StringUtil.ts +45 -0
- package/src/utils/divideArray.ts +16 -0
- package/src/utils/emplaceMap.ts +14 -0
- package/lib/factory/transformRouteDocument.d.ts +0 -3
- package/lib/factory/transformRouteDocument.js +0 -50
- package/lib/factory/transformRouteDocument.js.map +0 -1
- package/lib/internal/createAutoBeApplication.js +0 -1452
- package/lib/internal/createAutoBeApplication.js.map +0 -1
- package/lib/internal/createAutoBeState.js.map +0 -1
- package/lib/internal/transformAgenticaHistory.js.map +0 -1
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +0 -2
- package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +0 -1
- package/lib/orchestrate/orchestrateInterface.d.ts +0 -8
- package/lib/orchestrate/orchestrateInterface.js +0 -22
- package/lib/orchestrate/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/orchestratePrisma.js.map +0 -1
- package/src/factory/transformRouteDocument.ts +0 -49
- package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
- package/src/orchestrate/orchestrateInterface.ts +0 -21
- package/src/orchestrate/orchestratePrisma.ts +0 -21
- /package/lib/{internal → factory}/createAutoBeApplication.d.ts +0 -0
- /package/lib/{internal → factory}/createAutoBeState.d.ts +0 -0
- /package/lib/{internal → factory}/createAutoBeState.js +0 -0
|
@@ -0,0 +1,817 @@
|
|
|
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.AnalyzeAgent = 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 Planning_1 = require("./Planning");
|
|
54
|
+
class AnalyzeAgent {
|
|
55
|
+
constructor(createReviewerAgentFn, ctx, pointer) {
|
|
56
|
+
this.createReviewerAgentFn = createReviewerAgentFn;
|
|
57
|
+
this.ctx = ctx;
|
|
58
|
+
this.pointer = pointer;
|
|
59
|
+
this.fileMap = {};
|
|
60
|
+
(0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
|
|
61
|
+
const controller = createController({
|
|
62
|
+
model: ctx.model,
|
|
63
|
+
execute: new Planning_1.Planning(this.fileMap),
|
|
64
|
+
build: (files) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
this.pointer.value = { files };
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
this.agent = new core_1.MicroAgentica({
|
|
69
|
+
controllers: [controller],
|
|
70
|
+
model: ctx.model,
|
|
71
|
+
vendor: ctx.vendor,
|
|
72
|
+
config: {
|
|
73
|
+
systemPrompt: {
|
|
74
|
+
common: () => {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
return "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nTake advantage of Mermaid.\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% Guidelines %}", "You are the \u201CPlanning Expert (PlannerAgent)\u201D system agent.\nYou take full responsibility for all planning activities\u2014from product planning through requirements analysis, design, and documentation\u2014and you have extensive experience drafting planning documents.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n1. Persona & Roles\n \u2022 **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n \u2022 **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n \u2022 **Documentation Specialist**: Follow a structured approach (Table of Contents \u2192 Detailed TOC \u2192 Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY \u2192 WHAT \u2192 HOW)\n 1. **WHY (Reason for the Problem)**\n * \u201CWhy is this feature/project needed?\u201D \u201CWhat business or user problem does it solve?\u201D \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * \u201CWhat must be implemented?\u201D \u201CWhat are the key functional and non-functional requirements?\u201D \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * \u201CWhat flow and structure will the service follow?\u201D \u201CHow should the data model and ERD be designed?\u201D\n\n3. Scope & Constraints\n \u2022 Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n \u2022 API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective\u2014avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths\u2014external URLs that don\u2019t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n \u2022 After each phase, summarize progress and ask for the user\u2019s confirmation (e.g., \u201CShall we proceed with this TOC?\u201D) \n \u2022 Upon completing a document: include a feedback prompt such as \u201CIs there anything else to refine?\u201D\n\n6. Final Deliverables\n \u2022 Provide everything in Markdown (`.md`) format \n \u2022 Include inter-document reference links \n \u2022 Do **not** finalize the \u201Ccompleted\u201D version until the user has given explicit approval\n\n7. Review Loop\n \u2022 Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n \u2022 Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n \u2022 Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n \u2022 Always start by proposing the top-level Table of Contents. \n \u2022 After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding." /* AutoBeSystemPromptConstant.ANALYZE_GUIDELINE */)
|
|
77
|
+
.replace("{% Example Documentation %}", "```\uAE30\uD68D\uC11C\n# \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13 (Avocado Market)\n\n**\uC11C\uBE44\uC2A4 \uC0C1\uC138 \uAE30\uD68D \uBCF4\uACE0\uC11C**\n\n---\n\n## 1. \uC11C\uBE44\uC2A4 \uAC1C\uC694\n\n**\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13**\uC740 \uC9C0\uC5ED \uAE30\uBC18 \uC911\uACE0 \uAC70\uB798\uB97C \uB118\uC5B4, **\uCE5C\uD658\uACBD \uAC00\uCE58\uC640 \uCEE4\uBBA4\uB2C8\uD2F0 \uC911\uC2EC\uC758 \uC5F0\uACB0**\uC744 \uC9C0\uD5A5\uD558\uB294 \uCC28\uC138\uB300 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC\uC785\uB2C8\uB2E4.\n\uC0AC\uC6A9\uC790\uB294 \uB204\uAD6C\uB098 \uC27D\uACE0 \uC548\uC804\uD558\uAC8C \uC911\uACE0 \uBB3C\uD488\uC744 \uC0AC\uACE0\uD314 \uC218 \uC788\uC73C\uBA70, \uC9C0\uC5ED \uC774\uC6C3\uACFC\uC758 \uAD50\uB958\uB97C \uD1B5\uD574 \uC9C0\uC18D \uAC00\uB2A5\uD55C \uC0DD\uD65C\uC744 \uC2E4\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](01_overview.md)\n\n---\n\n## 2. \uC2DC\uC7A5 \uC870\uC0AC \uBC0F \uBCA4\uCE58\uB9C8\uD0B9\n\n\uAD6D\uB0B4\uC678 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC \uC2DC\uC7A5 \uD604\uD669\uC744 \uC885\uD569 \uBD84\uC11D\uD558\uACE0, \uC8FC\uC694 \uACBD\uC7C1\uC0AC\uC758 \uC11C\uBE44\uC2A4 \uC804\uB7B5\uACFC \uCC28\uBCC4 \uC694\uC18C\uB97C \uBE44\uAD50\uD558\uC600\uC2B5\uB2C8\uB2E4. \uB610\uD55C, \uD5A5\uD6C4 \uC2DC\uC7A5 \uC131\uC7A5 \uAC00\uB2A5\uC131\uACFC \uD2B8\uB80C\uB4DC\uB3C4 \uD568\uAED8 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](02_market_analysis.md)\n\n---\n\n## 3. \uC8FC\uC694 \uAE30\uB2A5 \uBC0F \uC0C1\uC138 \uC124\uBA85\n\n\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC774 \uC81C\uACF5\uD558\uB294 \uD575\uC2EC \uAE30\uB2A5\uB4E4\uACFC \uC2E4\uC81C \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624\uB97C \uAD6C\uCCB4\uC801\uC73C\uB85C \uC124\uBA85\uD569\uB2C8\uB2E4. \uAC01 \uAE30\uB2A5\uC758 \uBAA9\uC801, \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC81C\uACF5\uB418\uB294 \uAC00\uCE58, \uCC28\uBCC4\uD654\uB41C \uAE30\uC220 \uB610\uB294 UI \uC694\uC18C\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](03_features.md)\n\n---\n\n## 4. \uC218\uC775 \uBAA8\uB378 \uBC0F \uC131\uC7A5 \uC804\uB7B5\n\n\uAD11\uACE0, \uD504\uB9AC\uBBF8\uC5C4 \uC11C\uBE44\uC2A4, \uC81C\uD734 \uAE30\uBC18 \uBE44\uC988\uB2C8\uC2A4 \uB4F1 \uB2E4\uC591\uD55C \uC218\uC775\uD654 \uBAA8\uB378\uC744 \uC81C\uC2DC\uD558\uBA70, \uC774\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C \uC911\uC7A5\uAE30 \uC131\uC7A5 \uC804\uB7B5\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](04_business_model.md)\n\n---\n\n## 5. UX/UI \uC124\uACC4 \uAC00\uC774\uB4DC\n\n\uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801 \uC778\uD130\uD398\uC774\uC2A4 \uC124\uACC4 \uBC29\uC548\uACFC \uD568\uAED8, \uB808\uD37C\uB7F0\uC2A4 \uC0AC\uB840 \uBC0F \uC0AC\uC6A9\uC790 \uACBD\uD5D8 \uD5A5\uC0C1\uC744 \uC704\uD55C \uB514\uC790\uC778 \uC6D0\uCE59\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](05_uxui_guidelines.md)\n\n---\n\n## 6. \uAC1C\uBC1C \uBC0F \uCD9C\uC2DC \uC804\uB7B5\n\n\uC11C\uBE44\uC2A4 \uAC1C\uBC1C\uBD80\uD130 MVP \uC124\uACC4, \uBCA0\uD0C0 \uD14C\uC2A4\uD2B8, \uC815\uC2DD \uCD9C\uC2DC\uAE4C\uC9C0\uC758 \uC804\uCCB4 \uB85C\uB4DC\uB9F5\uC744 \uC81C\uC2DC\uD558\uBA70, \uAC01 \uB2E8\uACC4\uBCC4 \uBAA9\uD45C\uC640 \uC804\uB7B5\uC744 \uAD6C\uCCB4\uD654\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](06_release_strategy.md)\n\n---\n\n## 7. \uAE30\uC220 \uC544\uD0A4\uD14D\uCC98\n\n\uD50C\uB7AB\uD3FC\uC758 \uC804\uCCB4 \uC2DC\uC2A4\uD15C \uAD6C\uC870, \uD575\uC2EC \uAE30\uC220 \uC2A4\uD0DD, \uC678\uBD80 API \uC5F0\uB3D9 \uBC29\uC2DD, \uC778\uD504\uB77C \uAD6C\uC131 \uB4F1\uC744 \uD3EC\uD568\uD55C \uAE30\uC220\uC801 \uC124\uACC4 \uB0B4\uC6A9\uC744 \uC815\uB9AC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](07_architecture.md)\n\n---\n\n## 8. \uD3EC\uC9C0\uC154\uB2DD \uBC0F \uB9C8\uCF00\uD305 \uC804\uB7B5\n\n\uD0C0\uAE43 \uC0AC\uC6A9\uC790 \uC815\uC758, \uBE0C\uB79C\uB4DC \uC544\uC774\uB374\uD2F0\uD2F0 \uC218\uB9BD, \uD64D\uBCF4 \uC804\uB7B5, \uC9C0\uC5ED \uBC00\uCC29\uD615 \uCEE4\uBBA4\uB2C8\uD2F0 \uB9C8\uCF00\uD305 \uB4F1 \uC2E4\uC9C8\uC801\uC778 \uC2E4\uD589 \uC804\uB7B5\uC744 \uC81C\uC548\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](08_marketing.md)\n\n---\n\n## 9. \uB9AC\uC2A4\uD06C \uAD00\uB9AC \uBC29\uC548\n\n\uC11C\uBE44\uC2A4 \uC6B4\uC601 \uC804\uBC18\uC5D0\uC11C \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uB2E4\uC591\uD55C \uB9AC\uC2A4\uD06C\uB97C \uC2DD\uBCC4\uD558\uACE0, \uC774\uC5D0 \uB300\uD55C \uC0AC\uC804 \uC608\uBC29 \uBC0F \uC0AC\uD6C4 \uB300\uC751 \uBC29\uC548\uC744 \uCCB4\uACC4\uC801\uC73C\uB85C \uC815\uB9AC\uD558\uC600\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](09_risk_management.md)\n\n---\n\n## 10. \uC11C\uBE44\uC2A4 \uD655\uC7A5 \uAC00\uB2A5\uC131\n\n\uC911\uC7A5\uAE30\uC801\uC73C\uB85C \uACE0\uB824\uD560 \uC218 \uC788\uB294 \uC2E0\uADDC \uAE30\uB2A5, \uBE44\uC988\uB2C8\uC2A4 \uBAA8\uB378 \uD655\uC7A5, \uAE00\uB85C\uBC8C \uC9C4\uCD9C \uB4F1 \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC758 \uBBF8\uB798 \uBE44\uC804\uC744 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](10_expansion.md)\n\n```;" /* AutoBeSystemPromptConstant.ANALYZE_EXAMPLE */)
|
|
78
|
+
.replace("{% User Locale %}", (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : "en-US");
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
tokenUsage: ctx.usage(),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Conversate with planner agent
|
|
87
|
+
*
|
|
88
|
+
* @param content Conversation from user in this time.
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
conversate(content) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
var _a, _b, _c, _d;
|
|
94
|
+
const response = yield this.agent.conversate(content);
|
|
95
|
+
const lastMessage = response[response.length - 1];
|
|
96
|
+
if ("text" in lastMessage) {
|
|
97
|
+
this.ctx.dispatch({
|
|
98
|
+
type: "analyzeWriteDocument",
|
|
99
|
+
files: this.fileMap,
|
|
100
|
+
created_at: new Date().toISOString(),
|
|
101
|
+
step: (_b = (_a = this.ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
102
|
+
});
|
|
103
|
+
const aborted = lastMessage.type === "describe" &&
|
|
104
|
+
lastMessage.executes.some((el) => {
|
|
105
|
+
if (el.protocol === "class" &&
|
|
106
|
+
el.operation.function.name === "abort") {
|
|
107
|
+
el.arguments;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
if (aborted === true) {
|
|
112
|
+
return lastMessage.text;
|
|
113
|
+
}
|
|
114
|
+
const currentFiles = this.fileMap;
|
|
115
|
+
const reviewer = this.createReviewerAgentFn(this.ctx, {
|
|
116
|
+
query: content,
|
|
117
|
+
currentFiles,
|
|
118
|
+
});
|
|
119
|
+
const [review] = yield reviewer.conversate(lastMessage.text);
|
|
120
|
+
if (review) {
|
|
121
|
+
if (review.type === "assistantMessage") {
|
|
122
|
+
this.ctx.dispatch({
|
|
123
|
+
type: "analyzeReview",
|
|
124
|
+
review: review.text,
|
|
125
|
+
created_at: new Date().toISOString(),
|
|
126
|
+
step: (_d = (_c = this.ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
|
|
127
|
+
});
|
|
128
|
+
return this.conversate(JSON.stringify({
|
|
129
|
+
user_query: content,
|
|
130
|
+
message: `THIS IS ANSWER OF REVIEW AGENT. FOLLOW THIS INSTRUCTIONS. AND DON\'T REQUEST ANYTHING.`,
|
|
131
|
+
review: review.text,
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return "COMPLETE";
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.AnalyzeAgent = AnalyzeAgent;
|
|
141
|
+
function createController(props) {
|
|
142
|
+
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
143
|
+
const application = collection[props.model];
|
|
144
|
+
return {
|
|
145
|
+
protocol: "class",
|
|
146
|
+
name: "Planning",
|
|
147
|
+
application,
|
|
148
|
+
// execute: props.execute,
|
|
149
|
+
execute: {
|
|
150
|
+
removeFile: (input) => {
|
|
151
|
+
const response = props.execute.removeFile(input);
|
|
152
|
+
props.build(props.execute.allFiles());
|
|
153
|
+
return response;
|
|
154
|
+
},
|
|
155
|
+
abort: (input) => {
|
|
156
|
+
const response = props.execute.abort(input);
|
|
157
|
+
props.build(props.execute.allFiles());
|
|
158
|
+
return response;
|
|
159
|
+
},
|
|
160
|
+
createOrUpdateFile: (input) => {
|
|
161
|
+
const response = props.execute.createOrUpdateFile(input);
|
|
162
|
+
props.build(props.execute.allFiles());
|
|
163
|
+
return response;
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
const claude = {
|
|
169
|
+
model: "claude",
|
|
170
|
+
options: {
|
|
171
|
+
reference: true,
|
|
172
|
+
separate: null
|
|
173
|
+
},
|
|
174
|
+
functions: [
|
|
175
|
+
{
|
|
176
|
+
name: "createOrUpdateFile",
|
|
177
|
+
parameters: {
|
|
178
|
+
type: "object",
|
|
179
|
+
properties: {
|
|
180
|
+
reason: {
|
|
181
|
+
type: "string"
|
|
182
|
+
},
|
|
183
|
+
filename: {
|
|
184
|
+
type: "string",
|
|
185
|
+
pattern: "((.*)\\.md)$"
|
|
186
|
+
},
|
|
187
|
+
markdown: {
|
|
188
|
+
type: "string"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
required: [
|
|
192
|
+
"reason",
|
|
193
|
+
"filename",
|
|
194
|
+
"markdown"
|
|
195
|
+
],
|
|
196
|
+
additionalProperties: false,
|
|
197
|
+
$defs: {}
|
|
198
|
+
},
|
|
199
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
200
|
+
path: _path + ".reason",
|
|
201
|
+
expected: "string",
|
|
202
|
+
value: input.reason
|
|
203
|
+
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
204
|
+
path: _path + ".filename",
|
|
205
|
+
expected: "`${string}.md`",
|
|
206
|
+
value: input.filename
|
|
207
|
+
}), "string" === typeof input.markdown || _report(_exceptionable, {
|
|
208
|
+
path: _path + ".markdown",
|
|
209
|
+
expected: "string",
|
|
210
|
+
value: input.markdown
|
|
211
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
212
|
+
if (false === __is(input)) {
|
|
213
|
+
errors = [];
|
|
214
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
215
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
216
|
+
path: _path + "",
|
|
217
|
+
expected: "__type",
|
|
218
|
+
value: input
|
|
219
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
220
|
+
path: _path + "",
|
|
221
|
+
expected: "__type",
|
|
222
|
+
value: input
|
|
223
|
+
}))(input, "$input", true);
|
|
224
|
+
const success = 0 === errors.length;
|
|
225
|
+
return success ? {
|
|
226
|
+
success,
|
|
227
|
+
data: input
|
|
228
|
+
} : {
|
|
229
|
+
success,
|
|
230
|
+
errors,
|
|
231
|
+
data: input
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return {
|
|
235
|
+
success: true,
|
|
236
|
+
data: input
|
|
237
|
+
};
|
|
238
|
+
}; })()
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "removeFile",
|
|
242
|
+
parameters: {
|
|
243
|
+
type: "object",
|
|
244
|
+
properties: {
|
|
245
|
+
filename: {
|
|
246
|
+
type: "string",
|
|
247
|
+
pattern: "((.*)\\.md)$"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
required: [
|
|
251
|
+
"filename"
|
|
252
|
+
],
|
|
253
|
+
additionalProperties: false,
|
|
254
|
+
$defs: {}
|
|
255
|
+
},
|
|
256
|
+
validate: (() => { const _io0 = input => "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
257
|
+
path: _path + ".filename",
|
|
258
|
+
expected: "`${string}.md`",
|
|
259
|
+
value: input.filename
|
|
260
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
261
|
+
if (false === __is(input)) {
|
|
262
|
+
errors = [];
|
|
263
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
264
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
265
|
+
path: _path + "",
|
|
266
|
+
expected: "__type",
|
|
267
|
+
value: input
|
|
268
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
269
|
+
path: _path + "",
|
|
270
|
+
expected: "__type",
|
|
271
|
+
value: input
|
|
272
|
+
}))(input, "$input", true);
|
|
273
|
+
const success = 0 === errors.length;
|
|
274
|
+
return success ? {
|
|
275
|
+
success,
|
|
276
|
+
data: input
|
|
277
|
+
} : {
|
|
278
|
+
success,
|
|
279
|
+
errors,
|
|
280
|
+
data: input
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
success: true,
|
|
285
|
+
data: input
|
|
286
|
+
};
|
|
287
|
+
}; })()
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "abort",
|
|
291
|
+
parameters: {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
reason: {
|
|
295
|
+
type: "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
required: [
|
|
299
|
+
"reason"
|
|
300
|
+
],
|
|
301
|
+
additionalProperties: false,
|
|
302
|
+
$defs: {}
|
|
303
|
+
},
|
|
304
|
+
output: {
|
|
305
|
+
"const": "OK"
|
|
306
|
+
},
|
|
307
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
308
|
+
path: _path + ".reason",
|
|
309
|
+
expected: "string",
|
|
310
|
+
value: input.reason
|
|
311
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
312
|
+
if (false === __is(input)) {
|
|
313
|
+
errors = [];
|
|
314
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
315
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
316
|
+
path: _path + "",
|
|
317
|
+
expected: "__type",
|
|
318
|
+
value: input
|
|
319
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
320
|
+
path: _path + "",
|
|
321
|
+
expected: "__type",
|
|
322
|
+
value: input
|
|
323
|
+
}))(input, "$input", true);
|
|
324
|
+
const success = 0 === errors.length;
|
|
325
|
+
return success ? {
|
|
326
|
+
success,
|
|
327
|
+
data: input
|
|
328
|
+
} : {
|
|
329
|
+
success,
|
|
330
|
+
errors,
|
|
331
|
+
data: input
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
return {
|
|
335
|
+
success: true,
|
|
336
|
+
data: input
|
|
337
|
+
};
|
|
338
|
+
}; })()
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: "allFiles",
|
|
342
|
+
parameters: {
|
|
343
|
+
type: "object",
|
|
344
|
+
properties: {},
|
|
345
|
+
additionalProperties: false,
|
|
346
|
+
required: [],
|
|
347
|
+
$defs: {}
|
|
348
|
+
},
|
|
349
|
+
output: {
|
|
350
|
+
description: "Description of the current {@link Recordstringstring} type:\n\n> Construct a type with a set of properties K of type T",
|
|
351
|
+
type: "object",
|
|
352
|
+
properties: {},
|
|
353
|
+
required: [],
|
|
354
|
+
additionalProperties: {
|
|
355
|
+
type: "string"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
359
|
+
if (false === __is(input)) {
|
|
360
|
+
errors = [];
|
|
361
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
362
|
+
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
363
|
+
const success = 0 === errors.length;
|
|
364
|
+
return success ? {
|
|
365
|
+
success,
|
|
366
|
+
data: input
|
|
367
|
+
} : {
|
|
368
|
+
success,
|
|
369
|
+
errors,
|
|
370
|
+
data: input
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
return {
|
|
374
|
+
success: true,
|
|
375
|
+
data: input
|
|
376
|
+
};
|
|
377
|
+
}; })()
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
};
|
|
381
|
+
const collection = {
|
|
382
|
+
chatgpt: {
|
|
383
|
+
model: "chatgpt",
|
|
384
|
+
options: {
|
|
385
|
+
reference: true,
|
|
386
|
+
strict: false,
|
|
387
|
+
separate: null
|
|
388
|
+
},
|
|
389
|
+
functions: [
|
|
390
|
+
{
|
|
391
|
+
name: "createOrUpdateFile",
|
|
392
|
+
parameters: {
|
|
393
|
+
type: "object",
|
|
394
|
+
properties: {
|
|
395
|
+
reason: {
|
|
396
|
+
type: "string"
|
|
397
|
+
},
|
|
398
|
+
filename: {
|
|
399
|
+
description: "@pattern ((.*)\\.md)$",
|
|
400
|
+
type: "string"
|
|
401
|
+
},
|
|
402
|
+
markdown: {
|
|
403
|
+
type: "string"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
required: [
|
|
407
|
+
"reason",
|
|
408
|
+
"filename",
|
|
409
|
+
"markdown"
|
|
410
|
+
],
|
|
411
|
+
additionalProperties: false,
|
|
412
|
+
$defs: {}
|
|
413
|
+
},
|
|
414
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
415
|
+
path: _path + ".reason",
|
|
416
|
+
expected: "string",
|
|
417
|
+
value: input.reason
|
|
418
|
+
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
419
|
+
path: _path + ".filename",
|
|
420
|
+
expected: "`${string}.md`",
|
|
421
|
+
value: input.filename
|
|
422
|
+
}), "string" === typeof input.markdown || _report(_exceptionable, {
|
|
423
|
+
path: _path + ".markdown",
|
|
424
|
+
expected: "string",
|
|
425
|
+
value: input.markdown
|
|
426
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
427
|
+
if (false === __is(input)) {
|
|
428
|
+
errors = [];
|
|
429
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
430
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
431
|
+
path: _path + "",
|
|
432
|
+
expected: "__type",
|
|
433
|
+
value: input
|
|
434
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
435
|
+
path: _path + "",
|
|
436
|
+
expected: "__type",
|
|
437
|
+
value: input
|
|
438
|
+
}))(input, "$input", true);
|
|
439
|
+
const success = 0 === errors.length;
|
|
440
|
+
return success ? {
|
|
441
|
+
success,
|
|
442
|
+
data: input
|
|
443
|
+
} : {
|
|
444
|
+
success,
|
|
445
|
+
errors,
|
|
446
|
+
data: input
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
return {
|
|
450
|
+
success: true,
|
|
451
|
+
data: input
|
|
452
|
+
};
|
|
453
|
+
}; })()
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: "removeFile",
|
|
457
|
+
parameters: {
|
|
458
|
+
type: "object",
|
|
459
|
+
properties: {
|
|
460
|
+
filename: {
|
|
461
|
+
description: "@pattern ((.*)\\.md)$",
|
|
462
|
+
type: "string"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
required: [
|
|
466
|
+
"filename"
|
|
467
|
+
],
|
|
468
|
+
additionalProperties: false,
|
|
469
|
+
$defs: {}
|
|
470
|
+
},
|
|
471
|
+
validate: (() => { const _io0 = input => "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
472
|
+
path: _path + ".filename",
|
|
473
|
+
expected: "`${string}.md`",
|
|
474
|
+
value: input.filename
|
|
475
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
476
|
+
if (false === __is(input)) {
|
|
477
|
+
errors = [];
|
|
478
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
479
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
480
|
+
path: _path + "",
|
|
481
|
+
expected: "__type",
|
|
482
|
+
value: input
|
|
483
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
484
|
+
path: _path + "",
|
|
485
|
+
expected: "__type",
|
|
486
|
+
value: input
|
|
487
|
+
}))(input, "$input", true);
|
|
488
|
+
const success = 0 === errors.length;
|
|
489
|
+
return success ? {
|
|
490
|
+
success,
|
|
491
|
+
data: input
|
|
492
|
+
} : {
|
|
493
|
+
success,
|
|
494
|
+
errors,
|
|
495
|
+
data: input
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
return {
|
|
499
|
+
success: true,
|
|
500
|
+
data: input
|
|
501
|
+
};
|
|
502
|
+
}; })()
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: "abort",
|
|
506
|
+
parameters: {
|
|
507
|
+
type: "object",
|
|
508
|
+
properties: {
|
|
509
|
+
reason: {
|
|
510
|
+
type: "string"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
required: [
|
|
514
|
+
"reason"
|
|
515
|
+
],
|
|
516
|
+
additionalProperties: false,
|
|
517
|
+
$defs: {}
|
|
518
|
+
},
|
|
519
|
+
output: {
|
|
520
|
+
type: "string",
|
|
521
|
+
"enum": [
|
|
522
|
+
"OK"
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
526
|
+
path: _path + ".reason",
|
|
527
|
+
expected: "string",
|
|
528
|
+
value: input.reason
|
|
529
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
530
|
+
if (false === __is(input)) {
|
|
531
|
+
errors = [];
|
|
532
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
533
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
534
|
+
path: _path + "",
|
|
535
|
+
expected: "__type",
|
|
536
|
+
value: input
|
|
537
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
538
|
+
path: _path + "",
|
|
539
|
+
expected: "__type",
|
|
540
|
+
value: input
|
|
541
|
+
}))(input, "$input", true);
|
|
542
|
+
const success = 0 === errors.length;
|
|
543
|
+
return success ? {
|
|
544
|
+
success,
|
|
545
|
+
data: input
|
|
546
|
+
} : {
|
|
547
|
+
success,
|
|
548
|
+
errors,
|
|
549
|
+
data: input
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
return {
|
|
553
|
+
success: true,
|
|
554
|
+
data: input
|
|
555
|
+
};
|
|
556
|
+
}; })()
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: "allFiles",
|
|
560
|
+
parameters: {
|
|
561
|
+
type: "object",
|
|
562
|
+
properties: {},
|
|
563
|
+
additionalProperties: false,
|
|
564
|
+
required: [],
|
|
565
|
+
$defs: {}
|
|
566
|
+
},
|
|
567
|
+
output: {
|
|
568
|
+
description: "Description of the current {@link Recordstringstring} type:\n\n> Construct a type with a set of properties K of type T",
|
|
569
|
+
type: "object",
|
|
570
|
+
properties: {},
|
|
571
|
+
required: [],
|
|
572
|
+
additionalProperties: {
|
|
573
|
+
type: "string"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
577
|
+
if (false === __is(input)) {
|
|
578
|
+
errors = [];
|
|
579
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
580
|
+
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
581
|
+
const success = 0 === errors.length;
|
|
582
|
+
return success ? {
|
|
583
|
+
success,
|
|
584
|
+
data: input
|
|
585
|
+
} : {
|
|
586
|
+
success,
|
|
587
|
+
errors,
|
|
588
|
+
data: input
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
return {
|
|
592
|
+
success: true,
|
|
593
|
+
data: input
|
|
594
|
+
};
|
|
595
|
+
}; })()
|
|
596
|
+
}
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
claude,
|
|
600
|
+
llama: claude,
|
|
601
|
+
deepseek: claude,
|
|
602
|
+
"3.1": claude,
|
|
603
|
+
"3.0": {
|
|
604
|
+
model: "3.0",
|
|
605
|
+
options: {
|
|
606
|
+
constraint: true,
|
|
607
|
+
recursive: 3,
|
|
608
|
+
separate: null
|
|
609
|
+
},
|
|
610
|
+
functions: [
|
|
611
|
+
{
|
|
612
|
+
name: "createOrUpdateFile",
|
|
613
|
+
parameters: {
|
|
614
|
+
type: "object",
|
|
615
|
+
properties: {
|
|
616
|
+
reason: {
|
|
617
|
+
type: "string"
|
|
618
|
+
},
|
|
619
|
+
filename: {
|
|
620
|
+
type: "string",
|
|
621
|
+
pattern: "((.*)\\.md)$"
|
|
622
|
+
},
|
|
623
|
+
markdown: {
|
|
624
|
+
type: "string"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
required: [
|
|
628
|
+
"reason",
|
|
629
|
+
"filename",
|
|
630
|
+
"markdown"
|
|
631
|
+
],
|
|
632
|
+
additionalProperties: false
|
|
633
|
+
},
|
|
634
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
635
|
+
path: _path + ".reason",
|
|
636
|
+
expected: "string",
|
|
637
|
+
value: input.reason
|
|
638
|
+
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
639
|
+
path: _path + ".filename",
|
|
640
|
+
expected: "`${string}.md`",
|
|
641
|
+
value: input.filename
|
|
642
|
+
}), "string" === typeof input.markdown || _report(_exceptionable, {
|
|
643
|
+
path: _path + ".markdown",
|
|
644
|
+
expected: "string",
|
|
645
|
+
value: input.markdown
|
|
646
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
647
|
+
if (false === __is(input)) {
|
|
648
|
+
errors = [];
|
|
649
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
650
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
651
|
+
path: _path + "",
|
|
652
|
+
expected: "__type",
|
|
653
|
+
value: input
|
|
654
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
655
|
+
path: _path + "",
|
|
656
|
+
expected: "__type",
|
|
657
|
+
value: input
|
|
658
|
+
}))(input, "$input", true);
|
|
659
|
+
const success = 0 === errors.length;
|
|
660
|
+
return success ? {
|
|
661
|
+
success,
|
|
662
|
+
data: input
|
|
663
|
+
} : {
|
|
664
|
+
success,
|
|
665
|
+
errors,
|
|
666
|
+
data: input
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
return {
|
|
670
|
+
success: true,
|
|
671
|
+
data: input
|
|
672
|
+
};
|
|
673
|
+
}; })()
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
name: "removeFile",
|
|
677
|
+
parameters: {
|
|
678
|
+
type: "object",
|
|
679
|
+
properties: {
|
|
680
|
+
filename: {
|
|
681
|
+
type: "string",
|
|
682
|
+
pattern: "((.*)\\.md)$"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
required: [
|
|
686
|
+
"filename"
|
|
687
|
+
],
|
|
688
|
+
additionalProperties: false
|
|
689
|
+
},
|
|
690
|
+
validate: (() => { const _io0 = input => "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
691
|
+
path: _path + ".filename",
|
|
692
|
+
expected: "`${string}.md`",
|
|
693
|
+
value: input.filename
|
|
694
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
695
|
+
if (false === __is(input)) {
|
|
696
|
+
errors = [];
|
|
697
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
698
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
699
|
+
path: _path + "",
|
|
700
|
+
expected: "__type",
|
|
701
|
+
value: input
|
|
702
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
703
|
+
path: _path + "",
|
|
704
|
+
expected: "__type",
|
|
705
|
+
value: input
|
|
706
|
+
}))(input, "$input", true);
|
|
707
|
+
const success = 0 === errors.length;
|
|
708
|
+
return success ? {
|
|
709
|
+
success,
|
|
710
|
+
data: input
|
|
711
|
+
} : {
|
|
712
|
+
success,
|
|
713
|
+
errors,
|
|
714
|
+
data: input
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
return {
|
|
718
|
+
success: true,
|
|
719
|
+
data: input
|
|
720
|
+
};
|
|
721
|
+
}; })()
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: "abort",
|
|
725
|
+
parameters: {
|
|
726
|
+
type: "object",
|
|
727
|
+
properties: {
|
|
728
|
+
reason: {
|
|
729
|
+
type: "string"
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
required: [
|
|
733
|
+
"reason"
|
|
734
|
+
],
|
|
735
|
+
additionalProperties: false
|
|
736
|
+
},
|
|
737
|
+
output: {
|
|
738
|
+
type: "string",
|
|
739
|
+
"enum": [
|
|
740
|
+
"OK"
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
744
|
+
path: _path + ".reason",
|
|
745
|
+
expected: "string",
|
|
746
|
+
value: input.reason
|
|
747
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
748
|
+
if (false === __is(input)) {
|
|
749
|
+
errors = [];
|
|
750
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
751
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
752
|
+
path: _path + "",
|
|
753
|
+
expected: "__type",
|
|
754
|
+
value: input
|
|
755
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
756
|
+
path: _path + "",
|
|
757
|
+
expected: "__type",
|
|
758
|
+
value: input
|
|
759
|
+
}))(input, "$input", true);
|
|
760
|
+
const success = 0 === errors.length;
|
|
761
|
+
return success ? {
|
|
762
|
+
success,
|
|
763
|
+
data: input
|
|
764
|
+
} : {
|
|
765
|
+
success,
|
|
766
|
+
errors,
|
|
767
|
+
data: input
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
return {
|
|
771
|
+
success: true,
|
|
772
|
+
data: input
|
|
773
|
+
};
|
|
774
|
+
}; })()
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
name: "allFiles",
|
|
778
|
+
parameters: {
|
|
779
|
+
type: "object",
|
|
780
|
+
properties: {},
|
|
781
|
+
additionalProperties: false,
|
|
782
|
+
required: []
|
|
783
|
+
},
|
|
784
|
+
output: {
|
|
785
|
+
type: "object",
|
|
786
|
+
properties: {},
|
|
787
|
+
required: [],
|
|
788
|
+
description: "Description of the current {@link Recordstringstring} type:\n\n> Construct a type with a set of properties K of type T",
|
|
789
|
+
additionalProperties: {
|
|
790
|
+
type: "string"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
794
|
+
if (false === __is(input)) {
|
|
795
|
+
errors = [];
|
|
796
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
797
|
+
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
798
|
+
const success = 0 === errors.length;
|
|
799
|
+
return success ? {
|
|
800
|
+
success,
|
|
801
|
+
data: input
|
|
802
|
+
} : {
|
|
803
|
+
success,
|
|
804
|
+
errors,
|
|
805
|
+
data: input
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
return {
|
|
809
|
+
success: true,
|
|
810
|
+
data: input
|
|
811
|
+
};
|
|
812
|
+
}; })()
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
};
|
|
817
|
+
//# sourceMappingURL=AnalyzeAgent.js.map
|