@specforge/mcp 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/README.md +324 -0
  2. package/bin/specforge-mcp +19 -1
  3. package/dist/cli/commands/blocked.d.ts +16 -0
  4. package/dist/cli/commands/blocked.d.ts.map +1 -0
  5. package/dist/cli/commands/blocked.js +214 -0
  6. package/dist/cli/commands/blocked.js.map +1 -0
  7. package/dist/cli/commands/configure.d.ts +16 -0
  8. package/dist/cli/commands/configure.d.ts.map +1 -0
  9. package/dist/cli/commands/configure.js +218 -0
  10. package/dist/cli/commands/configure.js.map +1 -0
  11. package/dist/cli/commands/configure.types.d.ts +110 -0
  12. package/dist/cli/commands/configure.types.d.ts.map +1 -0
  13. package/dist/cli/commands/configure.types.js +105 -0
  14. package/dist/cli/commands/configure.types.js.map +1 -0
  15. package/dist/cli/commands/debug/call.d.ts +14 -0
  16. package/dist/cli/commands/debug/call.d.ts.map +1 -0
  17. package/dist/cli/commands/debug/call.js +117 -0
  18. package/dist/cli/commands/debug/call.js.map +1 -0
  19. package/dist/cli/commands/debug/index.d.ts +12 -0
  20. package/dist/cli/commands/debug/index.d.ts.map +1 -0
  21. package/dist/cli/commands/debug/index.js +12 -0
  22. package/dist/cli/commands/debug/index.js.map +1 -0
  23. package/dist/cli/commands/debug/register.d.ts +11 -0
  24. package/dist/cli/commands/debug/register.d.ts.map +1 -0
  25. package/dist/cli/commands/debug/register.js +90 -0
  26. package/dist/cli/commands/debug/register.js.map +1 -0
  27. package/dist/cli/commands/debug/test.d.ts +13 -0
  28. package/dist/cli/commands/debug/test.d.ts.map +1 -0
  29. package/dist/cli/commands/debug/test.js +117 -0
  30. package/dist/cli/commands/debug/test.js.map +1 -0
  31. package/dist/cli/commands/debug/tools.d.ts +13 -0
  32. package/dist/cli/commands/debug/tools.d.ts.map +1 -0
  33. package/dist/cli/commands/debug/tools.js +117 -0
  34. package/dist/cli/commands/debug/tools.js.map +1 -0
  35. package/dist/cli/commands/debug/types.d.ts +117 -0
  36. package/dist/cli/commands/debug/types.d.ts.map +1 -0
  37. package/dist/cli/commands/debug/types.js +43 -0
  38. package/dist/cli/commands/debug/types.js.map +1 -0
  39. package/dist/cli/commands/debug/whoami.d.ts +13 -0
  40. package/dist/cli/commands/debug/whoami.d.ts.map +1 -0
  41. package/dist/cli/commands/debug/whoami.js +161 -0
  42. package/dist/cli/commands/debug/whoami.js.map +1 -0
  43. package/dist/cli/commands/docs/content/api.d.ts +7 -0
  44. package/dist/cli/commands/docs/content/api.d.ts.map +1 -0
  45. package/dist/cli/commands/docs/content/api.js +64 -0
  46. package/dist/cli/commands/docs/content/api.js.map +1 -0
  47. package/dist/cli/commands/docs/content/concepts.d.ts +7 -0
  48. package/dist/cli/commands/docs/content/concepts.d.ts.map +1 -0
  49. package/dist/cli/commands/docs/content/concepts.js +68 -0
  50. package/dist/cli/commands/docs/content/concepts.js.map +1 -0
  51. package/dist/cli/commands/docs/content/examples.d.ts +7 -0
  52. package/dist/cli/commands/docs/content/examples.d.ts.map +1 -0
  53. package/dist/cli/commands/docs/content/examples.js +84 -0
  54. package/dist/cli/commands/docs/content/examples.js.map +1 -0
  55. package/dist/cli/commands/docs/content/index.d.ts +10 -0
  56. package/dist/cli/commands/docs/content/index.d.ts.map +1 -0
  57. package/dist/cli/commands/docs/content/index.js +10 -0
  58. package/dist/cli/commands/docs/content/index.js.map +1 -0
  59. package/dist/cli/commands/docs/content/workflow.d.ts +7 -0
  60. package/dist/cli/commands/docs/content/workflow.d.ts.map +1 -0
  61. package/dist/cli/commands/docs/content/workflow.js +44 -0
  62. package/dist/cli/commands/docs/content/workflow.js.map +1 -0
  63. package/dist/cli/commands/docs/content.d.ts +23 -0
  64. package/dist/cli/commands/docs/content.d.ts.map +1 -0
  65. package/dist/cli/commands/docs/content.js +38 -0
  66. package/dist/cli/commands/docs/content.js.map +1 -0
  67. package/dist/cli/commands/docs/display.d.ts +26 -0
  68. package/dist/cli/commands/docs/display.d.ts.map +1 -0
  69. package/dist/cli/commands/docs/display.js +53 -0
  70. package/dist/cli/commands/docs/display.js.map +1 -0
  71. package/dist/cli/commands/docs/docs.d.ts +19 -0
  72. package/dist/cli/commands/docs/docs.d.ts.map +1 -0
  73. package/dist/cli/commands/docs/docs.js +124 -0
  74. package/dist/cli/commands/docs/docs.js.map +1 -0
  75. package/dist/cli/commands/docs/index.d.ts +13 -0
  76. package/dist/cli/commands/docs/index.d.ts.map +1 -0
  77. package/dist/cli/commands/docs/index.js +13 -0
  78. package/dist/cli/commands/docs/index.js.map +1 -0
  79. package/dist/cli/commands/docs/register.d.ts +23 -0
  80. package/dist/cli/commands/docs/register.d.ts.map +1 -0
  81. package/dist/cli/commands/docs/register.js +64 -0
  82. package/dist/cli/commands/docs/register.js.map +1 -0
  83. package/dist/cli/commands/docs/tool-docs.d.ts +44 -0
  84. package/dist/cli/commands/docs/tool-docs.d.ts.map +1 -0
  85. package/dist/cli/commands/docs/tool-docs.js +182 -0
  86. package/dist/cli/commands/docs/tool-docs.js.map +1 -0
  87. package/dist/cli/commands/docs/tool-examples.d.ts +14 -0
  88. package/dist/cli/commands/docs/tool-examples.d.ts.map +1 -0
  89. package/dist/cli/commands/docs/tool-examples.js +127 -0
  90. package/dist/cli/commands/docs/tool-examples.js.map +1 -0
  91. package/dist/cli/commands/docs/types.d.ts +108 -0
  92. package/dist/cli/commands/docs/types.d.ts.map +1 -0
  93. package/dist/cli/commands/docs/types.js +33 -0
  94. package/dist/cli/commands/docs/types.js.map +1 -0
  95. package/dist/cli/commands/doctor.d.ts +16 -0
  96. package/dist/cli/commands/doctor.d.ts.map +1 -0
  97. package/dist/cli/commands/doctor.js +322 -0
  98. package/dist/cli/commands/doctor.js.map +1 -0
  99. package/dist/cli/commands/doctor.types.d.ts +177 -0
  100. package/dist/cli/commands/doctor.types.d.ts.map +1 -0
  101. package/dist/cli/commands/doctor.types.js +172 -0
  102. package/dist/cli/commands/doctor.types.js.map +1 -0
  103. package/dist/cli/commands/index.d.ts +18 -0
  104. package/dist/cli/commands/index.d.ts.map +1 -0
  105. package/dist/cli/commands/index.js +18 -0
  106. package/dist/cli/commands/index.js.map +1 -0
  107. package/dist/cli/commands/init.d.ts +17 -0
  108. package/dist/cli/commands/init.d.ts.map +1 -0
  109. package/dist/cli/commands/init.js +326 -0
  110. package/dist/cli/commands/init.js.map +1 -0
  111. package/dist/cli/commands/init.types.d.ts +141 -0
  112. package/dist/cli/commands/init.types.d.ts.map +1 -0
  113. package/dist/cli/commands/init.types.js +24 -0
  114. package/dist/cli/commands/init.types.js.map +1 -0
  115. package/dist/cli/commands/login.d.ts +40 -0
  116. package/dist/cli/commands/login.d.ts.map +1 -0
  117. package/dist/cli/commands/login.js +174 -0
  118. package/dist/cli/commands/login.js.map +1 -0
  119. package/dist/cli/commands/next.d.ts +16 -0
  120. package/dist/cli/commands/next.d.ts.map +1 -0
  121. package/dist/cli/commands/next.js +279 -0
  122. package/dist/cli/commands/next.js.map +1 -0
  123. package/dist/cli/commands/next.types.d.ts +191 -0
  124. package/dist/cli/commands/next.types.d.ts.map +1 -0
  125. package/dist/cli/commands/next.types.js +129 -0
  126. package/dist/cli/commands/next.types.js.map +1 -0
  127. package/dist/cli/commands/projects.d.ts +16 -0
  128. package/dist/cli/commands/projects.d.ts.map +1 -0
  129. package/dist/cli/commands/projects.js +149 -0
  130. package/dist/cli/commands/projects.js.map +1 -0
  131. package/dist/cli/commands/projects.types.d.ts +81 -0
  132. package/dist/cli/commands/projects.types.d.ts.map +1 -0
  133. package/dist/cli/commands/projects.types.js +35 -0
  134. package/dist/cli/commands/projects.types.js.map +1 -0
  135. package/dist/cli/commands/review/display.d.ts +33 -0
  136. package/dist/cli/commands/review/display.d.ts.map +1 -0
  137. package/dist/cli/commands/review/display.js +159 -0
  138. package/dist/cli/commands/review/display.js.map +1 -0
  139. package/dist/cli/commands/review/epic-review.d.ts +13 -0
  140. package/dist/cli/commands/review/epic-review.d.ts.map +1 -0
  141. package/dist/cli/commands/review/epic-review.js +69 -0
  142. package/dist/cli/commands/review/epic-review.js.map +1 -0
  143. package/dist/cli/commands/review/index.d.ts +13 -0
  144. package/dist/cli/commands/review/index.d.ts.map +1 -0
  145. package/dist/cli/commands/review/index.js +17 -0
  146. package/dist/cli/commands/review/index.js.map +1 -0
  147. package/dist/cli/commands/review/report.d.ts +31 -0
  148. package/dist/cli/commands/review/report.d.ts.map +1 -0
  149. package/dist/cli/commands/review/report.js +146 -0
  150. package/dist/cli/commands/review/report.js.map +1 -0
  151. package/dist/cli/commands/review/review.d.ts +17 -0
  152. package/dist/cli/commands/review/review.d.ts.map +1 -0
  153. package/dist/cli/commands/review/review.js +129 -0
  154. package/dist/cli/commands/review/review.js.map +1 -0
  155. package/dist/cli/commands/review/spec-review.d.ts +13 -0
  156. package/dist/cli/commands/review/spec-review.d.ts.map +1 -0
  157. package/dist/cli/commands/review/spec-review.js +65 -0
  158. package/dist/cli/commands/review/spec-review.js.map +1 -0
  159. package/dist/cli/commands/review/ticket-review.d.ts +37 -0
  160. package/dist/cli/commands/review/ticket-review.d.ts.map +1 -0
  161. package/dist/cli/commands/review/ticket-review.js +194 -0
  162. package/dist/cli/commands/review/ticket-review.js.map +1 -0
  163. package/dist/cli/commands/review/types.d.ts +232 -0
  164. package/dist/cli/commands/review/types.d.ts.map +1 -0
  165. package/dist/cli/commands/review/types.js +85 -0
  166. package/dist/cli/commands/review/types.js.map +1 -0
  167. package/dist/cli/commands/scaffold/display.d.ts +27 -0
  168. package/dist/cli/commands/scaffold/display.d.ts.map +1 -0
  169. package/dist/cli/commands/scaffold/display.js +90 -0
  170. package/dist/cli/commands/scaffold/display.js.map +1 -0
  171. package/dist/cli/commands/scaffold/index.d.ts +12 -0
  172. package/dist/cli/commands/scaffold/index.d.ts.map +1 -0
  173. package/dist/cli/commands/scaffold/index.js +12 -0
  174. package/dist/cli/commands/scaffold/index.js.map +1 -0
  175. package/dist/cli/commands/scaffold/register.d.ts +11 -0
  176. package/dist/cli/commands/scaffold/register.d.ts.map +1 -0
  177. package/dist/cli/commands/scaffold/register.js +25 -0
  178. package/dist/cli/commands/scaffold/register.js.map +1 -0
  179. package/dist/cli/commands/scaffold/scaffold.d.ts +11 -0
  180. package/dist/cli/commands/scaffold/scaffold.d.ts.map +1 -0
  181. package/dist/cli/commands/scaffold/scaffold.js +111 -0
  182. package/dist/cli/commands/scaffold/scaffold.js.map +1 -0
  183. package/dist/cli/commands/scaffold/targets.d.ts +31 -0
  184. package/dist/cli/commands/scaffold/targets.d.ts.map +1 -0
  185. package/dist/cli/commands/scaffold/targets.js +84 -0
  186. package/dist/cli/commands/scaffold/targets.js.map +1 -0
  187. package/dist/cli/commands/scaffold/types.d.ts +88 -0
  188. package/dist/cli/commands/scaffold/types.d.ts.map +1 -0
  189. package/dist/cli/commands/scaffold/types.js +21 -0
  190. package/dist/cli/commands/scaffold/types.js.map +1 -0
  191. package/dist/cli/commands/scaffold/utils.d.ts +31 -0
  192. package/dist/cli/commands/scaffold/utils.d.ts.map +1 -0
  193. package/dist/cli/commands/scaffold/utils.js +71 -0
  194. package/dist/cli/commands/scaffold/utils.js.map +1 -0
  195. package/dist/cli/commands/session/display.d.ts +40 -0
  196. package/dist/cli/commands/session/display.d.ts.map +1 -0
  197. package/dist/cli/commands/session/display.js +114 -0
  198. package/dist/cli/commands/session/display.js.map +1 -0
  199. package/dist/cli/commands/session/end.d.ts +12 -0
  200. package/dist/cli/commands/session/end.d.ts.map +1 -0
  201. package/dist/cli/commands/session/end.js +165 -0
  202. package/dist/cli/commands/session/end.js.map +1 -0
  203. package/dist/cli/commands/session/index.d.ts +13 -0
  204. package/dist/cli/commands/session/index.d.ts.map +1 -0
  205. package/dist/cli/commands/session/index.js +13 -0
  206. package/dist/cli/commands/session/index.js.map +1 -0
  207. package/dist/cli/commands/session/register.d.ts +12 -0
  208. package/dist/cli/commands/session/register.d.ts.map +1 -0
  209. package/dist/cli/commands/session/register.js +87 -0
  210. package/dist/cli/commands/session/register.js.map +1 -0
  211. package/dist/cli/commands/session/start.d.ts +12 -0
  212. package/dist/cli/commands/session/start.d.ts.map +1 -0
  213. package/dist/cli/commands/session/start.js +189 -0
  214. package/dist/cli/commands/session/start.js.map +1 -0
  215. package/dist/cli/commands/session/status.d.ts +12 -0
  216. package/dist/cli/commands/session/status.d.ts.map +1 -0
  217. package/dist/cli/commands/session/status.js +93 -0
  218. package/dist/cli/commands/session/status.js.map +1 -0
  219. package/dist/cli/commands/session/types.d.ts +179 -0
  220. package/dist/cli/commands/session/types.d.ts.map +1 -0
  221. package/dist/cli/commands/session/types.js +8 -0
  222. package/dist/cli/commands/session/types.js.map +1 -0
  223. package/dist/cli/commands/session/utils.d.ts +24 -0
  224. package/dist/cli/commands/session/utils.d.ts.map +1 -0
  225. package/dist/cli/commands/session/utils.js +72 -0
  226. package/dist/cli/commands/session/utils.js.map +1 -0
  227. package/dist/cli/commands/specs.d.ts +16 -0
  228. package/dist/cli/commands/specs.d.ts.map +1 -0
  229. package/dist/cli/commands/specs.js +212 -0
  230. package/dist/cli/commands/specs.js.map +1 -0
  231. package/dist/cli/commands/specs.types.d.ts +120 -0
  232. package/dist/cli/commands/specs.types.d.ts.map +1 -0
  233. package/dist/cli/commands/specs.types.js +75 -0
  234. package/dist/cli/commands/specs.types.js.map +1 -0
  235. package/dist/cli/commands/status.d.ts +17 -0
  236. package/dist/cli/commands/status.d.ts.map +1 -0
  237. package/dist/cli/commands/status.js +271 -0
  238. package/dist/cli/commands/status.js.map +1 -0
  239. package/dist/cli/commands/status.types.d.ts +382 -0
  240. package/dist/cli/commands/status.types.d.ts.map +1 -0
  241. package/dist/cli/commands/status.types.js +166 -0
  242. package/dist/cli/commands/status.types.js.map +1 -0
  243. package/dist/cli/commands/switch.d.ts +18 -0
  244. package/dist/cli/commands/switch.d.ts.map +1 -0
  245. package/dist/cli/commands/switch.js +181 -0
  246. package/dist/cli/commands/switch.js.map +1 -0
  247. package/dist/cli/commands/switch.types.d.ts +123 -0
  248. package/dist/cli/commands/switch.types.d.ts.map +1 -0
  249. package/dist/cli/commands/switch.types.js +65 -0
  250. package/dist/cli/commands/switch.types.js.map +1 -0
  251. package/dist/cli/commands/ticket/command.d.ts +14 -0
  252. package/dist/cli/commands/ticket/command.d.ts.map +1 -0
  253. package/dist/cli/commands/ticket/command.js +141 -0
  254. package/dist/cli/commands/ticket/command.js.map +1 -0
  255. package/dist/cli/commands/ticket/display.d.ts +56 -0
  256. package/dist/cli/commands/ticket/display.d.ts.map +1 -0
  257. package/dist/cli/commands/ticket/display.js +205 -0
  258. package/dist/cli/commands/ticket/display.js.map +1 -0
  259. package/dist/cli/commands/ticket/index.d.ts +11 -0
  260. package/dist/cli/commands/ticket/index.d.ts.map +1 -0
  261. package/dist/cli/commands/ticket/index.js +11 -0
  262. package/dist/cli/commands/ticket/index.js.map +1 -0
  263. package/dist/cli/commands/ticket/register.d.ts +11 -0
  264. package/dist/cli/commands/ticket/register.d.ts.map +1 -0
  265. package/dist/cli/commands/ticket/register.js +39 -0
  266. package/dist/cli/commands/ticket/register.js.map +1 -0
  267. package/dist/cli/commands/ticket/resolver.d.ts +16 -0
  268. package/dist/cli/commands/ticket/resolver.d.ts.map +1 -0
  269. package/dist/cli/commands/ticket/resolver.js +35 -0
  270. package/dist/cli/commands/ticket/resolver.js.map +1 -0
  271. package/dist/cli/commands/ticket/types.d.ts +157 -0
  272. package/dist/cli/commands/ticket/types.d.ts.map +1 -0
  273. package/dist/cli/commands/ticket/types.js +8 -0
  274. package/dist/cli/commands/ticket/types.js.map +1 -0
  275. package/dist/cli/commands/tickets.d.ts +16 -0
  276. package/dist/cli/commands/tickets.d.ts.map +1 -0
  277. package/dist/cli/commands/tickets.js +271 -0
  278. package/dist/cli/commands/tickets.js.map +1 -0
  279. package/dist/cli/commands/tickets.types.d.ts +202 -0
  280. package/dist/cli/commands/tickets.types.d.ts.map +1 -0
  281. package/dist/cli/commands/tickets.types.js +138 -0
  282. package/dist/cli/commands/tickets.types.js.map +1 -0
  283. package/dist/cli/config/index.d.ts +11 -0
  284. package/dist/cli/config/index.d.ts.map +1 -0
  285. package/dist/cli/config/index.js +11 -0
  286. package/dist/cli/config/index.js.map +1 -0
  287. package/dist/cli/config/loader.d.ts +98 -0
  288. package/dist/cli/config/loader.d.ts.map +1 -0
  289. package/dist/cli/config/loader.js +237 -0
  290. package/dist/cli/config/loader.js.map +1 -0
  291. package/dist/cli/config/paths.d.ts +96 -0
  292. package/dist/cli/config/paths.d.ts.map +1 -0
  293. package/dist/cli/config/paths.js +140 -0
  294. package/dist/cli/config/paths.js.map +1 -0
  295. package/dist/cli/config/types.d.ts +148 -0
  296. package/dist/cli/config/types.d.ts.map +1 -0
  297. package/dist/cli/config/types.js +34 -0
  298. package/dist/cli/config/types.js.map +1 -0
  299. package/dist/cli/config/writer.d.ts +171 -0
  300. package/dist/cli/config/writer.d.ts.map +1 -0
  301. package/dist/cli/config/writer.js +312 -0
  302. package/dist/cli/config/writer.js.map +1 -0
  303. package/dist/cli/index.d.ts +30 -0
  304. package/dist/cli/index.d.ts.map +1 -0
  305. package/dist/cli/index.js +183 -0
  306. package/dist/cli/index.js.map +1 -0
  307. package/dist/cli/middleware/auth-guard.d.ts +107 -0
  308. package/dist/cli/middleware/auth-guard.d.ts.map +1 -0
  309. package/dist/cli/middleware/auth-guard.js +190 -0
  310. package/dist/cli/middleware/auth-guard.js.map +1 -0
  311. package/dist/cli/middleware/error-handler.d.ts +133 -0
  312. package/dist/cli/middleware/error-handler.d.ts.map +1 -0
  313. package/dist/cli/middleware/error-handler.js +209 -0
  314. package/dist/cli/middleware/error-handler.js.map +1 -0
  315. package/dist/cli/middleware/index.d.ts +6 -0
  316. package/dist/cli/middleware/index.d.ts.map +1 -0
  317. package/dist/cli/middleware/index.js +6 -0
  318. package/dist/cli/middleware/index.js.map +1 -0
  319. package/dist/cli/templates/commands.d.ts +20 -0
  320. package/dist/cli/templates/commands.d.ts.map +1 -0
  321. package/dist/cli/templates/commands.js +174 -0
  322. package/dist/cli/templates/commands.js.map +1 -0
  323. package/dist/cli/templates/content/sf-autonomous.d.ts +7 -0
  324. package/dist/cli/templates/content/sf-autonomous.d.ts.map +1 -0
  325. package/dist/cli/templates/content/sf-autonomous.js +78 -0
  326. package/dist/cli/templates/content/sf-autonomous.js.map +1 -0
  327. package/dist/cli/templates/content/sf-blockers.d.ts +7 -0
  328. package/dist/cli/templates/content/sf-blockers.d.ts.map +1 -0
  329. package/dist/cli/templates/content/sf-blockers.js +68 -0
  330. package/dist/cli/templates/content/sf-blockers.js.map +1 -0
  331. package/dist/cli/templates/content/sf-commit.d.ts +7 -0
  332. package/dist/cli/templates/content/sf-commit.d.ts.map +1 -0
  333. package/dist/cli/templates/content/sf-commit.js +78 -0
  334. package/dist/cli/templates/content/sf-commit.js.map +1 -0
  335. package/dist/cli/templates/content/sf-context.d.ts +7 -0
  336. package/dist/cli/templates/content/sf-context.d.ts.map +1 -0
  337. package/dist/cli/templates/content/sf-context.js +64 -0
  338. package/dist/cli/templates/content/sf-context.js.map +1 -0
  339. package/dist/cli/templates/content/sf-create-epics.d.ts +7 -0
  340. package/dist/cli/templates/content/sf-create-epics.d.ts.map +1 -0
  341. package/dist/cli/templates/content/sf-create-epics.js +70 -0
  342. package/dist/cli/templates/content/sf-create-epics.js.map +1 -0
  343. package/dist/cli/templates/content/sf-create-spec.d.ts +7 -0
  344. package/dist/cli/templates/content/sf-create-spec.d.ts.map +1 -0
  345. package/dist/cli/templates/content/sf-create-spec.js +67 -0
  346. package/dist/cli/templates/content/sf-create-spec.js.map +1 -0
  347. package/dist/cli/templates/content/sf-create-tickets.d.ts +7 -0
  348. package/dist/cli/templates/content/sf-create-tickets.d.ts.map +1 -0
  349. package/dist/cli/templates/content/sf-create-tickets.js +76 -0
  350. package/dist/cli/templates/content/sf-create-tickets.js.map +1 -0
  351. package/dist/cli/templates/content/sf-epic.d.ts +7 -0
  352. package/dist/cli/templates/content/sf-epic.d.ts.map +1 -0
  353. package/dist/cli/templates/content/sf-epic.js +69 -0
  354. package/dist/cli/templates/content/sf-epic.js.map +1 -0
  355. package/dist/cli/templates/content/sf-help.d.ts +7 -0
  356. package/dist/cli/templates/content/sf-help.d.ts.map +1 -0
  357. package/dist/cli/templates/content/sf-help.js +61 -0
  358. package/dist/cli/templates/content/sf-help.js.map +1 -0
  359. package/dist/cli/templates/content/sf-import.d.ts +7 -0
  360. package/dist/cli/templates/content/sf-import.d.ts.map +1 -0
  361. package/dist/cli/templates/content/sf-import.js +88 -0
  362. package/dist/cli/templates/content/sf-import.js.map +1 -0
  363. package/dist/cli/templates/content/sf-init.d.ts +7 -0
  364. package/dist/cli/templates/content/sf-init.d.ts.map +1 -0
  365. package/dist/cli/templates/content/sf-init.js +61 -0
  366. package/dist/cli/templates/content/sf-init.js.map +1 -0
  367. package/dist/cli/templates/content/sf-next.d.ts +7 -0
  368. package/dist/cli/templates/content/sf-next.d.ts.map +1 -0
  369. package/dist/cli/templates/content/sf-next.js +67 -0
  370. package/dist/cli/templates/content/sf-next.js.map +1 -0
  371. package/dist/cli/templates/content/sf-reset.d.ts +7 -0
  372. package/dist/cli/templates/content/sf-reset.d.ts.map +1 -0
  373. package/dist/cli/templates/content/sf-reset.js +78 -0
  374. package/dist/cli/templates/content/sf-reset.js.map +1 -0
  375. package/dist/cli/templates/content/sf-review.d.ts +7 -0
  376. package/dist/cli/templates/content/sf-review.d.ts.map +1 -0
  377. package/dist/cli/templates/content/sf-review.js +67 -0
  378. package/dist/cli/templates/content/sf-review.js.map +1 -0
  379. package/dist/cli/templates/content/sf-search.d.ts +7 -0
  380. package/dist/cli/templates/content/sf-search.d.ts.map +1 -0
  381. package/dist/cli/templates/content/sf-search.js +64 -0
  382. package/dist/cli/templates/content/sf-search.js.map +1 -0
  383. package/dist/cli/templates/content/sf-status.d.ts +7 -0
  384. package/dist/cli/templates/content/sf-status.d.ts.map +1 -0
  385. package/dist/cli/templates/content/sf-status.js +67 -0
  386. package/dist/cli/templates/content/sf-status.js.map +1 -0
  387. package/dist/cli/templates/content/sf-ticket.d.ts +7 -0
  388. package/dist/cli/templates/content/sf-ticket.d.ts.map +1 -0
  389. package/dist/cli/templates/content/sf-ticket.js +76 -0
  390. package/dist/cli/templates/content/sf-ticket.js.map +1 -0
  391. package/dist/cli/templates/content/sf-validate.d.ts +7 -0
  392. package/dist/cli/templates/content/sf-validate.d.ts.map +1 -0
  393. package/dist/cli/templates/content/sf-validate.js +78 -0
  394. package/dist/cli/templates/content/sf-validate.js.map +1 -0
  395. package/dist/cli/templates/index.d.ts +7 -0
  396. package/dist/cli/templates/index.d.ts.map +1 -0
  397. package/dist/cli/templates/index.js +7 -0
  398. package/dist/cli/templates/index.js.map +1 -0
  399. package/dist/cli/ui/colors.d.ts +76 -0
  400. package/dist/cli/ui/colors.d.ts.map +1 -0
  401. package/dist/cli/ui/colors.js +81 -0
  402. package/dist/cli/ui/colors.js.map +1 -0
  403. package/dist/cli/ui/dashboard.d.ts +54 -0
  404. package/dist/cli/ui/dashboard.d.ts.map +1 -0
  405. package/dist/cli/ui/dashboard.js +339 -0
  406. package/dist/cli/ui/dashboard.js.map +1 -0
  407. package/dist/cli/ui/index.d.ts +7 -0
  408. package/dist/cli/ui/index.d.ts.map +1 -0
  409. package/dist/cli/ui/index.js +7 -0
  410. package/dist/cli/ui/index.js.map +1 -0
  411. package/dist/cli/ui/output.d.ts +117 -0
  412. package/dist/cli/ui/output.d.ts.map +1 -0
  413. package/dist/cli/ui/output.js +172 -0
  414. package/dist/cli/ui/output.js.map +1 -0
  415. package/dist/cli/ui/spinner.d.ts +105 -0
  416. package/dist/cli/ui/spinner.d.ts.map +1 -0
  417. package/dist/cli/ui/spinner.js +148 -0
  418. package/dist/cli/ui/spinner.js.map +1 -0
  419. package/dist/cli/ui/time.d.ts +54 -0
  420. package/dist/cli/ui/time.d.ts.map +1 -0
  421. package/dist/cli/ui/time.js +173 -0
  422. package/dist/cli/ui/time.js.map +1 -0
  423. package/dist/lib/format.d.ts +4 -4
  424. package/dist/lib/format.js +5 -5
  425. package/dist/server.js +8 -8
  426. package/dist/server.js.map +1 -1
  427. package/dist/tools/core/session.js +6 -6
  428. package/dist/tools/core/session.js.map +1 -1
  429. package/dist/tools/index.js +9 -9
  430. package/dist/tools/index.js.map +1 -1
  431. package/dist/validation/index.js +1 -1
  432. package/dist/validation/index.js.map +1 -1
  433. package/package.json +9 -2
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Ticket Command Types & Interfaces
3
+ *
4
+ * Type definitions for the ticket detail command, including ticket data structures,
5
+ * display options, and code/type reference formats.
6
+ */
7
+ /**
8
+ * Command options for ticket detail
9
+ */
10
+ export interface TicketCommandOptions {
11
+ json?: boolean;
12
+ toon?: boolean;
13
+ }
14
+ /**
15
+ * Code reference attached to a ticket
16
+ */
17
+ export interface CodeReference {
18
+ /** Reference name/title */
19
+ name: string;
20
+ /** Code snippet */
21
+ code: string;
22
+ /** Programming language for syntax highlighting */
23
+ language?: string;
24
+ }
25
+ /**
26
+ * Type definition reference attached to a ticket
27
+ */
28
+ export interface TypeReference {
29
+ /** Type name */
30
+ name: string;
31
+ /** Type definition (TypeScript code) */
32
+ definition: string;
33
+ }
34
+ /**
35
+ * Acceptance criteria validation status
36
+ */
37
+ export interface AcceptanceCriteriaValidation {
38
+ /** The criterion text */
39
+ criterion: string;
40
+ /** Validation status */
41
+ status: 'pending' | 'passed' | 'failed';
42
+ /** Optional notes explaining the status */
43
+ notes?: string;
44
+ }
45
+ /**
46
+ * Ticket implementation details
47
+ */
48
+ export interface TicketImplementation {
49
+ /** Implementation approach description */
50
+ approach?: string;
51
+ /** Additional implementation notes */
52
+ notes?: string;
53
+ /** Files to be modified/created */
54
+ files?: string[];
55
+ }
56
+ /**
57
+ * Epic summary for ticket context
58
+ */
59
+ export interface TicketEpicSummary {
60
+ id: string;
61
+ title: string;
62
+ }
63
+ /**
64
+ * Ticket priority levels
65
+ */
66
+ export type TicketPriority = 'critical' | 'high' | 'medium' | 'low';
67
+ /**
68
+ * Ticket status values
69
+ */
70
+ export type TicketStatus = 'pending' | 'in_progress' | 'done' | 'blocked' | 'cancelled';
71
+ /**
72
+ * Ticket complexity levels
73
+ */
74
+ export type TicketComplexity = 'trivial' | 'low' | 'medium' | 'high' | 'complex';
75
+ /**
76
+ * Complete ticket detail structure
77
+ */
78
+ export interface Ticket {
79
+ /** Unique ticket ID */
80
+ id: string;
81
+ /** Sequential ticket number within specification */
82
+ ticketNumber: number;
83
+ /** Ticket title */
84
+ title: string;
85
+ /** Detailed description */
86
+ description?: string;
87
+ /** Priority level */
88
+ priority: TicketPriority;
89
+ /** Current status */
90
+ status: TicketStatus;
91
+ /** Complexity estimate */
92
+ complexity?: TicketComplexity;
93
+ /** Estimated hours to complete */
94
+ estimatedHours?: number;
95
+ /** Actual hours spent */
96
+ actualHours?: number;
97
+ /** List of acceptance criteria */
98
+ acceptanceCriteria?: string[];
99
+ /** Validation status for each criterion */
100
+ acceptanceCriteriaValidation?: AcceptanceCriteriaValidation[];
101
+ /** Technical implementation details */
102
+ technicalDetails?: string;
103
+ /** Implementation notes and approach */
104
+ implementation?: TicketImplementation;
105
+ /** IDs of tickets this ticket blocks */
106
+ dependencies?: string[];
107
+ /** IDs of tickets blocking this ticket */
108
+ blockedBy?: string[];
109
+ /** Code snippets referenced by this ticket */
110
+ codeReferences?: CodeReference[];
111
+ /** Type definitions referenced by this ticket */
112
+ typeReferences?: TypeReference[];
113
+ /** Parent epic information */
114
+ epic?: TicketEpicSummary;
115
+ /** Creation timestamp */
116
+ createdAt?: string;
117
+ /** Last update timestamp */
118
+ updatedAt?: string;
119
+ }
120
+ /**
121
+ * Minimal ticket info for dependency display
122
+ */
123
+ export interface TicketSummary {
124
+ id: string;
125
+ ticketNumber: number;
126
+ title: string;
127
+ status: TicketStatus;
128
+ }
129
+ /**
130
+ * Color function type for chalk styling
131
+ */
132
+ export type ColorFunction = (text: string) => string;
133
+ /**
134
+ * Section display configuration
135
+ */
136
+ export interface TicketSection {
137
+ /** Section title */
138
+ title: string;
139
+ /** Section icon (emoji) */
140
+ icon: string;
141
+ /** Whether the section has content to display */
142
+ hasContent: boolean;
143
+ /** Render function for the section */
144
+ render: () => void;
145
+ }
146
+ /**
147
+ * Ticket formatting options
148
+ */
149
+ export interface TicketFormatOptions {
150
+ /** Show colors in output */
151
+ colors: boolean;
152
+ /** Show icons/emojis */
153
+ icons: boolean;
154
+ /** Wrap long lines at this width */
155
+ wrapWidth?: number;
156
+ }
157
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/ticket/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC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EAAE,MAAM,EAAE,CAAC;IACrB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,iDAAiD;IACjD,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,8BAA8B;IAC9B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,wBAAwB;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Ticket Command Types & Interfaces
3
+ *
4
+ * Type definitions for the ticket detail command, including ticket data structures,
5
+ * display options, and code/type reference formats.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cli/commands/ticket/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Tickets Command
3
+ *
4
+ * Lists tickets for the current specification with filtering options.
5
+ */
6
+ import { Command } from 'commander';
7
+ import { TicketsOptions } from './tickets.types.js';
8
+ /**
9
+ * Tickets command action handler
10
+ */
11
+ export declare function ticketsAction(options: TicketsOptions): Promise<void>;
12
+ /**
13
+ * Register tickets command with Commander
14
+ */
15
+ export declare function registerTicketsCommand(program: Command): void;
16
+ //# sourceMappingURL=tickets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tickets.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/tickets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,OAAO,EACL,cAAc,EAaf,MAAM,oBAAoB,CAAC;AA8I5B;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAuI1E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoC7D"}
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Tickets Command
3
+ *
4
+ * Lists tickets for the current specification with filtering options.
5
+ */
6
+ import ora from 'ora';
7
+ import Table from 'cli-table3';
8
+ import { resolveConfig } from '../config/index.js';
9
+ import { withErrorHandler, CliError, NetworkError, ValidationError } from '../middleware/error-handler.js';
10
+ import { printBlank, printHeader } from '../ui/output.js';
11
+ import { colors } from '../ui/colors.js';
12
+ import { ApiClient } from '../../client/api-client.js';
13
+ import { formatTicketNumber, truncateTitle, isTicketBlocked, isValidStatus, isValidPriority, VALID_STATUSES, VALID_PRIORITIES, } from './tickets.types.js';
14
+ /**
15
+ * Get chalk color function for priority
16
+ */
17
+ function getPriorityColorFn(priority) {
18
+ switch (priority) {
19
+ case 'critical':
20
+ return colors.error;
21
+ case 'high':
22
+ return colors.warning;
23
+ case 'medium':
24
+ return colors.primary;
25
+ case 'low':
26
+ return colors.muted;
27
+ default:
28
+ return (s) => s;
29
+ }
30
+ }
31
+ /**
32
+ * Get chalk color function for status
33
+ */
34
+ function getStatusColorFn(status) {
35
+ switch (status) {
36
+ case 'done':
37
+ return colors.success;
38
+ case 'in_progress':
39
+ return colors.primary;
40
+ case 'pending':
41
+ return colors.warning;
42
+ case 'blocked':
43
+ return colors.error;
44
+ default:
45
+ return (s) => s;
46
+ }
47
+ }
48
+ /**
49
+ * Format tickets as TOON
50
+ */
51
+ function formatTicketsAsToon(tickets, specTitle) {
52
+ const lines = [`@tickets (${specTitle})`];
53
+ for (const ticket of tickets) {
54
+ const blocked = isTicketBlocked(ticket) ? ' [BLOCKED]' : '';
55
+ lines.push(` ${formatTicketNumber(ticket.ticketNumber)}${blocked}`);
56
+ lines.push(` title: ${ticket.title}`);
57
+ lines.push(` priority: ${ticket.priority}`);
58
+ lines.push(` status: ${ticket.status}`);
59
+ if (ticket.epicId) {
60
+ lines.push(` epic: ${ticket.epicId}`);
61
+ }
62
+ }
63
+ return lines.join('\n');
64
+ }
65
+ /**
66
+ * Display tickets as table
67
+ */
68
+ function displayTicketsTable(tickets, specTitle) {
69
+ printBlank();
70
+ printHeader(`Tickets (${specTitle})`);
71
+ printBlank();
72
+ const table = new Table({
73
+ head: [
74
+ colors.muted('#'),
75
+ colors.muted('TITLE'),
76
+ colors.muted('PRIORITY'),
77
+ colors.muted('STATUS'),
78
+ colors.muted('BLOCKED'),
79
+ ],
80
+ style: {
81
+ head: [],
82
+ border: [],
83
+ },
84
+ chars: {
85
+ 'top': '', 'top-mid': '', 'top-left': '', 'top-right': '',
86
+ 'bottom': '', 'bottom-mid': '', 'bottom-left': '', 'bottom-right': '',
87
+ 'left': '', 'left-mid': '', 'mid': '', 'mid-mid': '',
88
+ 'right': '', 'right-mid': '', 'middle': ' ',
89
+ },
90
+ colWidths: [7, 42, 12, 14, 10],
91
+ });
92
+ for (const ticket of tickets) {
93
+ const priorityColor = getPriorityColorFn(ticket.priority);
94
+ const statusColor = getStatusColorFn(ticket.status);
95
+ const blocked = isTicketBlocked(ticket);
96
+ table.push([
97
+ formatTicketNumber(ticket.ticketNumber),
98
+ truncateTitle(ticket.title),
99
+ priorityColor(ticket.priority),
100
+ statusColor(ticket.status),
101
+ blocked ? colors.error('Yes') : colors.muted('No'),
102
+ ]);
103
+ }
104
+ console.log(table.toString());
105
+ printBlank();
106
+ }
107
+ /**
108
+ * Display empty state
109
+ */
110
+ function displayEmptyState(specTitle, hasFilters) {
111
+ printBlank();
112
+ console.log(colors.muted(`No tickets found in "${specTitle}".`));
113
+ if (hasFilters) {
114
+ console.log(colors.muted('Try adjusting your filters.'));
115
+ }
116
+ printBlank();
117
+ }
118
+ /**
119
+ * Display summary footer
120
+ */
121
+ function displaySummary(tickets, limit) {
122
+ const blockedCount = tickets.filter(isTicketBlocked).length;
123
+ const parts = [`${tickets.length} ticket${tickets.length !== 1 ? 's' : ''}`];
124
+ if (limit) {
125
+ parts.push(`(limited to ${limit})`);
126
+ }
127
+ if (blockedCount > 0) {
128
+ parts.push(`${blockedCount} blocked`);
129
+ }
130
+ console.log(colors.muted(parts.join(' | ')));
131
+ printBlank();
132
+ }
133
+ /**
134
+ * Tickets command action handler
135
+ */
136
+ export async function ticketsAction(options) {
137
+ const config = resolveConfig();
138
+ if (!config.apiKey) {
139
+ throw new CliError('Not authenticated', 1, 'Run `specforge-mcp login` to authenticate first');
140
+ }
141
+ if (!config.specificationId) {
142
+ throw new CliError('No specification configured', 1, "Run 'specforge-mcp init' or 'specforge-mcp switch <spec-id>' to set a specification");
143
+ }
144
+ // Validate filters
145
+ if (options.status && !isValidStatus(options.status)) {
146
+ throw new ValidationError(`Invalid status: ${options.status}`, `Valid statuses: ${VALID_STATUSES.join(', ')}`);
147
+ }
148
+ if (options.priority && !isValidPriority(options.priority)) {
149
+ throw new ValidationError(`Invalid priority: ${options.priority}`, `Valid priorities: ${VALID_PRIORITIES.join(', ')}`);
150
+ }
151
+ const spinner = ora({
152
+ text: 'Fetching tickets...',
153
+ color: 'cyan',
154
+ }).start();
155
+ try {
156
+ const client = new ApiClient({
157
+ apiKey: config.apiKey,
158
+ apiUrl: config.apiUrl,
159
+ debug: config.debug,
160
+ });
161
+ // Get specification info for header
162
+ let specTitle = config.specificationId;
163
+ try {
164
+ const specResponse = await client.call('get_specification', {
165
+ specificationId: config.specificationId,
166
+ });
167
+ specTitle = specResponse.title || config.specificationId;
168
+ }
169
+ catch {
170
+ // Use spec ID if name fetch fails
171
+ }
172
+ // Build query parameters
173
+ const queryParams = {
174
+ specificationId: config.specificationId,
175
+ };
176
+ if (options.epic) {
177
+ queryParams.epicId = options.epic;
178
+ }
179
+ if (options.status) {
180
+ queryParams.status = options.status;
181
+ }
182
+ if (options.priority) {
183
+ queryParams.priority = options.priority;
184
+ }
185
+ if (options.limit) {
186
+ queryParams.limit = parseInt(options.limit, 10);
187
+ }
188
+ // Fetch tickets
189
+ const response = await client.call('list_tickets', queryParams);
190
+ spinner.stop();
191
+ const tickets = response.tickets || [];
192
+ const hasFilters = !!(options.epic || options.status || options.priority);
193
+ // Handle empty state
194
+ if (tickets.length === 0) {
195
+ displayEmptyState(specTitle, hasFilters);
196
+ return;
197
+ }
198
+ // Output based on format
199
+ if (options.json) {
200
+ console.log(JSON.stringify({
201
+ specification: specTitle,
202
+ tickets,
203
+ filters: hasFilters ? {
204
+ epic: options.epic,
205
+ status: options.status,
206
+ priority: options.priority,
207
+ } : undefined,
208
+ }, null, 2));
209
+ return;
210
+ }
211
+ if (options.toon) {
212
+ console.log(formatTicketsAsToon(tickets, specTitle));
213
+ return;
214
+ }
215
+ // Default: table format
216
+ displayTicketsTable(tickets, specTitle);
217
+ displaySummary(tickets, options.limit);
218
+ }
219
+ catch (error) {
220
+ spinner.fail('Failed to fetch tickets');
221
+ const message = error instanceof Error ? error.message : 'Unknown error';
222
+ if (message.includes('404') || message.includes('not found')) {
223
+ throw new CliError('Specification not found', 1, 'The configured specification may have been deleted. Run `specforge-mcp init` to select a new one.');
224
+ }
225
+ if (message.includes('401') || message.includes('Unauthorized')) {
226
+ throw new CliError('Authentication failed', 1, 'Your API key may be invalid. Run `specforge-mcp login` to re-authenticate');
227
+ }
228
+ throw new NetworkError(`Failed to fetch tickets: ${message}`);
229
+ }
230
+ }
231
+ /**
232
+ * Register tickets command with Commander
233
+ */
234
+ export function registerTicketsCommand(program) {
235
+ program
236
+ .command('tickets')
237
+ .description('List tickets in the current specification')
238
+ .option('--epic <id>', 'Filter by epic ID')
239
+ .option('--status <status>', 'Filter by status (pending, in_progress, done, blocked)')
240
+ .option('--priority <priority>', 'Filter by priority (critical, high, medium, low)')
241
+ .option('--limit <n>', 'Limit number of results')
242
+ .option('--json', 'Output as JSON')
243
+ .option('--toon', 'Output as TOON format')
244
+ .addHelpText('after', `
245
+ Examples:
246
+ $ specforge-mcp tickets # List all tickets
247
+ $ specforge-mcp tickets --status pending # Filter by status
248
+ $ specforge-mcp tickets --priority high # Filter by priority
249
+ $ specforge-mcp tickets --epic epic_abc123 # Filter by epic
250
+ $ specforge-mcp tickets --status pending --priority high # Combine filters
251
+ $ specforge-mcp tickets --limit 10 # Limit results
252
+ $ specforge-mcp tickets --json # Output as JSON
253
+
254
+ Valid statuses: pending, in_progress, done, blocked
255
+ Valid priorities: critical, high, medium, low
256
+
257
+ Priority colors:
258
+ ${colors.error('critical')} - Immediate attention needed
259
+ ${colors.warning('high')} - Important, address soon
260
+ ${colors.primary('medium')} - Normal priority
261
+ ${colors.muted('low')} - Can wait
262
+
263
+ Status colors:
264
+ ${colors.success('done')} - Completed
265
+ ${colors.primary('in_progress')} - Currently being worked on
266
+ ${colors.warning('pending')} - Not yet started
267
+ ${colors.error('blocked')} - Blocked by dependencies
268
+ `)
269
+ .action(withErrorHandler(ticketsAction));
270
+ }
271
+ //# sourceMappingURL=tickets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tickets.js","sourceRoot":"","sources":["../../../src/cli/commands/tickets.ts"],"names":[],"mappings":"AAA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UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,2CAA2C,CAAC;SACxD,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC;SAC1C,MAAM,CAAC,mBAAmB,EAAE,wDAAwD,CAAC;SACrF,MAAM,CAAC,uBAAuB,EAAE,kDAAkD,CAAC;SACnF,MAAM,CAAC,aAAa,EAAE,yBAAyB,CAAC;SAChD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,QAAQ,EAAE,uBAAuB,CAAC;SACzC,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;;;IActB,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;IACxB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACtB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;IACxB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;;;IAGnB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACtB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;IAC7B,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;SACG,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Tickets Command Types
3
+ *
4
+ * Type definitions for the tickets list command.
5
+ */
6
+ /**
7
+ * Tickets command options from Commander
8
+ */
9
+ export interface TicketsOptions {
10
+ /** Filter by epic ID */
11
+ epic?: string;
12
+ /** Filter by status */
13
+ status?: TicketStatus;
14
+ /** Filter by priority */
15
+ priority?: TicketPriority;
16
+ /** Limit number of results */
17
+ limit?: string;
18
+ /** Output as JSON */
19
+ json?: boolean;
20
+ /** Output as TOON format */
21
+ toon?: boolean;
22
+ }
23
+ /**
24
+ * Valid ticket statuses
25
+ */
26
+ export type TicketStatus = 'pending' | 'in_progress' | 'done' | 'blocked';
27
+ /**
28
+ * All valid ticket statuses
29
+ */
30
+ export declare const VALID_STATUSES: TicketStatus[];
31
+ /**
32
+ * Valid ticket priorities
33
+ */
34
+ export type TicketPriority = 'critical' | 'high' | 'medium' | 'low';
35
+ /**
36
+ * All valid ticket priorities
37
+ */
38
+ export declare const VALID_PRIORITIES: TicketPriority[];
39
+ /**
40
+ * Ticket data from API
41
+ */
42
+ export interface Ticket {
43
+ /** Ticket ID */
44
+ id: string;
45
+ /** Sequential ticket number within specification */
46
+ ticketNumber: number;
47
+ /** Ticket title */
48
+ title: string;
49
+ /** Ticket priority */
50
+ priority: TicketPriority;
51
+ /** Ticket status */
52
+ status: TicketStatus;
53
+ /** Epic ID this ticket belongs to (optional) */
54
+ epicId?: string;
55
+ /** List of ticket IDs that block this ticket */
56
+ blockedBy?: string[];
57
+ /** Ticket description (optional) */
58
+ description?: string;
59
+ /** Estimated complexity (optional) */
60
+ complexity?: string;
61
+ }
62
+ /**
63
+ * API request for list_tickets
64
+ */
65
+ export interface ListTicketsRequest {
66
+ /** Specification ID */
67
+ specificationId: string;
68
+ /** Filter by epic ID */
69
+ epicId?: string;
70
+ /** Filter by status */
71
+ status?: TicketStatus;
72
+ /** Filter by priority */
73
+ priority?: TicketPriority;
74
+ /** Limit number of results */
75
+ limit?: number;
76
+ }
77
+ /**
78
+ * API response for list_tickets
79
+ */
80
+ export interface ListTicketsApiResponse {
81
+ /** Array of tickets */
82
+ tickets: Ticket[];
83
+ /** Total count (for pagination) */
84
+ total?: number;
85
+ }
86
+ /**
87
+ * API response for get_specification (used for header)
88
+ */
89
+ export interface GetSpecificationApiResponse {
90
+ /** Specification ID */
91
+ id: string;
92
+ /** Specification title */
93
+ title: string;
94
+ /** Project ID */
95
+ projectId: string;
96
+ }
97
+ /**
98
+ * Tickets list response for output
99
+ */
100
+ export interface TicketsListResponse {
101
+ /** Specification title for display */
102
+ specification: string;
103
+ /** Array of tickets */
104
+ tickets: Ticket[];
105
+ /** Applied filters (for display) */
106
+ filters?: {
107
+ epic?: string;
108
+ status?: string;
109
+ priority?: string;
110
+ };
111
+ }
112
+ /**
113
+ * Table column configuration
114
+ */
115
+ export interface TicketTableColumn {
116
+ /** Column header */
117
+ header: string;
118
+ /** Column width */
119
+ width?: number;
120
+ /** Alignment */
121
+ align?: 'left' | 'right' | 'center';
122
+ }
123
+ /**
124
+ * Default table columns for tickets
125
+ */
126
+ export declare const TICKET_TABLE_COLUMNS: TicketTableColumn[];
127
+ /**
128
+ * Priority display colors (chalk color names)
129
+ */
130
+ export declare const PRIORITY_COLORS: Record<TicketPriority, string>;
131
+ /**
132
+ * Status display colors (chalk color names)
133
+ */
134
+ export declare const STATUS_COLORS: Record<TicketStatus, string>;
135
+ /**
136
+ * Maximum title length for table display
137
+ */
138
+ export declare const MAX_TITLE_LENGTH = 38;
139
+ /**
140
+ * Ticket number padding width
141
+ */
142
+ export declare const TICKET_NUMBER_WIDTH = 3;
143
+ /**
144
+ * Format ticket number with leading zeros
145
+ *
146
+ * @param num Ticket number
147
+ * @returns Formatted ticket number (e.g., "001", "042")
148
+ */
149
+ export declare function formatTicketNumber(num: number): string;
150
+ /**
151
+ * Truncate title if too long for display
152
+ *
153
+ * @param title Ticket title
154
+ * @param maxLength Maximum length (default: MAX_TITLE_LENGTH)
155
+ * @returns Truncated title with ellipsis if needed
156
+ */
157
+ export declare function truncateTitle(title: string, maxLength?: number): string;
158
+ /**
159
+ * Check if a ticket is blocked
160
+ *
161
+ * @param ticket Ticket to check
162
+ * @returns True if ticket has blockers
163
+ */
164
+ export declare function isTicketBlocked(ticket: Ticket): boolean;
165
+ /**
166
+ * Validate status filter
167
+ *
168
+ * @param status Status to validate
169
+ * @returns True if valid status
170
+ */
171
+ export declare function isValidStatus(status: string): status is TicketStatus;
172
+ /**
173
+ * Validate priority filter
174
+ *
175
+ * @param priority Priority to validate
176
+ * @returns True if valid priority
177
+ */
178
+ export declare function isValidPriority(priority: string): priority is TicketPriority;
179
+ /**
180
+ * Get count of blocked tickets
181
+ *
182
+ * @param tickets Array of tickets
183
+ * @returns Number of blocked tickets
184
+ */
185
+ export declare function countBlockedTickets(tickets: Ticket[]): number;
186
+ /**
187
+ * Get tickets by status
188
+ *
189
+ * @param tickets Array of tickets
190
+ * @param status Status to filter by
191
+ * @returns Filtered tickets
192
+ */
193
+ export declare function getTicketsByStatus(tickets: Ticket[], status: TicketStatus): Ticket[];
194
+ /**
195
+ * Get tickets by priority
196
+ *
197
+ * @param tickets Array of tickets
198
+ * @param priority Priority to filter by
199
+ * @returns Filtered tickets
200
+ */
201
+ export declare function getTicketsByPriority(tickets: Ticket[], priority: TicketPriority): Ticket[];
202
+ //# sourceMappingURL=tickets.types.d.ts.map