@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,162 @@
1
+ import { z } from 'zod';
2
+ // Severity levels for findings
3
+ export const SeveritySchema = z.enum(['critical', 'high', 'medium', 'low', 'info']);
4
+ // Confidence levels for findings
5
+ export const ConfidenceSchema = z.enum(['high', 'medium', 'low']);
6
+ /**
7
+ * Confidence order for comparison (lower = more confident).
8
+ * Single source of truth for confidence ordering across the codebase.
9
+ */
10
+ export const CONFIDENCE_ORDER = {
11
+ high: 0,
12
+ medium: 1,
13
+ low: 2,
14
+ };
15
+ // Severity threshold for config options (includes 'off' to disable)
16
+ export const SeverityThresholdSchema = z.enum(['off', 'critical', 'high', 'medium', 'low', 'info']);
17
+ /**
18
+ * Severity order for comparison (lower = more severe).
19
+ * Single source of truth for severity ordering across the codebase.
20
+ */
21
+ export const SEVERITY_ORDER = {
22
+ critical: 0,
23
+ high: 1,
24
+ medium: 2,
25
+ low: 3,
26
+ info: 4,
27
+ };
28
+ /**
29
+ * Filter findings to only include those at or above the given severity threshold.
30
+ * If no threshold is provided, returns all findings unchanged.
31
+ * If threshold is 'off', returns empty array (disabled).
32
+ */
33
+ export function filterFindingsBySeverity(findings, threshold) {
34
+ if (!threshold)
35
+ return findings;
36
+ if (threshold === 'off')
37
+ return [];
38
+ const thresholdOrder = SEVERITY_ORDER[threshold];
39
+ return findings.filter((f) => SEVERITY_ORDER[f.severity] <= thresholdOrder);
40
+ }
41
+ // Location within a file
42
+ export const LocationSchema = z.object({
43
+ path: z.string(),
44
+ startLine: z.number().int().positive(),
45
+ endLine: z.number().int().positive().optional(),
46
+ });
47
+ // Suggested fix with diff
48
+ export const SuggestedFixSchema = z.object({
49
+ description: z.string(),
50
+ diff: z.string(),
51
+ });
52
+ // Individual finding from a skill
53
+ export const FindingSchema = z.object({
54
+ id: z.string(),
55
+ severity: SeveritySchema,
56
+ confidence: ConfidenceSchema.optional(),
57
+ title: z.string(),
58
+ description: z.string(),
59
+ location: LocationSchema.optional(),
60
+ suggestedFix: SuggestedFixSchema.optional(),
61
+ elapsedMs: z.number().nonnegative().optional(),
62
+ });
63
+ // Usage statistics from SDK
64
+ export const UsageStatsSchema = z.object({
65
+ inputTokens: z.number().int().nonnegative(),
66
+ outputTokens: z.number().int().nonnegative(),
67
+ cacheReadInputTokens: z.number().int().nonnegative().optional(),
68
+ cacheCreationInputTokens: z.number().int().nonnegative().optional(),
69
+ costUSD: z.number().nonnegative(),
70
+ });
71
+ // Skipped file info for chunking
72
+ export const SkippedFileSchema = z.object({
73
+ filename: z.string(),
74
+ reason: z.enum(['pattern', 'builtin']),
75
+ pattern: z.string().optional(),
76
+ });
77
+ // Skill report output
78
+ export const SkillReportSchema = z.object({
79
+ skill: z.string(),
80
+ summary: z.string(),
81
+ findings: z.array(FindingSchema),
82
+ metadata: z.record(z.string(), z.unknown()).optional(),
83
+ durationMs: z.number().nonnegative().optional(),
84
+ usage: UsageStatsSchema.optional(),
85
+ /** Files that were skipped due to chunking patterns */
86
+ skippedFiles: z.array(SkippedFileSchema).optional(),
87
+ /** Number of hunks that failed to analyze (SDK errors, API errors, etc.) */
88
+ failedHunks: z.number().int().nonnegative().optional(),
89
+ });
90
+ // GitHub event types
91
+ export const GitHubEventTypeSchema = z.enum([
92
+ 'pull_request',
93
+ 'issues',
94
+ 'issue_comment',
95
+ 'pull_request_review',
96
+ 'pull_request_review_comment',
97
+ 'schedule',
98
+ ]);
99
+ // Pull request actions
100
+ export const PullRequestActionSchema = z.enum([
101
+ 'opened',
102
+ 'synchronize',
103
+ 'reopened',
104
+ 'closed',
105
+ ]);
106
+ // File change info
107
+ export const FileChangeSchema = z.object({
108
+ filename: z.string(),
109
+ status: z.enum(['added', 'removed', 'modified', 'renamed', 'copied', 'changed', 'unchanged']),
110
+ additions: z.number().int().nonnegative(),
111
+ deletions: z.number().int().nonnegative(),
112
+ patch: z.string().optional(),
113
+ chunks: z.number().int().nonnegative().optional(),
114
+ });
115
+ /**
116
+ * Count the number of chunks/hunks in a patch string.
117
+ * Each chunk starts with @@ -X,Y +A,B @@
118
+ */
119
+ export function countPatchChunks(patch) {
120
+ if (!patch)
121
+ return 0;
122
+ const matches = patch.match(/^@@\s/gm);
123
+ return matches?.length ?? 0;
124
+ }
125
+ // Pull request context
126
+ export const PullRequestContextSchema = z.object({
127
+ number: z.number().int().positive(),
128
+ title: z.string(),
129
+ body: z.string().nullable(),
130
+ author: z.string(),
131
+ baseBranch: z.string(),
132
+ headBranch: z.string(),
133
+ headSha: z.string(),
134
+ files: z.array(FileChangeSchema),
135
+ });
136
+ // Repository context
137
+ export const RepositoryContextSchema = z.object({
138
+ owner: z.string(),
139
+ name: z.string(),
140
+ fullName: z.string(),
141
+ defaultBranch: z.string(),
142
+ });
143
+ // Full event context
144
+ export const EventContextSchema = z.object({
145
+ eventType: GitHubEventTypeSchema,
146
+ action: z.string(),
147
+ repository: RepositoryContextSchema,
148
+ pullRequest: PullRequestContextSchema.optional(),
149
+ repoPath: z.string(),
150
+ });
151
+ // Retry configuration for SDK calls
152
+ export const RetryConfigSchema = z.object({
153
+ /** Maximum number of retry attempts (default: 3) */
154
+ maxRetries: z.number().int().nonnegative().default(3),
155
+ /** Initial delay in milliseconds before first retry (default: 1000) */
156
+ initialDelayMs: z.number().int().positive().default(1000),
157
+ /** Multiplier for exponential backoff (default: 2) */
158
+ backoffMultiplier: z.number().positive().default(2),
159
+ /** Maximum delay in milliseconds between retries (default: 30000) */
160
+ maxDelayMs: z.number().int().positive().default(30000),
161
+ });
162
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+BAA+B;AAC/B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAGpF,iCAAiC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAGlE;;;GAGG;AACH,MAA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,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAGH,qBAAqB;AACrB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,qBAAqB;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAChD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAGH,oCAAoC;AACpC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,oDAAoD;IACpD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,uEAAuE;IACvE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzD,sDAAsD;IACtD,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,qEAAqE;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACvD,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Process items with limited concurrency using chunked batches.
3
+ */
4
+ export declare function processInBatches<T, R>(items: T[], fn: (item: T) => Promise<R>, batchSize: number): Promise<R[]>;
5
+ //# sourceMappingURL=async.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EACzC,KAAK,EAAE,CAAC,EAAE,EACV,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,EAAE,CAAC,CAUd"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Process items with limited concurrency using chunked batches.
3
+ */
4
+ export async function processInBatches(items, fn, batchSize) {
5
+ const results = [];
6
+ for (let i = 0; i < items.length; i += batchSize) {
7
+ const batch = items.slice(i, i + batchSize);
8
+ const batchResults = await Promise.all(batch.map(fn));
9
+ results.push(...batchResults);
10
+ }
11
+ return results;
12
+ }
13
+ //# sourceMappingURL=async.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/utils/async.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAAU,EACV,EAA2B,EAC3B,SAAiB;IAEjB,MAAM,OAAO,GAAQ,EAAE,CAAC;IAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ export { processInBatches } from './async.js';
2
+ export { getVersion, getMajorVersion } from './version.js';
3
+ /** Default concurrency for parallel trigger/skill execution */
4
+ export declare const DEFAULT_CONCURRENCY = 4;
5
+ /**
6
+ * Escape HTML special characters to prevent them from being interpreted as HTML.
7
+ * Preserves content inside markdown code blocks (```) and inline code (`).
8
+ * Used when rendering finding titles/descriptions in GitHub comments.
9
+ */
10
+ export declare function escapeHtml(text: string): string;
11
+ /**
12
+ * Get the Anthropic API key from environment variables.
13
+ * Checks WARDEN_ANTHROPIC_API_KEY first, then falls back to ANTHROPIC_API_KEY.
14
+ */
15
+ export declare function getAnthropicApiKey(): string | undefined;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA+B/C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAEvD"}
@@ -0,0 +1,44 @@
1
+ export { processInBatches } from './async.js';
2
+ export { getVersion, getMajorVersion } from './version.js';
3
+ /** Default concurrency for parallel trigger/skill execution */
4
+ export const DEFAULT_CONCURRENCY = 4;
5
+ /**
6
+ * Escape HTML special characters to prevent them from being interpreted as HTML.
7
+ * Preserves content inside markdown code blocks (```) and inline code (`).
8
+ * Used when rendering finding titles/descriptions in GitHub comments.
9
+ */
10
+ export function escapeHtml(text) {
11
+ // Extract code blocks and inline code, escape HTML in the rest
12
+ const codeBlocks = [];
13
+ // Replace code blocks (``` ... ```) and inline code (` ... `) with indexed placeholders
14
+ // Process triple backticks first (they may contain single backticks)
15
+ let processed = text.replace(/```[\s\S]*?```/g, (match) => {
16
+ const idx = codeBlocks.length;
17
+ codeBlocks.push(match);
18
+ return `\0CODE${idx}\0`;
19
+ });
20
+ // Then process inline code (single backticks)
21
+ processed = processed.replace(/`[^`]+`/g, (match) => {
22
+ const idx = codeBlocks.length;
23
+ codeBlocks.push(match);
24
+ return `\0CODE${idx}\0`;
25
+ });
26
+ // Escape HTML in the non-code portions
27
+ processed = processed
28
+ .replace(/&/g, '&amp;')
29
+ .replace(/</g, '&lt;')
30
+ .replace(/>/g, '&gt;');
31
+ // Restore code blocks by index
32
+ codeBlocks.forEach((block, i) => {
33
+ processed = processed.replace(`\0CODE${i}\0`, block);
34
+ });
35
+ return processed;
36
+ }
37
+ /**
38
+ * Get the Anthropic API key from environment variables.
39
+ * Checks WARDEN_ANTHROPIC_API_KEY first, then falls back to ANTHROPIC_API_KEY.
40
+ */
41
+ export function getAnthropicApiKey() {
42
+ return process.env['WARDEN_ANTHROPIC_API_KEY'] ?? process.env['ANTHROPIC_API_KEY'];
43
+ }
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,+DAA+D;IAC/D,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,wFAAwF;IACxF,qEAAqE;IACrE,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE;QACxD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,8CAA8C;IAC9C,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,uCAAuC;IACvC,SAAS,GAAG,SAAS;SAClB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAEzB,+BAA+B;IAC/B,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC9B,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/utils/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
+ import { escapeHtml, getAnthropicApiKey } from './index.js';
3
+ describe('escapeHtml', () => {
4
+ it('escapes angle brackets outside code', () => {
5
+ expect(escapeHtml('Check the <sub> tag')).toBe('Check the &lt;sub&gt; tag');
6
+ });
7
+ it('escapes ampersands', () => {
8
+ expect(escapeHtml('foo & bar')).toBe('foo &amp; bar');
9
+ });
10
+ it('escapes multiple HTML characters', () => {
11
+ expect(escapeHtml('<div>foo & bar</div>')).toBe('&lt;div&gt;foo &amp; bar&lt;/div&gt;');
12
+ });
13
+ it('preserves content inside inline code', () => {
14
+ expect(escapeHtml('no `<sub>warden:` tag')).toBe('no `<sub>warden:` tag');
15
+ });
16
+ it('preserves content inside code blocks', () => {
17
+ const input = 'Check this:\n```\n<html>\n <body></body>\n</html>\n```\nDone';
18
+ expect(escapeHtml(input)).toBe(input);
19
+ });
20
+ it('escapes outside code but preserves inside', () => {
21
+ const input = 'When <sub> tag like `<sub>warden:` is missing';
22
+ const expected = 'When &lt;sub&gt; tag like `<sub>warden:` is missing';
23
+ expect(escapeHtml(input)).toBe(expected);
24
+ });
25
+ it('handles multiple inline code spans', () => {
26
+ const input = 'Use `<div>` or `<span>` elements';
27
+ expect(escapeHtml(input)).toBe(input);
28
+ });
29
+ it('handles mixed code blocks and inline code', () => {
30
+ const input = 'See `<tag>` and:\n```\n<html>\n```\nThen <other>';
31
+ const expected = 'See `<tag>` and:\n```\n<html>\n```\nThen &lt;other&gt;';
32
+ expect(escapeHtml(input)).toBe(expected);
33
+ });
34
+ it('returns empty string unchanged', () => {
35
+ expect(escapeHtml('')).toBe('');
36
+ });
37
+ it('returns string without HTML unchanged', () => {
38
+ expect(escapeHtml('plain text')).toBe('plain text');
39
+ });
40
+ });
41
+ describe('getAnthropicApiKey', () => {
42
+ const originalEnv = process.env;
43
+ beforeEach(() => {
44
+ process.env = { ...originalEnv };
45
+ delete process.env['WARDEN_ANTHROPIC_API_KEY'];
46
+ delete process.env['ANTHROPIC_API_KEY'];
47
+ });
48
+ afterEach(() => {
49
+ process.env = originalEnv;
50
+ });
51
+ it('returns WARDEN_ANTHROPIC_API_KEY when set', () => {
52
+ process.env['WARDEN_ANTHROPIC_API_KEY'] = 'warden-key';
53
+ expect(getAnthropicApiKey()).toBe('warden-key');
54
+ });
55
+ it('returns WARDEN_ANTHROPIC_API_KEY over ANTHROPIC_API_KEY when both set', () => {
56
+ process.env['WARDEN_ANTHROPIC_API_KEY'] = 'warden-key';
57
+ process.env['ANTHROPIC_API_KEY'] = 'anthropic-key';
58
+ expect(getAnthropicApiKey()).toBe('warden-key');
59
+ });
60
+ it('falls back to ANTHROPIC_API_KEY when WARDEN key not set', () => {
61
+ process.env['ANTHROPIC_API_KEY'] = 'anthropic-key';
62
+ expect(getAnthropicApiKey()).toBe('anthropic-key');
63
+ });
64
+ it('returns undefined when neither key is set', () => {
65
+ expect(getAnthropicApiKey()).toBeUndefined();
66
+ });
67
+ });
68
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/utils/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE5D,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAC5B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IAC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AC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function getVersion(): string;
2
+ export declare function getMajorVersion(): string;
3
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -0,0 +1,16 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ let cachedVersion;
5
+ export function getVersion() {
6
+ if (cachedVersion)
7
+ return cachedVersion;
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
10
+ cachedVersion = pkg.version;
11
+ return cachedVersion;
12
+ }
13
+ export function getMajorVersion() {
14
+ return getVersion().split('.')[0] ?? '0';
15
+ }
16
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,IAAI,aAAiC,CAAC;AAEtC,MAAM,UAAU,UAAU;IACxB,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IACxC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAwB,CAAC;IAClH,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;AAC3C,CAAC"}
@@ -2,6 +2,7 @@
2
2
  import Base from '../layouts/Base.astro';
3
3
  import Terminal from '../components/Terminal.astro';
4
4
  import { Code } from 'astro:components';
5
+ import { WARDEN_ACTION } from '../utils/version.js';
5
6
  ---
6
7
 
7
8
  <Base title="Config" description="Warden configuration reference">
@@ -368,7 +369,7 @@ jobs:
368
369
  # app-id: \${{ secrets.WARDEN_APP_ID }}
369
370
  # private-key: \${{ secrets.WARDEN_PRIVATE_KEY }}
370
371
 
371
- - uses: getsentry/warden-action@v1
372
+ - uses: ${WARDEN_ACTION}
372
373
  with:
373
374
  github-token: \${{ secrets.GITHUB_TOKEN }}
374
375
  # github-token: \${{ steps.app-token.outputs.token }}`}
@@ -2,6 +2,7 @@
2
2
  import Base from '../layouts/Base.astro';
3
3
  import Terminal from '../components/Terminal.astro';
4
4
  import { Code } from 'astro:components';
5
+ import { WARDEN_ACTION } from '../utils/version.js';
5
6
 
6
7
  const base = import.meta.env.BASE_URL.replace(/\/$/, '');
7
8
  ---
@@ -384,7 +385,7 @@ commentOn = "medium" # Post comments for medium and above`}
384
385
  app-id: \${{ secrets.WARDEN_APP_ID }}
385
386
  private-key: \${{ secrets.WARDEN_PRIVATE_KEY }}
386
387
 
387
- - uses: getsentry/warden-action@v1
388
+ - uses: ${WARDEN_ACTION}
388
389
  with:
389
390
  github-token: \${{ steps.app-token.outputs.token }}`}
390
391
  lang="yaml"
@@ -0,0 +1,6 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ const pkg = JSON.parse(readFileSync(join(process.cwd(), '..', 'package.json'), 'utf-8'));
5
+ export const MAJOR_VERSION = pkg.version.split('.')[0] ?? '0';
6
+ export const WARDEN_ACTION = `getsentry/warden@v${MAJOR_VERSION}`;
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@sentry/warden",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "Event-driven agent that reacts to GitHub events and executes skills via Claude Code SDK",
5
5
  "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "warden": "dist/cli/index.js"
10
+ },
6
11
  "scripts": {
7
12
  "cli": "tsx src/cli/index.ts",
8
13
  "build": "tsc",
@@ -36,8 +41,13 @@
36
41
  "code-review",
37
42
  "security"
38
43
  ],
39
- "author": "Functional Software, Inc.",
44
+ "author": "Sentry",
40
45
  "license": "FSL-1.1-ALv2",
46
+ "repository": "https://github.com/getsentry/warden",
47
+ "bugs": {
48
+ "url": "https://github.com/getsentry/warden/issues"
49
+ },
50
+ "homepage": "https://warden.sentry.dev",
41
51
  "dependencies": {
42
52
  "@anthropic-ai/claude-agent-sdk": "^0.2.22",
43
53
  "@anthropic-ai/sdk": "^0.72.1",
package/src/cli/args.ts CHANGED
@@ -3,6 +3,7 @@ import { parseArgs } from 'node:util';
3
3
  import { z } from 'zod';
4
4
  import { SeverityThresholdSchema } from '../types/index.js';
5
5
  import type { SeverityThreshold } from '../types/index.js';
6
+ import { getVersion } from '../utils/index.js';
6
7
 
7
8
  export const CLIOptionsSchema = z.object({
8
9
  targets: z.array(z.string()).optional(),
@@ -53,10 +54,8 @@ export interface ParsedArgs {
53
54
  setupAppOptions?: SetupAppOptions;
54
55
  }
55
56
 
56
- const VERSION = '0.1.0';
57
-
58
57
  export function showVersion(): void {
59
- console.log(`warden ${VERSION}`);
58
+ console.log(`warden ${getVersion()}`);
60
59
  }
61
60
 
62
61
  const HELP_TEXT = `
@@ -8,6 +8,7 @@ import { Reporter } from '../output/reporter.js';
8
8
  import { detectOutputMode } from '../output/tty.js';
9
9
  import { Verbosity } from '../output/verbosity.js';
10
10
  import type { CLIOptions } from '../args.js';
11
+ import { getMajorVersion } from '../../utils/index.js';
11
12
 
12
13
  function createMockReporter(): Reporter {
13
14
  return new Reporter(detectOutputMode(false), Verbosity.Normal);
@@ -75,7 +76,7 @@ describe('init command', () => {
75
76
  expect(content).toContain('pull-requests: write');
76
77
  expect(content).toContain('checks: write');
77
78
  expect(content).toContain('WARDEN_ANTHROPIC_API_KEY');
78
- expect(content).toContain('getsentry/warden@v1');
79
+ expect(content).toContain(`getsentry/warden@v${getMajorVersion()}`);
79
80
  });
80
81
  });
81
82
 
@@ -4,6 +4,7 @@ import chalk from 'chalk';
4
4
  import { getRepoRoot, getGitHubRepoUrl } from '../git.js';
5
5
  import type { Reporter } from '../output/reporter.js';
6
6
  import type { CLIOptions } from '../args.js';
7
+ import { getMajorVersion } from '../../utils/index.js';
7
8
 
8
9
  /**
9
10
  * Template for warden.toml configuration file.
@@ -17,6 +18,7 @@ function generateWardenToml(): string {
17
18
  * Template for GitHub Actions workflow file.
18
19
  */
19
20
  function generateWorkflowYaml(): string {
21
+ const majorVersion = getMajorVersion();
20
22
  return `name: Warden
21
23
 
22
24
  on:
@@ -33,7 +35,7 @@ jobs:
33
35
  runs-on: ubuntu-latest
34
36
  steps:
35
37
  - uses: actions/checkout@v4
36
- - uses: getsentry/warden@v1
38
+ - uses: getsentry/warden@v${majorVersion}
37
39
  with:
38
40
  anthropic-api-key: \${{ secrets.WARDEN_ANTHROPIC_API_KEY }}
39
41
  `;
@@ -13,8 +13,7 @@ import {
13
13
  } from './formatters.js';
14
14
  import { BoxRenderer } from './box.js';
15
15
  import { ICON_CHECK } from './icons.js';
16
-
17
- const VERSION = '0.1.0';
16
+ import { getVersion } from '../../utils/index.js';
18
17
 
19
18
  /**
20
19
  * ASCII art logo for TTY header.
@@ -82,10 +81,10 @@ export class Reporter {
82
81
  for (const line of LOGO.split('\n')) {
83
82
  this.log(chalk.dim(line));
84
83
  }
85
- this.log(chalk.dim(`v${VERSION}`));
84
+ this.log(chalk.dim(`v${getVersion()}`));
86
85
  this.log('');
87
86
  } else {
88
- this.logCI(`Warden v${VERSION}`);
87
+ this.logCI(`Warden v${getVersion()}`);
89
88
  }
90
89
  }
91
90
 
@@ -1,4 +1,5 @@
1
1
  export { processInBatches } from './async.js';
2
+ export { getVersion, getMajorVersion } from './version.js';
2
3
 
3
4
  /** Default concurrency for parallel trigger/skill execution */
4
5
  export const DEFAULT_CONCURRENCY = 4;
@@ -0,0 +1,17 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ let cachedVersion: string | undefined;
6
+
7
+ export function getVersion(): string {
8
+ if (cachedVersion) return cachedVersion;
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8')) as { version: string };
11
+ cachedVersion = pkg.version;
12
+ return cachedVersion;
13
+ }
14
+
15
+ export function getMajorVersion(): string {
16
+ return getVersion().split('.')[0] ?? '0';
17
+ }