@sentry/warden 0.0.0 → 0.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 (546) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/release.yml +6 -1
  3. package/.github/workflows/warden.yml +1 -1
  4. package/dist/action/159.index.js +523 -0
  5. package/dist/action/159.index.js.map +1 -0
  6. package/dist/action/action/index.d.ts +2 -0
  7. package/dist/action/action/index.d.ts.map +1 -0
  8. package/dist/action/action/main.d.ts +2 -0
  9. package/dist/action/action/main.d.ts.map +1 -0
  10. package/dist/action/cli/args.d.ts +74 -0
  11. package/dist/action/cli/args.d.ts.map +1 -0
  12. package/dist/action/cli/args.test.d.ts +2 -0
  13. package/dist/action/cli/args.test.d.ts.map +1 -0
  14. package/dist/action/cli/commands/add.d.ts +7 -0
  15. package/dist/action/cli/commands/add.d.ts.map +1 -0
  16. package/dist/action/cli/commands/init.d.ts +10 -0
  17. package/dist/action/cli/commands/init.d.ts.map +1 -0
  18. package/dist/action/cli/commands/init.test.d.ts +2 -0
  19. package/dist/action/cli/commands/init.test.d.ts.map +1 -0
  20. package/dist/action/cli/commands/setup-app/browser.d.ts +9 -0
  21. package/dist/action/cli/commands/setup-app/browser.d.ts.map +1 -0
  22. package/dist/action/cli/commands/setup-app/credentials.d.ts +15 -0
  23. package/dist/action/cli/commands/setup-app/credentials.d.ts.map +1 -0
  24. package/dist/action/cli/commands/setup-app/manifest.d.ts +24 -0
  25. package/dist/action/cli/commands/setup-app/manifest.d.ts.map +1 -0
  26. package/dist/action/cli/commands/setup-app/server.d.ts +28 -0
  27. package/dist/action/cli/commands/setup-app/server.d.ts.map +1 -0
  28. package/dist/action/cli/commands/setup-app.d.ts +11 -0
  29. package/dist/action/cli/commands/setup-app.d.ts.map +1 -0
  30. package/dist/action/cli/commands/sync.d.ts +9 -0
  31. package/dist/action/cli/commands/sync.d.ts.map +1 -0
  32. package/dist/action/cli/context.d.ts +27 -0
  33. package/dist/action/cli/context.d.ts.map +1 -0
  34. package/dist/action/cli/files.d.ts +22 -0
  35. package/dist/action/cli/files.d.ts.map +1 -0
  36. package/dist/action/cli/files.test.d.ts +2 -0
  37. package/dist/action/cli/files.test.d.ts.map +1 -0
  38. package/dist/action/cli/fix.d.ts +41 -0
  39. package/dist/action/cli/fix.d.ts.map +1 -0
  40. package/dist/action/cli/fix.test.d.ts +2 -0
  41. package/dist/action/cli/fix.test.d.ts.map +1 -0
  42. package/dist/action/cli/git.d.ts +73 -0
  43. package/dist/action/cli/git.d.ts.map +1 -0
  44. package/dist/action/cli/git.test.d.ts +2 -0
  45. package/dist/action/cli/git.test.d.ts.map +1 -0
  46. package/dist/action/cli/index.d.ts +3 -0
  47. package/dist/action/cli/index.d.ts.map +1 -0
  48. package/dist/action/cli/main.d.ts +7 -0
  49. package/dist/action/cli/main.d.ts.map +1 -0
  50. package/dist/action/cli/output/box.d.ts +75 -0
  51. package/dist/action/cli/output/box.d.ts.map +1 -0
  52. package/dist/action/cli/output/formatters.d.ts +90 -0
  53. package/dist/action/cli/output/formatters.d.ts.map +1 -0
  54. package/dist/action/cli/output/formatters.test.d.ts +2 -0
  55. package/dist/action/cli/output/formatters.test.d.ts.map +1 -0
  56. package/dist/action/cli/output/icons.d.ts +11 -0
  57. package/dist/action/cli/output/icons.d.ts.map +1 -0
  58. package/dist/action/cli/output/index.d.ts +10 -0
  59. package/dist/action/cli/output/index.d.ts.map +1 -0
  60. package/dist/action/cli/output/ink-runner.d.ts +9 -0
  61. package/dist/action/cli/output/ink-runner.d.ts.map +1 -0
  62. package/dist/action/cli/output/jsonl.d.ts +43 -0
  63. package/dist/action/cli/output/jsonl.d.ts.map +1 -0
  64. package/dist/action/cli/output/jsonl.test.d.ts +2 -0
  65. package/dist/action/cli/output/jsonl.test.d.ts.map +1 -0
  66. package/dist/action/cli/output/reporter.d.ts +108 -0
  67. package/dist/action/cli/output/reporter.d.ts.map +1 -0
  68. package/dist/action/cli/output/tasks.d.ts +89 -0
  69. package/dist/action/cli/output/tasks.d.ts.map +1 -0
  70. package/dist/action/cli/output/tty.d.ts +21 -0
  71. package/dist/action/cli/output/tty.d.ts.map +1 -0
  72. package/dist/action/cli/output/tty.test.d.ts +2 -0
  73. package/dist/action/cli/output/tty.test.d.ts.map +1 -0
  74. package/dist/action/cli/output/verbosity.d.ts +20 -0
  75. package/dist/action/cli/output/verbosity.d.ts.map +1 -0
  76. package/dist/action/cli/output/verbosity.test.d.ts +2 -0
  77. package/dist/action/cli/output/verbosity.test.d.ts.map +1 -0
  78. package/dist/action/cli/terminal.d.ts +19 -0
  79. package/dist/action/cli/terminal.d.ts.map +1 -0
  80. package/dist/action/cli/terminal.test.d.ts +2 -0
  81. package/dist/action/cli/terminal.test.d.ts.map +1 -0
  82. package/dist/action/config/index.d.ts +4 -0
  83. package/dist/action/config/index.d.ts.map +1 -0
  84. package/dist/action/config/loader.d.ts +27 -0
  85. package/dist/action/config/loader.d.ts.map +1 -0
  86. package/dist/action/config/loader.test.d.ts +2 -0
  87. package/dist/action/config/loader.test.d.ts.map +1 -0
  88. package/dist/action/config/schema.d.ts +318 -0
  89. package/dist/action/config/schema.d.ts.map +1 -0
  90. package/dist/action/config/writer.d.ts +11 -0
  91. package/dist/action/config/writer.d.ts.map +1 -0
  92. package/dist/action/config/writer.test.d.ts +2 -0
  93. package/dist/action/config/writer.test.d.ts.map +1 -0
  94. package/dist/action/diff/classify.d.ts +29 -0
  95. package/dist/action/diff/classify.d.ts.map +1 -0
  96. package/dist/action/diff/classify.test.d.ts +2 -0
  97. package/dist/action/diff/classify.test.d.ts.map +1 -0
  98. package/dist/action/diff/coalesce.d.ts +42 -0
  99. package/dist/action/diff/coalesce.d.ts.map +1 -0
  100. package/dist/action/diff/coalesce.test.d.ts +2 -0
  101. package/dist/action/diff/coalesce.test.d.ts.map +1 -0
  102. package/dist/action/diff/context.d.ts +30 -0
  103. package/dist/action/diff/context.d.ts.map +1 -0
  104. package/dist/action/diff/context.test.d.ts +2 -0
  105. package/dist/action/diff/context.test.d.ts.map +1 -0
  106. package/dist/action/diff/index.d.ts +5 -0
  107. package/dist/action/diff/index.d.ts.map +1 -0
  108. package/dist/action/diff/parser.d.ts +52 -0
  109. package/dist/action/diff/parser.d.ts.map +1 -0
  110. package/dist/action/diff/parser.test.d.ts +2 -0
  111. package/dist/action/diff/parser.test.d.ts.map +1 -0
  112. package/dist/action/event/context.d.ts +9 -0
  113. package/dist/action/event/context.d.ts.map +1 -0
  114. package/dist/action/event/index.d.ts +3 -0
  115. package/dist/action/event/index.d.ts.map +1 -0
  116. package/dist/action/event/schedule-context.d.ts +30 -0
  117. package/dist/action/event/schedule-context.d.ts.map +1 -0
  118. package/dist/action/examples/examples.integration.test.d.ts +2 -0
  119. package/dist/action/examples/examples.integration.test.d.ts.map +1 -0
  120. package/dist/action/examples/index.d.ts +50 -0
  121. package/dist/action/examples/index.d.ts.map +1 -0
  122. package/dist/action/examples/index.test.d.ts +2 -0
  123. package/dist/action/examples/index.test.d.ts.map +1 -0
  124. package/dist/action/examples/setup.d.ts +2 -0
  125. package/dist/action/examples/setup.d.ts.map +1 -0
  126. package/dist/action/index.d.ts +11 -0
  127. package/dist/action/index.d.ts.map +1 -0
  128. package/dist/action/index.js +38231 -0
  129. package/dist/action/index.js.map +1 -0
  130. package/dist/action/licenses.txt +992 -0
  131. package/dist/action/main.d.ts +2 -0
  132. package/dist/action/main.d.ts.map +1 -0
  133. package/dist/action/main.js +707 -0
  134. package/dist/action/main.js.map +1 -0
  135. package/dist/action/output/dedup.d.ts +153 -0
  136. package/dist/action/output/dedup.d.ts.map +1 -0
  137. package/dist/action/output/dedup.test.d.ts +2 -0
  138. package/dist/action/output/dedup.test.d.ts.map +1 -0
  139. package/dist/action/output/github-checks.d.ts +106 -0
  140. package/dist/action/output/github-checks.d.ts.map +1 -0
  141. package/dist/action/output/github-checks.test.d.ts +2 -0
  142. package/dist/action/output/github-checks.test.d.ts.map +1 -0
  143. package/dist/action/output/github-issues.d.ts +35 -0
  144. package/dist/action/output/github-issues.d.ts.map +1 -0
  145. package/dist/action/output/index.d.ts +6 -0
  146. package/dist/action/output/index.d.ts.map +1 -0
  147. package/dist/action/output/issue-renderer.d.ts +20 -0
  148. package/dist/action/output/issue-renderer.d.ts.map +1 -0
  149. package/dist/action/output/renderer.d.ts +4 -0
  150. package/dist/action/output/renderer.d.ts.map +1 -0
  151. package/dist/action/output/renderer.test.d.ts +2 -0
  152. package/dist/action/output/renderer.test.d.ts.map +1 -0
  153. package/dist/action/output/stale.d.ts +31 -0
  154. package/dist/action/output/stale.d.ts.map +1 -0
  155. package/dist/action/output/stale.test.d.ts +2 -0
  156. package/dist/action/output/stale.test.d.ts.map +1 -0
  157. package/dist/action/output/types.d.ts +31 -0
  158. package/dist/action/output/types.d.ts.map +1 -0
  159. package/dist/action/package.json +3 -0
  160. package/dist/action/sdk/index.d.ts +2 -0
  161. package/dist/action/sdk/index.d.ts.map +1 -0
  162. package/dist/action/sdk/runner.d.ts +202 -0
  163. package/dist/action/sdk/runner.d.ts.map +1 -0
  164. package/dist/action/sdk/runner.test.d.ts +2 -0
  165. package/dist/action/sdk/runner.test.d.ts.map +1 -0
  166. package/dist/action/skills/index.d.ts +5 -0
  167. package/dist/action/skills/index.d.ts.map +1 -0
  168. package/dist/action/skills/loader.d.ts +111 -0
  169. package/dist/action/skills/loader.d.ts.map +1 -0
  170. package/dist/action/skills/loader.test.d.ts +2 -0
  171. package/dist/action/skills/loader.test.d.ts.map +1 -0
  172. package/dist/action/skills/remote.d.ts +117 -0
  173. package/dist/action/skills/remote.d.ts.map +1 -0
  174. package/dist/action/skills/remote.test.d.ts +2 -0
  175. package/dist/action/skills/remote.test.d.ts.map +1 -0
  176. package/dist/action/sourcemap-register.cjs +1 -0
  177. package/dist/action/triggers/matcher.d.ts +30 -0
  178. package/dist/action/triggers/matcher.d.ts.map +1 -0
  179. package/dist/action/triggers/matcher.test.d.ts +2 -0
  180. package/dist/action/triggers/matcher.test.d.ts.map +1 -0
  181. package/dist/action/types/index.d.ts +269 -0
  182. package/dist/action/types/index.d.ts.map +1 -0
  183. package/dist/action/utils/async.d.ts +5 -0
  184. package/dist/action/utils/async.d.ts.map +1 -0
  185. package/dist/action/utils/index.d.ts +16 -0
  186. package/dist/action/utils/index.d.ts.map +1 -0
  187. package/dist/action/utils/index.test.d.ts +2 -0
  188. package/dist/action/utils/index.test.d.ts.map +1 -0
  189. package/dist/action/utils/version.d.ts +3 -0
  190. package/dist/action/utils/version.d.ts.map +1 -0
  191. package/dist/cli/args.d.ts +74 -0
  192. package/dist/cli/args.d.ts.map +1 -0
  193. package/dist/cli/args.js +359 -0
  194. package/dist/cli/args.js.map +1 -0
  195. package/dist/cli/args.test.d.ts +2 -0
  196. package/dist/cli/args.test.d.ts.map +1 -0
  197. package/dist/cli/args.test.js +392 -0
  198. package/dist/cli/args.test.js.map +1 -0
  199. package/dist/cli/commands/add.d.ts +7 -0
  200. package/dist/cli/commands/add.d.ts.map +1 -0
  201. package/dist/cli/commands/add.js +380 -0
  202. package/dist/cli/commands/add.js.map +1 -0
  203. package/dist/cli/commands/init.d.ts +10 -0
  204. package/dist/cli/commands/init.d.ts.map +1 -0
  205. package/dist/cli/commands/init.js +113 -0
  206. package/dist/cli/commands/init.js.map +1 -0
  207. package/dist/cli/commands/init.test.d.ts +2 -0
  208. package/dist/cli/commands/init.test.d.ts.map +1 -0
  209. package/dist/cli/commands/init.test.js +117 -0
  210. package/dist/cli/commands/init.test.js.map +1 -0
  211. package/dist/cli/commands/setup-app/browser.d.ts +9 -0
  212. package/dist/cli/commands/setup-app/browser.d.ts.map +1 -0
  213. package/dist/cli/commands/setup-app/browser.js +36 -0
  214. package/dist/cli/commands/setup-app/browser.js.map +1 -0
  215. package/dist/cli/commands/setup-app/credentials.d.ts +15 -0
  216. package/dist/cli/commands/setup-app/credentials.d.ts.map +1 -0
  217. package/dist/cli/commands/setup-app/credentials.js +29 -0
  218. package/dist/cli/commands/setup-app/credentials.js.map +1 -0
  219. package/dist/cli/commands/setup-app/manifest.d.ts +24 -0
  220. package/dist/cli/commands/setup-app/manifest.d.ts.map +1 -0
  221. package/dist/cli/commands/setup-app/manifest.js +29 -0
  222. package/dist/cli/commands/setup-app/manifest.js.map +1 -0
  223. package/dist/cli/commands/setup-app/server.d.ts +28 -0
  224. package/dist/cli/commands/setup-app/server.d.ts.map +1 -0
  225. package/dist/cli/commands/setup-app/server.js +136 -0
  226. package/dist/cli/commands/setup-app/server.js.map +1 -0
  227. package/dist/cli/commands/setup-app.d.ts +11 -0
  228. package/dist/cli/commands/setup-app.d.ts.map +1 -0
  229. package/dist/cli/commands/setup-app.js +139 -0
  230. package/dist/cli/commands/setup-app.js.map +1 -0
  231. package/dist/cli/commands/sync.d.ts +9 -0
  232. package/dist/cli/commands/sync.d.ts.map +1 -0
  233. package/dist/cli/commands/sync.js +96 -0
  234. package/dist/cli/commands/sync.js.map +1 -0
  235. package/dist/cli/context.d.ts +27 -0
  236. package/dist/cli/context.d.ts.map +1 -0
  237. package/dist/cli/context.js +101 -0
  238. package/dist/cli/context.js.map +1 -0
  239. package/dist/cli/files.d.ts +22 -0
  240. package/dist/cli/files.d.ts.map +1 -0
  241. package/dist/cli/files.js +66 -0
  242. package/dist/cli/files.js.map +1 -0
  243. package/dist/cli/files.test.d.ts +2 -0
  244. package/dist/cli/files.test.d.ts.map +1 -0
  245. package/dist/cli/files.test.js +117 -0
  246. package/dist/cli/files.test.js.map +1 -0
  247. package/dist/cli/fix.d.ts +41 -0
  248. package/dist/cli/fix.d.ts.map +1 -0
  249. package/dist/cli/fix.js +320 -0
  250. package/dist/cli/fix.js.map +1 -0
  251. package/dist/cli/fix.test.d.ts +2 -0
  252. package/dist/cli/fix.test.d.ts.map +1 -0
  253. package/dist/cli/fix.test.js +251 -0
  254. package/dist/cli/fix.test.js.map +1 -0
  255. package/dist/cli/git.d.ts +73 -0
  256. package/dist/cli/git.d.ts.map +1 -0
  257. package/dist/cli/git.js +267 -0
  258. package/dist/cli/git.js.map +1 -0
  259. package/dist/cli/git.test.d.ts +2 -0
  260. package/dist/cli/git.test.d.ts.map +1 -0
  261. package/dist/cli/git.test.js +96 -0
  262. package/dist/cli/git.test.js.map +1 -0
  263. package/dist/cli/index.d.ts +3 -0
  264. package/dist/cli/index.d.ts.map +1 -0
  265. package/dist/cli/index.js +13 -0
  266. package/dist/cli/index.js.map +1 -0
  267. package/dist/cli/main.d.ts +7 -0
  268. package/dist/cli/main.d.ts.map +1 -0
  269. package/dist/cli/main.js +560 -0
  270. package/dist/cli/main.js.map +1 -0
  271. package/dist/cli/output/box.d.ts +75 -0
  272. package/dist/cli/output/box.d.ts.map +1 -0
  273. package/dist/cli/output/box.js +191 -0
  274. package/dist/cli/output/box.js.map +1 -0
  275. package/dist/cli/output/formatters.d.ts +90 -0
  276. package/dist/cli/output/formatters.d.ts.map +1 -0
  277. package/dist/cli/output/formatters.js +248 -0
  278. package/dist/cli/output/formatters.js.map +1 -0
  279. package/dist/cli/output/formatters.test.d.ts +2 -0
  280. package/dist/cli/output/formatters.test.d.ts.map +1 -0
  281. package/dist/cli/output/formatters.test.js +152 -0
  282. package/dist/cli/output/formatters.test.js.map +1 -0
  283. package/dist/cli/output/icons.d.ts +11 -0
  284. package/dist/cli/output/icons.d.ts.map +1 -0
  285. package/dist/cli/output/icons.js +11 -0
  286. package/dist/cli/output/icons.js.map +1 -0
  287. package/dist/cli/output/index.d.ts +10 -0
  288. package/dist/cli/output/index.d.ts.map +1 -0
  289. package/dist/cli/output/index.js +10 -0
  290. package/dist/cli/output/index.js.map +1 -0
  291. package/dist/cli/output/ink-runner.d.ts +9 -0
  292. package/dist/cli/output/ink-runner.d.ts.map +1 -0
  293. package/dist/cli/output/ink-runner.js +207 -0
  294. package/dist/cli/output/ink-runner.js.map +1 -0
  295. package/dist/cli/output/jsonl.d.ts +43 -0
  296. package/dist/cli/output/jsonl.d.ts.map +1 -0
  297. package/dist/cli/output/jsonl.js +89 -0
  298. package/dist/cli/output/jsonl.js.map +1 -0
  299. package/dist/cli/output/jsonl.test.d.ts +2 -0
  300. package/dist/cli/output/jsonl.test.d.ts.map +1 -0
  301. package/dist/cli/output/jsonl.test.js +284 -0
  302. package/dist/cli/output/jsonl.test.js.map +1 -0
  303. package/dist/cli/output/reporter.d.ts +108 -0
  304. package/dist/cli/output/reporter.d.ts.map +1 -0
  305. package/dist/cli/output/reporter.js +378 -0
  306. package/dist/cli/output/reporter.js.map +1 -0
  307. package/dist/cli/output/tasks.d.ts +89 -0
  308. package/dist/cli/output/tasks.d.ts.map +1 -0
  309. package/dist/cli/output/tasks.js +251 -0
  310. package/dist/cli/output/tasks.js.map +1 -0
  311. package/dist/cli/output/tty.d.ts +21 -0
  312. package/dist/cli/output/tty.d.ts.map +1 -0
  313. package/dist/cli/output/tty.js +44 -0
  314. package/dist/cli/output/tty.js.map +1 -0
  315. package/dist/cli/output/tty.test.d.ts +2 -0
  316. package/dist/cli/output/tty.test.d.ts.map +1 -0
  317. package/dist/cli/output/tty.test.js +105 -0
  318. package/dist/cli/output/tty.test.js.map +1 -0
  319. package/dist/cli/output/verbosity.d.ts +20 -0
  320. package/dist/cli/output/verbosity.d.ts.map +1 -0
  321. package/dist/cli/output/verbosity.js +32 -0
  322. package/dist/cli/output/verbosity.js.map +1 -0
  323. package/dist/cli/output/verbosity.test.d.ts +2 -0
  324. package/dist/cli/output/verbosity.test.d.ts.map +1 -0
  325. package/dist/cli/output/verbosity.test.js +35 -0
  326. package/dist/cli/output/verbosity.test.js.map +1 -0
  327. package/dist/cli/terminal.d.ts +19 -0
  328. package/dist/cli/terminal.d.ts.map +1 -0
  329. package/dist/cli/terminal.js +247 -0
  330. package/dist/cli/terminal.js.map +1 -0
  331. package/dist/cli/terminal.test.d.ts +2 -0
  332. package/dist/cli/terminal.test.d.ts.map +1 -0
  333. package/dist/cli/terminal.test.js +123 -0
  334. package/dist/cli/terminal.test.js.map +1 -0
  335. package/dist/config/index.d.ts +4 -0
  336. package/dist/config/index.d.ts.map +1 -0
  337. package/dist/config/index.js +4 -0
  338. package/dist/config/index.js.map +1 -0
  339. package/dist/config/loader.d.ts +27 -0
  340. package/dist/config/loader.d.ts.map +1 -0
  341. package/dist/config/loader.js +77 -0
  342. package/dist/config/loader.js.map +1 -0
  343. package/dist/config/loader.test.d.ts +2 -0
  344. package/dist/config/loader.test.d.ts.map +1 -0
  345. package/dist/config/loader.test.js +263 -0
  346. package/dist/config/loader.test.js.map +1 -0
  347. package/dist/config/schema.d.ts +318 -0
  348. package/dist/config/schema.d.ts.map +1 -0
  349. package/dist/config/schema.js +137 -0
  350. package/dist/config/schema.js.map +1 -0
  351. package/dist/config/writer.d.ts +11 -0
  352. package/dist/config/writer.d.ts.map +1 -0
  353. package/dist/config/writer.js +74 -0
  354. package/dist/config/writer.js.map +1 -0
  355. package/dist/config/writer.test.d.ts +2 -0
  356. package/dist/config/writer.test.d.ts.map +1 -0
  357. package/dist/config/writer.test.js +98 -0
  358. package/dist/config/writer.test.js.map +1 -0
  359. package/dist/diff/classify.d.ts +29 -0
  360. package/dist/diff/classify.d.ts.map +1 -0
  361. package/dist/diff/classify.js +74 -0
  362. package/dist/diff/classify.js.map +1 -0
  363. package/dist/diff/classify.test.d.ts +2 -0
  364. package/dist/diff/classify.test.d.ts.map +1 -0
  365. package/dist/diff/classify.test.js +140 -0
  366. package/dist/diff/classify.test.js.map +1 -0
  367. package/dist/diff/coalesce.d.ts +42 -0
  368. package/dist/diff/coalesce.d.ts.map +1 -0
  369. package/dist/diff/coalesce.js +104 -0
  370. package/dist/diff/coalesce.js.map +1 -0
  371. package/dist/diff/coalesce.test.d.ts +2 -0
  372. package/dist/diff/coalesce.test.d.ts.map +1 -0
  373. package/dist/diff/coalesce.test.js +159 -0
  374. package/dist/diff/coalesce.test.js.map +1 -0
  375. package/dist/diff/context.d.ts +30 -0
  376. package/dist/diff/context.d.ts.map +1 -0
  377. package/dist/diff/context.js +144 -0
  378. package/dist/diff/context.js.map +1 -0
  379. package/dist/diff/context.test.d.ts +2 -0
  380. package/dist/diff/context.test.d.ts.map +1 -0
  381. package/dist/diff/context.test.js +190 -0
  382. package/dist/diff/context.test.js.map +1 -0
  383. package/dist/diff/index.d.ts +5 -0
  384. package/dist/diff/index.d.ts.map +1 -0
  385. package/dist/diff/index.js +5 -0
  386. package/dist/diff/index.js.map +1 -0
  387. package/dist/diff/parser.d.ts +52 -0
  388. package/dist/diff/parser.d.ts.map +1 -0
  389. package/dist/diff/parser.js +95 -0
  390. package/dist/diff/parser.js.map +1 -0
  391. package/dist/diff/parser.test.d.ts +2 -0
  392. package/dist/diff/parser.test.d.ts.map +1 -0
  393. package/dist/diff/parser.test.js +178 -0
  394. package/dist/diff/parser.test.js.map +1 -0
  395. package/dist/event/context.d.ts +9 -0
  396. package/dist/event/context.d.ts.map +1 -0
  397. package/dist/event/context.js +94 -0
  398. package/dist/event/context.js.map +1 -0
  399. package/dist/event/index.d.ts +3 -0
  400. package/dist/event/index.d.ts.map +1 -0
  401. package/dist/event/index.js +3 -0
  402. package/dist/event/index.js.map +1 -0
  403. package/dist/event/schedule-context.d.ts +30 -0
  404. package/dist/event/schedule-context.d.ts.map +1 -0
  405. package/dist/event/schedule-context.js +57 -0
  406. package/dist/event/schedule-context.js.map +1 -0
  407. package/dist/examples/examples.integration.test.d.ts +2 -0
  408. package/dist/examples/examples.integration.test.d.ts.map +1 -0
  409. package/dist/examples/examples.integration.test.js +55 -0
  410. package/dist/examples/examples.integration.test.js.map +1 -0
  411. package/dist/examples/index.d.ts +50 -0
  412. package/dist/examples/index.d.ts.map +1 -0
  413. package/dist/examples/index.js +104 -0
  414. package/dist/examples/index.js.map +1 -0
  415. package/dist/examples/index.test.d.ts +2 -0
  416. package/dist/examples/index.test.d.ts.map +1 -0
  417. package/dist/examples/index.test.js +88 -0
  418. package/dist/examples/index.test.js.map +1 -0
  419. package/dist/examples/setup.d.ts +2 -0
  420. package/dist/examples/setup.d.ts.map +1 -0
  421. package/dist/examples/setup.js +22 -0
  422. package/dist/examples/setup.js.map +1 -0
  423. package/dist/index.d.ts +12 -0
  424. package/dist/index.d.ts.map +1 -0
  425. package/dist/index.js +57 -0
  426. package/dist/index.js.map +1 -0
  427. package/dist/output/dedup.d.ts +153 -0
  428. package/dist/output/dedup.d.ts.map +1 -0
  429. package/dist/output/dedup.js +416 -0
  430. package/dist/output/dedup.js.map +1 -0
  431. package/dist/output/dedup.test.d.ts +2 -0
  432. package/dist/output/dedup.test.d.ts.map +1 -0
  433. package/dist/output/dedup.test.js +357 -0
  434. package/dist/output/dedup.test.js.map +1 -0
  435. package/dist/output/github-checks.d.ts +106 -0
  436. package/dist/output/github-checks.d.ts.map +1 -0
  437. package/dist/output/github-checks.js +321 -0
  438. package/dist/output/github-checks.js.map +1 -0
  439. package/dist/output/github-checks.test.d.ts +2 -0
  440. package/dist/output/github-checks.test.d.ts.map +1 -0
  441. package/dist/output/github-checks.test.js +255 -0
  442. package/dist/output/github-checks.test.js.map +1 -0
  443. package/dist/output/github-issues.d.ts +35 -0
  444. package/dist/output/github-issues.d.ts.map +1 -0
  445. package/dist/output/github-issues.js +246 -0
  446. package/dist/output/github-issues.js.map +1 -0
  447. package/dist/output/index.d.ts +6 -0
  448. package/dist/output/index.d.ts.map +1 -0
  449. package/dist/output/index.js +6 -0
  450. package/dist/output/index.js.map +1 -0
  451. package/dist/output/issue-renderer.d.ts +20 -0
  452. package/dist/output/issue-renderer.d.ts.map +1 -0
  453. package/dist/output/issue-renderer.js +154 -0
  454. package/dist/output/issue-renderer.js.map +1 -0
  455. package/dist/output/renderer.d.ts +4 -0
  456. package/dist/output/renderer.d.ts.map +1 -0
  457. package/dist/output/renderer.js +168 -0
  458. package/dist/output/renderer.js.map +1 -0
  459. package/dist/output/renderer.test.d.ts +2 -0
  460. package/dist/output/renderer.test.d.ts.map +1 -0
  461. package/dist/output/renderer.test.js +645 -0
  462. package/dist/output/renderer.test.js.map +1 -0
  463. package/dist/output/stale.d.ts +31 -0
  464. package/dist/output/stale.d.ts.map +1 -0
  465. package/dist/output/stale.js +114 -0
  466. package/dist/output/stale.js.map +1 -0
  467. package/dist/output/stale.test.d.ts +2 -0
  468. package/dist/output/stale.test.d.ts.map +1 -0
  469. package/dist/output/stale.test.js +330 -0
  470. package/dist/output/stale.test.js.map +1 -0
  471. package/dist/output/types.d.ts +31 -0
  472. package/dist/output/types.d.ts.map +1 -0
  473. package/dist/output/types.js +2 -0
  474. package/dist/output/types.js.map +1 -0
  475. package/dist/sdk/index.d.ts +2 -0
  476. package/dist/sdk/index.d.ts.map +1 -0
  477. package/dist/sdk/index.js +2 -0
  478. package/dist/sdk/index.js.map +1 -0
  479. package/dist/sdk/runner.d.ts +202 -0
  480. package/dist/sdk/runner.d.ts.map +1 -0
  481. package/dist/sdk/runner.js +888 -0
  482. package/dist/sdk/runner.js.map +1 -0
  483. package/dist/sdk/runner.test.d.ts +2 -0
  484. package/dist/sdk/runner.test.d.ts.map +1 -0
  485. package/dist/sdk/runner.test.js +677 -0
  486. package/dist/sdk/runner.test.js.map +1 -0
  487. package/dist/skills/index.d.ts +5 -0
  488. package/dist/skills/index.d.ts.map +1 -0
  489. package/dist/skills/index.js +3 -0
  490. package/dist/skills/index.js.map +1 -0
  491. package/dist/skills/loader.d.ts +111 -0
  492. package/dist/skills/loader.d.ts.map +1 -0
  493. package/dist/skills/loader.js +319 -0
  494. package/dist/skills/loader.js.map +1 -0
  495. package/dist/skills/loader.test.d.ts +2 -0
  496. package/dist/skills/loader.test.d.ts.map +1 -0
  497. package/dist/skills/loader.test.js +241 -0
  498. package/dist/skills/loader.test.js.map +1 -0
  499. package/dist/skills/remote.d.ts +117 -0
  500. package/dist/skills/remote.d.ts.map +1 -0
  501. package/dist/skills/remote.js +496 -0
  502. package/dist/skills/remote.js.map +1 -0
  503. package/dist/skills/remote.test.d.ts +2 -0
  504. package/dist/skills/remote.test.d.ts.map +1 -0
  505. package/dist/skills/remote.test.js +582 -0
  506. package/dist/skills/remote.test.js.map +1 -0
  507. package/dist/triggers/matcher.d.ts +30 -0
  508. package/dist/triggers/matcher.d.ts.map +1 -0
  509. package/dist/triggers/matcher.js +122 -0
  510. package/dist/triggers/matcher.js.map +1 -0
  511. package/dist/triggers/matcher.test.d.ts +2 -0
  512. package/dist/triggers/matcher.test.d.ts.map +1 -0
  513. package/dist/triggers/matcher.test.js +234 -0
  514. package/dist/triggers/matcher.test.js.map +1 -0
  515. package/dist/types/index.d.ts +269 -0
  516. package/dist/types/index.d.ts.map +1 -0
  517. package/dist/types/index.js +162 -0
  518. package/dist/types/index.js.map +1 -0
  519. package/dist/utils/async.d.ts +5 -0
  520. package/dist/utils/async.d.ts.map +1 -0
  521. package/dist/utils/async.js +13 -0
  522. package/dist/utils/async.js.map +1 -0
  523. package/dist/utils/index.d.ts +16 -0
  524. package/dist/utils/index.d.ts.map +1 -0
  525. package/dist/utils/index.js +44 -0
  526. package/dist/utils/index.js.map +1 -0
  527. package/dist/utils/index.test.d.ts +2 -0
  528. package/dist/utils/index.test.d.ts.map +1 -0
  529. package/dist/utils/index.test.js +68 -0
  530. package/dist/utils/index.test.js.map +1 -0
  531. package/dist/utils/version.d.ts +3 -0
  532. package/dist/utils/version.d.ts.map +1 -0
  533. package/dist/utils/version.js +16 -0
  534. package/dist/utils/version.js.map +1 -0
  535. package/docs/src/pages/config.astro +2 -1
  536. package/docs/src/pages/guide.astro +2 -1
  537. package/docs/src/utils/version.ts +6 -0
  538. package/package.json +12 -2
  539. package/src/cli/args.ts +2 -3
  540. package/src/cli/commands/init.test.ts +2 -1
  541. package/src/cli/commands/init.ts +3 -1
  542. package/src/cli/output/reporter.ts +3 -4
  543. package/src/utils/index.ts +1 -0
  544. package/src/utils/version.ts +17 -0
  545. package/.claude/settings.local.json +0 -88
  546. package/docs/.claude/settings.local.json +0 -11
@@ -0,0 +1,73 @@
1
+ export interface GitFileChange {
2
+ filename: string;
3
+ status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied';
4
+ additions: number;
5
+ deletions: number;
6
+ patch?: string;
7
+ chunks?: number;
8
+ }
9
+ /**
10
+ * Get the current branch name.
11
+ */
12
+ export declare function getCurrentBranch(cwd?: string): string;
13
+ /**
14
+ * Get the HEAD commit SHA.
15
+ */
16
+ export declare function getHeadSha(cwd?: string): string;
17
+ /**
18
+ * Detect the default branch by checking common branch names locally.
19
+ * Does not perform any remote operations to avoid SSH prompts.
20
+ */
21
+ export declare function getDefaultBranch(cwd?: string): string;
22
+ /**
23
+ * Get the repository root path.
24
+ */
25
+ export declare function getRepoRoot(cwd?: string): string;
26
+ /**
27
+ * Get the repository name from the git remote or directory name.
28
+ */
29
+ export declare function getRepoName(cwd?: string): {
30
+ owner: string;
31
+ name: string;
32
+ };
33
+ /**
34
+ * Get the GitHub repository URL if the remote is on GitHub.
35
+ * Returns null if the remote is not GitHub or not configured.
36
+ */
37
+ export declare function getGitHubRepoUrl(cwd?: string): string | null;
38
+ /**
39
+ * Get list of changed files between two refs.
40
+ * If head is undefined, compares against the working tree.
41
+ */
42
+ export declare function getChangedFiles(base: string, head?: string, cwd?: string): GitFileChange[];
43
+ /**
44
+ * Get the patch for a specific file.
45
+ */
46
+ export declare function getFilePatch(base: string, head: string | undefined, filename: string, cwd?: string): string | undefined;
47
+ /**
48
+ * Get patches for all changed files in a single git command.
49
+ */
50
+ export declare function getChangedFilesWithPatches(base: string, head?: string, cwd?: string): GitFileChange[];
51
+ /**
52
+ * Check if there are uncommitted changes in the working tree.
53
+ */
54
+ export declare function hasUncommittedChanges(cwd?: string): boolean;
55
+ /**
56
+ * Check if a ref exists.
57
+ */
58
+ export declare function refExists(ref: string, cwd?: string): boolean;
59
+ /**
60
+ * Commit message with subject and body separated.
61
+ */
62
+ export interface CommitMessage {
63
+ /** First line of the commit message */
64
+ subject: string;
65
+ /** Remaining lines after the subject (may be empty) */
66
+ body: string;
67
+ }
68
+ /**
69
+ * Get the commit message for a specific ref.
70
+ * Returns subject (first line) and body (remaining lines) separately.
71
+ */
72
+ export declare function getCommitMessage(ref: string, cwd?: string): CommitMessage;
73
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/cli/git.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAsBpE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAE/D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAiBxF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAiB3E;AAsBD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,GAAE,MAAsB,GAC1B,aAAa,EAAE,CA8CjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAsB,GAC1B,MAAM,GAAG,SAAS,CAOpB;AA6BD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,GAAE,MAAsB,GAC1B,aAAa,EAAE,CA0BjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAG1E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAO3E;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,aAAa,CAKxF"}
@@ -0,0 +1,267 @@
1
+ import { execSync } from 'node:child_process';
2
+ import { countPatchChunks } from '../types/index.js';
3
+ /**
4
+ * Execute a git command and return stdout.
5
+ */
6
+ function git(args, cwd = process.cwd()) {
7
+ try {
8
+ return execSync(`git ${args}`, {
9
+ cwd,
10
+ encoding: 'utf-8',
11
+ stdio: ['pipe', 'pipe', 'pipe'],
12
+ }).trim();
13
+ }
14
+ catch (error) {
15
+ const execError = error;
16
+ const stderr = execError.stderr?.toString() ?? '';
17
+ throw new Error(`Git command failed: git ${args}\n${stderr || execError.message}`);
18
+ }
19
+ }
20
+ /**
21
+ * Get the current branch name.
22
+ */
23
+ export function getCurrentBranch(cwd = process.cwd()) {
24
+ return git('rev-parse --abbrev-ref HEAD', cwd);
25
+ }
26
+ /**
27
+ * Get the HEAD commit SHA.
28
+ */
29
+ export function getHeadSha(cwd = process.cwd()) {
30
+ return git('rev-parse HEAD', cwd);
31
+ }
32
+ /**
33
+ * Detect the default branch by checking common branch names locally.
34
+ * Does not perform any remote operations to avoid SSH prompts.
35
+ */
36
+ export function getDefaultBranch(cwd = process.cwd()) {
37
+ // Check common default branches locally (no remote operations)
38
+ for (const branch of ['main', 'master', 'develop']) {
39
+ try {
40
+ git(`rev-parse --verify ${branch}`, cwd);
41
+ return branch;
42
+ }
43
+ catch {
44
+ // Try next branch
45
+ }
46
+ }
47
+ // Check git config for user-configured default branch
48
+ try {
49
+ const configuredDefault = git('config init.defaultBranch', cwd);
50
+ if (configuredDefault) {
51
+ return configuredDefault;
52
+ }
53
+ }
54
+ catch {
55
+ // Config not set
56
+ }
57
+ return 'main'; // Default fallback
58
+ }
59
+ /**
60
+ * Get the repository root path.
61
+ */
62
+ export function getRepoRoot(cwd = process.cwd()) {
63
+ return git('rev-parse --show-toplevel', cwd);
64
+ }
65
+ /**
66
+ * Get the repository name from the git remote or directory name.
67
+ */
68
+ export function getRepoName(cwd = process.cwd()) {
69
+ try {
70
+ const remoteUrl = git('config --get remote.origin.url', cwd);
71
+ // Handle SSH: git@github.com:owner/repo.git
72
+ // Handle HTTPS: https://github.com/owner/repo.git
73
+ const match = remoteUrl.match(/[/:]([\w.-]+)\/([\w.-]+?)(?:\.git)?$/);
74
+ if (match && match[1] && match[2]) {
75
+ return { owner: match[1], name: match[2] };
76
+ }
77
+ }
78
+ catch {
79
+ // No remote configured
80
+ }
81
+ // Fall back to directory name
82
+ const repoRoot = getRepoRoot(cwd);
83
+ const dirName = repoRoot.split('/').pop() ?? 'unknown';
84
+ return { owner: 'local', name: dirName };
85
+ }
86
+ /**
87
+ * Get the GitHub repository URL if the remote is on GitHub.
88
+ * Returns null if the remote is not GitHub or not configured.
89
+ */
90
+ export function getGitHubRepoUrl(cwd = process.cwd()) {
91
+ try {
92
+ const remoteUrl = git('config --get remote.origin.url', cwd);
93
+ // Handle SSH: git@github.com:owner/repo.git
94
+ const sshMatch = remoteUrl.match(/git@github\.com:([\w.-]+)\/([\w.-]+?)(?:\.git)?$/);
95
+ if (sshMatch && sshMatch[1] && sshMatch[2]) {
96
+ return `https://github.com/${sshMatch[1]}/${sshMatch[2]}`;
97
+ }
98
+ // Handle HTTPS: https://github.com/owner/repo.git
99
+ const httpsMatch = remoteUrl.match(/https:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?$/);
100
+ if (httpsMatch && httpsMatch[1] && httpsMatch[2]) {
101
+ return `https://github.com/${httpsMatch[1]}/${httpsMatch[2]}`;
102
+ }
103
+ }
104
+ catch {
105
+ // No remote configured
106
+ }
107
+ return null;
108
+ }
109
+ /**
110
+ * Map git status letter to FileChange status.
111
+ */
112
+ function mapStatus(status) {
113
+ switch (status[0]) {
114
+ case 'A':
115
+ return 'added';
116
+ case 'D':
117
+ return 'removed';
118
+ case 'M':
119
+ return 'modified';
120
+ case 'R':
121
+ return 'renamed';
122
+ case 'C':
123
+ return 'copied';
124
+ default:
125
+ return 'modified';
126
+ }
127
+ }
128
+ /**
129
+ * Get list of changed files between two refs.
130
+ * If head is undefined, compares against the working tree.
131
+ */
132
+ export function getChangedFiles(base, head, cwd = process.cwd()) {
133
+ // Get file statuses
134
+ const diffArgs = head ? `${base}...${head}` : base;
135
+ const nameStatusOutput = git(`diff --name-status ${diffArgs}`, cwd);
136
+ if (!nameStatusOutput) {
137
+ return [];
138
+ }
139
+ const files = [];
140
+ for (const line of nameStatusOutput.split('\n')) {
141
+ if (!line.trim())
142
+ continue;
143
+ const parts = line.split('\t');
144
+ const status = parts[0] ?? '';
145
+ // For renames, format is "R100\told-name\tnew-name"
146
+ const filename = parts.length > 2 ? (parts[2] ?? '') : (parts[1] ?? '');
147
+ if (!filename)
148
+ continue;
149
+ files.push({
150
+ filename,
151
+ status: mapStatus(status),
152
+ additions: 0,
153
+ deletions: 0,
154
+ });
155
+ }
156
+ // Get numstat for additions/deletions
157
+ const numstatOutput = git(`diff --numstat ${diffArgs}`, cwd);
158
+ if (numstatOutput) {
159
+ for (const line of numstatOutput.split('\n')) {
160
+ if (!line.trim())
161
+ continue;
162
+ const parts = line.split('\t');
163
+ const additions = parts[0] ?? '0';
164
+ const deletions = parts[1] ?? '0';
165
+ const filename = parts[2] ?? '';
166
+ const file = files.find((f) => f.filename === filename);
167
+ if (file) {
168
+ file.additions = additions === '-' ? 0 : parseInt(additions, 10);
169
+ file.deletions = deletions === '-' ? 0 : parseInt(deletions, 10);
170
+ }
171
+ }
172
+ }
173
+ return files;
174
+ }
175
+ /**
176
+ * Get the patch for a specific file.
177
+ */
178
+ export function getFilePatch(base, head, filename, cwd = process.cwd()) {
179
+ try {
180
+ const diffArgs = head ? `${base}...${head}` : base;
181
+ return git(`diff ${diffArgs} -- "${filename}"`, cwd);
182
+ }
183
+ catch {
184
+ return undefined;
185
+ }
186
+ }
187
+ /**
188
+ * Parse a combined diff output into individual file patches.
189
+ */
190
+ function parseCombinedDiff(diffOutput) {
191
+ const patches = new Map();
192
+ if (!diffOutput)
193
+ return patches;
194
+ // Split by "diff --git" but keep the delimiter
195
+ const parts = diffOutput.split(/(?=^diff --git )/m);
196
+ for (const part of parts) {
197
+ if (!part.trim())
198
+ continue;
199
+ // Extract filename from "diff --git a/path b/path" line
200
+ const match = part.match(/^diff --git a\/(.+?) b\/(.+?)\n/);
201
+ if (match) {
202
+ // Use the "b" path (destination) as the filename
203
+ const filename = match[2];
204
+ if (filename) {
205
+ patches.set(filename, part);
206
+ }
207
+ }
208
+ }
209
+ return patches;
210
+ }
211
+ /**
212
+ * Get patches for all changed files in a single git command.
213
+ */
214
+ export function getChangedFilesWithPatches(base, head, cwd = process.cwd()) {
215
+ const files = getChangedFiles(base, head, cwd);
216
+ if (files.length === 0) {
217
+ return files;
218
+ }
219
+ // Get all patches in a single git diff command
220
+ try {
221
+ const diffArgs = head ? `${base}...${head}` : base;
222
+ const combinedDiff = git(`diff ${diffArgs}`, cwd);
223
+ const patches = parseCombinedDiff(combinedDiff);
224
+ for (const file of files) {
225
+ file.patch = patches.get(file.filename);
226
+ file.chunks = countPatchChunks(file.patch);
227
+ }
228
+ }
229
+ catch {
230
+ // Fall back to per-file patches if combined diff fails
231
+ for (const file of files) {
232
+ file.patch = getFilePatch(base, head, file.filename, cwd);
233
+ file.chunks = countPatchChunks(file.patch);
234
+ }
235
+ }
236
+ return files;
237
+ }
238
+ /**
239
+ * Check if there are uncommitted changes in the working tree.
240
+ */
241
+ export function hasUncommittedChanges(cwd = process.cwd()) {
242
+ const status = git('status --porcelain', cwd);
243
+ return status.length > 0;
244
+ }
245
+ /**
246
+ * Check if a ref exists.
247
+ */
248
+ export function refExists(ref, cwd = process.cwd()) {
249
+ try {
250
+ git(`rev-parse --verify ${ref}`, cwd);
251
+ return true;
252
+ }
253
+ catch {
254
+ return false;
255
+ }
256
+ }
257
+ /**
258
+ * Get the commit message for a specific ref.
259
+ * Returns subject (first line) and body (remaining lines) separately.
260
+ */
261
+ export function getCommitMessage(ref, cwd = process.cwd()) {
262
+ // %s = subject, %b = body
263
+ const subject = git(`log -1 --format=%s ${ref}`, cwd);
264
+ const body = git(`log -1 --format=%b ${ref}`, cwd);
265
+ return { subject, body };
266
+ }
267
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/cli/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAWrD;;GAEG;AACH,SAAS,GAAG,CAAC,IAAY,EAAE,MAAc,OAAO,CAAC,GAAG,EAAE;IACpD,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,OAAO,IAAI,EAAE,EAAE;YAC7B,GAAG;YACH,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,KAAsD,CAAC;QACzE,MAAM,MAAM,GAAG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AAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IAC/D,MAAM,MAAM,GAAG,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,MAAc,OAAO,CAAC,GAAG,EAAE;IAChE,IAAI,CAAC;QACH,GAAG,CAAC,sBAAsB,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAYD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,MAAc,OAAO,CAAC,GAAG,EAAE;IACvE,0BAA0B;IAC1B,MAAM,OAAO,GAAG,GAAG,CAAC,sBAAsB,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,GAAG,CAAC,sBAAsB,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=git.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.test.d.ts","sourceRoot":"","sources":["../../src/cli/git.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,96 @@
1
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
2
+ import { execSync } from 'node:child_process';
3
+ import { getDefaultBranch, getCurrentBranch, getCommitMessage } from './git.js';
4
+ vi.mock('node:child_process', () => ({
5
+ execSync: vi.fn(),
6
+ }));
7
+ const mockExecSync = vi.mocked(execSync);
8
+ beforeEach(() => {
9
+ mockExecSync.mockReset();
10
+ });
11
+ describe('git error handling', () => {
12
+ it('includes stderr in error message when git command fails', () => {
13
+ const error = new Error('Command failed');
14
+ error.stderr = 'fatal: not a git repository';
15
+ mockExecSync.mockImplementation(() => {
16
+ throw error;
17
+ });
18
+ expect(() => getCurrentBranch()).toThrow('Git command failed: git rev-parse --abbrev-ref HEAD\nfatal: not a git repository');
19
+ });
20
+ it('includes command in error message when stderr is empty', () => {
21
+ mockExecSync.mockImplementation(() => {
22
+ throw new Error('Command failed');
23
+ });
24
+ expect(() => getCurrentBranch()).toThrow('Git command failed: git rev-parse --abbrev-ref HEAD\nCommand failed');
25
+ });
26
+ });
27
+ /**
28
+ * Creates a mock that simulates git branch detection.
29
+ * Returns success for branches in existingBranches, and optionally a config value.
30
+ */
31
+ function mockBranchDetection(existingBranches, configDefault) {
32
+ return (cmd) => {
33
+ for (const branch of existingBranches) {
34
+ if (cmd === `git rev-parse --verify ${branch}`) {
35
+ return 'abc123\n';
36
+ }
37
+ }
38
+ if (cmd === 'git config init.defaultBranch' && configDefault) {
39
+ return `${configDefault}\n`;
40
+ }
41
+ throw new Error('Not found');
42
+ };
43
+ }
44
+ describe('getDefaultBranch', () => {
45
+ it('returns main when main branch exists locally', () => {
46
+ mockExecSync.mockImplementation(mockBranchDetection(['main']));
47
+ expect(getDefaultBranch()).toBe('main');
48
+ });
49
+ it('returns master when main does not exist but master does', () => {
50
+ mockExecSync.mockImplementation(mockBranchDetection(['master']));
51
+ expect(getDefaultBranch()).toBe('master');
52
+ });
53
+ it('returns develop when main and master do not exist but develop does', () => {
54
+ mockExecSync.mockImplementation(mockBranchDetection(['develop']));
55
+ expect(getDefaultBranch()).toBe('develop');
56
+ });
57
+ it('returns git config init.defaultBranch when no common branches exist', () => {
58
+ mockExecSync.mockImplementation(mockBranchDetection([], 'trunk'));
59
+ expect(getDefaultBranch()).toBe('trunk');
60
+ });
61
+ it('returns hardcoded main when no branches exist and no config is set', () => {
62
+ mockExecSync.mockImplementation(mockBranchDetection([]));
63
+ expect(getDefaultBranch()).toBe('main');
64
+ });
65
+ });
66
+ describe('getCommitMessage', () => {
67
+ it('returns subject and body from commit', () => {
68
+ mockExecSync.mockImplementation((cmd) => {
69
+ if (cmd === 'git log -1 --format=%s HEAD') {
70
+ return 'feat: Add new feature\n';
71
+ }
72
+ if (cmd === 'git log -1 --format=%b HEAD') {
73
+ return 'This is the commit body.\n\nWith multiple paragraphs.\n';
74
+ }
75
+ throw new Error('Unexpected command');
76
+ });
77
+ const result = getCommitMessage('HEAD');
78
+ expect(result.subject).toBe('feat: Add new feature');
79
+ expect(result.body).toBe('This is the commit body.\n\nWith multiple paragraphs.');
80
+ });
81
+ it('returns empty body when commit has no body', () => {
82
+ mockExecSync.mockImplementation((cmd) => {
83
+ if (cmd === 'git log -1 --format=%s abc123') {
84
+ return 'fix: Quick fix\n';
85
+ }
86
+ if (cmd === 'git log -1 --format=%b abc123') {
87
+ return '\n';
88
+ }
89
+ throw new Error('Unexpected command');
90
+ });
91
+ const result = getCommitMessage('abc123');
92
+ expect(result.subject).toBe('fix: Quick fix');
93
+ expect(result.body).toBe('');
94
+ });
95
+ });
96
+ //# sourceMappingURL=git.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.test.js","sourceRoot":"","sources":["../../src/cli/git.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEhF,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACnC,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE;CAClB,CAAC,CAAC,CAAC;AAEJ,MAAM,YAAY,GAAG,EAAE,CAAC,M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AC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { main, abortController } from './main.js';
3
+ process.on('SIGINT', () => {
4
+ // Abort any running SDK queries
5
+ abortController.abort();
6
+ process.stderr.write('\n');
7
+ process.exit(130);
8
+ });
9
+ main().catch((error) => {
10
+ console.error('Fatal error:', error);
11
+ process.exit(1);
12
+ });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,gCAAgC;IAChC,eAAe,CAAC,KAAK,EAAE,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Global abort controller for graceful shutdown on SIGINT.
3
+ * Used to cancel in-progress SDK queries.
4
+ */
5
+ export declare const abortController: AbortController;
6
+ export declare function main(): Promise<void>;
7
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAoCA;;;GAGG;AACH,eAAO,MAAM,eAAe,iBAAwB,CAAC;AAokBrD,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmD1C"}