claude-code-workflow 6.2.2 → 6.2.4

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 +5 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file.js","sourceRoot":"","sources":["../../src/tools/write-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAc,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAc,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,mCAAmC;AACnC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,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;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAG,KAAe,CAAC,OAAO;aAChC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,aAAa;IACb,IAAI,CAAC;QACH,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAEnD,gDAAgD;QAChD,MAAM,iBAAiB,GAAG,eAAe,CAAC,YAAY,EAAE,KAAK,EAAE,QAA0B,CAAC,CAAC;QAC3F,IAAI,iBAAiB,EAAE,CAAC;YACtB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,iBAAiB;aACzB,CAAC;QACJ,CAAC;QAED,wBAAwB;QACxB,IAAI,OAAe,CAAC;QACpB,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,GAAG,UAAU;gBAClB,CAAC,CAAC,cAAc,KAAK,cAAc,QAAQ,CAAC,UAAU,CAAC,cAAc;gBACrE,CAAC,CAAC,cAAc,KAAK,eAAe,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,YAAY,KAAK,eAAe,CAAC;QAC7C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE;gBACN,IAAI,EAAE,YAAY;gBAClB,KAAK;gBACL,OAAO;aACR;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,yBAA0B,KAAe,CAAC,OAAO,EAAE;SAC3D,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface ServerConfig {
2
+ port: number;
3
+ host: string;
4
+ open: boolean;
5
+ }
6
+ export interface McpConfig {
7
+ enabledTools: string[] | null;
8
+ serverName: string;
9
+ serverVersion: string;
10
+ }
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './tool.js';
2
+ export * from './session.js';
3
+ export * from './config.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './tool.js';
2
+ export * from './session.js';
3
+ export * from './config.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type SessionStatus = 'active' | 'paused' | 'completed' | 'archived';
2
+ export type SessionType = 'workflow' | 'review' | 'tdd' | 'test' | 'docs' | 'lite-plan' | 'lite-fix';
3
+ export type ContentType = 'session' | 'plan' | 'task' | 'summary' | 'process' | 'chat' | 'brainstorm' | 'review-dim' | 'review-iter' | 'review-fix' | 'todo' | 'context';
4
+ export interface SessionMetadata {
5
+ id: string;
6
+ type: SessionType;
7
+ status: SessionStatus;
8
+ description?: string;
9
+ project?: string;
10
+ created: string;
11
+ updated: string;
12
+ }
13
+ export interface SessionOperationResult {
14
+ success: boolean;
15
+ sessionId?: string;
16
+ path?: string;
17
+ data?: unknown;
18
+ error?: string;
19
+ }
20
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAC3E,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;AACrG,MAAM,MAAM,WAAW,GACnB,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GACvC,SAAS,GAAG,MAAM,GAAG,YAAY,GACjC,YAAY,GAAG,aAAa,GAAG,YAAY,GAC3C,MAAM,GAAG,SAAS,CAAC;AAEvB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ export declare const ToolParamSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ type: z.ZodEnum<{
5
+ string: "string";
6
+ number: "number";
7
+ boolean: "boolean";
8
+ object: "object";
9
+ array: "array";
10
+ }>;
11
+ description: z.ZodString;
12
+ required: z.ZodDefault<z.ZodBoolean>;
13
+ default: z.ZodOptional<z.ZodAny>;
14
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ }, z.core.$strip>;
16
+ export type ToolParam = z.infer<typeof ToolParamSchema>;
17
+ export interface ToolSchema {
18
+ name: string;
19
+ description: string;
20
+ inputSchema: {
21
+ type: 'object';
22
+ properties: Record<string, unknown>;
23
+ required?: string[];
24
+ };
25
+ }
26
+ export interface ToolResult<T = unknown> {
27
+ success: boolean;
28
+ result?: T;
29
+ error?: string;
30
+ }
31
+ export type ToolHandler<TParams = Record<string, unknown>, TResult = unknown> = (params: TParams) => Promise<ToolResult<TResult>>;
32
+ export interface ToolRegistration<TParams = Record<string, unknown>> {
33
+ schema: ToolSchema;
34
+ handler: ToolHandler<TParams>;
35
+ }
36
+ //# sourceMappingURL=tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;iBAO1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAGxD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAGD,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,MAAM,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,IAC1E,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AAGpD,MAAM,WAAW,gBAAgB,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/B"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ // Tool parameter schema for Zod validation
3
+ export const ToolParamSchema = z.object({
4
+ name: z.string(),
5
+ type: z.enum(['string', 'number', 'boolean', 'object', 'array']),
6
+ description: z.string(),
7
+ required: z.boolean().default(false),
8
+ default: z.any().optional(),
9
+ enum: z.array(z.string()).optional(),
10
+ });
11
+ //# sourceMappingURL=tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2CAA2C;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Launch a URL or file in the default browser
3
+ * Cross-platform compatible (Windows/macOS/Linux)
4
+ * @param urlOrPath - HTTP URL or path to HTML file
5
+ * @returns Promise that resolves when browser is launched
6
+ */
7
+ export declare function launchBrowser(urlOrPath: string): Promise<void>;
8
+ /**
9
+ * Check if we're running in a headless/CI environment
10
+ * @returns True if running in headless environment
11
+ */
12
+ export declare function isHeadlessEnvironment(): boolean;
13
+ //# sourceMappingURL=browser-launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-launcher.d.ts","sourceRoot":"","sources":["../../src/utils/browser-launcher.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqCpE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAQ/C"}
@@ -0,0 +1,60 @@
1
+ import open from 'open';
2
+ import { platform } from 'os';
3
+ import { resolve } from 'path';
4
+ /**
5
+ * Launch a URL or file in the default browser
6
+ * Cross-platform compatible (Windows/macOS/Linux)
7
+ * @param urlOrPath - HTTP URL or path to HTML file
8
+ * @returns Promise that resolves when browser is launched
9
+ */
10
+ export async function launchBrowser(urlOrPath) {
11
+ // Check if it's already a URL (http:// or https://)
12
+ if (urlOrPath.startsWith('http://') || urlOrPath.startsWith('https://')) {
13
+ try {
14
+ await open(urlOrPath);
15
+ return;
16
+ }
17
+ catch (error) {
18
+ const message = error instanceof Error ? error.message : String(error);
19
+ throw new Error(`Failed to open browser: ${message}`);
20
+ }
21
+ }
22
+ // It's a file path - convert to file:// URL
23
+ const absolutePath = resolve(urlOrPath);
24
+ // Construct file:// URL based on platform
25
+ let url;
26
+ if (platform() === 'win32') {
27
+ // Windows: file:///C:/path/to/file.html
28
+ url = `file:///${absolutePath.replace(/\\/g, '/')}`;
29
+ }
30
+ else {
31
+ // Unix: file:///path/to/file.html
32
+ url = `file://${absolutePath}`;
33
+ }
34
+ try {
35
+ // Use the 'open' package which handles cross-platform browser launching
36
+ await open(url);
37
+ }
38
+ catch (error) {
39
+ // Fallback: try opening the file path directly
40
+ try {
41
+ await open(absolutePath);
42
+ }
43
+ catch (fallbackError) {
44
+ const message = error instanceof Error ? error.message : String(error);
45
+ throw new Error(`Failed to open browser: ${message}`);
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * Check if we're running in a headless/CI environment
51
+ * @returns True if running in headless environment
52
+ */
53
+ export function isHeadlessEnvironment() {
54
+ return !!(process.env.CI ||
55
+ process.env.CONTINUOUS_INTEGRATION ||
56
+ process.env.GITHUB_ACTIONS ||
57
+ process.env.GITLAB_CI ||
58
+ process.env.JENKINS_URL);
59
+ }
60
+ //# sourceMappingURL=browser-launcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-launcher.js","sourceRoot":"","sources":["../../src/utils/browser-launcher.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,oDAAoD;IACpD,IAAI,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;Q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CAAC,GAAG,CAAC,sBAAsB;QAClC,OAAO,CAAC,GAAG,CAAC,cAAc;QAC1B,OAAO,CAAC,GAAG,CAAC,SAAS;QACrB,OAAO,CAAC,GAAG,CAAC,WAAW,CACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Safely read a JSON file
3
+ * @param filePath - Path to JSON file
4
+ * @returns Parsed JSON or null on error
5
+ */
6
+ export declare function readJsonFile(filePath: string): unknown | null;
7
+ /**
8
+ * Safely read a text file
9
+ * @param filePath - Path to text file
10
+ * @returns File contents or null on error
11
+ */
12
+ export declare function readTextFile(filePath: string): string | null;
13
+ /**
14
+ * Write content to a file
15
+ * @param filePath - Path to file
16
+ * @param content - Content to write
17
+ */
18
+ export declare function writeTextFile(filePath: string, content: string): void;
19
+ /**
20
+ * Check if a path exists
21
+ * @param filePath - Path to check
22
+ * @returns True if path exists
23
+ */
24
+ export declare function pathExists(filePath: string): boolean;
25
+ //# sourceMappingURL=file-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAO7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO5D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD"}
@@ -0,0 +1,48 @@
1
+ import { readFileSync, existsSync, writeFileSync } from 'fs';
2
+ /**
3
+ * Safely read a JSON file
4
+ * @param filePath - Path to JSON file
5
+ * @returns Parsed JSON or null on error
6
+ */
7
+ export function readJsonFile(filePath) {
8
+ if (!existsSync(filePath))
9
+ return null;
10
+ try {
11
+ return JSON.parse(readFileSync(filePath, 'utf8'));
12
+ }
13
+ catch {
14
+ return null;
15
+ }
16
+ }
17
+ /**
18
+ * Safely read a text file
19
+ * @param filePath - Path to text file
20
+ * @returns File contents or null on error
21
+ */
22
+ export function readTextFile(filePath) {
23
+ if (!existsSync(filePath))
24
+ return null;
25
+ try {
26
+ return readFileSync(filePath, 'utf8');
27
+ }
28
+ catch {
29
+ return null;
30
+ }
31
+ }
32
+ /**
33
+ * Write content to a file
34
+ * @param filePath - Path to file
35
+ * @param content - Content to write
36
+ */
37
+ export function writeTextFile(filePath, content) {
38
+ writeFileSync(filePath, content, 'utf8');
39
+ }
40
+ /**
41
+ * Check if a path exists
42
+ * @param filePath - Path to check
43
+ * @returns True if path exists
44
+ */
45
+ export function pathExists(filePath) {
46
+ return existsSync(filePath);
47
+ }
48
+ //# sourceMappingURL=file-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAG7D;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,OAAe;IAC7D,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Validation result for path operations
3
+ */
4
+ export interface PathValidationResult {
5
+ valid: boolean;
6
+ path: string | null;
7
+ error: string | null;
8
+ }
9
+ /**
10
+ * Options for path validation
11
+ */
12
+ export interface ValidatePathOptions {
13
+ baseDir?: string | null;
14
+ mustExist?: boolean;
15
+ allowHome?: boolean;
16
+ }
17
+ /**
18
+ * Resolve a path, handling ~ for home directory
19
+ * @param inputPath - Path to resolve
20
+ * @returns Absolute path
21
+ */
22
+ export declare function resolvePath(inputPath: string): string;
23
+ /**
24
+ * Validate and sanitize a user-provided path
25
+ * Prevents path traversal attacks and validates path is within allowed boundaries
26
+ * @param inputPath - User-provided path
27
+ * @param options - Validation options
28
+ * @returns Validation result with path or error
29
+ */
30
+ export declare function validatePath(inputPath: string, options?: ValidatePathOptions): PathValidationResult;
31
+ /**
32
+ * Validate output file path for writing
33
+ * @param outputPath - Output file path
34
+ * @param defaultDir - Default directory if path is relative
35
+ * @returns Validation result with path or error
36
+ */
37
+ export declare function validateOutputPath(outputPath: string, defaultDir?: string): PathValidationResult;
38
+ /**
39
+ * Get potential template locations
40
+ * @returns Array of existing template directories
41
+ */
42
+ export declare function getTemplateLocations(): string[];
43
+ /**
44
+ * Find a template file in known locations
45
+ * @param templateName - Name of template file (e.g., 'workflow-dashboard.html')
46
+ * @returns Path to template or null if not found
47
+ */
48
+ export declare function findTemplate(templateName: string): string | null;
49
+ /**
50
+ * Ensure directory exists, creating if necessary
51
+ * @param dirPath - Directory path to ensure
52
+ */
53
+ export declare function ensureDir(dirPath: string): void;
54
+ /**
55
+ * Normalize path for display (handle Windows backslashes)
56
+ * @param filePath - Path to normalize
57
+ * @returns Normalized path with forward slashes
58
+ */
59
+ export declare function normalizePathForDisplay(filePath: string): string;
60
+ /**
61
+ * Get recent project paths
62
+ * @returns Array of recent paths
63
+ */
64
+ export declare function getRecentPaths(): string[];
65
+ /**
66
+ * Track a project path (add to recent paths)
67
+ * @param projectPath - Path to track
68
+ */
69
+ export declare function trackRecentPath(projectPath: string): void;
70
+ /**
71
+ * Clear recent paths
72
+ */
73
+ export declare function clearRecentPaths(): void;
74
+ /**
75
+ * Remove a specific path from recent paths
76
+ * @param pathToRemove - Path to remove
77
+ * @returns True if removed, false if not found
78
+ */
79
+ export declare function removeRecentPath(pathToRemove: string): boolean;
80
+ //# sourceMappingURL=path-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/path-resolver.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CASrD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,oBAAoB,CAiEvG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,GAAE,MAAsB,GAAG,oBAAoB,CAmC/G;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAO/C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWhE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhE;AA2BD;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAYzC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAqBzD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAQvC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAoB9D"}
@@ -0,0 +1,260 @@
1
+ import { resolve, join, relative, isAbsolute } from 'path';
2
+ import { existsSync, mkdirSync, realpathSync, statSync, readFileSync, writeFileSync } from 'fs';
3
+ import { homedir } from 'os';
4
+ import { StoragePaths, ensureStorageDir, LegacyPaths } from '../config/storage-paths.js';
5
+ /**
6
+ * Resolve a path, handling ~ for home directory
7
+ * @param inputPath - Path to resolve
8
+ * @returns Absolute path
9
+ */
10
+ export function resolvePath(inputPath) {
11
+ if (!inputPath)
12
+ return process.cwd();
13
+ // Handle ~ for home directory
14
+ if (inputPath.startsWith('~')) {
15
+ return join(homedir(), inputPath.slice(1));
16
+ }
17
+ return resolve(inputPath);
18
+ }
19
+ /**
20
+ * Validate and sanitize a user-provided path
21
+ * Prevents path traversal attacks and validates path is within allowed boundaries
22
+ * @param inputPath - User-provided path
23
+ * @param options - Validation options
24
+ * @returns Validation result with path or error
25
+ */
26
+ export function validatePath(inputPath, options = {}) {
27
+ const { baseDir = null, mustExist = false, allowHome = true } = options;
28
+ // Check for empty/null input
29
+ if (!inputPath || typeof inputPath !== 'string') {
30
+ return { valid: false, path: null, error: 'Path is required' };
31
+ }
32
+ // Trim whitespace
33
+ const trimmedPath = inputPath.trim();
34
+ // Check for suspicious patterns (null bytes, control characters)
35
+ if (/[\x00-\x1f]/.test(trimmedPath)) {
36
+ return { valid: false, path: null, error: 'Path contains invalid characters' };
37
+ }
38
+ // Resolve the path
39
+ let resolvedPath;
40
+ try {
41
+ resolvedPath = resolvePath(trimmedPath);
42
+ }
43
+ catch (err) {
44
+ const message = err instanceof Error ? err.message : String(err);
45
+ return { valid: false, path: null, error: `Invalid path: ${message}` };
46
+ }
47
+ // Check if path exists when required
48
+ if (mustExist && !existsSync(resolvedPath)) {
49
+ return { valid: false, path: null, error: `Path does not exist: ${resolvedPath}` };
50
+ }
51
+ // Get real path if it exists (resolves symlinks)
52
+ let realPath = resolvedPath;
53
+ if (existsSync(resolvedPath)) {
54
+ try {
55
+ realPath = realpathSync(resolvedPath);
56
+ }
57
+ catch (err) {
58
+ const message = err instanceof Error ? err.message : String(err);
59
+ return { valid: false, path: null, error: `Cannot resolve path: ${message}` };
60
+ }
61
+ }
62
+ // Check if within base directory when specified
63
+ if (baseDir) {
64
+ const resolvedBase = resolvePath(baseDir);
65
+ const relativePath = relative(resolvedBase, realPath);
66
+ // Path traversal detection: relative path should not start with '..'
67
+ if (relativePath.startsWith('..') || isAbsolute(relativePath)) {
68
+ return {
69
+ valid: false,
70
+ path: null,
71
+ error: `Path must be within ${resolvedBase}`
72
+ };
73
+ }
74
+ }
75
+ // Check home directory restriction
76
+ if (!allowHome) {
77
+ const home = homedir();
78
+ if (realPath === home || realPath.startsWith(home + '/') || realPath.startsWith(home + '\\')) {
79
+ // This is fine, we're just checking if it's explicitly the home dir itself
80
+ }
81
+ }
82
+ return { valid: true, path: realPath, error: null };
83
+ }
84
+ /**
85
+ * Validate output file path for writing
86
+ * @param outputPath - Output file path
87
+ * @param defaultDir - Default directory if path is relative
88
+ * @returns Validation result with path or error
89
+ */
90
+ export function validateOutputPath(outputPath, defaultDir = process.cwd()) {
91
+ if (!outputPath || typeof outputPath !== 'string') {
92
+ return { valid: false, path: null, error: 'Output path is required' };
93
+ }
94
+ const trimmedPath = outputPath.trim();
95
+ // Check for suspicious patterns
96
+ if (/[\x00-\x1f]/.test(trimmedPath)) {
97
+ return { valid: false, path: null, error: 'Output path contains invalid characters' };
98
+ }
99
+ // Resolve the path
100
+ let resolvedPath;
101
+ try {
102
+ resolvedPath = isAbsolute(trimmedPath) ? trimmedPath : join(defaultDir, trimmedPath);
103
+ resolvedPath = resolve(resolvedPath);
104
+ }
105
+ catch (err) {
106
+ const message = err instanceof Error ? err.message : String(err);
107
+ return { valid: false, path: null, error: `Invalid output path: ${message}` };
108
+ }
109
+ // Ensure it's not a directory
110
+ if (existsSync(resolvedPath)) {
111
+ try {
112
+ const stat = statSync(resolvedPath);
113
+ if (stat.isDirectory()) {
114
+ return { valid: false, path: null, error: 'Output path is a directory, expected a file' };
115
+ }
116
+ }
117
+ catch {
118
+ // Ignore stat errors
119
+ }
120
+ }
121
+ return { valid: true, path: resolvedPath, error: null };
122
+ }
123
+ /**
124
+ * Get potential template locations
125
+ * @returns Array of existing template directories
126
+ */
127
+ export function getTemplateLocations() {
128
+ const locations = [
129
+ join(homedir(), '.claude', 'templates'),
130
+ join(process.cwd(), '.claude', 'templates')
131
+ ];
132
+ return locations.filter(loc => existsSync(loc));
133
+ }
134
+ /**
135
+ * Find a template file in known locations
136
+ * @param templateName - Name of template file (e.g., 'workflow-dashboard.html')
137
+ * @returns Path to template or null if not found
138
+ */
139
+ export function findTemplate(templateName) {
140
+ const locations = getTemplateLocations();
141
+ for (const loc of locations) {
142
+ const templatePath = join(loc, templateName);
143
+ if (existsSync(templatePath)) {
144
+ return templatePath;
145
+ }
146
+ }
147
+ return null;
148
+ }
149
+ /**
150
+ * Ensure directory exists, creating if necessary
151
+ * @param dirPath - Directory path to ensure
152
+ */
153
+ export function ensureDir(dirPath) {
154
+ if (!existsSync(dirPath)) {
155
+ mkdirSync(dirPath, { recursive: true });
156
+ }
157
+ }
158
+ /**
159
+ * Normalize path for display (handle Windows backslashes)
160
+ * @param filePath - Path to normalize
161
+ * @returns Normalized path with forward slashes
162
+ */
163
+ export function normalizePathForDisplay(filePath) {
164
+ return filePath.replace(/\\/g, '/');
165
+ }
166
+ // Recent paths storage - uses centralized storage with backward compatibility
167
+ const MAX_RECENT_PATHS = 10;
168
+ /**
169
+ * Get the recent paths file location
170
+ * Uses new location but falls back to legacy location for backward compatibility
171
+ */
172
+ function getRecentPathsFile() {
173
+ const newPath = StoragePaths.global.recentPaths();
174
+ const legacyPath = LegacyPaths.recentPaths();
175
+ // Backward compatibility: use legacy if it exists and new doesn't
176
+ if (!existsSync(newPath) && existsSync(legacyPath)) {
177
+ return legacyPath;
178
+ }
179
+ return newPath;
180
+ }
181
+ /**
182
+ * Get recent project paths
183
+ * @returns Array of recent paths
184
+ */
185
+ export function getRecentPaths() {
186
+ try {
187
+ const recentPathsFile = getRecentPathsFile();
188
+ if (existsSync(recentPathsFile)) {
189
+ const content = readFileSync(recentPathsFile, 'utf8');
190
+ const data = JSON.parse(content);
191
+ return Array.isArray(data.paths) ? data.paths : [];
192
+ }
193
+ }
194
+ catch {
195
+ // Ignore errors, return empty array
196
+ }
197
+ return [];
198
+ }
199
+ /**
200
+ * Track a project path (add to recent paths)
201
+ * @param projectPath - Path to track
202
+ */
203
+ export function trackRecentPath(projectPath) {
204
+ try {
205
+ const normalized = normalizePathForDisplay(resolvePath(projectPath));
206
+ let paths = getRecentPaths();
207
+ // Remove if already exists (will be added to front)
208
+ paths = paths.filter(p => normalizePathForDisplay(p) !== normalized);
209
+ // Add to front
210
+ paths.unshift(normalized);
211
+ // Limit to max
212
+ paths = paths.slice(0, MAX_RECENT_PATHS);
213
+ // Save to new centralized location
214
+ const recentPathsFile = StoragePaths.global.recentPaths();
215
+ ensureStorageDir(StoragePaths.global.config());
216
+ writeFileSync(recentPathsFile, JSON.stringify({ paths }, null, 2), 'utf8');
217
+ }
218
+ catch {
219
+ // Ignore errors
220
+ }
221
+ }
222
+ /**
223
+ * Clear recent paths
224
+ */
225
+ export function clearRecentPaths() {
226
+ try {
227
+ const recentPathsFile = StoragePaths.global.recentPaths();
228
+ ensureStorageDir(StoragePaths.global.config());
229
+ writeFileSync(recentPathsFile, JSON.stringify({ paths: [] }, null, 2), 'utf8');
230
+ }
231
+ catch {
232
+ // Ignore errors
233
+ }
234
+ }
235
+ /**
236
+ * Remove a specific path from recent paths
237
+ * @param pathToRemove - Path to remove
238
+ * @returns True if removed, false if not found
239
+ */
240
+ export function removeRecentPath(pathToRemove) {
241
+ try {
242
+ const normalized = normalizePathForDisplay(resolvePath(pathToRemove));
243
+ let paths = getRecentPaths();
244
+ const originalLength = paths.length;
245
+ // Filter out the path to remove
246
+ paths = paths.filter(p => normalizePathForDisplay(p) !== normalized);
247
+ if (paths.length < originalLength) {
248
+ // Save updated list to new centralized location
249
+ const recentPathsFile = StoragePaths.global.recentPaths();
250
+ ensureStorageDir(StoragePaths.global.config());
251
+ writeFileSync(recentPathsFile, JSON.stringify({ paths }, null, 2), 'utf8');
252
+ return true;
253
+ }
254
+ return false;
255
+ }
256
+ catch {
257
+ return false;
258
+ }
259
+ }
260
+ //# sourceMappingURL=path-resolver.js.map