agent-ide 0.13.6 → 0.13.7

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 (450) hide show
  1. package/README.md +14 -7
  2. package/dist/core/call-hierarchy/call-hierarchy-analyzer.d.ts +11 -2
  3. package/dist/core/call-hierarchy/call-hierarchy-analyzer.d.ts.map +1 -1
  4. package/dist/core/call-hierarchy/call-hierarchy-analyzer.js +233 -25
  5. package/dist/core/call-hierarchy/call-hierarchy-analyzer.js.map +1 -1
  6. package/dist/core/change-signature/call-site-updater.d.ts +0 -1
  7. package/dist/core/change-signature/call-site-updater.d.ts.map +1 -1
  8. package/dist/core/change-signature/call-site-updater.js +0 -2
  9. package/dist/core/change-signature/call-site-updater.js.map +1 -1
  10. package/dist/core/change-signature/change-signature-engine.d.ts +9 -1
  11. package/dist/core/change-signature/change-signature-engine.d.ts.map +1 -1
  12. package/dist/core/change-signature/change-signature-engine.js +190 -5
  13. package/dist/core/change-signature/change-signature-engine.js.map +1 -1
  14. package/dist/core/change-signature/signature-parser.d.ts +0 -5
  15. package/dist/core/change-signature/signature-parser.d.ts.map +1 -1
  16. package/dist/core/change-signature/signature-parser.js +6 -34
  17. package/dist/core/change-signature/signature-parser.js.map +1 -1
  18. package/dist/core/deadcode/file-operations.d.ts.map +1 -1
  19. package/dist/core/deadcode/file-operations.js +3 -1
  20. package/dist/core/deadcode/file-operations.js.map +1 -1
  21. package/dist/core/deadcode/import-cleaner.d.ts.map +1 -1
  22. package/dist/core/deadcode/import-cleaner.js +3 -1
  23. package/dist/core/deadcode/import-cleaner.js.map +1 -1
  24. package/dist/core/deadcode/range-expander.d.ts +9 -1
  25. package/dist/core/deadcode/range-expander.d.ts.map +1 -1
  26. package/dist/core/deadcode/range-expander.js +115 -41
  27. package/dist/core/deadcode/range-expander.js.map +1 -1
  28. package/dist/core/foundations/file-utils.d.ts.map +1 -1
  29. package/dist/core/foundations/file-utils.js +6 -3
  30. package/dist/core/foundations/file-utils.js.map +1 -1
  31. package/dist/core/foundations/indexing/file-index.d.ts +5 -2
  32. package/dist/core/foundations/indexing/file-index.d.ts.map +1 -1
  33. package/dist/core/foundations/indexing/file-index.js +11 -3
  34. package/dist/core/foundations/indexing/file-index.js.map +1 -1
  35. package/dist/core/foundations/indexing/index-cache-serializer.d.ts +133 -0
  36. package/dist/core/foundations/indexing/index-cache-serializer.d.ts.map +1 -0
  37. package/dist/core/foundations/indexing/index-cache-serializer.js +217 -0
  38. package/dist/core/foundations/indexing/index-cache-serializer.js.map +1 -0
  39. package/dist/core/foundations/indexing/index-engine.d.ts +11 -5
  40. package/dist/core/foundations/indexing/index-engine.d.ts.map +1 -1
  41. package/dist/core/foundations/indexing/index-engine.js +31 -22
  42. package/dist/core/foundations/indexing/index-engine.js.map +1 -1
  43. package/dist/core/foundations/indexing/index.d.ts +4 -1
  44. package/dist/core/foundations/indexing/index.d.ts.map +1 -1
  45. package/dist/core/foundations/indexing/index.js +2 -1
  46. package/dist/core/foundations/indexing/index.js.map +1 -1
  47. package/dist/core/foundations/indexing/symbol-index.d.ts +7 -1
  48. package/dist/core/foundations/indexing/symbol-index.d.ts.map +1 -1
  49. package/dist/core/foundations/indexing/symbol-index.js +54 -3
  50. package/dist/core/foundations/indexing/symbol-index.js.map +1 -1
  51. package/dist/core/foundations/indexing/types.d.ts +3 -2
  52. package/dist/core/foundations/indexing/types.d.ts.map +1 -1
  53. package/dist/core/foundations/indexing/types.js +8 -6
  54. package/dist/core/foundations/indexing/types.js.map +1 -1
  55. package/dist/core/foundations/symbol-finder/call-site-parser.d.ts.map +1 -1
  56. package/dist/core/foundations/symbol-finder/call-site-parser.js +3 -1
  57. package/dist/core/foundations/symbol-finder/call-site-parser.js.map +1 -1
  58. package/dist/core/foundations/symbol-finder/symbol-finder.d.ts +0 -2
  59. package/dist/core/foundations/symbol-finder/symbol-finder.d.ts.map +1 -1
  60. package/dist/core/foundations/symbol-finder/symbol-finder.js +15 -11
  61. package/dist/core/foundations/symbol-finder/symbol-finder.js.map +1 -1
  62. package/dist/core/impact/dependency-extractor.d.ts +11 -3
  63. package/dist/core/impact/dependency-extractor.d.ts.map +1 -1
  64. package/dist/core/impact/dependency-extractor.js +149 -34
  65. package/dist/core/impact/dependency-extractor.js.map +1 -1
  66. package/dist/core/impact/file-scanner.d.ts.map +1 -1
  67. package/dist/core/impact/file-scanner.js +3 -2
  68. package/dist/core/impact/file-scanner.js.map +1 -1
  69. package/dist/core/impact/impact-analyzer.d.ts +8 -1
  70. package/dist/core/impact/impact-analyzer.d.ts.map +1 -1
  71. package/dist/core/impact/impact-analyzer.js +27 -8
  72. package/dist/core/impact/impact-analyzer.js.map +1 -1
  73. package/dist/core/impact/path-resolver.d.ts.map +1 -1
  74. package/dist/core/impact/path-resolver.js +11 -10
  75. package/dist/core/impact/path-resolver.js.map +1 -1
  76. package/dist/core/impact/types.d.ts.map +1 -1
  77. package/dist/core/impact/types.js +2 -1
  78. package/dist/core/impact/types.js.map +1 -1
  79. package/dist/core/move/file-scanner.d.ts +12 -0
  80. package/dist/core/move/file-scanner.d.ts.map +1 -1
  81. package/dist/core/move/file-scanner.js +58 -30
  82. package/dist/core/move/file-scanner.js.map +1 -1
  83. package/dist/core/move/glob-move-planner.d.ts +29 -0
  84. package/dist/core/move/glob-move-planner.d.ts.map +1 -0
  85. package/dist/core/move/glob-move-planner.js +48 -0
  86. package/dist/core/move/glob-move-planner.js.map +1 -0
  87. package/dist/core/move/index.d.ts +2 -0
  88. package/dist/core/move/index.d.ts.map +1 -1
  89. package/dist/core/move/index.js +1 -0
  90. package/dist/core/move/index.js.map +1 -1
  91. package/dist/core/move/move-engine.js +2 -2
  92. package/dist/core/move/move-engine.js.map +1 -1
  93. package/dist/core/move/path-calculator.d.ts +2 -0
  94. package/dist/core/move/path-calculator.d.ts.map +1 -1
  95. package/dist/core/move/path-calculator.js +36 -16
  96. package/dist/core/move/path-calculator.js.map +1 -1
  97. package/dist/core/move/path-utils.d.ts +2 -1
  98. package/dist/core/move/path-utils.d.ts.map +1 -1
  99. package/dist/core/move/path-utils.js +18 -28
  100. package/dist/core/move/path-utils.js.map +1 -1
  101. package/dist/core/move-member/change-applier.d.ts.map +1 -1
  102. package/dist/core/move-member/change-applier.js +3 -1
  103. package/dist/core/move-member/change-applier.js.map +1 -1
  104. package/dist/core/move-member/extractors/typescript-extractor.d.ts.map +1 -1
  105. package/dist/core/move-member/extractors/typescript-extractor.js +32 -28
  106. package/dist/core/move-member/extractors/typescript-extractor.js.map +1 -1
  107. package/dist/core/move-member/file-change-preparer.d.ts +5 -0
  108. package/dist/core/move-member/file-change-preparer.d.ts.map +1 -1
  109. package/dist/core/move-member/file-change-preparer.js +51 -11
  110. package/dist/core/move-member/file-change-preparer.js.map +1 -1
  111. package/dist/core/move-member/member-extractor.d.ts +0 -2
  112. package/dist/core/move-member/member-extractor.d.ts.map +1 -1
  113. package/dist/core/move-member/member-extractor.js +13 -22
  114. package/dist/core/move-member/member-extractor.js.map +1 -1
  115. package/dist/core/move-member/move-member-engine.d.ts +0 -1
  116. package/dist/core/move-member/move-member-engine.d.ts.map +1 -1
  117. package/dist/core/move-member/move-member-engine.js +0 -2
  118. package/dist/core/move-member/move-member-engine.js.map +1 -1
  119. package/dist/core/move-member/reference-updater.d.ts.map +1 -1
  120. package/dist/core/move-member/reference-updater.js +7 -10
  121. package/dist/core/move-member/reference-updater.js.map +1 -1
  122. package/dist/core/rename/reference-updater.d.ts +1 -0
  123. package/dist/core/rename/reference-updater.d.ts.map +1 -1
  124. package/dist/core/rename/reference-updater.js +48 -46
  125. package/dist/core/rename/reference-updater.js.map +1 -1
  126. package/dist/core/rename/rename-engine.d.ts +0 -1
  127. package/dist/core/rename/rename-engine.d.ts.map +1 -1
  128. package/dist/core/rename/rename-engine.js +9 -22
  129. package/dist/core/rename/rename-engine.js.map +1 -1
  130. package/dist/infrastructure/cache/cache-manager.d.ts.map +1 -1
  131. package/dist/infrastructure/cache/cache-manager.js +4 -5
  132. package/dist/infrastructure/cache/cache-manager.js.map +1 -1
  133. package/dist/infrastructure/cache/index-disk-cache.d.ts +46 -0
  134. package/dist/infrastructure/cache/index-disk-cache.d.ts.map +1 -0
  135. package/dist/infrastructure/cache/index-disk-cache.js +150 -0
  136. package/dist/infrastructure/cache/index-disk-cache.js.map +1 -0
  137. package/dist/infrastructure/cache/index.d.ts.map +1 -1
  138. package/dist/infrastructure/cache/index.js +1 -0
  139. package/dist/infrastructure/cache/index.js.map +1 -1
  140. package/dist/infrastructure/cache/memory-cache.d.ts.map +1 -1
  141. package/dist/infrastructure/cache/memory-cache.js +3 -1
  142. package/dist/infrastructure/cache/memory-cache.js.map +1 -1
  143. package/dist/infrastructure/formatters/index.d.ts +1 -2
  144. package/dist/infrastructure/formatters/index.d.ts.map +1 -1
  145. package/dist/infrastructure/formatters/index.js +1 -2
  146. package/dist/infrastructure/formatters/index.js.map +1 -1
  147. package/dist/infrastructure/formatters/query-formatter.d.ts.map +1 -1
  148. package/dist/infrastructure/formatters/query-formatter.js +9 -18
  149. package/dist/infrastructure/formatters/query-formatter.js.map +1 -1
  150. package/dist/infrastructure/formatters/query-types.d.ts +15 -145
  151. package/dist/infrastructure/formatters/query-types.d.ts.map +1 -1
  152. package/dist/infrastructure/formatters/query-types.js +3 -18
  153. package/dist/infrastructure/formatters/query-types.js.map +1 -1
  154. package/dist/infrastructure/formatters/strategies/base-formatter.d.ts +1 -20
  155. package/dist/infrastructure/formatters/strategies/base-formatter.d.ts.map +1 -1
  156. package/dist/infrastructure/formatters/strategies/base-formatter.js +0 -8
  157. package/dist/infrastructure/formatters/strategies/base-formatter.js.map +1 -1
  158. package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.d.ts.map +1 -1
  159. package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.js +7 -0
  160. package/dist/infrastructure/formatters/strategies/call-hierarchy-formatter.js.map +1 -1
  161. package/dist/infrastructure/formatters/strategies/cycles-formatter.d.ts +15 -0
  162. package/dist/infrastructure/formatters/strategies/cycles-formatter.d.ts.map +1 -0
  163. package/dist/infrastructure/formatters/strategies/cycles-formatter.js +29 -0
  164. package/dist/infrastructure/formatters/strategies/cycles-formatter.js.map +1 -0
  165. package/dist/infrastructure/formatters/strategies/impact-formatter.d.ts +15 -0
  166. package/dist/infrastructure/formatters/strategies/impact-formatter.d.ts.map +1 -0
  167. package/dist/infrastructure/formatters/strategies/impact-formatter.js +31 -0
  168. package/dist/infrastructure/formatters/strategies/impact-formatter.js.map +1 -0
  169. package/dist/infrastructure/formatters/strategies/index.d.ts +3 -4
  170. package/dist/infrastructure/formatters/strategies/index.d.ts.map +1 -1
  171. package/dist/infrastructure/formatters/strategies/index.js +3 -4
  172. package/dist/infrastructure/formatters/strategies/index.js.map +1 -1
  173. package/dist/infrastructure/logging/index.d.ts +2 -0
  174. package/dist/infrastructure/logging/index.d.ts.map +1 -0
  175. package/dist/infrastructure/logging/index.js +2 -0
  176. package/dist/infrastructure/logging/index.js.map +1 -0
  177. package/dist/infrastructure/logging/logger.d.ts +25 -0
  178. package/dist/infrastructure/logging/logger.d.ts.map +1 -0
  179. package/dist/infrastructure/logging/logger.js +54 -0
  180. package/dist/infrastructure/logging/logger.js.map +1 -0
  181. package/dist/infrastructure/parser/analysis-types.d.ts.map +1 -1
  182. package/dist/infrastructure/parser/base.d.ts +1 -6
  183. package/dist/infrastructure/parser/base.d.ts.map +1 -1
  184. package/dist/infrastructure/parser/base.js +4 -16
  185. package/dist/infrastructure/parser/base.js.map +1 -1
  186. package/dist/infrastructure/parser/index.d.ts +2 -2
  187. package/dist/infrastructure/parser/index.d.ts.map +1 -1
  188. package/dist/infrastructure/parser/index.js +1 -1
  189. package/dist/infrastructure/parser/index.js.map +1 -1
  190. package/dist/infrastructure/parser/interface.d.ts +0 -7
  191. package/dist/infrastructure/parser/interface.d.ts.map +1 -1
  192. package/dist/infrastructure/parser/interface.js +0 -1
  193. package/dist/infrastructure/parser/interface.js.map +1 -1
  194. package/dist/infrastructure/parser/registry.d.ts.map +1 -1
  195. package/dist/infrastructure/parser/registry.js +2 -1
  196. package/dist/infrastructure/parser/registry.js.map +1 -1
  197. package/dist/infrastructure/parser/types.d.ts +12 -3
  198. package/dist/infrastructure/parser/types.d.ts.map +1 -1
  199. package/dist/infrastructure/parser/types.js +7 -2
  200. package/dist/infrastructure/parser/types.js.map +1 -1
  201. package/dist/infrastructure/storage/file-system.d.ts.map +1 -1
  202. package/dist/infrastructure/storage/file-system.js +5 -1
  203. package/dist/infrastructure/storage/file-system.js.map +1 -1
  204. package/dist/interfaces/cli/cached-index-engine.d.ts +25 -0
  205. package/dist/interfaces/cli/cached-index-engine.d.ts.map +1 -0
  206. package/dist/interfaces/cli/cached-index-engine.js +59 -0
  207. package/dist/interfaces/cli/cached-index-engine.js.map +1 -0
  208. package/dist/interfaces/cli/cli.d.ts +1 -0
  209. package/dist/interfaces/cli/cli.d.ts.map +1 -1
  210. package/dist/interfaces/cli/cli.js +33 -19
  211. package/dist/interfaces/cli/cli.js.map +1 -1
  212. package/dist/interfaces/cli/command-utils.d.ts +17 -1
  213. package/dist/interfaces/cli/command-utils.d.ts.map +1 -1
  214. package/dist/interfaces/cli/command-utils.js +53 -3
  215. package/dist/interfaces/cli/command-utils.js.map +1 -1
  216. package/dist/interfaces/cli/commands/call-hierarchy.command.d.ts.map +1 -1
  217. package/dist/interfaces/cli/commands/call-hierarchy.command.js +57 -17
  218. package/dist/interfaces/cli/commands/call-hierarchy.command.js.map +1 -1
  219. package/dist/interfaces/cli/commands/change-signature.command.d.ts +12 -0
  220. package/dist/interfaces/cli/commands/change-signature.command.d.ts.map +1 -1
  221. package/dist/interfaces/cli/commands/change-signature.command.js +131 -12
  222. package/dist/interfaces/cli/commands/change-signature.command.js.map +1 -1
  223. package/dist/interfaces/cli/commands/cycles.command.d.ts +1 -1
  224. package/dist/interfaces/cli/commands/cycles.command.d.ts.map +1 -1
  225. package/dist/interfaces/cli/commands/cycles.command.js +13 -11
  226. package/dist/interfaces/cli/commands/cycles.command.js.map +1 -1
  227. package/dist/interfaces/cli/commands/deadcode.command.d.ts.map +1 -1
  228. package/dist/interfaces/cli/commands/deadcode.command.js +18 -19
  229. package/dist/interfaces/cli/commands/deadcode.command.js.map +1 -1
  230. package/dist/interfaces/cli/commands/find-references.command.d.ts.map +1 -1
  231. package/dist/interfaces/cli/commands/find-references.command.js +35 -11
  232. package/dist/interfaces/cli/commands/find-references.command.js.map +1 -1
  233. package/dist/interfaces/cli/commands/impact.command.d.ts +1 -1
  234. package/dist/interfaces/cli/commands/impact.command.js +6 -13
  235. package/dist/interfaces/cli/commands/impact.command.js.map +1 -1
  236. package/dist/interfaces/cli/commands/index.d.ts +1 -1
  237. package/dist/interfaces/cli/commands/index.d.ts.map +1 -1
  238. package/dist/interfaces/cli/commands/index.js +1 -1
  239. package/dist/interfaces/cli/commands/index.js.map +1 -1
  240. package/dist/interfaces/cli/commands/move-command-options.d.ts +14 -0
  241. package/dist/interfaces/cli/commands/move-command-options.d.ts.map +1 -0
  242. package/dist/interfaces/cli/commands/move-command-options.js +2 -0
  243. package/dist/interfaces/cli/commands/move-command-options.js.map +1 -0
  244. package/dist/interfaces/cli/commands/move-glob-command-handler.d.ts +8 -0
  245. package/dist/interfaces/cli/commands/move-glob-command-handler.d.ts.map +1 -0
  246. package/dist/interfaces/cli/commands/move-glob-command-handler.js +186 -0
  247. package/dist/interfaces/cli/commands/move-glob-command-handler.js.map +1 -0
  248. package/dist/interfaces/cli/commands/move.command.d.ts.map +1 -1
  249. package/dist/interfaces/cli/commands/move.command.js +62 -241
  250. package/dist/interfaces/cli/commands/move.command.js.map +1 -1
  251. package/dist/interfaces/cli/commands/rename.command.d.ts.map +1 -1
  252. package/dist/interfaces/cli/commands/rename.command.js +40 -26
  253. package/dist/interfaces/cli/commands/rename.command.js.map +1 -1
  254. package/dist/interfaces/cli/commands/search.command.d.ts +11 -0
  255. package/dist/interfaces/cli/commands/search.command.d.ts.map +1 -0
  256. package/dist/interfaces/cli/commands/search.command.js +110 -0
  257. package/dist/interfaces/cli/commands/search.command.js.map +1 -0
  258. package/dist/interfaces/cli/unified-output-handler.d.ts +5 -0
  259. package/dist/interfaces/cli/unified-output-handler.d.ts.map +1 -1
  260. package/dist/interfaces/cli/unified-output-handler.js +8 -1
  261. package/dist/interfaces/cli/unified-output-handler.js.map +1 -1
  262. package/dist/plugins/javascript/declaration-analyzer.d.ts.map +1 -1
  263. package/dist/plugins/javascript/declaration-analyzer.js +5 -2
  264. package/dist/plugins/javascript/declaration-analyzer.js.map +1 -1
  265. package/dist/plugins/javascript/parser.d.ts +6 -4
  266. package/dist/plugins/javascript/parser.d.ts.map +1 -1
  267. package/dist/plugins/javascript/parser.js +97 -15
  268. package/dist/plugins/javascript/parser.js.map +1 -1
  269. package/dist/plugins/javascript/reference-finder.d.ts.map +1 -1
  270. package/dist/plugins/javascript/reference-finder.js +3 -1
  271. package/dist/plugins/javascript/reference-finder.js.map +1 -1
  272. package/dist/plugins/javascript/types.js +10 -10
  273. package/dist/plugins/javascript/types.js.map +1 -1
  274. package/dist/plugins/shared/constants.d.ts +1 -1
  275. package/dist/plugins/shared/constants.d.ts.map +1 -1
  276. package/dist/plugins/shared/constants.js +7 -1
  277. package/dist/plugins/shared/constants.js.map +1 -1
  278. package/dist/plugins/shared/parser-helpers.d.ts.map +1 -1
  279. package/dist/plugins/shared/parser-helpers.js +1 -0
  280. package/dist/plugins/shared/parser-helpers.js.map +1 -1
  281. package/dist/plugins/shared/utils/memory-monitor.d.ts.map +1 -1
  282. package/dist/plugins/shared/utils/memory-monitor.js +3 -2
  283. package/dist/plugins/shared/utils/memory-monitor.js.map +1 -1
  284. package/dist/plugins/shared/utils/object.d.ts.map +1 -1
  285. package/dist/plugins/shared/utils/object.js +8 -12
  286. package/dist/plugins/shared/utils/object.js.map +1 -1
  287. package/dist/plugins/typescript/declaration-analyzer.d.ts.map +1 -1
  288. package/dist/plugins/typescript/declaration-analyzer.js +9 -4
  289. package/dist/plugins/typescript/declaration-analyzer.js.map +1 -1
  290. package/dist/plugins/typescript/language-service.js +1 -1
  291. package/dist/plugins/typescript/language-service.js.map +1 -1
  292. package/dist/plugins/typescript/parser.d.ts +1 -6
  293. package/dist/plugins/typescript/parser.d.ts.map +1 -1
  294. package/dist/plugins/typescript/parser.js +7 -33
  295. package/dist/plugins/typescript/parser.js.map +1 -1
  296. package/dist/plugins/typescript/pattern-analyzer.d.ts.map +1 -1
  297. package/dist/plugins/typescript/pattern-analyzer.js +3 -1
  298. package/dist/plugins/typescript/pattern-analyzer.js.map +1 -1
  299. package/dist/plugins/typescript/reference-finder.d.ts.map +1 -1
  300. package/dist/plugins/typescript/reference-finder.js +3 -1
  301. package/dist/plugins/typescript/reference-finder.js.map +1 -1
  302. package/dist/plugins/typescript/tsconfig-loader.d.ts.map +1 -1
  303. package/dist/plugins/typescript/tsconfig-loader.js +162 -24
  304. package/dist/plugins/typescript/tsconfig-loader.js.map +1 -1
  305. package/dist/plugins/typescript/types.js +3 -3
  306. package/dist/plugins/typescript/types.js.map +1 -1
  307. package/dist/shared/errors/diagnostic-collector.d.ts +47 -0
  308. package/dist/shared/errors/diagnostic-collector.d.ts.map +1 -0
  309. package/dist/shared/errors/diagnostic-collector.js +89 -0
  310. package/dist/shared/errors/diagnostic-collector.js.map +1 -0
  311. package/dist/shared/errors/index.d.ts +3 -0
  312. package/dist/shared/errors/index.d.ts.map +1 -1
  313. package/dist/shared/errors/index.js +5 -1
  314. package/dist/shared/errors/index.js.map +1 -1
  315. package/dist/shared/types/index.d.ts +1 -0
  316. package/dist/shared/types/index.d.ts.map +1 -1
  317. package/dist/shared/types/index.js +2 -0
  318. package/dist/shared/types/index.js.map +1 -1
  319. package/dist/shared/types/source-file-extensions.d.ts +14 -0
  320. package/dist/shared/types/source-file-extensions.d.ts.map +1 -0
  321. package/dist/shared/types/source-file-extensions.js +42 -0
  322. package/dist/shared/types/source-file-extensions.js.map +1 -0
  323. package/dist/shared/types/symbol.d.ts +1 -0
  324. package/dist/shared/types/symbol.d.ts.map +1 -1
  325. package/dist/shared/types/symbol.js.map +1 -1
  326. package/package.json +18 -12
  327. package/dist/application/events/event-bus.d.ts +0 -107
  328. package/dist/application/events/event-bus.d.ts.map +0 -1
  329. package/dist/application/events/event-bus.js +0 -369
  330. package/dist/application/events/event-bus.js.map +0 -1
  331. package/dist/application/events/event-types.d.ts +0 -195
  332. package/dist/application/events/event-types.d.ts.map +0 -1
  333. package/dist/application/events/event-types.js +0 -36
  334. package/dist/application/events/event-types.js.map +0 -1
  335. package/dist/application/events/index.d.ts +0 -6
  336. package/dist/application/events/index.d.ts.map +0 -1
  337. package/dist/application/events/index.js +0 -6
  338. package/dist/application/events/index.js.map +0 -1
  339. package/dist/application/index.d.ts +0 -76
  340. package/dist/application/index.d.ts.map +0 -1
  341. package/dist/application/index.js +0 -127
  342. package/dist/application/index.js.map +0 -1
  343. package/dist/application/services/cache-coordinator.service.d.ts +0 -69
  344. package/dist/application/services/cache-coordinator.service.d.ts.map +0 -1
  345. package/dist/application/services/cache-coordinator.service.js +0 -251
  346. package/dist/application/services/cache-coordinator.service.js.map +0 -1
  347. package/dist/application/services/error-handler.service.d.ts +0 -56
  348. package/dist/application/services/error-handler.service.d.ts.map +0 -1
  349. package/dist/application/services/error-handler.service.js +0 -273
  350. package/dist/application/services/error-handler.service.js.map +0 -1
  351. package/dist/application/services/index.d.ts +0 -8
  352. package/dist/application/services/index.d.ts.map +0 -1
  353. package/dist/application/services/index.js +0 -8
  354. package/dist/application/services/index.js.map +0 -1
  355. package/dist/application/services/module-coordinator.service.d.ts +0 -55
  356. package/dist/application/services/module-coordinator.service.d.ts.map +0 -1
  357. package/dist/application/services/module-coordinator.service.js +0 -185
  358. package/dist/application/services/module-coordinator.service.js.map +0 -1
  359. package/dist/application/services/session-manager.service.d.ts +0 -86
  360. package/dist/application/services/session-manager.service.d.ts.map +0 -1
  361. package/dist/application/services/session-manager.service.js +0 -321
  362. package/dist/application/services/session-manager.service.js.map +0 -1
  363. package/dist/application/state/application-state.d.ts +0 -164
  364. package/dist/application/state/application-state.d.ts.map +0 -1
  365. package/dist/application/state/application-state.js +0 -290
  366. package/dist/application/state/application-state.js.map +0 -1
  367. package/dist/application/state/index.d.ts +0 -15
  368. package/dist/application/state/index.d.ts.map +0 -1
  369. package/dist/application/state/index.js +0 -15
  370. package/dist/application/state/index.js.map +0 -1
  371. package/dist/application/state/session-state.d.ts +0 -114
  372. package/dist/application/state/session-state.d.ts.map +0 -1
  373. package/dist/application/state/session-state.js +0 -188
  374. package/dist/application/state/session-state.js.map +0 -1
  375. package/dist/application/state/state-manager.d.ts +0 -122
  376. package/dist/application/state/state-manager.d.ts.map +0 -1
  377. package/dist/application/state/state-manager.js +0 -234
  378. package/dist/application/state/state-manager.js.map +0 -1
  379. package/dist/application/types.d.ts +0 -217
  380. package/dist/application/types.d.ts.map +0 -1
  381. package/dist/application/types.js +0 -5
  382. package/dist/application/types.js.map +0 -1
  383. package/dist/core/find-references/index.d.ts +0 -12
  384. package/dist/core/find-references/index.d.ts.map +0 -1
  385. package/dist/core/find-references/index.js +0 -14
  386. package/dist/core/find-references/index.js.map +0 -1
  387. package/dist/core/find-references/reference-finder-engine.d.ts +0 -75
  388. package/dist/core/find-references/reference-finder-engine.d.ts.map +0 -1
  389. package/dist/core/find-references/reference-finder-engine.js +0 -87
  390. package/dist/core/find-references/reference-finder-engine.js.map +0 -1
  391. package/dist/core/find-references/types.d.ts +0 -6
  392. package/dist/core/find-references/types.d.ts.map +0 -1
  393. package/dist/core/find-references/types.js +0 -7
  394. package/dist/core/find-references/types.js.map +0 -1
  395. package/dist/core/snapshot/index.d.ts +0 -9
  396. package/dist/core/snapshot/index.d.ts.map +0 -1
  397. package/dist/core/snapshot/index.js +0 -7
  398. package/dist/core/snapshot/index.js.map +0 -1
  399. package/dist/core/snapshot/snapshot-cache.d.ts +0 -103
  400. package/dist/core/snapshot/snapshot-cache.d.ts.map +0 -1
  401. package/dist/core/snapshot/snapshot-cache.js +0 -249
  402. package/dist/core/snapshot/snapshot-cache.js.map +0 -1
  403. package/dist/core/snapshot/snapshot-generator.d.ts +0 -79
  404. package/dist/core/snapshot/snapshot-generator.d.ts.map +0 -1
  405. package/dist/core/snapshot/snapshot-generator.js +0 -381
  406. package/dist/core/snapshot/snapshot-generator.js.map +0 -1
  407. package/dist/core/snapshot/types.d.ts +0 -67
  408. package/dist/core/snapshot/types.d.ts.map +0 -1
  409. package/dist/core/snapshot/types.js +0 -25
  410. package/dist/core/snapshot/types.js.map +0 -1
  411. package/dist/core/snapshot/utils/bracket-balancer.d.ts +0 -27
  412. package/dist/core/snapshot/utils/bracket-balancer.d.ts.map +0 -1
  413. package/dist/core/snapshot/utils/bracket-balancer.js +0 -70
  414. package/dist/core/snapshot/utils/bracket-balancer.js.map +0 -1
  415. package/dist/core/snapshot/utils/factory-pattern-detector.d.ts +0 -22
  416. package/dist/core/snapshot/utils/factory-pattern-detector.d.ts.map +0 -1
  417. package/dist/core/snapshot/utils/factory-pattern-detector.js +0 -70
  418. package/dist/core/snapshot/utils/factory-pattern-detector.js.map +0 -1
  419. package/dist/core/snapshot/utils/index.d.ts +0 -7
  420. package/dist/core/snapshot/utils/index.d.ts.map +0 -1
  421. package/dist/core/snapshot/utils/index.js +0 -7
  422. package/dist/core/snapshot/utils/index.js.map +0 -1
  423. package/dist/core/snapshot/utils/symbol-formatter.d.ts +0 -37
  424. package/dist/core/snapshot/utils/symbol-formatter.d.ts.map +0 -1
  425. package/dist/core/snapshot/utils/symbol-formatter.js +0 -89
  426. package/dist/core/snapshot/utils/symbol-formatter.js.map +0 -1
  427. package/dist/infrastructure/formatters/diff-utils.d.ts +0 -24
  428. package/dist/infrastructure/formatters/diff-utils.d.ts.map +0 -1
  429. package/dist/infrastructure/formatters/diff-utils.js +0 -104
  430. package/dist/infrastructure/formatters/diff-utils.js.map +0 -1
  431. package/dist/infrastructure/formatters/preview-converter.d.ts +0 -148
  432. package/dist/infrastructure/formatters/preview-converter.d.ts.map +0 -1
  433. package/dist/infrastructure/formatters/preview-converter.js +0 -329
  434. package/dist/infrastructure/formatters/preview-converter.js.map +0 -1
  435. package/dist/infrastructure/formatters/strategies/analyze-formatter.d.ts +0 -24
  436. package/dist/infrastructure/formatters/strategies/analyze-formatter.d.ts.map +0 -1
  437. package/dist/infrastructure/formatters/strategies/analyze-formatter.js +0 -102
  438. package/dist/infrastructure/formatters/strategies/analyze-formatter.js.map +0 -1
  439. package/dist/infrastructure/formatters/strategies/deps-formatter.d.ts +0 -15
  440. package/dist/infrastructure/formatters/strategies/deps-formatter.d.ts.map +0 -1
  441. package/dist/infrastructure/formatters/strategies/deps-formatter.js +0 -47
  442. package/dist/infrastructure/formatters/strategies/deps-formatter.js.map +0 -1
  443. package/dist/infrastructure/formatters/strategies/snapshot-formatter.d.ts +0 -20
  444. package/dist/infrastructure/formatters/strategies/snapshot-formatter.d.ts.map +0 -1
  445. package/dist/infrastructure/formatters/strategies/snapshot-formatter.js +0 -101
  446. package/dist/infrastructure/formatters/strategies/snapshot-formatter.js.map +0 -1
  447. package/dist/interfaces/cli/commands/snapshot.command.d.ts +0 -11
  448. package/dist/interfaces/cli/commands/snapshot.command.d.ts.map +0 -1
  449. package/dist/interfaces/cli/commands/snapshot.command.js +0 -86
  450. package/dist/interfaces/cli/commands/snapshot.command.js.map +0 -1
@@ -1,188 +0,0 @@
1
- /**
2
- * 會話狀態管理類別
3
- *
4
- * 負責管理用戶會話的狀態,包括:
5
- * - 會話基本資訊(ID、用戶、創建時間等)
6
- * - 會話上下文(工作目錄、當前檔案等)
7
- * - 操作歷史記錄
8
- * - 狀態不可變更新
9
- * - 時間旅行除錯支援
10
- */
11
- export class SessionState {
12
- sessionId;
13
- userId;
14
- isActive;
15
- createdAt;
16
- lastAccessedAt;
17
- context;
18
- operationHistory;
19
- options;
20
- constructor(sessionId, userId, options = {}) {
21
- const now = new Date();
22
- this.sessionId = sessionId;
23
- this.userId = userId;
24
- this.isActive = true;
25
- this.createdAt = now;
26
- this.lastAccessedAt = now;
27
- this.context = {};
28
- this.operationHistory = [];
29
- this.options = {
30
- maxHistorySize: 1000,
31
- timeoutMs: 30 * 60 * 1000, // 30 分鐘
32
- ...options
33
- };
34
- }
35
- /**
36
- * 從 JSON 數據建立 SessionState 實例
37
- */
38
- static fromJSON(data) {
39
- const instance = new SessionState(data.sessionId || '', data.userId, data.options);
40
- // 使用 Object.assign 來設定所有屬性
41
- return Object.assign(Object.create(Object.getPrototypeOf(instance)), {
42
- ...instance,
43
- isActive: data.isActive ?? true,
44
- createdAt: data.createdAt ? new Date(data.createdAt) : instance.createdAt,
45
- lastAccessedAt: data.lastAccessedAt ? new Date(data.lastAccessedAt) : instance.lastAccessedAt,
46
- context: data.context || {},
47
- operationHistory: data.operationHistory || [],
48
- options: data.options || instance.options
49
- });
50
- }
51
- /**
52
- * 更新會話上下文
53
- */
54
- updateContext(newContext) {
55
- return this.clone({
56
- context: { ...this.context, ...newContext },
57
- lastAccessedAt: new Date()
58
- });
59
- }
60
- /**
61
- * 更新最後存取時間
62
- */
63
- updateLastAccess() {
64
- return this.clone({
65
- lastAccessedAt: new Date()
66
- });
67
- }
68
- /**
69
- * 停用會話
70
- */
71
- deactivate() {
72
- return this.clone({
73
- isActive: false,
74
- lastAccessedAt: new Date()
75
- });
76
- }
77
- /**
78
- * 啟用會話
79
- */
80
- activate() {
81
- return this.clone({
82
- isActive: true,
83
- lastAccessedAt: new Date()
84
- });
85
- }
86
- /**
87
- * 添加操作記錄
88
- */
89
- addOperation(operation) {
90
- const newHistory = [...this.operationHistory, operation];
91
- // 檢查是否超過最大歷史記錄數量
92
- const maxSize = this.options.maxHistorySize || 1000;
93
- if (newHistory.length > maxSize) {
94
- newHistory.splice(0, newHistory.length - maxSize);
95
- }
96
- return this.clone({
97
- operationHistory: newHistory,
98
- lastAccessedAt: new Date()
99
- });
100
- }
101
- /**
102
- * 批次添加操作記錄
103
- */
104
- addOperations(operations) {
105
- let state = this;
106
- for (const operation of operations) {
107
- state = state.addOperation(operation);
108
- }
109
- return state;
110
- }
111
- /**
112
- * 清空操作歷史
113
- */
114
- clearHistory() {
115
- return this.clone({
116
- operationHistory: [],
117
- lastAccessedAt: new Date()
118
- });
119
- }
120
- /**
121
- * 檢查會話是否已過期
122
- */
123
- isExpired() {
124
- if (!this.options.timeoutMs) {
125
- return false;
126
- }
127
- const now = Date.now();
128
- const lastAccess = this.lastAccessedAt.getTime();
129
- return (now - lastAccess) > this.options.timeoutMs;
130
- }
131
- /**
132
- * 獲取會話持續時間(毫秒)
133
- */
134
- getDuration() {
135
- return Date.now() - this.createdAt.getTime();
136
- }
137
- /**
138
- * 回到指定操作的狀態(時間旅行除錯)
139
- */
140
- revertToOperation(operationId) {
141
- const operationIndex = this.operationHistory.findIndex(op => op.id === operationId);
142
- if (operationIndex === -1) {
143
- return this;
144
- }
145
- const newHistory = this.operationHistory.slice(0, operationIndex + 1);
146
- return this.clone({
147
- operationHistory: newHistory,
148
- lastAccessedAt: new Date()
149
- });
150
- }
151
- /**
152
- * 獲取指定時間點的狀態快照
153
- */
154
- getSnapshotAtTime(timestamp) {
155
- const targetTime = timestamp.getTime();
156
- const historyUpToTime = this.operationHistory.filter(op => op.timestamp.getTime() <= targetTime);
157
- return this.clone({
158
- operationHistory: historyUpToTime,
159
- lastAccessedAt: new Date()
160
- });
161
- }
162
- /**
163
- * 序列化為 JSON
164
- */
165
- toJSON() {
166
- return {
167
- sessionId: this.sessionId,
168
- userId: this.userId,
169
- isActive: this.isActive,
170
- createdAt: this.createdAt,
171
- lastAccessedAt: this.lastAccessedAt,
172
- context: this.context,
173
- operationHistory: this.operationHistory,
174
- options: this.options
175
- };
176
- }
177
- /**
178
- * 克隆狀態並應用變更(不可變更新)
179
- */
180
- clone(changes) {
181
- const instance = Object.create(Object.getPrototypeOf(this));
182
- return Object.assign(instance, {
183
- ...this,
184
- ...changes
185
- });
186
- }
187
- }
188
- //# sourceMappingURL=session-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-state.js","sourceRoot":"","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;QAC5D,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC7B,GAAG,IAAI;YACP,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,122 +0,0 @@
1
- /**
2
- * 狀態管理器
3
- *
4
- * 負責統一管理應用程式的所有狀態,包括:
5
- * - 應用程式全域狀態
6
- * - 會話狀態管理
7
- * - 狀態持久化和恢復
8
- * - 狀態變更通知
9
- * - 狀態健康度監控
10
- */
11
- import { EventEmitter } from 'events';
12
- import { SessionState, SessionStateData } from '../state/session-state.js';
13
- import { ApplicationState, ApplicationStateData } from '../state/application-state.js';
14
- export interface StateSnapshot {
15
- applicationState: ApplicationStateData;
16
- sessions: Record<string, SessionStateData>;
17
- timestamp: Date;
18
- }
19
- export interface StateManagerStats {
20
- totalSessions: number;
21
- activeSessions: number;
22
- applicationState: {
23
- version: string;
24
- environment: string;
25
- isInitialized: boolean;
26
- moduleCount: number;
27
- settingsCount: number;
28
- cacheHitRate: number;
29
- totalOperations: number;
30
- runtime: number;
31
- };
32
- }
33
- export interface HealthCheck {
34
- isHealthy: boolean;
35
- issues: string[];
36
- stats: StateManagerStats;
37
- }
38
- export interface StateEvent {
39
- type: 'sessionCreated' | 'sessionUpdated' | 'sessionRemoved' | 'applicationStateUpdated';
40
- sessionId?: string;
41
- session?: SessionState;
42
- oldState?: ApplicationState;
43
- newState?: ApplicationState;
44
- }
45
- export declare class StateManager extends EventEmitter {
46
- private _applicationState;
47
- private _activeSessions;
48
- constructor(initialApplicationState: ApplicationState);
49
- /**
50
- * 從 JSON 字串建立 StateManager 實例
51
- */
52
- static fromJSON(jsonString: string): StateManager;
53
- /**
54
- * 獲取應用程式狀態
55
- */
56
- get applicationState(): ApplicationState;
57
- /**
58
- * 獲取活躍會話
59
- */
60
- get activeSessions(): Record<string, SessionState>;
61
- /**
62
- * 建立新會話
63
- */
64
- createSession(sessionId: string, userId?: string): SessionState;
65
- /**
66
- * 獲取會話
67
- */
68
- getSession(sessionId: string): SessionState | undefined;
69
- /**
70
- * 更新會話狀態
71
- */
72
- updateSession(sessionId: string, updater: (session: SessionState) => SessionState): SessionState;
73
- /**
74
- * 移除會話
75
- */
76
- removeSession(sessionId: string): SessionState | undefined;
77
- /**
78
- * 列出所有活躍會話
79
- */
80
- listActiveSessions(): SessionState[];
81
- /**
82
- * 清理過期會話
83
- */
84
- cleanupExpiredSessions(): number;
85
- /**
86
- * 更新應用程式狀態
87
- */
88
- updateApplicationState(updater: (state: ApplicationState) => ApplicationState): ApplicationState;
89
- /**
90
- * 建立狀態快照
91
- */
92
- createSnapshot(): StateSnapshot;
93
- /**
94
- * 從快照恢復狀態
95
- */
96
- restoreFromSnapshot(snapshot: StateSnapshot): void;
97
- /**
98
- * 序列化為 JSON
99
- */
100
- toJSON(): StateSnapshot;
101
- /**
102
- * 獲取狀態統計資訊
103
- */
104
- getStats(): StateManagerStats;
105
- /**
106
- * 檢查狀態健康度
107
- */
108
- checkHealth(): HealthCheck;
109
- /**
110
- * 估算記憶體使用量(簡化版)
111
- */
112
- private estimateMemoryUsage;
113
- /**
114
- * 添加事件監聽器(類型安全)
115
- */
116
- on(event: string, listener: (...args: unknown[]) => void): this;
117
- /**
118
- * 移除事件監聽器(類型安全)
119
- */
120
- off(event: string, listener: (...args: unknown[]) => void): this;
121
- }
122
- //# sourceMappingURL=state-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state-manager.d.ts","sourceRoot":"","sources":["../../../src/application/state/state-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAEjG,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,QAAQ,EAAE,MA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,EAAE,MAAM,GAAG,YAAY;IAiB/D;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIvD;;OAEG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,YAAY,GAC/C,YAAY;IAkBf;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAiB1D;;OAEG;IACH,kBAAkB,IAAI,YAAY,EAAE;IAIpC;;OAEG;IACH,sBAAsB,IAAI,MAAM;IAgBhC;;OAEG;IACH,sBAAsB,CACpB,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,gBAAgB,GACrD,gBAAgB;IAcnB;;OAEG;IACH,cAAc,IAAI,aAAa;IAc/B;;OAEG;IACH,mBAAmB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAclD;;OAEG;IACH,MAAM,IAAI,aAAa;IAIvB;;OAEG;IACH,QAAQ,IAAI,iBAAiB;IAW7B;;OAEG;IACH,WAAW,IAAI,WAAW;IAiC1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI;IAI/D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI;CAGjE"}
@@ -1,234 +0,0 @@
1
- /**
2
- * 狀態管理器
3
- *
4
- * 負責統一管理應用程式的所有狀態,包括:
5
- * - 應用程式全域狀態
6
- * - 會話狀態管理
7
- * - 狀態持久化和恢復
8
- * - 狀態變更通知
9
- * - 狀態健康度監控
10
- */
11
- import { EventEmitter } from 'events';
12
- import { SessionState } from '../state/session-state.js';
13
- import { ApplicationState } from '../state/application-state.js';
14
- export class StateManager extends EventEmitter {
15
- _applicationState;
16
- _activeSessions;
17
- constructor(initialApplicationState) {
18
- super();
19
- this._applicationState = initialApplicationState;
20
- this._activeSessions = {};
21
- }
22
- /**
23
- * 從 JSON 字串建立 StateManager 實例
24
- */
25
- static fromJSON(jsonString) {
26
- const data = JSON.parse(jsonString);
27
- const applicationState = ApplicationState.fromJSON(data.applicationState);
28
- const manager = new StateManager(applicationState);
29
- // 恢復會話狀態
30
- for (const [sessionId, sessionData] of Object.entries(data.sessions)) {
31
- const session = SessionState.fromJSON(sessionData);
32
- manager._activeSessions[sessionId] = session;
33
- }
34
- return manager;
35
- }
36
- /**
37
- * 獲取應用程式狀態
38
- */
39
- get applicationState() {
40
- return this._applicationState;
41
- }
42
- /**
43
- * 獲取活躍會話
44
- */
45
- get activeSessions() {
46
- return { ...this._activeSessions };
47
- }
48
- /**
49
- * 建立新會話
50
- */
51
- createSession(sessionId, userId) {
52
- if (this._activeSessions[sessionId]) {
53
- throw new Error(`Session with ID ${sessionId} already exists`);
54
- }
55
- const session = new SessionState(sessionId, userId);
56
- this._activeSessions[sessionId] = session;
57
- this.emit('sessionCreated', {
58
- type: 'sessionCreated',
59
- sessionId,
60
- session
61
- });
62
- return session;
63
- }
64
- /**
65
- * 獲取會話
66
- */
67
- getSession(sessionId) {
68
- return this._activeSessions[sessionId];
69
- }
70
- /**
71
- * 更新會話狀態
72
- */
73
- updateSession(sessionId, updater) {
74
- const currentSession = this._activeSessions[sessionId];
75
- if (!currentSession) {
76
- throw new Error(`Session with ID ${sessionId} not found`);
77
- }
78
- const updatedSession = updater(currentSession);
79
- this._activeSessions[sessionId] = updatedSession;
80
- this.emit('sessionUpdated', {
81
- type: 'sessionUpdated',
82
- sessionId,
83
- session: updatedSession
84
- });
85
- return updatedSession;
86
- }
87
- /**
88
- * 移除會話
89
- */
90
- removeSession(sessionId) {
91
- const session = this._activeSessions[sessionId];
92
- if (!session) {
93
- return undefined;
94
- }
95
- delete this._activeSessions[sessionId];
96
- this.emit('sessionRemoved', {
97
- type: 'sessionRemoved',
98
- sessionId,
99
- session
100
- });
101
- return session;
102
- }
103
- /**
104
- * 列出所有活躍會話
105
- */
106
- listActiveSessions() {
107
- return Object.values(this._activeSessions);
108
- }
109
- /**
110
- * 清理過期會話
111
- */
112
- cleanupExpiredSessions() {
113
- const expiredSessionIds = [];
114
- for (const [sessionId, session] of Object.entries(this._activeSessions)) {
115
- if (session.isExpired()) {
116
- expiredSessionIds.push(sessionId);
117
- }
118
- }
119
- for (const sessionId of expiredSessionIds) {
120
- this.removeSession(sessionId);
121
- }
122
- return expiredSessionIds.length;
123
- }
124
- /**
125
- * 更新應用程式狀態
126
- */
127
- updateApplicationState(updater) {
128
- const oldState = this._applicationState;
129
- const newState = updater(oldState);
130
- this._applicationState = newState;
131
- this.emit('applicationStateUpdated', {
132
- type: 'applicationStateUpdated',
133
- oldState,
134
- newState
135
- });
136
- return newState;
137
- }
138
- /**
139
- * 建立狀態快照
140
- */
141
- createSnapshot() {
142
- const sessions = {};
143
- for (const [sessionId, session] of Object.entries(this._activeSessions)) {
144
- sessions[sessionId] = session.toJSON();
145
- }
146
- return {
147
- applicationState: this._applicationState.toJSON(),
148
- sessions,
149
- timestamp: new Date()
150
- };
151
- }
152
- /**
153
- * 從快照恢復狀態
154
- */
155
- restoreFromSnapshot(snapshot) {
156
- // 恢復應用程式狀態
157
- this._applicationState = ApplicationState.fromJSON(snapshot.applicationState);
158
- // 清空現有會話
159
- this._activeSessions = {};
160
- // 恢復會話狀態
161
- for (const [sessionId, sessionData] of Object.entries(snapshot.sessions)) {
162
- const session = SessionState.fromJSON(sessionData);
163
- this._activeSessions[sessionId] = session;
164
- }
165
- }
166
- /**
167
- * 序列化為 JSON
168
- */
169
- toJSON() {
170
- return this.createSnapshot();
171
- }
172
- /**
173
- * 獲取狀態統計資訊
174
- */
175
- getStats() {
176
- const activeSessions = Object.values(this._activeSessions);
177
- const appSummary = this._applicationState.getSummary();
178
- return {
179
- totalSessions: activeSessions.length,
180
- activeSessions: activeSessions.filter(s => s.isActive).length,
181
- applicationState: appSummary
182
- };
183
- }
184
- /**
185
- * 檢查狀態健康度
186
- */
187
- checkHealth() {
188
- const stats = this.getStats();
189
- const issues = [];
190
- // 檢查會話數量
191
- if (stats.totalSessions > 1000) {
192
- issues.push(`Too many active sessions (${stats.totalSessions} > 1000)`);
193
- }
194
- // 檢查應用程式狀態有效性
195
- if (!this._applicationState.isValid()) {
196
- issues.push('Application state is invalid');
197
- }
198
- // 檢查記憶體使用情況(簡化版)
199
- const estimatedMemoryUsage = this.estimateMemoryUsage();
200
- if (estimatedMemoryUsage > 100 * 1024 * 1024) { // 100MB
201
- issues.push(`High memory usage estimated: ${Math.round(estimatedMemoryUsage / 1024 / 1024)}MB`);
202
- }
203
- // 檢查過期會話
204
- const expiredSessions = Object.values(this._activeSessions).filter(s => s.isExpired());
205
- if (expiredSessions.length > 0) {
206
- issues.push(`Found ${expiredSessions.length} expired sessions`);
207
- }
208
- return {
209
- isHealthy: issues.length === 0,
210
- issues,
211
- stats
212
- };
213
- }
214
- /**
215
- * 估算記憶體使用量(簡化版)
216
- */
217
- estimateMemoryUsage() {
218
- const jsonString = JSON.stringify(this.toJSON());
219
- return jsonString.length * 2; // 估計每個字符佔用 2 bytes
220
- }
221
- /**
222
- * 添加事件監聽器(類型安全)
223
- */
224
- on(event, listener) {
225
- return super.on(event, listener);
226
- }
227
- /**
228
- * 移除事件監聽器(類型安全)
229
- */
230
- off(event, listener) {
231
- return super.off(event, listener);
232
- }
233
- }
234
- //# sourceMappingURL=state-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state-manager.js","sourceRoot":"","sources":["../../../src/application/state/state-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,YAAY,EAAoB,MAAM,qCAAqC,CAAC;AACrF,OAAO,E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