@autobe/agent 0.10.6 → 0.11.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.
- package/lib/AutoBeAgent.js +13 -46
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -6
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/factory/getAutoBeGenerated.d.ts +5 -0
- package/lib/factory/getAutoBeGenerated.js +307 -0
- package/lib/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/index.mjs +1631 -1389
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +2 -7
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +1 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.d.ts +13 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js +3 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -25
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +22 -420
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +561 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +41 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +14 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +468 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +68 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +3 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +5 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +27 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +12 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +78 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +6 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +58 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +0 -2
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +17 -137
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +92 -141
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +9 -5
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +54 -25
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.d.ts → orchestratePrismaSchemas.d.ts} +2 -4
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.js → orchestratePrismaSchemas.js} +269 -203
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +2 -6
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +24 -32
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/RealizePipe.d.ts +5 -0
- package/lib/orchestrate/realize/RealizePipe.js +14 -0
- package/lib/orchestrate/realize/RealizePipe.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +0 -6
- package/lib/orchestrate/realize/orchestrateRealize.js +6 -43
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -3
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +124 -59
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +188 -18
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +23 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +2 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +50 -36
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +5 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +123 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +4 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +11 -5
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/structures/IAutoBeProps.d.ts +8 -8
- package/lib/utils/pipe.d.ts +5 -0
- package/lib/utils/pipe.js +14 -0
- package/lib/utils/pipe.js.map +1 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +22 -76
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -6
- package/src/context/AutoBeContext.ts +3 -1
- package/src/factory/getAutoBeGenerated.ts +113 -0
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +5 -13
- package/src/orchestrate/analyze/AutoBeAnalyzeRole.ts +14 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +30 -165
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +115 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +39 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +106 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +74 -0
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +31 -0
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +94 -0
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +66 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +0 -2
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +2 -3
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +21 -0
- package/src/orchestrate/prisma/orchestratePrisma.ts +12 -5
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -13
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -4
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +265 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +26 -37
- package/src/orchestrate/realize/RealizePipe.ts +39 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +3 -91
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +60 -25
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +192 -18
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +34 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +2 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +58 -34
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +178 -0
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +5 -4
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +7 -2
- package/src/orchestrate/test/orchestrateTest.ts +14 -12
- package/src/orchestrate/test/orchestrateTestCorrect.ts +10 -9
- package/src/structures/IAutoBeProps.ts +10 -7
- package/src/utils/pipe.ts +39 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.d.ts +0 -20
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +0 -735
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.d.ts +0 -15
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -44
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +0 -219
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -62
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +0 -157
|
@@ -1,735 +0,0 @@
|
|
|
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.AutoBeAnalyzeAgent = 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 uuid_1 = require("uuid");
|
|
53
|
-
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
54
|
-
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
55
|
-
const AutoBeAnalyzeFileSystem_1 = require("./AutoBeAnalyzeFileSystem");
|
|
56
|
-
class AutoBeAnalyzeAgent {
|
|
57
|
-
constructor(createReviewerAgentFn, ctx, pointer, filenames) {
|
|
58
|
-
this.createReviewerAgentFn = createReviewerAgentFn;
|
|
59
|
-
this.ctx = ctx;
|
|
60
|
-
this.pointer = pointer;
|
|
61
|
-
this.filenames = filenames;
|
|
62
|
-
this.fileMap = {};
|
|
63
|
-
(0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
|
|
64
|
-
const controller = createController({
|
|
65
|
-
model: ctx.model,
|
|
66
|
-
execute: new AutoBeAnalyzeFileSystem_1.AutoBeAnalyzeFileSystem(this.fileMap),
|
|
67
|
-
build: (files) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
var _a;
|
|
69
|
-
var _b;
|
|
70
|
-
(_a = (_b = this.pointer).value) !== null && _a !== void 0 ? _a : (_b.value = { files: {} });
|
|
71
|
-
Object.assign(this.pointer.value.files, files);
|
|
72
|
-
}),
|
|
73
|
-
});
|
|
74
|
-
this.createAnalyzeAgent = () => {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
-
const agent = new core_1.MicroAgentica({
|
|
77
|
-
controllers: [controller],
|
|
78
|
-
model: ctx.model,
|
|
79
|
-
vendor: ctx.vendor,
|
|
80
|
-
config: {
|
|
81
|
-
locale: (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale,
|
|
82
|
-
executor: {
|
|
83
|
-
describe: null,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
histories: [
|
|
87
|
-
{
|
|
88
|
-
id: (0, uuid_1.v4)(),
|
|
89
|
-
created_at: new Date().toISOString(),
|
|
90
|
-
type: "systemMessage",
|
|
91
|
-
text: "# Overview\nYou are the best planner.\nYou will write documents and hand it over to the developer.\nYou are only asked to fill out one document.\n\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\nWrite a long document, but keep your answer short.\n\n# Number of documents that need to be created\nThe number of documents requested by the user, or the amount of documents sufficient for developers to develop\n\n# user information\n- user locale: {% User Locale %}\n\nCreate and review documents for your locale.\nIt must match the language of the user.\n\n# Documentation Style\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)\nHyperlink features allow you to create more colorful documents.\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.\nNever insert a question in the document.\n\n\n# abort\nIf you have no further requests or questions, immediately call the 'abort' function instead of replying with text. Never respond with additional text.\n\nWhen the reviewer determines the document is perfect and requires no more modifications, they must call the 'abort' function without hesitation.\n\n'abort' is a tool you must use to signal completion.\n\nDo not delay or avoid calling 'abort' once the document is complete.\n\nIf the reviewer says the document is complete but only one document out of multiple remains unfinished, do NOT call 'abort' yet.\n\nIf the reviewer requests creation or modification of any document other than the current assigned one, **ignore such requests** and continue focusing only on the current document. \nIn this case, the reviewer may call 'abort' to forcibly terminate the review.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% User Locale %}", (_c = (_b = ctx.config) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "en-US"),
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: (0, uuid_1.v4)(),
|
|
95
|
-
created_at: new Date().toISOString(),
|
|
96
|
-
type: "systemMessage",
|
|
97
|
-
text: [
|
|
98
|
-
"# Guidelines",
|
|
99
|
-
"If the user specifies the exact number of pages, please follow it precisely.",
|
|
100
|
-
"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 */,
|
|
101
|
-
].join("\n"),
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
id: (0, uuid_1.v4)(),
|
|
105
|
-
created_at: new Date().toISOString(),
|
|
106
|
-
type: "systemMessage",
|
|
107
|
-
text: [
|
|
108
|
-
"The following is the name of the entire file.",
|
|
109
|
-
"Use it to build a table of contents.",
|
|
110
|
-
this.filenames.map((filename) => `- ${filename}`),
|
|
111
|
-
"",
|
|
112
|
-
"However, do not touch other than the file you have to create.",
|
|
113
|
-
].join("\n"),
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
});
|
|
117
|
-
return (0, enforceToolCall_1.enforceToolCall)(agent);
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Conversate with planner agent
|
|
122
|
-
*
|
|
123
|
-
* @param content Conversation from user in this time.
|
|
124
|
-
* @returns
|
|
125
|
-
*/
|
|
126
|
-
conversate(content_1) {
|
|
127
|
-
return __awaiter(this, arguments, void 0, function* (content, retry = 3) {
|
|
128
|
-
var _a, _b, _c, _d;
|
|
129
|
-
if (retry === 0) {
|
|
130
|
-
return "Abort due to excess retry count";
|
|
131
|
-
}
|
|
132
|
-
const agent = this.createAnalyzeAgent();
|
|
133
|
-
const response = yield agent.conversate(content);
|
|
134
|
-
const tokenUsage = agent.getTokenUsage();
|
|
135
|
-
this.ctx.usage().record(tokenUsage, ["analyze"]);
|
|
136
|
-
const lastMessage = response[response.length - 1];
|
|
137
|
-
if ("text" in lastMessage) {
|
|
138
|
-
this.ctx.dispatch({
|
|
139
|
-
type: "analyzeWrite",
|
|
140
|
-
files: this.fileMap,
|
|
141
|
-
created_at: new Date().toISOString(),
|
|
142
|
-
step: (_b = (_a = this.ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
143
|
-
});
|
|
144
|
-
const aborted = lastMessage.type === "describe" &&
|
|
145
|
-
lastMessage.executes.some((el) => {
|
|
146
|
-
if (el.protocol === "class" &&
|
|
147
|
-
el.operation.function.name === "abort") {
|
|
148
|
-
el.arguments;
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
if (aborted === true) {
|
|
153
|
-
return lastMessage.text;
|
|
154
|
-
}
|
|
155
|
-
const reviewer = this.createReviewerAgentFn(this.ctx, {
|
|
156
|
-
query: content,
|
|
157
|
-
files: JSON.stringify(this.fileMap),
|
|
158
|
-
});
|
|
159
|
-
const filenames = Object.keys(this.fileMap).join(",");
|
|
160
|
-
const command = `Please proceed with the review of these files only.: ${filenames}`;
|
|
161
|
-
const response = yield reviewer.conversate(command);
|
|
162
|
-
this.ctx.usage().record(reviewer.getTokenUsage(), ["analyze"]);
|
|
163
|
-
const review = response.find((el) => el.type === "assistantMessage");
|
|
164
|
-
if (review) {
|
|
165
|
-
this.ctx.dispatch({
|
|
166
|
-
type: "analyzeReview",
|
|
167
|
-
review: review.text,
|
|
168
|
-
created_at: new Date().toISOString(),
|
|
169
|
-
step: (_d = (_c = this.ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
|
|
170
|
-
});
|
|
171
|
-
return this.conversate(JSON.stringify({
|
|
172
|
-
user_query: content,
|
|
173
|
-
message: `THIS IS ANSWER OF REVIEW AGENT. FOLLOW THIS INSTRUCTIONS. AND DON\'T REQUEST ANYTHING.`,
|
|
174
|
-
review: review.text,
|
|
175
|
-
}), retry - 1);
|
|
176
|
-
}
|
|
177
|
-
return `COMPLETE WITHOUT REVIEW`;
|
|
178
|
-
}
|
|
179
|
-
return "COMPLETE";
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.AutoBeAnalyzeAgent = AutoBeAnalyzeAgent;
|
|
184
|
-
function createController(props) {
|
|
185
|
-
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
186
|
-
const application = collection[props.model];
|
|
187
|
-
return {
|
|
188
|
-
protocol: "class",
|
|
189
|
-
name: "Planning",
|
|
190
|
-
application,
|
|
191
|
-
// execute: props.execute,
|
|
192
|
-
execute: {
|
|
193
|
-
removeFile: (input) => {
|
|
194
|
-
const response = props.execute.removeFile(input);
|
|
195
|
-
props.build(props.execute.allFiles());
|
|
196
|
-
return response;
|
|
197
|
-
},
|
|
198
|
-
abort: (input) => {
|
|
199
|
-
const response = props.execute.abort(input);
|
|
200
|
-
props.build(props.execute.allFiles());
|
|
201
|
-
return response;
|
|
202
|
-
},
|
|
203
|
-
createOrUpdateFiles: (input) => {
|
|
204
|
-
const response = props.execute.createOrUpdateFiles(input);
|
|
205
|
-
props.build(props.execute.allFiles());
|
|
206
|
-
return response;
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
const claude = {
|
|
212
|
-
model: "claude",
|
|
213
|
-
options: {
|
|
214
|
-
reference: true,
|
|
215
|
-
separate: null
|
|
216
|
-
},
|
|
217
|
-
functions: [
|
|
218
|
-
{
|
|
219
|
-
name: "createOrUpdateFiles",
|
|
220
|
-
parameters: {
|
|
221
|
-
type: "object",
|
|
222
|
-
properties: {
|
|
223
|
-
files: {
|
|
224
|
-
type: "array",
|
|
225
|
-
items: {
|
|
226
|
-
$ref: "#/$defs/IFile"
|
|
227
|
-
},
|
|
228
|
-
minItems: 1
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
required: [
|
|
232
|
-
"files"
|
|
233
|
-
],
|
|
234
|
-
additionalProperties: false,
|
|
235
|
-
$defs: {
|
|
236
|
-
IFile: {
|
|
237
|
-
type: "object",
|
|
238
|
-
properties: {
|
|
239
|
-
reason: {
|
|
240
|
-
description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.",
|
|
241
|
-
type: "string"
|
|
242
|
-
},
|
|
243
|
-
filename: {
|
|
244
|
-
description: "Filename to generate or overwrite.",
|
|
245
|
-
type: "string",
|
|
246
|
-
pattern: "((.*)\\.md)$"
|
|
247
|
-
},
|
|
248
|
-
markdown: {
|
|
249
|
-
description: "Markdown file content. Only write the content of the file. Do not include\nany questions. This should contain only the contents of the file. Do not\nwrite down any questions or appreciation. For example, remove a sentence\nsuch as \"Is it okay if we proceed with the table of contents? Please let me\nknow if there is anything to add or exclude from the table of contents!\"",
|
|
250
|
-
type: "string"
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
required: [
|
|
254
|
-
"reason",
|
|
255
|
-
"filename",
|
|
256
|
-
"markdown"
|
|
257
|
-
]
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
validate: (() => { const _io0 = input => Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.files) || _report(_exceptionable, {
|
|
262
|
-
path: _path + ".files",
|
|
263
|
-
expected: "(Array<IFile> & MinItems<1>)",
|
|
264
|
-
value: input.files
|
|
265
|
-
})) && ((1 <= input.files.length || _report(_exceptionable, {
|
|
266
|
-
path: _path + ".files",
|
|
267
|
-
expected: "Array<> & MinItems<1>",
|
|
268
|
-
value: input.files
|
|
269
|
-
})) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
270
|
-
path: _path + ".files[" + _index2 + "]",
|
|
271
|
-
expected: "IFile",
|
|
272
|
-
value: elem
|
|
273
|
-
})) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
274
|
-
path: _path + ".files[" + _index2 + "]",
|
|
275
|
-
expected: "IFile",
|
|
276
|
-
value: elem
|
|
277
|
-
})).every(flag => flag)) || _report(_exceptionable, {
|
|
278
|
-
path: _path + ".files",
|
|
279
|
-
expected: "(Array<IFile> & MinItems<1>)",
|
|
280
|
-
value: input.files
|
|
281
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
282
|
-
path: _path + ".reason",
|
|
283
|
-
expected: "string",
|
|
284
|
-
value: input.reason
|
|
285
|
-
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
286
|
-
path: _path + ".filename",
|
|
287
|
-
expected: "`${string}.md`",
|
|
288
|
-
value: input.filename
|
|
289
|
-
}), "string" === typeof input.markdown || _report(_exceptionable, {
|
|
290
|
-
path: _path + ".markdown",
|
|
291
|
-
expected: "string",
|
|
292
|
-
value: input.markdown
|
|
293
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
294
|
-
if (false === __is(input)) {
|
|
295
|
-
errors = [];
|
|
296
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
297
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
298
|
-
path: _path + "",
|
|
299
|
-
expected: "__type",
|
|
300
|
-
value: input
|
|
301
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
302
|
-
path: _path + "",
|
|
303
|
-
expected: "__type",
|
|
304
|
-
value: input
|
|
305
|
-
}))(input, "$input", true);
|
|
306
|
-
const success = 0 === errors.length;
|
|
307
|
-
return success ? {
|
|
308
|
-
success,
|
|
309
|
-
data: input
|
|
310
|
-
} : {
|
|
311
|
-
success,
|
|
312
|
-
errors,
|
|
313
|
-
data: input
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
return {
|
|
317
|
-
success: true,
|
|
318
|
-
data: input
|
|
319
|
-
};
|
|
320
|
-
}; })()
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: "removeFile",
|
|
324
|
-
parameters: {
|
|
325
|
-
description: "Description of the current {@link PickIFilefilename} type:\n\n> From T, pick a set of properties whose keys are in the union K",
|
|
326
|
-
type: "object",
|
|
327
|
-
properties: {
|
|
328
|
-
filename: {
|
|
329
|
-
description: "Filename to generate or overwrite.",
|
|
330
|
-
type: "string",
|
|
331
|
-
pattern: "((.*)\\.md)$"
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
required: [
|
|
335
|
-
"filename"
|
|
336
|
-
],
|
|
337
|
-
additionalProperties: false,
|
|
338
|
-
$defs: {}
|
|
339
|
-
},
|
|
340
|
-
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, {
|
|
341
|
-
path: _path + ".filename",
|
|
342
|
-
expected: "`${string}.md`",
|
|
343
|
-
value: input.filename
|
|
344
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
345
|
-
if (false === __is(input)) {
|
|
346
|
-
errors = [];
|
|
347
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
348
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
349
|
-
path: _path + "",
|
|
350
|
-
expected: "Pick<IFile, \"filename\">",
|
|
351
|
-
value: input
|
|
352
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
353
|
-
path: _path + "",
|
|
354
|
-
expected: "Pick<IFile, \"filename\">",
|
|
355
|
-
value: input
|
|
356
|
-
}))(input, "$input", true);
|
|
357
|
-
const success = 0 === errors.length;
|
|
358
|
-
return success ? {
|
|
359
|
-
success,
|
|
360
|
-
data: input
|
|
361
|
-
} : {
|
|
362
|
-
success,
|
|
363
|
-
errors,
|
|
364
|
-
data: input
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
return {
|
|
368
|
-
success: true,
|
|
369
|
-
data: input
|
|
370
|
-
};
|
|
371
|
-
}; })()
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
name: "abort",
|
|
375
|
-
parameters: {
|
|
376
|
-
type: "object",
|
|
377
|
-
properties: {
|
|
378
|
-
reason: {
|
|
379
|
-
type: "string"
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
required: [
|
|
383
|
-
"reason"
|
|
384
|
-
],
|
|
385
|
-
additionalProperties: false,
|
|
386
|
-
$defs: {}
|
|
387
|
-
},
|
|
388
|
-
output: {
|
|
389
|
-
"const": "OK"
|
|
390
|
-
},
|
|
391
|
-
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
392
|
-
path: _path + ".reason",
|
|
393
|
-
expected: "string",
|
|
394
|
-
value: input.reason
|
|
395
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
396
|
-
if (false === __is(input)) {
|
|
397
|
-
errors = [];
|
|
398
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
399
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
400
|
-
path: _path + "",
|
|
401
|
-
expected: "__type",
|
|
402
|
-
value: input
|
|
403
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
404
|
-
path: _path + "",
|
|
405
|
-
expected: "__type",
|
|
406
|
-
value: input
|
|
407
|
-
}))(input, "$input", true);
|
|
408
|
-
const success = 0 === errors.length;
|
|
409
|
-
return success ? {
|
|
410
|
-
success,
|
|
411
|
-
data: input
|
|
412
|
-
} : {
|
|
413
|
-
success,
|
|
414
|
-
errors,
|
|
415
|
-
data: input
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
return {
|
|
419
|
-
success: true,
|
|
420
|
-
data: input
|
|
421
|
-
};
|
|
422
|
-
}; })()
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
name: "allFiles",
|
|
426
|
-
parameters: {
|
|
427
|
-
type: "object",
|
|
428
|
-
properties: {},
|
|
429
|
-
additionalProperties: false,
|
|
430
|
-
required: [],
|
|
431
|
-
$defs: {
|
|
432
|
-
Recordstringstring: {
|
|
433
|
-
description: "Construct a type with a set of properties K of type T",
|
|
434
|
-
type: "object",
|
|
435
|
-
properties: {},
|
|
436
|
-
required: [],
|
|
437
|
-
additionalProperties: {
|
|
438
|
-
type: "string"
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
output: {
|
|
444
|
-
$ref: "#/$defs/Recordstringstring"
|
|
445
|
-
},
|
|
446
|
-
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
447
|
-
if (false === __is(input)) {
|
|
448
|
-
errors = [];
|
|
449
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
450
|
-
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
451
|
-
const success = 0 === errors.length;
|
|
452
|
-
return success ? {
|
|
453
|
-
success,
|
|
454
|
-
data: input
|
|
455
|
-
} : {
|
|
456
|
-
success,
|
|
457
|
-
errors,
|
|
458
|
-
data: input
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
return {
|
|
462
|
-
success: true,
|
|
463
|
-
data: input
|
|
464
|
-
};
|
|
465
|
-
}; })()
|
|
466
|
-
}
|
|
467
|
-
]
|
|
468
|
-
};
|
|
469
|
-
const collection = {
|
|
470
|
-
chatgpt: {
|
|
471
|
-
model: "chatgpt",
|
|
472
|
-
options: {
|
|
473
|
-
reference: true,
|
|
474
|
-
strict: false,
|
|
475
|
-
separate: null
|
|
476
|
-
},
|
|
477
|
-
functions: [
|
|
478
|
-
{
|
|
479
|
-
name: "createOrUpdateFiles",
|
|
480
|
-
parameters: {
|
|
481
|
-
type: "object",
|
|
482
|
-
properties: {
|
|
483
|
-
files: {
|
|
484
|
-
description: "@minItems 1",
|
|
485
|
-
type: "array",
|
|
486
|
-
items: {
|
|
487
|
-
$ref: "#/$defs/IFile"
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
required: [
|
|
492
|
-
"files"
|
|
493
|
-
],
|
|
494
|
-
additionalProperties: false,
|
|
495
|
-
$defs: {
|
|
496
|
-
IFile: {
|
|
497
|
-
type: "object",
|
|
498
|
-
properties: {
|
|
499
|
-
reason: {
|
|
500
|
-
description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.",
|
|
501
|
-
type: "string"
|
|
502
|
-
},
|
|
503
|
-
filename: {
|
|
504
|
-
description: "Filename to generate or overwrite.\n\n\n@pattern ((.*)\\.md)$",
|
|
505
|
-
type: "string"
|
|
506
|
-
},
|
|
507
|
-
markdown: {
|
|
508
|
-
description: "Markdown file content. Only write the content of the file. Do not include\nany questions. This should contain only the contents of the file. Do not\nwrite down any questions or appreciation. For example, remove a sentence\nsuch as \"Is it okay if we proceed with the table of contents? Please let me\nknow if there is anything to add or exclude from the table of contents!\"",
|
|
509
|
-
type: "string"
|
|
510
|
-
}
|
|
511
|
-
},
|
|
512
|
-
required: [
|
|
513
|
-
"reason",
|
|
514
|
-
"filename",
|
|
515
|
-
"markdown"
|
|
516
|
-
]
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
validate: (() => { const _io0 = input => Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.files) || _report(_exceptionable, {
|
|
521
|
-
path: _path + ".files",
|
|
522
|
-
expected: "(Array<IFile> & MinItems<1>)",
|
|
523
|
-
value: input.files
|
|
524
|
-
})) && ((1 <= input.files.length || _report(_exceptionable, {
|
|
525
|
-
path: _path + ".files",
|
|
526
|
-
expected: "Array<> & MinItems<1>",
|
|
527
|
-
value: input.files
|
|
528
|
-
})) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
529
|
-
path: _path + ".files[" + _index2 + "]",
|
|
530
|
-
expected: "IFile",
|
|
531
|
-
value: elem
|
|
532
|
-
})) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
533
|
-
path: _path + ".files[" + _index2 + "]",
|
|
534
|
-
expected: "IFile",
|
|
535
|
-
value: elem
|
|
536
|
-
})).every(flag => flag)) || _report(_exceptionable, {
|
|
537
|
-
path: _path + ".files",
|
|
538
|
-
expected: "(Array<IFile> & MinItems<1>)",
|
|
539
|
-
value: input.files
|
|
540
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
541
|
-
path: _path + ".reason",
|
|
542
|
-
expected: "string",
|
|
543
|
-
value: input.reason
|
|
544
|
-
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
545
|
-
path: _path + ".filename",
|
|
546
|
-
expected: "`${string}.md`",
|
|
547
|
-
value: input.filename
|
|
548
|
-
}), "string" === typeof input.markdown || _report(_exceptionable, {
|
|
549
|
-
path: _path + ".markdown",
|
|
550
|
-
expected: "string",
|
|
551
|
-
value: input.markdown
|
|
552
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
553
|
-
if (false === __is(input)) {
|
|
554
|
-
errors = [];
|
|
555
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
556
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
557
|
-
path: _path + "",
|
|
558
|
-
expected: "__type",
|
|
559
|
-
value: input
|
|
560
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
561
|
-
path: _path + "",
|
|
562
|
-
expected: "__type",
|
|
563
|
-
value: input
|
|
564
|
-
}))(input, "$input", true);
|
|
565
|
-
const success = 0 === errors.length;
|
|
566
|
-
return success ? {
|
|
567
|
-
success,
|
|
568
|
-
data: input
|
|
569
|
-
} : {
|
|
570
|
-
success,
|
|
571
|
-
errors,
|
|
572
|
-
data: input
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
return {
|
|
576
|
-
success: true,
|
|
577
|
-
data: input
|
|
578
|
-
};
|
|
579
|
-
}; })()
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
name: "removeFile",
|
|
583
|
-
parameters: {
|
|
584
|
-
description: "Description of the current {@link PickIFilefilename} type:\n\n> From T, pick a set of properties whose keys are in the union K",
|
|
585
|
-
type: "object",
|
|
586
|
-
properties: {
|
|
587
|
-
filename: {
|
|
588
|
-
description: "Filename to generate or overwrite.\n\n\n@pattern ((.*)\\.md)$",
|
|
589
|
-
type: "string"
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
required: [
|
|
593
|
-
"filename"
|
|
594
|
-
],
|
|
595
|
-
additionalProperties: false,
|
|
596
|
-
$defs: {}
|
|
597
|
-
},
|
|
598
|
-
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, {
|
|
599
|
-
path: _path + ".filename",
|
|
600
|
-
expected: "`${string}.md`",
|
|
601
|
-
value: input.filename
|
|
602
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
603
|
-
if (false === __is(input)) {
|
|
604
|
-
errors = [];
|
|
605
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
606
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
607
|
-
path: _path + "",
|
|
608
|
-
expected: "Pick<IFile, \"filename\">",
|
|
609
|
-
value: input
|
|
610
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
611
|
-
path: _path + "",
|
|
612
|
-
expected: "Pick<IFile, \"filename\">",
|
|
613
|
-
value: input
|
|
614
|
-
}))(input, "$input", true);
|
|
615
|
-
const success = 0 === errors.length;
|
|
616
|
-
return success ? {
|
|
617
|
-
success,
|
|
618
|
-
data: input
|
|
619
|
-
} : {
|
|
620
|
-
success,
|
|
621
|
-
errors,
|
|
622
|
-
data: input
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
return {
|
|
626
|
-
success: true,
|
|
627
|
-
data: input
|
|
628
|
-
};
|
|
629
|
-
}; })()
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
name: "abort",
|
|
633
|
-
parameters: {
|
|
634
|
-
type: "object",
|
|
635
|
-
properties: {
|
|
636
|
-
reason: {
|
|
637
|
-
type: "string"
|
|
638
|
-
}
|
|
639
|
-
},
|
|
640
|
-
required: [
|
|
641
|
-
"reason"
|
|
642
|
-
],
|
|
643
|
-
additionalProperties: false,
|
|
644
|
-
$defs: {}
|
|
645
|
-
},
|
|
646
|
-
output: {
|
|
647
|
-
type: "string",
|
|
648
|
-
"enum": [
|
|
649
|
-
"OK"
|
|
650
|
-
]
|
|
651
|
-
},
|
|
652
|
-
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
653
|
-
path: _path + ".reason",
|
|
654
|
-
expected: "string",
|
|
655
|
-
value: input.reason
|
|
656
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
657
|
-
if (false === __is(input)) {
|
|
658
|
-
errors = [];
|
|
659
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
660
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
661
|
-
path: _path + "",
|
|
662
|
-
expected: "__type",
|
|
663
|
-
value: input
|
|
664
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
665
|
-
path: _path + "",
|
|
666
|
-
expected: "__type",
|
|
667
|
-
value: input
|
|
668
|
-
}))(input, "$input", true);
|
|
669
|
-
const success = 0 === errors.length;
|
|
670
|
-
return success ? {
|
|
671
|
-
success,
|
|
672
|
-
data: input
|
|
673
|
-
} : {
|
|
674
|
-
success,
|
|
675
|
-
errors,
|
|
676
|
-
data: input
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
return {
|
|
680
|
-
success: true,
|
|
681
|
-
data: input
|
|
682
|
-
};
|
|
683
|
-
}; })()
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
name: "allFiles",
|
|
687
|
-
parameters: {
|
|
688
|
-
type: "object",
|
|
689
|
-
properties: {},
|
|
690
|
-
additionalProperties: false,
|
|
691
|
-
required: [],
|
|
692
|
-
$defs: {
|
|
693
|
-
Recordstringstring: {
|
|
694
|
-
description: "Construct a type with a set of properties K of type T",
|
|
695
|
-
type: "object",
|
|
696
|
-
properties: {},
|
|
697
|
-
required: [],
|
|
698
|
-
additionalProperties: {
|
|
699
|
-
type: "string"
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
output: {
|
|
705
|
-
$ref: "#/$defs/Recordstringstring"
|
|
706
|
-
},
|
|
707
|
-
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
708
|
-
if (false === __is(input)) {
|
|
709
|
-
errors = [];
|
|
710
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
711
|
-
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
712
|
-
const success = 0 === errors.length;
|
|
713
|
-
return success ? {
|
|
714
|
-
success,
|
|
715
|
-
data: input
|
|
716
|
-
} : {
|
|
717
|
-
success,
|
|
718
|
-
errors,
|
|
719
|
-
data: input
|
|
720
|
-
};
|
|
721
|
-
}
|
|
722
|
-
return {
|
|
723
|
-
success: true,
|
|
724
|
-
data: input
|
|
725
|
-
};
|
|
726
|
-
}; })()
|
|
727
|
-
}
|
|
728
|
-
]
|
|
729
|
-
},
|
|
730
|
-
claude,
|
|
731
|
-
llama: claude,
|
|
732
|
-
deepseek: claude,
|
|
733
|
-
"3.1": claude,
|
|
734
|
-
};
|
|
735
|
-
//# sourceMappingURL=AutoBeAnalyzeAgent.js.map
|