@autobe/agent 0.15.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.js +2 -2
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.d.ts +1 -0
- package/lib/AutoBeMockAgent.js +18 -4
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +3 -3
- package/lib/factory/getAutoBeGenerated.js +2 -1
- package/lib/factory/getAutoBeGenerated.js.map +1 -1
- package/lib/index.mjs +739 -577
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -15
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +19 -12
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +1 -2
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +3 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +7 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +363 -4
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +3 -3
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +3 -118
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +11 -4
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +61 -45
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +17 -10
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/orchestrate/realize/ProviderCodeComparator.js +16 -0
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +41 -53
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +13 -87
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +32 -43
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -2
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +25 -39
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +15 -15
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +11 -17
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +4 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +21 -17
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +5 -9
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +9 -0
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +3 -2
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +58 -27
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +10 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +38 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +2 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +15 -2
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +9 -2
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +158 -100
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +1 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +1 -1
- package/src/AutoBeMockAgent.ts +20 -6
- package/src/constants/AutoBeSystemPromptConstant.ts +3 -3
- package/src/factory/getAutoBeGenerated.ts +2 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -15
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +17 -17
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +4 -7
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +100 -6
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +5 -21
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +76 -59
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +17 -10
- package/src/orchestrate/realize/ProviderCodeComparator.ts +15 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +54 -59
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +12 -120
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +21 -5
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +10 -9
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +15 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +11 -18
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +4 -2
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +24 -17
- package/src/orchestrate/realize/transformRealizeAuthorization.ts +5 -9
- package/src/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.ts +9 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +73 -25
- package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.ts +9 -0
- package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.ts +64 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +41 -2
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +219 -145
- package/src/orchestrate/test/orchestrateTest.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateAnalyze.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,+BAA0B;
|
|
1
|
+
{"version":3,"file":"orchestrateAnalyze.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,+BAA0B;AAI1B,6EAA0E;AAE1E,qFAAkF;AAElF,oBAAoB;AACb,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,MAAM,IAAI,GAAW,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCA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S;YACf,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,MAAM;YACN,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;YACZ,IAAI;YACJ,UAAU;YACV,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACvC,CAAC;QACF,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,iBAAiB;YACvB,MAAM;YACN,KAAK;YACL,IAAI;YACJ,UAAU;SACX,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAkC;QAC7C,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,MAAA,MAAA,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,kBAAkB,CAAC,0CAAE,IAAI,mCAAI,EAAE;QACzE,UAAU;QACV,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC,CAAC;IACF,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AAzHS,QAAA,kBAAkB,sBAyH3B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MicroAgentica } from "@agentica/core";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { IPointer } from "tstl";
|
|
4
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
4
|
import { IComposeInput } from "./structures/IAutoBeAnalyzeComposerApplication";
|
|
6
|
-
export declare const orchestrateAnalyzeComposer: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
5
|
+
export declare const orchestrateAnalyzeComposer: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, setComposeInput: (value: IComposeInput) => void) => MicroAgentica<Model>;
|
|
@@ -43,14 +43,12 @@ const typia_1 = __importDefault(require("typia"));
|
|
|
43
43
|
const uuid_1 = require("uuid");
|
|
44
44
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
45
45
|
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
46
|
-
const orchestrateAnalyzeComposer = (ctx,
|
|
46
|
+
const orchestrateAnalyzeComposer = (ctx, setComposeInput) => {
|
|
47
47
|
var _a;
|
|
48
48
|
const controller = createController({
|
|
49
49
|
model: ctx.model,
|
|
50
50
|
execute: new AutoBeAnalyzeComposerApplication(),
|
|
51
|
-
|
|
52
|
-
pointer.value = value;
|
|
53
|
-
},
|
|
51
|
+
preExecute: setComposeInput,
|
|
54
52
|
});
|
|
55
53
|
const agent = new core_1.MicroAgentica({
|
|
56
54
|
model: ctx.model,
|
|
@@ -106,7 +104,7 @@ function createController(props) {
|
|
|
106
104
|
application,
|
|
107
105
|
execute: {
|
|
108
106
|
compose: (input) => {
|
|
109
|
-
props.
|
|
107
|
+
props.preExecute(input);
|
|
110
108
|
return props.execute.compose(input);
|
|
111
109
|
},
|
|
112
110
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateAnalyzeComposer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeComposer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;
|
|
1
|
+
{"version":3,"file":"orchestrateAnalyzeComposer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeComposer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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ewerResult = {
|
|
4
|
+
type: "reject";
|
|
5
|
+
value: string;
|
|
6
|
+
} | {
|
|
7
|
+
type: "accept";
|
|
8
|
+
};
|
|
3
9
|
export declare const orchestrateAnalyzeReviewer: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, input: {
|
|
4
10
|
/** Total file names */
|
|
5
11
|
files: Record<string, string>;
|
|
6
|
-
}) => Promise<
|
|
12
|
+
}) => Promise<IOrchestrateAnalyzeReviewerResult>;
|
|
@@ -1,4 +1,37 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,17 +41,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
41
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
42
|
});
|
|
10
43
|
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
11
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
48
|
exports.orchestrateAnalyzeReviewer = void 0;
|
|
49
|
+
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
13
50
|
const core_1 = require("@agentica/core");
|
|
51
|
+
const typia_1 = __importDefault(require("typia"));
|
|
52
|
+
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
14
53
|
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
15
54
|
const transformAnalyzeReviewerHistories_1 = require("./transformAnalyzeReviewerHistories");
|
|
16
55
|
const orchestrateAnalyzeReviewer = (ctx, input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
|
|
56
|
+
const fnCalled = {
|
|
57
|
+
value: {
|
|
58
|
+
type: "reject",
|
|
59
|
+
value: "reviewer is not working because of unknown reason.",
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
const controller = createController({
|
|
63
|
+
model: ctx.model,
|
|
64
|
+
setResult: (result) => {
|
|
65
|
+
fnCalled.value = result;
|
|
66
|
+
},
|
|
67
|
+
});
|
|
18
68
|
const agent = new core_1.MicroAgentica({
|
|
19
69
|
model: ctx.model,
|
|
20
70
|
vendor: ctx.vendor,
|
|
21
|
-
controllers: [],
|
|
71
|
+
controllers: [controller],
|
|
22
72
|
config: Object.assign(Object.assign({}, ctx.config), { executor: {
|
|
23
73
|
describe: null,
|
|
24
74
|
} }),
|
|
@@ -26,11 +76,320 @@ const orchestrateAnalyzeReviewer = (ctx, input) => __awaiter(void 0, void 0, voi
|
|
|
26
76
|
});
|
|
27
77
|
(0, enforceToolCall_1.enforceToolCall)(agent);
|
|
28
78
|
const command = `proceed with the review of these files only.`;
|
|
29
|
-
|
|
79
|
+
yield agent.conversate(command).finally(() => {
|
|
30
80
|
const tokenUsage = agent.getTokenUsage();
|
|
31
81
|
ctx.usage().record(tokenUsage, ["analyze"]);
|
|
32
82
|
});
|
|
33
|
-
return
|
|
83
|
+
return fnCalled.value;
|
|
34
84
|
});
|
|
35
85
|
exports.orchestrateAnalyzeReviewer = orchestrateAnalyzeReviewer;
|
|
86
|
+
function createController(props) {
|
|
87
|
+
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
88
|
+
const application = collection[props.model];
|
|
89
|
+
return {
|
|
90
|
+
protocol: "class",
|
|
91
|
+
name: "Reviewer",
|
|
92
|
+
application,
|
|
93
|
+
execute: {
|
|
94
|
+
accept: () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
props.setResult({
|
|
96
|
+
type: "accept",
|
|
97
|
+
});
|
|
98
|
+
return "OK";
|
|
99
|
+
}),
|
|
100
|
+
reject: (input) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
props.setResult({
|
|
102
|
+
type: "reject",
|
|
103
|
+
value: input.reason,
|
|
104
|
+
});
|
|
105
|
+
return "OK";
|
|
106
|
+
}),
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const claude = {
|
|
111
|
+
model: "claude",
|
|
112
|
+
options: {
|
|
113
|
+
reference: true,
|
|
114
|
+
separate: null
|
|
115
|
+
},
|
|
116
|
+
functions: [
|
|
117
|
+
{
|
|
118
|
+
name: "reject",
|
|
119
|
+
parameters: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
reason: {
|
|
123
|
+
description: "The reason why you reject the document and the suggestion for the\nmodification. You can write the reason in detail.",
|
|
124
|
+
type: "string"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
required: [
|
|
128
|
+
"reason"
|
|
129
|
+
],
|
|
130
|
+
additionalProperties: false,
|
|
131
|
+
$defs: {
|
|
132
|
+
OK: {
|
|
133
|
+
description: "Represents the completion of an asynchronous operation",
|
|
134
|
+
type: "object",
|
|
135
|
+
properties: {
|
|
136
|
+
"__@toStringTag@1672": {
|
|
137
|
+
type: "string"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
required: [
|
|
141
|
+
"__@toStringTag@1672"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
output: {
|
|
147
|
+
oneOf: [
|
|
148
|
+
{
|
|
149
|
+
"const": "OK"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
$ref: "#/$defs/OK"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
description: "If there is anything that needs to be modified, you can call it, This\nfunction is to reject the document for to try rewriting document with your\nadvice or suggestion.",
|
|
157
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
158
|
+
path: _path + ".reason",
|
|
159
|
+
expected: "string",
|
|
160
|
+
value: input.reason
|
|
161
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
162
|
+
if (false === __is(input)) {
|
|
163
|
+
errors = [];
|
|
164
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
165
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
166
|
+
path: _path + "",
|
|
167
|
+
expected: "__type",
|
|
168
|
+
value: input
|
|
169
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
170
|
+
path: _path + "",
|
|
171
|
+
expected: "__type",
|
|
172
|
+
value: input
|
|
173
|
+
}))(input, "$input", true);
|
|
174
|
+
const success = 0 === errors.length;
|
|
175
|
+
return success ? {
|
|
176
|
+
success,
|
|
177
|
+
data: input
|
|
178
|
+
} : {
|
|
179
|
+
success,
|
|
180
|
+
errors,
|
|
181
|
+
data: input
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
success: true,
|
|
186
|
+
data: input
|
|
187
|
+
};
|
|
188
|
+
}; })()
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "accept",
|
|
192
|
+
parameters: {
|
|
193
|
+
type: "object",
|
|
194
|
+
properties: {},
|
|
195
|
+
additionalProperties: false,
|
|
196
|
+
required: [],
|
|
197
|
+
$defs: {
|
|
198
|
+
OK: {
|
|
199
|
+
description: "Represents the completion of an asynchronous operation",
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
"__@toStringTag@1672": {
|
|
203
|
+
type: "string"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
required: [
|
|
207
|
+
"__@toStringTag@1672"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
output: {
|
|
213
|
+
oneOf: [
|
|
214
|
+
{
|
|
215
|
+
"const": "OK"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
$ref: "#/$defs/OK"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
description: "If you decide that you no longer need any reviews, call accept. This is a\nfunction to end document creation and review, and to respond to users.",
|
|
223
|
+
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
224
|
+
if (false === __is(input)) {
|
|
225
|
+
errors = [];
|
|
226
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
227
|
+
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
228
|
+
const success = 0 === errors.length;
|
|
229
|
+
return success ? {
|
|
230
|
+
success,
|
|
231
|
+
data: input
|
|
232
|
+
} : {
|
|
233
|
+
success,
|
|
234
|
+
errors,
|
|
235
|
+
data: input
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
success: true,
|
|
240
|
+
data: input
|
|
241
|
+
};
|
|
242
|
+
}; })()
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
};
|
|
246
|
+
const collection = {
|
|
247
|
+
chatgpt: {
|
|
248
|
+
model: "chatgpt",
|
|
249
|
+
options: {
|
|
250
|
+
reference: true,
|
|
251
|
+
strict: false,
|
|
252
|
+
separate: null
|
|
253
|
+
},
|
|
254
|
+
functions: [
|
|
255
|
+
{
|
|
256
|
+
name: "reject",
|
|
257
|
+
parameters: {
|
|
258
|
+
type: "object",
|
|
259
|
+
properties: {
|
|
260
|
+
reason: {
|
|
261
|
+
description: "The reason why you reject the document and the suggestion for the\nmodification. You can write the reason in detail.",
|
|
262
|
+
type: "string"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
required: [
|
|
266
|
+
"reason"
|
|
267
|
+
],
|
|
268
|
+
additionalProperties: false,
|
|
269
|
+
$defs: {
|
|
270
|
+
OK: {
|
|
271
|
+
description: "Represents the completion of an asynchronous operation",
|
|
272
|
+
type: "object",
|
|
273
|
+
properties: {
|
|
274
|
+
"__@toStringTag@1672": {
|
|
275
|
+
type: "string"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
required: [
|
|
279
|
+
"__@toStringTag@1672"
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
output: {
|
|
285
|
+
anyOf: [
|
|
286
|
+
{
|
|
287
|
+
$ref: "#/$defs/OK"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
type: "string",
|
|
291
|
+
"enum": [
|
|
292
|
+
"OK"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
description: "If there is anything that needs to be modified, you can call it, This\nfunction is to reject the document for to try rewriting document with your\nadvice or suggestion.",
|
|
298
|
+
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
299
|
+
path: _path + ".reason",
|
|
300
|
+
expected: "string",
|
|
301
|
+
value: input.reason
|
|
302
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
303
|
+
if (false === __is(input)) {
|
|
304
|
+
errors = [];
|
|
305
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
306
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
307
|
+
path: _path + "",
|
|
308
|
+
expected: "__type",
|
|
309
|
+
value: input
|
|
310
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
311
|
+
path: _path + "",
|
|
312
|
+
expected: "__type",
|
|
313
|
+
value: input
|
|
314
|
+
}))(input, "$input", true);
|
|
315
|
+
const success = 0 === errors.length;
|
|
316
|
+
return success ? {
|
|
317
|
+
success,
|
|
318
|
+
data: input
|
|
319
|
+
} : {
|
|
320
|
+
success,
|
|
321
|
+
errors,
|
|
322
|
+
data: input
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
return {
|
|
326
|
+
success: true,
|
|
327
|
+
data: input
|
|
328
|
+
};
|
|
329
|
+
}; })()
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: "accept",
|
|
333
|
+
parameters: {
|
|
334
|
+
type: "object",
|
|
335
|
+
properties: {},
|
|
336
|
+
additionalProperties: false,
|
|
337
|
+
required: [],
|
|
338
|
+
$defs: {
|
|
339
|
+
OK: {
|
|
340
|
+
description: "Represents the completion of an asynchronous operation",
|
|
341
|
+
type: "object",
|
|
342
|
+
properties: {
|
|
343
|
+
"__@toStringTag@1672": {
|
|
344
|
+
type: "string"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
required: [
|
|
348
|
+
"__@toStringTag@1672"
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
output: {
|
|
354
|
+
anyOf: [
|
|
355
|
+
{
|
|
356
|
+
$ref: "#/$defs/OK"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
type: "string",
|
|
360
|
+
"enum": [
|
|
361
|
+
"OK"
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
description: "If you decide that you no longer need any reviews, call accept. This is a\nfunction to end document creation and review, and to respond to users.",
|
|
367
|
+
validate: (() => { const __is = input => true; let errors; let _report; return input => {
|
|
368
|
+
if (false === __is(input)) {
|
|
369
|
+
errors = [];
|
|
370
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
371
|
+
((input, _path, _exceptionable = true) => true)(input, "$input", true);
|
|
372
|
+
const success = 0 === errors.length;
|
|
373
|
+
return success ? {
|
|
374
|
+
success,
|
|
375
|
+
data: input
|
|
376
|
+
} : {
|
|
377
|
+
success,
|
|
378
|
+
errors,
|
|
379
|
+
data: input
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
success: true,
|
|
384
|
+
data: input
|
|
385
|
+
};
|
|
386
|
+
}; })()
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
claude,
|
|
391
|
+
llama: claude,
|
|
392
|
+
deepseek: claude,
|
|
393
|
+
"3.1": claude,
|
|
394
|
+
};
|
|
36
395
|
//# sourceMappingURL=orchestrateAnalyzeReviewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateAnalyzeReviewer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrateAnalyzeReviewer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;AAGpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,2FAAwF;AAWjF,MAAM,0BAA0B,GAAG,CAGxC,GAAyB,EACzB,KAGC,EAC2C,EAAE;IAC9C,MAAM,QAAQ,GAAgD;QAC5D,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oDAAoD;SAC5D;KACF,CAAC;IAEF,MAAM,UAAU,GAAG,gBAAgB,CAAC;QAClC,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,SAAS,EAAE,CAAC,MAAyC,EAAE,EAAE;YACvD,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,IAAI,oBAAa,CAAC;QAC9B,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,MAAM,kCACD,GAAG,CAAC,MAAM,KACb,QAAQ,EAAE;gBACR,QAAQ,EAAE,IAAI;aACf,GACF;QACD,SAAS,EAAE,CAAC,GAAG,IAAA,qEAAiC,EAAC,KAAK,CAAC,CAAC;KACzD,CAAC,CAAC;IACH,IAAA,iCAAe,EAAC,KAAK,CAAC,CAAC;IAEvB,MAAM,OAAO,GAAG,8CAAuD,CAAC;IACxE,MAAM,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { MicroAgentica } from "@agentica/core";
|
|
2
2
|
import { AutoBeAnalyzeRole } from "@autobe/interface";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
-
import { IPointer } from "tstl";
|
|
5
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
6
5
|
import { IFile } from "./AutoBeAnalyzeFileSystem";
|
|
7
|
-
import {
|
|
6
|
+
import { AutoBEAnalyzeFileMap } from "./AutoBeAnalyzePointer";
|
|
8
7
|
export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, input: {
|
|
9
8
|
/** Total file names */
|
|
10
9
|
totalFiles: Pick<IFile, "filename" | "reason">[];
|
|
11
10
|
targetFile: string;
|
|
12
11
|
roles: AutoBeAnalyzeRole[];
|
|
13
12
|
review: string | null;
|
|
14
|
-
|
|
13
|
+
setDocument: (v: AutoBEAnalyzeFileMap) => void;
|
|
14
|
+
}) => MicroAgentica<Model>;
|
|
@@ -53,16 +53,11 @@ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
|
53
53
|
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
54
54
|
const AutoBeAnalyzeFileSystem_1 = require("./AutoBeAnalyzeFileSystem");
|
|
55
55
|
const transformAnalyzeWriteHistories_1 = require("./transformAnalyzeWriteHistories");
|
|
56
|
-
const orchestrateAnalyzeWrite = (ctx, input
|
|
56
|
+
const orchestrateAnalyzeWrite = (ctx, input) => {
|
|
57
57
|
const controller = createController({
|
|
58
58
|
model: ctx.model,
|
|
59
59
|
execute: new AutoBeAnalyzeFileSystem_1.AutoBeAnalyzeFileSystem({ [input.targetFile]: "" }),
|
|
60
|
-
|
|
61
|
-
var _a;
|
|
62
|
-
(_a = pointer.value) !== null && _a !== void 0 ? _a : (pointer.value = { files: {} });
|
|
63
|
-
Object.assign(pointer.value.files, files);
|
|
64
|
-
}),
|
|
65
|
-
abort: () => (isAborted.value = true),
|
|
60
|
+
setDocument: input.setDocument,
|
|
66
61
|
});
|
|
67
62
|
const agent = new core_1.MicroAgentica({
|
|
68
63
|
controllers: [controller],
|
|
@@ -85,14 +80,9 @@ function createController(props) {
|
|
|
85
80
|
name: "Planning",
|
|
86
81
|
application,
|
|
87
82
|
execute: {
|
|
88
|
-
abort: (input) => {
|
|
89
|
-
const response = props.execute.abort(input);
|
|
90
|
-
props.abort();
|
|
91
|
-
return response;
|
|
92
|
-
},
|
|
93
83
|
createOrUpdateFiles: (input) => __awaiter(this, void 0, void 0, function* () {
|
|
94
84
|
const fileMap = yield props.execute.createOrUpdateFiles(input);
|
|
95
|
-
props.
|
|
85
|
+
props.setDocument(fileMap);
|
|
96
86
|
return fileMap;
|
|
97
87
|
}),
|
|
98
88
|
},
|
|
@@ -220,57 +210,6 @@ const claude = {
|
|
|
220
210
|
data: input
|
|
221
211
|
};
|
|
222
212
|
}; })()
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: "abort",
|
|
226
|
-
parameters: {
|
|
227
|
-
type: "object",
|
|
228
|
-
properties: {
|
|
229
|
-
reason: {
|
|
230
|
-
type: "string"
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
required: [
|
|
234
|
-
"reason"
|
|
235
|
-
],
|
|
236
|
-
additionalProperties: false,
|
|
237
|
-
$defs: {}
|
|
238
|
-
},
|
|
239
|
-
output: {
|
|
240
|
-
"const": "OK"
|
|
241
|
-
},
|
|
242
|
-
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
243
|
-
path: _path + ".reason",
|
|
244
|
-
expected: "string",
|
|
245
|
-
value: input.reason
|
|
246
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
247
|
-
if (false === __is(input)) {
|
|
248
|
-
errors = [];
|
|
249
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
250
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
251
|
-
path: _path + "",
|
|
252
|
-
expected: "__type",
|
|
253
|
-
value: input
|
|
254
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
255
|
-
path: _path + "",
|
|
256
|
-
expected: "__type",
|
|
257
|
-
value: input
|
|
258
|
-
}))(input, "$input", true);
|
|
259
|
-
const success = 0 === errors.length;
|
|
260
|
-
return success ? {
|
|
261
|
-
success,
|
|
262
|
-
data: input
|
|
263
|
-
} : {
|
|
264
|
-
success,
|
|
265
|
-
errors,
|
|
266
|
-
data: input
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
return {
|
|
270
|
-
success: true,
|
|
271
|
-
data: input
|
|
272
|
-
};
|
|
273
|
-
}; })()
|
|
274
213
|
}
|
|
275
214
|
]
|
|
276
215
|
};
|
|
@@ -397,60 +336,6 @@ const collection = {
|
|
|
397
336
|
data: input
|
|
398
337
|
};
|
|
399
338
|
}; })()
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
name: "abort",
|
|
403
|
-
parameters: {
|
|
404
|
-
type: "object",
|
|
405
|
-
properties: {
|
|
406
|
-
reason: {
|
|
407
|
-
type: "string"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
required: [
|
|
411
|
-
"reason"
|
|
412
|
-
],
|
|
413
|
-
additionalProperties: false,
|
|
414
|
-
$defs: {}
|
|
415
|
-
},
|
|
416
|
-
output: {
|
|
417
|
-
type: "string",
|
|
418
|
-
"enum": [
|
|
419
|
-
"OK"
|
|
420
|
-
]
|
|
421
|
-
},
|
|
422
|
-
validate: (() => { const _io0 = input => "string" === typeof input.reason; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
423
|
-
path: _path + ".reason",
|
|
424
|
-
expected: "string",
|
|
425
|
-
value: input.reason
|
|
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
339
|
}
|
|
455
340
|
]
|
|
456
341
|
},
|