agent-ide 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/README.md +29 -355
  2. package/dist/application/events/event-bus.d.ts.map +1 -1
  3. package/dist/application/events/event-bus.js.map +1 -1
  4. package/dist/application/index.d.ts +3 -1
  5. package/dist/application/index.d.ts.map +1 -1
  6. package/dist/application/index.js +10 -5
  7. package/dist/application/index.js.map +1 -1
  8. package/dist/application/services/cache-coordinator.service.d.ts.map +1 -1
  9. package/dist/application/services/cache-coordinator.service.js.map +1 -1
  10. package/dist/application/services/error-handler.service.d.ts.map +1 -1
  11. package/dist/application/services/error-handler.service.js.map +1 -1
  12. package/dist/application/services/module-coordinator.service.d.ts +5 -14
  13. package/dist/application/services/module-coordinator.service.d.ts.map +1 -1
  14. package/dist/application/services/module-coordinator.service.js +15 -108
  15. package/dist/application/services/module-coordinator.service.js.map +1 -1
  16. package/dist/application/services/session-manager.service.d.ts.map +1 -1
  17. package/dist/application/services/session-manager.service.js.map +1 -1
  18. package/dist/application/services/workflow-engine.service.d.ts +1 -1
  19. package/dist/application/services/workflow-engine.service.d.ts.map +1 -1
  20. package/dist/application/services/workflow-engine.service.js.map +1 -1
  21. package/dist/application/state/state-manager.d.ts +3 -3
  22. package/dist/application/state/state-manager.d.ts.map +1 -1
  23. package/dist/application/state/state-manager.js +3 -3
  24. package/dist/application/state/state-manager.js.map +1 -1
  25. package/dist/application/types.d.ts.map +1 -1
  26. package/dist/application/workflows/analysis-workflow.d.ts +1 -1
  27. package/dist/application/workflows/analysis-workflow.d.ts.map +1 -1
  28. package/dist/application/workflows/analysis-workflow.js +1 -1
  29. package/dist/application/workflows/analysis-workflow.js.map +1 -1
  30. package/dist/application/workflows/base-workflow.d.ts.map +1 -1
  31. package/dist/application/workflows/base-workflow.js.map +1 -1
  32. package/dist/application/workflows/index.d.ts +2 -2
  33. package/dist/application/workflows/index.d.ts.map +1 -1
  34. package/dist/application/workflows/index.js +2 -2
  35. package/dist/application/workflows/index.js.map +1 -1
  36. package/dist/application/workflows/refactor-workflow.d.ts +1 -1
  37. package/dist/application/workflows/refactor-workflow.d.ts.map +1 -1
  38. package/dist/application/workflows/refactor-workflow.js +1 -1
  39. package/dist/application/workflows/refactor-workflow.js.map +1 -1
  40. package/dist/core/change-signature/change-signature-service.d.ts +94 -0
  41. package/dist/core/change-signature/change-signature-service.d.ts.map +1 -0
  42. package/dist/core/change-signature/change-signature-service.js +544 -0
  43. package/dist/core/change-signature/change-signature-service.js.map +1 -0
  44. package/dist/core/change-signature/index.d.ts +10 -0
  45. package/dist/core/change-signature/index.d.ts.map +1 -0
  46. package/dist/core/change-signature/index.js +12 -0
  47. package/dist/core/change-signature/index.js.map +1 -0
  48. package/dist/core/change-signature/signature-parser.d.ts +76 -0
  49. package/dist/core/change-signature/signature-parser.d.ts.map +1 -0
  50. package/dist/core/change-signature/signature-parser.js +387 -0
  51. package/dist/core/change-signature/signature-parser.js.map +1 -0
  52. package/dist/core/change-signature/types.d.ts +244 -0
  53. package/dist/core/change-signature/types.d.ts.map +1 -0
  54. package/dist/core/change-signature/types.js +73 -0
  55. package/dist/core/change-signature/types.js.map +1 -0
  56. package/dist/core/dependency/cycle-detector.d.ts +1 -1
  57. package/dist/core/dependency/cycle-detector.d.ts.map +1 -1
  58. package/dist/core/dependency/cycle-detector.js +1 -1
  59. package/dist/core/dependency/cycle-detector.js.map +1 -1
  60. package/dist/core/dependency/dependency-analyzer.d.ts +3 -1
  61. package/dist/core/dependency/dependency-analyzer.d.ts.map +1 -1
  62. package/dist/core/dependency/dependency-analyzer.js +25 -24
  63. package/dist/core/dependency/dependency-analyzer.js.map +1 -1
  64. package/dist/core/dependency/types.d.ts.map +1 -1
  65. package/dist/core/indexing/file-index.d.ts.map +1 -1
  66. package/dist/core/indexing/file-index.js +1 -1
  67. package/dist/core/indexing/file-index.js.map +1 -1
  68. package/dist/core/indexing/index-engine.d.ts +3 -1
  69. package/dist/core/indexing/index-engine.d.ts.map +1 -1
  70. package/dist/core/indexing/index-engine.js +25 -17
  71. package/dist/core/indexing/index-engine.js.map +1 -1
  72. package/dist/core/indexing/index.d.ts +1 -9
  73. package/dist/core/indexing/index.d.ts.map +1 -1
  74. package/dist/core/indexing/index.js +2 -12
  75. package/dist/core/indexing/index.js.map +1 -1
  76. package/dist/core/indexing/symbol-index.d.ts.map +1 -1
  77. package/dist/core/indexing/types.d.ts +12 -0
  78. package/dist/core/indexing/types.d.ts.map +1 -1
  79. package/dist/core/indexing/types.js +12 -0
  80. package/dist/core/indexing/types.js.map +1 -1
  81. package/dist/core/move-file/import-resolver.d.ts.map +1 -0
  82. package/dist/core/{move → move-file}/import-resolver.js +9 -10
  83. package/dist/core/move-file/import-resolver.js.map +1 -0
  84. package/dist/core/{move → move-file}/index.d.ts +2 -2
  85. package/dist/core/move-file/index.d.ts.map +1 -0
  86. package/dist/core/{move → move-file}/index.js +2 -2
  87. package/dist/core/move-file/index.js.map +1 -0
  88. package/dist/core/{move → move-file}/move-service.d.ts +3 -1
  89. package/dist/core/move-file/move-service.d.ts.map +1 -0
  90. package/dist/core/{move → move-file}/move-service.js +66 -84
  91. package/dist/core/move-file/move-service.js.map +1 -0
  92. package/dist/core/move-file/types.d.ts.map +1 -0
  93. package/dist/core/move-file/types.js.map +1 -0
  94. package/dist/core/move-member/index.d.ts +10 -0
  95. package/dist/core/move-member/index.d.ts.map +1 -0
  96. package/dist/core/move-member/index.js +12 -0
  97. package/dist/core/move-member/index.js.map +1 -0
  98. package/dist/core/move-member/member-extractor.d.ts +96 -0
  99. package/dist/core/move-member/member-extractor.d.ts.map +1 -0
  100. package/dist/core/move-member/member-extractor.js +439 -0
  101. package/dist/core/move-member/member-extractor.js.map +1 -0
  102. package/dist/core/move-member/move-member-service.d.ts +87 -0
  103. package/dist/core/move-member/move-member-service.d.ts.map +1 -0
  104. package/dist/core/move-member/move-member-service.js +412 -0
  105. package/dist/core/move-member/move-member-service.js.map +1 -0
  106. package/dist/core/move-member/types.d.ts +182 -0
  107. package/dist/core/move-member/types.d.ts.map +1 -0
  108. package/dist/core/move-member/types.js +75 -0
  109. package/dist/core/move-member/types.js.map +1 -0
  110. package/dist/core/rename/index.d.ts +3 -3
  111. package/dist/core/rename/index.d.ts.map +1 -1
  112. package/dist/core/rename/index.js +5 -3
  113. package/dist/core/rename/index.js.map +1 -1
  114. package/dist/core/rename/reference-updater.d.ts +3 -1
  115. package/dist/core/rename/reference-updater.d.ts.map +1 -1
  116. package/dist/core/rename/reference-updater.js +9 -6
  117. package/dist/core/rename/reference-updater.js.map +1 -1
  118. package/dist/core/rename/rename-engine.d.ts +3 -1
  119. package/dist/core/rename/rename-engine.d.ts.map +1 -1
  120. package/dist/core/rename/rename-engine.js +8 -5
  121. package/dist/core/rename/rename-engine.js.map +1 -1
  122. package/dist/core/rename/scope-analyzer.d.ts.map +1 -1
  123. package/dist/core/rename/scope-analyzer.js.map +1 -1
  124. package/dist/core/rename/types.d.ts.map +1 -1
  125. package/dist/core/shared/call-hierarchy-analyzer.d.ts +102 -0
  126. package/dist/core/shared/call-hierarchy-analyzer.d.ts.map +1 -0
  127. package/dist/core/shared/call-hierarchy-analyzer.js +328 -0
  128. package/dist/core/shared/call-hierarchy-analyzer.js.map +1 -0
  129. package/dist/core/shared/index.d.ts +7 -0
  130. package/dist/core/shared/index.d.ts.map +1 -0
  131. package/dist/core/shared/index.js +7 -0
  132. package/dist/core/shared/index.js.map +1 -0
  133. package/dist/core/shared/symbol-finder.d.ts +154 -0
  134. package/dist/core/shared/symbol-finder.d.ts.map +1 -0
  135. package/dist/core/shared/symbol-finder.js +433 -0
  136. package/dist/core/shared/symbol-finder.js.map +1 -0
  137. package/dist/core/snapshot/index.d.ts +3 -19
  138. package/dist/core/snapshot/index.d.ts.map +1 -1
  139. package/dist/core/snapshot/index.js +2 -23
  140. package/dist/core/snapshot/index.js.map +1 -1
  141. package/dist/core/snapshot/snapshot-generator.d.ts +66 -0
  142. package/dist/core/snapshot/snapshot-generator.d.ts.map +1 -0
  143. package/dist/core/snapshot/snapshot-generator.js +258 -0
  144. package/dist/core/snapshot/snapshot-generator.js.map +1 -0
  145. package/dist/core/snapshot/types.d.ts +41 -190
  146. package/dist/core/snapshot/types.d.ts.map +1 -1
  147. package/dist/core/snapshot/types.js +13 -67
  148. package/dist/core/snapshot/types.js.map +1 -1
  149. package/dist/infrastructure/cache/cache-manager.d.ts +1 -1
  150. package/dist/infrastructure/cache/cache-manager.d.ts.map +1 -1
  151. package/dist/infrastructure/cache/cache-manager.js +1 -1
  152. package/dist/infrastructure/cache/cache-manager.js.map +1 -1
  153. package/dist/infrastructure/cache/memory-cache.js +1 -1
  154. package/dist/infrastructure/cache/memory-cache.js.map +1 -1
  155. package/dist/infrastructure/cache/strategies.d.ts +1 -1
  156. package/dist/infrastructure/cache/strategies.d.ts.map +1 -1
  157. package/dist/infrastructure/cache/strategies.js +1 -1
  158. package/dist/infrastructure/cache/strategies.js.map +1 -1
  159. package/dist/infrastructure/formatters/diff-generator.d.ts +11 -0
  160. package/dist/infrastructure/formatters/diff-generator.d.ts.map +1 -0
  161. package/dist/infrastructure/formatters/diff-generator.js +227 -0
  162. package/dist/infrastructure/formatters/diff-generator.js.map +1 -0
  163. package/dist/infrastructure/formatters/index.d.ts +11 -0
  164. package/dist/infrastructure/formatters/index.d.ts.map +1 -0
  165. package/dist/infrastructure/formatters/index.js +13 -0
  166. package/dist/infrastructure/formatters/index.js.map +1 -0
  167. package/dist/infrastructure/formatters/preview-converter.d.ts +85 -0
  168. package/dist/infrastructure/formatters/preview-converter.d.ts.map +1 -0
  169. package/dist/infrastructure/formatters/preview-converter.js +209 -0
  170. package/dist/infrastructure/formatters/preview-converter.js.map +1 -0
  171. package/dist/infrastructure/formatters/preview-formatter.d.ts +61 -0
  172. package/dist/infrastructure/formatters/preview-formatter.d.ts.map +1 -0
  173. package/dist/infrastructure/formatters/preview-formatter.js +208 -0
  174. package/dist/infrastructure/formatters/preview-formatter.js.map +1 -0
  175. package/dist/infrastructure/formatters/query-formatter.d.ts +83 -0
  176. package/dist/infrastructure/formatters/query-formatter.d.ts.map +1 -0
  177. package/dist/infrastructure/formatters/query-formatter.js +349 -0
  178. package/dist/infrastructure/formatters/query-formatter.js.map +1 -0
  179. package/dist/infrastructure/formatters/query-types.d.ts +238 -0
  180. package/dist/infrastructure/formatters/query-types.d.ts.map +1 -0
  181. package/dist/infrastructure/formatters/query-types.js +29 -0
  182. package/dist/infrastructure/formatters/query-types.js.map +1 -0
  183. package/dist/infrastructure/formatters/types.d.ts +163 -0
  184. package/dist/infrastructure/formatters/types.d.ts.map +1 -0
  185. package/dist/infrastructure/formatters/types.js +27 -0
  186. package/dist/infrastructure/formatters/types.js.map +1 -0
  187. package/dist/infrastructure/parser/base.d.ts +1 -33
  188. package/dist/infrastructure/parser/base.d.ts.map +1 -1
  189. package/dist/infrastructure/parser/base.js +1 -65
  190. package/dist/infrastructure/parser/base.js.map +1 -1
  191. package/dist/infrastructure/parser/index.d.ts +0 -2
  192. package/dist/infrastructure/parser/index.d.ts.map +1 -1
  193. package/dist/infrastructure/parser/index.js +1 -2
  194. package/dist/infrastructure/parser/index.js.map +1 -1
  195. package/dist/infrastructure/parser/interface.d.ts +2 -59
  196. package/dist/infrastructure/parser/interface.d.ts.map +1 -1
  197. package/dist/infrastructure/parser/interface.js +1 -11
  198. package/dist/infrastructure/parser/interface.js.map +1 -1
  199. package/dist/infrastructure/parser/registry.d.ts +1 -1
  200. package/dist/infrastructure/parser/registry.d.ts.map +1 -1
  201. package/dist/infrastructure/parser/registry.js +1 -1
  202. package/dist/infrastructure/parser/registry.js.map +1 -1
  203. package/dist/infrastructure/parser/types.d.ts.map +1 -1
  204. package/dist/infrastructure/storage/file-system.d.ts +2 -1
  205. package/dist/infrastructure/storage/file-system.d.ts.map +1 -1
  206. package/dist/infrastructure/storage/file-system.interface.d.ts +69 -0
  207. package/dist/infrastructure/storage/file-system.interface.d.ts.map +1 -0
  208. package/dist/infrastructure/storage/file-system.interface.js +6 -0
  209. package/dist/infrastructure/storage/file-system.interface.js.map +1 -0
  210. package/dist/infrastructure/storage/file-system.js.map +1 -1
  211. package/dist/infrastructure/storage/index.d.ts +2 -4
  212. package/dist/infrastructure/storage/index.d.ts.map +1 -1
  213. package/dist/infrastructure/storage/index.js +1 -8
  214. package/dist/infrastructure/storage/index.js.map +1 -1
  215. package/dist/infrastructure/storage/mem-file-system.d.ts +44 -0
  216. package/dist/infrastructure/storage/mem-file-system.d.ts.map +1 -0
  217. package/dist/infrastructure/storage/mem-file-system.js +105 -0
  218. package/dist/infrastructure/storage/mem-file-system.js.map +1 -0
  219. package/dist/interfaces/cli/cli.d.ts +13 -94
  220. package/dist/interfaces/cli/cli.d.ts.map +1 -1
  221. package/dist/interfaces/cli/cli.js +47 -2450
  222. package/dist/interfaces/cli/cli.js.map +1 -1
  223. package/dist/interfaces/cli/commands/call-hierarchy.command.d.ts +11 -0
  224. package/dist/interfaces/cli/commands/call-hierarchy.command.d.ts.map +1 -0
  225. package/dist/interfaces/cli/commands/call-hierarchy.command.js +161 -0
  226. package/dist/interfaces/cli/commands/call-hierarchy.command.js.map +1 -0
  227. package/dist/interfaces/cli/commands/change-signature.command.d.ts +11 -0
  228. package/dist/interfaces/cli/commands/change-signature.command.d.ts.map +1 -0
  229. package/dist/interfaces/cli/commands/change-signature.command.js +290 -0
  230. package/dist/interfaces/cli/commands/change-signature.command.js.map +1 -0
  231. package/dist/interfaces/cli/commands/cycles.command.d.ts +11 -0
  232. package/dist/interfaces/cli/commands/cycles.command.d.ts.map +1 -0
  233. package/dist/interfaces/cli/commands/cycles.command.js +87 -0
  234. package/dist/interfaces/cli/commands/cycles.command.js.map +1 -0
  235. package/dist/interfaces/cli/commands/find-references.command.d.ts +11 -0
  236. package/dist/interfaces/cli/commands/find-references.command.d.ts.map +1 -0
  237. package/dist/interfaces/cli/commands/find-references.command.js +122 -0
  238. package/dist/interfaces/cli/commands/find-references.command.js.map +1 -0
  239. package/dist/interfaces/cli/commands/impact.command.d.ts +11 -0
  240. package/dist/interfaces/cli/commands/impact.command.d.ts.map +1 -0
  241. package/dist/interfaces/cli/commands/impact.command.js +98 -0
  242. package/dist/interfaces/cli/commands/impact.command.js.map +1 -0
  243. package/dist/interfaces/cli/commands/index.d.ts +14 -0
  244. package/dist/interfaces/cli/commands/index.d.ts.map +1 -0
  245. package/dist/interfaces/cli/commands/index.js +15 -0
  246. package/dist/interfaces/cli/commands/index.js.map +1 -0
  247. package/dist/interfaces/cli/commands/move-member.command.d.ts +11 -0
  248. package/dist/interfaces/cli/commands/move-member.command.d.ts.map +1 -0
  249. package/dist/interfaces/cli/commands/move-member.command.js +185 -0
  250. package/dist/interfaces/cli/commands/move-member.command.js.map +1 -0
  251. package/dist/interfaces/cli/commands/move.command.d.ts +11 -0
  252. package/dist/interfaces/cli/commands/move.command.d.ts.map +1 -0
  253. package/dist/interfaces/cli/commands/move.command.js +212 -0
  254. package/dist/interfaces/cli/commands/move.command.js.map +1 -0
  255. package/dist/interfaces/cli/commands/rename.command.d.ts +11 -0
  256. package/dist/interfaces/cli/commands/rename.command.d.ts.map +1 -0
  257. package/dist/interfaces/cli/commands/rename.command.js +258 -0
  258. package/dist/interfaces/cli/commands/rename.command.js.map +1 -0
  259. package/dist/interfaces/cli/commands/snapshot.command.d.ts +11 -0
  260. package/dist/interfaces/cli/commands/snapshot.command.d.ts.map +1 -0
  261. package/dist/interfaces/cli/commands/snapshot.command.js +68 -0
  262. package/dist/interfaces/cli/commands/snapshot.command.js.map +1 -0
  263. package/dist/interfaces/cli/commands/types.d.ts +18 -0
  264. package/dist/interfaces/cli/commands/types.d.ts.map +1 -0
  265. package/dist/interfaces/cli/commands/types.js +5 -0
  266. package/dist/interfaces/cli/commands/types.js.map +1 -0
  267. package/dist/interfaces/cli/index.d.ts +1 -1
  268. package/dist/interfaces/cli/index.d.ts.map +1 -1
  269. package/dist/interfaces/cli/index.js +1 -1
  270. package/dist/interfaces/cli/index.js.map +1 -1
  271. package/dist/interfaces/cli/preview-output-handler.d.ts +53 -0
  272. package/dist/interfaces/cli/preview-output-handler.d.ts.map +1 -0
  273. package/dist/interfaces/cli/preview-output-handler.js +73 -0
  274. package/dist/interfaces/cli/preview-output-handler.js.map +1 -0
  275. package/dist/interfaces/cli/unified-output-handler.d.ts +79 -0
  276. package/dist/interfaces/cli/unified-output-handler.d.ts.map +1 -0
  277. package/dist/interfaces/cli/unified-output-handler.js +149 -0
  278. package/dist/interfaces/cli/unified-output-handler.js.map +1 -0
  279. package/dist/plugins/javascript/index.d.ts +2 -2
  280. package/dist/plugins/javascript/index.d.ts.map +1 -1
  281. package/dist/plugins/javascript/index.js +1 -1
  282. package/dist/plugins/javascript/index.js.map +1 -1
  283. package/dist/plugins/javascript/types.d.ts.map +1 -1
  284. package/dist/plugins/javascript/types.js.map +1 -1
  285. package/dist/plugins/python/dependency-analyzer.d.ts +86 -0
  286. package/dist/plugins/python/dependency-analyzer.d.ts.map +1 -0
  287. package/dist/plugins/python/dependency-analyzer.js +252 -0
  288. package/dist/plugins/python/dependency-analyzer.js.map +1 -0
  289. package/dist/plugins/python/index.d.ts +9 -0
  290. package/dist/plugins/python/index.d.ts.map +1 -0
  291. package/dist/plugins/python/index.js +14 -0
  292. package/dist/plugins/python/index.js.map +1 -0
  293. package/dist/plugins/python/parser.d.ts +117 -0
  294. package/dist/plugins/python/parser.d.ts.map +1 -0
  295. package/dist/plugins/python/parser.js +414 -0
  296. package/dist/plugins/python/parser.js.map +1 -0
  297. package/dist/plugins/python/symbol-extractor.d.ts +108 -0
  298. package/dist/plugins/python/symbol-extractor.d.ts.map +1 -0
  299. package/dist/plugins/python/symbol-extractor.js +389 -0
  300. package/dist/plugins/python/symbol-extractor.js.map +1 -0
  301. package/dist/plugins/python/tree-sitter-bridge.d.ts +57 -0
  302. package/dist/plugins/python/tree-sitter-bridge.d.ts.map +1 -0
  303. package/dist/plugins/python/tree-sitter-bridge.js +267 -0
  304. package/dist/plugins/python/tree-sitter-bridge.js.map +1 -0
  305. package/dist/plugins/python/types.d.ts +179 -0
  306. package/dist/plugins/python/types.d.ts.map +1 -0
  307. package/dist/plugins/python/types.js +252 -0
  308. package/dist/plugins/python/types.js.map +1 -0
  309. package/dist/plugins/swift/dependency-analyzer.d.ts +1 -1
  310. package/dist/plugins/swift/dependency-analyzer.d.ts.map +1 -1
  311. package/dist/plugins/swift/dependency-analyzer.js +1 -1
  312. package/dist/plugins/swift/dependency-analyzer.js.map +1 -1
  313. package/dist/plugins/swift/parser.d.ts +4 -0
  314. package/dist/plugins/swift/parser.d.ts.map +1 -1
  315. package/dist/plugins/swift/parser.js +24 -6
  316. package/dist/plugins/swift/parser.js.map +1 -1
  317. package/dist/plugins/swift/symbol-extractor.d.ts +1 -1
  318. package/dist/plugins/swift/symbol-extractor.d.ts.map +1 -1
  319. package/dist/plugins/swift/symbol-extractor.js.map +1 -1
  320. package/dist/plugins/swift/types.d.ts.map +1 -1
  321. package/dist/plugins/swift/types.js.map +1 -1
  322. package/dist/plugins/typescript/parser.d.ts +4 -37
  323. package/dist/plugins/typescript/parser.d.ts.map +1 -1
  324. package/dist/plugins/typescript/parser.js +29 -331
  325. package/dist/plugins/typescript/parser.js.map +1 -1
  326. package/dist/plugins/typescript/symbol-extractor.d.ts.map +1 -1
  327. package/dist/plugins/typescript/symbol-extractor.js +12 -0
  328. package/dist/plugins/typescript/symbol-extractor.js.map +1 -1
  329. package/dist/plugins/typescript/types.d.ts.map +1 -1
  330. package/dist/plugins/typescript/types.js +10 -0
  331. package/dist/plugins/typescript/types.js.map +1 -1
  332. package/dist/shared/errors/config-error.d.ts +1 -1
  333. package/dist/shared/errors/config-error.d.ts.map +1 -1
  334. package/dist/shared/errors/config-error.js +1 -1
  335. package/dist/shared/errors/config-error.js.map +1 -1
  336. package/dist/shared/errors/file-error.d.ts +1 -1
  337. package/dist/shared/errors/file-error.d.ts.map +1 -1
  338. package/dist/shared/errors/file-error.js +1 -1
  339. package/dist/shared/errors/file-error.js.map +1 -1
  340. package/dist/shared/errors/index.d.ts +1 -1
  341. package/dist/shared/errors/index.d.ts.map +1 -1
  342. package/dist/shared/errors/index.js +4 -4
  343. package/dist/shared/errors/index.js.map +1 -1
  344. package/dist/shared/errors/parser-error.d.ts +1 -1
  345. package/dist/shared/errors/parser-error.d.ts.map +1 -1
  346. package/dist/shared/errors/parser-error.js +1 -1
  347. package/dist/shared/errors/parser-error.js.map +1 -1
  348. package/dist/shared/errors/validation-error.d.ts +1 -1
  349. package/dist/shared/errors/validation-error.d.ts.map +1 -1
  350. package/dist/shared/errors/validation-error.js +1 -1
  351. package/dist/shared/errors/validation-error.js.map +1 -1
  352. package/dist/shared/types/ast.d.ts +1 -1
  353. package/dist/shared/types/ast.d.ts.map +1 -1
  354. package/dist/shared/types/ast.js +1 -1
  355. package/dist/shared/types/ast.js.map +1 -1
  356. package/dist/shared/types/symbol.d.ts +3 -2
  357. package/dist/shared/types/symbol.d.ts.map +1 -1
  358. package/dist/shared/types/symbol.js +1 -0
  359. package/dist/shared/types/symbol.js.map +1 -1
  360. package/dist/shared/utils/index.d.ts +5 -5
  361. package/dist/shared/utils/index.d.ts.map +1 -1
  362. package/dist/shared/utils/index.js +5 -5
  363. package/dist/shared/utils/index.js.map +1 -1
  364. package/package.json +9 -8
  365. package/dist/core/analysis/index.d.ts +0 -6
  366. package/dist/core/analysis/index.d.ts.map +0 -1
  367. package/dist/core/analysis/index.js +0 -7
  368. package/dist/core/analysis/index.js.map +0 -1
  369. package/dist/core/analysis/quality-metrics.d.ts +0 -158
  370. package/dist/core/analysis/quality-metrics.d.ts.map +0 -1
  371. package/dist/core/analysis/quality-metrics.js +0 -442
  372. package/dist/core/analysis/quality-metrics.js.map +0 -1
  373. package/dist/core/indexing/file-watcher.d.ts +0 -110
  374. package/dist/core/indexing/file-watcher.d.ts.map +0 -1
  375. package/dist/core/indexing/file-watcher.js +0 -280
  376. package/dist/core/indexing/file-watcher.js.map +0 -1
  377. package/dist/core/move/import-resolver.d.ts.map +0 -1
  378. package/dist/core/move/import-resolver.js.map +0 -1
  379. package/dist/core/move/index.d.ts.map +0 -1
  380. package/dist/core/move/index.js.map +0 -1
  381. package/dist/core/move/move-service.d.ts.map +0 -1
  382. package/dist/core/move/move-service.js.map +0 -1
  383. package/dist/core/move/types.d.ts.map +0 -1
  384. package/dist/core/move/types.js.map +0 -1
  385. package/dist/core/refactor/design-patterns.d.ts +0 -178
  386. package/dist/core/refactor/design-patterns.d.ts.map +0 -1
  387. package/dist/core/refactor/design-patterns.js +0 -656
  388. package/dist/core/refactor/design-patterns.js.map +0 -1
  389. package/dist/core/refactor/extract-function.d.ts +0 -197
  390. package/dist/core/refactor/extract-function.d.ts.map +0 -1
  391. package/dist/core/refactor/extract-function.js +0 -730
  392. package/dist/core/refactor/extract-function.js.map +0 -1
  393. package/dist/core/refactor/index.d.ts +0 -8
  394. package/dist/core/refactor/index.d.ts.map +0 -1
  395. package/dist/core/refactor/index.js +0 -11
  396. package/dist/core/refactor/index.js.map +0 -1
  397. package/dist/core/refactor/inline-function.d.ts +0 -175
  398. package/dist/core/refactor/inline-function.d.ts.map +0 -1
  399. package/dist/core/refactor/inline-function.js +0 -425
  400. package/dist/core/refactor/inline-function.js.map +0 -1
  401. package/dist/core/refactor/swift-extractor.d.ts +0 -98
  402. package/dist/core/refactor/swift-extractor.d.ts.map +0 -1
  403. package/dist/core/refactor/swift-extractor.js +0 -283
  404. package/dist/core/refactor/swift-extractor.js.map +0 -1
  405. package/dist/core/search/engines/text-engine.d.ts +0 -52
  406. package/dist/core/search/engines/text-engine.d.ts.map +0 -1
  407. package/dist/core/search/engines/text-engine.js +0 -376
  408. package/dist/core/search/engines/text-engine.js.map +0 -1
  409. package/dist/core/search/index.d.ts +0 -10
  410. package/dist/core/search/index.d.ts.map +0 -1
  411. package/dist/core/search/index.js +0 -11
  412. package/dist/core/search/index.js.map +0 -1
  413. package/dist/core/search/service.d.ts +0 -105
  414. package/dist/core/search/service.d.ts.map +0 -1
  415. package/dist/core/search/service.js +0 -384
  416. package/dist/core/search/service.js.map +0 -1
  417. package/dist/core/search/types.d.ts +0 -357
  418. package/dist/core/search/types.d.ts.map +0 -1
  419. package/dist/core/search/types.js +0 -47
  420. package/dist/core/search/types.js.map +0 -1
  421. package/dist/core/shit-score/grading.d.ts +0 -39
  422. package/dist/core/shit-score/grading.d.ts.map +0 -1
  423. package/dist/core/shit-score/grading.js +0 -253
  424. package/dist/core/shit-score/grading.js.map +0 -1
  425. package/dist/core/shit-score/index.d.ts +0 -9
  426. package/dist/core/shit-score/index.d.ts.map +0 -1
  427. package/dist/core/shit-score/index.js +0 -8
  428. package/dist/core/shit-score/index.js.map +0 -1
  429. package/dist/core/shit-score/score-calculator.d.ts +0 -75
  430. package/dist/core/shit-score/score-calculator.d.ts.map +0 -1
  431. package/dist/core/shit-score/score-calculator.js +0 -240
  432. package/dist/core/shit-score/score-calculator.js.map +0 -1
  433. package/dist/core/shit-score/shit-score-analyzer.d.ts +0 -84
  434. package/dist/core/shit-score/shit-score-analyzer.d.ts.map +0 -1
  435. package/dist/core/shit-score/shit-score-analyzer.js +0 -595
  436. package/dist/core/shit-score/shit-score-analyzer.js.map +0 -1
  437. package/dist/core/shit-score/types.d.ts +0 -231
  438. package/dist/core/shit-score/types.d.ts.map +0 -1
  439. package/dist/core/shit-score/types.js +0 -73
  440. package/dist/core/shit-score/types.js.map +0 -1
  441. package/dist/core/snapshot/code-compressor.d.ts +0 -39
  442. package/dist/core/snapshot/code-compressor.d.ts.map +0 -1
  443. package/dist/core/snapshot/code-compressor.js +0 -211
  444. package/dist/core/snapshot/code-compressor.js.map +0 -1
  445. package/dist/core/snapshot/config.d.ts +0 -60
  446. package/dist/core/snapshot/config.d.ts.map +0 -1
  447. package/dist/core/snapshot/config.js +0 -136
  448. package/dist/core/snapshot/config.js.map +0 -1
  449. package/dist/core/snapshot/snapshot-differ.d.ts +0 -54
  450. package/dist/core/snapshot/snapshot-differ.d.ts.map +0 -1
  451. package/dist/core/snapshot/snapshot-differ.js +0 -262
  452. package/dist/core/snapshot/snapshot-differ.js.map +0 -1
  453. package/dist/core/snapshot/snapshot-engine.d.ts +0 -94
  454. package/dist/core/snapshot/snapshot-engine.d.ts.map +0 -1
  455. package/dist/core/snapshot/snapshot-engine.js +0 -492
  456. package/dist/core/snapshot/snapshot-engine.js.map +0 -1
  457. package/dist/infrastructure/parser/factory.d.ts +0 -141
  458. package/dist/infrastructure/parser/factory.d.ts.map +0 -1
  459. package/dist/infrastructure/parser/factory.js +0 -306
  460. package/dist/infrastructure/parser/factory.js.map +0 -1
  461. package/dist/infrastructure/storage/file-watcher.d.ts +0 -84
  462. package/dist/infrastructure/storage/file-watcher.d.ts.map +0 -1
  463. package/dist/infrastructure/storage/file-watcher.js +0 -249
  464. package/dist/infrastructure/storage/file-watcher.js.map +0 -1
  465. package/dist/infrastructure/storage/path-utils.d.ts +0 -96
  466. package/dist/infrastructure/storage/path-utils.d.ts.map +0 -1
  467. package/dist/infrastructure/storage/path-utils.js +0 -272
  468. package/dist/infrastructure/storage/path-utils.js.map +0 -1
  469. package/dist/plugins/swift/analyzers/complexity-analyzer.d.ts +0 -41
  470. package/dist/plugins/swift/analyzers/complexity-analyzer.d.ts.map +0 -1
  471. package/dist/plugins/swift/analyzers/complexity-analyzer.js +0 -206
  472. package/dist/plugins/swift/analyzers/complexity-analyzer.js.map +0 -1
  473. package/dist/plugins/swift/analyzers/duplication-detector.d.ts +0 -89
  474. package/dist/plugins/swift/analyzers/duplication-detector.d.ts.map +0 -1
  475. package/dist/plugins/swift/analyzers/duplication-detector.js +0 -271
  476. package/dist/plugins/swift/analyzers/duplication-detector.js.map +0 -1
  477. package/dist/plugins/swift/analyzers/error-handling-checker.d.ts +0 -34
  478. package/dist/plugins/swift/analyzers/error-handling-checker.d.ts.map +0 -1
  479. package/dist/plugins/swift/analyzers/error-handling-checker.js +0 -135
  480. package/dist/plugins/swift/analyzers/error-handling-checker.js.map +0 -1
  481. package/dist/plugins/swift/analyzers/naming-checker.d.ts +0 -47
  482. package/dist/plugins/swift/analyzers/naming-checker.d.ts.map +0 -1
  483. package/dist/plugins/swift/analyzers/naming-checker.js +0 -161
  484. package/dist/plugins/swift/analyzers/naming-checker.js.map +0 -1
  485. package/dist/plugins/swift/analyzers/pattern-detector.d.ts +0 -78
  486. package/dist/plugins/swift/analyzers/pattern-detector.d.ts.map +0 -1
  487. package/dist/plugins/swift/analyzers/pattern-detector.js +0 -247
  488. package/dist/plugins/swift/analyzers/pattern-detector.js.map +0 -1
  489. package/dist/plugins/swift/analyzers/security-checker.d.ts +0 -38
  490. package/dist/plugins/swift/analyzers/security-checker.d.ts.map +0 -1
  491. package/dist/plugins/swift/analyzers/security-checker.js +0 -135
  492. package/dist/plugins/swift/analyzers/security-checker.js.map +0 -1
  493. package/dist/plugins/swift/analyzers/test-coverage-checker.d.ts +0 -26
  494. package/dist/plugins/swift/analyzers/test-coverage-checker.d.ts.map +0 -1
  495. package/dist/plugins/swift/analyzers/test-coverage-checker.js +0 -63
  496. package/dist/plugins/swift/analyzers/test-coverage-checker.js.map +0 -1
  497. package/dist/plugins/swift/analyzers/type-safety-checker.d.ts +0 -41
  498. package/dist/plugins/swift/analyzers/type-safety-checker.d.ts.map +0 -1
  499. package/dist/plugins/swift/analyzers/type-safety-checker.js +0 -121
  500. package/dist/plugins/swift/analyzers/type-safety-checker.js.map +0 -1
  501. package/dist/plugins/swift/analyzers/unused-symbol-detector.d.ts +0 -38
  502. package/dist/plugins/swift/analyzers/unused-symbol-detector.d.ts.map +0 -1
  503. package/dist/plugins/swift/analyzers/unused-symbol-detector.js +0 -211
  504. package/dist/plugins/swift/analyzers/unused-symbol-detector.js.map +0 -1
  505. package/dist/plugins/typescript/analyzers/complexity-analyzer.d.ts +0 -39
  506. package/dist/plugins/typescript/analyzers/complexity-analyzer.d.ts.map +0 -1
  507. package/dist/plugins/typescript/analyzers/complexity-analyzer.js +0 -196
  508. package/dist/plugins/typescript/analyzers/complexity-analyzer.js.map +0 -1
  509. package/dist/plugins/typescript/analyzers/duplication-detector.d.ts +0 -181
  510. package/dist/plugins/typescript/analyzers/duplication-detector.d.ts.map +0 -1
  511. package/dist/plugins/typescript/analyzers/duplication-detector.js +0 -695
  512. package/dist/plugins/typescript/analyzers/duplication-detector.js.map +0 -1
  513. package/dist/plugins/typescript/analyzers/error-handling-checker.d.ts +0 -26
  514. package/dist/plugins/typescript/analyzers/error-handling-checker.d.ts.map +0 -1
  515. package/dist/plugins/typescript/analyzers/error-handling-checker.js +0 -84
  516. package/dist/plugins/typescript/analyzers/error-handling-checker.js.map +0 -1
  517. package/dist/plugins/typescript/analyzers/naming-checker.d.ts +0 -30
  518. package/dist/plugins/typescript/analyzers/naming-checker.d.ts.map +0 -1
  519. package/dist/plugins/typescript/analyzers/naming-checker.js +0 -116
  520. package/dist/plugins/typescript/analyzers/naming-checker.js.map +0 -1
  521. package/dist/plugins/typescript/analyzers/pattern-detector.d.ts +0 -80
  522. package/dist/plugins/typescript/analyzers/pattern-detector.d.ts.map +0 -1
  523. package/dist/plugins/typescript/analyzers/pattern-detector.js +0 -267
  524. package/dist/plugins/typescript/analyzers/pattern-detector.js.map +0 -1
  525. package/dist/plugins/typescript/analyzers/security-checker.d.ts +0 -34
  526. package/dist/plugins/typescript/analyzers/security-checker.d.ts.map +0 -1
  527. package/dist/plugins/typescript/analyzers/security-checker.js +0 -126
  528. package/dist/plugins/typescript/analyzers/security-checker.js.map +0 -1
  529. package/dist/plugins/typescript/analyzers/test-coverage-checker.d.ts +0 -22
  530. package/dist/plugins/typescript/analyzers/test-coverage-checker.d.ts.map +0 -1
  531. package/dist/plugins/typescript/analyzers/test-coverage-checker.js +0 -62
  532. package/dist/plugins/typescript/analyzers/test-coverage-checker.js.map +0 -1
  533. package/dist/plugins/typescript/analyzers/type-safety-checker.d.ts +0 -32
  534. package/dist/plugins/typescript/analyzers/type-safety-checker.d.ts.map +0 -1
  535. package/dist/plugins/typescript/analyzers/type-safety-checker.js +0 -86
  536. package/dist/plugins/typescript/analyzers/type-safety-checker.js.map +0 -1
  537. package/dist/plugins/typescript/analyzers/unused-symbol-detector.d.ts +0 -47
  538. package/dist/plugins/typescript/analyzers/unused-symbol-detector.d.ts.map +0 -1
  539. package/dist/plugins/typescript/analyzers/unused-symbol-detector.js +0 -152
  540. package/dist/plugins/typescript/analyzers/unused-symbol-detector.js.map +0 -1
  541. /package/dist/core/{move → move-file}/import-resolver.d.ts +0 -0
  542. /package/dist/core/{move → move-file}/types.d.ts +0 -0
  543. /package/dist/core/{move → move-file}/types.js +0 -0
@@ -0,0 +1,290 @@
1
+ /**
2
+ * Change Signature 命令
3
+ * 修改函式簽名並自動更新所有呼叫點
4
+ */
5
+ import * as path from 'path';
6
+ import { ChangeSignatureService, SignatureChangeType } from '../../../core/change-signature/index.js';
7
+ import { ParserRegistry } from '../../../infrastructure/parser/registry.js';
8
+ import { createUnifiedOutputHandler, parseOutputFormat, OutputFormat } from '../../cli/unified-output-handler.js';
9
+ /**
10
+ * 設定 change-signature 命令
11
+ */
12
+ export function setupChangeSignatureCommand(program, context) {
13
+ program
14
+ .command('change-signature <file> <functionName>')
15
+ .description('修改函式簽名並自動更新所有呼叫點')
16
+ .option('-p, --path <path>', '專案根目錄路徑', process.cwd())
17
+ .option('--add <params>', '新增參數 (格式: name:type=default@position,name2:type2)')
18
+ .option('--remove <params>', '移除參數 (參數名稱或索引,逗號分隔)')
19
+ .option('--reorder <order>', '重新排序 (參數名稱或索引,逗號分隔)')
20
+ .option('--rename <mapping>', '重命名參數 (格式: oldName:newName,oldName2:newName2)')
21
+ .option('--change-type <mapping>', '修改參數類型 (格式: name:newType,name2:newType2)')
22
+ .option('--dry-run', '預覽變更而不執行')
23
+ .option('--format <format>', '輸出格式 (diff|json|summary)', 'diff')
24
+ .action(async (file, functionName, options) => {
25
+ await handleChangeSignatureCommand(file, functionName, options, context);
26
+ });
27
+ }
28
+ /**
29
+ * 處理 change-signature 命令
30
+ */
31
+ async function handleChangeSignatureCommand(file, functionName, options, context) {
32
+ const outputHandler = createUnifiedOutputHandler();
33
+ let format;
34
+ try {
35
+ format = parseOutputFormat(options.format, true);
36
+ }
37
+ catch {
38
+ outputHandler.outputError('不支援的輸出格式。可用格式: json, summary, diff', OutputFormat.Summary);
39
+ process.exitCode = 1;
40
+ return;
41
+ }
42
+ const isJsonFormat = format === OutputFormat.Json;
43
+ try {
44
+ // 解析檔案路徑
45
+ const filePath = path.resolve(options.path || process.cwd(), file);
46
+ const projectRoot = options.path || process.cwd();
47
+ // 解析變更操作
48
+ const changes = parseChanges(options);
49
+ if (changes.length === 0) {
50
+ outputHandler.outputError('請指定至少一個變更操作 (--add, --remove, --reorder, --rename, --change-type)', format);
51
+ process.exitCode = 1;
52
+ return;
53
+ }
54
+ if (!isJsonFormat) {
55
+ console.log(`🔧 修改函式簽名: ${functionName}`);
56
+ console.log(`📁 檔案: ${path.relative(process.cwd(), filePath)}`);
57
+ }
58
+ // 取得 ParserRegistry(單例)
59
+ const parserRegistry = ParserRegistry.getInstance();
60
+ // 建立服務
61
+ const changeSignatureService = new ChangeSignatureService(parserRegistry, context.fileSystem);
62
+ // 執行 Change Signature
63
+ const result = await changeSignatureService.changeSignature({
64
+ filePath,
65
+ functionName,
66
+ changes,
67
+ projectRoot,
68
+ preview: options.dryRun
69
+ });
70
+ if (result.success) {
71
+ if (isJsonFormat) {
72
+ console.log(JSON.stringify({
73
+ success: true,
74
+ originalSignature: formatSignatureForJson(result.originalSignature),
75
+ newSignature: formatSignatureForJson(result.newSignature),
76
+ definitionUpdate: {
77
+ filePath: result.definitionUpdate.filePath,
78
+ originalCode: result.definitionUpdate.originalCode,
79
+ newCode: result.definitionUpdate.newCode
80
+ },
81
+ callSiteUpdates: result.callSiteUpdates.map(u => ({
82
+ filePath: u.filePath,
83
+ originalCode: u.originalCode,
84
+ newCode: u.newCode,
85
+ line: u.location.range.start.line
86
+ })),
87
+ executed: result.executed,
88
+ stats: result.stats
89
+ }));
90
+ }
91
+ else if (format === OutputFormat.Diff) {
92
+ printDiffOutput(result, projectRoot);
93
+ }
94
+ else {
95
+ printSummaryOutput(result, projectRoot);
96
+ }
97
+ }
98
+ else {
99
+ outputHandler.outputError(result.error || '未知錯誤', format);
100
+ process.exitCode = 1;
101
+ }
102
+ }
103
+ catch (error) {
104
+ const errorMsg = error instanceof Error ? error.message : String(error);
105
+ outputHandler.outputError(errorMsg, format);
106
+ process.exitCode = 1;
107
+ }
108
+ }
109
+ /**
110
+ * 解析變更操作
111
+ */
112
+ function parseChanges(options) {
113
+ const changes = [];
114
+ // 解析 --add 參數
115
+ if (options.add) {
116
+ const addParams = options.add.split(',');
117
+ for (const param of addParams) {
118
+ const change = parseAddParameter(param);
119
+ if (change) {
120
+ changes.push(change);
121
+ }
122
+ }
123
+ }
124
+ // 解析 --remove 參數
125
+ if (options.remove) {
126
+ const removeParams = options.remove.split(',');
127
+ for (const param of removeParams) {
128
+ const trimmed = param.trim();
129
+ const nameOrIndex = /^\d+$/.test(trimmed) ? parseInt(trimmed, 10) : trimmed;
130
+ changes.push({
131
+ type: SignatureChangeType.RemoveParameter,
132
+ parameterNameOrIndex: nameOrIndex
133
+ });
134
+ }
135
+ }
136
+ // 解析 --reorder 參數
137
+ if (options.reorder) {
138
+ const order = options.reorder.split(',').map(p => {
139
+ const trimmed = p.trim();
140
+ return /^\d+$/.test(trimmed) ? parseInt(trimmed, 10) : trimmed;
141
+ });
142
+ changes.push({
143
+ type: SignatureChangeType.ReorderParameters,
144
+ newOrder: order
145
+ });
146
+ }
147
+ // 解析 --rename 參數
148
+ if (options.rename) {
149
+ const mappings = options.rename.split(',');
150
+ for (const mapping of mappings) {
151
+ const [oldName, newName] = mapping.split(':').map(s => s.trim());
152
+ if (oldName && newName) {
153
+ changes.push({
154
+ type: SignatureChangeType.RenameParameter,
155
+ parameterNameOrIndex: oldName,
156
+ newName
157
+ });
158
+ }
159
+ }
160
+ }
161
+ // 解析 --change-type 參數
162
+ if (options.changeType) {
163
+ const mappings = options.changeType.split(',');
164
+ for (const mapping of mappings) {
165
+ const [name, newType] = mapping.split(':').map(s => s.trim());
166
+ if (name && newType) {
167
+ changes.push({
168
+ type: SignatureChangeType.ChangeParameterType,
169
+ parameterNameOrIndex: name,
170
+ newType
171
+ });
172
+ }
173
+ }
174
+ }
175
+ return changes;
176
+ }
177
+ /**
178
+ * 解析新增參數
179
+ * 格式: name:type=default@position
180
+ */
181
+ function parseAddParameter(param) {
182
+ const trimmed = param.trim();
183
+ if (!trimmed) {
184
+ return null;
185
+ }
186
+ // 解析位置
187
+ let position = -1;
188
+ let paramPart = trimmed;
189
+ const posMatch = trimmed.match(/@(-?\d+)$/);
190
+ if (posMatch) {
191
+ position = parseInt(posMatch[1], 10);
192
+ paramPart = trimmed.slice(0, -posMatch[0].length);
193
+ }
194
+ // 解析預設值
195
+ let defaultValue;
196
+ let nameTypePart = paramPart;
197
+ const defaultMatch = paramPart.match(/=(.+)$/);
198
+ if (defaultMatch) {
199
+ defaultValue = defaultMatch[1];
200
+ nameTypePart = paramPart.slice(0, -defaultMatch[0].length);
201
+ }
202
+ // 解析名稱和類型
203
+ const [name, type] = nameTypePart.split(':').map(s => s.trim());
204
+ if (!name) {
205
+ return null;
206
+ }
207
+ return {
208
+ type: SignatureChangeType.AddParameter,
209
+ name,
210
+ parameterType: type || undefined,
211
+ defaultValue,
212
+ optional: !!defaultValue,
213
+ position,
214
+ callSiteValue: defaultValue
215
+ };
216
+ }
217
+ /**
218
+ * 格式化簽名為 JSON
219
+ */
220
+ function formatSignatureForJson(signature) {
221
+ return {
222
+ name: signature.name,
223
+ parameters: signature.parameters.map((p) => ({
224
+ name: p.name,
225
+ type: p.type,
226
+ optional: p.optional,
227
+ defaultValue: p.defaultValue
228
+ })),
229
+ returnType: signature.returnType,
230
+ isMethod: signature.isMethod,
231
+ className: signature.className,
232
+ modifiers: signature.modifiers
233
+ };
234
+ }
235
+ /**
236
+ * 印出 diff 輸出
237
+ */
238
+ function printDiffOutput(result, projectRoot) {
239
+ console.log('\n📝 定義變更:');
240
+ console.log(`--- ${path.relative(projectRoot, result.definitionUpdate.filePath)}`);
241
+ console.log(`+++ ${path.relative(projectRoot, result.definitionUpdate.filePath)}`);
242
+ console.log(`- ${result.definitionUpdate.originalCode}`);
243
+ console.log(`+ ${result.definitionUpdate.newCode}`);
244
+ if (result.callSiteUpdates.length > 0) {
245
+ console.log('\n📞 呼叫點變更:');
246
+ for (const update of result.callSiteUpdates) {
247
+ console.log(`\n--- ${path.relative(projectRoot, update.filePath)}:${update.location.range.start.line}`);
248
+ console.log(`- ${update.originalCode.trim()}`);
249
+ console.log(`+ ${update.newCode.trim()}`);
250
+ }
251
+ }
252
+ console.log('\n' + (result.executed ? '✅ 變更已執行' : '🔍 預覽模式(使用 --dry-run)'));
253
+ console.log(`📊 統計: ${result.stats.callSitesUpdated} 個呼叫點, ${result.stats.filesAffected} 個檔案`);
254
+ }
255
+ /**
256
+ * 印出摘要輸出
257
+ */
258
+ function printSummaryOutput(result, projectRoot) {
259
+ console.log('\n✅ 簽名修改成功!');
260
+ console.log(`📝 原始: ${formatSignatureString(result.originalSignature)}`);
261
+ console.log(`📝 新的: ${formatSignatureString(result.newSignature)}`);
262
+ console.log(`📊 更新了 ${result.stats.callSitesUpdated} 個呼叫點,影響 ${result.stats.filesAffected} 個檔案`);
263
+ if (!result.executed) {
264
+ console.log('\n🔍 預覽模式 - 執行時移除 --dry-run');
265
+ }
266
+ }
267
+ /**
268
+ * 格式化簽名字串
269
+ */
270
+ function formatSignatureString(signature) {
271
+ const params = signature.parameters.map((p) => {
272
+ let str = p.name;
273
+ if (p.optional && !p.defaultValue) {
274
+ str += '?';
275
+ }
276
+ if (p.type) {
277
+ str += `: ${p.type}`;
278
+ }
279
+ if (p.defaultValue) {
280
+ str += ` = ${p.defaultValue}`;
281
+ }
282
+ return str;
283
+ }).join(', ');
284
+ let result = `${signature.name}(${params})`;
285
+ if (signature.returnType) {
286
+ result += `: ${signature.returnType}`;
287
+ }
288
+ return result;
289
+ }
290
+ //# sourceMappingURL=change-signature.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-signature.command.js","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/change-signature.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAwB,MAAM,iCAAiC,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAexH;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAAgB,EAAE,OAAuB;IACnF,OAAO;SACJ,OAAO,CAAC,wCAAwC,CAAC;SACjD,WAAW,CAAC,kBAAkB,CAAC;SAC/B,MAAM,CAAC,mBAAmB,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SACrD,MAAM,CAAC,gBAAgB,EAAE,mDAAmD,CAAC;SAC7E,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;SAClD,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;SAClD,MAAM,CAAC,oBAAoB,EAAE,+CAA+C,CAAC;SAC7E,MAAM,CAAC,yBAAyB,EAAE,0CAA0C,CAAC;SAC7E,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC;SAC/B,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,YAAoB,EAAE,OAA+B,EAAE,EAAE;QACpF,MAAM,4BAA4B,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,4BAA4B,CACzC,IAAY,EACZ,YAAoB,EACpB,O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EAAE,CAAC;QAAA,CAAC;QACpD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,IAAI,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,IAAI,MAAM,GAAG,CAAC;IAC5C,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,SAAS,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Cycles 命令
3
+ * 循環依賴分析(從 deps cycles 攤平而來)
4
+ */
5
+ import type { Command } from 'commander';
6
+ import type { CommandContext } from '../../cli/commands/types.js';
7
+ /**
8
+ * 設定 cycles 命令
9
+ */
10
+ export declare function setupCyclesCommand(program: Command, context: CommandContext): void;
11
+ //# sourceMappingURL=cycles.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cycles.command.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/cycles.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAQxE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CASlF"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Cycles 命令
3
+ * 循環依賴分析(從 deps cycles 攤平而來)
4
+ */
5
+ import { DependencyAnalyzer } from '../../../core/dependency/dependency-analyzer.js';
6
+ import { DependencyGraph } from '../../../core/dependency/dependency-graph.js';
7
+ import { CycleDetector } from '../../../core/dependency/cycle-detector.js';
8
+ import { QueryCommand } from '../../../infrastructure/formatters/index.js';
9
+ import { createUnifiedOutputHandler, parseOutputFormat, OutputFormat } from '../../cli/unified-output-handler.js';
10
+ /**
11
+ * 設定 cycles 命令
12
+ */
13
+ export function setupCyclesCommand(program, context) {
14
+ program
15
+ .command('cycles')
16
+ .description('分析循環依賴')
17
+ .option('-p, --path <path>', '分析路徑', '.')
18
+ .option('--format <format>', '輸出格式 (json|summary)', 'summary')
19
+ .action(async (options) => {
20
+ await handleCyclesCommand(options, context);
21
+ });
22
+ }
23
+ /**
24
+ * 處理 cycles 命令
25
+ */
26
+ async function handleCyclesCommand(options, context) {
27
+ const outputHandler = createUnifiedOutputHandler();
28
+ let format;
29
+ try {
30
+ format = parseOutputFormat(options.format, false);
31
+ }
32
+ catch {
33
+ outputHandler.outputError('不支援的輸出格式。可用格式: json, summary', OutputFormat.Summary);
34
+ process.exitCode = 1;
35
+ return;
36
+ }
37
+ if (format !== OutputFormat.Json) {
38
+ console.log('🔄 循環依賴分析...');
39
+ }
40
+ try {
41
+ const analyzePath = options.path || process.cwd();
42
+ // 初始化依賴分析器
43
+ const dependencyAnalyzer = new DependencyAnalyzer(context.fileSystem);
44
+ // 分析專案依賴
45
+ const projectDeps = await dependencyAnalyzer.analyzeProject(analyzePath);
46
+ // 獲取統計資訊
47
+ const stats = dependencyAnalyzer.getStats();
48
+ // 建立依賴圖
49
+ const graph = new DependencyGraph();
50
+ for (const fileDep of projectDeps.fileDependencies) {
51
+ graph.addNode(fileDep.filePath);
52
+ for (const dep of fileDep.dependencies) {
53
+ graph.addDependency(fileDep.filePath, dep.path);
54
+ }
55
+ }
56
+ // 使用 CycleDetector 檢測循環依賴
57
+ const cycleDetector = new CycleDetector();
58
+ const cycles = cycleDetector.detectCycles(graph);
59
+ // 轉換 cycles 為 CycleInfo
60
+ const cycleInfos = cycles.map(c => ({
61
+ cycle: [...c.cycle],
62
+ length: c.length
63
+ }));
64
+ const result = {
65
+ command: QueryCommand.Deps,
66
+ success: true,
67
+ cycles: cycleInfos,
68
+ summary: {
69
+ totalScanned: stats.totalFiles,
70
+ issuesFound: cycles.length,
71
+ totalFiles: stats.totalFiles,
72
+ totalDependencies: stats.totalDependencies,
73
+ cyclesFound: cycles.length
74
+ }
75
+ };
76
+ outputHandler.outputQuery(result, format);
77
+ }
78
+ catch (error) {
79
+ const errorMessage = error instanceof Error ? error.message : String(error);
80
+ outputHandler.outputError(`依賴分析失敗: ${errorMessage}`, format);
81
+ process.exitCode = 1;
82
+ if (process.env.NODE_ENV !== 'test') {
83
+ process.exit(1);
84
+ }
85
+ }
86
+ }
87
+ //# sourceMappingURL=cycles.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cycles.command.js","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/cycles.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAmC,MAAM,qCAAqC,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AASxH;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB,EAAE,OAAuB;IAC1E,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,QAAQ,CAAC;SACrB,MAAM,CAAC,mBAAmB,EAAE,MAAM,EAAE,GAAG,CAAC;SACxC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,SAAS,CAAC;SAC7D,MAAM,CAAC,KAAK,EAAE,OAAsB,EAAE,EAAE;QACvC,MAAM,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,mBAAmB,CAChC,OAAsB,EACtB,OAAuB;IAEvB,MAAM,aAAa,GAAG,0BAA0B,EAAE,CAAC;IACnD,IAAI,MAAoB,C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UAAU,GAAgB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC/C,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;YACnB,MAAM,EAAE,CAAC,CAAC,MAAM;SACjB,CAAC,CAAC,CAAC;QAEJ,MAAM,MAAM,GAAe;YACzB,OAAO,EAAE,YAAY,CAAC,IAAI;YAC1B,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE;gBACP,YAAY,EAAE,KAAK,CAAC,UAAU;gBAC9B,WAAW,EAAE,MAAM,CAAC,MAAM;gBAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;gBAC1C,WAAW,EAAE,MAAM,CAAC,MAAM;aAC3B;SACF,CAAC;QAEF,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,aAAa,CAAC,WAAW,CAAC,WAAW,YAAY,EAAE,EAAE,MAAM,CAAC,CAAC;QAC7D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * find-references 命令
3
+ * 語義級引用搜尋,精確找出符號的定義和所有引用位置
4
+ */
5
+ import type { Command } from 'commander';
6
+ import type { CommandContext } from '../../cli/commands/types.js';
7
+ /**
8
+ * 設定 find-references 命令
9
+ */
10
+ export declare function setupFindReferencesCommand(program: Command, context: CommandContext): void;
11
+ //# sourceMappingURL=find-references.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-references.command.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/find-references.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAQxE;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAS1F"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * find-references 命令
3
+ * 語義級引用搜尋,精確找出符號的定義和所有引用位置
4
+ */
5
+ import { IndexEngine, createIndexConfig, CLI_INDEX_DEFAULTS } from '../../../core/indexing/index.js';
6
+ import { createSymbolFinder, SymbolReferenceType } from '../../../core/shared/symbol-finder.js';
7
+ import { ParserRegistry } from '../../../infrastructure/parser/registry.js';
8
+ import { QueryCommand } from '../../../infrastructure/formatters/index.js';
9
+ import { createUnifiedOutputHandler, parseOutputFormat, OutputFormat } from '../../cli/unified-output-handler.js';
10
+ /**
11
+ * 設定 find-references 命令
12
+ */
13
+ export function setupFindReferencesCommand(program, context) {
14
+ program
15
+ .command('find-references <symbol>')
16
+ .description('查找符號的定義和所有引用')
17
+ .option('-p, --path <path>', '專案路徑', '.')
18
+ .option('--format <format>', '輸出格式 (json|summary)', 'summary')
19
+ .action(async (symbol, options) => {
20
+ await handleFindReferencesCommand(symbol, options, context);
21
+ });
22
+ }
23
+ /**
24
+ * 處理 find-references 命令
25
+ */
26
+ async function handleFindReferencesCommand(symbolName, options, context) {
27
+ const outputHandler = createUnifiedOutputHandler();
28
+ let format;
29
+ try {
30
+ format = parseOutputFormat(options.format, false);
31
+ }
32
+ catch {
33
+ outputHandler.outputError('不支援的輸出格式。可用格式: json, summary', OutputFormat.Summary);
34
+ process.exitCode = 1;
35
+ return;
36
+ }
37
+ if (format !== OutputFormat.Json) {
38
+ console.log(`🔍 查找符號引用: ${symbolName}...`);
39
+ }
40
+ const projectPath = options.path || process.cwd();
41
+ // 建立索引引擎
42
+ const indexConfig = createIndexConfig(projectPath, CLI_INDEX_DEFAULTS);
43
+ const indexEngine = new IndexEngine(indexConfig, context.fileSystem);
44
+ try {
45
+ // 索引專案
46
+ await indexEngine.indexProject(projectPath);
47
+ // 取得所有已索引檔案路徑
48
+ const indexedFiles = indexEngine.getAllIndexedFiles();
49
+ const filePaths = indexedFiles.map(f => f.filePath);
50
+ // 查找符號定義
51
+ const symbolResults = await indexEngine.findSymbol(symbolName);
52
+ let definition = null;
53
+ let symbolType = 'unknown';
54
+ if (symbolResults.length > 0) {
55
+ const firstResult = symbolResults[0];
56
+ definition = {
57
+ file: firstResult.symbol.location.filePath,
58
+ line: firstResult.symbol.location.range.start.line,
59
+ column: firstResult.symbol.location.range.start.column
60
+ };
61
+ symbolType = firstResult.symbol.type;
62
+ }
63
+ // 建立 SymbolFinder 查找所有引用
64
+ const parserRegistry = ParserRegistry.getInstance();
65
+ const symbolFinder = createSymbolFinder(parserRegistry, context.fileSystem);
66
+ const refs = await symbolFinder.findReferences(symbolName, filePaths);
67
+ // 轉換為輸出格式
68
+ const references = refs.map(ref => ({
69
+ file: ref.location.filePath,
70
+ line: ref.location.range.start.line,
71
+ column: ref.location.range.start.column,
72
+ type: mapReferenceType(ref.type),
73
+ context: ref.context || ''
74
+ }));
75
+ // 計算影響檔案數
76
+ const filesAffected = new Set(references.map(r => r.file)).size;
77
+ // 組裝結果
78
+ const result = {
79
+ command: QueryCommand.FindReferences,
80
+ success: true,
81
+ symbol: symbolName,
82
+ type: symbolType,
83
+ definition,
84
+ references,
85
+ summary: {
86
+ totalReferences: references.length,
87
+ filesAffected
88
+ }
89
+ };
90
+ outputHandler.outputQuery(result, format);
91
+ }
92
+ catch (error) {
93
+ const errorMessage = error instanceof Error ? error.message : String(error);
94
+ // 區分索引錯誤和查找錯誤
95
+ const isIndexError = errorMessage.includes('索引')
96
+ || errorMessage.includes('index')
97
+ || errorMessage.includes('ENOENT');
98
+ const errorPrefix = isIndexError ? '索引專案失敗' : '查找引用失敗';
99
+ outputHandler.outputError(`${errorPrefix}: ${errorMessage}`, format);
100
+ process.exitCode = 1;
101
+ }
102
+ finally {
103
+ indexEngine.dispose();
104
+ }
105
+ }
106
+ /**
107
+ * 映射引用類型
108
+ */
109
+ function mapReferenceType(type) {
110
+ switch (type) {
111
+ case SymbolReferenceType.Definition:
112
+ return 'definition';
113
+ case SymbolReferenceType.Import:
114
+ return 'import';
115
+ case SymbolReferenceType.Export:
116
+ return 'export';
117
+ case SymbolReferenceType.Usage:
118
+ default:
119
+ return 'usage';
120
+ }
121
+ }
122
+ //# sourceMappingURL=find-references.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-references.command.js","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/find-references.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EACL,YAAY,EAKb,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,YAAY,EACb,MAAM,2CAA2C,CAAC;AASnD;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB,EAAE,OAAuB;IAClF,OAAO;SACJ,OAAO,CAAC,0BAA0B,CAAC;SACnC,WAAW,CAAC,cAAc,CAAC;SAC3B,MAAM,CAAC,mBAAmB,EAAE,MAAM,EAAE,GAAG,CAAC;SACxC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,SAAS,CAAC;SAC7D,MAAM,CAAC,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M;YAC7B,OAAO,QAAQ,CAAC;QAClB,KAAK,mBAAmB,CAAC,MAAM;YAC7B,OAAO,QAAQ,CAAC;QAClB,KAAK,mBAAmB,CAAC,KAAK,CAAC;QAC/B;YACE,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Impact 命令
3
+ * 影響分析(從 deps impact 攤平而來)
4
+ */
5
+ import type { Command } from 'commander';
6
+ import type { CommandContext } from '../../cli/commands/types.js';
7
+ /**
8
+ * 設定 impact 命令
9
+ */
10
+ export declare function setupImpactCommand(program: Command, context: CommandContext): void;
11
+ //# sourceMappingURL=impact.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impact.command.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/cli/commands/impact.command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AASxE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAUlF"}