@jonit-dev/night-watch-cli 1.7.29 → 1.7.31

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 (384) hide show
  1. package/bin/night-watch.mjs +1 -1
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/{src/cli.js → cli.js} +1 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/{src/commands → commands}/audit.d.ts +2 -2
  7. package/dist/commands/audit.d.ts.map +1 -0
  8. package/dist/commands/audit.js +105 -0
  9. package/dist/commands/audit.js.map +1 -0
  10. package/dist/{src/commands → commands}/board.d.ts +1 -1
  11. package/dist/commands/board.d.ts.map +1 -0
  12. package/dist/commands/board.js +664 -0
  13. package/dist/commands/board.js.map +1 -0
  14. package/dist/{src/commands → commands}/cancel.d.ts +3 -3
  15. package/dist/commands/cancel.d.ts.map +1 -0
  16. package/dist/{src/commands → commands}/cancel.js +18 -20
  17. package/dist/commands/cancel.js.map +1 -0
  18. package/dist/commands/dashboard/tab-actions.d.ts.map +1 -0
  19. package/dist/commands/dashboard/tab-actions.js.map +1 -0
  20. package/dist/{src/commands → commands}/dashboard/tab-config.d.ts +3 -3
  21. package/dist/commands/dashboard/tab-config.d.ts.map +1 -0
  22. package/dist/{src/commands → commands}/dashboard/tab-config.js +250 -187
  23. package/dist/commands/dashboard/tab-config.js.map +1 -0
  24. package/dist/{src/commands → commands}/dashboard/tab-logs.d.ts +1 -1
  25. package/dist/commands/dashboard/tab-logs.d.ts.map +1 -0
  26. package/dist/{src/commands → commands}/dashboard/tab-logs.js +62 -38
  27. package/dist/commands/dashboard/tab-logs.js.map +1 -0
  28. package/dist/{src/commands → commands}/dashboard/tab-schedules.d.ts +1 -1
  29. package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -0
  30. package/dist/{src/commands → commands}/dashboard/tab-schedules.js +85 -76
  31. package/dist/commands/dashboard/tab-schedules.js.map +1 -0
  32. package/dist/{src/commands → commands}/dashboard/tab-status.d.ts +7 -7
  33. package/dist/commands/dashboard/tab-status.d.ts.map +1 -0
  34. package/dist/{src/commands → commands}/dashboard/tab-status.js +98 -95
  35. package/dist/commands/dashboard/tab-status.js.map +1 -0
  36. package/dist/{src/commands → commands}/dashboard/types.d.ts +3 -4
  37. package/dist/commands/dashboard/types.d.ts.map +1 -0
  38. package/dist/commands/dashboard/types.js.map +1 -0
  39. package/dist/{src/commands → commands}/dashboard.d.ts +2 -2
  40. package/dist/commands/dashboard.d.ts.map +1 -0
  41. package/dist/{src/commands → commands}/dashboard.js +32 -33
  42. package/dist/commands/dashboard.js.map +1 -0
  43. package/dist/{src/commands → commands}/doctor.d.ts +2 -2
  44. package/dist/commands/doctor.d.ts.map +1 -0
  45. package/dist/{src/commands → commands}/doctor.js +40 -43
  46. package/dist/commands/doctor.js.map +1 -0
  47. package/dist/{src/commands → commands}/history.d.ts +1 -1
  48. package/dist/commands/history.d.ts.map +1 -0
  49. package/dist/{src/commands → commands}/history.js +11 -18
  50. package/dist/commands/history.js.map +1 -0
  51. package/dist/{src/commands → commands}/init.d.ts +1 -1
  52. package/dist/commands/init.d.ts.map +1 -0
  53. package/dist/{src/commands → commands}/init.js +62 -36
  54. package/dist/commands/init.js.map +1 -0
  55. package/dist/{src/commands → commands}/install.d.ts +2 -2
  56. package/dist/commands/install.d.ts.map +1 -0
  57. package/dist/{src/commands → commands}/install.js +48 -50
  58. package/dist/commands/install.js.map +1 -0
  59. package/dist/{src/commands → commands}/logs.d.ts +1 -1
  60. package/dist/commands/logs.d.ts.map +1 -0
  61. package/dist/{src/commands → commands}/logs.js +29 -30
  62. package/dist/commands/logs.js.map +1 -0
  63. package/dist/{src/commands → commands}/prd-state.d.ts +1 -1
  64. package/dist/commands/prd-state.d.ts.map +1 -0
  65. package/dist/{src/commands → commands}/prd-state.js +14 -14
  66. package/dist/commands/prd-state.js.map +1 -0
  67. package/dist/{src/commands → commands}/prd.d.ts +1 -1
  68. package/dist/commands/prd.d.ts.map +1 -0
  69. package/dist/{src/commands → commands}/prd.js +57 -66
  70. package/dist/commands/prd.js.map +1 -0
  71. package/dist/{src/commands → commands}/prds.d.ts +1 -1
  72. package/dist/commands/prds.d.ts.map +1 -0
  73. package/dist/{src/commands → commands}/prds.js +51 -53
  74. package/dist/commands/prds.js.map +1 -0
  75. package/dist/{src/commands → commands}/prs.d.ts +1 -1
  76. package/dist/commands/prs.d.ts.map +1 -0
  77. package/dist/{src/commands → commands}/prs.js +22 -24
  78. package/dist/commands/prs.js.map +1 -0
  79. package/dist/{src/commands → commands}/qa.d.ts +2 -2
  80. package/dist/commands/qa.d.ts.map +1 -0
  81. package/dist/{src/commands → commands}/qa.js +50 -51
  82. package/dist/commands/qa.js.map +1 -0
  83. package/dist/{src/commands → commands}/retry.d.ts +1 -1
  84. package/dist/commands/retry.d.ts.map +1 -0
  85. package/dist/{src/commands → commands}/retry.js +9 -10
  86. package/dist/commands/retry.js.map +1 -0
  87. package/dist/{src/commands → commands}/review.d.ts +2 -2
  88. package/dist/commands/review.d.ts.map +1 -0
  89. package/dist/{src/commands → commands}/review.js +68 -59
  90. package/dist/commands/review.js.map +1 -0
  91. package/dist/{src/commands → commands}/run.d.ts +2 -2
  92. package/dist/commands/run.d.ts.map +1 -0
  93. package/dist/{src/commands → commands}/run.js +87 -83
  94. package/dist/commands/run.js.map +1 -0
  95. package/dist/{src/commands → commands}/serve.d.ts +2 -2
  96. package/dist/commands/serve.d.ts.map +1 -0
  97. package/dist/{src/commands → commands}/serve.js +18 -18
  98. package/dist/commands/serve.js.map +1 -0
  99. package/dist/{src/commands → commands}/slice.d.ts +2 -2
  100. package/dist/commands/slice.d.ts.map +1 -0
  101. package/dist/{src/commands → commands}/slice.js +50 -46
  102. package/dist/commands/slice.js.map +1 -0
  103. package/dist/{src/commands → commands}/state.d.ts +1 -1
  104. package/dist/commands/state.d.ts.map +1 -0
  105. package/dist/{src/commands → commands}/state.js +20 -22
  106. package/dist/commands/state.js.map +1 -0
  107. package/dist/{src/commands → commands}/status.d.ts +1 -1
  108. package/dist/commands/status.d.ts.map +1 -0
  109. package/dist/{src/commands → commands}/status.js +75 -54
  110. package/dist/commands/status.js.map +1 -0
  111. package/dist/{src/commands → commands}/uninstall.d.ts +1 -1
  112. package/dist/commands/uninstall.d.ts.map +1 -0
  113. package/dist/{src/commands → commands}/uninstall.js +12 -14
  114. package/dist/commands/uninstall.js.map +1 -0
  115. package/dist/{src/commands → commands}/update.d.ts +1 -1
  116. package/dist/commands/update.d.ts.map +1 -0
  117. package/dist/{src/commands → commands}/update.js +23 -23
  118. package/dist/commands/update.js.map +1 -0
  119. package/package.json +18 -42
  120. package/LICENSE +0 -21
  121. package/README.md +0 -132
  122. package/dist/shared/types.d.ts +0 -226
  123. package/dist/shared/types.d.ts.map +0 -1
  124. package/dist/shared/types.js +0 -7
  125. package/dist/shared/types.js.map +0 -1
  126. package/dist/src/agents/soul-compiler.d.ts +0 -11
  127. package/dist/src/agents/soul-compiler.d.ts.map +0 -1
  128. package/dist/src/agents/soul-compiler.js +0 -157
  129. package/dist/src/agents/soul-compiler.js.map +0 -1
  130. package/dist/src/board/factory.d.ts +0 -3
  131. package/dist/src/board/factory.d.ts.map +0 -1
  132. package/dist/src/board/factory.js +0 -10
  133. package/dist/src/board/factory.js.map +0 -1
  134. package/dist/src/board/providers/github-graphql.d.ts +0 -16
  135. package/dist/src/board/providers/github-graphql.d.ts.map +0 -1
  136. package/dist/src/board/providers/github-graphql.js +0 -43
  137. package/dist/src/board/providers/github-graphql.js.map +0 -1
  138. package/dist/src/board/providers/github-projects.d.ts +0 -51
  139. package/dist/src/board/providers/github-projects.d.ts.map +0 -1
  140. package/dist/src/board/providers/github-projects.js +0 -672
  141. package/dist/src/board/providers/github-projects.js.map +0 -1
  142. package/dist/src/board/types.d.ts +0 -60
  143. package/dist/src/board/types.d.ts.map +0 -1
  144. package/dist/src/board/types.js +0 -4
  145. package/dist/src/board/types.js.map +0 -1
  146. package/dist/src/cli.d.ts +0 -3
  147. package/dist/src/cli.d.ts.map +0 -1
  148. package/dist/src/cli.js.map +0 -1
  149. package/dist/src/commands/audit.d.ts.map +0 -1
  150. package/dist/src/commands/audit.js +0 -98
  151. package/dist/src/commands/audit.js.map +0 -1
  152. package/dist/src/commands/board.d.ts.map +0 -1
  153. package/dist/src/commands/board.js +0 -294
  154. package/dist/src/commands/board.js.map +0 -1
  155. package/dist/src/commands/cancel.d.ts.map +0 -1
  156. package/dist/src/commands/cancel.js.map +0 -1
  157. package/dist/src/commands/dashboard/tab-actions.d.ts.map +0 -1
  158. package/dist/src/commands/dashboard/tab-actions.js.map +0 -1
  159. package/dist/src/commands/dashboard/tab-config.d.ts.map +0 -1
  160. package/dist/src/commands/dashboard/tab-config.js.map +0 -1
  161. package/dist/src/commands/dashboard/tab-logs.d.ts.map +0 -1
  162. package/dist/src/commands/dashboard/tab-logs.js.map +0 -1
  163. package/dist/src/commands/dashboard/tab-schedules.d.ts.map +0 -1
  164. package/dist/src/commands/dashboard/tab-schedules.js.map +0 -1
  165. package/dist/src/commands/dashboard/tab-status.d.ts.map +0 -1
  166. package/dist/src/commands/dashboard/tab-status.js.map +0 -1
  167. package/dist/src/commands/dashboard/types.d.ts.map +0 -1
  168. package/dist/src/commands/dashboard/types.js.map +0 -1
  169. package/dist/src/commands/dashboard.d.ts.map +0 -1
  170. package/dist/src/commands/dashboard.js.map +0 -1
  171. package/dist/src/commands/doctor.d.ts.map +0 -1
  172. package/dist/src/commands/doctor.js.map +0 -1
  173. package/dist/src/commands/history.d.ts.map +0 -1
  174. package/dist/src/commands/history.js.map +0 -1
  175. package/dist/src/commands/init.d.ts.map +0 -1
  176. package/dist/src/commands/init.js.map +0 -1
  177. package/dist/src/commands/install.d.ts.map +0 -1
  178. package/dist/src/commands/install.js.map +0 -1
  179. package/dist/src/commands/logs.d.ts.map +0 -1
  180. package/dist/src/commands/logs.js.map +0 -1
  181. package/dist/src/commands/prd-state.d.ts.map +0 -1
  182. package/dist/src/commands/prd-state.js.map +0 -1
  183. package/dist/src/commands/prd.d.ts.map +0 -1
  184. package/dist/src/commands/prd.js.map +0 -1
  185. package/dist/src/commands/prds.d.ts.map +0 -1
  186. package/dist/src/commands/prds.js.map +0 -1
  187. package/dist/src/commands/prs.d.ts.map +0 -1
  188. package/dist/src/commands/prs.js.map +0 -1
  189. package/dist/src/commands/qa.d.ts.map +0 -1
  190. package/dist/src/commands/qa.js.map +0 -1
  191. package/dist/src/commands/retry.d.ts.map +0 -1
  192. package/dist/src/commands/retry.js.map +0 -1
  193. package/dist/src/commands/review.d.ts.map +0 -1
  194. package/dist/src/commands/review.js.map +0 -1
  195. package/dist/src/commands/run.d.ts.map +0 -1
  196. package/dist/src/commands/run.js.map +0 -1
  197. package/dist/src/commands/serve.d.ts.map +0 -1
  198. package/dist/src/commands/serve.js.map +0 -1
  199. package/dist/src/commands/slice.d.ts.map +0 -1
  200. package/dist/src/commands/slice.js.map +0 -1
  201. package/dist/src/commands/state.d.ts.map +0 -1
  202. package/dist/src/commands/state.js.map +0 -1
  203. package/dist/src/commands/status.d.ts.map +0 -1
  204. package/dist/src/commands/status.js.map +0 -1
  205. package/dist/src/commands/uninstall.d.ts.map +0 -1
  206. package/dist/src/commands/uninstall.js.map +0 -1
  207. package/dist/src/commands/update.d.ts.map +0 -1
  208. package/dist/src/commands/update.js.map +0 -1
  209. package/dist/src/config.d.ts +0 -23
  210. package/dist/src/config.d.ts.map +0 -1
  211. package/dist/src/config.js +0 -671
  212. package/dist/src/config.js.map +0 -1
  213. package/dist/src/constants.d.ts +0 -67
  214. package/dist/src/constants.d.ts.map +0 -1
  215. package/dist/src/constants.js +0 -131
  216. package/dist/src/constants.js.map +0 -1
  217. package/dist/src/server/index.d.ts +0 -23
  218. package/dist/src/server/index.d.ts.map +0 -1
  219. package/dist/src/server/index.js +0 -1704
  220. package/dist/src/server/index.js.map +0 -1
  221. package/dist/src/slack/channel-manager.d.ts +0 -32
  222. package/dist/src/slack/channel-manager.d.ts.map +0 -1
  223. package/dist/src/slack/channel-manager.js +0 -128
  224. package/dist/src/slack/channel-manager.js.map +0 -1
  225. package/dist/src/slack/client.d.ts +0 -76
  226. package/dist/src/slack/client.d.ts.map +0 -1
  227. package/dist/src/slack/client.js +0 -193
  228. package/dist/src/slack/client.js.map +0 -1
  229. package/dist/src/slack/deliberation.d.ts +0 -87
  230. package/dist/src/slack/deliberation.d.ts.map +0 -1
  231. package/dist/src/slack/deliberation.js +0 -1354
  232. package/dist/src/slack/deliberation.js.map +0 -1
  233. package/dist/src/slack/index.d.ts +0 -6
  234. package/dist/src/slack/index.d.ts.map +0 -1
  235. package/dist/src/slack/index.js +0 -5
  236. package/dist/src/slack/index.js.map +0 -1
  237. package/dist/src/slack/interaction-listener.d.ts +0 -130
  238. package/dist/src/slack/interaction-listener.d.ts.map +0 -1
  239. package/dist/src/slack/interaction-listener.js +0 -1329
  240. package/dist/src/slack/interaction-listener.js.map +0 -1
  241. package/dist/src/storage/json-state-migrator.d.ts +0 -24
  242. package/dist/src/storage/json-state-migrator.d.ts.map +0 -1
  243. package/dist/src/storage/json-state-migrator.js +0 -197
  244. package/dist/src/storage/json-state-migrator.js.map +0 -1
  245. package/dist/src/storage/repositories/index.d.ts +0 -25
  246. package/dist/src/storage/repositories/index.d.ts.map +0 -1
  247. package/dist/src/storage/repositories/index.js +0 -45
  248. package/dist/src/storage/repositories/index.js.map +0 -1
  249. package/dist/src/storage/repositories/interfaces.d.ts +0 -60
  250. package/dist/src/storage/repositories/interfaces.d.ts.map +0 -1
  251. package/dist/src/storage/repositories/interfaces.js +0 -6
  252. package/dist/src/storage/repositories/interfaces.js.map +0 -1
  253. package/dist/src/storage/repositories/sqlite/agent-persona-repository.d.ts +0 -33
  254. package/dist/src/storage/repositories/sqlite/agent-persona-repository.d.ts.map +0 -1
  255. package/dist/src/storage/repositories/sqlite/agent-persona-repository.js +0 -715
  256. package/dist/src/storage/repositories/sqlite/agent-persona-repository.js.map +0 -1
  257. package/dist/src/storage/repositories/sqlite/execution-history-repository.d.ts +0 -21
  258. package/dist/src/storage/repositories/sqlite/execution-history-repository.d.ts.map +0 -1
  259. package/dist/src/storage/repositories/sqlite/execution-history-repository.js +0 -94
  260. package/dist/src/storage/repositories/sqlite/execution-history-repository.js.map +0 -1
  261. package/dist/src/storage/repositories/sqlite/prd-state-repository.d.ts +0 -17
  262. package/dist/src/storage/repositories/sqlite/prd-state-repository.d.ts.map +0 -1
  263. package/dist/src/storage/repositories/sqlite/prd-state-repository.js +0 -74
  264. package/dist/src/storage/repositories/sqlite/prd-state-repository.js.map +0 -1
  265. package/dist/src/storage/repositories/sqlite/project-registry-repository.d.ts +0 -17
  266. package/dist/src/storage/repositories/sqlite/project-registry-repository.d.ts.map +0 -1
  267. package/dist/src/storage/repositories/sqlite/project-registry-repository.js +0 -43
  268. package/dist/src/storage/repositories/sqlite/project-registry-repository.js.map +0 -1
  269. package/dist/src/storage/repositories/sqlite/roadmap-state-repository.d.ts +0 -14
  270. package/dist/src/storage/repositories/sqlite/roadmap-state-repository.d.ts.map +0 -1
  271. package/dist/src/storage/repositories/sqlite/roadmap-state-repository.js +0 -47
  272. package/dist/src/storage/repositories/sqlite/roadmap-state-repository.js.map +0 -1
  273. package/dist/src/storage/repositories/sqlite/slack-discussion-repository.d.ts +0 -20
  274. package/dist/src/storage/repositories/sqlite/slack-discussion-repository.d.ts.map +0 -1
  275. package/dist/src/storage/repositories/sqlite/slack-discussion-repository.js +0 -88
  276. package/dist/src/storage/repositories/sqlite/slack-discussion-repository.js.map +0 -1
  277. package/dist/src/storage/sqlite/client.d.ts +0 -23
  278. package/dist/src/storage/sqlite/client.d.ts.map +0 -1
  279. package/dist/src/storage/sqlite/client.js +0 -47
  280. package/dist/src/storage/sqlite/client.js.map +0 -1
  281. package/dist/src/storage/sqlite/migrations.d.ts +0 -11
  282. package/dist/src/storage/sqlite/migrations.d.ts.map +0 -1
  283. package/dist/src/storage/sqlite/migrations.js +0 -94
  284. package/dist/src/storage/sqlite/migrations.js.map +0 -1
  285. package/dist/src/templates/prd-template.d.ts +0 -11
  286. package/dist/src/templates/prd-template.d.ts.map +0 -1
  287. package/dist/src/templates/prd-template.js +0 -166
  288. package/dist/src/templates/prd-template.js.map +0 -1
  289. package/dist/src/templates/slicer-prompt.d.ts +0 -54
  290. package/dist/src/templates/slicer-prompt.d.ts.map +0 -1
  291. package/dist/src/templates/slicer-prompt.js +0 -163
  292. package/dist/src/templates/slicer-prompt.js.map +0 -1
  293. package/dist/src/types.d.ts +0 -140
  294. package/dist/src/types.d.ts.map +0 -1
  295. package/dist/src/types.js +0 -5
  296. package/dist/src/types.js.map +0 -1
  297. package/dist/src/utils/avatar-generator.d.ts +0 -6
  298. package/dist/src/utils/avatar-generator.d.ts.map +0 -1
  299. package/dist/src/utils/avatar-generator.js +0 -133
  300. package/dist/src/utils/avatar-generator.js.map +0 -1
  301. package/dist/src/utils/checks.d.ts +0 -55
  302. package/dist/src/utils/checks.d.ts.map +0 -1
  303. package/dist/src/utils/checks.js +0 -246
  304. package/dist/src/utils/checks.js.map +0 -1
  305. package/dist/src/utils/config-writer.d.ts +0 -16
  306. package/dist/src/utils/config-writer.d.ts.map +0 -1
  307. package/dist/src/utils/config-writer.js +0 -45
  308. package/dist/src/utils/config-writer.js.map +0 -1
  309. package/dist/src/utils/crontab.d.ts +0 -62
  310. package/dist/src/utils/crontab.d.ts.map +0 -1
  311. package/dist/src/utils/crontab.js +0 -168
  312. package/dist/src/utils/crontab.js.map +0 -1
  313. package/dist/src/utils/execution-history.d.ts +0 -54
  314. package/dist/src/utils/execution-history.d.ts.map +0 -1
  315. package/dist/src/utils/execution-history.js +0 -80
  316. package/dist/src/utils/execution-history.js.map +0 -1
  317. package/dist/src/utils/github.d.ts +0 -40
  318. package/dist/src/utils/github.d.ts.map +0 -1
  319. package/dist/src/utils/github.js +0 -126
  320. package/dist/src/utils/github.js.map +0 -1
  321. package/dist/src/utils/notify.d.ts +0 -64
  322. package/dist/src/utils/notify.d.ts.map +0 -1
  323. package/dist/src/utils/notify.js +0 -405
  324. package/dist/src/utils/notify.js.map +0 -1
  325. package/dist/src/utils/prd-states.d.ts +0 -16
  326. package/dist/src/utils/prd-states.d.ts.map +0 -1
  327. package/dist/src/utils/prd-states.js +0 -28
  328. package/dist/src/utils/prd-states.js.map +0 -1
  329. package/dist/src/utils/registry.d.ts +0 -45
  330. package/dist/src/utils/registry.d.ts.map +0 -1
  331. package/dist/src/utils/registry.js +0 -86
  332. package/dist/src/utils/registry.js.map +0 -1
  333. package/dist/src/utils/roadmap-parser.d.ts +0 -45
  334. package/dist/src/utils/roadmap-parser.d.ts.map +0 -1
  335. package/dist/src/utils/roadmap-parser.js +0 -136
  336. package/dist/src/utils/roadmap-parser.js.map +0 -1
  337. package/dist/src/utils/roadmap-scanner.d.ts +0 -92
  338. package/dist/src/utils/roadmap-scanner.d.ts.map +0 -1
  339. package/dist/src/utils/roadmap-scanner.js +0 -349
  340. package/dist/src/utils/roadmap-scanner.js.map +0 -1
  341. package/dist/src/utils/roadmap-state.d.ts +0 -90
  342. package/dist/src/utils/roadmap-state.d.ts.map +0 -1
  343. package/dist/src/utils/roadmap-state.js +0 -154
  344. package/dist/src/utils/roadmap-state.js.map +0 -1
  345. package/dist/src/utils/script-result.d.ts +0 -12
  346. package/dist/src/utils/script-result.d.ts.map +0 -1
  347. package/dist/src/utils/script-result.js +0 -46
  348. package/dist/src/utils/script-result.js.map +0 -1
  349. package/dist/src/utils/shell.d.ts +0 -27
  350. package/dist/src/utils/shell.d.ts.map +0 -1
  351. package/dist/src/utils/shell.js +0 -64
  352. package/dist/src/utils/shell.js.map +0 -1
  353. package/dist/src/utils/status-data.d.ts +0 -148
  354. package/dist/src/utils/status-data.d.ts.map +0 -1
  355. package/dist/src/utils/status-data.js +0 -548
  356. package/dist/src/utils/status-data.js.map +0 -1
  357. package/dist/src/utils/ui.d.ts +0 -55
  358. package/dist/src/utils/ui.d.ts.map +0 -1
  359. package/dist/src/utils/ui.js +0 -121
  360. package/dist/src/utils/ui.js.map +0 -1
  361. package/scripts/night-watch-audit-cron.sh +0 -149
  362. package/scripts/night-watch-cron.sh +0 -484
  363. package/scripts/night-watch-helpers.sh +0 -499
  364. package/scripts/night-watch-pr-reviewer-cron.sh +0 -528
  365. package/scripts/night-watch-qa-cron.sh +0 -281
  366. package/scripts/night-watch-slicer-cron.sh +0 -90
  367. package/scripts/test-helpers.bats +0 -77
  368. package/templates/night-watch-pr-reviewer.md +0 -174
  369. package/templates/night-watch-qa.md +0 -157
  370. package/templates/night-watch-slicer.md +0 -219
  371. package/templates/night-watch.config.json +0 -30
  372. package/templates/night-watch.md +0 -94
  373. package/templates/prd-executor.md +0 -235
  374. package/templates/prd.md +0 -26
  375. package/web/dist/assets/index-BiJf9LFT.js +0 -458
  376. package/web/dist/assets/index-OpSgvsYu.css +0 -1
  377. package/web/dist/avatars/carlos.webp +0 -0
  378. package/web/dist/avatars/dev.webp +0 -0
  379. package/web/dist/avatars/maya.webp +0 -0
  380. package/web/dist/avatars/priya.webp +0 -0
  381. package/web/dist/index.html +0 -82
  382. /package/dist/{src/commands → commands}/dashboard/tab-actions.d.ts +0 -0
  383. /package/dist/{src/commands → commands}/dashboard/tab-actions.js +0 -0
  384. /package/dist/{src/commands → commands}/dashboard/types.js +0 -0
@@ -1,168 +0,0 @@
1
- /**
2
- * Crontab utility functions for Night Watch CLI
3
- * Provides safe read/write operations for user crontab
4
- */
5
- import { execSync } from "child_process";
6
- import * as fs from "fs";
7
- import * as os from "os";
8
- import * as path from "path";
9
- /**
10
- * Marker prefix used to identify Night Watch entries
11
- */
12
- export const CRONTAB_MARKER_PREFIX = "# night-watch-cli:";
13
- /**
14
- * Check whether a crontab line belongs to the given project directory.
15
- * Supports unquoted, single-quoted, and double-quoted cd paths.
16
- */
17
- function isEntryForProject(line, projectDir) {
18
- if (!line.includes(CRONTAB_MARKER_PREFIX)) {
19
- return false;
20
- }
21
- const normalized = projectDir.replace(/\/+$/, "");
22
- const candidates = [
23
- `cd ${normalized}`,
24
- `cd '${normalized}'`,
25
- `cd "${normalized}"`,
26
- ];
27
- return candidates.some((candidate) => line.includes(candidate));
28
- }
29
- /**
30
- * Read current crontab entries
31
- * Returns empty array if user has no crontab
32
- */
33
- export function readCrontab() {
34
- try {
35
- const output = execSync("crontab -l 2>/dev/null", {
36
- encoding: "utf-8",
37
- stdio: ["pipe", "pipe", "pipe"],
38
- });
39
- return output.trim().split("\n").filter((line) => line.length > 0);
40
- }
41
- catch {
42
- // crontab -l returns error if no crontab exists
43
- // This is expected and should return empty array
44
- return [];
45
- }
46
- }
47
- /**
48
- * Write crontab entries
49
- * @param lines - Array of crontab lines to write
50
- * @throws Error if crontab write fails
51
- */
52
- export function writeCrontab(lines) {
53
- if (process.env.NW_EXECUTION_CONTEXT === "agent") {
54
- throw new Error("Crontab writes are blocked during agent execution (NW_EXECUTION_CONTEXT=agent). " +
55
- "This prevents the running agent from accidentally modifying its own scheduling.");
56
- }
57
- const content = lines.join("\n");
58
- // Create a backup first
59
- try {
60
- const currentCrontab = readCrontab();
61
- if (currentCrontab.length > 0) {
62
- execSync(`crontab -l > /tmp/night-watch-crontab-backup-$(date +%s).txt`, {
63
- encoding: "utf-8",
64
- });
65
- }
66
- }
67
- catch {
68
- // Ignore backup errors
69
- }
70
- // Write new crontab via temp file to avoid shell line length limits
71
- const tmpFile = path.join(os.tmpdir(), `night-watch-crontab-${Date.now()}.txt`);
72
- try {
73
- fs.writeFileSync(tmpFile, content + "\n");
74
- execSync(`crontab ${tmpFile}`, { encoding: "utf-8" });
75
- }
76
- catch (error) {
77
- throw new Error(`Failed to write crontab: ${error instanceof Error ? error.message : String(error)}`);
78
- }
79
- finally {
80
- try {
81
- fs.unlinkSync(tmpFile);
82
- }
83
- catch { /* ignore cleanup errors */ }
84
- }
85
- }
86
- /**
87
- * Generate a marker comment for identifying entries
88
- * @param projectName - Name of the project
89
- */
90
- export function generateMarker(projectName) {
91
- return `${CRONTAB_MARKER_PREFIX} ${projectName}`;
92
- }
93
- /**
94
- * Add a crontab entry if it doesn't already exist
95
- * @param entry - The crontab entry to add
96
- * @param marker - The marker to use for deduplication
97
- * @returns true if entry was added, false if it already existed
98
- */
99
- export function addEntry(entry, marker) {
100
- // Check if entry already exists
101
- if (hasEntry(marker)) {
102
- return false;
103
- }
104
- const lines = readCrontab();
105
- // Add the entry with marker comment on the same line
106
- const entryWithMarker = entry.endsWith(marker)
107
- ? entry
108
- : `${entry} ${marker}`;
109
- lines.push(entryWithMarker);
110
- writeCrontab(lines);
111
- return true;
112
- }
113
- /**
114
- * Remove all crontab entries containing the marker
115
- * @param marker - The marker to search for
116
- * @returns Number of entries removed
117
- */
118
- export function removeEntries(marker) {
119
- const lines = readCrontab();
120
- const filtered = lines.filter((line) => !line.includes(marker));
121
- const removedCount = lines.length - filtered.length;
122
- if (removedCount > 0) {
123
- writeCrontab(filtered);
124
- }
125
- return removedCount;
126
- }
127
- /**
128
- * Check if an entry with the marker exists
129
- * @param marker - The marker to search for
130
- * @returns true if entry exists
131
- */
132
- export function hasEntry(marker) {
133
- const lines = readCrontab();
134
- return lines.some((line) => line.includes(marker));
135
- }
136
- /**
137
- * Get all entries containing the marker
138
- * @param marker - The marker to search for
139
- * @returns Array of matching entries
140
- */
141
- export function getEntries(marker) {
142
- const lines = readCrontab();
143
- return lines.filter((line) => line.includes(marker));
144
- }
145
- /**
146
- * Get all Night Watch entries for a project directory (independent of marker text)
147
- * @param projectDir - Absolute project directory
148
- */
149
- export function getProjectEntries(projectDir) {
150
- const lines = readCrontab();
151
- return lines.filter((line) => isEntryForProject(line, projectDir));
152
- }
153
- /**
154
- * Remove Night Watch entries for a project directory and/or marker
155
- * @param projectDir - Absolute project directory
156
- * @param marker - Optional marker for backward compatibility
157
- * @returns Number of entries removed
158
- */
159
- export function removeEntriesForProject(projectDir, marker) {
160
- const lines = readCrontab();
161
- const filtered = lines.filter((line) => !isEntryForProject(line, projectDir) && !(marker && line.includes(marker)));
162
- const removedCount = lines.length - filtered.length;
163
- if (removedCount > 0) {
164
- writeCrontab(filtered);
165
- }
166
- return removedCount;
167
- }
168
- //# sourceMappingURL=crontab.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crontab.js","sourceRoot":"","sources":["../../../src/utils/crontab.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAE1D;;;GAGG;AACH,SAAS,iBAAiB,CAAC,IAAY,EAAE,UAAkB;IACzD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG;QACjB,MAAM,UAAU,EAAE;QAClB,OAAO,UAAU,GAAG;QACpB,OAAO,UAAU,GAAG;KACrB,CAAC;IAEF,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,CAAC,wBAAwB,EAAE;YAChD,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAA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,EAAE,CAAC;IAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB,EAAE,MAAe;IACzE,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAC3B,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACrF,CAAC;IACF,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAEpD,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrB,YAAY,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -1,54 +0,0 @@
1
- /**
2
- * Execution history ledger for Night Watch CLI
3
- * Stores PRD execution records in the SQLite repository layer.
4
- * Decoupled from PRD file paths — keyed by project directory + PRD filename.
5
- */
6
- import { resetRepositories } from "../storage/repositories/index.js";
7
- import { closeDb } from "../storage/sqlite/client.js";
8
- export type ExecutionOutcome = "success" | "failure" | "timeout" | "rate_limited";
9
- export interface IExecutionRecord {
10
- timestamp: number;
11
- outcome: ExecutionOutcome;
12
- exitCode: number;
13
- attempt: number;
14
- }
15
- interface IPrdHistory {
16
- records: IExecutionRecord[];
17
- }
18
- /**
19
- * Full history structure: projectDir -> prdFile -> records
20
- */
21
- export type IExecutionHistory = Record<string, Record<string, IPrdHistory>>;
22
- /**
23
- * Get the path to the history file.
24
- * Kept for backward compatibility.
25
- */
26
- export declare function getHistoryPath(): string;
27
- /**
28
- * Load execution history from the SQLite repository.
29
- * Returns the full IExecutionHistory structure reconstructed from the DB.
30
- */
31
- export declare function loadHistory(): IExecutionHistory;
32
- /**
33
- * Save execution history to the repository.
34
- * Full replace: clears all existing records then inserts all records from the
35
- * provided IExecutionHistory structure in a single transaction.
36
- */
37
- export declare function saveHistory(history: IExecutionHistory): void;
38
- /**
39
- * Record a PRD execution result.
40
- * Appends a record and trims to MAX_HISTORY_RECORDS_PER_PRD.
41
- */
42
- export declare function recordExecution(projectDir: string, prdFile: string, outcome: ExecutionOutcome, exitCode: number, attempt?: number): void;
43
- /**
44
- * Get the most recent execution record for a PRD.
45
- * Returns null if no history exists.
46
- */
47
- export declare function getLastExecution(projectDir: string, prdFile: string): IExecutionRecord | null;
48
- /**
49
- * Check if a PRD is in cooldown after a recent non-success execution.
50
- * Returns true if the PRD should be skipped.
51
- */
52
- export declare function isInCooldown(projectDir: string, prdFile: string, cooldownPeriod: number): boolean;
53
- export { closeDb, resetRepositories };
54
- //# sourceMappingURL=execution-history.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-history.d.ts","sourceRoot":"","sources":["../../../src/utils/execution-history.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAmB,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAElF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAIvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,iBAAiB,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAG5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAU,GAClB,IAAI,CAaN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,gBAAgB,GAAG,IAAI,CAKzB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,OAAO,CAYT;AAED,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,80 +0,0 @@
1
- /**
2
- * Execution history ledger for Night Watch CLI
3
- * Stores PRD execution records in the SQLite repository layer.
4
- * Decoupled from PRD file paths — keyed by project directory + PRD filename.
5
- */
6
- import * as os from "os";
7
- import * as path from "path";
8
- import { GLOBAL_CONFIG_DIR, HISTORY_FILE_NAME, MAX_HISTORY_RECORDS_PER_PRD, } from "../constants.js";
9
- import { getRepositories, resetRepositories } from "../storage/repositories/index.js";
10
- import { closeDb } from "../storage/sqlite/client.js";
11
- /**
12
- * Get the path to the history file.
13
- * Kept for backward compatibility.
14
- */
15
- export function getHistoryPath() {
16
- const base = process.env.NIGHT_WATCH_HOME || path.join(os.homedir(), GLOBAL_CONFIG_DIR);
17
- return path.join(base, HISTORY_FILE_NAME);
18
- }
19
- /**
20
- * Load execution history from the SQLite repository.
21
- * Returns the full IExecutionHistory structure reconstructed from the DB.
22
- */
23
- export function loadHistory() {
24
- const { executionHistory } = getRepositories();
25
- return executionHistory.getAllHistory();
26
- }
27
- /**
28
- * Save execution history to the repository.
29
- * Full replace: clears all existing records then inserts all records from the
30
- * provided IExecutionHistory structure in a single transaction.
31
- */
32
- export function saveHistory(history) {
33
- const { executionHistory } = getRepositories();
34
- executionHistory.replaceAll(history);
35
- }
36
- /**
37
- * Record a PRD execution result.
38
- * Appends a record and trims to MAX_HISTORY_RECORDS_PER_PRD.
39
- */
40
- export function recordExecution(projectDir, prdFile, outcome, exitCode, attempt = 1) {
41
- const resolved = path.resolve(projectDir);
42
- const { executionHistory } = getRepositories();
43
- const record = {
44
- timestamp: Math.floor(Date.now() / 1000),
45
- outcome,
46
- exitCode,
47
- attempt,
48
- };
49
- executionHistory.addRecord(resolved, prdFile, record);
50
- executionHistory.trimRecords(resolved, prdFile, MAX_HISTORY_RECORDS_PER_PRD);
51
- }
52
- /**
53
- * Get the most recent execution record for a PRD.
54
- * Returns null if no history exists.
55
- */
56
- export function getLastExecution(projectDir, prdFile) {
57
- const resolved = path.resolve(projectDir);
58
- const { executionHistory } = getRepositories();
59
- const records = executionHistory.getRecords(resolved, prdFile);
60
- return records.length > 0 ? records[0] : null;
61
- }
62
- /**
63
- * Check if a PRD is in cooldown after a recent non-success execution.
64
- * Returns true if the PRD should be skipped.
65
- */
66
- export function isInCooldown(projectDir, prdFile, cooldownPeriod) {
67
- const last = getLastExecution(projectDir, prdFile);
68
- if (!last) {
69
- return false;
70
- }
71
- // Success records don't trigger cooldown
72
- if (last.outcome === "success") {
73
- return false;
74
- }
75
- const now = Math.floor(Date.now() / 1000);
76
- const age = now - last.timestamp;
77
- return age < cooldownPeriod;
78
- }
79
- export { closeDb, resetRepositories };
80
- //# sourceMappingURL=execution-history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-history.js","sourceRoot":"","sources":["../../../src/utils/execution-history.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAoBtD;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GACR,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,EAAE,gBAAgB,EAAE,GAAG,eAAe,EAAE,CAAC;IAC/C,OAAO,gBAAgB,CAAC,aAAa,EAAE,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAA0B;IACpD,MAAM,EAAE,gBAAgB,EAAE,GAAG,eAAe,EAAE,CAAC;IAC/C,gBAAgB,CAAC,UAAU,CAAC,OAAO,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C,OAAO,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;IACjC,OAAO,GAAG,GAAG,cAAc,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * GitHub utilities for Night Watch CLI
3
- * Fetches PR details using the gh CLI
4
- */
5
- export interface IPrDetails {
6
- number: number;
7
- title: string;
8
- url: string;
9
- body: string;
10
- additions: number;
11
- deletions: number;
12
- changedFiles: number;
13
- }
14
- /**
15
- * Fetch PR details by exact branch name selector.
16
- * Returns null on any failure.
17
- */
18
- export declare function fetchPrDetailsForBranch(branchName: string, cwd: string): IPrDetails | null;
19
- /**
20
- * Fetch PR details by PR number selector.
21
- * Returns null on any failure.
22
- */
23
- export declare function fetchPrDetailsByNumber(prNumber: number, cwd: string): IPrDetails | null;
24
- /**
25
- * Fetch PR details for the most recently created PR matching a branch prefix.
26
- * Returns null if gh is unavailable, not authenticated, or no PR found.
27
- */
28
- export declare function fetchPrDetails(branchPrefix: string, cwd: string): IPrDetails | null;
29
- /**
30
- * Fetch PR details for the most recently updated PR matching any of the given branch patterns.
31
- * Used by the review command to find the PR that was just reviewed.
32
- * Returns null on any failure.
33
- */
34
- export declare function fetchReviewedPrDetails(branchPatterns: string[], cwd: string): IPrDetails | null;
35
- /**
36
- * Extract a summary from a PR body.
37
- * Takes the first meaningful paragraph, strips markdown headers, truncates to maxLength.
38
- */
39
- export declare function extractSummary(body: string, maxLength?: number): string;
40
- //# sourceMappingURL=github.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/utils/github.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAmCD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAE1F;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAEvF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAyBnF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAyB/F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY,GAAG,MAAM,CAgC5E"}
@@ -1,126 +0,0 @@
1
- /**
2
- * GitHub utilities for Night Watch CLI
3
- * Fetches PR details using the gh CLI
4
- */
5
- import { execFileSync } from "child_process";
6
- function parsePrDetails(raw) {
7
- try {
8
- const details = JSON.parse(raw);
9
- if (typeof details.number !== "number") {
10
- return null;
11
- }
12
- return {
13
- number: details.number,
14
- title: details.title ?? "",
15
- url: details.url ?? "",
16
- body: details.body ?? "",
17
- additions: details.additions ?? 0,
18
- deletions: details.deletions ?? 0,
19
- changedFiles: details.changedFiles ?? 0,
20
- };
21
- }
22
- catch {
23
- return null;
24
- }
25
- }
26
- function fetchPrBySelector(selector, cwd) {
27
- try {
28
- const output = execFileSync("gh", ["pr", "view", selector, "--json", "number,title,url,body,additions,deletions,changedFiles"], { cwd, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
29
- return parsePrDetails(output);
30
- }
31
- catch {
32
- return null;
33
- }
34
- }
35
- /**
36
- * Fetch PR details by exact branch name selector.
37
- * Returns null on any failure.
38
- */
39
- export function fetchPrDetailsForBranch(branchName, cwd) {
40
- return fetchPrBySelector(branchName, cwd);
41
- }
42
- /**
43
- * Fetch PR details by PR number selector.
44
- * Returns null on any failure.
45
- */
46
- export function fetchPrDetailsByNumber(prNumber, cwd) {
47
- return fetchPrBySelector(String(prNumber), cwd);
48
- }
49
- /**
50
- * Fetch PR details for the most recently created PR matching a branch prefix.
51
- * Returns null if gh is unavailable, not authenticated, or no PR found.
52
- */
53
- export function fetchPrDetails(branchPrefix, cwd) {
54
- try {
55
- // Find the most recently created open PR on a matching branch
56
- const listOutput = execFileSync("gh", ["pr", "list", "--state", "open", "--json", "number,headRefName", "--limit", "20"], { cwd, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
57
- const prs = JSON.parse(listOutput);
58
- // Filter PRs matching the branch prefix
59
- const matching = prs.filter((pr) => pr.headRefName.startsWith(branchPrefix + "/"));
60
- if (matching.length === 0) {
61
- return null;
62
- }
63
- // Use the first match (most recent)
64
- const prNumber = matching[0].number;
65
- return fetchPrDetailsByNumber(prNumber, cwd);
66
- }
67
- catch {
68
- // gh CLI not available, not authenticated, or command failed
69
- return null;
70
- }
71
- }
72
- /**
73
- * Fetch PR details for the most recently updated PR matching any of the given branch patterns.
74
- * Used by the review command to find the PR that was just reviewed.
75
- * Returns null on any failure.
76
- */
77
- export function fetchReviewedPrDetails(branchPatterns, cwd) {
78
- try {
79
- const listOutput = execFileSync("gh", ["pr", "list", "--state", "open", "--json", "number,headRefName", "--limit", "20"], { cwd, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
80
- const prs = JSON.parse(listOutput);
81
- // Filter PRs matching any branch pattern
82
- const matching = prs.filter((pr) => branchPatterns.some((pattern) => pr.headRefName.startsWith(pattern)));
83
- if (matching.length === 0) {
84
- return null;
85
- }
86
- // Use the first match
87
- const prNumber = matching[0].number;
88
- return fetchPrDetailsByNumber(prNumber, cwd);
89
- }
90
- catch {
91
- return null;
92
- }
93
- }
94
- /**
95
- * Extract a summary from a PR body.
96
- * Takes the first meaningful paragraph, strips markdown headers, truncates to maxLength.
97
- */
98
- export function extractSummary(body, maxLength = 500) {
99
- if (!body || body.trim().length === 0) {
100
- return "";
101
- }
102
- // Split into lines and filter out markdown headers and empty lines
103
- const lines = body.split("\n");
104
- const contentLines = [];
105
- for (const line of lines) {
106
- const trimmed = line.trim();
107
- // Skip empty lines, markdown headers, and horizontal rules
108
- if (trimmed === "" || trimmed.startsWith("#") || trimmed === "---" || trimmed === "***") {
109
- // If we already have content, a blank line means end of first paragraph
110
- if (contentLines.length > 0 && trimmed === "") {
111
- break;
112
- }
113
- continue;
114
- }
115
- contentLines.push(trimmed);
116
- }
117
- const summary = contentLines.join("\n");
118
- if (summary.length <= maxLength) {
119
- return summary;
120
- }
121
- // Truncate at word boundary
122
- const truncated = summary.slice(0, maxLength);
123
- const lastSpace = truncated.lastIndexOf(" ");
124
- return (lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated) + "...";
125
- }
126
- //# sourceMappingURL=github.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github.js","sourceRoot":"","sources":["../../../src/utils/github.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAY7C,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAwB,CAAC;QACvD,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACvC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO;YACL,MAAM,EAAE,OAAO,C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I,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,OAAO,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,4BAA4B;IAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;AAC7E,CAAC"}
@@ -1,64 +0,0 @@
1
- /**
2
- * Notification utilities for Night Watch CLI
3
- * Sends webhook notifications to Slack, Discord, and Telegram
4
- */
5
- import { INightWatchConfig, IWebhookConfig, NotificationEvent } from "../types.js";
6
- export interface INotificationContext {
7
- event: NotificationEvent;
8
- projectName: string;
9
- prdName?: string;
10
- branchName?: string;
11
- prNumber?: number;
12
- exitCode: number;
13
- duration?: number;
14
- provider: string;
15
- prUrl?: string;
16
- prTitle?: string;
17
- prBody?: string;
18
- filesChanged?: number;
19
- additions?: number;
20
- deletions?: number;
21
- }
22
- /**
23
- * Get the emoji for a notification event
24
- */
25
- export declare function getEventEmoji(event: NotificationEvent): string;
26
- /**
27
- * Get a human-readable title for a notification event
28
- */
29
- export declare function getEventTitle(event: NotificationEvent): string;
30
- /**
31
- * Get the Discord embed color for a notification event
32
- */
33
- export declare function getEventColor(event: NotificationEvent): number;
34
- /**
35
- * Build a description string from notification context
36
- */
37
- export declare function buildDescription(ctx: INotificationContext): string;
38
- /**
39
- * Format a notification payload for Slack incoming webhooks
40
- */
41
- export declare function formatSlackPayload(ctx: INotificationContext): object;
42
- /**
43
- * Format a notification payload for Discord webhooks
44
- */
45
- export declare function formatDiscordPayload(ctx: INotificationContext): object;
46
- /**
47
- * Build a structured Telegram message when PR details are available.
48
- * Falls back to the basic format when they are not.
49
- */
50
- export declare function formatTelegramPayload(ctx: INotificationContext): {
51
- text: string;
52
- parse_mode: string;
53
- };
54
- export declare function buildNotificationText(ctx: INotificationContext): string;
55
- /**
56
- * Send a notification to a single webhook endpoint
57
- * Silently catches errors — never throws
58
- */
59
- export declare function sendWebhook(webhook: IWebhookConfig, ctx: INotificationContext): Promise<void>;
60
- /**
61
- * Send notifications to all configured webhooks and (if configured) to Slack via Bot API.
62
- */
63
- export declare function sendNotifications(config: INightWatchConfig, ctx: INotificationContext): Promise<void>;
64
- //# sourceMappingURL=notify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/utils/notify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAmB,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQpG,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,iBAAiB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG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