autosnippet 3.2.9 → 3.2.11

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 (1876) hide show
  1. package/README.md +36 -54
  2. package/config/default.json +19 -1
  3. package/dashboard/dist/assets/icons-0-btqT36.js +531 -0
  4. package/dashboard/dist/assets/index--XYC2yVO.js +128 -0
  5. package/dashboard/dist/assets/index-DNCrgh_C.css +1 -0
  6. package/dashboard/dist/index.html +3 -3
  7. package/dist/bin/api-server.d.ts +7 -0
  8. package/dist/bin/api-server.d.ts.map +1 -0
  9. package/dist/bin/api-server.js +87 -0
  10. package/dist/bin/api-server.js.map +1 -0
  11. package/dist/bin/cli.d.ts +20 -0
  12. package/dist/bin/cli.d.ts.map +1 -0
  13. package/dist/bin/cli.js +1169 -0
  14. package/dist/bin/cli.js.map +1 -0
  15. package/dist/bin/mcp-server.d.ts +28 -0
  16. package/dist/bin/mcp-server.d.ts.map +1 -0
  17. package/dist/bin/mcp-server.js +59 -0
  18. package/dist/bin/mcp-server.js.map +1 -0
  19. package/dist/lib/bootstrap.d.ts +92 -0
  20. package/dist/lib/bootstrap.d.ts.map +1 -0
  21. package/dist/lib/bootstrap.js +206 -0
  22. package/dist/lib/bootstrap.js.map +1 -0
  23. package/dist/lib/cli/AiScanService.d.ts +72 -0
  24. package/dist/lib/cli/AiScanService.d.ts.map +1 -0
  25. package/dist/lib/cli/AiScanService.js +252 -0
  26. package/dist/lib/cli/AiScanService.js.map +1 -0
  27. package/dist/lib/cli/CliLogger.d.ts +41 -0
  28. package/dist/lib/cli/CliLogger.d.ts.map +1 -0
  29. package/dist/lib/cli/CliLogger.js +73 -0
  30. package/dist/lib/cli/CliLogger.js.map +1 -0
  31. package/dist/lib/cli/KnowledgeSyncService.d.ts +156 -0
  32. package/dist/lib/cli/KnowledgeSyncService.d.ts.map +1 -0
  33. package/dist/lib/cli/KnowledgeSyncService.js +338 -0
  34. package/dist/lib/cli/KnowledgeSyncService.js.map +1 -0
  35. package/dist/lib/cli/SetupService.d.ts +136 -0
  36. package/dist/lib/cli/SetupService.d.ts.map +1 -0
  37. package/dist/lib/cli/SetupService.js +510 -0
  38. package/dist/lib/cli/SetupService.js.map +1 -0
  39. package/dist/lib/cli/UpgradeService.d.ts +30 -0
  40. package/dist/lib/cli/UpgradeService.d.ts.map +1 -0
  41. package/dist/lib/cli/UpgradeService.js +83 -0
  42. package/dist/lib/cli/UpgradeService.js.map +1 -0
  43. package/dist/lib/cli/deploy/FileDeployer.d.ts +108 -0
  44. package/dist/lib/cli/deploy/FileDeployer.d.ts.map +1 -0
  45. package/dist/lib/cli/deploy/FileDeployer.js +543 -0
  46. package/dist/lib/cli/deploy/FileDeployer.js.map +1 -0
  47. package/dist/lib/cli/deploy/FileManifest.d.ts +210 -0
  48. package/dist/lib/cli/deploy/FileManifest.d.ts.map +1 -0
  49. package/dist/lib/cli/deploy/FileManifest.js +252 -0
  50. package/dist/lib/cli/deploy/FileManifest.js.map +1 -0
  51. package/dist/lib/core/AstAnalyzer.d.ts +278 -0
  52. package/dist/lib/core/AstAnalyzer.d.ts.map +1 -0
  53. package/dist/lib/core/AstAnalyzer.js +774 -0
  54. package/dist/lib/core/AstAnalyzer.js.map +1 -0
  55. package/dist/lib/core/analysis/CallEdgeResolver.d.ts +145 -0
  56. package/dist/lib/core/analysis/CallEdgeResolver.d.ts.map +1 -0
  57. package/dist/lib/core/analysis/CallEdgeResolver.js +374 -0
  58. package/dist/lib/core/analysis/CallEdgeResolver.js.map +1 -0
  59. package/dist/lib/core/analysis/CallGraphAnalyzer.d.ts +139 -0
  60. package/dist/lib/core/analysis/CallGraphAnalyzer.d.ts.map +1 -0
  61. package/dist/lib/core/analysis/CallGraphAnalyzer.js +313 -0
  62. package/dist/lib/core/analysis/CallGraphAnalyzer.js.map +1 -0
  63. package/dist/lib/core/analysis/CallSiteExtractor.d.ts +79 -0
  64. package/dist/lib/core/analysis/CallSiteExtractor.d.ts.map +1 -0
  65. package/dist/lib/core/analysis/CallSiteExtractor.js +654 -0
  66. package/dist/lib/core/analysis/CallSiteExtractor.js.map +1 -0
  67. package/dist/lib/core/analysis/DataFlowInferrer.d.ts +37 -0
  68. package/dist/lib/core/analysis/DataFlowInferrer.d.ts.map +1 -0
  69. package/dist/lib/core/analysis/DataFlowInferrer.js +52 -0
  70. package/dist/lib/core/analysis/DataFlowInferrer.js.map +1 -0
  71. package/dist/lib/core/analysis/ImportPathResolver.d.ts +59 -0
  72. package/dist/lib/core/analysis/ImportPathResolver.d.ts.map +1 -0
  73. package/dist/lib/core/analysis/ImportPathResolver.js +189 -0
  74. package/dist/lib/core/analysis/ImportPathResolver.js.map +1 -0
  75. package/dist/lib/core/analysis/ImportRecord.d.ts +63 -0
  76. package/dist/lib/core/analysis/ImportRecord.d.ts.map +1 -0
  77. package/dist/lib/core/analysis/ImportRecord.js +93 -0
  78. package/dist/lib/core/analysis/ImportRecord.js.map +1 -0
  79. package/dist/lib/core/analysis/SymbolTableBuilder.d.ts +84 -0
  80. package/dist/lib/core/analysis/SymbolTableBuilder.d.ts.map +1 -0
  81. package/dist/lib/core/analysis/SymbolTableBuilder.js +194 -0
  82. package/dist/lib/core/analysis/SymbolTableBuilder.js.map +1 -0
  83. package/dist/lib/core/ast/ProjectGraph.d.ts +161 -0
  84. package/dist/lib/core/ast/ProjectGraph.d.ts.map +1 -0
  85. package/dist/lib/core/ast/ProjectGraph.js +729 -0
  86. package/dist/lib/core/ast/ProjectGraph.js.map +1 -0
  87. package/dist/lib/core/ast/ensure-grammars.d.ts +42 -0
  88. package/dist/lib/core/ast/ensure-grammars.d.ts.map +1 -0
  89. package/dist/lib/core/ast/ensure-grammars.js +114 -0
  90. package/dist/lib/core/ast/ensure-grammars.js.map +1 -0
  91. package/dist/lib/core/ast/index.d.ts +31 -0
  92. package/dist/lib/core/ast/index.d.ts.map +1 -0
  93. package/dist/lib/core/ast/index.js +155 -0
  94. package/dist/lib/core/ast/index.js.map +1 -0
  95. package/dist/lib/core/ast/lang-dart.d.ts +35 -0
  96. package/dist/lib/core/ast/lang-dart.d.ts.map +1 -0
  97. package/dist/lib/core/ast/lang-dart.js +873 -0
  98. package/dist/lib/core/ast/lang-dart.js.map +1 -0
  99. package/dist/lib/core/ast/lang-go.d.ts +32 -0
  100. package/dist/lib/core/ast/lang-go.d.ts.map +1 -0
  101. package/dist/lib/core/ast/lang-go.js +680 -0
  102. package/dist/lib/core/ast/lang-go.js.map +1 -0
  103. package/dist/lib/core/ast/lang-java.d.ts +25 -0
  104. package/dist/lib/core/ast/lang-java.d.ts.map +1 -0
  105. package/dist/lib/core/ast/lang-java.js +592 -0
  106. package/dist/lib/core/ast/lang-java.js.map +1 -0
  107. package/dist/lib/core/ast/lang-javascript.d.ts +18 -0
  108. package/dist/lib/core/ast/lang-javascript.d.ts.map +1 -0
  109. package/dist/lib/core/ast/lang-javascript.js +233 -0
  110. package/dist/lib/core/ast/lang-javascript.js.map +1 -0
  111. package/dist/lib/core/ast/lang-kotlin.d.ts +24 -0
  112. package/dist/lib/core/ast/lang-kotlin.d.ts.map +1 -0
  113. package/dist/lib/core/ast/lang-kotlin.js +699 -0
  114. package/dist/lib/core/ast/lang-kotlin.js.map +1 -0
  115. package/dist/lib/core/ast/lang-objc.d.ts +16 -0
  116. package/dist/lib/core/ast/lang-objc.d.ts.map +1 -0
  117. package/dist/lib/core/ast/lang-objc.js +341 -0
  118. package/dist/lib/core/ast/lang-objc.js.map +1 -0
  119. package/dist/lib/core/ast/lang-python.d.ts +23 -0
  120. package/dist/lib/core/ast/lang-python.d.ts.map +1 -0
  121. package/dist/lib/core/ast/lang-python.js +358 -0
  122. package/dist/lib/core/ast/lang-python.js.map +1 -0
  123. package/dist/lib/core/ast/lang-rust.d.ts +32 -0
  124. package/dist/lib/core/ast/lang-rust.d.ts.map +1 -0
  125. package/dist/lib/core/ast/lang-rust.js +919 -0
  126. package/dist/lib/core/ast/lang-rust.js.map +1 -0
  127. package/dist/lib/core/ast/lang-swift.d.ts +28 -0
  128. package/dist/lib/core/ast/lang-swift.d.ts.map +1 -0
  129. package/dist/lib/core/ast/lang-swift.js +456 -0
  130. package/dist/lib/core/ast/lang-swift.js.map +1 -0
  131. package/dist/lib/core/ast/lang-typescript.d.ts +32 -0
  132. package/dist/lib/core/ast/lang-typescript.d.ts.map +1 -0
  133. package/dist/lib/core/ast/lang-typescript.js +712 -0
  134. package/dist/lib/core/ast/lang-typescript.js.map +1 -0
  135. package/dist/lib/core/ast/parser-init.d.ts +33 -0
  136. package/dist/lib/core/ast/parser-init.d.ts.map +1 -0
  137. package/dist/lib/core/ast/parser-init.js +79 -0
  138. package/dist/lib/core/ast/parser-init.js.map +1 -0
  139. package/dist/lib/core/capability/CapabilityProbe.d.ts +105 -0
  140. package/dist/lib/core/capability/CapabilityProbe.d.ts.map +1 -0
  141. package/dist/lib/core/capability/CapabilityProbe.js +240 -0
  142. package/dist/lib/core/capability/CapabilityProbe.js.map +1 -0
  143. package/dist/lib/core/constitution/Constitution.d.ts +106 -0
  144. package/dist/lib/core/constitution/Constitution.d.ts.map +1 -0
  145. package/dist/lib/core/constitution/Constitution.js +132 -0
  146. package/dist/lib/core/constitution/Constitution.js.map +1 -0
  147. package/dist/lib/core/constitution/ConstitutionValidator.d.ts +60 -0
  148. package/dist/lib/core/constitution/ConstitutionValidator.d.ts.map +1 -0
  149. package/dist/lib/core/constitution/ConstitutionValidator.js +189 -0
  150. package/dist/lib/core/constitution/ConstitutionValidator.js.map +1 -0
  151. package/dist/lib/core/discovery/DartDiscoverer.d.ts +23 -0
  152. package/dist/lib/core/discovery/DartDiscoverer.d.ts.map +1 -0
  153. package/dist/lib/core/discovery/DartDiscoverer.js +490 -0
  154. package/dist/lib/core/discovery/DartDiscoverer.js.map +1 -0
  155. package/dist/lib/core/discovery/DiscovererRegistry.d.ts +38 -0
  156. package/dist/lib/core/discovery/DiscovererRegistry.d.ts.map +1 -0
  157. package/dist/lib/core/discovery/DiscovererRegistry.js +70 -0
  158. package/dist/lib/core/discovery/DiscovererRegistry.js.map +1 -0
  159. package/dist/lib/core/discovery/GenericDiscoverer.d.ts +27 -0
  160. package/dist/lib/core/discovery/GenericDiscoverer.d.ts.map +1 -0
  161. package/dist/lib/core/discovery/GenericDiscoverer.js +184 -0
  162. package/dist/lib/core/discovery/GenericDiscoverer.js.map +1 -0
  163. package/dist/lib/core/discovery/GoDiscoverer.d.ts +23 -0
  164. package/dist/lib/core/discovery/GoDiscoverer.d.ts.map +1 -0
  165. package/dist/lib/core/discovery/GoDiscoverer.js +507 -0
  166. package/dist/lib/core/discovery/GoDiscoverer.js.map +1 -0
  167. package/dist/lib/core/discovery/JvmDiscoverer.d.ts +25 -0
  168. package/dist/lib/core/discovery/JvmDiscoverer.d.ts.map +1 -0
  169. package/dist/lib/core/discovery/JvmDiscoverer.js +457 -0
  170. package/dist/lib/core/discovery/JvmDiscoverer.js.map +1 -0
  171. package/dist/lib/core/discovery/NodeDiscoverer.d.ts +23 -0
  172. package/dist/lib/core/discovery/NodeDiscoverer.d.ts.map +1 -0
  173. package/dist/lib/core/discovery/NodeDiscoverer.js +440 -0
  174. package/dist/lib/core/discovery/NodeDiscoverer.js.map +1 -0
  175. package/dist/lib/core/discovery/ProjectDiscoverer.d.ts +74 -0
  176. package/dist/lib/core/discovery/ProjectDiscoverer.d.ts.map +1 -0
  177. package/dist/lib/core/discovery/ProjectDiscoverer.js +52 -0
  178. package/dist/lib/core/discovery/ProjectDiscoverer.js.map +1 -0
  179. package/dist/lib/core/discovery/PythonDiscoverer.d.ts +23 -0
  180. package/dist/lib/core/discovery/PythonDiscoverer.d.ts.map +1 -0
  181. package/dist/lib/core/discovery/PythonDiscoverer.js +312 -0
  182. package/dist/lib/core/discovery/PythonDiscoverer.js.map +1 -0
  183. package/dist/lib/core/discovery/RustDiscoverer.d.ts +23 -0
  184. package/dist/lib/core/discovery/RustDiscoverer.d.ts.map +1 -0
  185. package/dist/lib/core/discovery/RustDiscoverer.js +492 -0
  186. package/dist/lib/core/discovery/RustDiscoverer.js.map +1 -0
  187. package/dist/lib/core/discovery/index.d.ts +25 -0
  188. package/dist/lib/core/discovery/index.d.ts.map +1 -0
  189. package/dist/lib/core/discovery/index.js +52 -0
  190. package/dist/lib/core/discovery/index.js.map +1 -0
  191. package/dist/lib/core/enhancement/EnhancementPack.d.ts +145 -0
  192. package/dist/lib/core/enhancement/EnhancementPack.d.ts.map +1 -0
  193. package/dist/lib/core/enhancement/EnhancementPack.js +64 -0
  194. package/dist/lib/core/enhancement/EnhancementPack.js.map +1 -0
  195. package/dist/lib/core/enhancement/EnhancementRegistry.d.ts +28 -0
  196. package/dist/lib/core/enhancement/EnhancementRegistry.d.ts.map +1 -0
  197. package/dist/lib/core/enhancement/EnhancementRegistry.js +43 -0
  198. package/dist/lib/core/enhancement/EnhancementRegistry.js.map +1 -0
  199. package/dist/lib/core/enhancement/android-enhancement.d.ts +30 -0
  200. package/dist/lib/core/enhancement/android-enhancement.d.ts.map +1 -0
  201. package/dist/lib/core/enhancement/android-enhancement.js +95 -0
  202. package/dist/lib/core/enhancement/android-enhancement.js.map +1 -0
  203. package/dist/lib/core/enhancement/django-enhancement.d.ts +48 -0
  204. package/dist/lib/core/enhancement/django-enhancement.d.ts.map +1 -0
  205. package/dist/lib/core/enhancement/django-enhancement.js +216 -0
  206. package/dist/lib/core/enhancement/django-enhancement.js.map +1 -0
  207. package/dist/lib/core/enhancement/fastapi-enhancement.d.ts +46 -0
  208. package/dist/lib/core/enhancement/fastapi-enhancement.d.ts.map +1 -0
  209. package/dist/lib/core/enhancement/fastapi-enhancement.js +189 -0
  210. package/dist/lib/core/enhancement/fastapi-enhancement.js.map +1 -0
  211. package/dist/lib/core/enhancement/go-grpc-enhancement.d.ts +45 -0
  212. package/dist/lib/core/enhancement/go-grpc-enhancement.d.ts.map +1 -0
  213. package/dist/lib/core/enhancement/go-grpc-enhancement.js +140 -0
  214. package/dist/lib/core/enhancement/go-grpc-enhancement.js.map +1 -0
  215. package/dist/lib/core/enhancement/go-web-enhancement.d.ts +42 -0
  216. package/dist/lib/core/enhancement/go-web-enhancement.d.ts.map +1 -0
  217. package/dist/lib/core/enhancement/go-web-enhancement.js +186 -0
  218. package/dist/lib/core/enhancement/go-web-enhancement.js.map +1 -0
  219. package/dist/lib/core/enhancement/index.d.ts +25 -0
  220. package/dist/lib/core/enhancement/index.d.ts.map +1 -0
  221. package/dist/lib/core/enhancement/index.js +63 -0
  222. package/dist/lib/core/enhancement/index.js.map +1 -0
  223. package/dist/lib/core/enhancement/langchain-enhancement.d.ts +47 -0
  224. package/dist/lib/core/enhancement/langchain-enhancement.d.ts.map +1 -0
  225. package/dist/lib/core/enhancement/langchain-enhancement.js +210 -0
  226. package/dist/lib/core/enhancement/langchain-enhancement.js.map +1 -0
  227. package/dist/lib/core/enhancement/ml-enhancement.d.ts +47 -0
  228. package/dist/lib/core/enhancement/ml-enhancement.d.ts.map +1 -0
  229. package/dist/lib/core/enhancement/ml-enhancement.js +240 -0
  230. package/dist/lib/core/enhancement/ml-enhancement.js.map +1 -0
  231. package/dist/lib/core/enhancement/nextjs-enhancement.d.ts +47 -0
  232. package/dist/lib/core/enhancement/nextjs-enhancement.d.ts.map +1 -0
  233. package/dist/lib/core/enhancement/nextjs-enhancement.js +201 -0
  234. package/dist/lib/core/enhancement/nextjs-enhancement.js.map +1 -0
  235. package/dist/lib/core/enhancement/node-server-enhancement.d.ts +45 -0
  236. package/dist/lib/core/enhancement/node-server-enhancement.d.ts.map +1 -0
  237. package/dist/lib/core/enhancement/node-server-enhancement.js +242 -0
  238. package/dist/lib/core/enhancement/node-server-enhancement.js.map +1 -0
  239. package/dist/lib/core/enhancement/react-enhancement.d.ts +46 -0
  240. package/dist/lib/core/enhancement/react-enhancement.d.ts.map +1 -0
  241. package/dist/lib/core/enhancement/react-enhancement.js +229 -0
  242. package/dist/lib/core/enhancement/react-enhancement.js.map +1 -0
  243. package/dist/lib/core/enhancement/rust-tokio-enhancement.d.ts +47 -0
  244. package/dist/lib/core/enhancement/rust-tokio-enhancement.d.ts.map +1 -0
  245. package/dist/lib/core/enhancement/rust-tokio-enhancement.js +207 -0
  246. package/dist/lib/core/enhancement/rust-tokio-enhancement.js.map +1 -0
  247. package/dist/lib/core/enhancement/rust-web-enhancement.d.ts +45 -0
  248. package/dist/lib/core/enhancement/rust-web-enhancement.d.ts.map +1 -0
  249. package/dist/lib/core/enhancement/rust-web-enhancement.js +229 -0
  250. package/dist/lib/core/enhancement/rust-web-enhancement.js.map +1 -0
  251. package/dist/lib/core/enhancement/spring-enhancement.d.ts +39 -0
  252. package/dist/lib/core/enhancement/spring-enhancement.d.ts.map +1 -0
  253. package/dist/lib/core/enhancement/spring-enhancement.js +108 -0
  254. package/dist/lib/core/enhancement/spring-enhancement.js.map +1 -0
  255. package/dist/lib/core/enhancement/vue-enhancement.d.ts +54 -0
  256. package/dist/lib/core/enhancement/vue-enhancement.d.ts.map +1 -0
  257. package/dist/lib/core/enhancement/vue-enhancement.js +214 -0
  258. package/dist/lib/core/enhancement/vue-enhancement.js.map +1 -0
  259. package/dist/lib/core/gateway/Gateway.d.ts +135 -0
  260. package/dist/lib/core/gateway/Gateway.d.ts.map +1 -0
  261. package/dist/lib/core/gateway/Gateway.js +261 -0
  262. package/dist/lib/core/gateway/Gateway.js.map +1 -0
  263. package/dist/lib/core/gateway/GatewayActionRegistry.d.ts +35 -0
  264. package/dist/lib/core/gateway/GatewayActionRegistry.d.ts.map +1 -0
  265. package/dist/lib/core/gateway/GatewayActionRegistry.js +195 -0
  266. package/dist/lib/core/gateway/GatewayActionRegistry.js.map +1 -0
  267. package/dist/lib/core/permission/PermissionManager.d.ts +63 -0
  268. package/dist/lib/core/permission/PermissionManager.d.ts.map +1 -0
  269. package/dist/lib/core/permission/PermissionManager.js +221 -0
  270. package/dist/lib/core/permission/PermissionManager.js.map +1 -0
  271. package/dist/lib/domain/index.d.ts +14 -0
  272. package/dist/lib/domain/index.d.ts.map +1 -0
  273. package/dist/lib/domain/index.js +16 -0
  274. package/dist/lib/domain/index.js.map +1 -0
  275. package/dist/lib/domain/knowledge/KnowledgeEntry.d.ts +297 -0
  276. package/dist/lib/domain/knowledge/KnowledgeEntry.d.ts.map +1 -0
  277. package/dist/lib/domain/knowledge/KnowledgeEntry.js +315 -0
  278. package/dist/lib/domain/knowledge/KnowledgeEntry.js.map +1 -0
  279. package/dist/lib/domain/knowledge/KnowledgeRepository.d.ts +36 -0
  280. package/dist/lib/domain/knowledge/KnowledgeRepository.d.ts.map +1 -0
  281. package/dist/lib/domain/knowledge/KnowledgeRepository.js +46 -0
  282. package/dist/lib/domain/knowledge/KnowledgeRepository.js.map +1 -0
  283. package/dist/lib/domain/knowledge/Lifecycle.d.ts +50 -0
  284. package/dist/lib/domain/knowledge/Lifecycle.d.ts.map +1 -0
  285. package/dist/lib/domain/knowledge/Lifecycle.js +91 -0
  286. package/dist/lib/domain/knowledge/Lifecycle.js.map +1 -0
  287. package/dist/lib/domain/knowledge/index.d.ts +13 -0
  288. package/dist/lib/domain/knowledge/index.d.ts.map +1 -0
  289. package/dist/lib/domain/knowledge/index.js +17 -0
  290. package/dist/lib/domain/knowledge/index.js.map +1 -0
  291. package/dist/lib/domain/knowledge/values/Constraints.d.ts +84 -0
  292. package/dist/lib/domain/knowledge/values/Constraints.d.ts.map +1 -0
  293. package/dist/lib/domain/knowledge/values/Constraints.js +115 -0
  294. package/dist/lib/domain/knowledge/values/Constraints.js.map +1 -0
  295. package/dist/lib/domain/knowledge/values/Content.d.ts +92 -0
  296. package/dist/lib/domain/knowledge/values/Content.d.ts.map +1 -0
  297. package/dist/lib/domain/knowledge/values/Content.js +74 -0
  298. package/dist/lib/domain/knowledge/values/Content.js.map +1 -0
  299. package/dist/lib/domain/knowledge/values/Quality.d.ts +55 -0
  300. package/dist/lib/domain/knowledge/values/Quality.d.ts.map +1 -0
  301. package/dist/lib/domain/knowledge/values/Quality.js +90 -0
  302. package/dist/lib/domain/knowledge/values/Quality.js.map +1 -0
  303. package/dist/lib/domain/knowledge/values/Reasoning.d.ts +47 -0
  304. package/dist/lib/domain/knowledge/values/Reasoning.d.ts.map +1 -0
  305. package/dist/lib/domain/knowledge/values/Reasoning.js +75 -0
  306. package/dist/lib/domain/knowledge/values/Reasoning.js.map +1 -0
  307. package/dist/lib/domain/knowledge/values/Relations.d.ts +72 -0
  308. package/dist/lib/domain/knowledge/values/Relations.d.ts.map +1 -0
  309. package/dist/lib/domain/knowledge/values/Relations.js +152 -0
  310. package/dist/lib/domain/knowledge/values/Relations.js.map +1 -0
  311. package/dist/lib/domain/knowledge/values/Stats.d.ts +55 -0
  312. package/dist/lib/domain/knowledge/values/Stats.d.ts.map +1 -0
  313. package/dist/lib/domain/knowledge/values/Stats.js +74 -0
  314. package/dist/lib/domain/knowledge/values/Stats.js.map +1 -0
  315. package/dist/lib/domain/knowledge/values/index.d.ts +10 -0
  316. package/dist/lib/domain/knowledge/values/index.d.ts.map +1 -0
  317. package/dist/lib/domain/knowledge/values/index.js +10 -0
  318. package/dist/lib/domain/knowledge/values/index.js.map +1 -0
  319. package/dist/lib/domain/snippet/Snippet.d.ts +95 -0
  320. package/dist/lib/domain/snippet/Snippet.d.ts.map +1 -0
  321. package/dist/lib/domain/snippet/Snippet.js +110 -0
  322. package/dist/lib/domain/snippet/Snippet.js.map +1 -0
  323. package/dist/lib/domain/task/Task.d.ts +145 -0
  324. package/dist/lib/domain/task/Task.d.ts.map +1 -0
  325. package/dist/lib/domain/task/Task.js +259 -0
  326. package/dist/lib/domain/task/Task.js.map +1 -0
  327. package/dist/lib/domain/task/TaskDependency.d.ts +32 -0
  328. package/dist/lib/domain/task/TaskDependency.d.ts.map +1 -0
  329. package/dist/lib/domain/task/TaskDependency.js +43 -0
  330. package/dist/lib/domain/task/TaskDependency.js.map +1 -0
  331. package/dist/lib/domain/task/TaskIdGenerator.d.ts +42 -0
  332. package/dist/lib/domain/task/TaskIdGenerator.d.ts.map +1 -0
  333. package/dist/lib/domain/task/TaskIdGenerator.js +78 -0
  334. package/dist/lib/domain/task/TaskIdGenerator.js.map +1 -0
  335. package/dist/lib/domain/task/index.d.ts +7 -0
  336. package/dist/lib/domain/task/index.d.ts.map +1 -0
  337. package/dist/lib/domain/task/index.js +7 -0
  338. package/dist/lib/domain/task/index.js.map +1 -0
  339. package/dist/lib/external/ai/AiFactory.d.ts +66 -0
  340. package/dist/lib/external/ai/AiFactory.d.ts.map +1 -0
  341. package/dist/lib/external/ai/AiFactory.js +219 -0
  342. package/dist/lib/external/ai/AiFactory.js.map +1 -0
  343. package/dist/lib/external/ai/AiProvider.d.ts +311 -0
  344. package/dist/lib/external/ai/AiProvider.d.ts.map +1 -0
  345. package/dist/lib/external/ai/AiProvider.js +756 -0
  346. package/dist/lib/external/ai/AiProvider.js.map +1 -0
  347. package/dist/lib/external/ai/providers/ClaudeProvider.d.ts +40 -0
  348. package/dist/lib/external/ai/providers/ClaudeProvider.d.ts.map +1 -0
  349. package/dist/lib/external/ai/providers/ClaudeProvider.js +269 -0
  350. package/dist/lib/external/ai/providers/ClaudeProvider.js.map +1 -0
  351. package/dist/lib/external/ai/providers/GoogleGeminiProvider.d.ts +46 -0
  352. package/dist/lib/external/ai/providers/GoogleGeminiProvider.d.ts.map +1 -0
  353. package/dist/lib/external/ai/providers/GoogleGeminiProvider.js +402 -0
  354. package/dist/lib/external/ai/providers/GoogleGeminiProvider.js.map +1 -0
  355. package/dist/lib/external/ai/providers/MockProvider.d.ts +34 -0
  356. package/dist/lib/external/ai/providers/MockProvider.d.ts.map +1 -0
  357. package/dist/lib/external/ai/providers/MockProvider.js +59 -0
  358. package/dist/lib/external/ai/providers/MockProvider.js.map +1 -0
  359. package/dist/lib/external/ai/providers/OpenAiProvider.d.ts +43 -0
  360. package/dist/lib/external/ai/providers/OpenAiProvider.d.ts.map +1 -0
  361. package/dist/lib/external/ai/providers/OpenAiProvider.js +271 -0
  362. package/dist/lib/external/ai/providers/OpenAiProvider.js.map +1 -0
  363. package/dist/lib/external/mcp/McpServer.d.ts +127 -0
  364. package/dist/lib/external/mcp/McpServer.d.ts.map +1 -0
  365. package/dist/lib/external/mcp/McpServer.js +429 -0
  366. package/dist/lib/external/mcp/McpServer.js.map +1 -0
  367. package/dist/lib/external/mcp/autoApproveInjector.d.ts +59 -0
  368. package/dist/lib/external/mcp/autoApproveInjector.d.ts.map +1 -0
  369. package/dist/lib/external/mcp/autoApproveInjector.js +148 -0
  370. package/dist/lib/external/mcp/autoApproveInjector.js.map +1 -0
  371. package/dist/lib/external/mcp/envelope.d.ts +41 -0
  372. package/dist/lib/external/mcp/envelope.d.ts.map +1 -0
  373. package/dist/lib/external/mcp/envelope.js +24 -0
  374. package/dist/lib/external/mcp/envelope.js.map +1 -0
  375. package/dist/lib/external/mcp/errorHandler.d.ts +33 -0
  376. package/dist/lib/external/mcp/errorHandler.d.ts.map +1 -0
  377. package/dist/lib/external/mcp/errorHandler.js +123 -0
  378. package/dist/lib/external/mcp/errorHandler.js.map +1 -0
  379. package/dist/lib/external/mcp/handlers/LanguageExtensions.d.ts +33 -0
  380. package/dist/lib/external/mcp/handlers/LanguageExtensions.d.ts.map +1 -0
  381. package/dist/lib/external/mcp/handlers/LanguageExtensions.js +941 -0
  382. package/dist/lib/external/mcp/handlers/LanguageExtensions.js.map +1 -0
  383. package/dist/lib/external/mcp/handlers/TargetClassifier.d.ts +12 -0
  384. package/dist/lib/external/mcp/handlers/TargetClassifier.d.ts.map +1 -0
  385. package/dist/lib/external/mcp/handlers/TargetClassifier.js +69 -0
  386. package/dist/lib/external/mcp/handlers/TargetClassifier.js.map +1 -0
  387. package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.d.ts +165 -0
  388. package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.d.ts.map +1 -0
  389. package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.js +230 -0
  390. package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.js.map +1 -0
  391. package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.d.ts +186 -0
  392. package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.d.ts.map +1 -0
  393. package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js +315 -0
  394. package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js.map +1 -0
  395. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts +299 -0
  396. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts.map +1 -0
  397. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +817 -0
  398. package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js.map +1 -0
  399. package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.d.ts +110 -0
  400. package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.d.ts.map +1 -0
  401. package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.js +219 -0
  402. package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.js.map +1 -0
  403. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.d.ts +168 -0
  404. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.d.ts.map +1 -0
  405. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js +535 -0
  406. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js.map +1 -0
  407. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.d.ts +87 -0
  408. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.d.ts.map +1 -0
  409. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js +190 -0
  410. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js.map +1 -0
  411. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.d.ts +33 -0
  412. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.d.ts.map +1 -0
  413. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js +86 -0
  414. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js.map +1 -0
  415. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.d.ts +148 -0
  416. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.d.ts.map +1 -0
  417. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js +186 -0
  418. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js.map +1 -0
  419. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.d.ts +154 -0
  420. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.d.ts.map +1 -0
  421. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js +213 -0
  422. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js.map +1 -0
  423. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.d.ts +170 -0
  424. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.d.ts.map +1 -0
  425. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js +728 -0
  426. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js.map +1 -0
  427. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts +53 -0
  428. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts.map +1 -0
  429. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +1287 -0
  430. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js.map +1 -0
  431. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.d.ts +65 -0
  432. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.d.ts.map +1 -0
  433. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js +154 -0
  434. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js.map +1 -0
  435. package/dist/lib/external/mcp/handlers/bootstrap/refine.d.ts +35 -0
  436. package/dist/lib/external/mcp/handlers/bootstrap/refine.d.ts.map +1 -0
  437. package/dist/lib/external/mcp/handlers/bootstrap/refine.js +343 -0
  438. package/dist/lib/external/mcp/handlers/bootstrap/refine.js.map +1 -0
  439. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +377 -0
  440. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts.map +1 -0
  441. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +776 -0
  442. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js.map +1 -0
  443. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.d.ts +371 -0
  444. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.d.ts.map +1 -0
  445. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js +809 -0
  446. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js.map +1 -0
  447. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.d.ts +172 -0
  448. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.d.ts.map +1 -0
  449. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js +212 -0
  450. package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js.map +1 -0
  451. package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.d.ts +43 -0
  452. package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.d.ts.map +1 -0
  453. package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js +237 -0
  454. package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js.map +1 -0
  455. package/dist/lib/external/mcp/handlers/bootstrap/skills.d.ts +68 -0
  456. package/dist/lib/external/mcp/handlers/bootstrap/skills.d.ts.map +1 -0
  457. package/dist/lib/external/mcp/handlers/bootstrap/skills.js +102 -0
  458. package/dist/lib/external/mcp/handlers/bootstrap/skills.js.map +1 -0
  459. package/dist/lib/external/mcp/handlers/bootstrap-external.d.ts +78 -0
  460. package/dist/lib/external/mcp/handlers/bootstrap-external.d.ts.map +1 -0
  461. package/dist/lib/external/mcp/handlers/bootstrap-external.js +163 -0
  462. package/dist/lib/external/mcp/handlers/bootstrap-external.js.map +1 -0
  463. package/dist/lib/external/mcp/handlers/bootstrap-internal.d.ts +111 -0
  464. package/dist/lib/external/mcp/handlers/bootstrap-internal.d.ts.map +1 -0
  465. package/dist/lib/external/mcp/handlers/bootstrap-internal.js +392 -0
  466. package/dist/lib/external/mcp/handlers/bootstrap-internal.js.map +1 -0
  467. package/dist/lib/external/mcp/handlers/browse.d.ts +151 -0
  468. package/dist/lib/external/mcp/handlers/browse.d.ts.map +1 -0
  469. package/dist/lib/external/mcp/handlers/browse.js +287 -0
  470. package/dist/lib/external/mcp/handlers/browse.js.map +1 -0
  471. package/dist/lib/external/mcp/handlers/candidate.d.ts +66 -0
  472. package/dist/lib/external/mcp/handlers/candidate.d.ts.map +1 -0
  473. package/dist/lib/external/mcp/handlers/candidate.js +224 -0
  474. package/dist/lib/external/mcp/handlers/candidate.js.map +1 -0
  475. package/dist/lib/external/mcp/handlers/consolidated.d.ts +446 -0
  476. package/dist/lib/external/mcp/handlers/consolidated.d.ts.map +1 -0
  477. package/dist/lib/external/mcp/handlers/consolidated.js +292 -0
  478. package/dist/lib/external/mcp/handlers/consolidated.js.map +1 -0
  479. package/dist/lib/external/mcp/handlers/dimension-complete-external.d.ts +57 -0
  480. package/dist/lib/external/mcp/handlers/dimension-complete-external.d.ts.map +1 -0
  481. package/dist/lib/external/mcp/handlers/dimension-complete-external.js +395 -0
  482. package/dist/lib/external/mcp/handlers/dimension-complete-external.js.map +1 -0
  483. package/dist/lib/external/mcp/handlers/guard.d.ts +275 -0
  484. package/dist/lib/external/mcp/handlers/guard.d.ts.map +1 -0
  485. package/dist/lib/external/mcp/handlers/guard.js +612 -0
  486. package/dist/lib/external/mcp/handlers/guard.js.map +1 -0
  487. package/dist/lib/external/mcp/handlers/knowledge.d.ts +110 -0
  488. package/dist/lib/external/mcp/handlers/knowledge.d.ts.map +1 -0
  489. package/dist/lib/external/mcp/handlers/knowledge.js +334 -0
  490. package/dist/lib/external/mcp/handlers/knowledge.js.map +1 -0
  491. package/dist/lib/external/mcp/handlers/search.d.ts +139 -0
  492. package/dist/lib/external/mcp/handlers/search.d.ts.map +1 -0
  493. package/dist/lib/external/mcp/handlers/search.js +265 -0
  494. package/dist/lib/external/mcp/handlers/search.js.map +1 -0
  495. package/dist/lib/external/mcp/handlers/skill.d.ts +83 -0
  496. package/dist/lib/external/mcp/handlers/skill.d.ts.map +1 -0
  497. package/dist/lib/external/mcp/handlers/skill.js +634 -0
  498. package/dist/lib/external/mcp/handlers/skill.js.map +1 -0
  499. package/dist/lib/external/mcp/handlers/structure.d.ts +189 -0
  500. package/dist/lib/external/mcp/handlers/structure.d.ts.map +1 -0
  501. package/dist/lib/external/mcp/handlers/structure.js +593 -0
  502. package/dist/lib/external/mcp/handlers/structure.js.map +1 -0
  503. package/dist/lib/external/mcp/handlers/system.d.ts +95 -0
  504. package/dist/lib/external/mcp/handlers/system.d.ts.map +1 -0
  505. package/dist/lib/external/mcp/handlers/system.js +259 -0
  506. package/dist/lib/external/mcp/handlers/system.js.map +1 -0
  507. package/dist/lib/external/mcp/handlers/task.d.ts +58 -0
  508. package/dist/lib/external/mcp/handlers/task.d.ts.map +1 -0
  509. package/dist/lib/external/mcp/handlers/task.js +652 -0
  510. package/dist/lib/external/mcp/handlers/task.js.map +1 -0
  511. package/dist/lib/external/mcp/handlers/types.d.ts +325 -0
  512. package/dist/lib/external/mcp/handlers/types.d.ts.map +1 -0
  513. package/dist/lib/external/mcp/handlers/types.js +6 -0
  514. package/dist/lib/external/mcp/handlers/types.js.map +1 -0
  515. package/dist/lib/external/mcp/handlers/wiki-external.d.ts +93 -0
  516. package/dist/lib/external/mcp/handlers/wiki-external.d.ts.map +1 -0
  517. package/dist/lib/external/mcp/handlers/wiki-external.js +571 -0
  518. package/dist/lib/external/mcp/handlers/wiki-external.js.map +1 -0
  519. package/dist/lib/external/mcp/tools.d.ts +75 -0
  520. package/dist/lib/external/mcp/tools.d.ts.map +1 -0
  521. package/dist/lib/external/mcp/tools.js +241 -0
  522. package/dist/lib/external/mcp/tools.js.map +1 -0
  523. package/dist/lib/external/mcp/zodToMcpSchema.d.ts +32 -0
  524. package/dist/lib/external/mcp/zodToMcpSchema.d.ts.map +1 -0
  525. package/dist/lib/external/mcp/zodToMcpSchema.js +84 -0
  526. package/dist/lib/external/mcp/zodToMcpSchema.js.map +1 -0
  527. package/dist/lib/http/HttpServer.d.ts +83 -0
  528. package/dist/lib/http/HttpServer.d.ts.map +1 -0
  529. package/dist/lib/http/HttpServer.js +437 -0
  530. package/dist/lib/http/HttpServer.js.map +1 -0
  531. package/dist/lib/http/api-spec.d.ts +232 -0
  532. package/dist/lib/http/api-spec.d.ts.map +1 -0
  533. package/dist/lib/http/api-spec.js +191 -0
  534. package/dist/lib/http/api-spec.js.map +1 -0
  535. package/dist/lib/http/middleware/RateLimiter.d.ts +31 -0
  536. package/dist/lib/http/middleware/RateLimiter.d.ts.map +1 -0
  537. package/dist/lib/http/middleware/RateLimiter.js +60 -0
  538. package/dist/lib/http/middleware/RateLimiter.js.map +1 -0
  539. package/dist/lib/http/middleware/errorHandler.d.ts +29 -0
  540. package/dist/lib/http/middleware/errorHandler.d.ts.map +1 -0
  541. package/dist/lib/http/middleware/errorHandler.js +80 -0
  542. package/dist/lib/http/middleware/errorHandler.js.map +1 -0
  543. package/dist/lib/http/middleware/gatewayMiddleware.d.ts +17 -0
  544. package/dist/lib/http/middleware/gatewayMiddleware.d.ts.map +1 -0
  545. package/dist/lib/http/middleware/gatewayMiddleware.js +63 -0
  546. package/dist/lib/http/middleware/gatewayMiddleware.js.map +1 -0
  547. package/dist/lib/http/middleware/requestLogger.d.ts +25 -0
  548. package/dist/lib/http/middleware/requestLogger.d.ts.map +1 -0
  549. package/dist/lib/http/middleware/requestLogger.js +67 -0
  550. package/dist/lib/http/middleware/requestLogger.js.map +1 -0
  551. package/dist/lib/http/middleware/roleResolver.d.ts +23 -0
  552. package/dist/lib/http/middleware/roleResolver.d.ts.map +1 -0
  553. package/dist/lib/http/middleware/roleResolver.js +107 -0
  554. package/dist/lib/http/middleware/roleResolver.js.map +1 -0
  555. package/dist/lib/http/middleware/validate.d.ts +41 -0
  556. package/dist/lib/http/middleware/validate.d.ts.map +1 -0
  557. package/dist/lib/http/middleware/validate.js +92 -0
  558. package/dist/lib/http/middleware/validate.js.map +1 -0
  559. package/dist/lib/http/routes/ai.d.ts +7 -0
  560. package/dist/lib/http/routes/ai.d.ts.map +1 -0
  561. package/dist/lib/http/routes/ai.js +764 -0
  562. package/dist/lib/http/routes/ai.js.map +1 -0
  563. package/dist/lib/http/routes/auth.d.ts +15 -0
  564. package/dist/lib/http/routes/auth.d.ts.map +1 -0
  565. package/dist/lib/http/routes/auth.js +126 -0
  566. package/dist/lib/http/routes/auth.js.map +1 -0
  567. package/dist/lib/http/routes/candidates.d.ts +7 -0
  568. package/dist/lib/http/routes/candidates.d.ts.map +1 -0
  569. package/dist/lib/http/routes/candidates.js +721 -0
  570. package/dist/lib/http/routes/candidates.js.map +1 -0
  571. package/dist/lib/http/routes/commands.d.ts +7 -0
  572. package/dist/lib/http/routes/commands.d.ts.map +1 -0
  573. package/dist/lib/http/routes/commands.js +281 -0
  574. package/dist/lib/http/routes/commands.js.map +1 -0
  575. package/dist/lib/http/routes/extract.d.ts +7 -0
  576. package/dist/lib/http/routes/extract.d.ts.map +1 -0
  577. package/dist/lib/http/routes/extract.js +163 -0
  578. package/dist/lib/http/routes/extract.js.map +1 -0
  579. package/dist/lib/http/routes/guard.d.ts +13 -0
  580. package/dist/lib/http/routes/guard.d.ts.map +1 -0
  581. package/dist/lib/http/routes/guard.js +228 -0
  582. package/dist/lib/http/routes/guard.js.map +1 -0
  583. package/dist/lib/http/routes/guardRules.d.ts +7 -0
  584. package/dist/lib/http/routes/guardRules.d.ts.map +1 -0
  585. package/dist/lib/http/routes/guardRules.js +307 -0
  586. package/dist/lib/http/routes/guardRules.js.map +1 -0
  587. package/dist/lib/http/routes/health.d.ts +6 -0
  588. package/dist/lib/http/routes/health.d.ts.map +1 -0
  589. package/dist/lib/http/routes/health.js +31 -0
  590. package/dist/lib/http/routes/health.js.map +1 -0
  591. package/dist/lib/http/routes/knowledge.d.ts +8 -0
  592. package/dist/lib/http/routes/knowledge.d.ts.map +1 -0
  593. package/dist/lib/http/routes/knowledge.js +214 -0
  594. package/dist/lib/http/routes/knowledge.js.map +1 -0
  595. package/dist/lib/http/routes/modules.d.ts +9 -0
  596. package/dist/lib/http/routes/modules.d.ts.map +1 -0
  597. package/dist/lib/http/routes/modules.js +459 -0
  598. package/dist/lib/http/routes/modules.js.map +1 -0
  599. package/dist/lib/http/routes/monitoring.d.ts +7 -0
  600. package/dist/lib/http/routes/monitoring.d.ts.map +1 -0
  601. package/dist/lib/http/routes/monitoring.js +311 -0
  602. package/dist/lib/http/routes/monitoring.js.map +1 -0
  603. package/dist/lib/http/routes/recipes.d.ts +10 -0
  604. package/dist/lib/http/routes/recipes.d.ts.map +1 -0
  605. package/dist/lib/http/routes/recipes.js +147 -0
  606. package/dist/lib/http/routes/recipes.js.map +1 -0
  607. package/dist/lib/http/routes/remote.d.ts +41 -0
  608. package/dist/lib/http/routes/remote.d.ts.map +1 -0
  609. package/dist/lib/http/routes/remote.js +941 -0
  610. package/dist/lib/http/routes/remote.js.map +1 -0
  611. package/dist/lib/http/routes/search.d.ts +7 -0
  612. package/dist/lib/http/routes/search.d.ts.map +1 -0
  613. package/dist/lib/http/routes/search.js +380 -0
  614. package/dist/lib/http/routes/search.js.map +1 -0
  615. package/dist/lib/http/routes/skills.d.ts +7 -0
  616. package/dist/lib/http/routes/skills.d.ts.map +1 -0
  617. package/dist/lib/http/routes/skills.js +197 -0
  618. package/dist/lib/http/routes/skills.js.map +1 -0
  619. package/dist/lib/http/routes/snippets.d.ts +7 -0
  620. package/dist/lib/http/routes/snippets.d.ts.map +1 -0
  621. package/dist/lib/http/routes/snippets.js +51 -0
  622. package/dist/lib/http/routes/snippets.js.map +1 -0
  623. package/dist/lib/http/routes/task.d.ts +13 -0
  624. package/dist/lib/http/routes/task.d.ts.map +1 -0
  625. package/dist/lib/http/routes/task.js +384 -0
  626. package/dist/lib/http/routes/task.js.map +1 -0
  627. package/dist/lib/http/routes/violations.d.ts +7 -0
  628. package/dist/lib/http/routes/violations.d.ts.map +1 -0
  629. package/dist/lib/http/routes/violations.js +71 -0
  630. package/dist/lib/http/routes/violations.js.map +1 -0
  631. package/dist/lib/http/routes/wiki.d.ts +27 -0
  632. package/dist/lib/http/routes/wiki.d.ts.map +1 -0
  633. package/dist/lib/http/routes/wiki.js +312 -0
  634. package/dist/lib/http/routes/wiki.js.map +1 -0
  635. package/dist/lib/http/utils/routeHelpers.d.ts +48 -0
  636. package/dist/lib/http/utils/routeHelpers.d.ts.map +1 -0
  637. package/dist/lib/http/utils/routeHelpers.js +61 -0
  638. package/dist/lib/http/utils/routeHelpers.js.map +1 -0
  639. package/dist/lib/http/utils/sse-sessions.d.ts +59 -0
  640. package/dist/lib/http/utils/sse-sessions.d.ts.map +1 -0
  641. package/dist/lib/http/utils/sse-sessions.js +111 -0
  642. package/dist/lib/http/utils/sse-sessions.js.map +1 -0
  643. package/dist/lib/http/utils/sse.d.ts +50 -0
  644. package/dist/lib/http/utils/sse.d.ts.map +1 -0
  645. package/dist/lib/http/utils/sse.js +125 -0
  646. package/dist/lib/http/utils/sse.js.map +1 -0
  647. package/dist/lib/infrastructure/audit/AuditLogger.d.ts +123 -0
  648. package/dist/lib/infrastructure/audit/AuditLogger.d.ts.map +1 -0
  649. package/dist/lib/infrastructure/audit/AuditLogger.js +110 -0
  650. package/dist/lib/infrastructure/audit/AuditLogger.js.map +1 -0
  651. package/dist/lib/infrastructure/audit/AuditStore.d.ts +125 -0
  652. package/dist/lib/infrastructure/audit/AuditStore.d.ts.map +1 -0
  653. package/dist/lib/infrastructure/audit/AuditStore.js +194 -0
  654. package/dist/lib/infrastructure/audit/AuditStore.js.map +1 -0
  655. package/dist/lib/infrastructure/cache/CacheService.d.ts +69 -0
  656. package/dist/lib/infrastructure/cache/CacheService.d.ts.map +1 -0
  657. package/dist/lib/infrastructure/cache/CacheService.js +132 -0
  658. package/dist/lib/infrastructure/cache/CacheService.js.map +1 -0
  659. package/dist/lib/infrastructure/cache/GraphCache.d.ts +66 -0
  660. package/dist/lib/infrastructure/cache/GraphCache.d.ts.map +1 -0
  661. package/dist/lib/infrastructure/cache/GraphCache.js +141 -0
  662. package/dist/lib/infrastructure/cache/GraphCache.js.map +1 -0
  663. package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.d.ts +61 -0
  664. package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.d.ts.map +1 -0
  665. package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.js +110 -0
  666. package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.js.map +1 -0
  667. package/dist/lib/infrastructure/config/ConfigLoader.d.ts +20 -0
  668. package/dist/lib/infrastructure/config/ConfigLoader.d.ts.map +1 -0
  669. package/dist/lib/infrastructure/config/ConfigLoader.js +131 -0
  670. package/dist/lib/infrastructure/config/ConfigLoader.js.map +1 -0
  671. package/dist/lib/infrastructure/config/Defaults.d.ts +76 -0
  672. package/dist/lib/infrastructure/config/Defaults.d.ts.map +1 -0
  673. package/dist/lib/infrastructure/config/Defaults.js +84 -0
  674. package/dist/lib/infrastructure/config/Defaults.js.map +1 -0
  675. package/dist/lib/infrastructure/config/Paths.d.ts +97 -0
  676. package/dist/lib/infrastructure/config/Paths.d.ts.map +1 -0
  677. package/dist/lib/infrastructure/config/Paths.js +154 -0
  678. package/dist/lib/infrastructure/config/Paths.js.map +1 -0
  679. package/dist/lib/infrastructure/config/TriggerSymbol.d.ts +21 -0
  680. package/dist/lib/infrastructure/config/TriggerSymbol.d.ts.map +1 -0
  681. package/dist/lib/infrastructure/config/TriggerSymbol.js +67 -0
  682. package/dist/lib/infrastructure/config/TriggerSymbol.js.map +1 -0
  683. package/dist/lib/infrastructure/database/DatabaseConnection.d.ts +44 -0
  684. package/dist/lib/infrastructure/database/DatabaseConnection.d.ts.map +1 -0
  685. package/dist/lib/infrastructure/database/DatabaseConnection.js +152 -0
  686. package/dist/lib/infrastructure/database/DatabaseConnection.js.map +1 -0
  687. package/dist/lib/infrastructure/database/drizzle/index.d.ts +27 -0
  688. package/dist/lib/infrastructure/database/drizzle/index.d.ts.map +1 -0
  689. package/dist/lib/infrastructure/database/drizzle/index.js +38 -0
  690. package/dist/lib/infrastructure/database/drizzle/index.js.map +1 -0
  691. package/dist/lib/infrastructure/database/drizzle/schema.d.ts +3716 -0
  692. package/dist/lib/infrastructure/database/drizzle/schema.d.ts.map +1 -0
  693. package/dist/lib/infrastructure/database/drizzle/schema.js +373 -0
  694. package/dist/lib/infrastructure/database/drizzle/schema.js.map +1 -0
  695. package/dist/lib/infrastructure/database/migrations/001_initial_schema.d.ts +20 -0
  696. package/dist/lib/infrastructure/database/migrations/001_initial_schema.d.ts.map +1 -0
  697. package/dist/lib/infrastructure/database/migrations/001_initial_schema.js +306 -0
  698. package/dist/lib/infrastructure/database/migrations/001_initial_schema.js.map +1 -0
  699. package/dist/lib/infrastructure/database/migrations/002_add_tasks.d.ts +12 -0
  700. package/dist/lib/infrastructure/database/migrations/002_add_tasks.d.ts.map +1 -0
  701. package/dist/lib/infrastructure/database/migrations/002_add_tasks.js +87 -0
  702. package/dist/lib/infrastructure/database/migrations/002_add_tasks.js.map +1 -0
  703. package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.d.ts +8 -0
  704. package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.d.ts.map +1 -0
  705. package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.js +28 -0
  706. package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.js.map +1 -0
  707. package/dist/lib/infrastructure/event/EventBus.d.ts +45 -0
  708. package/dist/lib/infrastructure/event/EventBus.d.ts.map +1 -0
  709. package/dist/lib/infrastructure/event/EventBus.js +75 -0
  710. package/dist/lib/infrastructure/event/EventBus.js.map +1 -0
  711. package/dist/lib/infrastructure/external/ClipboardManager.d.ts +29 -0
  712. package/dist/lib/infrastructure/external/ClipboardManager.d.ts.map +1 -0
  713. package/dist/lib/infrastructure/external/ClipboardManager.js +151 -0
  714. package/dist/lib/infrastructure/external/ClipboardManager.js.map +1 -0
  715. package/dist/lib/infrastructure/external/NativeUi.d.ts +59 -0
  716. package/dist/lib/infrastructure/external/NativeUi.d.ts.map +1 -0
  717. package/dist/lib/infrastructure/external/NativeUi.js +290 -0
  718. package/dist/lib/infrastructure/external/NativeUi.js.map +1 -0
  719. package/dist/lib/infrastructure/external/OpenBrowser.d.ts +20 -0
  720. package/dist/lib/infrastructure/external/OpenBrowser.d.ts.map +1 -0
  721. package/dist/lib/infrastructure/external/OpenBrowser.js +122 -0
  722. package/dist/lib/infrastructure/external/OpenBrowser.js.map +1 -0
  723. package/dist/lib/infrastructure/logging/Logger.d.ts +34 -0
  724. package/dist/lib/infrastructure/logging/Logger.d.ts.map +1 -0
  725. package/dist/lib/infrastructure/logging/Logger.js +156 -0
  726. package/dist/lib/infrastructure/logging/Logger.js.map +1 -0
  727. package/dist/lib/infrastructure/monitoring/ErrorTracker.d.ts +158 -0
  728. package/dist/lib/infrastructure/monitoring/ErrorTracker.d.ts.map +1 -0
  729. package/dist/lib/infrastructure/monitoring/ErrorTracker.js +295 -0
  730. package/dist/lib/infrastructure/monitoring/ErrorTracker.js.map +1 -0
  731. package/dist/lib/infrastructure/monitoring/PerformanceMonitor.d.ts +121 -0
  732. package/dist/lib/infrastructure/monitoring/PerformanceMonitor.d.ts.map +1 -0
  733. package/dist/lib/infrastructure/monitoring/PerformanceMonitor.js +250 -0
  734. package/dist/lib/infrastructure/monitoring/PerformanceMonitor.js.map +1 -0
  735. package/dist/lib/infrastructure/paths/HeaderResolver.d.ts +45 -0
  736. package/dist/lib/infrastructure/paths/HeaderResolver.d.ts.map +1 -0
  737. package/dist/lib/infrastructure/paths/HeaderResolver.js +102 -0
  738. package/dist/lib/infrastructure/paths/HeaderResolver.js.map +1 -0
  739. package/dist/lib/infrastructure/paths/PathFinder.d.ts +38 -0
  740. package/dist/lib/infrastructure/paths/PathFinder.d.ts.map +1 -0
  741. package/dist/lib/infrastructure/paths/PathFinder.js +127 -0
  742. package/dist/lib/infrastructure/paths/PathFinder.js.map +1 -0
  743. package/dist/lib/infrastructure/realtime/RealtimeService.d.ts +59 -0
  744. package/dist/lib/infrastructure/realtime/RealtimeService.d.ts.map +1 -0
  745. package/dist/lib/infrastructure/realtime/RealtimeService.js +160 -0
  746. package/dist/lib/infrastructure/realtime/RealtimeService.js.map +1 -0
  747. package/dist/lib/infrastructure/vector/ASTChunker.d.ts +73 -0
  748. package/dist/lib/infrastructure/vector/ASTChunker.d.ts.map +1 -0
  749. package/dist/lib/infrastructure/vector/ASTChunker.js +389 -0
  750. package/dist/lib/infrastructure/vector/ASTChunker.js.map +1 -0
  751. package/dist/lib/infrastructure/vector/AsyncPersistence.d.ts +90 -0
  752. package/dist/lib/infrastructure/vector/AsyncPersistence.d.ts.map +1 -0
  753. package/dist/lib/infrastructure/vector/AsyncPersistence.js +292 -0
  754. package/dist/lib/infrastructure/vector/AsyncPersistence.js.map +1 -0
  755. package/dist/lib/infrastructure/vector/BatchEmbedder.d.ts +42 -0
  756. package/dist/lib/infrastructure/vector/BatchEmbedder.d.ts.map +1 -0
  757. package/dist/lib/infrastructure/vector/BatchEmbedder.js +130 -0
  758. package/dist/lib/infrastructure/vector/BatchEmbedder.js.map +1 -0
  759. package/dist/lib/infrastructure/vector/BinaryPersistence.d.ts +169 -0
  760. package/dist/lib/infrastructure/vector/BinaryPersistence.d.ts.map +1 -0
  761. package/dist/lib/infrastructure/vector/BinaryPersistence.js +394 -0
  762. package/dist/lib/infrastructure/vector/BinaryPersistence.js.map +1 -0
  763. package/dist/lib/infrastructure/vector/Chunker.d.ts +34 -0
  764. package/dist/lib/infrastructure/vector/Chunker.d.ts.map +1 -0
  765. package/dist/lib/infrastructure/vector/Chunker.js +203 -0
  766. package/dist/lib/infrastructure/vector/Chunker.js.map +1 -0
  767. package/dist/lib/infrastructure/vector/HnswIndex.d.ts +208 -0
  768. package/dist/lib/infrastructure/vector/HnswIndex.d.ts.map +1 -0
  769. package/dist/lib/infrastructure/vector/HnswIndex.js +660 -0
  770. package/dist/lib/infrastructure/vector/HnswIndex.js.map +1 -0
  771. package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts +145 -0
  772. package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts.map +1 -0
  773. package/dist/lib/infrastructure/vector/HnswVectorAdapter.js +747 -0
  774. package/dist/lib/infrastructure/vector/HnswVectorAdapter.js.map +1 -0
  775. package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts +68 -0
  776. package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts.map +1 -0
  777. package/dist/lib/infrastructure/vector/IndexingPipeline.js +236 -0
  778. package/dist/lib/infrastructure/vector/IndexingPipeline.js.map +1 -0
  779. package/dist/lib/infrastructure/vector/JsonVectorAdapter.d.ts +80 -0
  780. package/dist/lib/infrastructure/vector/JsonVectorAdapter.d.ts.map +1 -0
  781. package/dist/lib/infrastructure/vector/JsonVectorAdapter.js +253 -0
  782. package/dist/lib/infrastructure/vector/JsonVectorAdapter.js.map +1 -0
  783. package/dist/lib/infrastructure/vector/ScalarQuantizer.d.ts +88 -0
  784. package/dist/lib/infrastructure/vector/ScalarQuantizer.d.ts.map +1 -0
  785. package/dist/lib/infrastructure/vector/ScalarQuantizer.js +202 -0
  786. package/dist/lib/infrastructure/vector/ScalarQuantizer.js.map +1 -0
  787. package/dist/lib/infrastructure/vector/VectorMigration.d.ts +34 -0
  788. package/dist/lib/infrastructure/vector/VectorMigration.d.ts.map +1 -0
  789. package/dist/lib/infrastructure/vector/VectorMigration.js +87 -0
  790. package/dist/lib/infrastructure/vector/VectorMigration.js.map +1 -0
  791. package/dist/lib/infrastructure/vector/VectorStore.d.ts +81 -0
  792. package/dist/lib/infrastructure/vector/VectorStore.d.ts.map +1 -0
  793. package/dist/lib/infrastructure/vector/VectorStore.js +89 -0
  794. package/dist/lib/infrastructure/vector/VectorStore.js.map +1 -0
  795. package/dist/lib/injection/ServiceContainer.d.ts +99 -0
  796. package/dist/lib/injection/ServiceContainer.d.ts.map +1 -0
  797. package/dist/lib/injection/ServiceContainer.js +451 -0
  798. package/dist/lib/injection/ServiceContainer.js.map +1 -0
  799. package/dist/lib/injection/modules/AgentModule.d.ts +11 -0
  800. package/dist/lib/injection/modules/AgentModule.d.ts.map +1 -0
  801. package/dist/lib/injection/modules/AgentModule.js +33 -0
  802. package/dist/lib/injection/modules/AgentModule.js.map +1 -0
  803. package/dist/lib/injection/modules/AppModule.d.ts +20 -0
  804. package/dist/lib/injection/modules/AppModule.d.ts.map +1 -0
  805. package/dist/lib/injection/modules/AppModule.js +93 -0
  806. package/dist/lib/injection/modules/AppModule.js.map +1 -0
  807. package/dist/lib/injection/modules/GuardModule.d.ts +13 -0
  808. package/dist/lib/injection/modules/GuardModule.d.ts.map +1 -0
  809. package/dist/lib/injection/modules/GuardModule.js +52 -0
  810. package/dist/lib/injection/modules/GuardModule.js.map +1 -0
  811. package/dist/lib/injection/modules/InfraModule.d.ts +14 -0
  812. package/dist/lib/injection/modules/InfraModule.d.ts.map +1 -0
  813. package/dist/lib/injection/modules/InfraModule.js +63 -0
  814. package/dist/lib/injection/modules/InfraModule.js.map +1 -0
  815. package/dist/lib/injection/modules/KnowledgeModule.d.ts +14 -0
  816. package/dist/lib/injection/modules/KnowledgeModule.d.ts.map +1 -0
  817. package/dist/lib/injection/modules/KnowledgeModule.js +134 -0
  818. package/dist/lib/injection/modules/KnowledgeModule.js.map +1 -0
  819. package/dist/lib/platform/ScreenCaptureService.d.ts +74 -0
  820. package/dist/lib/platform/ScreenCaptureService.d.ts.map +1 -0
  821. package/dist/lib/platform/ScreenCaptureService.js +161 -0
  822. package/dist/lib/platform/ScreenCaptureService.js.map +1 -0
  823. package/dist/lib/platform/ios/index.d.ts +39 -0
  824. package/dist/lib/platform/ios/index.d.ts.map +1 -0
  825. package/dist/lib/platform/ios/index.js +43 -0
  826. package/dist/lib/platform/ios/index.js.map +1 -0
  827. package/dist/lib/platform/ios/routes/spm.d.ts +10 -0
  828. package/dist/lib/platform/ios/routes/spm.d.ts.map +1 -0
  829. package/dist/lib/platform/ios/routes/spm.js +375 -0
  830. package/dist/lib/platform/ios/routes/spm.js.map +1 -0
  831. package/dist/lib/platform/ios/snippet/PlaceholderConverter.d.ts +30 -0
  832. package/dist/lib/platform/ios/snippet/PlaceholderConverter.d.ts.map +1 -0
  833. package/dist/lib/platform/ios/snippet/PlaceholderConverter.js +57 -0
  834. package/dist/lib/platform/ios/snippet/PlaceholderConverter.js.map +1 -0
  835. package/dist/lib/platform/ios/snippet/XcodeCodec.d.ts +30 -0
  836. package/dist/lib/platform/ios/snippet/XcodeCodec.d.ts.map +1 -0
  837. package/dist/lib/platform/ios/snippet/XcodeCodec.js +103 -0
  838. package/dist/lib/platform/ios/snippet/XcodeCodec.js.map +1 -0
  839. package/dist/lib/platform/ios/spm/DependencyGraph.d.ts +71 -0
  840. package/dist/lib/platform/ios/spm/DependencyGraph.d.ts.map +1 -0
  841. package/dist/lib/platform/ios/spm/DependencyGraph.js +210 -0
  842. package/dist/lib/platform/ios/spm/DependencyGraph.js.map +1 -0
  843. package/dist/lib/platform/ios/spm/PackageSwiftParser.d.ts +76 -0
  844. package/dist/lib/platform/ios/spm/PackageSwiftParser.d.ts.map +1 -0
  845. package/dist/lib/platform/ios/spm/PackageSwiftParser.js +238 -0
  846. package/dist/lib/platform/ios/spm/PackageSwiftParser.js.map +1 -0
  847. package/dist/lib/platform/ios/spm/PolicyEngine.d.ts +49 -0
  848. package/dist/lib/platform/ios/spm/PolicyEngine.d.ts.map +1 -0
  849. package/dist/lib/platform/ios/spm/PolicyEngine.js +82 -0
  850. package/dist/lib/platform/ios/spm/PolicyEngine.js.map +1 -0
  851. package/dist/lib/platform/ios/spm/SpmDiscoverer.d.ts +56 -0
  852. package/dist/lib/platform/ios/spm/SpmDiscoverer.d.ts.map +1 -0
  853. package/dist/lib/platform/ios/spm/SpmDiscoverer.js +312 -0
  854. package/dist/lib/platform/ios/spm/SpmDiscoverer.js.map +1 -0
  855. package/dist/lib/platform/ios/spm/SpmHelper.d.ts +106 -0
  856. package/dist/lib/platform/ios/spm/SpmHelper.d.ts.map +1 -0
  857. package/dist/lib/platform/ios/spm/SpmHelper.js +479 -0
  858. package/dist/lib/platform/ios/spm/SpmHelper.js.map +1 -0
  859. package/dist/lib/platform/ios/xcode/SaveEventFilter.d.ts +69 -0
  860. package/dist/lib/platform/ios/xcode/SaveEventFilter.d.ts.map +1 -0
  861. package/dist/lib/platform/ios/xcode/SaveEventFilter.js +145 -0
  862. package/dist/lib/platform/ios/xcode/SaveEventFilter.js.map +1 -0
  863. package/dist/lib/platform/ios/xcode/XcodeAutomation.d.ts +76 -0
  864. package/dist/lib/platform/ios/xcode/XcodeAutomation.d.ts.map +1 -0
  865. package/dist/lib/platform/ios/xcode/XcodeAutomation.js +333 -0
  866. package/dist/lib/platform/ios/xcode/XcodeAutomation.js.map +1 -0
  867. package/dist/lib/platform/ios/xcode/XcodeImportResolver.d.ts +138 -0
  868. package/dist/lib/platform/ios/xcode/XcodeImportResolver.d.ts.map +1 -0
  869. package/dist/lib/platform/ios/xcode/XcodeImportResolver.js +412 -0
  870. package/dist/lib/platform/ios/xcode/XcodeImportResolver.js.map +1 -0
  871. package/dist/lib/platform/ios/xcode/XcodeIntegration.d.ts +98 -0
  872. package/dist/lib/platform/ios/xcode/XcodeIntegration.d.ts.map +1 -0
  873. package/dist/lib/platform/ios/xcode/XcodeIntegration.js +597 -0
  874. package/dist/lib/platform/ios/xcode/XcodeIntegration.js.map +1 -0
  875. package/dist/lib/platform/ios/xcode/XcodeWriteUtils.d.ts +105 -0
  876. package/dist/lib/platform/ios/xcode/XcodeWriteUtils.d.ts.map +1 -0
  877. package/dist/lib/platform/ios/xcode/XcodeWriteUtils.js +196 -0
  878. package/dist/lib/platform/ios/xcode/XcodeWriteUtils.js.map +1 -0
  879. package/dist/lib/repository/base/BaseRepository.d.ts +72 -0
  880. package/dist/lib/repository/base/BaseRepository.d.ts.map +1 -0
  881. package/dist/lib/repository/base/BaseRepository.js +245 -0
  882. package/dist/lib/repository/base/BaseRepository.js.map +1 -0
  883. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts +199 -0
  884. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts.map +1 -0
  885. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js +321 -0
  886. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js.map +1 -0
  887. package/dist/lib/repository/remote/RemoteCommandRepository.d.ts +114 -0
  888. package/dist/lib/repository/remote/RemoteCommandRepository.d.ts.map +1 -0
  889. package/dist/lib/repository/remote/RemoteCommandRepository.js +242 -0
  890. package/dist/lib/repository/remote/RemoteCommandRepository.js.map +1 -0
  891. package/dist/lib/repository/task/TaskRepository.impl.d.ts +188 -0
  892. package/dist/lib/repository/task/TaskRepository.impl.d.ts.map +1 -0
  893. package/dist/lib/repository/task/TaskRepository.impl.js +369 -0
  894. package/dist/lib/repository/task/TaskRepository.impl.js.map +1 -0
  895. package/dist/lib/repository/token/TokenUsageStore.d.ts +90 -0
  896. package/dist/lib/repository/token/TokenUsageStore.d.ts.map +1 -0
  897. package/dist/lib/repository/token/TokenUsageStore.js +160 -0
  898. package/dist/lib/repository/token/TokenUsageStore.js.map +1 -0
  899. package/dist/lib/service/agent/AgentEventBus.d.ts +103 -0
  900. package/dist/lib/service/agent/AgentEventBus.d.ts.map +1 -0
  901. package/dist/lib/service/agent/AgentEventBus.js +187 -0
  902. package/dist/lib/service/agent/AgentEventBus.js.map +1 -0
  903. package/dist/lib/service/agent/AgentFactory.d.ts +251 -0
  904. package/dist/lib/service/agent/AgentFactory.d.ts.map +1 -0
  905. package/dist/lib/service/agent/AgentFactory.js +494 -0
  906. package/dist/lib/service/agent/AgentFactory.js.map +1 -0
  907. package/dist/lib/service/agent/AgentMessage.d.ts +226 -0
  908. package/dist/lib/service/agent/AgentMessage.d.ts.map +1 -0
  909. package/dist/lib/service/agent/AgentMessage.js +227 -0
  910. package/dist/lib/service/agent/AgentMessage.js.map +1 -0
  911. package/dist/lib/service/agent/AgentRouter.d.ts +86 -0
  912. package/dist/lib/service/agent/AgentRouter.d.ts.map +1 -0
  913. package/dist/lib/service/agent/AgentRouter.js +224 -0
  914. package/dist/lib/service/agent/AgentRouter.js.map +1 -0
  915. package/dist/lib/service/agent/AgentRuntime.d.ts +247 -0
  916. package/dist/lib/service/agent/AgentRuntime.d.ts.map +1 -0
  917. package/dist/lib/service/agent/AgentRuntime.js +947 -0
  918. package/dist/lib/service/agent/AgentRuntime.js.map +1 -0
  919. package/dist/lib/service/agent/AgentState.d.ts +120 -0
  920. package/dist/lib/service/agent/AgentState.d.ts.map +1 -0
  921. package/dist/lib/service/agent/AgentState.js +198 -0
  922. package/dist/lib/service/agent/AgentState.js.map +1 -0
  923. package/dist/lib/service/agent/ConversationStore.d.ts +120 -0
  924. package/dist/lib/service/agent/ConversationStore.d.ts.map +1 -0
  925. package/dist/lib/service/agent/ConversationStore.js +373 -0
  926. package/dist/lib/service/agent/ConversationStore.js.map +1 -0
  927. package/dist/lib/service/agent/IntentClassifier.d.ts +64 -0
  928. package/dist/lib/service/agent/IntentClassifier.d.ts.map +1 -0
  929. package/dist/lib/service/agent/IntentClassifier.js +307 -0
  930. package/dist/lib/service/agent/IntentClassifier.js.map +1 -0
  931. package/dist/lib/service/agent/LarkTransport.d.ts +104 -0
  932. package/dist/lib/service/agent/LarkTransport.d.ts.map +1 -0
  933. package/dist/lib/service/agent/LarkTransport.js +486 -0
  934. package/dist/lib/service/agent/LarkTransport.js.map +1 -0
  935. package/dist/lib/service/agent/PipelineStrategy.d.ts +114 -0
  936. package/dist/lib/service/agent/PipelineStrategy.d.ts.map +1 -0
  937. package/dist/lib/service/agent/PipelineStrategy.js +402 -0
  938. package/dist/lib/service/agent/PipelineStrategy.js.map +1 -0
  939. package/dist/lib/service/agent/capabilities.d.ts +207 -0
  940. package/dist/lib/service/agent/capabilities.d.ts.map +1 -0
  941. package/dist/lib/service/agent/capabilities.js +405 -0
  942. package/dist/lib/service/agent/capabilities.js.map +1 -0
  943. package/dist/lib/service/agent/context/ContextWindow.d.ts +192 -0
  944. package/dist/lib/service/agent/context/ContextWindow.d.ts.map +1 -0
  945. package/dist/lib/service/agent/context/ContextWindow.js +610 -0
  946. package/dist/lib/service/agent/context/ContextWindow.js.map +1 -0
  947. package/dist/lib/service/agent/context/ExplorationTracker.d.ts +181 -0
  948. package/dist/lib/service/agent/context/ExplorationTracker.d.ts.map +1 -0
  949. package/dist/lib/service/agent/context/ExplorationTracker.js +491 -0
  950. package/dist/lib/service/agent/context/ExplorationTracker.js.map +1 -0
  951. package/dist/lib/service/agent/context/exploration/ExplorationStrategies.d.ts +173 -0
  952. package/dist/lib/service/agent/context/exploration/ExplorationStrategies.d.ts.map +1 -0
  953. package/dist/lib/service/agent/context/exploration/ExplorationStrategies.js +119 -0
  954. package/dist/lib/service/agent/context/exploration/ExplorationStrategies.js.map +1 -0
  955. package/dist/lib/service/agent/context/exploration/NudgeGenerator.d.ts +79 -0
  956. package/dist/lib/service/agent/context/exploration/NudgeGenerator.d.ts.map +1 -0
  957. package/dist/lib/service/agent/context/exploration/NudgeGenerator.js +307 -0
  958. package/dist/lib/service/agent/context/exploration/NudgeGenerator.js.map +1 -0
  959. package/dist/lib/service/agent/context/exploration/PlanTracker.d.ts +91 -0
  960. package/dist/lib/service/agent/context/exploration/PlanTracker.d.ts.map +1 -0
  961. package/dist/lib/service/agent/context/exploration/PlanTracker.js +303 -0
  962. package/dist/lib/service/agent/context/exploration/PlanTracker.js.map +1 -0
  963. package/dist/lib/service/agent/context/exploration/SignalDetector.d.ts +38 -0
  964. package/dist/lib/service/agent/context/exploration/SignalDetector.d.ts.map +1 -0
  965. package/dist/lib/service/agent/context/exploration/SignalDetector.js +164 -0
  966. package/dist/lib/service/agent/context/exploration/SignalDetector.js.map +1 -0
  967. package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts +52 -0
  968. package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts.map +1 -0
  969. package/dist/lib/service/agent/core/ChatAgentPrompts.js +151 -0
  970. package/dist/lib/service/agent/core/ChatAgentPrompts.js.map +1 -0
  971. package/dist/lib/service/agent/core/LLMResultType.d.ts +32 -0
  972. package/dist/lib/service/agent/core/LLMResultType.d.ts.map +1 -0
  973. package/dist/lib/service/agent/core/LLMResultType.js +32 -0
  974. package/dist/lib/service/agent/core/LLMResultType.js.map +1 -0
  975. package/dist/lib/service/agent/core/LoopContext.d.ts +158 -0
  976. package/dist/lib/service/agent/core/LoopContext.d.ts.map +1 -0
  977. package/dist/lib/service/agent/core/LoopContext.js +139 -0
  978. package/dist/lib/service/agent/core/LoopContext.js.map +1 -0
  979. package/dist/lib/service/agent/core/MessageAdapter.d.ts +154 -0
  980. package/dist/lib/service/agent/core/MessageAdapter.d.ts.map +1 -0
  981. package/dist/lib/service/agent/core/MessageAdapter.js +206 -0
  982. package/dist/lib/service/agent/core/MessageAdapter.js.map +1 -0
  983. package/dist/lib/service/agent/core/SystemPromptBuilder.d.ts +86 -0
  984. package/dist/lib/service/agent/core/SystemPromptBuilder.d.ts.map +1 -0
  985. package/dist/lib/service/agent/core/SystemPromptBuilder.js +115 -0
  986. package/dist/lib/service/agent/core/SystemPromptBuilder.js.map +1 -0
  987. package/dist/lib/service/agent/core/ToolExecutionPipeline.d.ts +186 -0
  988. package/dist/lib/service/agent/core/ToolExecutionPipeline.d.ts.map +1 -0
  989. package/dist/lib/service/agent/core/ToolExecutionPipeline.js +334 -0
  990. package/dist/lib/service/agent/core/ToolExecutionPipeline.js.map +1 -0
  991. package/dist/lib/service/agent/domain/ChatAgentTasks.d.ts +134 -0
  992. package/dist/lib/service/agent/domain/ChatAgentTasks.d.ts.map +1 -0
  993. package/dist/lib/service/agent/domain/ChatAgentTasks.js +182 -0
  994. package/dist/lib/service/agent/domain/ChatAgentTasks.js.map +1 -0
  995. package/dist/lib/service/agent/domain/EpisodicConsolidator.d.ts +110 -0
  996. package/dist/lib/service/agent/domain/EpisodicConsolidator.d.ts.map +1 -0
  997. package/dist/lib/service/agent/domain/EpisodicConsolidator.js +317 -0
  998. package/dist/lib/service/agent/domain/EpisodicConsolidator.js.map +1 -0
  999. package/dist/lib/service/agent/domain/EvidenceCollector.d.ts +152 -0
  1000. package/dist/lib/service/agent/domain/EvidenceCollector.d.ts.map +1 -0
  1001. package/dist/lib/service/agent/domain/EvidenceCollector.js +478 -0
  1002. package/dist/lib/service/agent/domain/EvidenceCollector.js.map +1 -0
  1003. package/dist/lib/service/agent/domain/insight-analyst.d.ts +96 -0
  1004. package/dist/lib/service/agent/domain/insight-analyst.d.ts.map +1 -0
  1005. package/dist/lib/service/agent/domain/insight-analyst.js +224 -0
  1006. package/dist/lib/service/agent/domain/insight-analyst.js.map +1 -0
  1007. package/dist/lib/service/agent/domain/insight-gate.d.ts +223 -0
  1008. package/dist/lib/service/agent/domain/insight-gate.d.ts.map +1 -0
  1009. package/dist/lib/service/agent/domain/insight-gate.js +417 -0
  1010. package/dist/lib/service/agent/domain/insight-gate.js.map +1 -0
  1011. package/dist/lib/service/agent/domain/insight-producer.d.ts +123 -0
  1012. package/dist/lib/service/agent/domain/insight-producer.d.ts.map +1 -0
  1013. package/dist/lib/service/agent/domain/insight-producer.js +243 -0
  1014. package/dist/lib/service/agent/domain/insight-producer.js.map +1 -0
  1015. package/dist/lib/service/agent/domain/scan-prompts.d.ts +145 -0
  1016. package/dist/lib/service/agent/domain/scan-prompts.d.ts.map +1 -0
  1017. package/dist/lib/service/agent/domain/scan-prompts.js +413 -0
  1018. package/dist/lib/service/agent/domain/scan-prompts.js.map +1 -0
  1019. package/dist/lib/service/agent/forced-summary.d.ts +77 -0
  1020. package/dist/lib/service/agent/forced-summary.d.ts.map +1 -0
  1021. package/dist/lib/service/agent/forced-summary.js +243 -0
  1022. package/dist/lib/service/agent/forced-summary.js.map +1 -0
  1023. package/dist/lib/service/agent/index.d.ts +61 -0
  1024. package/dist/lib/service/agent/index.d.ts.map +1 -0
  1025. package/dist/lib/service/agent/index.js +67 -0
  1026. package/dist/lib/service/agent/index.js.map +1 -0
  1027. package/dist/lib/service/agent/memory/ActiveContext.d.ts +383 -0
  1028. package/dist/lib/service/agent/memory/ActiveContext.d.ts.map +1 -0
  1029. package/dist/lib/service/agent/memory/ActiveContext.js +890 -0
  1030. package/dist/lib/service/agent/memory/ActiveContext.js.map +1 -0
  1031. package/dist/lib/service/agent/memory/MemoryConsolidator.d.ts +70 -0
  1032. package/dist/lib/service/agent/memory/MemoryConsolidator.d.ts.map +1 -0
  1033. package/dist/lib/service/agent/memory/MemoryConsolidator.js +335 -0
  1034. package/dist/lib/service/agent/memory/MemoryConsolidator.js.map +1 -0
  1035. package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts +245 -0
  1036. package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts.map +1 -0
  1037. package/dist/lib/service/agent/memory/MemoryCoordinator.js +637 -0
  1038. package/dist/lib/service/agent/memory/MemoryCoordinator.js.map +1 -0
  1039. package/dist/lib/service/agent/memory/MemoryRetriever.d.ts +123 -0
  1040. package/dist/lib/service/agent/memory/MemoryRetriever.d.ts.map +1 -0
  1041. package/dist/lib/service/agent/memory/MemoryRetriever.js +260 -0
  1042. package/dist/lib/service/agent/memory/MemoryRetriever.js.map +1 -0
  1043. package/dist/lib/service/agent/memory/MemoryStore.d.ts +230 -0
  1044. package/dist/lib/service/agent/memory/MemoryStore.d.ts.map +1 -0
  1045. package/dist/lib/service/agent/memory/MemoryStore.js +481 -0
  1046. package/dist/lib/service/agent/memory/MemoryStore.js.map +1 -0
  1047. package/dist/lib/service/agent/memory/PersistentMemory.d.ts +117 -0
  1048. package/dist/lib/service/agent/memory/PersistentMemory.d.ts.map +1 -0
  1049. package/dist/lib/service/agent/memory/PersistentMemory.js +162 -0
  1050. package/dist/lib/service/agent/memory/PersistentMemory.js.map +1 -0
  1051. package/dist/lib/service/agent/memory/SessionStore.d.ts +298 -0
  1052. package/dist/lib/service/agent/memory/SessionStore.d.ts.map +1 -0
  1053. package/dist/lib/service/agent/memory/SessionStore.js +803 -0
  1054. package/dist/lib/service/agent/memory/SessionStore.js.map +1 -0
  1055. package/dist/lib/service/agent/memory/index.d.ts +17 -0
  1056. package/dist/lib/service/agent/memory/index.d.ts.map +1 -0
  1057. package/dist/lib/service/agent/memory/index.js +18 -0
  1058. package/dist/lib/service/agent/memory/index.js.map +1 -0
  1059. package/dist/lib/service/agent/policies.d.ts +294 -0
  1060. package/dist/lib/service/agent/policies.d.ts.map +1 -0
  1061. package/dist/lib/service/agent/policies.js +424 -0
  1062. package/dist/lib/service/agent/policies.js.map +1 -0
  1063. package/dist/lib/service/agent/presets.d.ts +381 -0
  1064. package/dist/lib/service/agent/presets.d.ts.map +1 -0
  1065. package/dist/lib/service/agent/presets.js +308 -0
  1066. package/dist/lib/service/agent/presets.js.map +1 -0
  1067. package/dist/lib/service/agent/strategies.d.ts +208 -0
  1068. package/dist/lib/service/agent/strategies.d.ts.map +1 -0
  1069. package/dist/lib/service/agent/strategies.js +316 -0
  1070. package/dist/lib/service/agent/strategies.js.map +1 -0
  1071. package/dist/lib/service/agent/tools/ToolRegistry.d.ts +68 -0
  1072. package/dist/lib/service/agent/tools/ToolRegistry.d.ts.map +1 -0
  1073. package/dist/lib/service/agent/tools/ToolRegistry.js +200 -0
  1074. package/dist/lib/service/agent/tools/ToolRegistry.js.map +1 -0
  1075. package/dist/lib/service/agent/tools/_shared.d.ts +73 -0
  1076. package/dist/lib/service/agent/tools/_shared.d.ts.map +1 -0
  1077. package/dist/lib/service/agent/tools/_shared.js +50 -0
  1078. package/dist/lib/service/agent/tools/_shared.js.map +1 -0
  1079. package/dist/lib/service/agent/tools/ai-analysis.d.ts +81 -0
  1080. package/dist/lib/service/agent/tools/ai-analysis.d.ts.map +1 -0
  1081. package/dist/lib/service/agent/tools/ai-analysis.js +63 -0
  1082. package/dist/lib/service/agent/tools/ai-analysis.js.map +1 -0
  1083. package/dist/lib/service/agent/tools/ast-graph.d.ts +242 -0
  1084. package/dist/lib/service/agent/tools/ast-graph.d.ts.map +1 -0
  1085. package/dist/lib/service/agent/tools/ast-graph.js +799 -0
  1086. package/dist/lib/service/agent/tools/ast-graph.js.map +1 -0
  1087. package/dist/lib/service/agent/tools/composite.d.ts +397 -0
  1088. package/dist/lib/service/agent/tools/composite.d.ts.map +1 -0
  1089. package/dist/lib/service/agent/tools/composite.js +522 -0
  1090. package/dist/lib/service/agent/tools/composite.js.map +1 -0
  1091. package/dist/lib/service/agent/tools/guard.d.ts +125 -0
  1092. package/dist/lib/service/agent/tools/guard.d.ts.map +1 -0
  1093. package/dist/lib/service/agent/tools/guard.js +125 -0
  1094. package/dist/lib/service/agent/tools/guard.js.map +1 -0
  1095. package/dist/lib/service/agent/tools/index.d.ts +1908 -0
  1096. package/dist/lib/service/agent/tools/index.d.ts.map +1 -0
  1097. package/dist/lib/service/agent/tools/index.js +137 -0
  1098. package/dist/lib/service/agent/tools/index.js.map +1 -0
  1099. package/dist/lib/service/agent/tools/infrastructure.d.ts +198 -0
  1100. package/dist/lib/service/agent/tools/infrastructure.d.ts.map +1 -0
  1101. package/dist/lib/service/agent/tools/infrastructure.js +219 -0
  1102. package/dist/lib/service/agent/tools/infrastructure.js.map +1 -0
  1103. package/dist/lib/service/agent/tools/knowledge-graph.d.ts +91 -0
  1104. package/dist/lib/service/agent/tools/knowledge-graph.d.ts.map +1 -0
  1105. package/dist/lib/service/agent/tools/knowledge-graph.js +97 -0
  1106. package/dist/lib/service/agent/tools/knowledge-graph.js.map +1 -0
  1107. package/dist/lib/service/agent/tools/lifecycle.d.ts +382 -0
  1108. package/dist/lib/service/agent/tools/lifecycle.d.ts.map +1 -0
  1109. package/dist/lib/service/agent/tools/lifecycle.js +453 -0
  1110. package/dist/lib/service/agent/tools/lifecycle.js.map +1 -0
  1111. package/dist/lib/service/agent/tools/project-access.d.ts +392 -0
  1112. package/dist/lib/service/agent/tools/project-access.d.ts.map +1 -0
  1113. package/dist/lib/service/agent/tools/project-access.js +823 -0
  1114. package/dist/lib/service/agent/tools/project-access.js.map +1 -0
  1115. package/dist/lib/service/agent/tools/query.d.ts +181 -0
  1116. package/dist/lib/service/agent/tools/query.d.ts.map +1 -0
  1117. package/dist/lib/service/agent/tools/query.js +244 -0
  1118. package/dist/lib/service/agent/tools/query.js.map +1 -0
  1119. package/dist/lib/service/agent/tools/scan-recipe.d.ts +186 -0
  1120. package/dist/lib/service/agent/tools/scan-recipe.d.ts.map +1 -0
  1121. package/dist/lib/service/agent/tools/scan-recipe.js +195 -0
  1122. package/dist/lib/service/agent/tools/scan-recipe.js.map +1 -0
  1123. package/dist/lib/service/agent/tools/system-interaction.d.ts +154 -0
  1124. package/dist/lib/service/agent/tools/system-interaction.d.ts.map +1 -0
  1125. package/dist/lib/service/agent/tools/system-interaction.js +457 -0
  1126. package/dist/lib/service/agent/tools/system-interaction.js.map +1 -0
  1127. package/dist/lib/service/automation/ActionPipeline.d.ts +38 -0
  1128. package/dist/lib/service/automation/ActionPipeline.d.ts.map +1 -0
  1129. package/dist/lib/service/automation/ActionPipeline.js +57 -0
  1130. package/dist/lib/service/automation/ActionPipeline.js.map +1 -0
  1131. package/dist/lib/service/automation/AutomationOrchestrator.d.ts +93 -0
  1132. package/dist/lib/service/automation/AutomationOrchestrator.d.ts.map +1 -0
  1133. package/dist/lib/service/automation/AutomationOrchestrator.js +64 -0
  1134. package/dist/lib/service/automation/AutomationOrchestrator.js.map +1 -0
  1135. package/dist/lib/service/automation/ContextCollector.d.ts +25 -0
  1136. package/dist/lib/service/automation/ContextCollector.d.ts.map +1 -0
  1137. package/dist/lib/service/automation/ContextCollector.js +36 -0
  1138. package/dist/lib/service/automation/ContextCollector.js.map +1 -0
  1139. package/dist/lib/service/automation/DirectiveDetector.d.ts +56 -0
  1140. package/dist/lib/service/automation/DirectiveDetector.d.ts.map +1 -0
  1141. package/dist/lib/service/automation/DirectiveDetector.js +121 -0
  1142. package/dist/lib/service/automation/DirectiveDetector.js.map +1 -0
  1143. package/dist/lib/service/automation/FileWatcher.d.ts +68 -0
  1144. package/dist/lib/service/automation/FileWatcher.d.ts.map +1 -0
  1145. package/dist/lib/service/automation/FileWatcher.js +389 -0
  1146. package/dist/lib/service/automation/FileWatcher.js.map +1 -0
  1147. package/dist/lib/service/automation/TriggerResolver.d.ts +38 -0
  1148. package/dist/lib/service/automation/TriggerResolver.d.ts.map +1 -0
  1149. package/dist/lib/service/automation/TriggerResolver.js +64 -0
  1150. package/dist/lib/service/automation/TriggerResolver.js.map +1 -0
  1151. package/dist/lib/service/automation/handlers/AlinkHandler.d.ts +11 -0
  1152. package/dist/lib/service/automation/handlers/AlinkHandler.d.ts.map +1 -0
  1153. package/dist/lib/service/automation/handlers/AlinkHandler.js +82 -0
  1154. package/dist/lib/service/automation/handlers/AlinkHandler.js.map +1 -0
  1155. package/dist/lib/service/automation/handlers/CreateHandler.d.ts +17 -0
  1156. package/dist/lib/service/automation/handlers/CreateHandler.d.ts.map +1 -0
  1157. package/dist/lib/service/automation/handlers/CreateHandler.js +178 -0
  1158. package/dist/lib/service/automation/handlers/CreateHandler.js.map +1 -0
  1159. package/dist/lib/service/automation/handlers/GuardHandler.d.ts +18 -0
  1160. package/dist/lib/service/automation/handlers/GuardHandler.d.ts.map +1 -0
  1161. package/dist/lib/service/automation/handlers/GuardHandler.js +223 -0
  1162. package/dist/lib/service/automation/handlers/GuardHandler.js.map +1 -0
  1163. package/dist/lib/service/automation/handlers/HeaderHandler.d.ts +12 -0
  1164. package/dist/lib/service/automation/handlers/HeaderHandler.d.ts.map +1 -0
  1165. package/dist/lib/service/automation/handlers/HeaderHandler.js +42 -0
  1166. package/dist/lib/service/automation/handlers/HeaderHandler.js.map +1 -0
  1167. package/dist/lib/service/automation/handlers/SearchHandler.d.ts +22 -0
  1168. package/dist/lib/service/automation/handlers/SearchHandler.d.ts.map +1 -0
  1169. package/dist/lib/service/automation/handlers/SearchHandler.js +289 -0
  1170. package/dist/lib/service/automation/handlers/SearchHandler.js.map +1 -0
  1171. package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts +189 -0
  1172. package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts.map +1 -0
  1173. package/dist/lib/service/bootstrap/BootstrapTaskManager.js +398 -0
  1174. package/dist/lib/service/bootstrap/BootstrapTaskManager.js.map +1 -0
  1175. package/dist/lib/service/candidate/CandidateAggregator.d.ts +32 -0
  1176. package/dist/lib/service/candidate/CandidateAggregator.d.ts.map +1 -0
  1177. package/dist/lib/service/candidate/CandidateAggregator.js +44 -0
  1178. package/dist/lib/service/candidate/CandidateAggregator.js.map +1 -0
  1179. package/dist/lib/service/candidate/SimilarityService.d.ts +32 -0
  1180. package/dist/lib/service/candidate/SimilarityService.d.ts.map +1 -0
  1181. package/dist/lib/service/candidate/SimilarityService.js +82 -0
  1182. package/dist/lib/service/candidate/SimilarityService.js.map +1 -0
  1183. package/dist/lib/service/context/RecipeExtractor.d.ts +69 -0
  1184. package/dist/lib/service/context/RecipeExtractor.d.ts.map +1 -0
  1185. package/dist/lib/service/context/RecipeExtractor.js +307 -0
  1186. package/dist/lib/service/context/RecipeExtractor.js.map +1 -0
  1187. package/dist/lib/service/cursor/AgentInstructionsGenerator.d.ts +133 -0
  1188. package/dist/lib/service/cursor/AgentInstructionsGenerator.d.ts.map +1 -0
  1189. package/dist/lib/service/cursor/AgentInstructionsGenerator.js +410 -0
  1190. package/dist/lib/service/cursor/AgentInstructionsGenerator.js.map +1 -0
  1191. package/dist/lib/service/cursor/CursorDeliveryPipeline.d.ts +305 -0
  1192. package/dist/lib/service/cursor/CursorDeliveryPipeline.d.ts.map +1 -0
  1193. package/dist/lib/service/cursor/CursorDeliveryPipeline.js +677 -0
  1194. package/dist/lib/service/cursor/CursorDeliveryPipeline.js.map +1 -0
  1195. package/dist/lib/service/cursor/FileProtection.d.ts +66 -0
  1196. package/dist/lib/service/cursor/FileProtection.d.ts.map +1 -0
  1197. package/dist/lib/service/cursor/FileProtection.js +101 -0
  1198. package/dist/lib/service/cursor/FileProtection.js.map +1 -0
  1199. package/dist/lib/service/cursor/KnowledgeCompressor.d.ts +79 -0
  1200. package/dist/lib/service/cursor/KnowledgeCompressor.d.ts.map +1 -0
  1201. package/dist/lib/service/cursor/KnowledgeCompressor.js +169 -0
  1202. package/dist/lib/service/cursor/KnowledgeCompressor.js.map +1 -0
  1203. package/dist/lib/service/cursor/RulesGenerator.d.ts +59 -0
  1204. package/dist/lib/service/cursor/RulesGenerator.d.ts.map +1 -0
  1205. package/dist/lib/service/cursor/RulesGenerator.js +161 -0
  1206. package/dist/lib/service/cursor/RulesGenerator.js.map +1 -0
  1207. package/dist/lib/service/cursor/SkillsSyncer.d.ts +61 -0
  1208. package/dist/lib/service/cursor/SkillsSyncer.d.ts.map +1 -0
  1209. package/dist/lib/service/cursor/SkillsSyncer.js +287 -0
  1210. package/dist/lib/service/cursor/SkillsSyncer.js.map +1 -0
  1211. package/dist/lib/service/cursor/TokenBudget.d.ts +27 -0
  1212. package/dist/lib/service/cursor/TokenBudget.d.ts.map +1 -0
  1213. package/dist/lib/service/cursor/TokenBudget.js +38 -0
  1214. package/dist/lib/service/cursor/TokenBudget.js.map +1 -0
  1215. package/dist/lib/service/cursor/TopicClassifier.d.ts +48 -0
  1216. package/dist/lib/service/cursor/TopicClassifier.d.ts.map +1 -0
  1217. package/dist/lib/service/cursor/TopicClassifier.js +176 -0
  1218. package/dist/lib/service/cursor/TopicClassifier.js.map +1 -0
  1219. package/dist/lib/service/guard/ComplianceReporter.d.ts +156 -0
  1220. package/dist/lib/service/guard/ComplianceReporter.d.ts.map +1 -0
  1221. package/dist/lib/service/guard/ComplianceReporter.js +317 -0
  1222. package/dist/lib/service/guard/ComplianceReporter.js.map +1 -0
  1223. package/dist/lib/service/guard/ExclusionManager.d.ts +108 -0
  1224. package/dist/lib/service/guard/ExclusionManager.d.ts.map +1 -0
  1225. package/dist/lib/service/guard/ExclusionManager.js +256 -0
  1226. package/dist/lib/service/guard/ExclusionManager.js.map +1 -0
  1227. package/dist/lib/service/guard/GuardCheckEngine.d.ts +216 -0
  1228. package/dist/lib/service/guard/GuardCheckEngine.d.ts.map +1 -0
  1229. package/dist/lib/service/guard/GuardCheckEngine.js +982 -0
  1230. package/dist/lib/service/guard/GuardCheckEngine.js.map +1 -0
  1231. package/dist/lib/service/guard/GuardCodeChecks.d.ts +34 -0
  1232. package/dist/lib/service/guard/GuardCodeChecks.d.ts.map +1 -0
  1233. package/dist/lib/service/guard/GuardCodeChecks.js +351 -0
  1234. package/dist/lib/service/guard/GuardCodeChecks.js.map +1 -0
  1235. package/dist/lib/service/guard/GuardCrossFileChecks.d.ts +43 -0
  1236. package/dist/lib/service/guard/GuardCrossFileChecks.d.ts.map +1 -0
  1237. package/dist/lib/service/guard/GuardCrossFileChecks.js +290 -0
  1238. package/dist/lib/service/guard/GuardCrossFileChecks.js.map +1 -0
  1239. package/dist/lib/service/guard/GuardFeedbackLoop.d.ts +91 -0
  1240. package/dist/lib/service/guard/GuardFeedbackLoop.d.ts.map +1 -0
  1241. package/dist/lib/service/guard/GuardFeedbackLoop.js +141 -0
  1242. package/dist/lib/service/guard/GuardFeedbackLoop.js.map +1 -0
  1243. package/dist/lib/service/guard/GuardPatternUtils.d.ts +47 -0
  1244. package/dist/lib/service/guard/GuardPatternUtils.d.ts.map +1 -0
  1245. package/dist/lib/service/guard/GuardPatternUtils.js +171 -0
  1246. package/dist/lib/service/guard/GuardPatternUtils.js.map +1 -0
  1247. package/dist/lib/service/guard/GuardService.d.ts +217 -0
  1248. package/dist/lib/service/guard/GuardService.d.ts.map +1 -0
  1249. package/dist/lib/service/guard/GuardService.js +305 -0
  1250. package/dist/lib/service/guard/GuardService.js.map +1 -0
  1251. package/dist/lib/service/guard/RuleLearner.d.ts +98 -0
  1252. package/dist/lib/service/guard/RuleLearner.d.ts.map +1 -0
  1253. package/dist/lib/service/guard/RuleLearner.js +298 -0
  1254. package/dist/lib/service/guard/RuleLearner.js.map +1 -0
  1255. package/dist/lib/service/guard/SourceFileCollector.d.ts +42 -0
  1256. package/dist/lib/service/guard/SourceFileCollector.d.ts.map +1 -0
  1257. package/dist/lib/service/guard/SourceFileCollector.js +106 -0
  1258. package/dist/lib/service/guard/SourceFileCollector.js.map +1 -0
  1259. package/dist/lib/service/guard/ViolationsStore.d.ts +118 -0
  1260. package/dist/lib/service/guard/ViolationsStore.d.ts.map +1 -0
  1261. package/dist/lib/service/guard/ViolationsStore.js +228 -0
  1262. package/dist/lib/service/guard/ViolationsStore.js.map +1 -0
  1263. package/dist/lib/service/knowledge/CodeEntityGraph.d.ts +418 -0
  1264. package/dist/lib/service/knowledge/CodeEntityGraph.d.ts.map +1 -0
  1265. package/dist/lib/service/knowledge/CodeEntityGraph.js +1050 -0
  1266. package/dist/lib/service/knowledge/CodeEntityGraph.js.map +1 -0
  1267. package/dist/lib/service/knowledge/ConfidenceRouter.d.ts +63 -0
  1268. package/dist/lib/service/knowledge/ConfidenceRouter.d.ts.map +1 -0
  1269. package/dist/lib/service/knowledge/ConfidenceRouter.js +155 -0
  1270. package/dist/lib/service/knowledge/ConfidenceRouter.js.map +1 -0
  1271. package/dist/lib/service/knowledge/KnowledgeFileWriter.d.ts +100 -0
  1272. package/dist/lib/service/knowledge/KnowledgeFileWriter.d.ts.map +1 -0
  1273. package/dist/lib/service/knowledge/KnowledgeFileWriter.js +658 -0
  1274. package/dist/lib/service/knowledge/KnowledgeFileWriter.js.map +1 -0
  1275. package/dist/lib/service/knowledge/KnowledgeGraphService.d.ts +121 -0
  1276. package/dist/lib/service/knowledge/KnowledgeGraphService.d.ts.map +1 -0
  1277. package/dist/lib/service/knowledge/KnowledgeGraphService.js +230 -0
  1278. package/dist/lib/service/knowledge/KnowledgeGraphService.js.map +1 -0
  1279. package/dist/lib/service/knowledge/KnowledgeService.d.ts +225 -0
  1280. package/dist/lib/service/knowledge/KnowledgeService.d.ts.map +1 -0
  1281. package/dist/lib/service/knowledge/KnowledgeService.js +852 -0
  1282. package/dist/lib/service/knowledge/KnowledgeService.js.map +1 -0
  1283. package/dist/lib/service/module/ModuleService.d.ts +156 -0
  1284. package/dist/lib/service/module/ModuleService.d.ts.map +1 -0
  1285. package/dist/lib/service/module/ModuleService.js +951 -0
  1286. package/dist/lib/service/module/ModuleService.js.map +1 -0
  1287. package/dist/lib/service/quality/FeedbackCollector.d.ts +55 -0
  1288. package/dist/lib/service/quality/FeedbackCollector.d.ts.map +1 -0
  1289. package/dist/lib/service/quality/FeedbackCollector.js +137 -0
  1290. package/dist/lib/service/quality/FeedbackCollector.js.map +1 -0
  1291. package/dist/lib/service/quality/QualityScorer.d.ts +70 -0
  1292. package/dist/lib/service/quality/QualityScorer.d.ts.map +1 -0
  1293. package/dist/lib/service/quality/QualityScorer.js +183 -0
  1294. package/dist/lib/service/quality/QualityScorer.js.map +1 -0
  1295. package/dist/lib/service/recipe/RecipeCandidateValidator.d.ts +80 -0
  1296. package/dist/lib/service/recipe/RecipeCandidateValidator.d.ts.map +1 -0
  1297. package/dist/lib/service/recipe/RecipeCandidateValidator.js +184 -0
  1298. package/dist/lib/service/recipe/RecipeCandidateValidator.js.map +1 -0
  1299. package/dist/lib/service/recipe/RecipeParser.d.ts +88 -0
  1300. package/dist/lib/service/recipe/RecipeParser.d.ts.map +1 -0
  1301. package/dist/lib/service/recipe/RecipeParser.js +280 -0
  1302. package/dist/lib/service/recipe/RecipeParser.js.map +1 -0
  1303. package/dist/lib/service/search/CoarseRanker.d.ts +64 -0
  1304. package/dist/lib/service/search/CoarseRanker.d.ts.map +1 -0
  1305. package/dist/lib/service/search/CoarseRanker.js +114 -0
  1306. package/dist/lib/service/search/CoarseRanker.js.map +1 -0
  1307. package/dist/lib/service/search/CrossEncoderReranker.d.ts +60 -0
  1308. package/dist/lib/service/search/CrossEncoderReranker.d.ts.map +1 -0
  1309. package/dist/lib/service/search/CrossEncoderReranker.js +158 -0
  1310. package/dist/lib/service/search/CrossEncoderReranker.js.map +1 -0
  1311. package/dist/lib/service/search/HybridRetriever.d.ts +80 -0
  1312. package/dist/lib/service/search/HybridRetriever.d.ts.map +1 -0
  1313. package/dist/lib/service/search/HybridRetriever.js +123 -0
  1314. package/dist/lib/service/search/HybridRetriever.js.map +1 -0
  1315. package/dist/lib/service/search/InvertedIndex.d.ts +34 -0
  1316. package/dist/lib/service/search/InvertedIndex.d.ts.map +1 -0
  1317. package/dist/lib/service/search/InvertedIndex.js +83 -0
  1318. package/dist/lib/service/search/InvertedIndex.js.map +1 -0
  1319. package/dist/lib/service/search/MultiSignalRanker.d.ts +109 -0
  1320. package/dist/lib/service/search/MultiSignalRanker.d.ts.map +1 -0
  1321. package/dist/lib/service/search/MultiSignalRanker.js +257 -0
  1322. package/dist/lib/service/search/MultiSignalRanker.js.map +1 -0
  1323. package/dist/lib/service/search/RetrievalFunnel.d.ts +26 -0
  1324. package/dist/lib/service/search/RetrievalFunnel.d.ts.map +1 -0
  1325. package/dist/lib/service/search/RetrievalFunnel.js +77 -0
  1326. package/dist/lib/service/search/RetrievalFunnel.js.map +1 -0
  1327. package/dist/lib/service/search/SearchEngine.d.ts +389 -0
  1328. package/dist/lib/service/search/SearchEngine.d.ts.map +1 -0
  1329. package/dist/lib/service/search/SearchEngine.js +971 -0
  1330. package/dist/lib/service/search/SearchEngine.js.map +1 -0
  1331. package/dist/lib/service/search/contextBoost.d.ts +47 -0
  1332. package/dist/lib/service/search/contextBoost.d.ts.map +1 -0
  1333. package/dist/lib/service/search/contextBoost.js +45 -0
  1334. package/dist/lib/service/search/contextBoost.js.map +1 -0
  1335. package/dist/lib/service/skills/EventAggregator.d.ts +63 -0
  1336. package/dist/lib/service/skills/EventAggregator.d.ts.map +1 -0
  1337. package/dist/lib/service/skills/EventAggregator.js +178 -0
  1338. package/dist/lib/service/skills/EventAggregator.js.map +1 -0
  1339. package/dist/lib/service/skills/SignalCollector.d.ts +125 -0
  1340. package/dist/lib/service/skills/SignalCollector.d.ts.map +1 -0
  1341. package/dist/lib/service/skills/SignalCollector.js +575 -0
  1342. package/dist/lib/service/skills/SignalCollector.js.map +1 -0
  1343. package/dist/lib/service/skills/SkillAdvisor.d.ts +64 -0
  1344. package/dist/lib/service/skills/SkillAdvisor.d.ts.map +1 -0
  1345. package/dist/lib/service/skills/SkillAdvisor.js +336 -0
  1346. package/dist/lib/service/skills/SkillAdvisor.js.map +1 -0
  1347. package/dist/lib/service/skills/SkillHooks.d.ts +41 -0
  1348. package/dist/lib/service/skills/SkillHooks.d.ts.map +1 -0
  1349. package/dist/lib/service/skills/SkillHooks.js +130 -0
  1350. package/dist/lib/service/skills/SkillHooks.js.map +1 -0
  1351. package/dist/lib/service/snippet/SnippetFactory.d.ts +120 -0
  1352. package/dist/lib/service/snippet/SnippetFactory.d.ts.map +1 -0
  1353. package/dist/lib/service/snippet/SnippetFactory.js +169 -0
  1354. package/dist/lib/service/snippet/SnippetFactory.js.map +1 -0
  1355. package/dist/lib/service/snippet/SnippetInstaller.d.ts +100 -0
  1356. package/dist/lib/service/snippet/SnippetInstaller.d.ts.map +1 -0
  1357. package/dist/lib/service/snippet/SnippetInstaller.js +291 -0
  1358. package/dist/lib/service/snippet/SnippetInstaller.js.map +1 -0
  1359. package/dist/lib/service/snippet/codecs/SnippetCodec.d.ts +61 -0
  1360. package/dist/lib/service/snippet/codecs/SnippetCodec.d.ts.map +1 -0
  1361. package/dist/lib/service/snippet/codecs/SnippetCodec.js +52 -0
  1362. package/dist/lib/service/snippet/codecs/SnippetCodec.js.map +1 -0
  1363. package/dist/lib/service/snippet/codecs/VSCodeCodec.d.ts +32 -0
  1364. package/dist/lib/service/snippet/codecs/VSCodeCodec.d.ts.map +1 -0
  1365. package/dist/lib/service/snippet/codecs/VSCodeCodec.js +89 -0
  1366. package/dist/lib/service/snippet/codecs/VSCodeCodec.js.map +1 -0
  1367. package/dist/lib/service/task/TaskGraphService.d.ts +269 -0
  1368. package/dist/lib/service/task/TaskGraphService.d.ts.map +1 -0
  1369. package/dist/lib/service/task/TaskGraphService.js +603 -0
  1370. package/dist/lib/service/task/TaskGraphService.js.map +1 -0
  1371. package/dist/lib/service/task/TaskKnowledgeBridge.d.ts +53 -0
  1372. package/dist/lib/service/task/TaskKnowledgeBridge.d.ts.map +1 -0
  1373. package/dist/lib/service/task/TaskKnowledgeBridge.js +92 -0
  1374. package/dist/lib/service/task/TaskKnowledgeBridge.js.map +1 -0
  1375. package/dist/lib/service/task/TaskReadyEngine.d.ts +93 -0
  1376. package/dist/lib/service/task/TaskReadyEngine.d.ts.map +1 -0
  1377. package/dist/lib/service/task/TaskReadyEngine.js +124 -0
  1378. package/dist/lib/service/task/TaskReadyEngine.js.map +1 -0
  1379. package/dist/lib/service/wiki/WikiGenerator.d.ts +407 -0
  1380. package/dist/lib/service/wiki/WikiGenerator.d.ts.map +1 -0
  1381. package/dist/lib/service/wiki/WikiGenerator.js +912 -0
  1382. package/dist/lib/service/wiki/WikiGenerator.js.map +1 -0
  1383. package/dist/lib/service/wiki/WikiRenderers.d.ts +219 -0
  1384. package/dist/lib/service/wiki/WikiRenderers.d.ts.map +1 -0
  1385. package/dist/lib/service/wiki/WikiRenderers.js +1627 -0
  1386. package/dist/lib/service/wiki/WikiRenderers.js.map +1 -0
  1387. package/dist/lib/service/wiki/WikiUtils.d.ts +164 -0
  1388. package/dist/lib/service/wiki/WikiUtils.d.ts.map +1 -0
  1389. package/dist/lib/service/wiki/WikiUtils.js +971 -0
  1390. package/dist/lib/service/wiki/WikiUtils.js.map +1 -0
  1391. package/dist/lib/shared/BootstrapEventEmitter.d.ts +59 -0
  1392. package/dist/lib/shared/BootstrapEventEmitter.d.ts.map +1 -0
  1393. package/dist/lib/shared/BootstrapEventEmitter.js +140 -0
  1394. package/dist/lib/shared/BootstrapEventEmitter.js.map +1 -0
  1395. package/dist/lib/shared/DimensionCopyRegistry.d.ts +76 -0
  1396. package/dist/lib/shared/DimensionCopyRegistry.d.ts.map +1 -0
  1397. package/dist/lib/shared/DimensionCopyRegistry.js +402 -0
  1398. package/dist/lib/shared/DimensionCopyRegistry.js.map +1 -0
  1399. package/dist/lib/shared/FieldSpec.d.ts +169 -0
  1400. package/dist/lib/shared/FieldSpec.d.ts.map +1 -0
  1401. package/dist/lib/shared/FieldSpec.js +348 -0
  1402. package/dist/lib/shared/FieldSpec.js.map +1 -0
  1403. package/dist/lib/shared/LanguageService.d.ts +203 -0
  1404. package/dist/lib/shared/LanguageService.d.ts.map +1 -0
  1405. package/dist/lib/shared/LanguageService.js +687 -0
  1406. package/dist/lib/shared/LanguageService.js.map +1 -0
  1407. package/dist/lib/shared/PathGuard.d.ts +105 -0
  1408. package/dist/lib/shared/PathGuard.d.ts.map +1 -0
  1409. package/dist/lib/shared/PathGuard.js +312 -0
  1410. package/dist/lib/shared/PathGuard.js.map +1 -0
  1411. package/dist/lib/shared/RecipeReadinessChecker.d.ts +37 -0
  1412. package/dist/lib/shared/RecipeReadinessChecker.d.ts.map +1 -0
  1413. package/dist/lib/shared/RecipeReadinessChecker.js +68 -0
  1414. package/dist/lib/shared/RecipeReadinessChecker.js.map +1 -0
  1415. package/dist/lib/shared/StyleGuide.d.ts +25 -0
  1416. package/dist/lib/shared/StyleGuide.d.ts.map +1 -0
  1417. package/dist/lib/shared/StyleGuide.js +110 -0
  1418. package/dist/lib/shared/StyleGuide.js.map +1 -0
  1419. package/dist/lib/shared/UnifiedValidator.d.ts +57 -0
  1420. package/dist/lib/shared/UnifiedValidator.d.ts.map +1 -0
  1421. package/dist/lib/shared/UnifiedValidator.js +315 -0
  1422. package/dist/lib/shared/UnifiedValidator.js.map +1 -0
  1423. package/dist/lib/shared/concurrency.d.ts +34 -0
  1424. package/dist/lib/shared/concurrency.d.ts.map +1 -0
  1425. package/dist/lib/shared/concurrency.js +34 -0
  1426. package/dist/lib/shared/concurrency.js.map +1 -0
  1427. package/dist/lib/shared/constants.d.ts +208 -0
  1428. package/dist/lib/shared/constants.d.ts.map +1 -0
  1429. package/dist/lib/shared/constants.js +138 -0
  1430. package/dist/lib/shared/constants.js.map +1 -0
  1431. package/dist/lib/shared/errors/BaseError.d.ts +60 -0
  1432. package/dist/lib/shared/errors/BaseError.d.ts.map +1 -0
  1433. package/dist/lib/shared/errors/BaseError.js +93 -0
  1434. package/dist/lib/shared/errors/BaseError.js.map +1 -0
  1435. package/dist/lib/shared/errors/index.d.ts +6 -0
  1436. package/dist/lib/shared/errors/index.d.ts.map +1 -0
  1437. package/dist/lib/shared/errors/index.js +6 -0
  1438. package/dist/lib/shared/errors/index.js.map +1 -0
  1439. package/dist/lib/shared/isOwnDevRepo.d.ts +21 -0
  1440. package/dist/lib/shared/isOwnDevRepo.d.ts.map +1 -0
  1441. package/dist/lib/shared/isOwnDevRepo.js +53 -0
  1442. package/dist/lib/shared/isOwnDevRepo.js.map +1 -0
  1443. package/dist/lib/shared/package-root.d.ts +13 -0
  1444. package/dist/lib/shared/package-root.d.ts.map +1 -0
  1445. package/dist/lib/shared/package-root.js +60 -0
  1446. package/dist/lib/shared/package-root.js.map +1 -0
  1447. package/dist/lib/shared/schemas/common.d.ts +66 -0
  1448. package/dist/lib/shared/schemas/common.d.ts.map +1 -0
  1449. package/dist/lib/shared/schemas/common.js +58 -0
  1450. package/dist/lib/shared/schemas/common.js.map +1 -0
  1451. package/dist/lib/shared/schemas/config.d.ts +145 -0
  1452. package/dist/lib/shared/schemas/config.d.ts.map +1 -0
  1453. package/dist/lib/shared/schemas/config.js +151 -0
  1454. package/dist/lib/shared/schemas/config.js.map +1 -0
  1455. package/dist/lib/shared/schemas/http-requests.d.ts +345 -0
  1456. package/dist/lib/shared/schemas/http-requests.d.ts.map +1 -0
  1457. package/dist/lib/shared/schemas/http-requests.js +348 -0
  1458. package/dist/lib/shared/schemas/http-requests.js.map +1 -0
  1459. package/dist/lib/shared/schemas/index.d.ts +10 -0
  1460. package/dist/lib/shared/schemas/index.d.ts.map +1 -0
  1461. package/dist/lib/shared/schemas/index.js +10 -0
  1462. package/dist/lib/shared/schemas/index.js.map +1 -0
  1463. package/dist/lib/shared/schemas/mcp-tools.d.ts +344 -0
  1464. package/dist/lib/shared/schemas/mcp-tools.d.ts.map +1 -0
  1465. package/dist/lib/shared/schemas/mcp-tools.js +327 -0
  1466. package/dist/lib/shared/schemas/mcp-tools.js.map +1 -0
  1467. package/dist/lib/shared/shutdown.d.ts +63 -0
  1468. package/dist/lib/shared/shutdown.d.ts.map +1 -0
  1469. package/dist/lib/shared/shutdown.js +111 -0
  1470. package/dist/lib/shared/shutdown.js.map +1 -0
  1471. package/dist/lib/shared/similarity.d.ts +53 -0
  1472. package/dist/lib/shared/similarity.d.ts.map +1 -0
  1473. package/dist/lib/shared/similarity.js +111 -0
  1474. package/dist/lib/shared/similarity.js.map +1 -0
  1475. package/dist/lib/shared/token-utils.d.ts +30 -0
  1476. package/dist/lib/shared/token-utils.d.ts.map +1 -0
  1477. package/dist/lib/shared/token-utils.js +50 -0
  1478. package/dist/lib/shared/token-utils.js.map +1 -0
  1479. package/dist/lib/shared/utils/common.d.ts +45 -0
  1480. package/dist/lib/shared/utils/common.d.ts.map +1 -0
  1481. package/dist/lib/shared/utils/common.js +70 -0
  1482. package/dist/lib/shared/utils/common.js.map +1 -0
  1483. package/dist/scripts/build-native-ui.d.ts +6 -0
  1484. package/dist/scripts/build-native-ui.d.ts.map +1 -0
  1485. package/dist/scripts/build-native-ui.js +68 -0
  1486. package/dist/scripts/build-native-ui.js.map +1 -0
  1487. package/dist/scripts/diagnose-mcp.d.ts +10 -0
  1488. package/dist/scripts/diagnose-mcp.d.ts.map +1 -0
  1489. package/dist/scripts/diagnose-mcp.js +79 -0
  1490. package/dist/scripts/diagnose-mcp.js.map +1 -0
  1491. package/dist/scripts/init-snippets.d.ts +31 -0
  1492. package/dist/scripts/init-snippets.d.ts.map +1 -0
  1493. package/dist/scripts/init-snippets.js +299 -0
  1494. package/dist/scripts/init-snippets.js.map +1 -0
  1495. package/dist/scripts/install-cursor-skill.d.ts +14 -0
  1496. package/dist/scripts/install-cursor-skill.d.ts.map +1 -0
  1497. package/dist/scripts/install-cursor-skill.js +364 -0
  1498. package/dist/scripts/install-cursor-skill.js.map +1 -0
  1499. package/dist/scripts/install-full.d.ts +8 -0
  1500. package/dist/scripts/install-full.d.ts.map +1 -0
  1501. package/dist/scripts/install-full.js +42 -0
  1502. package/dist/scripts/install-full.js.map +1 -0
  1503. package/dist/scripts/install-vscode-copilot.d.ts +24 -0
  1504. package/dist/scripts/install-vscode-copilot.d.ts.map +1 -0
  1505. package/dist/scripts/install-vscode-copilot.js +277 -0
  1506. package/dist/scripts/install-vscode-copilot.js.map +1 -0
  1507. package/dist/scripts/release.d.ts +8 -0
  1508. package/dist/scripts/release.d.ts.map +1 -0
  1509. package/dist/scripts/release.js +364 -0
  1510. package/dist/scripts/release.js.map +1 -0
  1511. package/dist/scripts/setup-mcp-config.d.ts +10 -0
  1512. package/dist/scripts/setup-mcp-config.d.ts.map +1 -0
  1513. package/dist/scripts/setup-mcp-config.js +120 -0
  1514. package/dist/scripts/setup-mcp-config.js.map +1 -0
  1515. package/dist/scripts/verify-context-api.d.ts +8 -0
  1516. package/dist/scripts/verify-context-api.d.ts.map +1 -0
  1517. package/dist/scripts/verify-context-api.js +55 -0
  1518. package/dist/scripts/verify-context-api.js.map +1 -0
  1519. package/package.json +107 -46
  1520. package/resources/native-ui/screenshot.swift +2 -2
  1521. package/scripts/postbuild.mjs +32 -0
  1522. package/scripts/postinstall-safe.js +7 -13
  1523. package/bin/api-server.js +0 -108
  1524. package/bin/cli.js +0 -1263
  1525. package/bin/mcp-server.js +0 -62
  1526. package/config/knowledge-base.config.js +0 -173
  1527. package/dashboard/dist/assets/icons-pSac4wYO.js +0 -531
  1528. package/dashboard/dist/assets/index-BTAsOZv2.js +0 -128
  1529. package/dashboard/dist/assets/index-C_72Ct98.css +0 -1
  1530. package/lib/bootstrap.js +0 -228
  1531. package/lib/cli/AiScanService.js +0 -280
  1532. package/lib/cli/CliLogger.js +0 -78
  1533. package/lib/cli/KnowledgeSyncService.js +0 -384
  1534. package/lib/cli/SetupService.js +0 -559
  1535. package/lib/cli/UpgradeService.js +0 -96
  1536. package/lib/cli/deploy/FileDeployer.js +0 -562
  1537. package/lib/cli/deploy/FileManifest.js +0 -272
  1538. package/lib/core/AstAnalyzer.js +0 -878
  1539. package/lib/core/analysis/CallEdgeResolver.js +0 -402
  1540. package/lib/core/analysis/CallGraphAnalyzer.js +0 -367
  1541. package/lib/core/analysis/CallSiteExtractor.js +0 -629
  1542. package/lib/core/analysis/DataFlowInferrer.js +0 -57
  1543. package/lib/core/analysis/ImportPathResolver.js +0 -189
  1544. package/lib/core/analysis/ImportRecord.js +0 -105
  1545. package/lib/core/analysis/SymbolTableBuilder.js +0 -211
  1546. package/lib/core/ast/ProjectGraph.js +0 -828
  1547. package/lib/core/ast/ensure-grammars.js +0 -129
  1548. package/lib/core/ast/index.js +0 -167
  1549. package/lib/core/ast/lang-dart.js +0 -1010
  1550. package/lib/core/ast/lang-go.js +0 -714
  1551. package/lib/core/ast/lang-java.js +0 -635
  1552. package/lib/core/ast/lang-javascript.js +0 -268
  1553. package/lib/core/ast/lang-kotlin.js +0 -748
  1554. package/lib/core/ast/lang-objc.js +0 -384
  1555. package/lib/core/ast/lang-python.js +0 -396
  1556. package/lib/core/ast/lang-rust.js +0 -997
  1557. package/lib/core/ast/lang-swift.js +0 -512
  1558. package/lib/core/ast/lang-typescript.js +0 -786
  1559. package/lib/core/ast/parser-init.js +0 -86
  1560. package/lib/core/capability/CapabilityProbe.js +0 -258
  1561. package/lib/core/constitution/Constitution.js +0 -132
  1562. package/lib/core/constitution/ConstitutionValidator.js +0 -196
  1563. package/lib/core/discovery/DartDiscoverer.js +0 -529
  1564. package/lib/core/discovery/DiscovererRegistry.js +0 -83
  1565. package/lib/core/discovery/GenericDiscoverer.js +0 -202
  1566. package/lib/core/discovery/GoDiscoverer.js +0 -562
  1567. package/lib/core/discovery/JvmDiscoverer.js +0 -507
  1568. package/lib/core/discovery/NodeDiscoverer.js +0 -465
  1569. package/lib/core/discovery/ProjectDiscoverer.js +0 -93
  1570. package/lib/core/discovery/PythonDiscoverer.js +0 -348
  1571. package/lib/core/discovery/RustDiscoverer.js +0 -541
  1572. package/lib/core/discovery/index.js +0 -56
  1573. package/lib/core/enhancement/EnhancementPack.js +0 -82
  1574. package/lib/core/enhancement/EnhancementRegistry.js +0 -47
  1575. package/lib/core/enhancement/android-enhancement.js +0 -104
  1576. package/lib/core/enhancement/django-enhancement.js +0 -245
  1577. package/lib/core/enhancement/fastapi-enhancement.js +0 -219
  1578. package/lib/core/enhancement/go-grpc-enhancement.js +0 -159
  1579. package/lib/core/enhancement/go-web-enhancement.js +0 -206
  1580. package/lib/core/enhancement/index.js +0 -70
  1581. package/lib/core/enhancement/langchain-enhancement.js +0 -236
  1582. package/lib/core/enhancement/ml-enhancement.js +0 -271
  1583. package/lib/core/enhancement/nextjs-enhancement.js +0 -232
  1584. package/lib/core/enhancement/node-server-enhancement.js +0 -267
  1585. package/lib/core/enhancement/react-enhancement.js +0 -254
  1586. package/lib/core/enhancement/rust-tokio-enhancement.js +0 -237
  1587. package/lib/core/enhancement/rust-web-enhancement.js +0 -264
  1588. package/lib/core/enhancement/spring-enhancement.js +0 -116
  1589. package/lib/core/enhancement/vue-enhancement.js +0 -245
  1590. package/lib/core/gateway/Gateway.js +0 -273
  1591. package/lib/core/gateway/GatewayActionRegistry.js +0 -236
  1592. package/lib/core/permission/PermissionManager.js +0 -252
  1593. package/lib/domain/index.js +0 -29
  1594. package/lib/domain/knowledge/KnowledgeEntry.js +0 -312
  1595. package/lib/domain/knowledge/KnowledgeRepository.js +0 -122
  1596. package/lib/domain/knowledge/Lifecycle.js +0 -101
  1597. package/lib/domain/knowledge/index.js +0 -24
  1598. package/lib/domain/knowledge/values/Constraints.js +0 -138
  1599. package/lib/domain/knowledge/values/Content.js +0 -77
  1600. package/lib/domain/knowledge/values/Quality.js +0 -94
  1601. package/lib/domain/knowledge/values/Reasoning.js +0 -78
  1602. package/lib/domain/knowledge/values/Relations.js +0 -159
  1603. package/lib/domain/knowledge/values/Stats.js +0 -78
  1604. package/lib/domain/knowledge/values/index.js +0 -10
  1605. package/lib/domain/snippet/Snippet.js +0 -107
  1606. package/lib/domain/task/Task.js +0 -244
  1607. package/lib/domain/task/TaskDependency.js +0 -49
  1608. package/lib/domain/task/TaskIdGenerator.js +0 -83
  1609. package/lib/domain/task/index.js +0 -6
  1610. package/lib/external/ai/AiFactory.js +0 -251
  1611. package/lib/external/ai/AiProvider.js +0 -823
  1612. package/lib/external/ai/providers/ClaudeProvider.js +0 -308
  1613. package/lib/external/ai/providers/GoogleGeminiProvider.js +0 -464
  1614. package/lib/external/ai/providers/MockProvider.js +0 -64
  1615. package/lib/external/ai/providers/OpenAiProvider.js +0 -308
  1616. package/lib/external/mcp/McpServer.js +0 -475
  1617. package/lib/external/mcp/autoApproveInjector.js +0 -155
  1618. package/lib/external/mcp/envelope.js +0 -35
  1619. package/lib/external/mcp/errorHandler.js +0 -118
  1620. package/lib/external/mcp/handlers/LanguageExtensions.js +0 -582
  1621. package/lib/external/mcp/handlers/TargetClassifier.js +0 -74
  1622. package/lib/external/mcp/handlers/bootstrap/BootstrapSession.js +0 -252
  1623. package/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js +0 -397
  1624. package/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +0 -855
  1625. package/lib/external/mcp/handlers/bootstrap/base-dimensions.js +0 -250
  1626. package/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js +0 -618
  1627. package/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js +0 -212
  1628. package/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js +0 -96
  1629. package/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js +0 -181
  1630. package/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js +0 -227
  1631. package/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js +0 -776
  1632. package/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +0 -1408
  1633. package/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js +0 -217
  1634. package/lib/external/mcp/handlers/bootstrap/refine.js +0 -365
  1635. package/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +0 -774
  1636. package/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js +0 -709
  1637. package/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js +0 -230
  1638. package/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js +0 -268
  1639. package/lib/external/mcp/handlers/bootstrap/skills.js +0 -110
  1640. package/lib/external/mcp/handlers/bootstrap-external.js +0 -183
  1641. package/lib/external/mcp/handlers/bootstrap-internal.js +0 -420
  1642. package/lib/external/mcp/handlers/browse.js +0 -313
  1643. package/lib/external/mcp/handlers/candidate.js +0 -241
  1644. package/lib/external/mcp/handlers/consolidated.js +0 -325
  1645. package/lib/external/mcp/handlers/dimension-complete-external.js +0 -472
  1646. package/lib/external/mcp/handlers/guard.js +0 -610
  1647. package/lib/external/mcp/handlers/knowledge.js +0 -381
  1648. package/lib/external/mcp/handlers/search.js +0 -291
  1649. package/lib/external/mcp/handlers/skill.js +0 -719
  1650. package/lib/external/mcp/handlers/structure.js +0 -622
  1651. package/lib/external/mcp/handlers/system.js +0 -269
  1652. package/lib/external/mcp/handlers/task.js +0 -629
  1653. package/lib/external/mcp/handlers/wiki-external.js +0 -593
  1654. package/lib/external/mcp/tools.js +0 -759
  1655. package/lib/http/HttpServer.js +0 -488
  1656. package/lib/http/api-spec.js +0 -192
  1657. package/lib/http/middleware/RateLimiter.js +0 -69
  1658. package/lib/http/middleware/errorHandler.js +0 -96
  1659. package/lib/http/middleware/gatewayMiddleware.js +0 -61
  1660. package/lib/http/middleware/requestLogger.js +0 -73
  1661. package/lib/http/middleware/roleResolver.js +0 -121
  1662. package/lib/http/routes/ai.js +0 -890
  1663. package/lib/http/routes/auth.js +0 -161
  1664. package/lib/http/routes/candidates.js +0 -812
  1665. package/lib/http/routes/commands.js +0 -343
  1666. package/lib/http/routes/extract.js +0 -199
  1667. package/lib/http/routes/guard.js +0 -283
  1668. package/lib/http/routes/guardRules.js +0 -405
  1669. package/lib/http/routes/health.js +0 -35
  1670. package/lib/http/routes/knowledge.js +0 -305
  1671. package/lib/http/routes/modules.js +0 -584
  1672. package/lib/http/routes/monitoring.js +0 -329
  1673. package/lib/http/routes/recipes.js +0 -178
  1674. package/lib/http/routes/remote.js +0 -1017
  1675. package/lib/http/routes/search.js +0 -452
  1676. package/lib/http/routes/skills.js +0 -248
  1677. package/lib/http/routes/snippets.js +0 -66
  1678. package/lib/http/routes/task.js +0 -418
  1679. package/lib/http/routes/violations.js +0 -94
  1680. package/lib/http/routes/wiki.js +0 -371
  1681. package/lib/http/utils/routeHelpers.js +0 -63
  1682. package/lib/http/utils/sse-sessions.js +0 -124
  1683. package/lib/http/utils/sse.js +0 -138
  1684. package/lib/infrastructure/audit/AuditLogger.js +0 -123
  1685. package/lib/infrastructure/audit/AuditStore.js +0 -219
  1686. package/lib/infrastructure/cache/CacheService.js +0 -151
  1687. package/lib/infrastructure/cache/GraphCache.js +0 -147
  1688. package/lib/infrastructure/cache/UnifiedCacheAdapter.js +0 -115
  1689. package/lib/infrastructure/config/ConfigLoader.js +0 -114
  1690. package/lib/infrastructure/config/Defaults.js +0 -92
  1691. package/lib/infrastructure/config/Paths.js +0 -167
  1692. package/lib/infrastructure/config/TriggerSymbol.js +0 -76
  1693. package/lib/infrastructure/database/DatabaseConnection.js +0 -137
  1694. package/lib/infrastructure/database/migrations/001_initial_schema.js +0 -314
  1695. package/lib/infrastructure/database/migrations/002_add_tasks.js +0 -88
  1696. package/lib/infrastructure/database/migrations/003_add_remote_commands.js +0 -27
  1697. package/lib/infrastructure/event/EventBus.js +0 -83
  1698. package/lib/infrastructure/external/ClipboardManager.js +0 -152
  1699. package/lib/infrastructure/external/NativeUi.js +0 -304
  1700. package/lib/infrastructure/external/OpenBrowser.js +0 -135
  1701. package/lib/infrastructure/logging/Logger.js +0 -184
  1702. package/lib/infrastructure/monitoring/ErrorTracker.js +0 -341
  1703. package/lib/infrastructure/monitoring/PerformanceMonitor.js +0 -281
  1704. package/lib/infrastructure/paths/HeaderResolver.js +0 -115
  1705. package/lib/infrastructure/paths/PathFinder.js +0 -133
  1706. package/lib/infrastructure/plugin/PluginManager.js +0 -139
  1707. package/lib/infrastructure/realtime/RealtimeService.js +0 -179
  1708. package/lib/infrastructure/vector/Chunker.js +0 -177
  1709. package/lib/infrastructure/vector/IndexingPipeline.js +0 -209
  1710. package/lib/infrastructure/vector/JsonVectorAdapter.js +0 -279
  1711. package/lib/infrastructure/vector/VectorStore.js +0 -94
  1712. package/lib/injection/ServiceContainer.js +0 -1063
  1713. package/lib/platform/ScreenCaptureService.js +0 -177
  1714. package/lib/platform/ios/index.js +0 -58
  1715. package/lib/platform/ios/routes/spm.js +0 -440
  1716. package/lib/platform/ios/snippet/PlaceholderConverter.js +0 -59
  1717. package/lib/platform/ios/snippet/XcodeCodec.js +0 -114
  1718. package/lib/platform/ios/spm/DependencyGraph.js +0 -234
  1719. package/lib/platform/ios/spm/PackageSwiftParser.js +0 -267
  1720. package/lib/platform/ios/spm/PolicyEngine.js +0 -91
  1721. package/lib/platform/ios/spm/SpmDiscoverer.js +0 -228
  1722. package/lib/platform/ios/spm/SpmHelper.js +0 -813
  1723. package/lib/platform/ios/xcode/SaveEventFilter.js +0 -165
  1724. package/lib/platform/ios/xcode/XcodeAutomation.js +0 -350
  1725. package/lib/platform/ios/xcode/XcodeImportResolver.js +0 -434
  1726. package/lib/platform/ios/xcode/XcodeIntegration.js +0 -680
  1727. package/lib/platform/ios/xcode/XcodeWriteUtils.js +0 -225
  1728. package/lib/repository/base/BaseRepository.js +0 -256
  1729. package/lib/repository/knowledge/KnowledgeRepository.impl.js +0 -355
  1730. package/lib/repository/task/TaskRepository.impl.js +0 -400
  1731. package/lib/repository/token/TokenUsageStore.js +0 -164
  1732. package/lib/service/agent/AgentEventBus.js +0 -207
  1733. package/lib/service/agent/AgentFactory.js +0 -490
  1734. package/lib/service/agent/AgentMessage.js +0 -240
  1735. package/lib/service/agent/AgentRouter.js +0 -228
  1736. package/lib/service/agent/AgentRuntime.js +0 -1016
  1737. package/lib/service/agent/AgentState.js +0 -217
  1738. package/lib/service/agent/ConversationStore.js +0 -420
  1739. package/lib/service/agent/IntentClassifier.js +0 -331
  1740. package/lib/service/agent/LarkTransport.js +0 -389
  1741. package/lib/service/agent/capabilities.js +0 -408
  1742. package/lib/service/agent/context/ContextWindow.js +0 -674
  1743. package/lib/service/agent/context/ExplorationTracker.js +0 -1317
  1744. package/lib/service/agent/core/ChatAgentPrompts.js +0 -159
  1745. package/lib/service/agent/core/LoopContext.js +0 -170
  1746. package/lib/service/agent/core/MessageAdapter.js +0 -223
  1747. package/lib/service/agent/core/ToolExecutionPipeline.js +0 -376
  1748. package/lib/service/agent/domain/ChatAgentTasks.js +0 -218
  1749. package/lib/service/agent/domain/EpisodicConsolidator.js +0 -367
  1750. package/lib/service/agent/domain/EvidenceCollector.js +0 -502
  1751. package/lib/service/agent/domain/insight-analyst.js +0 -245
  1752. package/lib/service/agent/domain/insight-gate.js +0 -474
  1753. package/lib/service/agent/domain/insight-producer.js +0 -267
  1754. package/lib/service/agent/domain/scan-prompts.js +0 -105
  1755. package/lib/service/agent/forced-summary.js +0 -266
  1756. package/lib/service/agent/index.js +0 -91
  1757. package/lib/service/agent/memory/ActiveContext.js +0 -912
  1758. package/lib/service/agent/memory/MemoryCoordinator.js +0 -662
  1759. package/lib/service/agent/memory/PersistentMemory.js +0 -1165
  1760. package/lib/service/agent/memory/SessionStore.js +0 -897
  1761. package/lib/service/agent/memory/index.js +0 -13
  1762. package/lib/service/agent/policies.js +0 -442
  1763. package/lib/service/agent/presets.js +0 -303
  1764. package/lib/service/agent/strategies.js +0 -717
  1765. package/lib/service/agent/tools/ToolRegistry.js +0 -215
  1766. package/lib/service/agent/tools/_shared.js +0 -61
  1767. package/lib/service/agent/tools/ai-analysis.js +0 -75
  1768. package/lib/service/agent/tools/ast-graph.js +0 -879
  1769. package/lib/service/agent/tools/composite.js +0 -567
  1770. package/lib/service/agent/tools/guard.js +0 -145
  1771. package/lib/service/agent/tools/index.js +0 -250
  1772. package/lib/service/agent/tools/infrastructure.js +0 -232
  1773. package/lib/service/agent/tools/knowledge-graph.js +0 -112
  1774. package/lib/service/agent/tools/lifecycle.js +0 -488
  1775. package/lib/service/agent/tools/project-access.js +0 -919
  1776. package/lib/service/agent/tools/query.js +0 -264
  1777. package/lib/service/agent/tools/scan-recipe.js +0 -189
  1778. package/lib/service/agent/tools/system-interaction.js +0 -476
  1779. package/lib/service/automation/ActionPipeline.js +0 -63
  1780. package/lib/service/automation/AutomationOrchestrator.js +0 -76
  1781. package/lib/service/automation/ContextCollector.js +0 -37
  1782. package/lib/service/automation/DirectiveDetector.js +0 -142
  1783. package/lib/service/automation/FileWatcher.js +0 -430
  1784. package/lib/service/automation/TriggerResolver.js +0 -71
  1785. package/lib/service/automation/handlers/AlinkHandler.js +0 -81
  1786. package/lib/service/automation/handlers/CreateHandler.js +0 -196
  1787. package/lib/service/automation/handlers/DraftHandler.js +0 -77
  1788. package/lib/service/automation/handlers/GuardHandler.js +0 -239
  1789. package/lib/service/automation/handlers/HeaderHandler.js +0 -51
  1790. package/lib/service/automation/handlers/SearchHandler.js +0 -305
  1791. package/lib/service/bootstrap/BootstrapTaskManager.js +0 -442
  1792. package/lib/service/candidate/CandidateAggregator.js +0 -52
  1793. package/lib/service/candidate/SimilarityService.js +0 -100
  1794. package/lib/service/context/RecipeExtractor.js +0 -344
  1795. package/lib/service/cursor/AgentInstructionsGenerator.js +0 -469
  1796. package/lib/service/cursor/CursorDeliveryPipeline.js +0 -745
  1797. package/lib/service/cursor/FileProtection.js +0 -119
  1798. package/lib/service/cursor/KnowledgeCompressor.js +0 -189
  1799. package/lib/service/cursor/RulesGenerator.js +0 -174
  1800. package/lib/service/cursor/SkillsSyncer.js +0 -320
  1801. package/lib/service/cursor/TokenBudget.js +0 -41
  1802. package/lib/service/cursor/TopicClassifier.js +0 -191
  1803. package/lib/service/guard/ComplianceReporter.js +0 -364
  1804. package/lib/service/guard/ExclusionManager.js +0 -280
  1805. package/lib/service/guard/GuardCheckEngine.js +0 -1063
  1806. package/lib/service/guard/GuardCodeChecks.js +0 -391
  1807. package/lib/service/guard/GuardCrossFileChecks.js +0 -326
  1808. package/lib/service/guard/GuardFeedbackLoop.js +0 -152
  1809. package/lib/service/guard/GuardPatternUtils.js +0 -187
  1810. package/lib/service/guard/GuardService.js +0 -323
  1811. package/lib/service/guard/RuleLearner.js +0 -324
  1812. package/lib/service/guard/SourceFileCollector.js +0 -116
  1813. package/lib/service/guard/ViolationsStore.js +0 -236
  1814. package/lib/service/knowledge/CodeEntityGraph.js +0 -1177
  1815. package/lib/service/knowledge/ConfidenceRouter.js +0 -161
  1816. package/lib/service/knowledge/KnowledgeFileWriter.js +0 -725
  1817. package/lib/service/knowledge/KnowledgeGraphService.js +0 -264
  1818. package/lib/service/knowledge/KnowledgeService.js +0 -932
  1819. package/lib/service/module/ModuleService.js +0 -1054
  1820. package/lib/service/quality/FeedbackCollector.js +0 -146
  1821. package/lib/service/quality/QualityScorer.js +0 -203
  1822. package/lib/service/recipe/RecipeCandidateValidator.js +0 -211
  1823. package/lib/service/recipe/RecipeParser.js +0 -309
  1824. package/lib/service/search/CoarseRanker.js +0 -111
  1825. package/lib/service/search/CrossEncoderReranker.js +0 -174
  1826. package/lib/service/search/InvertedIndex.js +0 -92
  1827. package/lib/service/search/MultiSignalRanker.js +0 -227
  1828. package/lib/service/search/RetrievalFunnel.js +0 -134
  1829. package/lib/service/search/SearchEngine.js +0 -811
  1830. package/lib/service/skills/EventAggregator.js +0 -204
  1831. package/lib/service/skills/SignalCollector.js +0 -640
  1832. package/lib/service/skills/SkillAdvisor.js +0 -363
  1833. package/lib/service/skills/SkillHooks.js +0 -136
  1834. package/lib/service/snippet/SnippetFactory.js +0 -192
  1835. package/lib/service/snippet/SnippetInstaller.js +0 -329
  1836. package/lib/service/snippet/codecs/SnippetCodec.js +0 -67
  1837. package/lib/service/snippet/codecs/VSCodeCodec.js +0 -102
  1838. package/lib/service/task/TaskGraphService.js +0 -650
  1839. package/lib/service/task/TaskKnowledgeBridge.js +0 -86
  1840. package/lib/service/task/TaskReadyEngine.js +0 -127
  1841. package/lib/service/wiki/WikiGenerator.js +0 -1038
  1842. package/lib/service/wiki/WikiRenderers.js +0 -1903
  1843. package/lib/service/wiki/WikiUtils.js +0 -1052
  1844. package/lib/shared/BootstrapEventEmitter.js +0 -123
  1845. package/lib/shared/DimensionCopyRegistry.js +0 -472
  1846. package/lib/shared/FieldSpec.js +0 -359
  1847. package/lib/shared/LanguageService.js +0 -757
  1848. package/lib/shared/PathGuard.js +0 -326
  1849. package/lib/shared/RecipeReadinessChecker.js +0 -78
  1850. package/lib/shared/StyleGuide.js +0 -107
  1851. package/lib/shared/UnifiedValidator.js +0 -355
  1852. package/lib/shared/constants.js +0 -161
  1853. package/lib/shared/errors/BaseError.js +0 -94
  1854. package/lib/shared/errors/index.js +0 -14
  1855. package/lib/shared/similarity.js +0 -118
  1856. package/lib/shared/token-utils.js +0 -50
  1857. package/lib/shared/utils/common.js +0 -76
  1858. package/scripts/bench-real-projects.mjs +0 -256
  1859. package/scripts/build-native-ui.js +0 -73
  1860. package/scripts/clear-old-vector-index.js +0 -47
  1861. package/scripts/clear-vector-cache.js +0 -49
  1862. package/scripts/collect-test-project-stats.mjs +0 -160
  1863. package/scripts/diagnose-mcp.js +0 -83
  1864. package/scripts/ensure-parse-package.js +0 -46
  1865. package/scripts/generate-recipe-drafts.js +0 -179
  1866. package/scripts/init-db.js +0 -30
  1867. package/scripts/init-snippets.js +0 -324
  1868. package/scripts/init-vector-db.js +0 -277
  1869. package/scripts/install-cursor-skill.js +0 -393
  1870. package/scripts/install-full.js +0 -45
  1871. package/scripts/install-vscode-copilot.js +0 -333
  1872. package/scripts/migrate-md-to-knowledge.mjs +0 -355
  1873. package/scripts/recipe-audit.js +0 -253
  1874. package/scripts/release.js +0 -411
  1875. package/scripts/setup-mcp-config.js +0 -135
  1876. package/scripts/verify-context-api.js +0 -61
@@ -0,0 +1,1627 @@
1
+ /**
2
+ * WikiRenderers.js — Wiki 文档渲染函数
3
+ *
4
+ * 从 WikiGenerator.js 中提取的 Markdown 渲染器和 AI Prompt 构建函数。
5
+ * 所有函数均为无状态纯函数(不依赖 class 实例)。
6
+ *
7
+ * @module WikiRenderers
8
+ */
9
+ import path from 'node:path';
10
+ import { LanguageService } from '../../shared/LanguageService.js';
11
+ import { getInheritanceRoots, getLangTerms, getModuleSourceFiles, inferModulePurpose, mermaidId, slug, } from './WikiUtils.js';
12
+ // ═══ AI Prompt 构建 ════════════════════════════════════════
13
+ /**
14
+ * 为特定主题构建 AI 撰写 prompt (V3 AI-first 核心)
15
+ *
16
+ * 关键区别: 不是润色骨架,而是提供丰富数据让 AI 写完整文章
17
+ *
18
+ * @param {object} topic
19
+ * @param {object} data - { projectInfo, astInfo, moduleInfo, knowledgeInfo }
20
+ * @param {boolean} isZh
21
+ * @param {object|null} codeEntityGraph
22
+ * @returns {string}
23
+ */
24
+ export function buildArticlePrompt(topic, data, isZh, codeEntityGraph) {
25
+ const { projectInfo, astInfo, moduleInfo, knowledgeInfo } = data;
26
+ const parts = [];
27
+ const langTerms = getLangTerms(projectInfo.primaryLanguage || 'unknown');
28
+ const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
29
+ const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
30
+ // 公共项目上下文
31
+ parts.push(`# 项目: ${projectInfo.name}`);
32
+ parts.push(`源文件数: ${projectInfo.sourceFiles.length}, 模块: ${moduleInfo.targets.length}, 活跃知识条目: ${knowledgeInfo.recipes.length}`);
33
+ if (projectInfo.languages) {
34
+ parts.push(`语言分布: ${Object.entries(projectInfo.languages)
35
+ .sort((a, b) => b[1] - a[1])
36
+ .map(([l, c]) => `${l}(${c})`)
37
+ .join(', ')}`);
38
+ }
39
+ parts.push('');
40
+ switch (topic.type) {
41
+ case 'overview': {
42
+ parts.push('## 任务: 撰写项目概述文档');
43
+ parts.push('');
44
+ // 项目类型
45
+ const buildTypes = (projectInfo.buildSystems || []).map((b) => b.buildTool);
46
+ if (projectInfo.hasPackageSwift && !buildTypes.some((t) => t.includes('SPM'))) {
47
+ buildTypes.push('SPM');
48
+ }
49
+ if (projectInfo.hasPodfile && !buildTypes.includes('CocoaPods')) {
50
+ buildTypes.push('CocoaPods');
51
+ }
52
+ if (projectInfo.hasXcodeproj) {
53
+ buildTypes.push('Xcode Project');
54
+ }
55
+ if (buildTypes.length > 0) {
56
+ parts.push(`构建系统: ${buildTypes.join(' + ')}`);
57
+ }
58
+ parts.push('');
59
+ // 模块结构
60
+ if (moduleInfo.targets.length > 0) {
61
+ parts.push('### 模块列表');
62
+ for (const t of moduleInfo.targets) {
63
+ const files = getModuleSourceFiles(t, projectInfo);
64
+ const cls = astInfo.classNamesByModule?.[t.name]?.length || 0;
65
+ const deps = (t.dependencies || t.info?.dependencies || []).map((d) => (typeof d === 'string' ? d : d.name));
66
+ parts.push(`- ${t.name} (${t.type || 'target'}): ${files.length} 文件, ${cls} 个类型${deps.length > 0 ? `, 依赖: ${deps.join(', ')}` : ''}`);
67
+ }
68
+ parts.push('');
69
+ }
70
+ // AST 概况
71
+ if (astInfo.overview) {
72
+ parts.push('### 代码规模');
73
+ parts.push(`${tl}: ${astInfo.overview.totalClasses || 0}, ${il}: ${astInfo.overview.totalProtocols || 0}, 方法: ${astInfo.overview.totalMethods || 0}`);
74
+ parts.push('');
75
+ }
76
+ // 可用的其他文档(用于导航链接)
77
+ const otherTopics = (topic._allTopics || []).filter((t) => t.type !== 'overview');
78
+ if (otherTopics.length > 0) {
79
+ parts.push('### 需要包含的导航链接');
80
+ for (const t of otherTopics) {
81
+ parts.push(`- [${t.title}](${t.path})`);
82
+ }
83
+ parts.push('');
84
+ }
85
+ parts.push('要求: 撰写完整的项目概述文档。');
86
+ parts.push('包含: 项目简介(解释项目做什么)、模块总览(表格形式)、技术栈分析、核心数据指标、文档导航索引。');
87
+ parts.push('不要只列数据 — 要解释项目的定位、各模块的职责和协作关系。');
88
+ break;
89
+ }
90
+ case 'architecture': {
91
+ parts.push('## 任务: 撰写架构分析文档');
92
+ parts.push('');
93
+ if (moduleInfo.targets.length > 0) {
94
+ parts.push('### 模块及依赖关系');
95
+ for (const t of moduleInfo.targets) {
96
+ const deps = (t.dependencies || t.info?.dependencies || []).map((d) => (typeof d === 'string' ? d : d.name));
97
+ parts.push(`- ${t.name} (${t.type || 'target'})${deps.length > 0 ? ` → 依赖: ${deps.join(', ')}` : ''}`);
98
+ }
99
+ parts.push('');
100
+ }
101
+ if (astInfo.overview?.topLevelModules && astInfo.overview.topLevelModules.length > 0) {
102
+ parts.push(`### 顶层模块: ${astInfo.overview.topLevelModules.join(', ')}`);
103
+ const cpm = astInfo.overview.classesPerModule || {};
104
+ for (const mod of astInfo.overview.topLevelModules) {
105
+ parts.push(` ${mod}: ${cpm[mod] || 0} 个类`);
106
+ }
107
+ parts.push('');
108
+ }
109
+ if (astInfo.overview?.entryPoints && astInfo.overview.entryPoints.length > 0) {
110
+ parts.push(`### 入口点: ${astInfo.overview.entryPoints.join(', ')}`);
111
+ parts.push('');
112
+ }
113
+ const roots = getInheritanceRoots(codeEntityGraph);
114
+ if (roots.length > 0) {
115
+ parts.push('### 核心继承关系');
116
+ for (const r of roots.slice(0, 10)) {
117
+ parts.push(`- ${r.name} → ${(r.children || []).slice(0, 5).join(', ')}`);
118
+ }
119
+ parts.push('');
120
+ }
121
+ parts.push('要求: 撰写架构分析文档。');
122
+ parts.push('包含: 模块依赖图(使用 Mermaid graph TD 语法)、分层架构分析(解释每层的职责)、模块间协作关系、架构设计决策阐述。');
123
+ parts.push('用 Mermaid 绘制依赖关系图和继承层次图。分析为什么采用这种架构。');
124
+ break;
125
+ }
126
+ case 'module': {
127
+ const md = topic._moduleData;
128
+ const target = md.target;
129
+ const moduleFiles = md.moduleFiles;
130
+ const moduleClasses = astInfo.classNamesByModule?.[target.name] || [];
131
+ const moduleProtocols = astInfo.protocolNamesByModule?.[target.name] || [];
132
+ const deps = target.dependencies || target.info?.dependencies || [];
133
+ parts.push(`## 任务: 撰写 "${target.name}" 模块的深度文档`);
134
+ parts.push('');
135
+ parts.push('### 模块基本信息');
136
+ parts.push(`- 类型: ${target.type || 'target'}`);
137
+ const tPath = target.path || target.info?.path;
138
+ if (tPath) {
139
+ parts.push(`- 路径: ${tPath}`);
140
+ }
141
+ if (target.packageName) {
142
+ parts.push(`- 所属包: ${target.packageName}`);
143
+ }
144
+ parts.push(`- 源文件: ${moduleFiles.length} 个`);
145
+ parts.push(`- ${tl}: ${moduleClasses.length} 个`);
146
+ parts.push(`- ${il}: ${moduleProtocols.length} 个`);
147
+ parts.push('');
148
+ if (deps.length > 0) {
149
+ parts.push(`### 依赖: ${deps.map((d) => (typeof d === 'string' ? d : d.name)).join(', ')}`);
150
+ parts.push('');
151
+ }
152
+ if (moduleClasses.length > 0) {
153
+ parts.push(`### 类型列表: ${moduleClasses.slice(0, 30).join(', ')}`);
154
+ parts.push('');
155
+ }
156
+ if (moduleProtocols.length > 0) {
157
+ parts.push(`### ${il}列表: ${moduleProtocols.slice(0, 20).join(', ')}`);
158
+ parts.push('');
159
+ }
160
+ // 关键源文件名(帮助 AI 推断模块功能)
161
+ if (moduleFiles.length > 0) {
162
+ const keyFiles = moduleFiles.slice(0, 25).map((f) => path.basename(f));
163
+ parts.push(`### 关键源文件: ${keyFiles.join(', ')}`);
164
+ parts.push('');
165
+ }
166
+ // 相关 recipes
167
+ const related = knowledgeInfo.recipes.filter((r) => {
168
+ const json = r.toJSON ? r.toJSON() : r;
169
+ return (json.moduleName === target.name ||
170
+ json.tags?.includes(target.name) ||
171
+ json.title?.includes(target.name));
172
+ });
173
+ if (related.length > 0) {
174
+ parts.push(`### 相关知识条目 (${related.length})`);
175
+ for (const r of related.slice(0, 10)) {
176
+ const json = r.toJSON ? r.toJSON() : r;
177
+ parts.push(`- ${json.title}: ${json.description || ''}`);
178
+ if (json.reasoning?.whyStandard) {
179
+ parts.push(` 为什么: ${json.reasoning.whyStandard}`);
180
+ }
181
+ }
182
+ parts.push('');
183
+ }
184
+ parts.push('要求: 撰写模块深度分析文档。');
185
+ parts.push('包含: 模块职责说明(从文件名和类名推断功能意图)、核心类型分析(不是简单罗列而是解释每个类的角色)、依赖关系分析、设计模式识别。');
186
+ parts.push('如果能推断出数据流或协作关系,请用 Mermaid 图表展示。');
187
+ break;
188
+ }
189
+ case 'getting-started': {
190
+ parts.push('## 任务: 撰写快速上手指南');
191
+ parts.push('');
192
+ // 列出检测到的构建系统
193
+ const bs = projectInfo.buildSystems || [];
194
+ if (bs.length > 0) {
195
+ parts.push(`构建系统: ${bs.map((b) => b.buildTool).join(', ')}`);
196
+ }
197
+ else {
198
+ // 兼容旧数据
199
+ if (projectInfo.hasPackageSwift) {
200
+ parts.push('构建系统: Swift Package Manager');
201
+ }
202
+ if (projectInfo.hasPodfile) {
203
+ parts.push('构建系统: CocoaPods');
204
+ }
205
+ if (projectInfo.hasXcodeproj) {
206
+ parts.push('构建系统: Xcode Project');
207
+ }
208
+ }
209
+ parts.push('');
210
+ if (moduleInfo.targets.length > 0) {
211
+ const mainTargets = moduleInfo.targets.filter((t) => t.type !== 'test');
212
+ const testTargets = moduleInfo.targets.filter((t) => t.type === 'test');
213
+ if (mainTargets.length > 0) {
214
+ parts.push(`主要 Target: ${mainTargets.map((t) => t.name).join(', ')}`);
215
+ }
216
+ if (testTargets.length > 0) {
217
+ parts.push(`测试 Target: ${testTargets.map((t) => t.name).join(', ')}`);
218
+ }
219
+ parts.push('');
220
+ }
221
+ if (astInfo.overview?.entryPoints && astInfo.overview.entryPoints.length > 0) {
222
+ parts.push(`入口点: ${astInfo.overview.entryPoints.join(', ')}`);
223
+ parts.push('');
224
+ }
225
+ parts.push('要求: 撰写开发者快速上手指南。');
226
+ parts.push('包含: 环境要求、项目获取、依赖安装、构建步骤(具体命令)、运行测试、项目目录结构说明。');
227
+ parts.push('语句清晰,步骤明确,适合新人阅读。');
228
+ break;
229
+ }
230
+ case 'patterns': {
231
+ parts.push('## 任务: 撰写代码模式与最佳实践文档');
232
+ parts.push('');
233
+ const groups = {};
234
+ for (const r of knowledgeInfo.recipes) {
235
+ const json = r.toJSON ? r.toJSON() : r;
236
+ const cat = json.category || 'Other';
237
+ if (!groups[cat]) {
238
+ groups[cat] = [];
239
+ }
240
+ groups[cat].push(json);
241
+ }
242
+ for (const [cat, items] of Object.entries(groups).sort()) {
243
+ parts.push(`### ${cat} (${items.length} 条)`);
244
+ for (const item of items.slice(0, 8)) {
245
+ parts.push(`- ${item.title}: ${item.description || 'N/A'}`);
246
+ if (item.doClause) {
247
+ parts.push(` 应当: ${item.doClause}`);
248
+ }
249
+ if (item.dontClause) {
250
+ parts.push(` 避免: ${item.dontClause}`);
251
+ }
252
+ if (item.content?.pattern) {
253
+ parts.push(` 代码片段: ${item.content.pattern.slice(0, 200)}`);
254
+ }
255
+ }
256
+ parts.push('');
257
+ }
258
+ parts.push('要求: 撰写代码模式文档。对每个分类进行总结分析,解释模式的意义和应用场景。');
259
+ parts.push('不要只列出条目 — 为每个分类写一段总结,解释该类模式的整体意图。附带代码示例(从数据中取)。');
260
+ break;
261
+ }
262
+ case 'pattern-category': {
263
+ const pd = topic._patternData;
264
+ parts.push(`## 任务: 撰写 "${pd.category}" 分类的代码模式文档`);
265
+ parts.push('');
266
+ for (const item of pd.recipes) {
267
+ parts.push(`### ${item.title}`);
268
+ if (item.description) {
269
+ parts.push(`描述: ${item.description}`);
270
+ }
271
+ if (item.doClause) {
272
+ parts.push(`应当: ${item.doClause}`);
273
+ }
274
+ if (item.dontClause) {
275
+ parts.push(`避免: ${item.dontClause}`);
276
+ }
277
+ if (item.reasoning?.whyStandard) {
278
+ parts.push(`原因: ${item.reasoning.whyStandard}`);
279
+ }
280
+ if (item.content?.pattern) {
281
+ parts.push('代码:');
282
+ parts.push('```');
283
+ parts.push(item.content.pattern.slice(0, 500));
284
+ parts.push('```');
285
+ }
286
+ parts.push('');
287
+ }
288
+ parts.push('要求: 撰写该分类的详细代码模式文档。');
289
+ parts.push('先写一段总结性概述,然后对每个模式做分析,解释为什么要遵循,给出正确和错误的对比示例。');
290
+ break;
291
+ }
292
+ case 'reference': {
293
+ parts.push(`## 任务: 撰写${il}参考文档`);
294
+ parts.push('');
295
+ const protoByModule = astInfo.protocolNamesByModule || {};
296
+ for (const [mod, protos] of Object.entries(protoByModule).sort()) {
297
+ if (protos.length > 0) {
298
+ parts.push(`### ${mod} 模块: ${protos.join(', ')}`);
299
+ }
300
+ }
301
+ parts.push('');
302
+ parts.push(`总计: ${astInfo.protocols.length} 个${il}, ${astInfo.classes.length} 个${tl}`);
303
+ parts.push('');
304
+ parts.push(`要求: 撰写${il}参考文档。按模块分组,分析每个${il}的用途和意义,描述${il}之间的关系和设计意图。`);
305
+ break;
306
+ }
307
+ case 'folder-overview': {
308
+ const profiles = (topic._folderProfiles || []);
309
+ parts.push('## 任务: 撰写项目文件夹结构分析文档');
310
+ parts.push('');
311
+ parts.push('注意: 本项目的代码实体(类/函数/协议等)无法通过 AST 自动提取,');
312
+ parts.push('因此以「文件夹画像」方式进行结构分析。');
313
+ parts.push('');
314
+ parts.push(`### 发现 ${profiles.length} 个重要文件夹`);
315
+ parts.push('');
316
+ for (const fp of profiles) {
317
+ parts.push(`#### ${fp.relPath}`);
318
+ parts.push(`- 源文件: ${fp.fileCount} 个, 总大小: ${(fp.totalSize / 1024).toFixed(1)}KB`);
319
+ parts.push(`- 语言分布: ${Object.entries(fp.langBreakdown)
320
+ .map(([l, c]) => `${l}(${c})`)
321
+ .join(', ')}`);
322
+ if (fp.entryPoints.length > 0) {
323
+ parts.push(`- 入口文件: ${fp.entryPoints.join(', ')}`);
324
+ }
325
+ if (fp.namingPatterns.length > 0) {
326
+ parts.push(`- 命名约定: ${fp.namingPatterns.join(', ')}`);
327
+ }
328
+ if (fp.imports.length > 0) {
329
+ parts.push(`- 依赖引用: ${fp.imports.join(', ')}`);
330
+ }
331
+ if (fp.purpose) {
332
+ parts.push(`- 推断功能: ${fp.purpose.zh || fp.purpose.en || '-'}`);
333
+ }
334
+ if (fp.readme) {
335
+ parts.push(`- README 摘要: ${fp.readme.slice(0, 200)}`);
336
+ }
337
+ if (fp.headerComments.length > 0) {
338
+ parts.push(`- 代码注释: ${fp.headerComments.join('; ')}`);
339
+ }
340
+ parts.push('');
341
+ }
342
+ parts.push('要求: 撰写项目结构分析文档。');
343
+ parts.push('重点分析:');
344
+ parts.push('1. 项目整体架构分层 — 从文件夹结构推断项目架构(MVC/分层/微服务等)');
345
+ parts.push('2. 各文件夹的职责与协作关系 — 从文件命名和 import 关系推断');
346
+ parts.push('3. 用 Mermaid graph TD 画出文件夹之间的依赖关系图');
347
+ parts.push('4. 从命名约定分析团队编码规范');
348
+ parts.push('5. 对照文件夹的文件分布特征,评估项目的工程化程度');
349
+ break;
350
+ }
351
+ case 'folder-profile': {
352
+ const fp = topic._folderProfile;
353
+ parts.push(`## 任务: 撰写 "${fp.name}" 目录的深度分析文档`);
354
+ parts.push('');
355
+ parts.push('注意: 本项目的代码实体无法通过 AST 提取,以下分析基于文件夹画像。');
356
+ parts.push('');
357
+ parts.push('### 目录信息');
358
+ parts.push(`- 路径: ${fp.relPath}`);
359
+ parts.push(`- 源文件: ${fp.fileCount} 个`);
360
+ parts.push(`- 总大小: ${(fp.totalSize / 1024).toFixed(1)}KB`);
361
+ parts.push(`- 语言分布: ${Object.entries(fp.langBreakdown)
362
+ .map(([l, c]) => `${l}(${c})`)
363
+ .join(', ')}`);
364
+ parts.push('');
365
+ if (fp.entryPoints.length > 0) {
366
+ parts.push(`### 入口文件: ${fp.entryPoints.join(', ')}`);
367
+ parts.push('');
368
+ }
369
+ if (fp.readme) {
370
+ parts.push('### 目录 README');
371
+ parts.push(fp.readme.slice(0, 500));
372
+ parts.push('');
373
+ }
374
+ if (fp.fileNames.length > 0) {
375
+ parts.push(`### 文件列表 (${fp.fileNames.length} 个)`);
376
+ parts.push(fp.fileNames.slice(0, 40).join(', '));
377
+ parts.push('');
378
+ }
379
+ if (fp.namingPatterns.length > 0) {
380
+ parts.push(`### 命名约定: ${fp.namingPatterns.join(', ')}`);
381
+ parts.push('');
382
+ }
383
+ if (fp.imports.length > 0) {
384
+ parts.push(`### 依赖引用: ${fp.imports.join(', ')}`);
385
+ parts.push('');
386
+ }
387
+ if (fp.headerComments.length > 0) {
388
+ parts.push('### 关键文件注释');
389
+ for (const hc of fp.headerComments) {
390
+ parts.push(`- ${hc}`);
391
+ }
392
+ parts.push('');
393
+ }
394
+ parts.push('要求: 撰写该目录的深度分析文档。');
395
+ parts.push('包含: 目录职责推断(从文件名和注释推断)、文件组织分析、命名规范评估、');
396
+ parts.push('依赖关系分析(从 import 推断)、关键文件说明。');
397
+ parts.push('从文件命名模式推断出这个目录承担的功能角色和设计意图。');
398
+ break;
399
+ }
400
+ }
401
+ return parts.join('\n');
402
+ }
403
+ /**
404
+ * 构建非 AI 降级的丰富模板内容
405
+ * 即使没有 AI,也要产出有意义的内容 (不是只有列表罗列)
406
+ *
407
+ * @param {object} topic
408
+ * @param {object} data - { projectInfo, astInfo, moduleInfo, knowledgeInfo }
409
+ * @param {boolean} isZh
410
+ * @param {object|null} codeEntityGraph
411
+ * @returns {string}
412
+ */
413
+ export function buildFallbackArticle(topic, data, isZh, codeEntityGraph) {
414
+ const { projectInfo, astInfo, moduleInfo, knowledgeInfo } = data;
415
+ switch (topic.type) {
416
+ case 'overview':
417
+ return renderIndex(projectInfo, astInfo, moduleInfo, knowledgeInfo, isZh, topic._allTopics || []);
418
+ case 'architecture':
419
+ return renderArchitecture(projectInfo, astInfo, moduleInfo, isZh, codeEntityGraph);
420
+ case 'getting-started':
421
+ return renderGettingStarted(projectInfo, moduleInfo, astInfo, isZh);
422
+ case 'module':
423
+ return renderModule(topic._moduleData.target, astInfo, knowledgeInfo, isZh, projectInfo);
424
+ case 'patterns':
425
+ return renderPatterns(knowledgeInfo, isZh);
426
+ case 'pattern-category':
427
+ return renderPatternCategory(topic._patternData, isZh);
428
+ case 'reference':
429
+ return renderProtocolReference(astInfo, isZh, projectInfo);
430
+ case 'folder-overview':
431
+ return renderFolderOverview(topic._folderProfiles, projectInfo, isZh);
432
+ case 'folder-profile':
433
+ return renderFolderProfile(topic._folderProfile, projectInfo, isZh);
434
+ default:
435
+ return '';
436
+ }
437
+ }
438
+ // ═══ Markdown 渲染器 ═══════════════════════════════════════
439
+ /**
440
+ * 渲染项目概述页 (index.md)
441
+ */
442
+ export function renderIndex(project, ast, modules, knowledge, isZh, allTopics) {
443
+ const title = isZh ? '项目概述' : 'Project Overview';
444
+ const langTerms = getLangTerms(project.primaryLanguage || 'unknown');
445
+ const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
446
+ const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
447
+ const lines = [
448
+ `# ${project.name} — ${title}`,
449
+ '',
450
+ `> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
451
+ `> ${isZh ? '生成时间' : 'Generated at'}: ${new Date().toISOString()}`,
452
+ '',
453
+ ];
454
+ // ── 项目简介 ──
455
+ lines.push(`## ${isZh ? '简介' : 'Introduction'}`);
456
+ lines.push('');
457
+ // 从 buildSystems 或 legacy 字段推断项目类型标签
458
+ const types = [];
459
+ if (project.buildSystems && project.buildSystems.length > 0) {
460
+ for (const bs of project.buildSystems) {
461
+ types.push(bs.buildTool);
462
+ }
463
+ }
464
+ else {
465
+ if (project.hasPackageSwift) {
466
+ types.push('SPM');
467
+ }
468
+ if (project.hasPodfile) {
469
+ types.push('CocoaPods');
470
+ }
471
+ if (project.hasXcodeproj) {
472
+ types.push('Xcode Project');
473
+ }
474
+ }
475
+ const projectTypeLabel = types.join(' + ') ||
476
+ (project.primaryLanguage ? LanguageService.displayName(project.primaryLanguage) : 'Software');
477
+ const overview = ast.overview || {};
478
+ const mainTargets = modules.targets.filter((t) => t.type !== 'test');
479
+ const testTargets = modules.targets.filter((t) => t.type === 'test');
480
+ if (isZh) {
481
+ lines.push(`**${project.name}** 是一个 ${projectTypeLabel} 项目,` +
482
+ `包含 ${project.sourceFiles.length} 个源文件` +
483
+ (overview.totalClasses ? `、${overview.totalClasses} 个${tl}` : '') +
484
+ (overview.totalProtocols ? `、${overview.totalProtocols} 个${il}` : '') +
485
+ `。`);
486
+ if (mainTargets.length > 0) {
487
+ lines.push(`项目由 ${mainTargets.length} 个功能模块组成` +
488
+ (testTargets.length > 0 ? `,配备 ${testTargets.length} 个测试模块` : '') +
489
+ `。`);
490
+ }
491
+ }
492
+ else {
493
+ lines.push(`**${project.name}** is a ${projectTypeLabel} project ` +
494
+ `containing ${project.sourceFiles.length} source files` +
495
+ (overview.totalClasses ? `, ${overview.totalClasses} ${tl}` : '') +
496
+ (overview.totalProtocols ? `, ${overview.totalProtocols} ${il}` : '') +
497
+ `.`);
498
+ if (mainTargets.length > 0) {
499
+ lines.push(`The project consists of ${mainTargets.length} functional modules` +
500
+ (testTargets.length > 0 ? ` with ${testTargets.length} test modules` : '') +
501
+ `.`);
502
+ }
503
+ }
504
+ lines.push('');
505
+ // ── 模块总览 ──
506
+ if (modules.targets.length > 0) {
507
+ lines.push(`## ${isZh ? '模块总览' : 'Module Overview'}`);
508
+ lines.push('');
509
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类型' : 'Type'} | ${isZh ? '源文件' : 'Files'} | ${tl} | ${il} |`);
510
+ lines.push('|--------|------|--------|--------|----------|');
511
+ for (const t of modules.targets) {
512
+ const moduleFiles = getModuleSourceFiles(t, project);
513
+ const classCount = ast.classNamesByModule?.[t.name]?.length || 0;
514
+ const protoCount = ast.protocolNamesByModule?.[t.name]?.length || 0;
515
+ const hasDoc = allTopics?.some((tp) => tp.type === 'module' &&
516
+ tp._moduleData?.target.name === t.name);
517
+ const nameCol = hasDoc ? `[${t.name}](modules/${slug(t.name)}.md)` : t.name;
518
+ lines.push(`| ${nameCol} | ${t.type || 'target'} | ${moduleFiles.length || '-'} | ${classCount || '-'} | ${protoCount || '-'} |`);
519
+ }
520
+ lines.push('');
521
+ }
522
+ else if (project.sourceFilesByModule && Object.keys(project.sourceFilesByModule).length >= 2) {
523
+ // 无 moduleService targets → 使用 sourceFilesByModule 推断的模块
524
+ const sfm = project.sourceFilesByModule;
525
+ const sorted = Object.entries(sfm).sort((a, b) => b[1].length - a[1].length);
526
+ lines.push(`## ${isZh ? '模块总览' : 'Module Overview'}`);
527
+ lines.push('');
528
+ lines.push(isZh
529
+ ? `项目代码按目录结构可划分为 ${sorted.length} 个模块:`
530
+ : `The project code is organized into ${sorted.length} modules:`);
531
+ lines.push('');
532
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件' : 'Files'} | ${isZh ? '说明' : 'Description'} |`);
533
+ lines.push('|--------|--------|------|');
534
+ for (const [modName, modFiles] of sorted.slice(0, 15)) {
535
+ const hasDoc = allTopics?.some((tp) => tp.type === 'module' && tp.title === modName);
536
+ const nameCol = hasDoc ? `[${modName}](modules/${slug(modName)}.md)` : modName;
537
+ const purpose = inferModulePurpose(modName, [], [], modFiles);
538
+ const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
539
+ lines.push(`| ${nameCol} | ${modFiles.length} | ${desc} |`);
540
+ }
541
+ lines.push('');
542
+ }
543
+ // ── 技术栈 ──
544
+ lines.push(`## ${isZh ? '技术栈' : 'Tech Stack'}`);
545
+ lines.push('');
546
+ if (project.languages && Object.keys(project.languages).length > 0) {
547
+ lines.push(`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '占比' : 'Share'} |`);
548
+ lines.push('|--------|-------|------|');
549
+ const langMap = project.languages;
550
+ const total = Object.values(langMap).reduce((a, b) => a + b, 0);
551
+ for (const [lang, count] of Object.entries(langMap).sort((a, b) => b[1] - a[1])) {
552
+ const pct = total > 0 ? ((count / total) * 100).toFixed(1) : 0;
553
+ lines.push(`| ${lang} | ${count} | ${pct}% |`);
554
+ }
555
+ lines.push('');
556
+ }
557
+ // ── 核心数据 ──
558
+ lines.push(`## ${isZh ? '核心数据' : 'Key Metrics'}`);
559
+ lines.push('');
560
+ lines.push(`| ${isZh ? '指标' : 'Metric'} | ${isZh ? '数量' : 'Count'} |`);
561
+ lines.push('|--------|-------|');
562
+ lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${project.sourceFiles.length} |`);
563
+ if (overview.totalClasses) {
564
+ lines.push(`| ${tl} | ${overview.totalClasses} |`);
565
+ }
566
+ if (overview.totalProtocols) {
567
+ lines.push(`| ${il} | ${overview.totalProtocols} |`);
568
+ }
569
+ if (overview.totalMethods) {
570
+ lines.push(`| ${isZh ? '方法总数' : 'Methods'} | ${overview.totalMethods} |`);
571
+ }
572
+ if (modules.targets.length > 0) {
573
+ lines.push(`| ${isZh ? '模块数' : 'Modules'} | ${modules.targets.length} |`);
574
+ }
575
+ if (knowledge.recipes.length > 0) {
576
+ lines.push(`| ${isZh ? '知识库条目' : 'KB Recipes'} | ${knowledge.recipes.length} |`);
577
+ }
578
+ lines.push('');
579
+ // ── 文档导航 (动态,基于实际生成的主题) ──
580
+ const navTopics = (allTopics || []).filter((t) => t.type !== 'overview');
581
+ if (navTopics.length > 0) {
582
+ lines.push('---');
583
+ lines.push('');
584
+ lines.push(`## ${isZh ? '📖 文档导航' : '📖 Documentation'}`);
585
+ lines.push('');
586
+ for (const t of navTopics) {
587
+ lines.push(`- [${t.title}](${t.path})`);
588
+ }
589
+ lines.push('');
590
+ }
591
+ return lines.join('\n');
592
+ }
593
+ /**
594
+ * 渲染架构总览文档 (architecture.md)
595
+ *
596
+ * @param {object} project
597
+ * @param {object} ast
598
+ * @param {object} modules
599
+ * @param {boolean} isZh
600
+ * @param {object|null} codeEntityGraph
601
+ */
602
+ export function renderArchitecture(project, ast, modules, isZh, codeEntityGraph) {
603
+ const lines = [
604
+ `# ${isZh ? '架构总览' : 'Architecture Overview'}`,
605
+ '',
606
+ `> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
607
+ '',
608
+ ];
609
+ // 依赖图 (Mermaid)
610
+ if (modules.targets.length > 0) {
611
+ lines.push(`## ${isZh ? '模块依赖图' : 'Module Dependency Graph'}`);
612
+ lines.push('');
613
+ lines.push('```mermaid');
614
+ lines.push('graph TD');
615
+ // 渲染 target 节点和依赖边
616
+ const rendered = new Set();
617
+ for (const target of modules.targets) {
618
+ const sid = mermaidId(target.name);
619
+ if (!rendered.has(sid)) {
620
+ const shape = target.type === 'test' ? `${sid}[["${target.name} (Test)"]]` : `${sid}["${target.name}"]`;
621
+ lines.push(` ${shape}`);
622
+ rendered.add(sid);
623
+ }
624
+ }
625
+ // 如果有依赖图数据,渲染边
626
+ if (modules.depGraph) {
627
+ const edges = modules.depGraph.edges || [];
628
+ for (const edge of Array.isArray(edges) ? edges : []) {
629
+ if (edge.from && edge.to) {
630
+ const fromId = mermaidId(edge.from.split('::').pop() || edge.from);
631
+ const toId = mermaidId(edge.to.split('::').pop() || edge.to);
632
+ lines.push(` ${fromId} --> ${toId}`);
633
+ }
634
+ }
635
+ }
636
+ lines.push('```');
637
+ lines.push('');
638
+ }
639
+ else if (project.sourceFilesByModule && Object.keys(project.sourceFilesByModule).length >= 2) {
640
+ // 无 moduleService → 从 sourceFilesByModule 推断模块结构图
641
+ const sfm = project.sourceFilesByModule;
642
+ // 只显示有实质内容的模块(>= 2 个文件),避免单文件噪声
643
+ const sorted = Object.entries(sfm)
644
+ .filter(([, files]) => files.length >= 2)
645
+ .sort((a, b) => b[1].length - a[1].length);
646
+ const topModules = sorted.slice(0, 15);
647
+ lines.push(`## ${isZh ? '模块结构图' : 'Module Structure'}`);
648
+ lines.push('');
649
+ lines.push('```mermaid');
650
+ lines.push('graph TD');
651
+ lines.push(` Root["${project.name}"]`);
652
+ for (const [modName] of topModules) {
653
+ const sid = mermaidId(modName);
654
+ lines.push(` ${sid}["${modName}"]`);
655
+ lines.push(` Root --> ${sid}`);
656
+ }
657
+ lines.push('```');
658
+ lines.push('');
659
+ // 模块详情表
660
+ lines.push(`## ${isZh ? '模块详情' : 'Module Details'}`);
661
+ lines.push('');
662
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件数' : 'Files'} | ${isZh ? '说明' : 'Description'} |`);
663
+ lines.push('|--------|-------|------|');
664
+ for (const [modName, modFiles] of topModules) {
665
+ const purpose = inferModulePurpose(modName, [], [], modFiles);
666
+ const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
667
+ lines.push(`| ${modName} | ${modFiles.length} | ${desc} |`);
668
+ }
669
+ lines.push('');
670
+ }
671
+ // 分层架构
672
+ if (ast.overview) {
673
+ const modules = ast.overview.topLevelModules || [];
674
+ if (modules.length > 0) {
675
+ lines.push(`## ${isZh ? '顶层模块' : 'Top-Level Modules'}`);
676
+ lines.push('');
677
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类数量' : 'Classes'} |`);
678
+ lines.push('|--------|---------|');
679
+ const cpm = ast.overview.classesPerModule || {};
680
+ for (const mod of modules) {
681
+ lines.push(`| ${mod} | ${cpm[mod] || 0} |`);
682
+ }
683
+ lines.push('');
684
+ }
685
+ // 入口点
686
+ if (ast.overview?.entryPoints && ast.overview.entryPoints.length > 0) {
687
+ lines.push(`## ${isZh ? '入口点' : 'Entry Points'}`);
688
+ lines.push('');
689
+ for (const ep of ast.overview.entryPoints) {
690
+ lines.push(`- \`${ep}\``);
691
+ }
692
+ lines.push('');
693
+ }
694
+ }
695
+ // 继承层次 (from CodeEntityGraph)
696
+ if (codeEntityGraph) {
697
+ try {
698
+ const topClasses = getInheritanceRoots(codeEntityGraph);
699
+ if (topClasses.length > 0) {
700
+ lines.push(`## ${isZh ? '核心继承层次' : 'Key Inheritance Hierarchy'}`);
701
+ lines.push('');
702
+ lines.push('```mermaid');
703
+ lines.push('classDiagram');
704
+ for (const root of topClasses.slice(0, 20)) {
705
+ lines.push(` class ${mermaidId(root.name)}`);
706
+ for (const child of root.children || []) {
707
+ lines.push(` ${mermaidId(root.name)} <|-- ${mermaidId(child)}`);
708
+ }
709
+ }
710
+ lines.push('```');
711
+ lines.push('');
712
+ }
713
+ }
714
+ catch {
715
+ /* non-critical */
716
+ }
717
+ }
718
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
719
+ lines.push('');
720
+ return lines.join('\n');
721
+ }
722
+ /**
723
+ * 渲染模块详情文档 (modules/{name}.md)
724
+ */
725
+ export function renderModule(target, ast, knowledge, isZh, projectInfo) {
726
+ const langTerms = getLangTerms(projectInfo?.primaryLanguage || 'unknown');
727
+ const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
728
+ const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
729
+ const lines = [
730
+ `# ${target.name}`,
731
+ '',
732
+ `> ${isZh ? '模块文档 — 由 AutoSnippet Repo Wiki 自动生成' : 'Module doc — Auto-generated by AutoSnippet Repo Wiki'}`,
733
+ '',
734
+ ];
735
+ // 收集模块数据
736
+ const moduleFiles = projectInfo ? getModuleSourceFiles(target, projectInfo) : [];
737
+ const moduleClasses = ast.classNamesByModule?.[target.name] || [];
738
+ const moduleProtocols = ast.protocolNamesByModule?.[target.name] || [];
739
+ const deps = target.dependencies || target.info?.dependencies || [];
740
+ // ── 模块概述 ──
741
+ lines.push(`## ${isZh ? '概述' : 'Overview'}`);
742
+ lines.push('');
743
+ // 推断模块功能 (基于名称和内容)
744
+ const purpose = inferModulePurpose(target.name, moduleClasses, moduleProtocols, moduleFiles);
745
+ if (purpose) {
746
+ lines.push(isZh
747
+ ? `**${target.name}** ${purpose.zh},包含 ${moduleFiles.length} 个源文件、${moduleClasses.length} 个${tl}${moduleProtocols.length > 0 ? `、${moduleProtocols.length} 个${il}` : ''}。`
748
+ : `**${target.name}** ${purpose.en}, containing ${moduleFiles.length} source files, ${moduleClasses.length} ${tl}${moduleProtocols.length > 0 ? `, ${moduleProtocols.length} ${il}` : ''}.`);
749
+ }
750
+ else {
751
+ lines.push(isZh
752
+ ? `**${target.name}** 是项目中的一个 ${target.type || 'target'} 模块,包含 ${moduleFiles.length} 个源文件、${moduleClasses.length} 个${tl}。`
753
+ : `**${target.name}** is a ${target.type || 'target'} module in the project, containing ${moduleFiles.length} source files and ${moduleClasses.length} ${tl}.`);
754
+ }
755
+ lines.push('');
756
+ // ── 模块信息表 ──
757
+ lines.push(`| ${isZh ? '属性' : 'Property'} | ${isZh ? '值' : 'Value'} |`);
758
+ lines.push('|--------|------|');
759
+ lines.push(`| ${isZh ? '类型' : 'Type'} | ${target.type || 'target'} |`);
760
+ if (target.packageName) {
761
+ lines.push(`| ${isZh ? '所属包' : 'Package'} | ${target.packageName} |`);
762
+ }
763
+ if (target.path || target.info?.path) {
764
+ lines.push(`| ${isZh ? '路径' : 'Path'} | \`${target.path || target.info?.path}\` |`);
765
+ }
766
+ if (moduleFiles.length > 0) {
767
+ lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${moduleFiles.length} |`);
768
+ }
769
+ if (moduleClasses.length > 0) {
770
+ lines.push(`| ${tl} | ${moduleClasses.length} |`);
771
+ }
772
+ if (moduleProtocols.length > 0) {
773
+ lines.push(`| ${il} | ${moduleProtocols.length} |`);
774
+ }
775
+ if (deps.length > 0) {
776
+ lines.push(`| ${isZh ? '依赖数' : 'Dependencies'} | ${deps.length} |`);
777
+ }
778
+ lines.push('');
779
+ // ── 依赖 ──
780
+ if (deps.length > 0) {
781
+ lines.push(`## ${isZh ? '依赖关系' : 'Dependencies'}`);
782
+ lines.push('');
783
+ lines.push(isZh
784
+ ? `${target.name} 依赖以下 ${deps.length} 个模块:`
785
+ : `${target.name} depends on ${deps.length} module(s):`);
786
+ lines.push('');
787
+ for (const dep of deps) {
788
+ const depName = typeof dep === 'string' ? dep : dep.name || String(dep);
789
+ lines.push(`- \`${depName}\``);
790
+ }
791
+ lines.push('');
792
+ }
793
+ // ── 核心类型分析 ──
794
+ if (moduleClasses.length > 0 || moduleProtocols.length > 0) {
795
+ lines.push(`## ${isZh ? '核心类型' : 'Core Types'}`);
796
+ lines.push('');
797
+ if (moduleProtocols.length > 0) {
798
+ lines.push(`### ${il} (${moduleProtocols.length})`);
799
+ lines.push('');
800
+ lines.push(isZh
801
+ ? `${target.name} 定义了 ${moduleProtocols.length} 个${il},用于规范模块的接口边界:`
802
+ : `${target.name} defines ${moduleProtocols.length} ${il} establishing the module's interface contracts:`);
803
+ lines.push('');
804
+ const sorted = [...moduleProtocols].sort();
805
+ for (const p of sorted.slice(0, 20)) {
806
+ lines.push(`- \`${p}\``);
807
+ }
808
+ if (sorted.length > 20) {
809
+ lines.push(`- ... ${isZh ? `还有 ${sorted.length - 20} 个` : `and ${sorted.length - 20} more`}`);
810
+ }
811
+ lines.push('');
812
+ }
813
+ if (moduleClasses.length > 0) {
814
+ lines.push(`### ${tl} (${moduleClasses.length})`);
815
+ lines.push('');
816
+ const sorted = [...moduleClasses].sort();
817
+ for (const c of sorted.slice(0, 30)) {
818
+ lines.push(`- \`${c}\``);
819
+ }
820
+ if (sorted.length > 30) {
821
+ lines.push(`- ... ${isZh ? `还有 ${sorted.length - 30} 个` : `and ${sorted.length - 30} more`}`);
822
+ }
823
+ lines.push('');
824
+ }
825
+ }
826
+ // ── 源文件分布 ──
827
+ if (moduleFiles.length > 0) {
828
+ lines.push(`## ${isZh ? '源文件分布' : 'Source File Distribution'}`);
829
+ lines.push('');
830
+ // 按语言统计
831
+ const langCount = {};
832
+ for (const f of moduleFiles) {
833
+ const ext = path.extname(f);
834
+ const lang = LanguageService.displayNameFromExt(ext);
835
+ langCount[lang] = (langCount[lang] || 0) + 1;
836
+ }
837
+ lines.push(`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} |`);
838
+ lines.push('|--------|-------|');
839
+ for (const [lang, count] of Object.entries(langCount).sort((a, b) => b[1] - a[1])) {
840
+ lines.push(`| ${lang} | ${count} |`);
841
+ }
842
+ lines.push('');
843
+ }
844
+ // ── 该模块相关的 Recipes ──
845
+ if (knowledge.recipes.length > 0) {
846
+ const related = knowledge.recipes.filter((r) => {
847
+ const json = r.toJSON ? r.toJSON() : r;
848
+ return (json.moduleName === target.name ||
849
+ json.tags?.includes(target.name) ||
850
+ json.title?.includes(target.name));
851
+ });
852
+ if (related.length > 0) {
853
+ lines.push(`## ${isZh ? '相关知识条目' : 'Related Recipes'}`);
854
+ lines.push('');
855
+ lines.push(isZh
856
+ ? `团队知识库中有 ${related.length} 条与 ${target.name} 相关的条目:`
857
+ : `The team knowledge base contains ${related.length} entries related to ${target.name}:`);
858
+ lines.push('');
859
+ for (const r of related) {
860
+ const json = r.toJSON ? r.toJSON() : r;
861
+ lines.push(`### ${json.title}`);
862
+ lines.push('');
863
+ if (json.description) {
864
+ lines.push(json.description);
865
+ }
866
+ if (json.doClause) {
867
+ lines.push(`\n**${isZh ? '✅ 应当' : '✅ Do'}**: ${json.doClause}`);
868
+ }
869
+ if (json.dontClause) {
870
+ lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${json.dontClause}`);
871
+ }
872
+ lines.push('');
873
+ }
874
+ }
875
+ }
876
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`);
877
+ lines.push('');
878
+ return lines.join('\n');
879
+ }
880
+ /**
881
+ * 渲染代码模式文档 (patterns.md)
882
+ */
883
+ export function renderPatterns(knowledge, isZh) {
884
+ const lines = [
885
+ `# ${isZh ? '代码模式与最佳实践' : 'Code Patterns & Best Practices'}`,
886
+ '',
887
+ `> ${isZh ? '团队沉淀的代码模式与最佳实践(来自 AutoSnippet 知识库)' : 'Code patterns and best practices from AutoSnippet knowledge base'}`,
888
+ '',
889
+ ];
890
+ // 按 category 分组
891
+ const groups = {};
892
+ for (const r of knowledge.recipes) {
893
+ const json = r.toJSON ? r.toJSON() : r;
894
+ const cat = json.category || 'Other';
895
+ if (!groups[cat]) {
896
+ groups[cat] = [];
897
+ }
898
+ groups[cat].push(json);
899
+ }
900
+ // 总结
901
+ const totalRecipes = knowledge.recipes.length;
902
+ const catCount = Object.keys(groups).length;
903
+ lines.push(isZh
904
+ ? `本项目团队在 ${catCount} 个分类下共沉淀了 **${totalRecipes}** 条代码模式和最佳实践。以下按分类进行展示和分析。`
905
+ : `The team has accumulated **${totalRecipes}** code patterns across ${catCount} categories. Below they are organized and analyzed by category.`);
906
+ lines.push('');
907
+ for (const [cat, items] of Object.entries(groups).sort()) {
908
+ lines.push(`## ${cat} (${items.length})`);
909
+ lines.push('');
910
+ // 分类概述
911
+ lines.push(isZh
912
+ ? `${cat} 分类包含 ${items.length} 条规则,覆盖了该领域的核心规范。`
913
+ : `The ${cat} category contains ${items.length} rules covering core conventions in this area.`);
914
+ lines.push('');
915
+ for (const item of items) {
916
+ lines.push(`### ${item.title}`);
917
+ lines.push('');
918
+ if (item.description) {
919
+ lines.push(item.description);
920
+ lines.push('');
921
+ }
922
+ if (item.content?.pattern) {
923
+ lines.push(`\`\`\`${item.language || 'text'}`);
924
+ lines.push(item.content.pattern);
925
+ lines.push('```');
926
+ lines.push('');
927
+ }
928
+ if (item.doClause) {
929
+ lines.push(`**${isZh ? '✅ 应当' : '✅ Do'}**: ${item.doClause}`);
930
+ lines.push('');
931
+ }
932
+ if (item.dontClause) {
933
+ lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${item.dontClause}`);
934
+ lines.push('');
935
+ }
936
+ if (item.reasoning?.whyStandard) {
937
+ lines.push(`> ${isZh ? '💡 原因' : '💡 Rationale'}: ${item.reasoning.whyStandard}`);
938
+ lines.push('');
939
+ }
940
+ }
941
+ }
942
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
943
+ lines.push('');
944
+ return lines.join('\n');
945
+ }
946
+ // ═══ V3 新增渲染器 ════════════════════════════════════════
947
+ /**
948
+ * 快速上手指南 (非 AI 降级模板)
949
+ */
950
+ export function renderGettingStarted(project, modules, ast, isZh) {
951
+ const lines = [
952
+ `# ${isZh ? '快速上手' : 'Getting Started'}`,
953
+ '',
954
+ `> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
955
+ '',
956
+ ];
957
+ // 从 buildSystems 或 legacy 字段推断
958
+ const bs = project.buildSystems || [];
959
+ const ecoSet = new Set(bs.map((b) => b.eco));
960
+ // ── 环境要求 (按检测到的生态系统动态生成) ──
961
+ lines.push(`## ${isZh ? '环境要求' : 'Prerequisites'}`);
962
+ lines.push('');
963
+ if (ecoSet.has('spm') || project.hasPackageSwift) {
964
+ lines.push(isZh ? '- Swift 5.5+ (推荐 Swift 5.9+)' : '- Swift 5.5+ (Swift 5.9+ recommended)');
965
+ lines.push(isZh ? '- Xcode 14+' : '- Xcode 14+');
966
+ const hasCocoaPods = bs.some((b) => b.buildTool === 'CocoaPods');
967
+ if (hasCocoaPods || project.hasPodfile) {
968
+ lines.push(isZh ? '- CocoaPods 1.10+' : '- CocoaPods 1.10+');
969
+ }
970
+ }
971
+ if (project.hasXcodeproj) {
972
+ lines.push(isZh ? '- Xcode (最新稳定版)' : '- Xcode (latest stable version)');
973
+ // Xcode 项目额外环境提示
974
+ if (!ecoSet.has('spm') && !project.hasPackageSwift && !project.hasPodfile) {
975
+ lines.push(isZh ? '- macOS (建议最新版本)' : '- macOS (latest version recommended)');
976
+ lines.push(isZh
977
+ ? '- Apple Developer Account (如需真机调试)'
978
+ : '- Apple Developer Account (for device testing)');
979
+ }
980
+ }
981
+ if (ecoSet.has('node')) {
982
+ lines.push(isZh ? '- Node.js 18+ (推荐 20 LTS)' : '- Node.js 18+ (20 LTS recommended)');
983
+ const hasYarn = bs.some((b) => b.buildTool === 'Yarn');
984
+ const hasPnpm = bs.some((b) => b.buildTool === 'pnpm');
985
+ lines.push(hasYarn ? '- Yarn' : hasPnpm ? '- pnpm' : '- npm');
986
+ }
987
+ if (ecoSet.has('python')) {
988
+ lines.push(isZh ? '- Python 3.8+' : '- Python 3.8+');
989
+ const hasPipenv = bs.some((b) => b.buildTool === 'Pipenv');
990
+ const hasPoetry = bs.some((b) => b.buildTool === 'Poetry');
991
+ if (hasPipenv) {
992
+ lines.push('- Pipenv');
993
+ }
994
+ else if (hasPoetry) {
995
+ lines.push('- Poetry');
996
+ }
997
+ }
998
+ if (ecoSet.has('go')) {
999
+ lines.push(isZh ? '- Go 1.21+' : '- Go 1.21+');
1000
+ }
1001
+ if (ecoSet.has('rust')) {
1002
+ lines.push(isZh ? '- Rust (最新 stable)' : '- Rust (latest stable)');
1003
+ lines.push('- Cargo');
1004
+ }
1005
+ if (ecoSet.has('jvm')) {
1006
+ const hasGradle = bs.some((b) => b.buildTool?.startsWith('Gradle'));
1007
+ lines.push(isZh ? '- JDK 17+' : '- JDK 17+');
1008
+ lines.push(hasGradle ? '- Gradle' : '- Maven');
1009
+ }
1010
+ if (ecoSet.has('dart')) {
1011
+ lines.push(isZh ? '- Flutter / Dart SDK' : '- Flutter / Dart SDK');
1012
+ }
1013
+ if (ecoSet.has('dotnet')) {
1014
+ lines.push(isZh ? '- .NET 6+ SDK' : '- .NET 6+ SDK');
1015
+ }
1016
+ if (ecoSet.has('ruby')) {
1017
+ lines.push(isZh ? '- Ruby 3.0+' : '- Ruby 3.0+');
1018
+ lines.push('- Bundler');
1019
+ }
1020
+ lines.push('');
1021
+ // ── 项目目录结构 ──
1022
+ lines.push(`## ${isZh ? '项目结构' : 'Project Structure'}`);
1023
+ lines.push('');
1024
+ lines.push('```');
1025
+ lines.push(`${project.name}/`);
1026
+ if (modules.targets.length > 0) {
1027
+ const mainTargets = modules.targets.filter((t) => t.type !== 'test');
1028
+ const testTargets = modules.targets.filter((t) => t.type === 'test');
1029
+ if (mainTargets.length > 0) {
1030
+ const srcDir = ecoSet.has('spm') || project.hasPackageSwift ? 'Sources' : 'src';
1031
+ lines.push(`├── ${srcDir}/`);
1032
+ for (let i = 0; i < mainTargets.length; i++) {
1033
+ const prefix = i === mainTargets.length - 1 && testTargets.length === 0 ? '│ └──' : '│ ├──';
1034
+ lines.push(`${prefix} ${mainTargets[i].name}/`);
1035
+ }
1036
+ }
1037
+ if (testTargets.length > 0) {
1038
+ const testDir = ecoSet.has('spm') || project.hasPackageSwift ? 'Tests' : 'test';
1039
+ lines.push(`├── ${testDir}/`);
1040
+ for (let i = 0; i < testTargets.length; i++) {
1041
+ const prefix = i === testTargets.length - 1 ? '│ └──' : '│ ├──';
1042
+ lines.push(`${prefix} ${testTargets[i].name}/`);
1043
+ }
1044
+ }
1045
+ }
1046
+ // 显示构建配置文件
1047
+ for (const b of bs) {
1048
+ const marker = BUILD_SYSTEM_FILES[b.buildTool];
1049
+ if (marker) {
1050
+ lines.push(`├── ${marker}`);
1051
+ }
1052
+ }
1053
+ // legacy 兜底
1054
+ if (bs.length === 0) {
1055
+ if (project.hasPackageSwift) {
1056
+ lines.push('├── Package.swift');
1057
+ }
1058
+ if (project.hasPodfile) {
1059
+ lines.push('├── Podfile');
1060
+ }
1061
+ }
1062
+ lines.push('```');
1063
+ lines.push('');
1064
+ // ── 构建步骤 (按检测到的生态系统动态生成) ──
1065
+ lines.push(`## ${isZh ? '构建与运行' : 'Build & Run'}`);
1066
+ lines.push('');
1067
+ for (const b of bs) {
1068
+ _pushBuildSteps(lines, b, project.name, isZh);
1069
+ }
1070
+ // legacy 兜底 — 如果没有检测到 buildSystems
1071
+ if (bs.length === 0) {
1072
+ if (project.hasPackageSwift) {
1073
+ _pushBuildSteps(lines, { eco: 'spm', buildTool: 'SPM' }, project.name, isZh);
1074
+ }
1075
+ if (project.hasPodfile) {
1076
+ _pushBuildSteps(lines, { eco: 'spm', buildTool: 'CocoaPods' }, project.name, isZh);
1077
+ }
1078
+ // Xcode 项目兜底 (无 SPM / CocoaPods)
1079
+ if (!project.hasPackageSwift && !project.hasPodfile && project.hasXcodeproj) {
1080
+ _pushBuildSteps(lines, { eco: 'xcode', buildTool: 'Xcode' }, project.name, isZh);
1081
+ }
1082
+ }
1083
+ // ── 源文件统计 (增强无 moduleService 场景) ──
1084
+ if (modules.targets.length === 0 && project.sourceFilesByModule) {
1085
+ const sfm = project.sourceFilesByModule;
1086
+ const modEntries = Object.entries(sfm).sort((a, b) => b[1].length - a[1].length);
1087
+ if (modEntries.length > 0) {
1088
+ lines.push(`## ${isZh ? '项目模块概览' : 'Module Overview'}`);
1089
+ lines.push('');
1090
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件数' : 'Files'} | ${isZh ? '说明' : 'Description'} |`);
1091
+ lines.push('|--------|-------|------|');
1092
+ for (const [modName, modFiles] of modEntries.slice(0, 15)) {
1093
+ const purpose = inferModulePurpose(modName, [], [], modFiles);
1094
+ const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
1095
+ lines.push(`| ${modName} | ${modFiles.length} | ${desc} |`);
1096
+ }
1097
+ lines.push('');
1098
+ }
1099
+ }
1100
+ // ── 模块说明 ──
1101
+ if (modules.targets.length > 0) {
1102
+ const mainTargets = modules.targets.filter((t) => t.type !== 'test');
1103
+ if (mainTargets.length > 0) {
1104
+ lines.push(`## ${isZh ? '核心模块' : 'Core Modules'}`);
1105
+ lines.push('');
1106
+ lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类型' : 'Type'} | ${isZh ? '类型数' : 'Types'} | ${isZh ? '说明' : 'Description'} |`);
1107
+ lines.push('|--------|------|--------|------|');
1108
+ for (const t of mainTargets) {
1109
+ const cls = (ast.classNamesByModule?.[t.name] || []).length;
1110
+ const purpose = inferModulePurpose(t.name, ast.classNamesByModule?.[t.name] || [], ast.protocolNamesByModule?.[t.name] || [], []);
1111
+ const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
1112
+ lines.push(`| ${t.name} | ${t.type || 'library'} | ${cls} | ${desc} |`);
1113
+ }
1114
+ lines.push('');
1115
+ }
1116
+ }
1117
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
1118
+ lines.push('');
1119
+ return lines.join('\n');
1120
+ }
1121
+ /* 构建配置文件名映射 (用于目录树显示) — 从 LanguageService.buildSystemMarkers 动态派生 */
1122
+ const BUILD_SYSTEM_FILES = Object.fromEntries(LanguageService.buildSystemMarkers.map((m) => [m.buildTool, m.file]));
1123
+ /**
1124
+ * 按生态系统输出构建步骤
1125
+ * @private
1126
+ */
1127
+ function _pushBuildSteps(lines, buildSys, projectName, isZh) {
1128
+ const { eco, buildTool } = buildSys;
1129
+ lines.push(`### ${isZh ? `使用 ${buildTool}` : `Using ${buildTool}`}`);
1130
+ lines.push('');
1131
+ lines.push('```bash');
1132
+ lines.push(isZh ? '# 获取项目' : '# Clone the project');
1133
+ lines.push(`git clone <repository-url>`);
1134
+ lines.push(`cd ${projectName}`);
1135
+ lines.push('');
1136
+ switch (eco) {
1137
+ case 'spm':
1138
+ if (buildTool === 'CocoaPods') {
1139
+ lines.push('pod install');
1140
+ lines.push('open *.xcworkspace');
1141
+ }
1142
+ else {
1143
+ lines.push(isZh ? '# 解析依赖' : '# Resolve dependencies');
1144
+ lines.push('swift package resolve');
1145
+ lines.push('');
1146
+ lines.push(isZh ? '# 构建' : '# Build');
1147
+ lines.push('swift build');
1148
+ lines.push('');
1149
+ lines.push(isZh ? '# 运行测试' : '# Run tests');
1150
+ lines.push('swift test');
1151
+ }
1152
+ break;
1153
+ case 'node':
1154
+ if (buildTool === 'Yarn') {
1155
+ lines.push('yarn install');
1156
+ lines.push('yarn build');
1157
+ lines.push('yarn test');
1158
+ }
1159
+ else if (buildTool === 'pnpm') {
1160
+ lines.push('pnpm install');
1161
+ lines.push('pnpm build');
1162
+ lines.push('pnpm test');
1163
+ }
1164
+ else {
1165
+ lines.push('npm install');
1166
+ lines.push('npm run build');
1167
+ lines.push('npm test');
1168
+ }
1169
+ break;
1170
+ case 'python':
1171
+ if (buildTool === 'Poetry') {
1172
+ lines.push('poetry install');
1173
+ lines.push('poetry run pytest');
1174
+ }
1175
+ else if (buildTool === 'Pipenv') {
1176
+ lines.push('pipenv install');
1177
+ lines.push('pipenv run pytest');
1178
+ }
1179
+ else {
1180
+ lines.push('pip install -r requirements.txt');
1181
+ lines.push('pytest');
1182
+ }
1183
+ break;
1184
+ case 'go':
1185
+ lines.push('go mod download');
1186
+ lines.push('go build ./...');
1187
+ lines.push('go test ./...');
1188
+ break;
1189
+ case 'rust':
1190
+ lines.push('cargo build');
1191
+ lines.push('cargo test');
1192
+ break;
1193
+ case 'jvm':
1194
+ if (buildTool?.startsWith('Gradle')) {
1195
+ lines.push('./gradlew build');
1196
+ lines.push('./gradlew test');
1197
+ }
1198
+ else {
1199
+ lines.push('mvn install');
1200
+ lines.push('mvn test');
1201
+ }
1202
+ break;
1203
+ case 'dart':
1204
+ lines.push('flutter pub get');
1205
+ lines.push('flutter run');
1206
+ lines.push('flutter test');
1207
+ break;
1208
+ case 'dotnet':
1209
+ lines.push('dotnet restore');
1210
+ lines.push('dotnet build');
1211
+ lines.push('dotnet test');
1212
+ break;
1213
+ case 'ruby':
1214
+ lines.push('bundle install');
1215
+ break;
1216
+ case 'xcode':
1217
+ lines.push(isZh ? '# 使用 Xcode 打开项目' : '# Open with Xcode');
1218
+ lines.push(`open *.xcodeproj 2>/dev/null || open *.xcworkspace`);
1219
+ lines.push('');
1220
+ lines.push(isZh ? '# 或通过命令行构建' : '# Or build via command line');
1221
+ lines.push(`xcodebuild -project *.xcodeproj -scheme ${projectName} build`);
1222
+ break;
1223
+ default:
1224
+ lines.push(isZh ? '# 请查阅项目 README' : '# Please refer to the project README');
1225
+ break;
1226
+ }
1227
+ lines.push('```');
1228
+ lines.push('');
1229
+ }
1230
+ /**
1231
+ * 按分类拆分的代码模式文档
1232
+ */
1233
+ export function renderPatternCategory(patternData, isZh) {
1234
+ const { category, recipes } = patternData;
1235
+ const lines = [
1236
+ `# ${category}`,
1237
+ '',
1238
+ `> ${isZh ? `${category} 分类下的 ${recipes.length} 条代码模式(来自 AutoSnippet 知识库)` : `${recipes.length} code patterns in ${category} category (from AutoSnippet KB)`}`,
1239
+ '',
1240
+ ];
1241
+ // 分类概述
1242
+ lines.push(isZh
1243
+ ? `本文档收录了 ${category} 分类下的 ${recipes.length} 条代码模式和规范,这些规则由团队在开发实践中总结沉淀。`
1244
+ : `This document covers ${recipes.length} code patterns and conventions in the ${category} category, distilled from team development practices.`);
1245
+ lines.push('');
1246
+ for (const item of recipes) {
1247
+ lines.push(`## ${item.title}`);
1248
+ lines.push('');
1249
+ if (item.description) {
1250
+ lines.push(item.description);
1251
+ lines.push('');
1252
+ }
1253
+ if (item.doClause) {
1254
+ lines.push(`**${isZh ? '✅ 应当' : '✅ Do'}**: ${item.doClause}`);
1255
+ lines.push('');
1256
+ }
1257
+ if (item.dontClause) {
1258
+ lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${item.dontClause}`);
1259
+ lines.push('');
1260
+ }
1261
+ if (item.content?.pattern) {
1262
+ lines.push(`\`\`\`${item.language || 'text'}`);
1263
+ lines.push(item.content.pattern);
1264
+ lines.push('```');
1265
+ lines.push('');
1266
+ }
1267
+ if (item.reasoning?.whyStandard) {
1268
+ lines.push(`> ${isZh ? '💡 原因' : '💡 Rationale'}: ${item.reasoning.whyStandard}`);
1269
+ lines.push('');
1270
+ }
1271
+ }
1272
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`);
1273
+ lines.push('');
1274
+ return lines.join('\n');
1275
+ }
1276
+ /**
1277
+ * 协议参考文档
1278
+ */
1279
+ export function renderProtocolReference(ast, isZh, projectInfo) {
1280
+ const langTerms = getLangTerms(projectInfo?.primaryLanguage || 'unknown');
1281
+ const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
1282
+ const lines = [
1283
+ `# ${isZh ? `${il}参考` : `${il} Reference`}`,
1284
+ '',
1285
+ `> ${isZh ? `项目中定义的 ${ast.protocols.length} 个${il}` : `${ast.protocols.length} ${il} defined in the project`}`,
1286
+ '',
1287
+ ];
1288
+ lines.push(isZh
1289
+ ? `${il}定义了类型需要遵循的接口契约。本项目共定义了 ${ast.protocols.length} 个${il},以下按模块分组展示。`
1290
+ : `${il} define interface contracts that types must conform to. This project defines ${ast.protocols.length} ${il}, organized by module below.`);
1291
+ lines.push('');
1292
+ // 按模块分组
1293
+ const protoByModule = ast.protocolNamesByModule || {};
1294
+ const grouped = new Set();
1295
+ for (const [mod, protos] of Object.entries(protoByModule).sort()) {
1296
+ if (protos.length === 0) {
1297
+ continue;
1298
+ }
1299
+ lines.push(`## ${mod}`);
1300
+ lines.push('');
1301
+ lines.push(isZh
1302
+ ? `${mod} 模块定义了 ${protos.length} 个${il}:`
1303
+ : `${mod} module defines ${protos.length} ${il}:`);
1304
+ lines.push('');
1305
+ for (const p of protos.sort()) {
1306
+ lines.push(`- \`${p}\``);
1307
+ grouped.add(p);
1308
+ }
1309
+ lines.push('');
1310
+ }
1311
+ // 未分组的接口类型
1312
+ const ungrouped = ast.protocols.filter((p) => !grouped.has(p));
1313
+ if (ungrouped.length > 0) {
1314
+ lines.push(`## ${isZh ? `其他${il}` : `Other ${il}`}`);
1315
+ lines.push('');
1316
+ for (const p of ungrouped.sort()) {
1317
+ lines.push(`- \`${p}\``);
1318
+ }
1319
+ lines.push('');
1320
+ }
1321
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
1322
+ lines.push('');
1323
+ return lines.join('\n');
1324
+ }
1325
+ // ═══ Folder Profile 渲染器 (AST 不可用时的降级策略) ═══════
1326
+ /**
1327
+ * 渲染文件夹结构总览 (folder-structure.md)
1328
+ *
1329
+ * @param {import('./WikiUtils.js').FolderProfile[]} profiles
1330
+ * @param {object} projectInfo
1331
+ * @param {boolean} isZh
1332
+ * @returns {string}
1333
+ */
1334
+ export function renderFolderOverview(profiles, projectInfo, isZh) {
1335
+ const lines = [
1336
+ `# ${isZh ? '项目结构分析' : 'Project Structure Analysis'}`,
1337
+ '',
1338
+ `> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成(基于文件夹画像分析)' : 'Auto-generated by AutoSnippet Repo Wiki (folder profiling mode)'}`,
1339
+ '',
1340
+ ];
1341
+ // 说明为什么是文件夹分析模式
1342
+ lines.push(isZh
1343
+ ? `> 💡 本项目的主要语言 (${LanguageService.displayName(projectInfo.primaryLanguage)}) 暂不支持深度 AST 解析,因此使用文件夹画像分析来代替。`
1344
+ : `> 💡 The project's primary language (${LanguageService.displayName(projectInfo.primaryLanguage)}) does not support deep AST analysis yet, so folder profiling is used instead.`);
1345
+ lines.push('');
1346
+ // ── 结构鸟瞰 (Mermaid) ──
1347
+ lines.push(`## ${isZh ? '结构鸟瞰' : 'Structure Overview'}`);
1348
+ lines.push('');
1349
+ lines.push('```mermaid');
1350
+ lines.push('graph TD');
1351
+ lines.push(` Root["${projectInfo.name}"]`);
1352
+ // 只显示深度 = 1 的顶层文件夹
1353
+ const topLevel = profiles.filter((fp) => fp.depth === 1);
1354
+ for (const fp of topLevel) {
1355
+ const sid = mermaidId(fp.name);
1356
+ lines.push(` ${sid}["${fp.name} (${fp.fileCount})"]`);
1357
+ lines.push(` Root --> ${sid}`);
1358
+ }
1359
+ // 画 import 关系边
1360
+ const folderNames = new Set(profiles.map((fp) => fp.name));
1361
+ for (const fp of profiles) {
1362
+ const fromId = mermaidId(fp.name);
1363
+ for (const imp of fp.imports) {
1364
+ if (folderNames.has(imp) && imp !== fp.name) {
1365
+ lines.push(` ${fromId} -.-> ${mermaidId(imp)}`);
1366
+ }
1367
+ }
1368
+ }
1369
+ lines.push('```');
1370
+ lines.push('');
1371
+ // ── 文件夹总览表 ──
1372
+ lines.push(`## ${isZh ? '文件夹总览' : 'Folder Overview'}`);
1373
+ lines.push('');
1374
+ lines.push(`| ${isZh ? '文件夹' : 'Folder'} | ${isZh ? '路径' : 'Path'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '大小' : 'Size'} | ${isZh ? '语言' : 'Languages'} | ${isZh ? '说明' : 'Description'} |`);
1375
+ lines.push('|--------|------|-------|------|------|------|');
1376
+ for (const fp of profiles) {
1377
+ const hasDoc = fp.fileCount >= 5;
1378
+ const folderDocSlug = slug(fp.relPath.replaceAll('/', '-'));
1379
+ const nameCol = hasDoc ? `[${fp.relPath}](folders/${folderDocSlug}.md)` : fp.relPath;
1380
+ const sizeStr = fp.totalSize > 1024 * 1024
1381
+ ? `${(fp.totalSize / 1024 / 1024).toFixed(1)}MB`
1382
+ : `${(fp.totalSize / 1024).toFixed(1)}KB`;
1383
+ const langs = Object.entries(fp.langBreakdown)
1384
+ .sort((a, b) => b[1] - a[1])
1385
+ .slice(0, 3)
1386
+ .map(([l]) => l)
1387
+ .join(', ');
1388
+ const desc = fp.purpose ? (isZh ? fp.purpose.zh : fp.purpose.en) : '-';
1389
+ lines.push(`| ${nameCol} | \`${fp.relPath}\` | ${fp.fileCount} | ${sizeStr} | ${langs} | ${desc} |`);
1390
+ }
1391
+ lines.push('');
1392
+ // ── 命名约定总结 ──
1393
+ const allPatterns = {};
1394
+ for (const fp of profiles) {
1395
+ for (const p of fp.namingPatterns) {
1396
+ allPatterns[p] = (allPatterns[p] || 0) + 1;
1397
+ }
1398
+ }
1399
+ const commonPatterns = Object.entries(allPatterns)
1400
+ .filter(([, c]) => c >= 2)
1401
+ .sort((a, b) => b[1] - a[1]);
1402
+ if (commonPatterns.length > 0) {
1403
+ lines.push(`## ${isZh ? '命名约定' : 'Naming Conventions'}`);
1404
+ lines.push('');
1405
+ lines.push(isZh
1406
+ ? '通过分析文件命名模式,检测到以下在多个文件夹中出现的约定:'
1407
+ : 'The following naming conventions were detected across multiple folders:');
1408
+ lines.push('');
1409
+ for (const [pattern, count] of commonPatterns) {
1410
+ lines.push(`- **${pattern}** — ${isZh ? `出现在 ${count} 个文件夹` : `found in ${count} folders`}`);
1411
+ }
1412
+ lines.push('');
1413
+ }
1414
+ // ── 依赖关系 ──
1415
+ const allImports = [];
1416
+ for (const fp of profiles) {
1417
+ for (const imp of fp.imports) {
1418
+ if (folderNames.has(imp) && imp !== fp.name) {
1419
+ allImports.push({ from: fp.name, to: imp });
1420
+ }
1421
+ }
1422
+ }
1423
+ if (allImports.length > 0) {
1424
+ lines.push(`## ${isZh ? '文件夹间依赖' : 'Inter-Folder Dependencies'}`);
1425
+ lines.push('');
1426
+ lines.push(isZh
1427
+ ? '通过分析 import/require 语句推断的文件夹间引用关系:'
1428
+ : 'Dependencies between folders inferred from import/require statements:');
1429
+ lines.push('');
1430
+ for (const dep of allImports) {
1431
+ lines.push(`- \`${dep.from}\` → \`${dep.to}\``);
1432
+ }
1433
+ lines.push('');
1434
+ }
1435
+ lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
1436
+ lines.push('');
1437
+ return lines.join('\n');
1438
+ }
1439
+ /**
1440
+ * 渲染单个文件夹的深度画像文档 (folders/{name}.md)
1441
+ *
1442
+ * @param {import('./WikiUtils.js').FolderProfile} fp
1443
+ * @param {object} projectInfo
1444
+ * @param {boolean} isZh
1445
+ * @returns {string}
1446
+ */
1447
+ export function renderFolderProfile(fp, projectInfo, isZh) {
1448
+ const lines = [
1449
+ `# ${fp.name}`,
1450
+ '',
1451
+ `> ${isZh ? '文件夹画像文档 — 由 AutoSnippet Repo Wiki 自动生成' : 'Folder profile doc — Auto-generated by AutoSnippet Repo Wiki'}`,
1452
+ '',
1453
+ ];
1454
+ // ── 概述 ──
1455
+ lines.push(`## ${isZh ? '概述' : 'Overview'}`);
1456
+ lines.push('');
1457
+ const purposeStr = fp.purpose
1458
+ ? isZh
1459
+ ? fp.purpose.zh
1460
+ : fp.purpose.en
1461
+ : isZh
1462
+ ? '通过文件夹画像分析推断其功能'
1463
+ : 'functionality inferred from folder profiling';
1464
+ if (isZh) {
1465
+ lines.push(`**${fp.name}** 位于 \`${fp.relPath}\`,${purposeStr}。` +
1466
+ `包含 ${fp.fileCount} 个源文件,总大小 ${(fp.totalSize / 1024).toFixed(1)}KB。`);
1467
+ }
1468
+ else {
1469
+ lines.push(`**${fp.name}** is located at \`${fp.relPath}\`, ${purposeStr}. ` +
1470
+ `Contains ${fp.fileCount} source files totaling ${(fp.totalSize / 1024).toFixed(1)}KB.`);
1471
+ }
1472
+ lines.push('');
1473
+ // ── 信息表 ──
1474
+ lines.push(`| ${isZh ? '属性' : 'Property'} | ${isZh ? '值' : 'Value'} |`);
1475
+ lines.push('|--------|------|');
1476
+ lines.push(`| ${isZh ? '路径' : 'Path'} | \`${fp.relPath}\` |`);
1477
+ lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${fp.fileCount} |`);
1478
+ const sizeStr = fp.totalSize > 1024 * 1024
1479
+ ? `${(fp.totalSize / 1024 / 1024).toFixed(1)}MB`
1480
+ : `${(fp.totalSize / 1024).toFixed(1)}KB`;
1481
+ lines.push(`| ${isZh ? '总大小' : 'Total Size'} | ${sizeStr} |`);
1482
+ if (fp.entryPoints.length > 0) {
1483
+ lines.push(`| ${isZh ? '入口文件' : 'Entry Points'} | ${fp.entryPoints.join(', ')} |`);
1484
+ }
1485
+ lines.push('');
1486
+ // ── README (如果有) ──
1487
+ if (fp.readme) {
1488
+ lines.push(`## ${isZh ? '目录说明' : 'Directory README'}`);
1489
+ lines.push('');
1490
+ lines.push(`> ${fp.readme
1491
+ .split('\n')
1492
+ .filter((l) => l.trim())
1493
+ .slice(0, 5)
1494
+ .join('\n> ')}`);
1495
+ lines.push('');
1496
+ }
1497
+ // ── 语言分布 ──
1498
+ lines.push(`## ${isZh ? '语言分布' : 'Language Distribution'}`);
1499
+ lines.push('');
1500
+ lines.push(`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '占比' : 'Share'} |`);
1501
+ lines.push('|--------|-------|------|');
1502
+ const langBreakdown = fp.langBreakdown;
1503
+ const total = Object.values(langBreakdown).reduce((a, b) => a + b, 0);
1504
+ for (const [lang, count] of Object.entries(langBreakdown).sort((a, b) => b[1] - a[1])) {
1505
+ const pct = total > 0 ? ((count / total) * 100).toFixed(0) : 0;
1506
+ lines.push(`| ${lang} | ${count} | ${pct}% |`);
1507
+ }
1508
+ lines.push('');
1509
+ // ── 文件列表 (分类展示) ──
1510
+ lines.push(`## ${isZh ? '文件列表' : 'File Listing'}`);
1511
+ lines.push('');
1512
+ // 按类别分: 入口文件 / 大文件 / 普通文件
1513
+ if (fp.entryPoints.length > 0) {
1514
+ lines.push(`### ${isZh ? '🎯 入口文件' : '🎯 Entry Points'}`);
1515
+ lines.push('');
1516
+ for (const ep of fp.entryPoints) {
1517
+ lines.push(`- \`${ep}\``);
1518
+ }
1519
+ lines.push('');
1520
+ }
1521
+ if (fp.keyFiles.length > 0) {
1522
+ lines.push(`### ${isZh ? '📌 关键文件' : '📌 Key Files'}`);
1523
+ lines.push('');
1524
+ lines.push(isZh
1525
+ ? '以下文件体积最大或作为入口文件,可能包含核心逻辑:'
1526
+ : 'These files are the largest or serve as entry points, likely containing core logic:');
1527
+ lines.push('');
1528
+ for (const kf of fp.keyFiles) {
1529
+ lines.push(`- \`${path.basename(kf)}\``);
1530
+ }
1531
+ lines.push('');
1532
+ }
1533
+ // 所有文件列表 (截断)
1534
+ const maxDisplay = 50;
1535
+ lines.push(`### ${isZh ? '全部文件' : 'All Files'} (${fp.fileNames.length})`);
1536
+ lines.push('');
1537
+ for (const fn of fp.fileNames.slice(0, maxDisplay)) {
1538
+ lines.push(`- \`${fn}\``);
1539
+ }
1540
+ if (fp.fileNames.length > maxDisplay) {
1541
+ lines.push(`- ... ${isZh ? `还有 ${fp.fileNames.length - maxDisplay} 个文件` : `and ${fp.fileNames.length - maxDisplay} more files`}`);
1542
+ }
1543
+ lines.push('');
1544
+ // ── 命名约定 ──
1545
+ if (fp.namingPatterns.length > 0) {
1546
+ lines.push(`## ${isZh ? '命名约定' : 'Naming Conventions'}`);
1547
+ lines.push('');
1548
+ lines.push(isZh
1549
+ ? '通过分析文件命名模式,检测到以下约定:'
1550
+ : 'Detected naming conventions from file name analysis:');
1551
+ lines.push('');
1552
+ for (const p of fp.namingPatterns) {
1553
+ lines.push(`- **${p}**`);
1554
+ }
1555
+ lines.push('');
1556
+ }
1557
+ // ── 依赖关系 ──
1558
+ if (fp.imports.length > 0) {
1559
+ lines.push(`## ${isZh ? '依赖引用' : 'Dependencies'}`);
1560
+ lines.push('');
1561
+ lines.push(isZh
1562
+ ? `通过分析 import/require 语句,\`${fp.name}\` 引用了以下模块/目录:`
1563
+ : `From import/require analysis, \`${fp.name}\` references the following modules/directories:`);
1564
+ lines.push('');
1565
+ for (const imp of fp.imports) {
1566
+ lines.push(`- \`${imp}\``);
1567
+ }
1568
+ lines.push('');
1569
+ }
1570
+ // ── 代码注释摘要 ──
1571
+ if (fp.headerComments.length > 0) {
1572
+ lines.push(`## ${isZh ? '代码注释摘要' : 'Code Comments Summary'}`);
1573
+ lines.push('');
1574
+ lines.push(isZh ? '从关键文件头部提取的注释信息:' : 'Comments extracted from key file headers:');
1575
+ lines.push('');
1576
+ for (const hc of fp.headerComments) {
1577
+ lines.push(`- ${hc}`);
1578
+ }
1579
+ lines.push('');
1580
+ }
1581
+ lines.push(`[← ${isZh ? '返回结构分析' : 'Back to Structure Analysis'}](../folder-structure.md) | [← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`);
1582
+ lines.push('');
1583
+ return lines.join('\n');
1584
+ }
1585
+ // ═══ V3 AI 系统 Prompt ═══════════════════════════════════
1586
+ /**
1587
+ * 构建 AI 系统 Prompt (V3 — 撰写完整文章,非润色骨架)
1588
+ */
1589
+ export function buildAiSystemPrompt(isZh) {
1590
+ if (isZh) {
1591
+ return [
1592
+ '你是 AutoSnippet Repo Wiki 文档撰写专家。',
1593
+ '',
1594
+ '任务: 基于代码分析数据,撰写高质量、有深度的项目文档。',
1595
+ '',
1596
+ '写作原则:',
1597
+ '1. 所有类名、文件名、数字必须来自提供的数据,严禁编造',
1598
+ '2. 不要简单罗列数据 — 要分析和解释,描述"为什么这样设计"、"模块的职责是什么"',
1599
+ '3. 从文件名和类名推断功能意图,给出有见地的分析',
1600
+ '4. 用自然语言连贯行文,包含过渡段落和总结性描述',
1601
+ '5. 合理使用 Mermaid 图表(graph TD / classDiagram)、表格、代码块来辅助说明',
1602
+ '6. 用中文撰写',
1603
+ '7. 输出纯 Markdown,不要包裹在代码块中',
1604
+ '8. 每篇文章以一级标题 (#) 开始,结构清晰',
1605
+ '9. 篇幅适中:300-2000 字(根据主题复杂度调整)',
1606
+ '10. 文末包含返回链接: [← 返回概述](index.md) 或 [← 返回概述](../index.md)',
1607
+ ].join('\n');
1608
+ }
1609
+ return [
1610
+ 'You are the AutoSnippet Repo Wiki documentation expert.',
1611
+ '',
1612
+ 'Task: Write high-quality, insightful project documentation based on code analysis data.',
1613
+ '',
1614
+ 'Writing principles:',
1615
+ '1. All class names, file names, and numbers must come from the provided data — never fabricate',
1616
+ '2. Do not simply list data — analyze and explain: describe design rationale, module responsibilities',
1617
+ '3. Infer functional intent from file names and class names, provide insightful analysis',
1618
+ '4. Write coherent prose with transition paragraphs and summaries',
1619
+ '5. Use Mermaid diagrams (graph TD / classDiagram), tables, and code blocks judiciously',
1620
+ '6. Write in English',
1621
+ '7. Output pure Markdown — do not wrap in code blocks',
1622
+ '8. Start each article with a level-1 heading (#), maintain clear structure',
1623
+ '9. Appropriate length: 300-2000 words (adjust by topic complexity)',
1624
+ '10. End with a back link: [← Back to Overview](index.md) or [← Back to Overview](../index.md)',
1625
+ ].join('\n');
1626
+ }
1627
+ //# sourceMappingURL=WikiRenderers.js.map