@mycodemap/mycodemap 0.1.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.
Files changed (329) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +559 -0
  4. package/dist/ai/claude.d.ts +38 -0
  5. package/dist/ai/claude.d.ts.map +1 -0
  6. package/dist/ai/claude.js +169 -0
  7. package/dist/ai/claude.js.map +1 -0
  8. package/dist/ai/codex.d.ts +38 -0
  9. package/dist/ai/codex.d.ts.map +1 -0
  10. package/dist/ai/codex.js +169 -0
  11. package/dist/ai/codex.js.map +1 -0
  12. package/dist/ai/factory.d.ts +48 -0
  13. package/dist/ai/factory.d.ts.map +1 -0
  14. package/dist/ai/factory.js +95 -0
  15. package/dist/ai/factory.js.map +1 -0
  16. package/dist/ai/index.d.ts +12 -0
  17. package/dist/ai/index.d.ts.map +1 -0
  18. package/dist/ai/index.js +29 -0
  19. package/dist/ai/index.js.map +1 -0
  20. package/dist/ai/provider.d.ts +70 -0
  21. package/dist/ai/provider.d.ts.map +1 -0
  22. package/dist/ai/provider.js +31 -0
  23. package/dist/ai/provider.js.map +1 -0
  24. package/dist/ai/subagent-caller.d.ts +90 -0
  25. package/dist/ai/subagent-caller.d.ts.map +1 -0
  26. package/dist/ai/subagent-caller.js +280 -0
  27. package/dist/ai/subagent-caller.js.map +1 -0
  28. package/dist/ai/types.d.ts +70 -0
  29. package/dist/ai/types.d.ts.map +1 -0
  30. package/dist/ai/types.js +5 -0
  31. package/dist/ai/types.js.map +1 -0
  32. package/dist/cache/file-hash-cache.d.ts +76 -0
  33. package/dist/cache/file-hash-cache.d.ts.map +1 -0
  34. package/dist/cache/file-hash-cache.js +159 -0
  35. package/dist/cache/file-hash-cache.js.map +1 -0
  36. package/dist/cache/index.d.ts +151 -0
  37. package/dist/cache/index.d.ts.map +1 -0
  38. package/dist/cache/index.js +303 -0
  39. package/dist/cache/index.js.map +1 -0
  40. package/dist/cache/lru-cache.d.ts +93 -0
  41. package/dist/cache/lru-cache.d.ts.map +1 -0
  42. package/dist/cache/lru-cache.js +194 -0
  43. package/dist/cache/lru-cache.js.map +1 -0
  44. package/dist/cache/parse-cache.d.ts +68 -0
  45. package/dist/cache/parse-cache.d.ts.map +1 -0
  46. package/dist/cache/parse-cache.js +173 -0
  47. package/dist/cache/parse-cache.js.map +1 -0
  48. package/dist/cli/commands/analyze.d.ts +96 -0
  49. package/dist/cli/commands/analyze.d.ts.map +1 -0
  50. package/dist/cli/commands/analyze.js +567 -0
  51. package/dist/cli/commands/analyze.js.map +1 -0
  52. package/dist/cli/commands/ci.d.ts +25 -0
  53. package/dist/cli/commands/ci.d.ts.map +1 -0
  54. package/dist/cli/commands/ci.js +481 -0
  55. package/dist/cli/commands/ci.js.map +1 -0
  56. package/dist/cli/commands/complexity.d.ts +70 -0
  57. package/dist/cli/commands/complexity.d.ts.map +1 -0
  58. package/dist/cli/commands/complexity.js +479 -0
  59. package/dist/cli/commands/complexity.js.map +1 -0
  60. package/dist/cli/commands/cycles.d.ts +10 -0
  61. package/dist/cli/commands/cycles.d.ts.map +1 -0
  62. package/dist/cli/commands/cycles.js +202 -0
  63. package/dist/cli/commands/cycles.js.map +1 -0
  64. package/dist/cli/commands/deps.d.ts +61 -0
  65. package/dist/cli/commands/deps.d.ts.map +1 -0
  66. package/dist/cli/commands/deps.js +340 -0
  67. package/dist/cli/commands/deps.js.map +1 -0
  68. package/dist/cli/commands/generate.d.ts +8 -0
  69. package/dist/cli/commands/generate.d.ts.map +1 -0
  70. package/dist/cli/commands/generate.js +61 -0
  71. package/dist/cli/commands/generate.js.map +1 -0
  72. package/dist/cli/commands/impact.d.ts +55 -0
  73. package/dist/cli/commands/impact.d.ts.map +1 -0
  74. package/dist/cli/commands/impact.js +455 -0
  75. package/dist/cli/commands/impact.js.map +1 -0
  76. package/dist/cli/commands/init.d.ts +4 -0
  77. package/dist/cli/commands/init.d.ts.map +1 -0
  78. package/dist/cli/commands/init.js +50 -0
  79. package/dist/cli/commands/init.js.map +1 -0
  80. package/dist/cli/commands/query.d.ts +22 -0
  81. package/dist/cli/commands/query.d.ts.map +1 -0
  82. package/dist/cli/commands/query.js +718 -0
  83. package/dist/cli/commands/query.js.map +1 -0
  84. package/dist/cli/commands/watch-foreground.d.ts +9 -0
  85. package/dist/cli/commands/watch-foreground.d.ts.map +1 -0
  86. package/dist/cli/commands/watch-foreground.js +67 -0
  87. package/dist/cli/commands/watch-foreground.js.map +1 -0
  88. package/dist/cli/commands/watch.d.ts +12 -0
  89. package/dist/cli/commands/watch.d.ts.map +1 -0
  90. package/dist/cli/commands/watch.js +114 -0
  91. package/dist/cli/commands/watch.js.map +1 -0
  92. package/dist/cli/commands/workflow.d.ts +25 -0
  93. package/dist/cli/commands/workflow.d.ts.map +1 -0
  94. package/dist/cli/commands/workflow.js +488 -0
  95. package/dist/cli/commands/workflow.js.map +1 -0
  96. package/dist/cli/index.d.ts +3 -0
  97. package/dist/cli/index.d.ts.map +1 -0
  98. package/dist/cli/index.js +115 -0
  99. package/dist/cli/index.js.map +1 -0
  100. package/dist/cli/paths.d.ts +90 -0
  101. package/dist/cli/paths.d.ts.map +1 -0
  102. package/dist/cli/paths.js +136 -0
  103. package/dist/cli/paths.js.map +1 -0
  104. package/dist/cli/runtime-logger.d.ts +13 -0
  105. package/dist/cli/runtime-logger.d.ts.map +1 -0
  106. package/dist/cli/runtime-logger.js +213 -0
  107. package/dist/cli/runtime-logger.js.map +1 -0
  108. package/dist/core/analyzer.d.ts +3 -0
  109. package/dist/core/analyzer.d.ts.map +1 -0
  110. package/dist/core/analyzer.js +359 -0
  111. package/dist/core/analyzer.js.map +1 -0
  112. package/dist/core/ast-complexity-analyzer.d.ts +40 -0
  113. package/dist/core/ast-complexity-analyzer.d.ts.map +1 -0
  114. package/dist/core/ast-complexity-analyzer.js +279 -0
  115. package/dist/core/ast-complexity-analyzer.js.map +1 -0
  116. package/dist/core/global-index.d.ts +69 -0
  117. package/dist/core/global-index.d.ts.map +1 -0
  118. package/dist/core/global-index.js +388 -0
  119. package/dist/core/global-index.js.map +1 -0
  120. package/dist/generator/ai-overview.d.ts +51 -0
  121. package/dist/generator/ai-overview.d.ts.map +1 -0
  122. package/dist/generator/ai-overview.js +160 -0
  123. package/dist/generator/ai-overview.js.map +1 -0
  124. package/dist/generator/context.d.ts +5 -0
  125. package/dist/generator/context.d.ts.map +1 -0
  126. package/dist/generator/context.js +514 -0
  127. package/dist/generator/context.js.map +1 -0
  128. package/dist/generator/file-describer.d.ts +93 -0
  129. package/dist/generator/file-describer.d.ts.map +1 -0
  130. package/dist/generator/file-describer.js +375 -0
  131. package/dist/generator/file-describer.js.map +1 -0
  132. package/dist/generator/index.d.ts +8 -0
  133. package/dist/generator/index.d.ts.map +1 -0
  134. package/dist/generator/index.js +259 -0
  135. package/dist/generator/index.js.map +1 -0
  136. package/dist/index.d.ts +5 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.js +6 -0
  139. package/dist/index.js.map +1 -0
  140. package/dist/orchestrator/adapters/ast-grep-adapter.d.ts +75 -0
  141. package/dist/orchestrator/adapters/ast-grep-adapter.d.ts.map +1 -0
  142. package/dist/orchestrator/adapters/ast-grep-adapter.js +242 -0
  143. package/dist/orchestrator/adapters/ast-grep-adapter.js.map +1 -0
  144. package/dist/orchestrator/adapters/base-adapter.d.ts +24 -0
  145. package/dist/orchestrator/adapters/base-adapter.d.ts.map +1 -0
  146. package/dist/orchestrator/adapters/base-adapter.js +2 -0
  147. package/dist/orchestrator/adapters/base-adapter.js.map +1 -0
  148. package/dist/orchestrator/adapters/codemap-adapter.d.ts +56 -0
  149. package/dist/orchestrator/adapters/codemap-adapter.d.ts.map +1 -0
  150. package/dist/orchestrator/adapters/codemap-adapter.js +163 -0
  151. package/dist/orchestrator/adapters/codemap-adapter.js.map +1 -0
  152. package/dist/orchestrator/adapters/index.d.ts +10 -0
  153. package/dist/orchestrator/adapters/index.d.ts.map +1 -0
  154. package/dist/orchestrator/adapters/index.js +3 -0
  155. package/dist/orchestrator/adapters/index.js.map +1 -0
  156. package/dist/orchestrator/ai-feed-generator.d.ts +210 -0
  157. package/dist/orchestrator/ai-feed-generator.d.ts.map +1 -0
  158. package/dist/orchestrator/ai-feed-generator.js +377 -0
  159. package/dist/orchestrator/ai-feed-generator.js.map +1 -0
  160. package/dist/orchestrator/commit-validator.d.ts +30 -0
  161. package/dist/orchestrator/commit-validator.d.ts.map +1 -0
  162. package/dist/orchestrator/commit-validator.js +87 -0
  163. package/dist/orchestrator/commit-validator.js.map +1 -0
  164. package/dist/orchestrator/confidence.d.ts +25 -0
  165. package/dist/orchestrator/confidence.d.ts.map +1 -0
  166. package/dist/orchestrator/confidence.js +138 -0
  167. package/dist/orchestrator/confidence.js.map +1 -0
  168. package/dist/orchestrator/file-header-scanner.d.ts +48 -0
  169. package/dist/orchestrator/file-header-scanner.d.ts.map +1 -0
  170. package/dist/orchestrator/file-header-scanner.js +158 -0
  171. package/dist/orchestrator/file-header-scanner.js.map +1 -0
  172. package/dist/orchestrator/git-analyzer.d.ts +192 -0
  173. package/dist/orchestrator/git-analyzer.d.ts.map +1 -0
  174. package/dist/orchestrator/git-analyzer.js +539 -0
  175. package/dist/orchestrator/git-analyzer.js.map +1 -0
  176. package/dist/orchestrator/index.d.ts +20 -0
  177. package/dist/orchestrator/index.d.ts.map +1 -0
  178. package/dist/orchestrator/index.js +16 -0
  179. package/dist/orchestrator/index.js.map +1 -0
  180. package/dist/orchestrator/intent-router.d.ts +41 -0
  181. package/dist/orchestrator/intent-router.d.ts.map +1 -0
  182. package/dist/orchestrator/intent-router.js +98 -0
  183. package/dist/orchestrator/intent-router.js.map +1 -0
  184. package/dist/orchestrator/result-fusion.d.ts +114 -0
  185. package/dist/orchestrator/result-fusion.d.ts.map +1 -0
  186. package/dist/orchestrator/result-fusion.js +332 -0
  187. package/dist/orchestrator/result-fusion.js.map +1 -0
  188. package/dist/orchestrator/test-linker.d.ts +166 -0
  189. package/dist/orchestrator/test-linker.d.ts.map +1 -0
  190. package/dist/orchestrator/test-linker.js +570 -0
  191. package/dist/orchestrator/test-linker.js.map +1 -0
  192. package/dist/orchestrator/tool-orchestrator.d.ts +108 -0
  193. package/dist/orchestrator/tool-orchestrator.d.ts.map +1 -0
  194. package/dist/orchestrator/tool-orchestrator.js +247 -0
  195. package/dist/orchestrator/tool-orchestrator.js.map +1 -0
  196. package/dist/orchestrator/types.d.ts +162 -0
  197. package/dist/orchestrator/types.d.ts.map +1 -0
  198. package/dist/orchestrator/types.js +39 -0
  199. package/dist/orchestrator/types.js.map +1 -0
  200. package/dist/orchestrator/workflow/ci-executor.d.ts +157 -0
  201. package/dist/orchestrator/workflow/ci-executor.d.ts.map +1 -0
  202. package/dist/orchestrator/workflow/ci-executor.js +423 -0
  203. package/dist/orchestrator/workflow/ci-executor.js.map +1 -0
  204. package/dist/orchestrator/workflow/config.d.ts +97 -0
  205. package/dist/orchestrator/workflow/config.d.ts.map +1 -0
  206. package/dist/orchestrator/workflow/config.js +115 -0
  207. package/dist/orchestrator/workflow/config.js.map +1 -0
  208. package/dist/orchestrator/workflow/git-analyzer.d.ts +173 -0
  209. package/dist/orchestrator/workflow/git-analyzer.d.ts.map +1 -0
  210. package/dist/orchestrator/workflow/git-analyzer.js +473 -0
  211. package/dist/orchestrator/workflow/git-analyzer.js.map +1 -0
  212. package/dist/orchestrator/workflow/index.d.ts +21 -0
  213. package/dist/orchestrator/workflow/index.d.ts.map +1 -0
  214. package/dist/orchestrator/workflow/index.js +21 -0
  215. package/dist/orchestrator/workflow/index.js.map +1 -0
  216. package/dist/orchestrator/workflow/phase-checkpoint.d.ts +38 -0
  217. package/dist/orchestrator/workflow/phase-checkpoint.d.ts.map +1 -0
  218. package/dist/orchestrator/workflow/phase-checkpoint.js +75 -0
  219. package/dist/orchestrator/workflow/phase-checkpoint.js.map +1 -0
  220. package/dist/orchestrator/workflow/phase-inheritance.d.ts +128 -0
  221. package/dist/orchestrator/workflow/phase-inheritance.d.ts.map +1 -0
  222. package/dist/orchestrator/workflow/phase-inheritance.js +266 -0
  223. package/dist/orchestrator/workflow/phase-inheritance.js.map +1 -0
  224. package/dist/orchestrator/workflow/result-fusion.d.ts +117 -0
  225. package/dist/orchestrator/workflow/result-fusion.d.ts.map +1 -0
  226. package/dist/orchestrator/workflow/result-fusion.js +246 -0
  227. package/dist/orchestrator/workflow/result-fusion.js.map +1 -0
  228. package/dist/orchestrator/workflow/templates.d.ts +116 -0
  229. package/dist/orchestrator/workflow/templates.d.ts.map +1 -0
  230. package/dist/orchestrator/workflow/templates.js +546 -0
  231. package/dist/orchestrator/workflow/templates.js.map +1 -0
  232. package/dist/orchestrator/workflow/test-linker.d.ts +152 -0
  233. package/dist/orchestrator/workflow/test-linker.d.ts.map +1 -0
  234. package/dist/orchestrator/workflow/test-linker.js +342 -0
  235. package/dist/orchestrator/workflow/test-linker.js.map +1 -0
  236. package/dist/orchestrator/workflow/types.d.ts +202 -0
  237. package/dist/orchestrator/workflow/types.d.ts.map +1 -0
  238. package/dist/orchestrator/workflow/types.js +4 -0
  239. package/dist/orchestrator/workflow/types.js.map +1 -0
  240. package/dist/orchestrator/workflow/visualizer.d.ts +56 -0
  241. package/dist/orchestrator/workflow/visualizer.d.ts.map +1 -0
  242. package/dist/orchestrator/workflow/visualizer.js +300 -0
  243. package/dist/orchestrator/workflow/visualizer.js.map +1 -0
  244. package/dist/orchestrator/workflow/workflow-context.d.ts +50 -0
  245. package/dist/orchestrator/workflow/workflow-context.d.ts.map +1 -0
  246. package/dist/orchestrator/workflow/workflow-context.js +105 -0
  247. package/dist/orchestrator/workflow/workflow-context.js.map +1 -0
  248. package/dist/orchestrator/workflow/workflow-orchestrator.d.ts +126 -0
  249. package/dist/orchestrator/workflow/workflow-orchestrator.d.ts.map +1 -0
  250. package/dist/orchestrator/workflow/workflow-orchestrator.js +489 -0
  251. package/dist/orchestrator/workflow/workflow-orchestrator.js.map +1 -0
  252. package/dist/orchestrator/workflow/workflow-persistence.d.ts +38 -0
  253. package/dist/orchestrator/workflow/workflow-persistence.d.ts.map +1 -0
  254. package/dist/orchestrator/workflow/workflow-persistence.js +166 -0
  255. package/dist/orchestrator/workflow/workflow-persistence.js.map +1 -0
  256. package/dist/parser/implementations/fast-parser.d.ts +65 -0
  257. package/dist/parser/implementations/fast-parser.d.ts.map +1 -0
  258. package/dist/parser/implementations/fast-parser.js +299 -0
  259. package/dist/parser/implementations/fast-parser.js.map +1 -0
  260. package/dist/parser/implementations/smart-parser.d.ts +220 -0
  261. package/dist/parser/implementations/smart-parser.d.ts.map +1 -0
  262. package/dist/parser/implementations/smart-parser.js +1536 -0
  263. package/dist/parser/implementations/smart-parser.js.map +1 -0
  264. package/dist/parser/implementations/tree-sitter-parser.d.ts +57 -0
  265. package/dist/parser/implementations/tree-sitter-parser.d.ts.map +1 -0
  266. package/dist/parser/implementations/tree-sitter-parser.js +375 -0
  267. package/dist/parser/implementations/tree-sitter-parser.js.map +1 -0
  268. package/dist/parser/index.d.ts +19 -0
  269. package/dist/parser/index.d.ts.map +1 -0
  270. package/dist/parser/index.js +449 -0
  271. package/dist/parser/index.js.map +1 -0
  272. package/dist/parser/interfaces/IParser.d.ts +218 -0
  273. package/dist/parser/interfaces/IParser.d.ts.map +1 -0
  274. package/dist/parser/interfaces/IParser.js +22 -0
  275. package/dist/parser/interfaces/IParser.js.map +1 -0
  276. package/dist/plugins/built-in/call-graph.d.ts +38 -0
  277. package/dist/plugins/built-in/call-graph.d.ts.map +1 -0
  278. package/dist/plugins/built-in/call-graph.js +135 -0
  279. package/dist/plugins/built-in/call-graph.js.map +1 -0
  280. package/dist/plugins/built-in/complexity-analyzer.d.ts +45 -0
  281. package/dist/plugins/built-in/complexity-analyzer.d.ts.map +1 -0
  282. package/dist/plugins/built-in/complexity-analyzer.js +155 -0
  283. package/dist/plugins/built-in/complexity-analyzer.js.map +1 -0
  284. package/dist/plugins/index.d.ts +34 -0
  285. package/dist/plugins/index.d.ts.map +1 -0
  286. package/dist/plugins/index.js +103 -0
  287. package/dist/plugins/index.js.map +1 -0
  288. package/dist/plugins/plugin-loader.d.ts +22 -0
  289. package/dist/plugins/plugin-loader.d.ts.map +1 -0
  290. package/dist/plugins/plugin-loader.js +200 -0
  291. package/dist/plugins/plugin-loader.js.map +1 -0
  292. package/dist/plugins/plugin-registry.d.ts +20 -0
  293. package/dist/plugins/plugin-registry.d.ts.map +1 -0
  294. package/dist/plugins/plugin-registry.js +143 -0
  295. package/dist/plugins/plugin-registry.js.map +1 -0
  296. package/dist/plugins/types.d.ts +72 -0
  297. package/dist/plugins/types.d.ts.map +1 -0
  298. package/dist/plugins/types.js +5 -0
  299. package/dist/plugins/types.js.map +1 -0
  300. package/dist/types/index.d.ts +373 -0
  301. package/dist/types/index.d.ts.map +1 -0
  302. package/dist/types/index.js +7 -0
  303. package/dist/types/index.js.map +1 -0
  304. package/dist/watcher/daemon.d.ts +64 -0
  305. package/dist/watcher/daemon.d.ts.map +1 -0
  306. package/dist/watcher/daemon.js +189 -0
  307. package/dist/watcher/daemon.js.map +1 -0
  308. package/dist/watcher/file-watcher.d.ts +70 -0
  309. package/dist/watcher/file-watcher.d.ts.map +1 -0
  310. package/dist/watcher/file-watcher.js +127 -0
  311. package/dist/watcher/file-watcher.js.map +1 -0
  312. package/dist/watcher/index.d.ts +5 -0
  313. package/dist/watcher/index.d.ts.map +1 -0
  314. package/dist/watcher/index.js +6 -0
  315. package/dist/watcher/index.js.map +1 -0
  316. package/dist/watcher/watch-worker.d.ts +2 -0
  317. package/dist/watcher/watch-worker.d.ts.map +1 -0
  318. package/dist/watcher/watch-worker.js +57 -0
  319. package/dist/watcher/watch-worker.js.map +1 -0
  320. package/dist/worker/index.d.ts +76 -0
  321. package/dist/worker/index.d.ts.map +1 -0
  322. package/dist/worker/index.js +155 -0
  323. package/dist/worker/index.js.map +1 -0
  324. package/dist/worker/parse-worker.d.ts +2 -0
  325. package/dist/worker/parse-worker.d.ts.map +1 -0
  326. package/dist/worker/parse-worker.js +202 -0
  327. package/dist/worker/parse-worker.js.map +1 -0
  328. package/mycodemap.config.schema.json +42 -0
  329. package/package.json +69 -0
@@ -0,0 +1,97 @@
1
+ /**
2
+ * [META] 工作流模块集成配置
3
+ * [WHY] 集中管理工作流与各模块的集成配置
4
+ */
5
+ /**
6
+ * CI 门禁集成配置
7
+ */
8
+ export declare const PHASE_CI_CONFIG: {
9
+ /** CI 命令超时时间(毫秒) */
10
+ ciTimeout: number;
11
+ /** 风险阈值 */
12
+ riskThreshold: number;
13
+ /** CI 检查项 */
14
+ checks: readonly ["check-commits", "check-headers", "assess-risk", "check-output-contract"];
15
+ };
16
+ /**
17
+ * Git 分析器集成配置
18
+ */
19
+ export declare const PHASE_GIT_CONFIG: {
20
+ /** 历史分析时间范围(天) */
21
+ historyDays: number;
22
+ /** 热度计算权重 */
23
+ heatWeights: {
24
+ freq30d: number;
25
+ commitCount: number;
26
+ impactCount: number;
27
+ };
28
+ /** 风险评估因子 */
29
+ riskFactors: readonly ["fileHeat", "dependencyComplexity", "testCoverage", "changeFrequency"];
30
+ };
31
+ /**
32
+ * 测试关联器集成配置
33
+ */
34
+ export declare const PHASE_TEST_STRATEGY: {
35
+ /** 测试文件匹配模式 */
36
+ testPatterns: string[];
37
+ /** 最小测试覆盖率阈值 */
38
+ minCoverageThreshold: number;
39
+ /** 测试关联策略 */
40
+ strategies: {
41
+ exact: boolean;
42
+ fuzzy: boolean;
43
+ structural: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * 置信度要求配置
48
+ */
49
+ export declare const CONFIDENCE_REQUIREMENTS: {
50
+ /** 各阶段最低置信度要求 */
51
+ phaseThresholds: {
52
+ reference: {
53
+ min: number;
54
+ high: number;
55
+ };
56
+ impact: {
57
+ min: number;
58
+ high: number;
59
+ };
60
+ risk: {
61
+ min: number;
62
+ high: number;
63
+ };
64
+ implementation: {
65
+ min: number;
66
+ high: number;
67
+ };
68
+ commit: {
69
+ min: number;
70
+ high: number;
71
+ };
72
+ ci: {
73
+ min: number;
74
+ high: number;
75
+ };
76
+ };
77
+ /** 自动推进阈值 */
78
+ autoProceedThreshold: number;
79
+ /** 回退阈值 */
80
+ fallbackThreshold: number;
81
+ };
82
+ /**
83
+ * 工作流全局配置
84
+ */
85
+ export declare const WORKFLOW_CONFIG: {
86
+ /** 是否启用工作流 */
87
+ enabled: boolean;
88
+ /** 持久化路径 */
89
+ persistencePath: string;
90
+ /** 最大并发阶段数 */
91
+ maxConcurrentPhases: number;
92
+ /** 是否自动保存检查点 */
93
+ autoCheckpoint: boolean;
94
+ /** 检查点间隔(秒) */
95
+ checkpointInterval: number;
96
+ };
97
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/workflow/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,oBAAoB;;IAEpB,WAAW;;IAEX,aAAa;;CAOd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B,kBAAkB;;IAElB,aAAa;;;;;;IAMb,aAAa;;CAOd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B,eAAe;;IAOf,gBAAgB;;IAEhB,aAAa;;;;;;CAMd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;IAClC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;IASjB,aAAa;;IAEb,WAAW;;CAEZ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,cAAc;;IAEd,YAAY;;IAEZ,cAAc;;IAEd,gBAAgB;;IAEhB,eAAe;;CAEhB,CAAC"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * [META] 工作流模块集成配置
3
+ * [WHY] 集中管理工作流与各模块的集成配置
4
+ */
5
+ import { existsSync } from 'node:fs';
6
+ import { join } from 'node:path';
7
+ import { cwd } from 'node:process';
8
+ /**
9
+ * 路径兼容常量
10
+ */
11
+ const DEFAULT_OUTPUT_DIR_NEW = '.mycodemap';
12
+ const DEFAULT_OUTPUT_DIR_OLD = '.codemap';
13
+ /**
14
+ * 解析工作流目录路径(兼容逻辑)
15
+ */
16
+ function resolveWorkflowDir() {
17
+ const rootDir = cwd();
18
+ const newPath = join(rootDir, DEFAULT_OUTPUT_DIR_NEW, 'workflow');
19
+ // 优先检查新路径
20
+ if (existsSync(newPath) || !existsSync(join(rootDir, DEFAULT_OUTPUT_DIR_OLD, 'workflow'))) {
21
+ return join(DEFAULT_OUTPUT_DIR_NEW, 'workflow');
22
+ }
23
+ // 回退到旧路径
24
+ return join(DEFAULT_OUTPUT_DIR_OLD, 'workflow');
25
+ }
26
+ /**
27
+ * CI 门禁集成配置
28
+ */
29
+ export const PHASE_CI_CONFIG = {
30
+ /** CI 命令超时时间(毫秒) */
31
+ ciTimeout: 300000,
32
+ /** 风险阈值 */
33
+ riskThreshold: 0.7,
34
+ /** CI 检查项 */
35
+ checks: [
36
+ 'check-commits',
37
+ 'check-headers',
38
+ 'assess-risk',
39
+ 'check-output-contract'
40
+ ]
41
+ };
42
+ /**
43
+ * Git 分析器集成配置
44
+ */
45
+ export const PHASE_GIT_CONFIG = {
46
+ /** 历史分析时间范围(天) */
47
+ historyDays: 90,
48
+ /** 热度计算权重 */
49
+ heatWeights: {
50
+ freq30d: 0.4,
51
+ commitCount: 0.3,
52
+ impactCount: 0.3
53
+ },
54
+ /** 风险评估因子 */
55
+ riskFactors: [
56
+ 'fileHeat',
57
+ 'dependencyComplexity',
58
+ 'testCoverage',
59
+ 'changeFrequency'
60
+ ]
61
+ };
62
+ /**
63
+ * 测试关联器集成配置
64
+ */
65
+ export const PHASE_TEST_STRATEGY = {
66
+ /** 测试文件匹配模式 */
67
+ testPatterns: [
68
+ '*.test.ts',
69
+ '*.spec.ts',
70
+ '**/*.test.ts',
71
+ '**/*.spec.ts'
72
+ ],
73
+ /** 最小测试覆盖率阈值 */
74
+ minCoverageThreshold: 0.7,
75
+ /** 测试关联策略 */
76
+ strategies: {
77
+ exact: true,
78
+ fuzzy: true,
79
+ structural: true
80
+ }
81
+ };
82
+ /**
83
+ * 置信度要求配置
84
+ */
85
+ export const CONFIDENCE_REQUIREMENTS = {
86
+ /** 各阶段最低置信度要求 */
87
+ phaseThresholds: {
88
+ reference: { min: 0.3, high: 0.6 },
89
+ impact: { min: 0.4, high: 0.7 },
90
+ risk: { min: 0, high: 0 },
91
+ implementation: { min: 0, high: 0 },
92
+ commit: { min: 0, high: 0 },
93
+ ci: { min: 0, high: 0 }
94
+ },
95
+ /** 自动推进阈值 */
96
+ autoProceedThreshold: 0.7,
97
+ /** 回退阈值 */
98
+ fallbackThreshold: 0.25
99
+ };
100
+ /**
101
+ * 工作流全局配置
102
+ */
103
+ export const WORKFLOW_CONFIG = {
104
+ /** 是否启用工作流 */
105
+ enabled: true,
106
+ /** 持久化路径 */
107
+ persistencePath: resolveWorkflowDir(),
108
+ /** 最大并发阶段数 */
109
+ maxConcurrentPhases: 1,
110
+ /** 是否自动保存检查点 */
111
+ autoCheckpoint: true,
112
+ /** 检查点间隔(秒) */
113
+ checkpointInterval: 300
114
+ };
115
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/orchestrator/workflow/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC;;GAEG;AACH,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAC5C,MAAM,sBAAsB,GAAG,UAAU,CAAC;AAE1C;;GAEG;AACH,SAAS,kBAAkB;IACzB,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;IACtB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,E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AAE,IAAI,EAAE,GAAG,EAAE;QAClC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QAC/B,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACzB,cAAc,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACnC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QAC3B,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;KACxB;IACD,aAAa;IACb,oBAAoB,EAAE,GAAG;IACzB,WAAW;IACX,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc;IACd,OAAO,EAAE,IAAI;IACb,YAAY;IACZ,eAAe,EAAE,kBAAkB,EAAE;IACrC,cAAc;IACd,mBAAmB,EAAE,CAAC;IACtB,gBAAgB;IAChB,cAAc,EAAE,IAAI;IACpB,eAAe;IACf,kBAAkB,EAAE,GAAG;CACxB,CAAC"}
@@ -0,0 +1,173 @@
1
+ /**
2
+ * [META] since:2026-03 | owner:codemap-team | stable:false
3
+ * [WHY] @version 2.5
4
+ */
5
+ import type { WorkflowPhase } from './types.js';
6
+ import type { WorkflowContext } from './types.js';
7
+ /**
8
+ * Git 分析配置
9
+ */
10
+ export interface GitAnalysisConfig {
11
+ /** 分析类型 */
12
+ analysisType: GitAnalysisType;
13
+ /** 最大提交数 */
14
+ maxCommits: number;
15
+ /** 是否包含历史 */
16
+ includeHistory: boolean;
17
+ /** 时间窗口(如 '30d') */
18
+ timeWindow?: string;
19
+ /** 文件模式 */
20
+ extractPatterns?: string[];
21
+ }
22
+ /**
23
+ * Git 分析类型
24
+ */
25
+ export type GitAnalysisType = 'none' | 'find-similar-commits' | 'file-history' | 'heat-analysis' | 'validate-commit' | 'full-analysis';
26
+ /**
27
+ * 提交信息
28
+ */
29
+ export interface CommitInfo {
30
+ hash: string;
31
+ message: string;
32
+ date: Date;
33
+ author: string;
34
+ files: string[];
35
+ tag?: CommitTag;
36
+ }
37
+ /**
38
+ * Commit Tag
39
+ */
40
+ export interface CommitTag {
41
+ type: 'BUGFIX' | 'FEATURE' | 'REFACTOR' | 'CONFIG' | 'DOCS' | 'DELETE' | 'UNKNOWN';
42
+ scope: string;
43
+ subject: string;
44
+ }
45
+ /**
46
+ * 文件热度
47
+ */
48
+ export interface FileHeat {
49
+ file: string;
50
+ freq30d: number;
51
+ lastType: string;
52
+ lastDate: Date | null;
53
+ stability: boolean;
54
+ }
55
+ /**
56
+ * 风险评分
57
+ */
58
+ export interface GitRiskScore {
59
+ level: 'high' | 'medium' | 'low';
60
+ score: number;
61
+ gravity: number;
62
+ heat: FileHeat;
63
+ impact: number;
64
+ riskFactors: string[];
65
+ }
66
+ /**
67
+ * Git 分析结果
68
+ */
69
+ export interface GitAnalysisResult {
70
+ type: GitAnalysisType;
71
+ commits?: CommitInfo[];
72
+ fileHeat?: FileHeat[];
73
+ riskScore?: GitRiskScore;
74
+ validation?: {
75
+ valid: boolean;
76
+ errors?: string[];
77
+ };
78
+ }
79
+ export declare class WorkflowGitAnalyzer {
80
+ private projectRoot;
81
+ constructor(projectRoot?: string);
82
+ /**
83
+ * 根据当前阶段执行 Git 分析
84
+ *
85
+ * @param phase - 当前工作流阶段
86
+ * @param targetFiles - 目标文件列表
87
+ * @param context - 工作流上下文
88
+ * @returns Git 分析结果
89
+ */
90
+ analyzeForPhase(phase: WorkflowPhase, targetFiles: string[], context: WorkflowContext): Promise<GitAnalysisResult>;
91
+ /**
92
+ * 查找相似提交
93
+ */
94
+ private findSimilarCommits;
95
+ /**
96
+ * 分析文件历史
97
+ */
98
+ private analyzeFileHistory;
99
+ /**
100
+ * 分析文件热度
101
+ */
102
+ private analyzeFileHeat;
103
+ /**
104
+ * 验证最近提交
105
+ */
106
+ private validateLastCommit;
107
+ /**
108
+ * 执行完整分析
109
+ */
110
+ private performFullAnalysis;
111
+ /**
112
+ * 按关键词搜索提交
113
+ */
114
+ private searchByKeywords;
115
+ /**
116
+ * 按文件搜索提交
117
+ */
118
+ private searchByFiles;
119
+ /**
120
+ * 获取文件热度
121
+ */
122
+ private getFileHeat;
123
+ /**
124
+ * 计算风险评分
125
+ */
126
+ private calculateRiskScore;
127
+ /**
128
+ * 验证提交信息格式
129
+ */
130
+ private validateCommitMessage;
131
+ /**
132
+ * 格式化提交错误信息
133
+ */
134
+ private formatCommitError;
135
+ /**
136
+ * 解析 Git 日志
137
+ */
138
+ private parseGitLog;
139
+ /**
140
+ * 解析带文件的 Git 日志
141
+ */
142
+ private parseGitLogWithFiles;
143
+ /**
144
+ * 解析 Commit Tag
145
+ */
146
+ private parseCommitTag;
147
+ /**
148
+ * 去重提交
149
+ */
150
+ private deduplicateCommits;
151
+ /**
152
+ * 从上下文获取缓存的历史
153
+ */
154
+ private getCachedHistory;
155
+ /**
156
+ * 获取阶段的 Git 分析配置
157
+ */
158
+ getPhaseConfig(phase: WorkflowPhase): GitAnalysisConfig;
159
+ /**
160
+ * 获取所有阶段的 Git 分析配置
161
+ */
162
+ getAllConfigs(): Record<WorkflowPhase, GitAnalysisConfig>;
163
+ }
164
+ /**
165
+ * 创建工作流 Git 分析器实例
166
+ */
167
+ export declare function createWorkflowGitAnalyzer(projectRoot?: string): WorkflowGitAnalyzer;
168
+ /**
169
+ * 快速分析当前阶段(便捷函数)
170
+ */
171
+ export declare function analyzePhase(phase: WorkflowPhase, targetFiles: string[], context: WorkflowContext, projectRoot?: string): Promise<GitAnalysisResult>;
172
+ export default WorkflowGitAnalyzer;
173
+ //# sourceMappingURL=git-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-analyzer.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/workflow/git-analyzer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,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