@blocklet/pages-kit-agents 0.6.18 → 0.6.20
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/cjs/agents/multi-agent-page-writer.js +1 -1
- package/lib/cjs/agents/page-structure-planner.d.ts +6 -38
- package/lib/cjs/agents/page-structure-planner.js +2 -2
- package/lib/cjs/agents/router-datacache-generator.d.ts +1 -1
- package/lib/cjs/agents/template-designer.js +1 -1
- package/lib/cjs/agents/template-generator.d.ts +2 -21
- package/lib/cjs/agents/template-generator.js +4 -2
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/agent-utils.d.ts +1 -1
- package/lib/cjs/utils/agent-utils.js +2 -2
- package/lib/esm/agents/multi-agent-page-writer.js +1 -1
- package/lib/esm/agents/page-structure-planner.d.ts +6 -38
- package/lib/esm/agents/page-structure-planner.js +2 -2
- package/lib/esm/agents/router-datacache-generator.d.ts +1 -1
- package/lib/esm/agents/template-designer.js +1 -1
- package/lib/esm/agents/template-generator.d.ts +2 -21
- package/lib/esm/agents/template-generator.js +5 -3
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/agent-utils.d.ts +1 -1
- package/lib/esm/utils/agent-utils.js +1 -1
- package/lib/types/agents/page-structure-planner.d.ts +6 -38
- package/lib/types/agents/router-datacache-generator.d.ts +1 -1
- package/lib/types/agents/template-generator.d.ts +2 -21
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/agent-utils.d.ts +1 -1
- package/package.json +7 -5
|
@@ -64,7 +64,7 @@ async function generatePageContentMultiAgent(input) {
|
|
|
64
64
|
sectionName,
|
|
65
65
|
sectionContentPlan,
|
|
66
66
|
})),
|
|
67
|
-
|
|
67
|
+
outputSchemaText: JSON.stringify(outputSchemaJson),
|
|
68
68
|
expectedSections: JSON.stringify(sectionNames),
|
|
69
69
|
});
|
|
70
70
|
const { structurePlan } = structurePlanResult;
|
|
@@ -5,19 +5,19 @@ export declare const plannerParamsSchema: z.ZodObject<{
|
|
|
5
5
|
context: z.ZodString;
|
|
6
6
|
question: z.ZodString;
|
|
7
7
|
locale: z.ZodString;
|
|
8
|
-
|
|
8
|
+
outputSchemaText: z.ZodString;
|
|
9
9
|
expectedSections: z.ZodString;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
outputSchema: string;
|
|
12
11
|
context: string;
|
|
13
12
|
question: string;
|
|
14
13
|
locale: string;
|
|
14
|
+
outputSchemaText: string;
|
|
15
15
|
expectedSections: string;
|
|
16
16
|
}, {
|
|
17
|
-
outputSchema: string;
|
|
18
17
|
context: string;
|
|
19
18
|
question: string;
|
|
20
19
|
locale: string;
|
|
20
|
+
outputSchemaText: string;
|
|
21
21
|
expectedSections: string;
|
|
22
22
|
}>;
|
|
23
23
|
export interface PageStructurePlannerOutput {
|
|
@@ -26,44 +26,12 @@ export interface PageStructurePlannerOutput {
|
|
|
26
26
|
sectionContentPlan: string;
|
|
27
27
|
}>;
|
|
28
28
|
}
|
|
29
|
-
export declare const pageStructurePlannerWithReflection: ReflectionAgent<
|
|
30
|
-
outputSchema: string;
|
|
31
|
-
context: string;
|
|
32
|
-
question: string;
|
|
33
|
-
locale: string;
|
|
34
|
-
expectedSections: string;
|
|
35
|
-
validationFeedback?: {
|
|
36
|
-
isValid: boolean;
|
|
37
|
-
missingSections: string[];
|
|
38
|
-
duplicateContent: {
|
|
39
|
-
description: string;
|
|
40
|
-
sections: string[];
|
|
41
|
-
score: number;
|
|
42
|
-
suggestion: string;
|
|
43
|
-
}[];
|
|
44
|
-
} | undefined;
|
|
45
|
-
structurePlan?: {
|
|
46
|
-
sectionName: string;
|
|
47
|
-
sectionContentPlan: string;
|
|
48
|
-
}[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
isApproved: boolean;
|
|
51
|
-
validationFeedback: {
|
|
52
|
-
isValid: boolean;
|
|
53
|
-
missingSections: string[];
|
|
54
|
-
duplicateContent: {
|
|
55
|
-
description: string;
|
|
56
|
-
sections: string[];
|
|
57
|
-
score: number;
|
|
58
|
-
suggestion: string;
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
61
|
-
}>;
|
|
29
|
+
export declare const pageStructurePlannerWithReflection: ReflectionAgent<import("@aigne/core").Message, import("@aigne/core").Message>;
|
|
62
30
|
export declare const pageStructurePlannerAgent: AIAgent<{
|
|
63
|
-
outputSchema: string;
|
|
64
31
|
context: string;
|
|
65
32
|
question: string;
|
|
66
33
|
locale: string;
|
|
34
|
+
outputSchemaText: string;
|
|
67
35
|
expectedSections: string;
|
|
68
36
|
validationFeedback?: {
|
|
69
37
|
isValid: boolean;
|
|
@@ -80,10 +48,10 @@ export declare const pageStructurePlannerAgent: AIAgent<{
|
|
|
80
48
|
sectionContentPlan: string;
|
|
81
49
|
}[] | undefined;
|
|
82
50
|
}, {
|
|
83
|
-
outputSchema: string;
|
|
84
51
|
context: string;
|
|
85
52
|
question: string;
|
|
86
53
|
locale: string;
|
|
54
|
+
outputSchemaText: string;
|
|
87
55
|
expectedSections: string;
|
|
88
56
|
structurePlan: {
|
|
89
57
|
sectionName: string;
|
|
@@ -12,7 +12,7 @@ exports.plannerParamsSchema = zod_1.z.object({
|
|
|
12
12
|
context: zod_1.z.string(),
|
|
13
13
|
question: zod_1.z.string(),
|
|
14
14
|
locale: zod_1.z.string(),
|
|
15
|
-
|
|
15
|
+
outputSchemaText: zod_1.z.string(),
|
|
16
16
|
expectedSections: zod_1.z.string(),
|
|
17
17
|
});
|
|
18
18
|
const validationFeedbackSchema = zod_1.z.object({
|
|
@@ -41,7 +41,7 @@ const contextRule = `
|
|
|
41
41
|
|
|
42
42
|
输出结构模式:
|
|
43
43
|
<output-schema>
|
|
44
|
-
{{
|
|
44
|
+
{{outputSchemaText}}
|
|
45
45
|
</output-schema>
|
|
46
46
|
|
|
47
47
|
预期包含的Sections:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.designerAgent = void 0;
|
|
4
|
-
// import { DefaultMemory } from '@aigne/
|
|
4
|
+
// import { DefaultMemory } from '@aigne/default-memory';
|
|
5
5
|
const core_1 = require("@aigne/core");
|
|
6
6
|
// import assert from 'node:assert';
|
|
7
7
|
const zod_1 = require("zod");
|
|
@@ -39,28 +39,9 @@ export declare const generatorParamsSchema: z.ZodObject<{
|
|
|
39
39
|
component: string;
|
|
40
40
|
}[];
|
|
41
41
|
}>;
|
|
42
|
-
export declare const generatorAgentWithReflection: ReflectionAgent<
|
|
43
|
-
ascii: string;
|
|
44
|
-
collectResult: string;
|
|
45
|
-
filteredComponentList: {
|
|
46
|
-
name: string;
|
|
47
|
-
description: string;
|
|
48
|
-
id: string;
|
|
49
|
-
component: string;
|
|
50
|
-
}[];
|
|
51
|
-
}, {
|
|
52
|
-
isApproved: boolean;
|
|
53
|
-
feedback: {
|
|
54
|
-
description: string;
|
|
55
|
-
line: number;
|
|
56
|
-
column: number;
|
|
57
|
-
keyword: string;
|
|
58
|
-
rule: string;
|
|
59
|
-
isRequired: boolean;
|
|
60
|
-
}[];
|
|
61
|
-
}>;
|
|
42
|
+
export declare const generatorAgentWithReflection: ReflectionAgent<import("@aigne/core").Message, import("@aigne/core").Message>;
|
|
62
43
|
export declare const saveTemplateYamlAgent: FunctionAgent<{
|
|
63
44
|
templateYaml: string;
|
|
64
45
|
}, {
|
|
65
46
|
$message: string;
|
|
66
|
-
}
|
|
47
|
+
}>;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.saveTemplateYamlAgent = exports.generatorAgentWithReflection = exports.generatorParamsSchema = void 0;
|
|
7
|
-
// import { DefaultMemory } from '@aigne/
|
|
7
|
+
// import { DefaultMemory } from '@aigne/default-memory';
|
|
8
8
|
const core_1 = require("@aigne/core");
|
|
9
9
|
// import assert from 'node:assert';
|
|
10
10
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
@@ -191,6 +191,8 @@ exports.saveTemplateYamlAgent = core_1.FunctionAgent.from({
|
|
|
191
191
|
const filePath = node_path_1.default.join(__dirname, `../test-templates/template-${templateName}.yaml`);
|
|
192
192
|
// 把 yaml 结构保存到文件
|
|
193
193
|
node_fs_1.default.writeFileSync(filePath, templateYaml);
|
|
194
|
-
return
|
|
194
|
+
return {
|
|
195
|
+
$message: `Yaml 结构已保存到 ${filePath}`,
|
|
196
|
+
};
|
|
195
197
|
},
|
|
196
198
|
});
|