intention-coding 0.3.3 → 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/README.md +1 -1
- package/dist/index.cjs +6458 -0
- package/dist/index.d.ts +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/services/bug-fix-agent/index.d.ts +10 -24
- package/dist/services/change-summarizer/index.d.ts +10 -24
- package/dist/services/code-generator/index.d.ts +33 -94
- package/dist/services/code-generator/stages/execution-stage.d.ts +95 -0
- package/dist/services/code-generator/stages/ideation-stage.d.ts +33 -0
- package/dist/services/code-generator/stages/optimization-stage.d.ts +46 -0
- package/dist/services/code-generator/stages/planning-stage.d.ts +33 -0
- package/dist/services/code-generator/stages/research-stage.d.ts +35 -0
- package/dist/services/code-generator/stages/review-stage.d.ts +33 -0
- package/dist/services/code-generator/types.d.ts +232 -0
- package/dist/services/code-generator/utils/instruction-executor.d.ts +69 -0
- package/dist/services/code-generator/workflow-manager.d.ts +46 -0
- package/dist/services/image-analysis/analyzer.d.ts +62 -0
- package/dist/services/image-analysis/index.d.ts +54 -27
- package/dist/services/image-analysis/types.d.ts +175 -143
- package/dist/services/image-converter/converter.d.ts +20 -65
- package/dist/services/image-converter/index.d.ts +36 -118
- package/dist/services/image-converter/types.d.ts +61 -0
- package/dist/services/integrated-generator/index.d.ts +28 -66
- package/dist/services/pdf2md/index.d.ts +4 -48
- package/dist/services/project-template/index.d.ts +2 -18
- package/dist/services/requirement-analyzer/core/document-generator.d.ts +36 -0
- package/dist/services/requirement-analyzer/core/intelligent-analyzer.d.ts +35 -0
- package/dist/services/requirement-analyzer/core/project-analyzer.d.ts +36 -0
- package/dist/services/requirement-analyzer/core/requirement-analyzer-service.d.ts +30 -0
- package/dist/services/requirement-analyzer/core/template-selector.d.ts +35 -0
- package/dist/services/requirement-analyzer/core/types.d.ts +83 -0
- package/dist/services/requirement-analyzer/index.d.ts +44 -260
- package/dist/services/requirement-analyzer/prompt/intelligent-requirement-analysis.d.ts +1 -0
- package/dist/services/requirement-analyzer/utils/file-reader.d.ts +8 -0
- package/dist/services/world2md/index.d.ts +14 -50
- package/dist/types/index.d.ts +8 -0
- package/dist/{config.d.ts → utils/config.d.ts} +1 -0
- package/package.json +48 -28
- package/dist/cli/analyze-image.d.ts +0 -2
- package/dist/index.js +0 -12720
- package/dist/services/api-test/add-tasks-to-plan.d.ts +0 -97
- package/dist/services/api-test/api-test.d.ts +0 -86
- package/dist/services/api-test/batch-update-task-summaries.d.ts +0 -61
- package/dist/services/api-test/execute-test-plan.d.ts +0 -21
- package/dist/services/api-test/export-test-results.d.ts +0 -21
- package/dist/services/api-test/get-test-plans.d.ts +0 -21
- package/dist/services/api-test/index.d.ts +0 -285
- package/dist/services/api-test/test-plan.d.ts +0 -119
- package/dist/services/api-test/update-task.d.ts +0 -147
- package/dist/services/claude-code/index.d.ts +0 -200
- package/dist/services/code-generator/database-manager.d.ts +0 -65
- package/dist/services/code-generator/enhanced-tools.d.ts +0 -392
- package/dist/services/code-generator/export-excel.d.ts +0 -21
- package/dist/services/code-generator/task-queue.d.ts +0 -114
- package/dist/services/image-analysis/config.d.ts +0 -14
- package/dist/services/image-analysis/factory.d.ts +0 -33
- package/dist/services/image-analysis/image-analysis.d.ts +0 -36
- package/dist/services/image-analysis/image-encoder.d.ts +0 -20
- package/dist/services/image-analysis/image-validator.d.ts +0 -30
- package/dist/services/image-analysis/tools.d.ts +0 -55
- package/dist/services/index.d.ts +0 -0
- package/dist/services/requirement-analyzer/prompt/enhanced-feature-extraction.d.ts +0 -1
- package/dist/services/requirement-analyzer/prompt/fallback-document.d.ts +0 -1
- package/dist/services/requirement-analyzer/prompt/feature-dependency-analysis.d.ts +0 -1
- package/dist/services/requirement-analyzer/prompt/feature-extraction.d.ts +0 -2
- package/dist/utils/requirements-utils.d.ts +0 -38
- package/dist/utils/storage.d.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -3,18 +3,11 @@ export declare const BugFixAgentParams: z.ZodObject<{
|
|
|
3
3
|
bug_description: z.ZodString;
|
|
4
4
|
project_path: z.ZodOptional<z.ZodString>;
|
|
5
5
|
project_name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
6
|
-
output_format: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
project_path?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
bug_description: string;
|
|
14
|
-
project_name?: string | undefined;
|
|
15
|
-
project_path?: string | undefined;
|
|
16
|
-
output_format?: "json" | "markdown" | undefined;
|
|
17
|
-
}>;
|
|
6
|
+
output_format: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
json: "json";
|
|
8
|
+
markdown: "markdown";
|
|
9
|
+
}>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
18
11
|
export interface BugFixAgentParams {
|
|
19
12
|
bug_description: string;
|
|
20
13
|
project_path?: string;
|
|
@@ -28,17 +21,10 @@ export declare const bugFixAgentTool: {
|
|
|
28
21
|
bug_description: z.ZodString;
|
|
29
22
|
project_path: z.ZodOptional<z.ZodString>;
|
|
30
23
|
project_name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
31
|
-
output_format: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
project_path?: string | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
bug_description: string;
|
|
39
|
-
project_name?: string | undefined;
|
|
40
|
-
project_path?: string | undefined;
|
|
41
|
-
output_format?: "json" | "markdown" | undefined;
|
|
42
|
-
}>;
|
|
24
|
+
output_format: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
json: "json";
|
|
26
|
+
markdown: "markdown";
|
|
27
|
+
}>>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
43
29
|
execute: (args: BugFixAgentParams) => Promise<string>;
|
|
44
30
|
};
|
|
@@ -3,18 +3,11 @@ export declare const ChangeSummarizerParams: z.ZodObject<{
|
|
|
3
3
|
baseBranch: z.ZodDefault<z.ZodString>;
|
|
4
4
|
requirementFile: z.ZodOptional<z.ZodString>;
|
|
5
5
|
includeUncommitted: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
-
outputFormat: z.ZodDefault<z.ZodEnum<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
requirementFile?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
baseBranch?: string | undefined;
|
|
14
|
-
requirementFile?: string | undefined;
|
|
15
|
-
includeUncommitted?: boolean | undefined;
|
|
16
|
-
outputFormat?: "json" | "markdown" | undefined;
|
|
17
|
-
}>;
|
|
6
|
+
outputFormat: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
json: "json";
|
|
8
|
+
markdown: "markdown";
|
|
9
|
+
}>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
18
11
|
export type ChangeSummarizerArgs = z.infer<typeof ChangeSummarizerParams>;
|
|
19
12
|
export declare const changeSummarizer: {
|
|
20
13
|
name: string;
|
|
@@ -23,17 +16,10 @@ export declare const changeSummarizer: {
|
|
|
23
16
|
baseBranch: z.ZodDefault<z.ZodString>;
|
|
24
17
|
requirementFile: z.ZodOptional<z.ZodString>;
|
|
25
18
|
includeUncommitted: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
-
outputFormat: z.ZodDefault<z.ZodEnum<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
requirementFile?: string | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
baseBranch?: string | undefined;
|
|
34
|
-
requirementFile?: string | undefined;
|
|
35
|
-
includeUncommitted?: boolean | undefined;
|
|
36
|
-
outputFormat?: "json" | "markdown" | undefined;
|
|
37
|
-
}>;
|
|
19
|
+
outputFormat: z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
json: "json";
|
|
21
|
+
markdown: "markdown";
|
|
22
|
+
}>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
38
24
|
execute: (args: ChangeSummarizerArgs) => Promise<string>;
|
|
39
25
|
};
|
|
@@ -1,102 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 六步工作流程代码生成工具
|
|
3
|
+
* 按照 workflow.md 中定义的流程指导用户完成代码开发
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
declare const CodeGeneratorParamsSchema: z.ZodObject<{
|
|
4
7
|
task_description: z.ZodString;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
project_name?: string | undefined;
|
|
21
|
-
framework?: string | undefined;
|
|
22
|
-
programming_language?: string | undefined;
|
|
23
|
-
user_story?: string | undefined;
|
|
24
|
-
acceptance_criteria?: string[] | undefined;
|
|
25
|
-
technical_requirements?: string | undefined;
|
|
26
|
-
test_requirements?: string | undefined;
|
|
27
|
-
custom_context?: string | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
task_title: string;
|
|
30
|
-
task_description: string;
|
|
31
|
-
project_name?: string | undefined;
|
|
32
|
-
priority?: "medium" | "low" | "high" | "critical" | undefined;
|
|
33
|
-
framework?: string | undefined;
|
|
34
|
-
programming_language?: string | undefined;
|
|
35
|
-
feature_type?: "new_feature" | "bug_fix" | "refactor" | "enhancement" | undefined;
|
|
36
|
-
user_story?: string | undefined;
|
|
37
|
-
acceptance_criteria?: string[] | undefined;
|
|
38
|
-
technical_requirements?: string | undefined;
|
|
39
|
-
test_requirements?: string | undefined;
|
|
40
|
-
custom_context?: string | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
export interface CodeGeneratorParams {
|
|
43
|
-
task_title: string;
|
|
44
|
-
task_description: string;
|
|
45
|
-
project_name?: string;
|
|
46
|
-
programming_language?: string;
|
|
47
|
-
framework?: string;
|
|
48
|
-
feature_type?: 'new_feature' | 'bug_fix' | 'refactor' | 'enhancement';
|
|
49
|
-
priority?: 'low' | 'medium' | 'high' | 'critical';
|
|
50
|
-
user_story?: string;
|
|
51
|
-
acceptance_criteria?: string[];
|
|
52
|
-
technical_requirements?: string;
|
|
53
|
-
test_requirements?: string;
|
|
54
|
-
custom_context?: string;
|
|
55
|
-
}
|
|
8
|
+
current_stage: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
research: "research";
|
|
10
|
+
ideation: "ideation";
|
|
11
|
+
planning: "planning";
|
|
12
|
+
execution: "execution";
|
|
13
|
+
optimization: "optimization";
|
|
14
|
+
review: "review";
|
|
15
|
+
}>>>;
|
|
16
|
+
user_input: z.ZodOptional<z.ZodAny>;
|
|
17
|
+
project_path: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type CodeGeneratorParams = z.infer<typeof CodeGeneratorParamsSchema>;
|
|
20
|
+
/**
|
|
21
|
+
* 编程智能体
|
|
22
|
+
*/
|
|
56
23
|
export declare const codeGeneratorTool: {
|
|
57
24
|
name: string;
|
|
58
25
|
description: string;
|
|
59
26
|
parameters: z.ZodObject<{
|
|
60
|
-
task_title: z.ZodString;
|
|
61
27
|
task_description: z.ZodString;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
priority: "medium" | "low" | "high" | "critical";
|
|
74
|
-
task_title: string;
|
|
75
|
-
task_description: string;
|
|
76
|
-
feature_type: "new_feature" | "bug_fix" | "refactor" | "enhancement";
|
|
77
|
-
project_name?: string | undefined;
|
|
78
|
-
framework?: string | undefined;
|
|
79
|
-
programming_language?: string | undefined;
|
|
80
|
-
user_story?: string | undefined;
|
|
81
|
-
acceptance_criteria?: string[] | undefined;
|
|
82
|
-
technical_requirements?: string | undefined;
|
|
83
|
-
test_requirements?: string | undefined;
|
|
84
|
-
custom_context?: string | undefined;
|
|
85
|
-
}, {
|
|
86
|
-
task_title: string;
|
|
87
|
-
task_description: string;
|
|
88
|
-
project_name?: string | undefined;
|
|
89
|
-
priority?: "medium" | "low" | "high" | "critical" | undefined;
|
|
90
|
-
framework?: string | undefined;
|
|
91
|
-
programming_language?: string | undefined;
|
|
92
|
-
feature_type?: "new_feature" | "bug_fix" | "refactor" | "enhancement" | undefined;
|
|
93
|
-
user_story?: string | undefined;
|
|
94
|
-
acceptance_criteria?: string[] | undefined;
|
|
95
|
-
technical_requirements?: string | undefined;
|
|
96
|
-
test_requirements?: string | undefined;
|
|
97
|
-
custom_context?: string | undefined;
|
|
98
|
-
}>;
|
|
28
|
+
current_stage: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
research: "research";
|
|
30
|
+
ideation: "ideation";
|
|
31
|
+
planning: "planning";
|
|
32
|
+
execution: "execution";
|
|
33
|
+
optimization: "optimization";
|
|
34
|
+
review: "review";
|
|
35
|
+
}>>>;
|
|
36
|
+
user_input: z.ZodOptional<z.ZodAny>;
|
|
37
|
+
project_path: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
99
39
|
execute: (args: CodeGeneratorParams) => Promise<string>;
|
|
100
40
|
};
|
|
101
|
-
export {
|
|
102
|
-
export { exportCodeSessionTool } from './export-excel';
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* 执行阶段处理器
|
|
4
|
+
* 职责:根据批准的计划实施代码开发
|
|
5
|
+
*/
|
|
6
|
+
export declare class ExecutionStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行实施阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, _input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 获取执行计划
|
|
13
|
+
*/
|
|
14
|
+
private getExecutionPlan;
|
|
15
|
+
/**
|
|
16
|
+
* 生成执行指令
|
|
17
|
+
*/
|
|
18
|
+
private generateExecutionInstructions;
|
|
19
|
+
/**
|
|
20
|
+
* 创建计划文档保存指令
|
|
21
|
+
*/
|
|
22
|
+
private createPlanDocumentInstruction;
|
|
23
|
+
/**
|
|
24
|
+
* 为单个步骤生成执行指令
|
|
25
|
+
*/
|
|
26
|
+
private generateStepInstructions;
|
|
27
|
+
/**
|
|
28
|
+
* 生成文件创建指令
|
|
29
|
+
*/
|
|
30
|
+
private generateFileCreationInstructions;
|
|
31
|
+
/**
|
|
32
|
+
* 生成文件修改指令
|
|
33
|
+
*/
|
|
34
|
+
private generateFileModificationInstructions;
|
|
35
|
+
/**
|
|
36
|
+
* 生成函数实现指令
|
|
37
|
+
*/
|
|
38
|
+
private generateFunctionImplementationInstructions;
|
|
39
|
+
/**
|
|
40
|
+
* 生成类实现指令
|
|
41
|
+
*/
|
|
42
|
+
private generateClassImplementationInstructions;
|
|
43
|
+
/**
|
|
44
|
+
* 生成测试创建指令
|
|
45
|
+
*/
|
|
46
|
+
private generateTestCreationInstructions;
|
|
47
|
+
/**
|
|
48
|
+
* 生成配置指令
|
|
49
|
+
*/
|
|
50
|
+
private generateConfigurationInstructions;
|
|
51
|
+
/**
|
|
52
|
+
* 生成响应 - MCP 架构版本
|
|
53
|
+
*/
|
|
54
|
+
private generateResponse;
|
|
55
|
+
/**
|
|
56
|
+
* 生成默认文件内容
|
|
57
|
+
*/
|
|
58
|
+
private generateDefaultFileContent;
|
|
59
|
+
/**
|
|
60
|
+
* 生成函数内容
|
|
61
|
+
*/
|
|
62
|
+
private generateFunctionContent;
|
|
63
|
+
/**
|
|
64
|
+
* 生成类内容
|
|
65
|
+
*/
|
|
66
|
+
private generateClassContent;
|
|
67
|
+
/**
|
|
68
|
+
* 生成测试内容
|
|
69
|
+
*/
|
|
70
|
+
private generateTestContent;
|
|
71
|
+
/**
|
|
72
|
+
* 获取配置文件类型
|
|
73
|
+
*/
|
|
74
|
+
private getConfigType;
|
|
75
|
+
/**
|
|
76
|
+
* 提取配置变更
|
|
77
|
+
*/
|
|
78
|
+
private extractConfigChanges;
|
|
79
|
+
/**
|
|
80
|
+
* 格式化执行消息
|
|
81
|
+
*/
|
|
82
|
+
private formatExecutionMessage;
|
|
83
|
+
/**
|
|
84
|
+
* 按类型格式化指令
|
|
85
|
+
*/
|
|
86
|
+
private formatInstructionsByType;
|
|
87
|
+
/**
|
|
88
|
+
* 生成计划文档
|
|
89
|
+
*/
|
|
90
|
+
private generatePlanDocument;
|
|
91
|
+
/**
|
|
92
|
+
* 清理文件名
|
|
93
|
+
*/
|
|
94
|
+
private sanitizeFileName;
|
|
95
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 构思阶段处理器
|
|
4
|
+
* 职责:生成多个可行的解决方案并进行评估
|
|
5
|
+
*/
|
|
6
|
+
export declare class IdeationStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行构思阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, _input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 生成解决方案
|
|
13
|
+
*/
|
|
14
|
+
private generateSolutions;
|
|
15
|
+
/**
|
|
16
|
+
* 评估解决方案
|
|
17
|
+
*/
|
|
18
|
+
private evaluateSolutions;
|
|
19
|
+
/**
|
|
20
|
+
* 生成响应
|
|
21
|
+
*/
|
|
22
|
+
private generateResponse;
|
|
23
|
+
/**
|
|
24
|
+
* 格式化方案消息
|
|
25
|
+
*/
|
|
26
|
+
private formatSolutionsMessage;
|
|
27
|
+
/**
|
|
28
|
+
* 获取默认方案
|
|
29
|
+
*/
|
|
30
|
+
private getDefaultSolutions;
|
|
31
|
+
private getComplexityLabel;
|
|
32
|
+
private getRiskLabel;
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 优化阶段处理器
|
|
4
|
+
* 职责:自动检查并分析已实现的代码,提出优化建议
|
|
5
|
+
*/
|
|
6
|
+
export declare class OptimizationStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行优化阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, _input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 获取执行结果
|
|
13
|
+
*/
|
|
14
|
+
private getExecutionResults;
|
|
15
|
+
/**
|
|
16
|
+
* 分析代码并生成优化建议
|
|
17
|
+
*/
|
|
18
|
+
private analyzeCodeAndGenerateSuggestions;
|
|
19
|
+
/**
|
|
20
|
+
* 生成响应
|
|
21
|
+
*/
|
|
22
|
+
private generateResponse;
|
|
23
|
+
/**
|
|
24
|
+
* 格式化无优化建议消息
|
|
25
|
+
*/
|
|
26
|
+
private formatNoOptimizationMessage;
|
|
27
|
+
/**
|
|
28
|
+
* 格式化优化建议消息
|
|
29
|
+
*/
|
|
30
|
+
private formatOptimizationMessage;
|
|
31
|
+
/**
|
|
32
|
+
* 获取默认优化建议
|
|
33
|
+
*/
|
|
34
|
+
private getDefaultOptimizationSuggestions;
|
|
35
|
+
private getTypeLabel;
|
|
36
|
+
private getImpactLabel;
|
|
37
|
+
private getEffortLabel;
|
|
38
|
+
/**
|
|
39
|
+
* 生成优化执行指令
|
|
40
|
+
*/
|
|
41
|
+
private generateOptimizationInstructions;
|
|
42
|
+
/**
|
|
43
|
+
* 从代码中提取文件路径(简化实现)
|
|
44
|
+
*/
|
|
45
|
+
private extractFilePathFromCode;
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 计划阶段处理器
|
|
4
|
+
* 职责:将选定方案细化为详尽、有序、可执行的步骤清单
|
|
5
|
+
*/
|
|
6
|
+
export declare class PlanningStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行计划阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 获取选定的方案
|
|
13
|
+
*/
|
|
14
|
+
private getSelectedSolution;
|
|
15
|
+
/**
|
|
16
|
+
* 生成执行计划
|
|
17
|
+
*/
|
|
18
|
+
private generateExecutionPlan;
|
|
19
|
+
/**
|
|
20
|
+
* 生成响应
|
|
21
|
+
*/
|
|
22
|
+
private generateResponse;
|
|
23
|
+
/**
|
|
24
|
+
* 格式化计划消息
|
|
25
|
+
*/
|
|
26
|
+
private formatPlanMessage;
|
|
27
|
+
/**
|
|
28
|
+
* 获取默认执行计划
|
|
29
|
+
*/
|
|
30
|
+
private getDefaultExecutionPlan;
|
|
31
|
+
private getStepTypeLabel;
|
|
32
|
+
private getOperationLabel;
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 研究阶段处理器
|
|
4
|
+
* 职责:理解需求并评估完整性,收集项目上下文
|
|
5
|
+
*/
|
|
6
|
+
export declare class ResearchStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行研究阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, _input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 分析项目信息
|
|
13
|
+
*/
|
|
14
|
+
private analyzeProject;
|
|
15
|
+
/**
|
|
16
|
+
* 解析项目信息
|
|
17
|
+
*/
|
|
18
|
+
private parseProjectInfo;
|
|
19
|
+
/**
|
|
20
|
+
* 分析需求完整性
|
|
21
|
+
*/
|
|
22
|
+
private analyzeRequirements;
|
|
23
|
+
/**
|
|
24
|
+
* 生成响应
|
|
25
|
+
*/
|
|
26
|
+
private generateResponse;
|
|
27
|
+
/**
|
|
28
|
+
* 格式化需要澄清的消息
|
|
29
|
+
*/
|
|
30
|
+
private formatClarificationMessage;
|
|
31
|
+
/**
|
|
32
|
+
* 格式化成功消息
|
|
33
|
+
*/
|
|
34
|
+
private formatSuccessMessage;
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WorkflowTask, WorkflowResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 评审阶段处理器
|
|
4
|
+
* 职责:对照计划评估执行结果,报告问题与建议
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReviewStage {
|
|
7
|
+
/**
|
|
8
|
+
* 执行评审阶段
|
|
9
|
+
*/
|
|
10
|
+
execute(task: WorkflowTask, _input?: any): Promise<WorkflowResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* 收集所有阶段的结果
|
|
13
|
+
*/
|
|
14
|
+
private collectStageResults;
|
|
15
|
+
/**
|
|
16
|
+
* 执行综合评审
|
|
17
|
+
*/
|
|
18
|
+
private performComprehensiveReview;
|
|
19
|
+
/**
|
|
20
|
+
* 生成最终响应
|
|
21
|
+
*/
|
|
22
|
+
private generateFinalResponse;
|
|
23
|
+
/**
|
|
24
|
+
* 格式化评审消息
|
|
25
|
+
*/
|
|
26
|
+
private formatReviewMessage;
|
|
27
|
+
/**
|
|
28
|
+
* 获取默认评审结果
|
|
29
|
+
*/
|
|
30
|
+
private getDefaultReviewResult;
|
|
31
|
+
private getGradeLabel;
|
|
32
|
+
private getScoreEmoji;
|
|
33
|
+
}
|