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
|
@@ -1,272 +1,56 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { RequirementAnalysisError } from "./core/types";
|
|
3
|
+
declare const RequirementAnalyzerParamsSchema: z.ZodObject<{
|
|
4
|
+
input_type: z.ZodEnum<{
|
|
5
|
+
text: "text";
|
|
6
|
+
md_file: "md_file";
|
|
7
|
+
}>;
|
|
4
8
|
content: z.ZodOptional<z.ZodString>;
|
|
5
9
|
md_file_path: z.ZodOptional<z.ZodString>;
|
|
6
10
|
feature_name: z.ZodString;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
auto_trigger: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
21
|
-
enable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
22
|
-
programming_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
framework: z.ZodOptional<z.ZodString>;
|
|
24
|
-
architecture_pattern: z.ZodOptional<z.ZodEnum<["microservices", "monolithic", "layered", "event-driven"]>>;
|
|
25
|
-
generation_type: z.ZodDefault<z.ZodEnum<["full_project", "module_only", "feature_only"]>>;
|
|
26
|
-
include_tests: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
programming_language: string;
|
|
29
|
-
enable: boolean;
|
|
30
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
31
|
-
include_tests: boolean;
|
|
32
|
-
framework?: string | undefined;
|
|
33
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
framework?: string | undefined;
|
|
36
|
-
programming_language?: string | undefined;
|
|
37
|
-
enable?: boolean | undefined;
|
|
38
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
39
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
40
|
-
include_tests?: boolean | undefined;
|
|
41
|
-
}>>>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
options: {
|
|
44
|
-
chunk_size: number;
|
|
45
|
-
use_streaming: boolean;
|
|
46
|
-
custom_prompt?: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
input_type: "text" | "md_file";
|
|
49
|
-
feature_name: string;
|
|
50
|
-
auto_trigger: {
|
|
51
|
-
programming_language: string;
|
|
52
|
-
enable: boolean;
|
|
53
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
54
|
-
include_tests: boolean;
|
|
55
|
-
framework?: string | undefined;
|
|
56
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
57
|
-
};
|
|
58
|
-
content?: string | undefined;
|
|
59
|
-
md_file_path?: string | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
input_type: "text" | "md_file";
|
|
62
|
-
feature_name: string;
|
|
63
|
-
options?: {
|
|
64
|
-
chunk_size?: number | undefined;
|
|
65
|
-
custom_prompt?: string | undefined;
|
|
66
|
-
use_streaming?: boolean | undefined;
|
|
67
|
-
} | undefined;
|
|
68
|
-
content?: string | undefined;
|
|
69
|
-
md_file_path?: string | undefined;
|
|
70
|
-
auto_trigger?: {
|
|
71
|
-
framework?: string | undefined;
|
|
72
|
-
programming_language?: string | undefined;
|
|
73
|
-
enable?: boolean | undefined;
|
|
74
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
75
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
76
|
-
include_tests?: boolean | undefined;
|
|
77
|
-
} | undefined;
|
|
78
|
-
}>, {
|
|
79
|
-
options: {
|
|
80
|
-
chunk_size: number;
|
|
81
|
-
use_streaming: boolean;
|
|
82
|
-
custom_prompt?: string | undefined;
|
|
83
|
-
};
|
|
84
|
-
input_type: "text" | "md_file";
|
|
85
|
-
feature_name: string;
|
|
86
|
-
auto_trigger: {
|
|
87
|
-
programming_language: string;
|
|
88
|
-
enable: boolean;
|
|
89
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
90
|
-
include_tests: boolean;
|
|
91
|
-
framework?: string | undefined;
|
|
92
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
93
|
-
};
|
|
94
|
-
content?: string | undefined;
|
|
95
|
-
md_file_path?: string | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
input_type: "text" | "md_file";
|
|
98
|
-
feature_name: string;
|
|
99
|
-
options?: {
|
|
100
|
-
chunk_size?: number | undefined;
|
|
101
|
-
custom_prompt?: string | undefined;
|
|
102
|
-
use_streaming?: boolean | undefined;
|
|
103
|
-
} | undefined;
|
|
104
|
-
content?: string | undefined;
|
|
105
|
-
md_file_path?: string | undefined;
|
|
106
|
-
auto_trigger?: {
|
|
107
|
-
framework?: string | undefined;
|
|
108
|
-
programming_language?: string | undefined;
|
|
109
|
-
enable?: boolean | undefined;
|
|
110
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
111
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
112
|
-
include_tests?: boolean | undefined;
|
|
113
|
-
} | undefined;
|
|
114
|
-
}>;
|
|
115
|
-
export interface RequirementAnalyzerParams {
|
|
116
|
-
input_type: 'text' | 'md_file';
|
|
117
|
-
content?: string;
|
|
118
|
-
md_file_path?: string;
|
|
119
|
-
feature_name: string;
|
|
120
|
-
options?: {
|
|
121
|
-
custom_prompt?: string;
|
|
122
|
-
use_streaming?: boolean;
|
|
123
|
-
chunk_size?: number;
|
|
124
|
-
};
|
|
125
|
-
auto_trigger?: {
|
|
126
|
-
enable?: boolean;
|
|
127
|
-
programming_language?: string;
|
|
128
|
-
framework?: string;
|
|
129
|
-
architecture_pattern?: 'microservices' | 'monolithic' | 'layered' | 'event-driven';
|
|
130
|
-
generation_type?: 'full_project' | 'module_only' | 'feature_only';
|
|
131
|
-
include_tests?: boolean;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
11
|
+
custom_prompt: z.ZodOptional<z.ZodString>;
|
|
12
|
+
analysis_depth: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
basic: "basic";
|
|
14
|
+
detailed: "detailed";
|
|
15
|
+
comprehensive: "comprehensive";
|
|
16
|
+
}>>;
|
|
17
|
+
use_streaming: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
chunk_size: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type RequirementAnalyzerParams = z.infer<typeof RequirementAnalyzerParamsSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* 需求分析智能体工具
|
|
23
|
+
*/
|
|
134
24
|
export declare const requirementAnalyzerTool: {
|
|
135
25
|
name: string;
|
|
136
26
|
description: string;
|
|
137
|
-
parameters: z.
|
|
138
|
-
input_type: z.ZodEnum<
|
|
27
|
+
parameters: z.ZodObject<{
|
|
28
|
+
input_type: z.ZodEnum<{
|
|
29
|
+
text: "text";
|
|
30
|
+
md_file: "md_file";
|
|
31
|
+
}>;
|
|
139
32
|
content: z.ZodOptional<z.ZodString>;
|
|
140
33
|
md_file_path: z.ZodOptional<z.ZodString>;
|
|
141
34
|
feature_name: z.ZodString;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
chunk_size?: number | undefined;
|
|
152
|
-
custom_prompt?: string | undefined;
|
|
153
|
-
use_streaming?: boolean | undefined;
|
|
154
|
-
}>>>;
|
|
155
|
-
auto_trigger: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
156
|
-
enable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
157
|
-
programming_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
158
|
-
framework: z.ZodOptional<z.ZodString>;
|
|
159
|
-
architecture_pattern: z.ZodOptional<z.ZodEnum<["microservices", "monolithic", "layered", "event-driven"]>>;
|
|
160
|
-
generation_type: z.ZodDefault<z.ZodEnum<["full_project", "module_only", "feature_only"]>>;
|
|
161
|
-
include_tests: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
162
|
-
}, "strip", z.ZodTypeAny, {
|
|
163
|
-
programming_language: string;
|
|
164
|
-
enable: boolean;
|
|
165
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
166
|
-
include_tests: boolean;
|
|
167
|
-
framework?: string | undefined;
|
|
168
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
169
|
-
}, {
|
|
170
|
-
framework?: string | undefined;
|
|
171
|
-
programming_language?: string | undefined;
|
|
172
|
-
enable?: boolean | undefined;
|
|
173
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
174
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
175
|
-
include_tests?: boolean | undefined;
|
|
176
|
-
}>>>;
|
|
177
|
-
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
options: {
|
|
179
|
-
chunk_size: number;
|
|
180
|
-
use_streaming: boolean;
|
|
181
|
-
custom_prompt?: string | undefined;
|
|
182
|
-
};
|
|
183
|
-
input_type: "text" | "md_file";
|
|
184
|
-
feature_name: string;
|
|
185
|
-
auto_trigger: {
|
|
186
|
-
programming_language: string;
|
|
187
|
-
enable: boolean;
|
|
188
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
189
|
-
include_tests: boolean;
|
|
190
|
-
framework?: string | undefined;
|
|
191
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
192
|
-
};
|
|
193
|
-
content?: string | undefined;
|
|
194
|
-
md_file_path?: string | undefined;
|
|
195
|
-
}, {
|
|
196
|
-
input_type: "text" | "md_file";
|
|
197
|
-
feature_name: string;
|
|
198
|
-
options?: {
|
|
199
|
-
chunk_size?: number | undefined;
|
|
200
|
-
custom_prompt?: string | undefined;
|
|
201
|
-
use_streaming?: boolean | undefined;
|
|
202
|
-
} | undefined;
|
|
203
|
-
content?: string | undefined;
|
|
204
|
-
md_file_path?: string | undefined;
|
|
205
|
-
auto_trigger?: {
|
|
206
|
-
framework?: string | undefined;
|
|
207
|
-
programming_language?: string | undefined;
|
|
208
|
-
enable?: boolean | undefined;
|
|
209
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
210
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
211
|
-
include_tests?: boolean | undefined;
|
|
212
|
-
} | undefined;
|
|
213
|
-
}>, {
|
|
214
|
-
options: {
|
|
215
|
-
chunk_size: number;
|
|
216
|
-
use_streaming: boolean;
|
|
217
|
-
custom_prompt?: string | undefined;
|
|
218
|
-
};
|
|
219
|
-
input_type: "text" | "md_file";
|
|
220
|
-
feature_name: string;
|
|
221
|
-
auto_trigger: {
|
|
222
|
-
programming_language: string;
|
|
223
|
-
enable: boolean;
|
|
224
|
-
generation_type: "full_project" | "module_only" | "feature_only";
|
|
225
|
-
include_tests: boolean;
|
|
226
|
-
framework?: string | undefined;
|
|
227
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
228
|
-
};
|
|
229
|
-
content?: string | undefined;
|
|
230
|
-
md_file_path?: string | undefined;
|
|
231
|
-
}, {
|
|
232
|
-
input_type: "text" | "md_file";
|
|
233
|
-
feature_name: string;
|
|
234
|
-
options?: {
|
|
235
|
-
chunk_size?: number | undefined;
|
|
236
|
-
custom_prompt?: string | undefined;
|
|
237
|
-
use_streaming?: boolean | undefined;
|
|
238
|
-
} | undefined;
|
|
239
|
-
content?: string | undefined;
|
|
240
|
-
md_file_path?: string | undefined;
|
|
241
|
-
auto_trigger?: {
|
|
242
|
-
framework?: string | undefined;
|
|
243
|
-
programming_language?: string | undefined;
|
|
244
|
-
enable?: boolean | undefined;
|
|
245
|
-
architecture_pattern?: "microservices" | "monolithic" | "layered" | "event-driven" | undefined;
|
|
246
|
-
generation_type?: "full_project" | "module_only" | "feature_only" | undefined;
|
|
247
|
-
include_tests?: boolean | undefined;
|
|
248
|
-
} | undefined;
|
|
249
|
-
}>;
|
|
35
|
+
custom_prompt: z.ZodOptional<z.ZodString>;
|
|
36
|
+
analysis_depth: z.ZodDefault<z.ZodEnum<{
|
|
37
|
+
basic: "basic";
|
|
38
|
+
detailed: "detailed";
|
|
39
|
+
comprehensive: "comprehensive";
|
|
40
|
+
}>>;
|
|
41
|
+
use_streaming: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
+
chunk_size: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>;
|
|
250
44
|
execute: (args: RequirementAnalyzerParams) => Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* 格式化错误消息
|
|
47
|
+
*/
|
|
48
|
+
formatErrorMessage(error: RequirementAnalysisError): string;
|
|
49
|
+
/**
|
|
50
|
+
* 获取错误解决建议
|
|
51
|
+
*/
|
|
52
|
+
getErrorSuggestion(errorCode: string): string;
|
|
251
53
|
};
|
|
252
|
-
export
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
INVALID_INPUT = "INVALID_INPUT",
|
|
256
|
-
AI_SERVICE_ERROR = "AI_SERVICE_ERROR",
|
|
257
|
-
JSON_PARSE_ERROR = "JSON_PARSE_ERROR",
|
|
258
|
-
NETWORK_ERROR = "NETWORK_ERROR",
|
|
259
|
-
MEMORY_ERROR = "MEMORY_ERROR",
|
|
260
|
-
TIMEOUT_ERROR = "TIMEOUT_ERROR",
|
|
261
|
-
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
262
|
-
}
|
|
263
|
-
export declare function categorizeError(error: unknown): ErrorType;
|
|
264
|
-
export declare function generateUserFriendlyErrorMessage(errorType: ErrorType, originalMessage: string): string;
|
|
265
|
-
export declare function extractFeaturesWithNLP(inputContent: string): Promise<Array<{
|
|
266
|
-
featureName: string;
|
|
267
|
-
description: string;
|
|
268
|
-
priority: 'high' | 'medium' | 'low';
|
|
269
|
-
estimatedComplexity: '简单' | '中等' | '复杂';
|
|
270
|
-
type: '核心功能点' | '辅助功能点' | '扩展功能点';
|
|
271
|
-
businessValue: string;
|
|
272
|
-
}>>;
|
|
54
|
+
export { RequirementAnalyzerService } from "./core/requirement-analyzer-service";
|
|
55
|
+
export { RequirementAnalysisError, ErrorCodes } from "./core/types";
|
|
56
|
+
export type { AnalysisParams, AnalysisResult, ProjectInfo } from "./core/types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const intelligentRequirementAnalysisPrompt = "\u4F60\u662F\u4E00\u4F4D\u4E13\u4E1A\u7684\u8F6F\u4EF6\u9700\u6C42\u5206\u6790\u5E08\uFF0C\u64C5\u957F\u5FEB\u901F\u8BC6\u522B\u9700\u6C42\u7C7B\u578B\u5E76\u8FDB\u884C\u7CBE\u786E\u7684\u529F\u80FD\u70B9\u5206\u6790\u3002\n\n## \u4EFB\u52A1\u8981\u6C42\n- \u5FEB\u901F\u8BC6\u522B\u9700\u6C42\u7684\u4E3B\u8981\u7C7B\u578B\uFF08\u63A5\u53E3\u3001PC\u9875\u9762\u3001APP\u3001SDK\u96C6\u6210\u3001\u6DF7\u5408\u7C7B\u578B\uFF09\n- \u6839\u636E\u9700\u6C42\u7C7B\u578B\uFF0C\u7CBE\u786E\u63D0\u53D62-5\u4E2A\u6838\u5FC3\u529F\u80FD\u70B9\n- \u907F\u514D\u8FC7\u5EA6\u62C6\u5206\uFF0C\u786E\u4FDD\u6BCF\u4E2A\u529F\u80FD\u70B9\u90FD\u5177\u6709\u72EC\u7ACB\u7684\u4E1A\u52A1\u4EF7\u503C\n- \u63A8\u8350\u6700\u5408\u9002\u7684\u6280\u672F\u6A21\u677F\n\n## \u8F93\u5165\u5185\u5BB9\n\n{inputContent}\n\n## \u9700\u6C42\u7C7B\u578B\u8BC6\u522B\u6807\u51C6\n\n**\u63A5\u53E3\u7C7B\u578B**\uFF1A\n- \u5173\u952E\u8BCD\uFF1AAPI\u3001\u63A5\u53E3\u3001REST\u3001GraphQL\u3001\u5FAE\u670D\u52A1\u3001\u540E\u7AEF\u670D\u52A1\u3001\u6570\u636E\u63A5\u53E3\u3001\u670D\u52A1\u7AEF\n- \u7279\u5F81\uFF1A\u4E3B\u8981\u63CF\u8FF0\u6570\u636E\u4EA4\u4E92\u3001\u4E1A\u52A1\u903B\u8F91\u5904\u7406\u3001\u7CFB\u7EDF\u96C6\u6210\u3001\u6570\u636E\u5E93\u64CD\u4F5C\n- \u8F93\u51FA\uFF1A\u6570\u636E\u7ED3\u6784\u3001\u63A5\u53E3\u89C4\u8303\u3001\u4E1A\u52A1\u903B\u8F91\n\n**PC\u9875\u9762\u7C7B\u578B**\uFF1A\n- \u5173\u952E\u8BCD\uFF1A\u9875\u9762\u3001\u754C\u9762\u3001UI\u3001\u7F51\u9875\u3001\u6D4F\u89C8\u5668\u3001\u524D\u7AEF\u3001\u7BA1\u7406\u540E\u53F0\u3001Web\u5E94\u7528\n- \u7279\u5F81\uFF1A\u4E3B\u8981\u63CF\u8FF0\u7528\u6237\u754C\u9762\u3001\u8868\u5355\u64CD\u4F5C\u3001\u6570\u636E\u5C55\u793A\u3001\u7528\u6237\u4EA4\u4E92\n- \u8F93\u51FA\uFF1A\u9875\u9762\u5E03\u5C40\u3001\u4EA4\u4E92\u903B\u8F91\u3001\u6837\u5F0F\u8BBE\u8BA1\n\n**APP\u7C7B\u578B**\uFF1A\n- \u5173\u952E\u8BCD\uFF1AApp\u3001\u79FB\u52A8\u5E94\u7528\u3001iOS\u3001Android\u3001\u79FB\u52A8\u7AEF\u3001\u5C0F\u7A0B\u5E8F\u3001\u539F\u751F\u5E94\u7528\n- \u7279\u5F81\uFF1A\u4E3B\u8981\u63CF\u8FF0\u79FB\u52A8\u7AEF\u529F\u80FD\u3001\u624B\u52BF\u64CD\u4F5C\u3001\u79FB\u52A8\u8BBE\u5907\u7279\u6027\u3001\u63A8\u9001\u901A\u77E5\n- \u8F93\u51FA\uFF1A\u79FB\u52A8\u7AEF\u754C\u9762\u3001\u624B\u52BF\u4EA4\u4E92\u3001\u8BBE\u5907\u9002\u914D\n\n**SDK\u96C6\u6210\u7C7B\u578B**\uFF1A\n- \u5173\u952E\u8BCD\uFF1ASDK\u3001\u7B2C\u4E09\u65B9\u3001\u96C6\u6210\u3001\u5BF9\u63A5\u3001\u652F\u4ED8\u3001\u5730\u56FE\u3001\u63A8\u9001\u3001\u7EDF\u8BA1\u3001\u5F00\u653E\u5E73\u53F0\n- \u7279\u5F81\uFF1A\u4E3B\u8981\u63CF\u8FF0\u4E0E\u5916\u90E8\u670D\u52A1\u7684\u5BF9\u63A5\u3001\u914D\u7F6E\u53C2\u6570\u3001\u56DE\u8C03\u5904\u7406\n- \u8F93\u51FA\uFF1A\u96C6\u6210\u6D41\u7A0B\u3001\u914D\u7F6E\u8BF4\u660E\u3001\u8C03\u7528\u793A\u4F8B\n\n**\u6DF7\u5408\u7C7B\u578B**\uFF1A\n- \u540C\u65F6\u5305\u542B\u4E0A\u8FF0\u591A\u79CD\u7C7B\u578B\u7684\u7279\u5F81\n- \u9700\u8981\u751F\u6210\u591A\u79CD\u6280\u672F\u6A21\u677F\n\n## \u529F\u80FD\u70B9\u63D0\u53D6\u539F\u5219\n\n1. **\u7CBE\u786E\u6027\u539F\u5219**\uFF1A\u53EA\u63D0\u53D6\u771F\u6B63\u6838\u5FC3\u7684\u3001\u72EC\u7ACB\u7684\u529F\u80FD\u70B9\uFF08\u901A\u5E382-5\u4E2A\uFF09\n2. **\u4E1A\u52A1\u4EF7\u503C\u539F\u5219**\uFF1A\u6BCF\u4E2A\u529F\u80FD\u70B9\u90FD\u5E94\u8BE5\u5177\u6709\u660E\u786E\u7684\u4E1A\u52A1\u4EF7\u503C\n3. **\u6280\u672F\u5339\u914D\u539F\u5219**\uFF1A\u529F\u80FD\u70B9\u5E94\u8BE5\u4E0E\u8BC6\u522B\u51FA\u7684\u9700\u6C42\u7C7B\u578B\u9AD8\u5EA6\u5339\u914D\n4. **\u907F\u514D\u8FC7\u5EA6\u62C6\u5206**\uFF1A\u4E0D\u8981\u5C06\u4E00\u4E2A\u5B8C\u6574\u7684\u529F\u80FD\u62C6\u5206\u6210\u591A\u4E2A\u5C0F\u529F\u80FD\u70B9\n\n## \u8F93\u51FA\u683C\u5F0F\n\n\u8BF7\u8F93\u51FA\u4E00\u4E2AJSON\u5BF9\u8C61\uFF0C\u683C\u5F0F\u5982\u4E0B\uFF1A\n\n```json\n{\n \"analysisType\": \"single_general|multi_general|multi_specific_features\",\n \"requirementType\": \"\u63A5\u53E3|PC\u9875\u9762|APP|SDK\u96C6\u6210|\u6DF7\u5408\u7C7B\u578B\",\n \"primaryTechnology\": \"\u4E3B\u8981\u6280\u672F\u6808\u63CF\u8FF0\",\n \"confidence\": \"high|medium|low\",\n \"requirements\": [\n {\n \"id\": \"req_001\",\n \"title\": \"\u529F\u80FD\u70B9\u540D\u79F0\",\n \"fullContent\": \"\u529F\u80FD\u70B9\u7684\u8BE6\u7EC6\u63CF\u8FF0\",\n \"priority\": \"high|medium|low\",\n \"complexity\": \"\u7B80\u5355|\u4E2D\u7B49|\u590D\u6742\",\n \"type\": \"\u63A5\u53E3|PC\u9875\u9762|APP|SDK\u96C6\u6210\"\n }\n ],\n \"templateRecommendation\": {\n \"primaryTemplate\": \"api|pc|app|sdk|multi\",\n \"reason\": \"\u9009\u62E9\u8BE5\u6A21\u677F\u7684\u539F\u56E0\",\n \"additionalTemplates\": [\"\u5982\u679C\u662F\u6DF7\u5408\u7C7B\u578B\uFF0C\u5217\u51FA\u9700\u8981\u7684\u5176\u4ED6\u6A21\u677F\"]\n },\n \"optimizationSuggestion\": \"\u9488\u5BF9\u529F\u80FD\u70B9\u6570\u91CF\u548C\u7C7B\u578B\u7684\u4F18\u5316\u5EFA\u8BAE\"\n}\n```\n\n## \u5206\u6790\u6B65\u9AA4\n\n1. **\u5FEB\u901F\u7C7B\u578B\u8BC6\u522B**\uFF1A\u6839\u636E\u5173\u952E\u8BCD\u548C\u7279\u5F81\u5FEB\u901F\u5224\u65AD\u9700\u6C42\u7684\u4E3B\u8981\u7C7B\u578B\n2. **\u6838\u5FC3\u529F\u80FD\u63D0\u53D6**\uFF1A\u63D0\u53D62-5\u4E2A\u771F\u6B63\u6838\u5FC3\u7684\u529F\u80FD\u70B9\uFF0C\u907F\u514D\u8FC7\u5EA6\u62C6\u5206\n3. **\u6A21\u677F\u63A8\u8350**\uFF1A\u6839\u636E\u9700\u6C42\u7C7B\u578B\u63A8\u8350\u6700\u5408\u9002\u7684\u6280\u672F\u6A21\u677F\n4. **\u4F18\u5316\u5EFA\u8BAE**\uFF1A\u63D0\u4F9B\u529F\u80FD\u70B9\u4F18\u5316\u5EFA\u8BAE\uFF0C\u786E\u4FDD\u7CBE\u786E\u6027\n\n## \u91CD\u8981\u63D0\u9192\n\n- **\u907F\u514D\u8FC7\u5EA6\u62C6\u5206**\uFF1A\u4E00\u4E2A\u5B8C\u6574\u7684\u4E1A\u52A1\u529F\u80FD\u4E0D\u8981\u62C6\u5206\u6210\u591A\u4E2A\u5C0F\u529F\u80FD\u70B9\n- **\u7CBE\u786E\u5339\u914D**\uFF1A\u786E\u4FDD\u529F\u80FD\u70B9\u4E0E\u9700\u6C42\u7C7B\u578B\u9AD8\u5EA6\u5339\u914D\n- **\u6570\u91CF\u63A7\u5236**\uFF1A\u901A\u5E38\u4E00\u4E2A\u9700\u6C42\u5E94\u8BE5\u53EA\u67092-5\u4E2A\u6838\u5FC3\u529F\u80FD\u70B9\n- **\u6A21\u677F\u5BFC\u5411**\uFF1A\u4F18\u5148\u8003\u8651\u80FD\u591F\u751F\u6210\u5355\u4E00\u6280\u672F\u6A21\u677F\u7684\u529F\u80FD\u70B9\u7EC4\u5408\n\n\u8BF7\u57FA\u4E8E\u4EE5\u4E0A\u6807\u51C6\u8FDB\u884C\u667A\u80FD\u9700\u6C42\u5206\u6790\uFF1A";
|
|
@@ -3,32 +3,14 @@ export declare const Word2MdParams: z.ZodObject<{
|
|
|
3
3
|
file_path: z.ZodString;
|
|
4
4
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
5
5
|
skip_images: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6
|
-
table_style: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
6
|
+
table_style: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
pipe: "pipe";
|
|
8
|
+
simple: "simple";
|
|
9
|
+
grid: "grid";
|
|
10
|
+
}>>>;
|
|
7
11
|
strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
table_style: "pipe" | "simple" | "grid";
|
|
11
|
-
strict_mode: boolean;
|
|
12
|
-
}, {
|
|
13
|
-
skip_images?: boolean | undefined;
|
|
14
|
-
table_style?: "pipe" | "simple" | "grid" | undefined;
|
|
15
|
-
strict_mode?: boolean | undefined;
|
|
16
|
-
}>>>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
options: {
|
|
19
|
-
skip_images: boolean;
|
|
20
|
-
table_style: "pipe" | "simple" | "grid";
|
|
21
|
-
strict_mode: boolean;
|
|
22
|
-
};
|
|
23
|
-
file_path: string;
|
|
24
|
-
}, {
|
|
25
|
-
file_path: string;
|
|
26
|
-
options?: {
|
|
27
|
-
skip_images?: boolean | undefined;
|
|
28
|
-
table_style?: "pipe" | "simple" | "grid" | undefined;
|
|
29
|
-
strict_mode?: boolean | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
}>;
|
|
12
|
+
}, z.core.$strip>>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
32
14
|
export interface Word2MdParams {
|
|
33
15
|
file_path: string;
|
|
34
16
|
}
|
|
@@ -39,31 +21,13 @@ export declare const word2mdTool: {
|
|
|
39
21
|
file_path: z.ZodString;
|
|
40
22
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
41
23
|
skip_images: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
42
|
-
table_style: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
24
|
+
table_style: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
pipe: "pipe";
|
|
26
|
+
simple: "simple";
|
|
27
|
+
grid: "grid";
|
|
28
|
+
}>>>;
|
|
43
29
|
strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
table_style: "pipe" | "simple" | "grid";
|
|
47
|
-
strict_mode: boolean;
|
|
48
|
-
}, {
|
|
49
|
-
skip_images?: boolean | undefined;
|
|
50
|
-
table_style?: "pipe" | "simple" | "grid" | undefined;
|
|
51
|
-
strict_mode?: boolean | undefined;
|
|
52
|
-
}>>>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
options: {
|
|
55
|
-
skip_images: boolean;
|
|
56
|
-
table_style: "pipe" | "simple" | "grid";
|
|
57
|
-
strict_mode: boolean;
|
|
58
|
-
};
|
|
59
|
-
file_path: string;
|
|
60
|
-
}, {
|
|
61
|
-
file_path: string;
|
|
62
|
-
options?: {
|
|
63
|
-
skip_images?: boolean | undefined;
|
|
64
|
-
table_style?: "pipe" | "simple" | "grid" | undefined;
|
|
65
|
-
strict_mode?: boolean | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
}>;
|
|
30
|
+
}, z.core.$strip>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
68
32
|
execute: (args: Word2MdParams) => Promise<string>;
|
|
69
33
|
};
|
package/package.json
CHANGED
|
@@ -1,49 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intention-coding",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "软件工程化的需求分析,功能设计,代码编写,测试运行和发布部署",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"import": "./dist/index.js",
|
|
10
|
-
"require": "./dist/index.cjs"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"bin": "./dist/index.js",
|
|
6
|
+
"packageManager": "pnpm@10.11.0",
|
|
7
|
+
"bin": "./dist/index.cjs",
|
|
14
8
|
"main": "./dist/index.cjs",
|
|
15
|
-
"module": "./dist/index.
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
9
|
+
"module": "./dist/index.cjs",
|
|
17
10
|
"files": [
|
|
18
|
-
"dist"
|
|
11
|
+
"dist/**/*",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp"
|
|
19
16
|
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "aico",
|
|
19
|
+
"email": "weiyunpeng@aico.com"
|
|
20
|
+
},
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "rslib build",
|
|
22
23
|
"dev": "rslib build --watch",
|
|
23
24
|
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"debug:openai": "npx tsx tests/debug-openai.ts",
|
|
24
27
|
"test-mcp": "npx fastmcp dev src/index.ts",
|
|
25
28
|
"inspect": "npx fastmcp inspect ./dist/index.js",
|
|
26
29
|
"prepublish": "npm run build"
|
|
27
30
|
},
|
|
28
31
|
"engines": {
|
|
29
|
-
"node": ">=16.
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@rslib/core": "^0.10.0",
|
|
33
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
34
|
-
"@types/node": "^18.0.0",
|
|
35
|
-
"@types/pdf-parse": "^1.1.5",
|
|
36
|
-
"@types/uuid": "^10.0.0",
|
|
37
|
-
"dotenv": "16.4.5",
|
|
38
|
-
"tsx": "^4.20.3",
|
|
39
|
-
"typescript": "^5.8.3",
|
|
40
|
-
"vitest": "3.2.3",
|
|
41
|
-
"zod": "3.25.64"
|
|
32
|
+
"node": ">=16.2.0"
|
|
42
33
|
},
|
|
43
34
|
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.17.3",
|
|
44
36
|
"aico-pack": "2.1.0",
|
|
45
37
|
"axios": "^1.10.0",
|
|
46
|
-
"fastmcp": "^3.9.0",
|
|
47
38
|
"html-to-md": "^0.8.8",
|
|
48
39
|
"jimp": "^1.6.0",
|
|
49
40
|
"lru-cache": "^11.1.0",
|
|
@@ -53,7 +44,36 @@
|
|
|
53
44
|
"uuid": "^11.1.0",
|
|
54
45
|
"winston": "^3.17.0",
|
|
55
46
|
"winston-daily-rotate-file": "^5.0.0",
|
|
56
|
-
"xlsx": "^0.18.5"
|
|
47
|
+
"xlsx": "^0.18.5",
|
|
48
|
+
"zod": "^4.0.10"
|
|
57
49
|
},
|
|
58
|
-
"
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@antfu/eslint-config": "^4.13.0",
|
|
52
|
+
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
53
|
+
"@eslint-react/eslint-plugin": "^1.49.0",
|
|
54
|
+
"@eslint/js": "^9.26.0",
|
|
55
|
+
"@rslib/core": "^0.10.0",
|
|
56
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
57
|
+
"@types/express": "^5.0.1",
|
|
58
|
+
"@types/js-yaml": "^4.0.9",
|
|
59
|
+
"@types/lodash": "^4.17.16",
|
|
60
|
+
"@types/node": "^24.0.0",
|
|
61
|
+
"@types/pdf-parse": "^1.1.5",
|
|
62
|
+
"@types/uuid": "^10.0.0",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
64
|
+
"@typescript-eslint/parser": "^8.32.1",
|
|
65
|
+
"chalk": "^5.4.1",
|
|
66
|
+
"dotenv": "16.4.5",
|
|
67
|
+
"effect": "^3.14.21",
|
|
68
|
+
"eslint": "^9.26.0",
|
|
69
|
+
"minimist": "^1.2.8",
|
|
70
|
+
"nodemon": "^3.0.0",
|
|
71
|
+
"npm-run-all": "^4.1.5",
|
|
72
|
+
"tsup": "^8.5.0",
|
|
73
|
+
"tsx": "^4.19.4",
|
|
74
|
+
"typescript": "^5.8.3",
|
|
75
|
+
"typescript-eslint": "^8.32.1",
|
|
76
|
+
"vitest": "3.2.3",
|
|
77
|
+
"zod": "3.25.64"
|
|
78
|
+
}
|
|
59
79
|
}
|