claude-code-workflow 6.2.2 → 6.2.3

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 (346) hide show
  1. package/ccw/dist/cli.d.ts +2 -0
  2. package/ccw/dist/cli.d.ts.map +1 -0
  3. package/ccw/dist/cli.js +219 -0
  4. package/ccw/dist/cli.js.map +1 -0
  5. package/ccw/dist/commands/cli.d.ts +32 -0
  6. package/ccw/dist/commands/cli.d.ts.map +1 -0
  7. package/ccw/dist/commands/cli.js +619 -0
  8. package/ccw/dist/commands/cli.js.map +1 -0
  9. package/ccw/dist/commands/core-memory.d.ts +32 -0
  10. package/ccw/dist/commands/core-memory.d.ts.map +1 -0
  11. package/ccw/dist/commands/core-memory.js +640 -0
  12. package/ccw/dist/commands/core-memory.js.map +1 -0
  13. package/ccw/dist/commands/hook.d.ts +16 -0
  14. package/ccw/dist/commands/hook.d.ts.map +1 -0
  15. package/ccw/dist/commands/hook.js +276 -0
  16. package/ccw/dist/commands/hook.js.map +1 -0
  17. package/ccw/dist/commands/install.d.ts +12 -0
  18. package/ccw/dist/commands/install.d.ts.map +1 -0
  19. package/ccw/dist/commands/install.js +443 -0
  20. package/ccw/dist/commands/install.js.map +1 -0
  21. package/ccw/dist/commands/list.d.ts +5 -0
  22. package/ccw/dist/commands/list.d.ts.map +1 -0
  23. package/ccw/dist/commands/list.js +32 -0
  24. package/ccw/dist/commands/list.js.map +1 -0
  25. package/ccw/dist/commands/memory.d.ts +57 -0
  26. package/ccw/dist/commands/memory.d.ts.map +1 -0
  27. package/ccw/dist/commands/memory.js +890 -0
  28. package/ccw/dist/commands/memory.js.map +1 -0
  29. package/ccw/dist/commands/serve.d.ts +12 -0
  30. package/ccw/dist/commands/serve.d.ts.map +1 -0
  31. package/ccw/dist/commands/serve.js +63 -0
  32. package/ccw/dist/commands/serve.js.map +1 -0
  33. package/ccw/dist/commands/session-path-resolver.d.ts +45 -0
  34. package/ccw/dist/commands/session-path-resolver.d.ts.map +1 -0
  35. package/ccw/dist/commands/session-path-resolver.js +302 -0
  36. package/ccw/dist/commands/session-path-resolver.js.map +1 -0
  37. package/ccw/dist/commands/session.d.ts +12 -0
  38. package/ccw/dist/commands/session.d.ts.map +1 -0
  39. package/ccw/dist/commands/session.js +954 -0
  40. package/ccw/dist/commands/session.js.map +1 -0
  41. package/ccw/dist/commands/stop.d.ts +11 -0
  42. package/ccw/dist/commands/stop.d.ts.map +1 -0
  43. package/ccw/dist/commands/stop.js +96 -0
  44. package/ccw/dist/commands/stop.js.map +1 -0
  45. package/ccw/dist/commands/tool.d.ts +29 -0
  46. package/ccw/dist/commands/tool.d.ts.map +1 -0
  47. package/ccw/dist/commands/tool.js +173 -0
  48. package/ccw/dist/commands/tool.js.map +1 -0
  49. package/ccw/dist/commands/uninstall.d.ts +9 -0
  50. package/ccw/dist/commands/uninstall.d.ts.map +1 -0
  51. package/ccw/dist/commands/uninstall.js +239 -0
  52. package/ccw/dist/commands/uninstall.js.map +1 -0
  53. package/ccw/dist/commands/upgrade.d.ts +10 -0
  54. package/ccw/dist/commands/upgrade.d.ts.map +1 -0
  55. package/ccw/dist/commands/upgrade.js +288 -0
  56. package/ccw/dist/commands/upgrade.js.map +1 -0
  57. package/ccw/dist/commands/view.d.ts +14 -0
  58. package/ccw/dist/commands/view.d.ts.map +1 -0
  59. package/ccw/dist/commands/view.js +100 -0
  60. package/ccw/dist/commands/view.js.map +1 -0
  61. package/ccw/dist/config/storage-paths.d.ts +184 -0
  62. package/ccw/dist/config/storage-paths.d.ts.map +1 -0
  63. package/ccw/dist/config/storage-paths.js +536 -0
  64. package/ccw/dist/config/storage-paths.js.map +1 -0
  65. package/ccw/dist/core/cache-manager.d.ts +80 -0
  66. package/ccw/dist/core/cache-manager.d.ts.map +1 -0
  67. package/ccw/dist/core/cache-manager.js +260 -0
  68. package/ccw/dist/core/cache-manager.js.map +1 -0
  69. package/ccw/dist/core/claude-freshness.d.ts +53 -0
  70. package/ccw/dist/core/claude-freshness.d.ts.map +1 -0
  71. package/ccw/dist/core/claude-freshness.js +232 -0
  72. package/ccw/dist/core/claude-freshness.js.map +1 -0
  73. package/ccw/dist/core/core-memory-store.d.ts +320 -0
  74. package/ccw/dist/core/core-memory-store.d.ts.map +1 -0
  75. package/ccw/dist/core/core-memory-store.js +1177 -0
  76. package/ccw/dist/core/core-memory-store.js.map +1 -0
  77. package/ccw/dist/core/dashboard-generator-patch.d.ts +2 -0
  78. package/ccw/dist/core/dashboard-generator-patch.d.ts.map +1 -0
  79. package/ccw/dist/core/dashboard-generator-patch.js +48 -0
  80. package/ccw/dist/core/dashboard-generator-patch.js.map +1 -0
  81. package/ccw/dist/core/dashboard-generator.d.ts +8 -0
  82. package/ccw/dist/core/dashboard-generator.d.ts.map +1 -0
  83. package/ccw/dist/core/dashboard-generator.js +695 -0
  84. package/ccw/dist/core/dashboard-generator.js.map +1 -0
  85. package/ccw/dist/core/data-aggregator.d.ts +145 -0
  86. package/ccw/dist/core/data-aggregator.d.ts.map +1 -0
  87. package/ccw/dist/core/data-aggregator.js +416 -0
  88. package/ccw/dist/core/data-aggregator.js.map +1 -0
  89. package/ccw/dist/core/history-importer.d.ts +102 -0
  90. package/ccw/dist/core/history-importer.d.ts.map +1 -0
  91. package/ccw/dist/core/history-importer.js +493 -0
  92. package/ccw/dist/core/history-importer.js.map +1 -0
  93. package/ccw/dist/core/lite-scanner-complete.d.ts +81 -0
  94. package/ccw/dist/core/lite-scanner-complete.d.ts.map +1 -0
  95. package/ccw/dist/core/lite-scanner-complete.js +368 -0
  96. package/ccw/dist/core/lite-scanner-complete.js.map +1 -0
  97. package/ccw/dist/core/lite-scanner.d.ts +81 -0
  98. package/ccw/dist/core/lite-scanner.d.ts.map +1 -0
  99. package/ccw/dist/core/lite-scanner.js +368 -0
  100. package/ccw/dist/core/lite-scanner.js.map +1 -0
  101. package/ccw/dist/core/manifest.d.ts +88 -0
  102. package/ccw/dist/core/manifest.d.ts.map +1 -0
  103. package/ccw/dist/core/manifest.js +214 -0
  104. package/ccw/dist/core/manifest.js.map +1 -0
  105. package/ccw/dist/core/memory-embedder-bridge.d.ts +83 -0
  106. package/ccw/dist/core/memory-embedder-bridge.d.ts.map +1 -0
  107. package/ccw/dist/core/memory-embedder-bridge.js +181 -0
  108. package/ccw/dist/core/memory-embedder-bridge.js.map +1 -0
  109. package/ccw/dist/core/memory-store.d.ts +249 -0
  110. package/ccw/dist/core/memory-store.d.ts.map +1 -0
  111. package/ccw/dist/core/memory-store.js +781 -0
  112. package/ccw/dist/core/memory-store.js.map +1 -0
  113. package/ccw/dist/core/routes/ccw-routes.d.ts +20 -0
  114. package/ccw/dist/core/routes/ccw-routes.d.ts.map +1 -0
  115. package/ccw/dist/core/routes/ccw-routes.js +70 -0
  116. package/ccw/dist/core/routes/ccw-routes.js.map +1 -0
  117. package/ccw/dist/core/routes/claude-routes.d.ts +19 -0
  118. package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -0
  119. package/ccw/dist/core/routes/claude-routes.js +1017 -0
  120. package/ccw/dist/core/routes/claude-routes.js.map +1 -0
  121. package/ccw/dist/core/routes/cli-routes.d.ts +20 -0
  122. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -0
  123. package/ccw/dist/core/routes/cli-routes.js +468 -0
  124. package/ccw/dist/core/routes/cli-routes.js.map +1 -0
  125. package/ccw/dist/core/routes/codexlens-routes.d.ts +20 -0
  126. package/ccw/dist/core/routes/codexlens-routes.d.ts.map +1 -0
  127. package/ccw/dist/core/routes/codexlens-routes.js +754 -0
  128. package/ccw/dist/core/routes/codexlens-routes.js.map +1 -0
  129. package/ccw/dist/core/routes/core-memory-routes.d.ts +21 -0
  130. package/ccw/dist/core/routes/core-memory-routes.d.ts.map +1 -0
  131. package/ccw/dist/core/routes/core-memory-routes.js +520 -0
  132. package/ccw/dist/core/routes/core-memory-routes.js.map +1 -0
  133. package/ccw/dist/core/routes/files-routes.d.ts +20 -0
  134. package/ccw/dist/core/routes/files-routes.d.ts.map +1 -0
  135. package/ccw/dist/core/routes/files-routes.js +374 -0
  136. package/ccw/dist/core/routes/files-routes.js.map +1 -0
  137. package/ccw/dist/core/routes/graph-routes.d.ts +20 -0
  138. package/ccw/dist/core/routes/graph-routes.d.ts.map +1 -0
  139. package/ccw/dist/core/routes/graph-routes.js +517 -0
  140. package/ccw/dist/core/routes/graph-routes.js.map +1 -0
  141. package/ccw/dist/core/routes/help-routes.d.ts +20 -0
  142. package/ccw/dist/core/routes/help-routes.d.ts.map +1 -0
  143. package/ccw/dist/core/routes/help-routes.js +250 -0
  144. package/ccw/dist/core/routes/help-routes.js.map +1 -0
  145. package/ccw/dist/core/routes/hooks-routes.d.ts +21 -0
  146. package/ccw/dist/core/routes/hooks-routes.d.ts.map +1 -0
  147. package/ccw/dist/core/routes/hooks-routes.js +346 -0
  148. package/ccw/dist/core/routes/hooks-routes.js.map +1 -0
  149. package/ccw/dist/core/routes/mcp-routes.d.ts +20 -0
  150. package/ccw/dist/core/routes/mcp-routes.d.ts.map +1 -0
  151. package/ccw/dist/core/routes/mcp-routes.js +1129 -0
  152. package/ccw/dist/core/routes/mcp-routes.js.map +1 -0
  153. package/ccw/dist/core/routes/mcp-templates-db.d.ts +54 -0
  154. package/ccw/dist/core/routes/mcp-templates-db.d.ts.map +1 -0
  155. package/ccw/dist/core/routes/mcp-templates-db.js +226 -0
  156. package/ccw/dist/core/routes/mcp-templates-db.js.map +1 -0
  157. package/ccw/dist/core/routes/memory-routes.d.ts +21 -0
  158. package/ccw/dist/core/routes/memory-routes.d.ts.map +1 -0
  159. package/ccw/dist/core/routes/memory-routes.js +1095 -0
  160. package/ccw/dist/core/routes/memory-routes.js.map +1 -0
  161. package/ccw/dist/core/routes/rules-routes.d.ts +20 -0
  162. package/ccw/dist/core/routes/rules-routes.d.ts.map +1 -0
  163. package/ccw/dist/core/routes/rules-routes.js +442 -0
  164. package/ccw/dist/core/routes/rules-routes.js.map +1 -0
  165. package/ccw/dist/core/routes/session-routes.d.ts +20 -0
  166. package/ccw/dist/core/routes/session-routes.d.ts.map +1 -0
  167. package/ccw/dist/core/routes/session-routes.js +423 -0
  168. package/ccw/dist/core/routes/session-routes.js.map +1 -0
  169. package/ccw/dist/core/routes/skills-routes.d.ts +20 -0
  170. package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -0
  171. package/ccw/dist/core/routes/skills-routes.js +533 -0
  172. package/ccw/dist/core/routes/skills-routes.js.map +1 -0
  173. package/ccw/dist/core/routes/status-routes.d.ts +20 -0
  174. package/ccw/dist/core/routes/status-routes.d.ts.map +1 -0
  175. package/ccw/dist/core/routes/status-routes.js +38 -0
  176. package/ccw/dist/core/routes/status-routes.js.map +1 -0
  177. package/ccw/dist/core/routes/system-routes.d.ts +22 -0
  178. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -0
  179. package/ccw/dist/core/routes/system-routes.js +354 -0
  180. package/ccw/dist/core/routes/system-routes.js.map +1 -0
  181. package/ccw/dist/core/server.d.ts +17 -0
  182. package/ccw/dist/core/server.d.ts.map +1 -0
  183. package/ccw/dist/core/server.js +386 -0
  184. package/ccw/dist/core/server.js.map +1 -0
  185. package/ccw/dist/core/session-clustering-service.d.ts +153 -0
  186. package/ccw/dist/core/session-clustering-service.d.ts.map +1 -0
  187. package/ccw/dist/core/session-clustering-service.js +1065 -0
  188. package/ccw/dist/core/session-clustering-service.js.map +1 -0
  189. package/ccw/dist/core/session-scanner.d.ts +32 -0
  190. package/ccw/dist/core/session-scanner.d.ts.map +1 -0
  191. package/ccw/dist/core/session-scanner.js +253 -0
  192. package/ccw/dist/core/session-scanner.js.map +1 -0
  193. package/ccw/dist/core/websocket.d.ts +23 -0
  194. package/ccw/dist/core/websocket.d.ts.map +1 -0
  195. package/ccw/dist/core/websocket.js +168 -0
  196. package/ccw/dist/core/websocket.js.map +1 -0
  197. package/ccw/dist/index.d.ts +10 -0
  198. package/ccw/dist/index.d.ts.map +1 -0
  199. package/ccw/dist/index.js +10 -0
  200. package/ccw/dist/index.js.map +1 -0
  201. package/ccw/dist/mcp-server/index.d.ts +7 -0
  202. package/ccw/dist/mcp-server/index.d.ts.map +1 -0
  203. package/ccw/dist/mcp-server/index.js +157 -0
  204. package/ccw/dist/mcp-server/index.js.map +1 -0
  205. package/ccw/dist/tools/classify-folders.d.ts +26 -0
  206. package/ccw/dist/tools/classify-folders.d.ts.map +1 -0
  207. package/ccw/dist/tools/classify-folders.js +201 -0
  208. package/ccw/dist/tools/classify-folders.js.map +1 -0
  209. package/ccw/dist/tools/cli-config-manager.d.ts +62 -0
  210. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -0
  211. package/ccw/dist/tools/cli-config-manager.js +221 -0
  212. package/ccw/dist/tools/cli-config-manager.js.map +1 -0
  213. package/ccw/dist/tools/cli-executor.d.ts +373 -0
  214. package/ccw/dist/tools/cli-executor.d.ts.map +1 -0
  215. package/ccw/dist/tools/cli-executor.js +1625 -0
  216. package/ccw/dist/tools/cli-executor.js.map +1 -0
  217. package/ccw/dist/tools/cli-history-store.d.ts +330 -0
  218. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -0
  219. package/ccw/dist/tools/cli-history-store.js +916 -0
  220. package/ccw/dist/tools/cli-history-store.js.map +1 -0
  221. package/ccw/dist/tools/codex-lens.d.ts +118 -0
  222. package/ccw/dist/tools/codex-lens.d.ts.map +1 -0
  223. package/ccw/dist/tools/codex-lens.js +962 -0
  224. package/ccw/dist/tools/codex-lens.js.map +1 -0
  225. package/ccw/dist/tools/convert-tokens-to-css.d.ts +14 -0
  226. package/ccw/dist/tools/convert-tokens-to-css.d.ts.map +1 -0
  227. package/ccw/dist/tools/convert-tokens-to-css.js +244 -0
  228. package/ccw/dist/tools/convert-tokens-to-css.js.map +1 -0
  229. package/ccw/dist/tools/core-memory.d.ts +66 -0
  230. package/ccw/dist/tools/core-memory.d.ts.map +1 -0
  231. package/ccw/dist/tools/core-memory.js +324 -0
  232. package/ccw/dist/tools/core-memory.js.map +1 -0
  233. package/ccw/dist/tools/detect-changed-modules.d.ts +24 -0
  234. package/ccw/dist/tools/detect-changed-modules.d.ts.map +1 -0
  235. package/ccw/dist/tools/detect-changed-modules.js +277 -0
  236. package/ccw/dist/tools/detect-changed-modules.js.map +1 -0
  237. package/ccw/dist/tools/discover-design-files.d.ts +36 -0
  238. package/ccw/dist/tools/discover-design-files.d.ts.map +1 -0
  239. package/ccw/dist/tools/discover-design-files.js +147 -0
  240. package/ccw/dist/tools/discover-design-files.js.map +1 -0
  241. package/ccw/dist/tools/edit-file.d.ts +28 -0
  242. package/ccw/dist/tools/edit-file.d.ts.map +1 -0
  243. package/ccw/dist/tools/edit-file.js +479 -0
  244. package/ccw/dist/tools/edit-file.js.map +1 -0
  245. package/ccw/dist/tools/generate-module-docs.d.ts +22 -0
  246. package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -0
  247. package/ccw/dist/tools/generate-module-docs.js +379 -0
  248. package/ccw/dist/tools/generate-module-docs.js.map +1 -0
  249. package/ccw/dist/tools/get-modules-by-depth.d.ts +15 -0
  250. package/ccw/dist/tools/get-modules-by-depth.d.ts.map +1 -0
  251. package/ccw/dist/tools/get-modules-by-depth.js +296 -0
  252. package/ccw/dist/tools/get-modules-by-depth.js.map +1 -0
  253. package/ccw/dist/tools/index.d.ts +55 -0
  254. package/ccw/dist/tools/index.d.ts.map +1 -0
  255. package/ccw/dist/tools/index.js +304 -0
  256. package/ccw/dist/tools/index.js.map +1 -0
  257. package/ccw/dist/tools/native-session-discovery.d.ts +97 -0
  258. package/ccw/dist/tools/native-session-discovery.d.ts.map +1 -0
  259. package/ccw/dist/tools/native-session-discovery.js +700 -0
  260. package/ccw/dist/tools/native-session-discovery.js.map +1 -0
  261. package/ccw/dist/tools/notifier.d.ts +50 -0
  262. package/ccw/dist/tools/notifier.d.ts.map +1 -0
  263. package/ccw/dist/tools/notifier.js +90 -0
  264. package/ccw/dist/tools/notifier.js.map +1 -0
  265. package/ccw/dist/tools/read-file.d.ts +32 -0
  266. package/ccw/dist/tools/read-file.d.ts.map +1 -0
  267. package/ccw/dist/tools/read-file.js +329 -0
  268. package/ccw/dist/tools/read-file.js.map +1 -0
  269. package/ccw/dist/tools/resume-strategy.d.ts +48 -0
  270. package/ccw/dist/tools/resume-strategy.d.ts.map +1 -0
  271. package/ccw/dist/tools/resume-strategy.js +248 -0
  272. package/ccw/dist/tools/resume-strategy.js.map +1 -0
  273. package/ccw/dist/tools/session-content-parser.d.ts +58 -0
  274. package/ccw/dist/tools/session-content-parser.d.ts.map +1 -0
  275. package/ccw/dist/tools/session-content-parser.js +420 -0
  276. package/ccw/dist/tools/session-content-parser.js.map +1 -0
  277. package/ccw/dist/tools/session-manager.d.ts +9 -0
  278. package/ccw/dist/tools/session-manager.d.ts.map +1 -0
  279. package/ccw/dist/tools/session-manager.js +834 -0
  280. package/ccw/dist/tools/session-manager.js.map +1 -0
  281. package/ccw/dist/tools/smart-context.d.ts +35 -0
  282. package/ccw/dist/tools/smart-context.d.ts.map +1 -0
  283. package/ccw/dist/tools/smart-context.js +182 -0
  284. package/ccw/dist/tools/smart-context.js.map +1 -0
  285. package/ccw/dist/tools/smart-search.d.ts +105 -0
  286. package/ccw/dist/tools/smart-search.d.ts.map +1 -0
  287. package/ccw/dist/tools/smart-search.js +1753 -0
  288. package/ccw/dist/tools/smart-search.js.map +1 -0
  289. package/ccw/dist/tools/storage-manager.d.ts +114 -0
  290. package/ccw/dist/tools/storage-manager.d.ts.map +1 -0
  291. package/ccw/dist/tools/storage-manager.js +392 -0
  292. package/ccw/dist/tools/storage-manager.js.map +1 -0
  293. package/ccw/dist/tools/ui-generate-preview.d.ts +39 -0
  294. package/ccw/dist/tools/ui-generate-preview.d.ts.map +1 -0
  295. package/ccw/dist/tools/ui-generate-preview.js +300 -0
  296. package/ccw/dist/tools/ui-generate-preview.js.map +1 -0
  297. package/ccw/dist/tools/ui-instantiate-prototypes.d.ts +75 -0
  298. package/ccw/dist/tools/ui-instantiate-prototypes.d.ts.map +1 -0
  299. package/ccw/dist/tools/ui-instantiate-prototypes.js +256 -0
  300. package/ccw/dist/tools/ui-instantiate-prototypes.js.map +1 -0
  301. package/ccw/dist/tools/update-module-claude.d.ts +80 -0
  302. package/ccw/dist/tools/update-module-claude.d.ts.map +1 -0
  303. package/ccw/dist/tools/update-module-claude.js +351 -0
  304. package/ccw/dist/tools/update-module-claude.js.map +1 -0
  305. package/ccw/dist/tools/write-file.d.ts +19 -0
  306. package/ccw/dist/tools/write-file.d.ts.map +1 -0
  307. package/ccw/dist/tools/write-file.js +193 -0
  308. package/ccw/dist/tools/write-file.js.map +1 -0
  309. package/ccw/dist/types/config.d.ts +11 -0
  310. package/ccw/dist/types/config.d.ts.map +1 -0
  311. package/ccw/dist/types/config.js +2 -0
  312. package/ccw/dist/types/config.js.map +1 -0
  313. package/ccw/dist/types/index.d.ts +4 -0
  314. package/ccw/dist/types/index.d.ts.map +1 -0
  315. package/ccw/dist/types/index.js +4 -0
  316. package/ccw/dist/types/index.js.map +1 -0
  317. package/ccw/dist/types/session.d.ts +20 -0
  318. package/ccw/dist/types/session.d.ts.map +1 -0
  319. package/ccw/dist/types/session.js +2 -0
  320. package/ccw/dist/types/session.js.map +1 -0
  321. package/ccw/dist/types/tool.d.ts +36 -0
  322. package/ccw/dist/types/tool.d.ts.map +1 -0
  323. package/ccw/dist/types/tool.js +11 -0
  324. package/ccw/dist/types/tool.js.map +1 -0
  325. package/ccw/dist/utils/browser-launcher.d.ts +13 -0
  326. package/ccw/dist/utils/browser-launcher.d.ts.map +1 -0
  327. package/ccw/dist/utils/browser-launcher.js +60 -0
  328. package/ccw/dist/utils/browser-launcher.js.map +1 -0
  329. package/ccw/dist/utils/file-utils.d.ts +25 -0
  330. package/ccw/dist/utils/file-utils.d.ts.map +1 -0
  331. package/ccw/dist/utils/file-utils.js +48 -0
  332. package/ccw/dist/utils/file-utils.js.map +1 -0
  333. package/ccw/dist/utils/path-resolver.d.ts +80 -0
  334. package/ccw/dist/utils/path-resolver.d.ts.map +1 -0
  335. package/ccw/dist/utils/path-resolver.js +260 -0
  336. package/ccw/dist/utils/path-resolver.js.map +1 -0
  337. package/ccw/dist/utils/path-validator.d.ts +49 -0
  338. package/ccw/dist/utils/path-validator.d.ts.map +1 -0
  339. package/ccw/dist/utils/path-validator.js +123 -0
  340. package/ccw/dist/utils/path-validator.js.map +1 -0
  341. package/ccw/dist/utils/ui.d.ts +62 -0
  342. package/ccw/dist/utils/ui.d.ts.map +1 -0
  343. package/ccw/dist/utils/ui.js +129 -0
  344. package/ccw/dist/utils/ui.js.map +1 -0
  345. package/ccw/package.json +1 -1
  346. package/package.json +1 -1
@@ -0,0 +1,640 @@
1
+ /**
2
+ * Core Memory Command - Simplified CLI for core memory management
3
+ * Commands: list, import, export, summary, projects, cluster
4
+ */
5
+ import chalk from 'chalk';
6
+ import { getCoreMemoryStore, listAllProjects, getMemoriesFromProject, importMemories } from '../core/core-memory-store.js';
7
+ import { notifyRefreshRequired } from '../tools/notifier.js';
8
+ /**
9
+ * Get project path from current working directory
10
+ */
11
+ function getProjectPath() {
12
+ return process.cwd();
13
+ }
14
+ /**
15
+ * List all memories
16
+ */
17
+ async function listAction() {
18
+ try {
19
+ const store = getCoreMemoryStore(getProjectPath());
20
+ const memories = store.getMemories({ limit: 100 });
21
+ console.log(chalk.bold.cyan('\n Core Memories\n'));
22
+ if (memories.length === 0) {
23
+ console.log(chalk.yellow(' No memories found\n'));
24
+ return;
25
+ }
26
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
27
+ for (const memory of memories) {
28
+ const date = new Date(memory.updated_at).toLocaleString();
29
+ const archived = memory.archived ? chalk.gray(' [archived]') : '';
30
+ console.log(chalk.cyan(` ${memory.id}`) + archived);
31
+ console.log(chalk.white(` ${memory.summary || memory.content.substring(0, 80)}${memory.content.length > 80 ? '...' : ''}`));
32
+ console.log(chalk.gray(` Updated: ${date}`));
33
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
34
+ }
35
+ console.log(chalk.gray(`\n Total: ${memories.length}\n`));
36
+ }
37
+ catch (error) {
38
+ console.error(chalk.red(`Error: ${error.message}`));
39
+ process.exit(1);
40
+ }
41
+ }
42
+ /**
43
+ * Import text as a new memory
44
+ */
45
+ async function importAction(text) {
46
+ if (!text || text.trim() === '') {
47
+ console.error(chalk.red('Error: Text content is required'));
48
+ console.error(chalk.gray('Usage: ccw core-memory import "your text content here"'));
49
+ process.exit(1);
50
+ }
51
+ try {
52
+ const store = getCoreMemoryStore(getProjectPath());
53
+ const memory = store.upsertMemory({
54
+ content: text.trim()
55
+ });
56
+ console.log(chalk.green(`✓ Created memory: ${memory.id}`));
57
+ // Notify dashboard
58
+ notifyRefreshRequired('memory').catch(() => { });
59
+ }
60
+ catch (error) {
61
+ console.error(chalk.red(`Error: ${error.message}`));
62
+ process.exit(1);
63
+ }
64
+ }
65
+ /**
66
+ * Export a memory as plain text (searches all projects if not found locally)
67
+ */
68
+ async function exportAction(options) {
69
+ const { id } = options;
70
+ if (!id) {
71
+ console.error(chalk.red('Error: --id is required'));
72
+ console.error(chalk.gray('Usage: ccw core-memory export --id <id>'));
73
+ process.exit(1);
74
+ }
75
+ try {
76
+ // First try current project
77
+ const store = getCoreMemoryStore(getProjectPath());
78
+ let memory = store.getMemory(id);
79
+ // If not found, search all projects
80
+ if (!memory) {
81
+ const projects = listAllProjects();
82
+ for (const project of projects) {
83
+ try {
84
+ const memories = getMemoriesFromProject(project.id);
85
+ const found = memories.find(m => m.id === id);
86
+ if (found) {
87
+ memory = found;
88
+ console.error(chalk.gray(`Found in project: ${project.id}`));
89
+ break;
90
+ }
91
+ }
92
+ catch {
93
+ // Skip projects that can't be read
94
+ }
95
+ }
96
+ }
97
+ if (!memory) {
98
+ console.error(chalk.red(`Error: Memory "${id}" not found in any project`));
99
+ process.exit(1);
100
+ }
101
+ // Output plain text content
102
+ console.log(memory.content);
103
+ }
104
+ catch (error) {
105
+ console.error(chalk.red(`Error: ${error.message}`));
106
+ process.exit(1);
107
+ }
108
+ }
109
+ /**
110
+ * List all projects with their memory counts
111
+ */
112
+ async function projectsAction(options) {
113
+ try {
114
+ const projects = listAllProjects();
115
+ if (options.json) {
116
+ console.log(JSON.stringify(projects, null, 2));
117
+ return;
118
+ }
119
+ console.log(chalk.bold.cyan('\n All CCW Projects\n'));
120
+ if (projects.length === 0) {
121
+ console.log(chalk.yellow(' No projects found\n'));
122
+ return;
123
+ }
124
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
125
+ for (const project of projects) {
126
+ const hasData = project.memoriesCount > 0 || project.clustersCount > 0;
127
+ const icon = hasData ? '●' : '○';
128
+ const color = hasData ? chalk.cyan : chalk.gray;
129
+ console.log(color(` ${icon} ${project.id}`));
130
+ console.log(chalk.white(` Path: ${project.path}`));
131
+ console.log(chalk.white(` Memories: ${project.memoriesCount} | Clusters: ${project.clustersCount}`));
132
+ if (project.lastUpdated) {
133
+ console.log(chalk.gray(` Last updated: ${new Date(project.lastUpdated).toLocaleString()}`));
134
+ }
135
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
136
+ }
137
+ console.log(chalk.gray(`\n Total: ${projects.length} projects\n`));
138
+ }
139
+ catch (error) {
140
+ console.error(chalk.red(`Error: ${error.message}`));
141
+ process.exit(1);
142
+ }
143
+ }
144
+ /**
145
+ * Import memories from file or another project
146
+ */
147
+ async function importFromAction(source, options) {
148
+ if (!source) {
149
+ console.error(chalk.red('Error: Source is required'));
150
+ console.error(chalk.gray('Usage: ccw core-memory import-from <source>'));
151
+ console.error(chalk.gray(' source: file.json or project-id'));
152
+ process.exit(1);
153
+ }
154
+ try {
155
+ const result = importMemories(getProjectPath(), source, {
156
+ overwrite: options.overwrite,
157
+ prefix: options.prefix
158
+ });
159
+ console.log(chalk.green(`✓ Import complete`));
160
+ console.log(chalk.white(` Imported: ${result.imported}`));
161
+ console.log(chalk.white(` Skipped: ${result.skipped} (already exist)`));
162
+ if (result.imported > 0) {
163
+ notifyRefreshRequired('memory').catch(() => { });
164
+ }
165
+ }
166
+ catch (error) {
167
+ console.error(chalk.red(`Error: ${error.message}`));
168
+ process.exit(1);
169
+ }
170
+ }
171
+ /**
172
+ * List memories from another project
173
+ */
174
+ async function listFromAction(projectId, options) {
175
+ if (!projectId) {
176
+ console.error(chalk.red('Error: Project ID is required'));
177
+ console.error(chalk.gray('Usage: ccw core-memory list-from <project-id>'));
178
+ console.error(chalk.gray(' Use "ccw core-memory projects" to see available projects'));
179
+ process.exit(1);
180
+ }
181
+ try {
182
+ const memories = getMemoriesFromProject(projectId);
183
+ if (options.json) {
184
+ console.log(JSON.stringify(memories, null, 2));
185
+ return;
186
+ }
187
+ console.log(chalk.bold.cyan(`\n Memories from ${projectId}\n`));
188
+ if (memories.length === 0) {
189
+ console.log(chalk.yellow(' No memories found\n'));
190
+ return;
191
+ }
192
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
193
+ for (const memory of memories) {
194
+ const date = new Date(memory.updated_at).toLocaleString();
195
+ const archived = memory.archived ? chalk.gray(' [archived]') : '';
196
+ console.log(chalk.cyan(` ${memory.id}`) + archived);
197
+ console.log(chalk.white(` ${memory.summary || memory.content.substring(0, 80)}${memory.content.length > 80 ? '...' : ''}`));
198
+ console.log(chalk.gray(` Updated: ${date}`));
199
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
200
+ }
201
+ console.log(chalk.gray(`\n Total: ${memories.length}\n`));
202
+ }
203
+ catch (error) {
204
+ console.error(chalk.red(`Error: ${error.message}`));
205
+ process.exit(1);
206
+ }
207
+ }
208
+ /**
209
+ * Generate summary for a memory
210
+ */
211
+ async function summaryAction(options) {
212
+ const { id, tool = 'gemini' } = options;
213
+ if (!id) {
214
+ console.error(chalk.red('Error: --id is required'));
215
+ console.error(chalk.gray('Usage: ccw core-memory summary --id <id> [--tool gemini|qwen]'));
216
+ process.exit(1);
217
+ }
218
+ try {
219
+ const store = getCoreMemoryStore(getProjectPath());
220
+ const memory = store.getMemory(id);
221
+ if (!memory) {
222
+ console.error(chalk.red(`Error: Memory "${id}" not found`));
223
+ process.exit(1);
224
+ }
225
+ console.log(chalk.cyan(`Generating summary using ${tool}...`));
226
+ const summary = await store.generateSummary(id, tool);
227
+ console.log(chalk.green('\n✓ Summary generated:\n'));
228
+ console.log(chalk.white(` ${summary}\n`));
229
+ // Notify dashboard
230
+ notifyRefreshRequired('memory').catch(() => { });
231
+ }
232
+ catch (error) {
233
+ console.error(chalk.red(`Error: ${error.message}`));
234
+ process.exit(1);
235
+ }
236
+ }
237
+ /**
238
+ * List all clusters
239
+ */
240
+ async function clustersAction(options) {
241
+ try {
242
+ const store = getCoreMemoryStore(getProjectPath());
243
+ const clusters = store.listClusters(options.status);
244
+ if (options.json) {
245
+ console.log(JSON.stringify(clusters, null, 2));
246
+ return;
247
+ }
248
+ if (clusters.length === 0) {
249
+ console.log(chalk.yellow('\n No clusters found. Run "ccw core-memory cluster --auto" to create clusters.\n'));
250
+ return;
251
+ }
252
+ console.log(chalk.bold.cyan('\n 📦 Session Clusters\n'));
253
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
254
+ for (const cluster of clusters) {
255
+ const members = store.getClusterMembers(cluster.id);
256
+ console.log(chalk.cyan(` ● ${cluster.name}`) + chalk.gray(` (${cluster.id})`));
257
+ console.log(chalk.white(` Status: ${cluster.status} | Sessions: ${members.length}`));
258
+ console.log(chalk.gray(` Updated: ${cluster.updated_at}`));
259
+ if (cluster.intent)
260
+ console.log(chalk.white(` Intent: ${cluster.intent}`));
261
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
262
+ }
263
+ console.log(chalk.gray(`\n Total: ${clusters.length}\n`));
264
+ }
265
+ catch (error) {
266
+ console.error(chalk.red(`Error: ${error.message}`));
267
+ process.exit(1);
268
+ }
269
+ }
270
+ /**
271
+ * View cluster details or create new cluster
272
+ */
273
+ async function clusterAction(clusterId, options) {
274
+ try {
275
+ const store = getCoreMemoryStore(getProjectPath());
276
+ // Auto clustering
277
+ if (options.auto) {
278
+ const { SessionClusteringService } = await import('../core/session-clustering-service.js');
279
+ const service = new SessionClusteringService(getProjectPath());
280
+ console.log(chalk.cyan('🔄 Running auto-clustering...'));
281
+ const scope = options.scope === 'all' || options.scope === 'recent' || options.scope === 'unclustered'
282
+ ? options.scope
283
+ : 'recent';
284
+ const result = await service.autocluster({ scope });
285
+ console.log(chalk.green(`✓ Created ${result.clustersCreated} clusters`));
286
+ console.log(chalk.white(` Processed ${result.sessionsProcessed} sessions`));
287
+ console.log(chalk.white(` Clustered ${result.sessionsClustered} sessions`));
288
+ // Notify dashboard
289
+ notifyRefreshRequired('memory').catch(() => { });
290
+ return;
291
+ }
292
+ // Deduplicate clusters
293
+ if (options.dedup) {
294
+ const { SessionClusteringService } = await import('../core/session-clustering-service.js');
295
+ const service = new SessionClusteringService(getProjectPath());
296
+ console.log(chalk.cyan('🔄 Deduplicating clusters...'));
297
+ const result = await service.deduplicateClusters();
298
+ console.log(chalk.green(`✓ Deduplication complete`));
299
+ console.log(chalk.white(` Merged: ${result.merged} clusters`));
300
+ console.log(chalk.white(` Deleted: ${result.deleted} empty clusters`));
301
+ console.log(chalk.white(` Remaining: ${result.remaining} clusters`));
302
+ // Notify dashboard
303
+ notifyRefreshRequired('memory').catch(() => { });
304
+ return;
305
+ }
306
+ // Delete cluster
307
+ if (options.delete && clusterId) {
308
+ const cluster = store.getCluster(clusterId);
309
+ if (!cluster) {
310
+ console.error(chalk.red(`Cluster not found: ${clusterId}`));
311
+ process.exit(1);
312
+ }
313
+ const deleted = store.deleteCluster(clusterId);
314
+ if (deleted) {
315
+ console.log(chalk.green(`✓ Deleted cluster: ${clusterId}`));
316
+ notifyRefreshRequired('memory').catch(() => { });
317
+ }
318
+ else {
319
+ console.error(chalk.red(`Failed to delete cluster: ${clusterId}`));
320
+ process.exit(1);
321
+ }
322
+ return;
323
+ }
324
+ // Merge clusters
325
+ if (options.merge && clusterId) {
326
+ const targetCluster = store.getCluster(clusterId);
327
+ if (!targetCluster) {
328
+ console.error(chalk.red(`Target cluster not found: ${clusterId}`));
329
+ process.exit(1);
330
+ }
331
+ const sourceIds = options.merge.split(',').map(s => s.trim());
332
+ console.log(chalk.cyan(`🔄 Merging ${sourceIds.length} clusters into ${clusterId}...`));
333
+ try {
334
+ const membersMoved = store.mergeClusters(clusterId, sourceIds);
335
+ console.log(chalk.green(`✓ Merged successfully`));
336
+ console.log(chalk.white(` Members moved: ${membersMoved}`));
337
+ console.log(chalk.white(` Clusters deleted: ${sourceIds.length}`));
338
+ notifyRefreshRequired('memory').catch(() => { });
339
+ }
340
+ catch (error) {
341
+ console.error(chalk.red(`Failed to merge: ${error.message}`));
342
+ process.exit(1);
343
+ }
344
+ return;
345
+ }
346
+ // Create new cluster
347
+ if (options.create) {
348
+ if (!options.name) {
349
+ console.error(chalk.red('Error: --name is required for --create'));
350
+ process.exit(1);
351
+ }
352
+ const cluster = store.createCluster({ name: options.name });
353
+ console.log(chalk.green(`✓ Created cluster: ${cluster.id}`));
354
+ // Add members if specified
355
+ if (options.members) {
356
+ const memberIds = options.members.split(',').map(s => s.trim());
357
+ for (const memberId of memberIds) {
358
+ // Detect session type from ID
359
+ let sessionType = 'core_memory';
360
+ if (memberId.startsWith('WFS-'))
361
+ sessionType = 'workflow';
362
+ else if (memberId.includes('-gemini') || memberId.includes('-qwen') || memberId.includes('-codex')) {
363
+ sessionType = 'cli_history';
364
+ }
365
+ store.addClusterMember({
366
+ cluster_id: cluster.id,
367
+ session_id: memberId,
368
+ session_type: sessionType,
369
+ sequence_order: memberIds.indexOf(memberId) + 1,
370
+ relevance_score: 1.0
371
+ });
372
+ }
373
+ console.log(chalk.white(` Added ${memberIds.length} members`));
374
+ }
375
+ // Notify dashboard
376
+ notifyRefreshRequired('memory').catch(() => { });
377
+ return;
378
+ }
379
+ // View cluster details
380
+ if (clusterId) {
381
+ const cluster = store.getCluster(clusterId);
382
+ if (!cluster) {
383
+ console.error(chalk.red(`Cluster not found: ${clusterId}`));
384
+ process.exit(1);
385
+ }
386
+ const members = store.getClusterMembers(clusterId);
387
+ const relations = store.getClusterRelations(clusterId);
388
+ console.log(chalk.bold.cyan(`\n 📦 Cluster: ${cluster.name}\n`));
389
+ console.log(chalk.white(` ID: ${cluster.id}`));
390
+ console.log(chalk.white(` Status: ${cluster.status}`));
391
+ if (cluster.description)
392
+ console.log(chalk.white(` Description: ${cluster.description}`));
393
+ if (cluster.intent)
394
+ console.log(chalk.white(` Intent: ${cluster.intent}`));
395
+ if (members.length > 0) {
396
+ console.log(chalk.bold.white('\n 📋 Sessions:'));
397
+ for (const member of members) {
398
+ const meta = store.getSessionMetadata(member.session_id);
399
+ console.log(chalk.cyan(` ${member.sequence_order}. ${member.session_id}`) + chalk.gray(` (${member.session_type})`));
400
+ if (meta?.title)
401
+ console.log(chalk.white(` ${meta.title}`));
402
+ if (meta?.token_estimate)
403
+ console.log(chalk.gray(` ~${meta.token_estimate} tokens`));
404
+ }
405
+ }
406
+ if (relations.length > 0) {
407
+ console.log(chalk.bold.white('\n 🔗 Relations:'));
408
+ for (const rel of relations) {
409
+ console.log(chalk.white(` → ${rel.relation_type} ${rel.target_cluster_id}`));
410
+ }
411
+ }
412
+ console.log();
413
+ return;
414
+ }
415
+ // No action specified - show usage
416
+ console.log(chalk.yellow('Usage: ccw core-memory cluster <id> or --auto or --create --name <name>'));
417
+ }
418
+ catch (error) {
419
+ console.error(chalk.red(`Error: ${error.message}`));
420
+ process.exit(1);
421
+ }
422
+ }
423
+ /**
424
+ * Get progressive disclosure context
425
+ */
426
+ async function contextAction(options) {
427
+ try {
428
+ const { SessionClusteringService } = await import('../core/session-clustering-service.js');
429
+ const service = new SessionClusteringService(getProjectPath());
430
+ // Default to session-start for CLI usage
431
+ const index = await service.getProgressiveIndex({
432
+ type: 'session-start'
433
+ });
434
+ if (options.format === 'json') {
435
+ console.log(JSON.stringify({ index }, null, 2));
436
+ }
437
+ else {
438
+ console.log(index);
439
+ }
440
+ }
441
+ catch (error) {
442
+ console.error(chalk.red(`Error: ${error.message}`));
443
+ process.exit(1);
444
+ }
445
+ }
446
+ /**
447
+ * Load cluster context
448
+ */
449
+ async function loadClusterAction(clusterId, options) {
450
+ if (!clusterId) {
451
+ console.error(chalk.red('Error: Cluster ID is required'));
452
+ console.error(chalk.gray('Usage: ccw core-memory load-cluster <id> [--level metadata|keyFiles|full]'));
453
+ process.exit(1);
454
+ }
455
+ try {
456
+ const store = getCoreMemoryStore(getProjectPath());
457
+ const cluster = store.getCluster(clusterId);
458
+ if (!cluster) {
459
+ console.error(chalk.red(`Cluster not found: ${clusterId}`));
460
+ process.exit(1);
461
+ }
462
+ const members = store.getClusterMembers(clusterId);
463
+ const level = options.level || 'metadata';
464
+ console.log(chalk.bold.cyan(`\n# Cluster: ${cluster.name}\n`));
465
+ if (cluster.intent)
466
+ console.log(chalk.white(`Intent: ${cluster.intent}\n`));
467
+ console.log(chalk.bold.white('## Sessions\n'));
468
+ for (const member of members) {
469
+ const meta = store.getSessionMetadata(member.session_id);
470
+ console.log(chalk.bold.cyan(`### ${member.sequence_order}. ${member.session_id}`));
471
+ console.log(chalk.white(`Type: ${member.session_type}`));
472
+ if (meta) {
473
+ if (meta.title)
474
+ console.log(chalk.white(`Title: ${meta.title}`));
475
+ if (level === 'metadata') {
476
+ if (meta.summary)
477
+ console.log(chalk.white(`Summary: ${meta.summary}`));
478
+ }
479
+ else if (level === 'keyFiles' || level === 'full') {
480
+ if (meta.summary)
481
+ console.log(chalk.white(`Summary: ${meta.summary}`));
482
+ if (meta.file_patterns) {
483
+ const patterns = JSON.parse(meta.file_patterns);
484
+ console.log(chalk.white(`Files: ${patterns.join(', ')}`));
485
+ }
486
+ if (meta.keywords) {
487
+ const keywords = JSON.parse(meta.keywords);
488
+ console.log(chalk.white(`Keywords: ${keywords.join(', ')}`));
489
+ }
490
+ }
491
+ if (level === 'full') {
492
+ // Load full content based on session type
493
+ if (member.session_type === 'core_memory') {
494
+ const memory = store.getMemory(member.session_id);
495
+ if (memory) {
496
+ console.log(chalk.white('\nContent:'));
497
+ console.log(chalk.gray(memory.content));
498
+ }
499
+ }
500
+ }
501
+ }
502
+ console.log();
503
+ }
504
+ }
505
+ catch (error) {
506
+ console.error(chalk.red(`Error: ${error.message}`));
507
+ process.exit(1);
508
+ }
509
+ }
510
+ /**
511
+ * Search sessions by keyword
512
+ */
513
+ async function searchAction(keyword, options) {
514
+ if (!keyword || keyword.trim() === '') {
515
+ console.error(chalk.red('Error: Keyword is required'));
516
+ console.error(chalk.gray('Usage: ccw core-memory search <keyword> [--type core|workflow|cli|all]'));
517
+ process.exit(1);
518
+ }
519
+ try {
520
+ const store = getCoreMemoryStore(getProjectPath());
521
+ const results = store.searchSessionsByKeyword(keyword);
522
+ if (results.length === 0) {
523
+ console.log(chalk.yellow(`\n No sessions found for: "${keyword}"\n`));
524
+ return;
525
+ }
526
+ // Filter by type if specified
527
+ let filtered = results;
528
+ if (options.type && options.type !== 'all') {
529
+ const typeMap = {
530
+ core: 'core_memory',
531
+ workflow: 'workflow',
532
+ cli: 'cli_history'
533
+ };
534
+ filtered = results.filter(r => r.session_type === typeMap[options.type]);
535
+ }
536
+ console.log(chalk.bold.cyan(`\n 🔍 Found ${filtered.length} sessions for "${keyword}"\n`));
537
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
538
+ for (const result of filtered) {
539
+ console.log(chalk.cyan(` ● ${result.session_id}`) + chalk.gray(` (${result.session_type})`));
540
+ if (result.title)
541
+ console.log(chalk.white(` ${result.title}`));
542
+ if (result.token_estimate)
543
+ console.log(chalk.gray(` ~${result.token_estimate} tokens`));
544
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────────────'));
545
+ }
546
+ console.log();
547
+ }
548
+ catch (error) {
549
+ console.error(chalk.red(`Error: ${error.message}`));
550
+ process.exit(1);
551
+ }
552
+ }
553
+ /**
554
+ * Core Memory command entry point
555
+ */
556
+ export async function coreMemoryCommand(subcommand, args, options) {
557
+ const argsArray = Array.isArray(args) ? args : (args ? [args] : []);
558
+ const textArg = argsArray.join(' ');
559
+ switch (subcommand) {
560
+ case 'list':
561
+ await listAction();
562
+ break;
563
+ case 'import':
564
+ await importAction(textArg);
565
+ break;
566
+ case 'export':
567
+ await exportAction(options);
568
+ break;
569
+ case 'summary':
570
+ await summaryAction(options);
571
+ break;
572
+ case 'clusters':
573
+ await clustersAction(options);
574
+ break;
575
+ case 'cluster':
576
+ await clusterAction(argsArray[0], options);
577
+ break;
578
+ case 'context':
579
+ await contextAction(options);
580
+ break;
581
+ case 'load-cluster':
582
+ await loadClusterAction(textArg, options);
583
+ break;
584
+ case 'search':
585
+ await searchAction(textArg, options);
586
+ break;
587
+ case 'projects':
588
+ await projectsAction(options);
589
+ break;
590
+ case 'import-from':
591
+ await importFromAction(textArg, options);
592
+ break;
593
+ case 'list-from':
594
+ await listFromAction(textArg, options);
595
+ break;
596
+ default:
597
+ console.log(chalk.bold.cyan('\n CCW Core Memory\n'));
598
+ console.log(' Manage core memory entries and session clusters.\n');
599
+ console.log(chalk.bold(' Basic Commands:'));
600
+ console.log(chalk.white(' list ') + chalk.gray('List all memories'));
601
+ console.log(chalk.white(' import "<text>" ') + chalk.gray('Import text as new memory'));
602
+ console.log(chalk.white(' export --id <id> ') + chalk.gray('Export memory (searches all projects)'));
603
+ console.log(chalk.white(' summary --id <id> ') + chalk.gray('Generate AI summary'));
604
+ console.log();
605
+ console.log(chalk.bold(' Cross-Workspace Commands:'));
606
+ console.log(chalk.white(' projects ') + chalk.gray('List all CCW projects'));
607
+ console.log(chalk.white(' list-from <project-id> ') + chalk.gray('List memories from another project'));
608
+ console.log();
609
+ console.log(chalk.bold(' Clustering Commands:'));
610
+ console.log(chalk.white(' clusters [--status] ') + chalk.gray('List all clusters'));
611
+ console.log(chalk.white(' cluster [id] ') + chalk.gray('View cluster details'));
612
+ console.log(chalk.white(' cluster --auto ') + chalk.gray('Run auto-clustering'));
613
+ console.log(chalk.white(' cluster --dedup ') + chalk.gray('Deduplicate similar clusters'));
614
+ console.log(chalk.white(' cluster <id> --delete ') + chalk.gray('Delete a cluster'));
615
+ console.log(chalk.white(' cluster <id> --merge <ids> ') + chalk.gray('Merge clusters into target'));
616
+ console.log(chalk.white(' cluster --create --name ') + chalk.gray('Create new cluster'));
617
+ console.log(chalk.white(' context ') + chalk.gray('Get progressive index'));
618
+ console.log(chalk.white(' load-cluster <id> ') + chalk.gray('Load cluster context'));
619
+ console.log(chalk.white(' search <keyword> ') + chalk.gray('Search sessions'));
620
+ console.log();
621
+ console.log(chalk.bold(' Options:'));
622
+ console.log(chalk.gray(' --id <id> Memory ID (for export/summary)'));
623
+ console.log(chalk.gray(' --tool gemini|qwen AI tool for summary (default: gemini)'));
624
+ console.log(chalk.gray(' --json Output as JSON'));
625
+ console.log(chalk.gray(' --scope <scope> Auto-cluster scope (all/recent/unclustered)'));
626
+ console.log(chalk.gray(' --dedup Deduplicate similar clusters'));
627
+ console.log(chalk.gray(' --delete Delete a cluster'));
628
+ console.log(chalk.gray(' --merge <ids> Merge source clusters into target'));
629
+ console.log();
630
+ console.log(chalk.bold(' Examples:'));
631
+ console.log(chalk.gray(' ccw core-memory list'));
632
+ console.log(chalk.gray(' ccw core-memory export --id CMEM-xxx # Searches all projects'));
633
+ console.log(chalk.gray(' ccw core-memory projects # List all projects'));
634
+ console.log(chalk.gray(' ccw core-memory list-from d--other-project'));
635
+ console.log(chalk.gray(' ccw core-memory cluster --auto'));
636
+ console.log(chalk.gray(' ccw core-memory cluster --dedup'));
637
+ console.log();
638
+ }
639
+ }
640
+ //# sourceMappingURL=core-memory.js.map