opensentinel 3.1.1 → 3.6.1

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 (325) hide show
  1. package/README.md +126 -83
  2. package/dist/agent-manager-7N7REQZQ.js +39 -0
  3. package/dist/agent-processor-I23VWQY3.js +280 -0
  4. package/dist/agent-processor-I23VWQY3.js.map +1 -0
  5. package/dist/agent-types-2T4PXLFQ.js +12 -0
  6. package/dist/alerting-4I37GG4U.js +699 -0
  7. package/dist/alerting-4I37GG4U.js.map +1 -0
  8. package/dist/analysis-agent-JWN2GXYE.js +288 -0
  9. package/dist/analysis-agent-JWN2GXYE.js.map +1 -0
  10. package/dist/{archiver-AVNBYCKQ.js → archiver-XLRIIXPY.js} +86 -17
  11. package/dist/archiver-XLRIIXPY.js.map +1 -0
  12. package/dist/{audit-logger-OBPR7CRO.js → audit-logger-AU3TMWKI.js} +6 -5
  13. package/dist/{auth-UOX5K2BE.js → auth-PH5IHISW.js} +2 -2
  14. package/dist/{autonomy-ZXDBDQUJ.js → autonomy-N7W5XPLX.js} +4 -3
  15. package/dist/autonomy-N7W5XPLX.js.map +1 -0
  16. package/dist/{aws-s3-Q4LLZZPD.js → aws-s3-QZMURYXB.js} +2 -2
  17. package/dist/{backup-restore-PZ7CYYB7.js → backup-restore-72OQTZO3.js} +2 -2
  18. package/dist/{blocks-R3PODY47.js → blocks-YOWOESDD.js} +4 -4
  19. package/dist/bot-MU2TJQ3Y.js +46 -0
  20. package/dist/brain-SLA474EU.js +65 -0
  21. package/dist/{camera-monitor-M5CYKUU4.js → camera-monitor-LHTUWHEL.js} +2 -2
  22. package/dist/{charts-V7ARZNKF.js → charts-FJ32GQK7.js} +2 -2
  23. package/dist/{chunk-6PMVAAA7.js → chunk-2RGPWU77.js} +3 -3
  24. package/dist/{chunk-TVEWKIK3.js → chunk-2WTKTG2C.js} +2 -2
  25. package/dist/{chunk-MXAPLSJ5.js → chunk-45YXODSB.js} +2 -2
  26. package/dist/{chunk-SJSUSJ47.js → chunk-4YJRBMMA.js} +2 -2
  27. package/dist/chunk-643M3AP5.js +564 -0
  28. package/dist/chunk-643M3AP5.js.map +1 -0
  29. package/dist/{chunk-766ASQWE.js → chunk-6JY4HNUH.js} +2413 -2368
  30. package/dist/chunk-6JY4HNUH.js.map +1 -0
  31. package/dist/chunk-6LTLIYAQ.js +194 -0
  32. package/dist/chunk-6LTLIYAQ.js.map +1 -0
  33. package/dist/chunk-6UZPE35A.js +724 -0
  34. package/dist/chunk-6UZPE35A.js.map +1 -0
  35. package/dist/chunk-6W6PTJFT.js +181 -0
  36. package/dist/chunk-6W6PTJFT.js.map +1 -0
  37. package/dist/chunk-7MZN73J2.js +162 -0
  38. package/dist/chunk-7MZN73J2.js.map +1 -0
  39. package/dist/{chunk-SVAPX2XN.js → chunk-A24GPVLY.js} +9 -7
  40. package/dist/{chunk-SVAPX2XN.js.map → chunk-A24GPVLY.js.map} +1 -1
  41. package/dist/chunk-AD6YEH6U.js +3408 -0
  42. package/dist/chunk-AD6YEH6U.js.map +1 -0
  43. package/dist/chunk-ADTDYJO7.js +265 -0
  44. package/dist/chunk-ADTDYJO7.js.map +1 -0
  45. package/dist/{chunk-WRAKK6K6.js → chunk-AR34B6XR.js} +5 -3
  46. package/dist/{chunk-WRAKK6K6.js.map → chunk-AR34B6XR.js.map} +1 -1
  47. package/dist/chunk-BMOUYXLX.js +418 -0
  48. package/dist/chunk-BMOUYXLX.js.map +1 -0
  49. package/dist/chunk-C6PELIHS.js +60 -0
  50. package/dist/chunk-C6PELIHS.js.map +1 -0
  51. package/dist/{chunk-MQJ2ECQT.js → chunk-CUPEENUY.js} +3 -3
  52. package/dist/{chunk-RZ4YESBG.js → chunk-DOYGMNMK.js} +1 -1
  53. package/dist/chunk-DOYGMNMK.js.map +1 -0
  54. package/dist/chunk-FFV2SXFD.js +380 -0
  55. package/dist/chunk-FFV2SXFD.js.map +1 -0
  56. package/dist/{chunk-EVE7MIIY.js → chunk-GUKKW7JI.js} +15 -16
  57. package/dist/chunk-GUKKW7JI.js.map +1 -0
  58. package/dist/{chunk-66OJ3WB4.js → chunk-H3BOLSTS.js} +2 -2
  59. package/dist/chunk-HKOPRRDJ.js +1021 -0
  60. package/dist/chunk-HKOPRRDJ.js.map +1 -0
  61. package/dist/{chunk-BXZ6EA52.js → chunk-HTF2GIQC.js} +57 -3
  62. package/dist/chunk-HTF2GIQC.js.map +1 -0
  63. package/dist/{chunk-TYAGMJNV.js → chunk-JOA5A3G3.js} +5 -5
  64. package/dist/{chunk-OCVQGBJK.js → chunk-KABG5PG3.js} +6 -4
  65. package/dist/{chunk-OCVQGBJK.js.map → chunk-KABG5PG3.js.map} +1 -1
  66. package/dist/{chunk-VEHFVBLI.js → chunk-KT7NLIXP.js} +2 -2
  67. package/dist/chunk-LFDXEYYB.js +150 -0
  68. package/dist/chunk-LFDXEYYB.js.map +1 -0
  69. package/dist/{chunk-I6BDYQIG.js → chunk-M7YLQHFP.js} +6 -6
  70. package/dist/chunk-M7YLQHFP.js.map +1 -0
  71. package/dist/{chunk-AYUKPTSM.js → chunk-MFK34XSY.js} +96 -218
  72. package/dist/chunk-MFK34XSY.js.map +1 -0
  73. package/dist/chunk-MIC5IBQF.js +386 -0
  74. package/dist/chunk-MIC5IBQF.js.map +1 -0
  75. package/dist/{chunk-4UOE5TUZ.js → chunk-NMSHVO5O.js} +4 -4
  76. package/dist/{chunk-XKYRH4FM.js → chunk-NYVBXUGD.js} +13 -32
  77. package/dist/chunk-NYVBXUGD.js.map +1 -0
  78. package/dist/chunk-ODCFS5WD.js +463 -0
  79. package/dist/chunk-ODCFS5WD.js.map +1 -0
  80. package/dist/{chunk-ZLZKF2PM.js → chunk-PUNIMPMY.js} +32 -2
  81. package/dist/chunk-PUNIMPMY.js.map +1 -0
  82. package/dist/chunk-S4NJJS5C.js +37 -0
  83. package/dist/chunk-S4NJJS5C.js.map +1 -0
  84. package/dist/{chunk-NHMBTUMW.js → chunk-TAAZB5KN.js} +2 -2
  85. package/dist/{chunk-BRBWNV65.js → chunk-U2X2J3FI.js} +3 -3
  86. package/dist/chunk-U2X2J3FI.js.map +1 -0
  87. package/dist/{chunk-PLDDJCW6.js → chunk-UP2VWCW5.js} +1 -12
  88. package/dist/{chunk-4GLYY4NN.js → chunk-UWUIJTT4.js} +8 -2
  89. package/dist/chunk-UWUIJTT4.js.map +1 -0
  90. package/dist/{chunk-SPPMCAKG.js → chunk-VKMFUIVA.js} +2 -2
  91. package/dist/chunk-VKMFUIVA.js.map +1 -0
  92. package/dist/chunk-WZAH34TG.js +129 -0
  93. package/dist/chunk-WZAH34TG.js.map +1 -0
  94. package/dist/{chunk-H5RQOFO2.js → chunk-X6Q3K3L2.js} +6 -6
  95. package/dist/chunk-X6Q3K3L2.js.map +1 -0
  96. package/dist/chunk-XTX7EK43.js +134 -0
  97. package/dist/chunk-XTX7EK43.js.map +1 -0
  98. package/dist/chunk-ZIYTHUM5.js +457 -0
  99. package/dist/chunk-ZIYTHUM5.js.map +1 -0
  100. package/dist/chunker-K6WTR62A.js +12 -0
  101. package/dist/cli.js +1 -1
  102. package/dist/{client-ZQSFPMOB.js → client-FOIYPOZQ.js} +5 -6
  103. package/dist/{clipboard-manager-TEO2GEDN.js → clipboard-manager-4SBNESGZ.js} +2 -2
  104. package/dist/coding-agent-DESSU3AC.js +233 -0
  105. package/dist/coding-agent-DESSU3AC.js.map +1 -0
  106. package/dist/commands/setup.js +1 -1
  107. package/dist/commands/start.js +2 -2
  108. package/dist/commands/status.js +1 -1
  109. package/dist/commands/stop.js +1 -1
  110. package/dist/commands/utils.js +1 -1
  111. package/dist/cost-tracker-EMOIOYH7.js +11 -0
  112. package/dist/{cron-explain-HHQKPD3M.js → cron-explain-UOOOYWZZ.js} +2 -2
  113. package/dist/{crypto-4AP47IKC.js → crypto-2VG3RJR2.js} +2 -2
  114. package/dist/{databases-37X4CI2Y.js → databases-XDPMG5AV.js} +4 -4
  115. package/dist/db-LRIOKQBO.js +77 -0
  116. package/dist/discord-NKR3X4AV.js +80 -0
  117. package/dist/documents-EYIYLZK2.js +184 -0
  118. package/dist/documents-EYIYLZK2.js.map +1 -0
  119. package/dist/docx-parser-EXL4TN5E.js +16 -0
  120. package/dist/{email-K7LO2IPB.js → email-EAQNULVD.js} +33 -25
  121. package/dist/{email-K7LO2IPB.js.map → email-EAQNULVD.js.map} +1 -1
  122. package/dist/{enhanced-retrieval-DNLLEM4Z.js → enhanced-retrieval-OGHT6TS5.js} +11 -8
  123. package/dist/{enhanced-retrieval-DNLLEM4Z.js.map → enhanced-retrieval-OGHT6TS5.js.map} +1 -1
  124. package/dist/enrichment-pipeline-CMUVBDC7.js +14 -0
  125. package/dist/{entity-resolution-Y3IUWEAT.js → entity-resolution-4X4JU43O.js} +6 -5
  126. package/dist/env-CHOFICED.js +12 -0
  127. package/dist/error-tracker-SVQSDQDW.js +32 -0
  128. package/dist/finnhub-X7ZMQSXF.js +178 -0
  129. package/dist/finnhub-X7ZMQSXF.js.map +1 -0
  130. package/dist/fred-TMUF3J2V.js +203 -0
  131. package/dist/fred-TMUF3J2V.js.map +1 -0
  132. package/dist/github-KGNILDWJ.js +833 -0
  133. package/dist/github-KGNILDWJ.js.map +1 -0
  134. package/dist/{google-workspace-DKWUVNGC.js → google-workspace-TSZPZK5G.js} +2 -2
  135. package/dist/{hash-tool-ULQYD7B5.js → hash-tool-ENAB5LWH.js} +2 -2
  136. package/dist/{heartbeat-monitor-GCISLXI3.js → heartbeat-monitor-KRDYTDBF.js} +2 -2
  137. package/dist/hooks-N4MIFBVM.js +14 -0
  138. package/dist/{image-generation-OSU7FP6F.js → image-generation-MDE6AVQO.js} +2 -2
  139. package/dist/imessage-V2XNDDHT.js +43 -0
  140. package/dist/inbox-summarizer-DKKRYXDR.js +55 -0
  141. package/dist/{incident-response-C5J7Q6DT.js → incident-response-ZTIKUWEO.js} +8 -6
  142. package/dist/{incident-response-C5J7Q6DT.js.map → incident-response-ZTIKUWEO.js.map} +1 -1
  143. package/dist/{inventory-manager-352OHXWD.js → inventory-manager-C67BSZM6.js} +2 -2
  144. package/dist/{jira-GSGDBMIG.js → jira-PAGZWUBJ.js} +2 -2
  145. package/dist/{json-tool-QE2SYHEG.js → json-tool-4FK5RNER.js} +2 -2
  146. package/dist/{key-rotation-DPHU4ZTB.js → key-rotation-WCC5FOYS.js} +2 -2
  147. package/dist/knowledge-base-J7PJ7MZ3.js +46 -0
  148. package/dist/lib.d.ts +73 -1
  149. package/dist/lib.js +86 -76
  150. package/dist/lib.js.map +1 -1
  151. package/dist/{mailchimp-KKNF6QJ7.js → mailchimp-ZFYDC44J.js} +2 -2
  152. package/dist/{matrix-QVHG76I7.js → matrix-XHTR53VQ.js} +29 -21
  153. package/dist/{matrix-QVHG76I7.js.map → matrix-XHTR53VQ.js.map} +1 -1
  154. package/dist/{mcp-3JI6W7ZE.js → mcp-3C2TN67D.js} +3 -3
  155. package/dist/metrics-VJDWQWU7.js +25 -0
  156. package/dist/{microsoft365-UCBKJHNX.js → microsoft365-6G2IJMWC.js} +2 -2
  157. package/dist/multi-user-S56GUD6L.js +411 -0
  158. package/dist/multi-user-S56GUD6L.js.map +1 -0
  159. package/dist/{ocr-AC7NPX33.js → ocr-LGUIPKVZ.js} +6 -4
  160. package/dist/{ollama-BOAMSPLJ.js → ollama-J7CU45WT.js} +2 -2
  161. package/dist/osint-agent-RL5XPBRQ.js +189 -0
  162. package/dist/osint-agent-RL5XPBRQ.js.map +1 -0
  163. package/dist/{pages-MI523RB7.js → pages-XDE7JRCA.js} +5 -5
  164. package/dist/{pair-JDFTERIK.js → pair-YZJFQUU5.js} +2 -2
  165. package/dist/{pairing-IFQYCPNS.js → pairing-77N47RAT.js} +2 -2
  166. package/dist/{pdf-ALQVOEJR.js → pdf-67HGXCFJ.js} +3 -3
  167. package/dist/pdf-parser-YLMTTYHL.js +14 -0
  168. package/dist/{presentations-DSV5IHG5.js → presentations-HXTAMGHT.js} +3 -3
  169. package/dist/presentations-HXTAMGHT.js.map +1 -0
  170. package/dist/{prometheus-JNT2BD4L.js → prometheus-YETCZO4I.js} +2 -2
  171. package/dist/{providers-J4LYPHDR.js → providers-H6YIC3MG.js} +6 -4
  172. package/dist/{qr-code-WIX4PB4U.js → qr-code-6WZJHRKL.js} +2 -2
  173. package/dist/{quickbooks-XB4NII2S.js → quickbooks-N675W7IK.js} +2 -2
  174. package/dist/{regex-tool-W4ABRKGK.js → regex-tool-6Q63LQ7B.js} +2 -2
  175. package/dist/regex-tool-6Q63LQ7B.js.map +1 -0
  176. package/dist/research-agent-WCRSY3UZ.js +168 -0
  177. package/dist/research-agent-WCRSY3UZ.js.map +1 -0
  178. package/dist/risk-engine-YKCPT5D5.js +10 -0
  179. package/dist/risk-engine-YKCPT5D5.js.map +1 -0
  180. package/dist/scheduler-CA5UNHZV.js +73 -0
  181. package/dist/scheduler-CA5UNHZV.js.map +1 -0
  182. package/dist/schema-ALJ67YVG.js +72 -0
  183. package/dist/schema-ALJ67YVG.js.map +1 -0
  184. package/dist/{search-BCLBO5E3.js → search-GMLKBHSW.js} +4 -4
  185. package/dist/search-GMLKBHSW.js.map +1 -0
  186. package/dist/{sendgrid-RNXCAFKM.js → sendgrid-QGJIVPWV.js} +2 -2
  187. package/dist/{shopify-NCXYJB4R.js → shopify-ON2PAU27.js} +2 -2
  188. package/dist/signal-X7IQJGRQ.js +43 -0
  189. package/dist/signal-X7IQJGRQ.js.map +1 -0
  190. package/dist/slack-P2LFUJUQ.js +85 -0
  191. package/dist/slack-P2LFUJUQ.js.map +1 -0
  192. package/dist/{sms-M3JIOTCW.js → sms-4VME2HUL.js} +4 -4
  193. package/dist/sms-4VME2HUL.js.map +1 -0
  194. package/dist/{src-VYUE6LRA.js → src-S5KX4YEV.js} +179 -48
  195. package/dist/src-S5KX4YEV.js.map +1 -0
  196. package/dist/{stocks-XXWBPOCU.js → stocks-4M4HZWZS.js} +2 -2
  197. package/dist/stocks-4M4HZWZS.js.map +1 -0
  198. package/dist/text-extractor-OAUBAW5P.js +12 -0
  199. package/dist/text-extractor-OAUBAW5P.js.map +1 -0
  200. package/dist/{text-transform-6SGUA5Z4.js → text-transform-HCLCUDFZ.js} +2 -2
  201. package/dist/text-transform-HCLCUDFZ.js.map +1 -0
  202. package/dist/tools-FGPN522P.js +46 -0
  203. package/dist/tools-FGPN522P.js.map +1 -0
  204. package/dist/{tunnel-IWMXUML4.js → tunnel-XOUVVRAK.js} +4 -2
  205. package/dist/tunnel-XOUVVRAK.js.map +1 -0
  206. package/dist/{twilio-53GEW5JT.js → twilio-3L7DUNYQ.js} +2 -2
  207. package/dist/{unit-converter-ZYXMEZOE.js → unit-converter-LYPAHU64.js} +2 -2
  208. package/dist/unit-converter-LYPAHU64.js.map +1 -0
  209. package/dist/whatsapp-KRPQ4YUX.js +43 -0
  210. package/dist/whatsapp-KRPQ4YUX.js.map +1 -0
  211. package/dist/{word-document-7B6SJMAY.js → word-document-D6N2C47N.js} +4 -4
  212. package/dist/word-document-D6N2C47N.js.map +1 -0
  213. package/dist/workflow-store-ZYAYE5P6.js +373 -0
  214. package/dist/workflow-store-ZYAYE5P6.js.map +1 -0
  215. package/dist/writing-agent-VDGLNOGO.js +243 -0
  216. package/dist/writing-agent-VDGLNOGO.js.map +1 -0
  217. package/dist/{xero-QYO66D45.js → xero-UHAHVYSD.js} +2 -2
  218. package/dist/{zapier-webhook-TBZ5YF2A.js → zapier-webhook-NIELLTXR.js} +2 -2
  219. package/package.json +11 -1
  220. package/dist/archiver-AVNBYCKQ.js.map +0 -1
  221. package/dist/autonomy-ZXDBDQUJ.js.map +0 -1
  222. package/dist/bot-QRARP4UN.js +0 -36
  223. package/dist/brain-7XLLM3KC.js +0 -56
  224. package/dist/chunk-4GLYY4NN.js.map +0 -1
  225. package/dist/chunk-766ASQWE.js.map +0 -1
  226. package/dist/chunk-AYUKPTSM.js.map +0 -1
  227. package/dist/chunk-BRBWNV65.js.map +0 -1
  228. package/dist/chunk-BXZ6EA52.js.map +0 -1
  229. package/dist/chunk-EVE7MIIY.js.map +0 -1
  230. package/dist/chunk-H5RQOFO2.js.map +0 -1
  231. package/dist/chunk-I6BDYQIG.js.map +0 -1
  232. package/dist/chunk-IZJMVV7O.js +0 -347
  233. package/dist/chunk-IZJMVV7O.js.map +0 -1
  234. package/dist/chunk-O7IH7JTI.js +0 -1898
  235. package/dist/chunk-O7IH7JTI.js.map +0 -1
  236. package/dist/chunk-RZ4YESBG.js.map +0 -1
  237. package/dist/chunk-SPPMCAKG.js.map +0 -1
  238. package/dist/chunk-VRD5CYRL.js +0 -1568
  239. package/dist/chunk-VRD5CYRL.js.map +0 -1
  240. package/dist/chunk-XKYRH4FM.js.map +0 -1
  241. package/dist/chunk-ZLZKF2PM.js.map +0 -1
  242. package/dist/discord-B3HUPGQ6.js +0 -70
  243. package/dist/dist-UISMLMFN.js +0 -21847
  244. package/dist/dist-UISMLMFN.js.map +0 -1
  245. package/dist/enrichment-pipeline-MNHNW65K.js +0 -13
  246. package/dist/env-IWXUVTCB.js +0 -12
  247. package/dist/imessage-NGA2XF2V.js +0 -35
  248. package/dist/inbox-summarizer-NRI4S7IF.js +0 -47
  249. package/dist/presentations-DSV5IHG5.js.map +0 -1
  250. package/dist/scheduler-VK4WFERV.js +0 -63
  251. package/dist/signal-6CGDFYL2.js +0 -35
  252. package/dist/slack-IZQWIKOH.js +0 -75
  253. package/dist/src-VYUE6LRA.js.map +0 -1
  254. package/dist/tools-2RLEI2N6.js +0 -38
  255. package/dist/tunnel-IWMXUML4.js.map +0 -1
  256. package/dist/whatsapp-LFX6YKCM.js +0 -35
  257. package/dist/word-document-7B6SJMAY.js.map +0 -1
  258. /package/dist/{audit-logger-OBPR7CRO.js.map → agent-manager-7N7REQZQ.js.map} +0 -0
  259. /package/dist/{auth-UOX5K2BE.js.map → agent-types-2T4PXLFQ.js.map} +0 -0
  260. /package/dist/{backup-restore-PZ7CYYB7.js.map → audit-logger-AU3TMWKI.js.map} +0 -0
  261. /package/dist/{blocks-R3PODY47.js.map → auth-PH5IHISW.js.map} +0 -0
  262. /package/dist/{aws-s3-Q4LLZZPD.js.map → aws-s3-QZMURYXB.js.map} +0 -0
  263. /package/dist/{bot-QRARP4UN.js.map → backup-restore-72OQTZO3.js.map} +0 -0
  264. /package/dist/{brain-7XLLM3KC.js.map → blocks-YOWOESDD.js.map} +0 -0
  265. /package/dist/{chunk-PLDDJCW6.js.map → bot-MU2TJQ3Y.js.map} +0 -0
  266. /package/dist/{client-ZQSFPMOB.js.map → brain-SLA474EU.js.map} +0 -0
  267. /package/dist/{camera-monitor-M5CYKUU4.js.map → camera-monitor-LHTUWHEL.js.map} +0 -0
  268. /package/dist/{charts-V7ARZNKF.js.map → charts-FJ32GQK7.js.map} +0 -0
  269. /package/dist/{chunk-6PMVAAA7.js.map → chunk-2RGPWU77.js.map} +0 -0
  270. /package/dist/{chunk-TVEWKIK3.js.map → chunk-2WTKTG2C.js.map} +0 -0
  271. /package/dist/{chunk-MXAPLSJ5.js.map → chunk-45YXODSB.js.map} +0 -0
  272. /package/dist/{chunk-SJSUSJ47.js.map → chunk-4YJRBMMA.js.map} +0 -0
  273. /package/dist/{chunk-MQJ2ECQT.js.map → chunk-CUPEENUY.js.map} +0 -0
  274. /package/dist/{chunk-66OJ3WB4.js.map → chunk-H3BOLSTS.js.map} +0 -0
  275. /package/dist/{chunk-TYAGMJNV.js.map → chunk-JOA5A3G3.js.map} +0 -0
  276. /package/dist/{chunk-VEHFVBLI.js.map → chunk-KT7NLIXP.js.map} +0 -0
  277. /package/dist/{chunk-4UOE5TUZ.js.map → chunk-NMSHVO5O.js.map} +0 -0
  278. /package/dist/{chunk-NHMBTUMW.js.map → chunk-TAAZB5KN.js.map} +0 -0
  279. /package/dist/{clipboard-manager-TEO2GEDN.js.map → chunk-UP2VWCW5.js.map} +0 -0
  280. /package/dist/{cron-explain-HHQKPD3M.js.map → chunker-K6WTR62A.js.map} +0 -0
  281. /package/dist/{crypto-4AP47IKC.js.map → client-FOIYPOZQ.js.map} +0 -0
  282. /package/dist/{databases-37X4CI2Y.js.map → clipboard-manager-4SBNESGZ.js.map} +0 -0
  283. /package/dist/{discord-B3HUPGQ6.js.map → cost-tracker-EMOIOYH7.js.map} +0 -0
  284. /package/dist/{enrichment-pipeline-MNHNW65K.js.map → cron-explain-UOOOYWZZ.js.map} +0 -0
  285. /package/dist/{entity-resolution-Y3IUWEAT.js.map → crypto-2VG3RJR2.js.map} +0 -0
  286. /package/dist/{env-IWXUVTCB.js.map → databases-XDPMG5AV.js.map} +0 -0
  287. /package/dist/{hash-tool-ULQYD7B5.js.map → db-LRIOKQBO.js.map} +0 -0
  288. /package/dist/{heartbeat-monitor-GCISLXI3.js.map → discord-NKR3X4AV.js.map} +0 -0
  289. /package/dist/{imessage-NGA2XF2V.js.map → docx-parser-EXL4TN5E.js.map} +0 -0
  290. /package/dist/{inbox-summarizer-NRI4S7IF.js.map → enrichment-pipeline-CMUVBDC7.js.map} +0 -0
  291. /package/dist/{inventory-manager-352OHXWD.js.map → entity-resolution-4X4JU43O.js.map} +0 -0
  292. /package/dist/{json-tool-QE2SYHEG.js.map → env-CHOFICED.js.map} +0 -0
  293. /package/dist/{key-rotation-DPHU4ZTB.js.map → error-tracker-SVQSDQDW.js.map} +0 -0
  294. /package/dist/{google-workspace-DKWUVNGC.js.map → google-workspace-TSZPZK5G.js.map} +0 -0
  295. /package/dist/{mcp-3JI6W7ZE.js.map → hash-tool-ENAB5LWH.js.map} +0 -0
  296. /package/dist/{ocr-AC7NPX33.js.map → heartbeat-monitor-KRDYTDBF.js.map} +0 -0
  297. /package/dist/{ollama-BOAMSPLJ.js.map → hooks-N4MIFBVM.js.map} +0 -0
  298. /package/dist/{image-generation-OSU7FP6F.js.map → image-generation-MDE6AVQO.js.map} +0 -0
  299. /package/dist/{pages-MI523RB7.js.map → imessage-V2XNDDHT.js.map} +0 -0
  300. /package/dist/{pairing-IFQYCPNS.js.map → inbox-summarizer-DKKRYXDR.js.map} +0 -0
  301. /package/dist/{pdf-ALQVOEJR.js.map → inventory-manager-C67BSZM6.js.map} +0 -0
  302. /package/dist/{jira-GSGDBMIG.js.map → jira-PAGZWUBJ.js.map} +0 -0
  303. /package/dist/{prometheus-JNT2BD4L.js.map → json-tool-4FK5RNER.js.map} +0 -0
  304. /package/dist/{providers-J4LYPHDR.js.map → key-rotation-WCC5FOYS.js.map} +0 -0
  305. /package/dist/{qr-code-WIX4PB4U.js.map → knowledge-base-J7PJ7MZ3.js.map} +0 -0
  306. /package/dist/{mailchimp-KKNF6QJ7.js.map → mailchimp-ZFYDC44J.js.map} +0 -0
  307. /package/dist/{regex-tool-W4ABRKGK.js.map → mcp-3C2TN67D.js.map} +0 -0
  308. /package/dist/{scheduler-VK4WFERV.js.map → metrics-VJDWQWU7.js.map} +0 -0
  309. /package/dist/{microsoft365-UCBKJHNX.js.map → microsoft365-6G2IJMWC.js.map} +0 -0
  310. /package/dist/{search-BCLBO5E3.js.map → ocr-LGUIPKVZ.js.map} +0 -0
  311. /package/dist/{signal-6CGDFYL2.js.map → ollama-J7CU45WT.js.map} +0 -0
  312. /package/dist/{slack-IZQWIKOH.js.map → pages-XDE7JRCA.js.map} +0 -0
  313. /package/dist/{pair-JDFTERIK.js.map → pair-YZJFQUU5.js.map} +0 -0
  314. /package/dist/{sms-M3JIOTCW.js.map → pairing-77N47RAT.js.map} +0 -0
  315. /package/dist/{stocks-XXWBPOCU.js.map → pdf-67HGXCFJ.js.map} +0 -0
  316. /package/dist/{text-transform-6SGUA5Z4.js.map → pdf-parser-YLMTTYHL.js.map} +0 -0
  317. /package/dist/{tools-2RLEI2N6.js.map → prometheus-YETCZO4I.js.map} +0 -0
  318. /package/dist/{unit-converter-ZYXMEZOE.js.map → providers-H6YIC3MG.js.map} +0 -0
  319. /package/dist/{whatsapp-LFX6YKCM.js.map → qr-code-6WZJHRKL.js.map} +0 -0
  320. /package/dist/{quickbooks-XB4NII2S.js.map → quickbooks-N675W7IK.js.map} +0 -0
  321. /package/dist/{sendgrid-RNXCAFKM.js.map → sendgrid-QGJIVPWV.js.map} +0 -0
  322. /package/dist/{shopify-NCXYJB4R.js.map → shopify-ON2PAU27.js.map} +0 -0
  323. /package/dist/{twilio-53GEW5JT.js.map → twilio-3L7DUNYQ.js.map} +0 -0
  324. /package/dist/{xero-QYO66D45.js.map → xero-UHAHVYSD.js.map} +0 -0
  325. /package/dist/{zapier-webhook-TBZ5YF2A.js.map → zapier-webhook-NIELLTXR.js.map} +0 -0
@@ -0,0 +1,1021 @@
1
+ import {
2
+ providerRegistry
3
+ } from "./chunk-HTF2GIQC.js";
4
+ import {
5
+ env
6
+ } from "./chunk-PUNIMPMY.js";
7
+
8
+ // src/integrations/github/client.ts
9
+ import { Octokit } from "octokit";
10
+ var octokitInstance = null;
11
+ function getOctokit(config) {
12
+ const token = config?.token || env.GITHUB_TOKEN;
13
+ if (!token) {
14
+ throw new Error("GitHub token is required. Set GITHUB_TOKEN environment variable.");
15
+ }
16
+ if (!octokitInstance || config?.token) {
17
+ octokitInstance = new Octokit({
18
+ auth: token,
19
+ baseUrl: config?.baseUrl
20
+ });
21
+ }
22
+ return octokitInstance;
23
+ }
24
+ function createOctokit(config) {
25
+ const token = config.token || env.GITHUB_TOKEN;
26
+ if (!token) {
27
+ throw new Error("GitHub token is required.");
28
+ }
29
+ return new Octokit({
30
+ auth: token,
31
+ baseUrl: config.baseUrl
32
+ });
33
+ }
34
+ async function getAuthenticatedUser(config) {
35
+ const octokit = getOctokit(config);
36
+ const { data } = await octokit.rest.users.getAuthenticated();
37
+ return {
38
+ login: data.login,
39
+ id: data.id,
40
+ name: data.name,
41
+ email: data.email,
42
+ avatarUrl: data.avatar_url
43
+ };
44
+ }
45
+ async function getRateLimit(config) {
46
+ const octokit = getOctokit(config);
47
+ const { data } = await octokit.rest.rateLimit.get();
48
+ return {
49
+ limit: data.rate.limit,
50
+ remaining: data.rate.remaining,
51
+ reset: new Date(data.rate.reset * 1e3),
52
+ used: data.rate.used
53
+ };
54
+ }
55
+ function parseRepoString(repoString) {
56
+ if (repoString.includes("github.com")) {
57
+ const match = repoString.match(/github\.com[/:]([\w.-]+)\/([\w.-]+)/);
58
+ if (match) {
59
+ return { owner: match[1], repo: match[2].replace(/\.git$/, "") };
60
+ }
61
+ }
62
+ const parts = repoString.split("/");
63
+ if (parts.length === 2) {
64
+ return { owner: parts[0], repo: parts[1] };
65
+ }
66
+ throw new Error(`Invalid repository string: ${repoString}. Expected format: owner/repo or GitHub URL`);
67
+ }
68
+
69
+ // src/integrations/github/pull-requests.ts
70
+ async function listPullRequests(repoString, options = {}, config) {
71
+ const octokit = getOctokit(config);
72
+ const { owner, repo } = parseRepoString(repoString);
73
+ const { data } = await octokit.rest.pulls.list({
74
+ owner,
75
+ repo,
76
+ state: options.state || "open",
77
+ head: options.head,
78
+ base: options.base,
79
+ sort: options.sort || "created",
80
+ direction: options.direction || "desc",
81
+ per_page: options.perPage || 30,
82
+ page: options.page || 1
83
+ });
84
+ return data.map(mapPullRequest);
85
+ }
86
+ async function getPullRequest(repoString, prNumber, config) {
87
+ const octokit = getOctokit(config);
88
+ const { owner, repo } = parseRepoString(repoString);
89
+ const { data } = await octokit.rest.pulls.get({
90
+ owner,
91
+ repo,
92
+ pull_number: prNumber
93
+ });
94
+ return mapPullRequest(data);
95
+ }
96
+ async function createPullRequest(repoString, options, config) {
97
+ const octokit = getOctokit(config);
98
+ const { owner, repo } = parseRepoString(repoString);
99
+ const { data } = await octokit.rest.pulls.create({
100
+ owner,
101
+ repo,
102
+ title: options.title,
103
+ body: options.body,
104
+ head: options.head,
105
+ base: options.base,
106
+ draft: options.draft,
107
+ maintainer_can_modify: options.maintainerCanModify
108
+ });
109
+ return mapPullRequest(data);
110
+ }
111
+ async function updatePullRequest(repoString, prNumber, options, config) {
112
+ const octokit = getOctokit(config);
113
+ const { owner, repo } = parseRepoString(repoString);
114
+ const { data } = await octokit.rest.pulls.update({
115
+ owner,
116
+ repo,
117
+ pull_number: prNumber,
118
+ title: options.title,
119
+ body: options.body,
120
+ state: options.state,
121
+ base: options.base,
122
+ maintainer_can_modify: options.maintainerCanModify
123
+ });
124
+ return mapPullRequest(data);
125
+ }
126
+ async function closePullRequest(repoString, prNumber, config) {
127
+ return updatePullRequest(repoString, prNumber, { state: "closed" }, config);
128
+ }
129
+ async function reopenPullRequest(repoString, prNumber, config) {
130
+ return updatePullRequest(repoString, prNumber, { state: "open" }, config);
131
+ }
132
+ async function markReadyForReview(repoString, prNumber, config) {
133
+ const octokit = getOctokit(config);
134
+ const { owner, repo } = parseRepoString(repoString);
135
+ await octokit.graphql(`
136
+ mutation($pullRequestId: ID!) {
137
+ markPullRequestReadyForReview(input: {pullRequestId: $pullRequestId}) {
138
+ pullRequest {
139
+ id
140
+ }
141
+ }
142
+ }
143
+ `, {
144
+ pullRequestId: `PR_${Buffer.from(`010:PullRequest${await getPullRequestNodeId(octokit, owner, repo, prNumber)}`).toString("base64")}`
145
+ }).catch(async () => {
146
+ const pr = await getPullRequest(repoString, prNumber, config);
147
+ console.log("PR may already be ready for review or permissions are insufficient");
148
+ });
149
+ }
150
+ async function convertToDraft(repoString, prNumber, config) {
151
+ const octokit = getOctokit(config);
152
+ const { owner, repo } = parseRepoString(repoString);
153
+ const { repository } = await octokit.graphql(`
154
+ query($owner: String!, $repo: String!, $number: Int!) {
155
+ repository(owner: $owner, name: $repo) {
156
+ pullRequest(number: $number) {
157
+ id
158
+ }
159
+ }
160
+ }
161
+ `, { owner, repo, number: prNumber });
162
+ await octokit.graphql(`
163
+ mutation($pullRequestId: ID!) {
164
+ convertPullRequestToDraft(input: {pullRequestId: $pullRequestId}) {
165
+ pullRequest {
166
+ id
167
+ }
168
+ }
169
+ }
170
+ `, { pullRequestId: repository.pullRequest.id });
171
+ }
172
+ async function requestReviewers(repoString, prNumber, reviewers, teamReviewers, config) {
173
+ const octokit = getOctokit(config);
174
+ const { owner, repo } = parseRepoString(repoString);
175
+ const { data } = await octokit.rest.pulls.requestReviewers({
176
+ owner,
177
+ repo,
178
+ pull_number: prNumber,
179
+ reviewers,
180
+ team_reviewers: teamReviewers
181
+ });
182
+ return mapPullRequest(data);
183
+ }
184
+ async function removeReviewRequest(repoString, prNumber, reviewers, teamReviewers, config) {
185
+ const octokit = getOctokit(config);
186
+ const { owner, repo } = parseRepoString(repoString);
187
+ const { data } = await octokit.rest.pulls.removeRequestedReviewers({
188
+ owner,
189
+ repo,
190
+ pull_number: prNumber,
191
+ reviewers,
192
+ team_reviewers: teamReviewers
193
+ });
194
+ return mapPullRequest(data);
195
+ }
196
+ async function listReviews(repoString, prNumber, options, config) {
197
+ const octokit = getOctokit(config);
198
+ const { owner, repo } = parseRepoString(repoString);
199
+ const { data } = await octokit.rest.pulls.listReviews({
200
+ owner,
201
+ repo,
202
+ pull_number: prNumber,
203
+ per_page: options?.perPage || 30,
204
+ page: options?.page || 1
205
+ });
206
+ return data.map(mapReview);
207
+ }
208
+ async function createReview(repoString, prNumber, options, config) {
209
+ const octokit = getOctokit(config);
210
+ const { owner, repo } = parseRepoString(repoString);
211
+ const { data } = await octokit.rest.pulls.createReview({
212
+ owner,
213
+ repo,
214
+ pull_number: prNumber,
215
+ commit_id: options.commitId,
216
+ body: options.body,
217
+ event: options.event,
218
+ comments: options.comments
219
+ });
220
+ return mapReview(data);
221
+ }
222
+ async function approvePullRequest(repoString, prNumber, body, config) {
223
+ return createReview(repoString, prNumber, {
224
+ event: "APPROVE",
225
+ body
226
+ }, config);
227
+ }
228
+ async function requestChanges(repoString, prNumber, body, config) {
229
+ return createReview(repoString, prNumber, {
230
+ event: "REQUEST_CHANGES",
231
+ body
232
+ }, config);
233
+ }
234
+ async function submitReview(repoString, prNumber, reviewId, event, body, config) {
235
+ const octokit = getOctokit(config);
236
+ const { owner, repo } = parseRepoString(repoString);
237
+ const { data } = await octokit.rest.pulls.submitReview({
238
+ owner,
239
+ repo,
240
+ pull_number: prNumber,
241
+ review_id: reviewId,
242
+ event,
243
+ body
244
+ });
245
+ return mapReview(data);
246
+ }
247
+ async function dismissReview(repoString, prNumber, reviewId, message, config) {
248
+ const octokit = getOctokit(config);
249
+ const { owner, repo } = parseRepoString(repoString);
250
+ const { data } = await octokit.rest.pulls.dismissReview({
251
+ owner,
252
+ repo,
253
+ pull_number: prNumber,
254
+ review_id: reviewId,
255
+ message
256
+ });
257
+ return mapReview(data);
258
+ }
259
+ async function listReviewComments(repoString, prNumber, options, config) {
260
+ const octokit = getOctokit(config);
261
+ const { owner, repo } = parseRepoString(repoString);
262
+ const { data } = await octokit.rest.pulls.listReviewComments({
263
+ owner,
264
+ repo,
265
+ pull_number: prNumber,
266
+ sort: options?.sort,
267
+ direction: options?.direction,
268
+ since: options?.since,
269
+ per_page: options?.perPage || 30,
270
+ page: options?.page || 1
271
+ });
272
+ return data.map(mapReviewComment);
273
+ }
274
+ async function createReviewComment(repoString, prNumber, body, commitId, path, options, config) {
275
+ const octokit = getOctokit(config);
276
+ const { owner, repo } = parseRepoString(repoString);
277
+ const { data } = await octokit.rest.pulls.createReviewComment({
278
+ owner,
279
+ repo,
280
+ pull_number: prNumber,
281
+ body,
282
+ commit_id: commitId,
283
+ path,
284
+ position: options?.position,
285
+ line: options?.line,
286
+ side: options?.side,
287
+ start_line: options?.startLine,
288
+ start_side: options?.startSide,
289
+ in_reply_to: options?.inReplyTo
290
+ });
291
+ return mapReviewComment(data);
292
+ }
293
+ async function replyToReviewComment(repoString, prNumber, commentId, body, config) {
294
+ const octokit = getOctokit(config);
295
+ const { owner, repo } = parseRepoString(repoString);
296
+ const { data } = await octokit.rest.pulls.createReplyForReviewComment({
297
+ owner,
298
+ repo,
299
+ pull_number: prNumber,
300
+ comment_id: commentId,
301
+ body
302
+ });
303
+ return mapReviewComment(data);
304
+ }
305
+ async function listFiles(repoString, prNumber, options, config) {
306
+ const octokit = getOctokit(config);
307
+ const { owner, repo } = parseRepoString(repoString);
308
+ const { data } = await octokit.rest.pulls.listFiles({
309
+ owner,
310
+ repo,
311
+ pull_number: prNumber,
312
+ per_page: options?.perPage || 30,
313
+ page: options?.page || 1
314
+ });
315
+ return data.map(mapPullRequestFile);
316
+ }
317
+ async function listCommits(repoString, prNumber, options, config) {
318
+ const octokit = getOctokit(config);
319
+ const { owner, repo } = parseRepoString(repoString);
320
+ const { data } = await octokit.rest.pulls.listCommits({
321
+ owner,
322
+ repo,
323
+ pull_number: prNumber,
324
+ per_page: options?.perPage || 30,
325
+ page: options?.page || 1
326
+ });
327
+ return data.map((commit) => ({
328
+ sha: commit.sha,
329
+ message: commit.commit.message,
330
+ author: commit.commit.author ? {
331
+ name: commit.commit.author.name || "",
332
+ email: commit.commit.author.email || "",
333
+ date: commit.commit.author.date || ""
334
+ } : null,
335
+ committer: commit.commit.committer ? {
336
+ name: commit.commit.committer.name || "",
337
+ email: commit.commit.committer.email || "",
338
+ date: commit.commit.committer.date || ""
339
+ } : null,
340
+ htmlUrl: commit.html_url
341
+ }));
342
+ }
343
+ async function checkMergeability(repoString, prNumber, config) {
344
+ const pr = await getPullRequest(repoString, prNumber, config);
345
+ return {
346
+ mergeable: pr.mergeable,
347
+ mergeableState: pr.mergeableState,
348
+ merged: pr.merged
349
+ };
350
+ }
351
+ async function mergePullRequest(repoString, prNumber, options = {}, config) {
352
+ const octokit = getOctokit(config);
353
+ const { owner, repo } = parseRepoString(repoString);
354
+ const { data } = await octokit.rest.pulls.merge({
355
+ owner,
356
+ repo,
357
+ pull_number: prNumber,
358
+ commit_title: options.commitTitle,
359
+ commit_message: options.commitMessage,
360
+ sha: options.sha,
361
+ merge_method: options.mergeMethod || "merge"
362
+ });
363
+ return {
364
+ sha: data.sha,
365
+ merged: data.merged,
366
+ message: data.message
367
+ };
368
+ }
369
+ async function updateBranch(repoString, prNumber, expectedHeadSha, config) {
370
+ const octokit = getOctokit(config);
371
+ const { owner, repo } = parseRepoString(repoString);
372
+ const { data } = await octokit.rest.pulls.updateBranch({
373
+ owner,
374
+ repo,
375
+ pull_number: prNumber,
376
+ expected_head_sha: expectedHeadSha
377
+ });
378
+ return {
379
+ message: data.message || "",
380
+ url: data.url || ""
381
+ };
382
+ }
383
+ async function getPullRequestNodeId(octokit, owner, repo, prNumber) {
384
+ const { repository } = await octokit.graphql(`
385
+ query($owner: String!, $repo: String!, $number: Int!) {
386
+ repository(owner: $owner, name: $repo) {
387
+ pullRequest(number: $number) {
388
+ id
389
+ }
390
+ }
391
+ }
392
+ `, { owner, repo, number: prNumber });
393
+ return repository.pullRequest.id;
394
+ }
395
+ function mapPullRequest(data) {
396
+ return {
397
+ id: data.id,
398
+ number: data.number,
399
+ title: data.title,
400
+ body: data.body,
401
+ state: data.state,
402
+ htmlUrl: data.html_url,
403
+ diffUrl: data.diff_url,
404
+ patchUrl: data.patch_url,
405
+ draft: data.draft || false,
406
+ merged: data.merged || false,
407
+ mergeable: data.mergeable,
408
+ mergeableState: data.mergeable_state || "unknown",
409
+ mergedAt: data.merged_at,
410
+ mergedBy: data.merged_by ? {
411
+ login: data.merged_by.login,
412
+ id: data.merged_by.id,
413
+ avatarUrl: data.merged_by.avatar_url
414
+ } : null,
415
+ user: data.user ? {
416
+ login: data.user.login,
417
+ id: data.user.id,
418
+ avatarUrl: data.user.avatar_url
419
+ } : null,
420
+ head: {
421
+ ref: data.head.ref,
422
+ sha: data.head.sha,
423
+ repo: data.head.repo ? {
424
+ fullName: data.head.repo.full_name,
425
+ cloneUrl: data.head.repo.clone_url
426
+ } : null
427
+ },
428
+ base: {
429
+ ref: data.base.ref,
430
+ sha: data.base.sha,
431
+ repo: data.base.repo ? {
432
+ fullName: data.base.repo.full_name,
433
+ cloneUrl: data.base.repo.clone_url
434
+ } : null
435
+ },
436
+ labels: data.labels?.map((label) => ({
437
+ id: label.id,
438
+ name: label.name,
439
+ color: label.color,
440
+ description: label.description
441
+ })) || [],
442
+ assignees: data.assignees?.map((assignee) => ({
443
+ login: assignee.login,
444
+ id: assignee.id,
445
+ avatarUrl: assignee.avatar_url
446
+ })) || [],
447
+ requestedReviewers: data.requested_reviewers?.map((reviewer) => ({
448
+ login: reviewer.login,
449
+ id: reviewer.id,
450
+ avatarUrl: reviewer.avatar_url
451
+ })) || [],
452
+ requestedTeams: data.requested_teams?.map((team) => ({
453
+ id: team.id,
454
+ name: team.name,
455
+ slug: team.slug
456
+ })) || [],
457
+ milestone: data.milestone ? {
458
+ id: data.milestone.id,
459
+ number: data.milestone.number,
460
+ title: data.milestone.title,
461
+ state: data.milestone.state
462
+ } : null,
463
+ additions: data.additions || 0,
464
+ deletions: data.deletions || 0,
465
+ changedFiles: data.changed_files || 0,
466
+ commits: data.commits || 0,
467
+ comments: data.comments || 0,
468
+ reviewComments: data.review_comments || 0,
469
+ createdAt: data.created_at,
470
+ updatedAt: data.updated_at,
471
+ closedAt: data.closed_at
472
+ };
473
+ }
474
+ function mapReview(data) {
475
+ return {
476
+ id: data.id,
477
+ user: data.user ? {
478
+ login: data.user.login,
479
+ id: data.user.id,
480
+ avatarUrl: data.user.avatar_url
481
+ } : null,
482
+ body: data.body,
483
+ state: data.state,
484
+ htmlUrl: data.html_url,
485
+ submittedAt: data.submitted_at,
486
+ commitId: data.commit_id
487
+ };
488
+ }
489
+ function mapReviewComment(data) {
490
+ return {
491
+ id: data.id,
492
+ pullRequestReviewId: data.pull_request_review_id,
493
+ diffHunk: data.diff_hunk,
494
+ path: data.path,
495
+ position: data.position,
496
+ originalPosition: data.original_position,
497
+ commitId: data.commit_id,
498
+ originalCommitId: data.original_commit_id,
499
+ user: data.user ? {
500
+ login: data.user.login,
501
+ id: data.user.id,
502
+ avatarUrl: data.user.avatar_url
503
+ } : null,
504
+ body: data.body,
505
+ htmlUrl: data.html_url,
506
+ createdAt: data.created_at,
507
+ updatedAt: data.updated_at,
508
+ line: data.line,
509
+ side: data.side || "RIGHT",
510
+ startLine: data.start_line,
511
+ startSide: data.start_side,
512
+ inReplyToId: data.in_reply_to_id
513
+ };
514
+ }
515
+ function mapPullRequestFile(data) {
516
+ return {
517
+ sha: data.sha,
518
+ filename: data.filename,
519
+ status: data.status,
520
+ additions: data.additions,
521
+ deletions: data.deletions,
522
+ changes: data.changes,
523
+ blobUrl: data.blob_url,
524
+ rawUrl: data.raw_url,
525
+ contentsUrl: data.contents_url,
526
+ patch: data.patch,
527
+ previousFilename: data.previous_filename
528
+ };
529
+ }
530
+
531
+ // src/integrations/github/code-review.ts
532
+ async function reviewPullRequest(repoString, prNumber, options = {}) {
533
+ const { owner, repo } = parseRepoString(repoString);
534
+ const maxFiles = options.maxFiles || 20;
535
+ const [pr, files, commits] = await Promise.all([
536
+ getPullRequest(repoString, prNumber, options.githubConfig),
537
+ listFiles(repoString, prNumber, { perPage: maxFiles }, options.githubConfig),
538
+ listCommits(repoString, prNumber, { perPage: 10 }, options.githubConfig)
539
+ ]);
540
+ const reviewableFiles = files.filter((f) => {
541
+ if (!f.patch) return false;
542
+ if (f.patch.length > 5e4) return false;
543
+ if (isGeneratedFile(f.filename)) return false;
544
+ return true;
545
+ });
546
+ const diffContexts = reviewableFiles.map((file) => ({
547
+ file,
548
+ patch: file.patch
549
+ }));
550
+ const totalLines = reviewableFiles.reduce(
551
+ (sum, f) => sum + f.additions + f.deletions,
552
+ 0
553
+ );
554
+ const prompt = buildReviewPrompt(pr, diffContexts, commits, options);
555
+ const provider = providerRegistry.getDefault();
556
+ const response = await provider.createMessage({
557
+ model: "claude-sonnet-4-20250514",
558
+ max_tokens: 8192,
559
+ system: getSystemPrompt(options),
560
+ messages: [{ role: "user", content: prompt }]
561
+ });
562
+ const reviewContent = response.content[0]?.type === "text" ? response.content[0].text || "" : "";
563
+ const reviewResult = parseReviewResponse(
564
+ reviewContent,
565
+ pr,
566
+ reviewableFiles.length,
567
+ totalLines
568
+ );
569
+ if (options.autoSubmit) {
570
+ const reviewOptions = buildReviewOptions(reviewResult);
571
+ const review = await createReview(
572
+ repoString,
573
+ prNumber,
574
+ reviewOptions,
575
+ options.githubConfig
576
+ );
577
+ reviewResult.reviewSubmitted = true;
578
+ reviewResult.reviewId = review.id;
579
+ }
580
+ return reviewResult;
581
+ }
582
+ async function reviewFile(repoString, prNumber, filename, options = {}) {
583
+ const files = await listFiles(repoString, prNumber, { perPage: 100 }, options.githubConfig);
584
+ const file = files.find((f) => f.filename === filename);
585
+ if (!file) {
586
+ throw new Error(`File not found in pull request: ${filename}`);
587
+ }
588
+ if (!file.patch) {
589
+ throw new Error(`No diff available for file: ${filename}`);
590
+ }
591
+ const prompt = buildSingleFileReviewPrompt(file, options);
592
+ const provider = providerRegistry.getDefault();
593
+ const response = await provider.createMessage({
594
+ model: "claude-sonnet-4-20250514",
595
+ max_tokens: 4096,
596
+ system: getSystemPrompt(options),
597
+ messages: [{ role: "user", content: prompt }]
598
+ });
599
+ const reviewContent = response.content[0]?.type === "text" ? response.content[0].text || "" : "";
600
+ return parseSingleFileReview(reviewContent, filename);
601
+ }
602
+ async function summarizeChanges(repoString, prNumber, options) {
603
+ const [pr, files, commits] = await Promise.all([
604
+ getPullRequest(repoString, prNumber, options?.githubConfig),
605
+ listFiles(repoString, prNumber, { perPage: 50 }, options?.githubConfig),
606
+ listCommits(repoString, prNumber, { perPage: 20 }, options?.githubConfig)
607
+ ]);
608
+ const prompt = `Analyze this pull request and provide a summary:
609
+
610
+ **Pull Request:** ${pr.title}
611
+ **Description:** ${pr.body || "No description provided"}
612
+ **Author:** ${pr.user?.login || "Unknown"}
613
+ **Commits:** ${commits.length}
614
+ **Files Changed:** ${files.length}
615
+ **Lines Changed:** +${pr.additions} / -${pr.deletions}
616
+
617
+ **Commit Messages:**
618
+ ${commits.map((c) => `- ${c.message.split("\n")[0]}`).join("\n")}
619
+
620
+ **Files Changed:**
621
+ ${files.map((f) => `- ${f.filename} (${f.status}: +${f.additions}/-${f.deletions})`).join("\n")}
622
+
623
+ Provide your analysis in the following JSON format:
624
+ {
625
+ "summary": "A concise 2-3 sentence summary of what this PR does",
626
+ "keyChanges": ["Key change 1", "Key change 2"],
627
+ "impactAreas": ["Area that might be affected"],
628
+ "breakingChanges": ["Any breaking changes, or empty array if none"],
629
+ "testingRecommendations": ["What should be tested"]
630
+ }`;
631
+ const provider = providerRegistry.getDefault();
632
+ const response = await provider.createMessage({
633
+ model: "claude-sonnet-4-20250514",
634
+ max_tokens: 2048,
635
+ messages: [{ role: "user", content: prompt }]
636
+ });
637
+ const content = response.content[0]?.type === "text" ? response.content[0].text || "" : "";
638
+ try {
639
+ const jsonMatch = content.match(/\{[\s\S]*\}/);
640
+ if (jsonMatch) {
641
+ return JSON.parse(jsonMatch[0]);
642
+ }
643
+ } catch (e) {
644
+ }
645
+ return {
646
+ summary: content,
647
+ keyChanges: [],
648
+ impactAreas: [],
649
+ breakingChanges: [],
650
+ testingRecommendations: []
651
+ };
652
+ }
653
+ async function securityScan(repoString, prNumber, options) {
654
+ const files = await listFiles(repoString, prNumber, { perPage: 50 }, options?.githubConfig);
655
+ const reviewableFiles = files.filter((f) => f.patch && !isGeneratedFile(f.filename));
656
+ const prompt = `Perform a security analysis of these code changes.
657
+
658
+ **Files Changed:**
659
+ ${reviewableFiles.map(
660
+ (f) => `
661
+ ### ${f.filename}
662
+ \`\`\`diff
663
+ ${f.patch?.slice(0, 5e3) || ""}
664
+ \`\`\`
665
+ `
666
+ ).join("\n")}
667
+
668
+ Look for:
669
+ 1. SQL injection vulnerabilities
670
+ 2. XSS vulnerabilities
671
+ 3. Authentication/authorization issues
672
+ 4. Hardcoded secrets or credentials
673
+ 5. Insecure dependencies
674
+ 6. Path traversal vulnerabilities
675
+ 7. Command injection
676
+ 8. Insecure deserialization
677
+ 9. Sensitive data exposure
678
+ 10. Security misconfigurations
679
+
680
+ Respond in JSON format:
681
+ {
682
+ "vulnerabilities": [
683
+ {
684
+ "severity": "high",
685
+ "type": "SQL Injection",
686
+ "file": "path/to/file.ts",
687
+ "line": 42,
688
+ "description": "Description of the issue",
689
+ "recommendation": "How to fix it"
690
+ }
691
+ ],
692
+ "securityScore": 85,
693
+ "summary": "Overall security assessment"
694
+ }`;
695
+ const provider = providerRegistry.getDefault();
696
+ const response = await provider.createMessage({
697
+ model: "claude-sonnet-4-20250514",
698
+ max_tokens: 4096,
699
+ system: "You are a security expert reviewing code for vulnerabilities. Be thorough but avoid false positives.",
700
+ messages: [{ role: "user", content: prompt }]
701
+ });
702
+ const content = response.content[0]?.type === "text" ? response.content[0].text || "" : "";
703
+ try {
704
+ const jsonMatch = content.match(/\{[\s\S]*\}/);
705
+ if (jsonMatch) {
706
+ return JSON.parse(jsonMatch[0]);
707
+ }
708
+ } catch (e) {
709
+ }
710
+ return {
711
+ vulnerabilities: [],
712
+ securityScore: 100,
713
+ summary: "Unable to parse security scan results"
714
+ };
715
+ }
716
+ function getSystemPrompt(options) {
717
+ let prompt = `You are an expert code reviewer with deep knowledge of software engineering best practices.
718
+ Your task is to review pull requests and provide constructive, actionable feedback.
719
+
720
+ Guidelines:
721
+ - Be specific and constructive in your feedback
722
+ - Prioritize issues by severity (error > warning > info)
723
+ - Include code suggestions when possible
724
+ - Consider the context and purpose of the changes
725
+ - Acknowledge good practices when you see them`;
726
+ if (options.focusAreas?.length) {
727
+ prompt += `
728
+
729
+ Focus especially on: ${options.focusAreas.join(", ")}`;
730
+ }
731
+ if (options.language) {
732
+ prompt += `
733
+
734
+ This codebase uses ${options.language}. Apply language-specific best practices.`;
735
+ }
736
+ if (options.customGuidelines) {
737
+ prompt += `
738
+
739
+ Custom Review Guidelines:
740
+ ${options.customGuidelines}`;
741
+ }
742
+ return prompt;
743
+ }
744
+ function buildReviewPrompt(pr, contexts, commits, options) {
745
+ let prompt = `Review this pull request:
746
+
747
+ **Title:** ${pr.title}
748
+ **Author:** ${pr.user?.login || "Unknown"}
749
+ **Description:**
750
+ ${pr.body || "No description provided"}
751
+
752
+ **Commits (${commits.length}):**
753
+ ${commits.slice(0, 5).map((c) => `- ${c.message.split("\n")[0]}`).join("\n")}
754
+ ${commits.length > 5 ? `... and ${commits.length - 5} more commits` : ""}
755
+
756
+ **Changes:**
757
+ - Files changed: ${contexts.length}
758
+ - Additions: ${pr.additions}
759
+ - Deletions: ${pr.deletions}
760
+
761
+ **File Diffs:**
762
+ `;
763
+ for (const ctx of contexts) {
764
+ prompt += `
765
+ ### ${ctx.file.filename} (${ctx.file.status}: +${ctx.file.additions}/-${ctx.file.deletions})
766
+ \`\`\`diff
767
+ ${ctx.patch?.slice(0, 8e3) || "No diff available"}
768
+ \`\`\`
769
+ `;
770
+ }
771
+ prompt += `
772
+
773
+ Please provide your review in the following JSON format:
774
+ {
775
+ "summary": "A brief summary of the overall changes and their quality",
776
+ "issues": [
777
+ {
778
+ "severity": "error|warning|info",
779
+ "file": "path/to/file.ts",
780
+ "line": 42,
781
+ "endLine": 45,
782
+ "message": "Description of the issue",
783
+ "suggestion": "Code or explanation of how to fix it",
784
+ "category": "security|performance|maintainability|readability|testing|documentation|error-handling|best-practices"
785
+ }
786
+ ],
787
+ "overallAssessment": "approve|request-changes|comment",
788
+ "recommendations": ["General recommendation 1", "General recommendation 2"],
789
+ "metrics": {
790
+ "securityScore": 85,
791
+ "maintainabilityScore": 90,
792
+ "readabilityScore": 88,
793
+ "overallScore": 87
794
+ }
795
+ }`;
796
+ return prompt;
797
+ }
798
+ function buildSingleFileReviewPrompt(file, options) {
799
+ return `Review this file change:
800
+
801
+ **File:** ${file.filename}
802
+ **Status:** ${file.status}
803
+ **Changes:** +${file.additions}/-${file.deletions}
804
+
805
+ \`\`\`diff
806
+ ${file.patch || "No diff available"}
807
+ \`\`\`
808
+
809
+ Provide your review in JSON format:
810
+ {
811
+ "issues": [
812
+ {
813
+ "severity": "error|warning|info",
814
+ "line": 42,
815
+ "message": "Issue description",
816
+ "suggestion": "How to fix",
817
+ "category": "category"
818
+ }
819
+ ],
820
+ "suggestions": ["General improvement suggestion"],
821
+ "summary": "Brief summary of the file changes"
822
+ }`;
823
+ }
824
+ function parseReviewResponse(content, pr, filesReviewed, linesReviewed) {
825
+ const defaultResult = {
826
+ pullRequest: {
827
+ number: pr.number,
828
+ title: pr.title,
829
+ author: pr.user?.login || null,
830
+ url: pr.htmlUrl
831
+ },
832
+ summary: "",
833
+ issues: [],
834
+ filesReviewed,
835
+ linesReviewed,
836
+ overallAssessment: "comment",
837
+ recommendations: [],
838
+ metrics: {
839
+ securityScore: 0,
840
+ maintainabilityScore: 0,
841
+ readabilityScore: 0,
842
+ overallScore: 0
843
+ },
844
+ reviewSubmitted: false
845
+ };
846
+ try {
847
+ const jsonMatch = content.match(/\{[\s\S]*\}/);
848
+ if (jsonMatch) {
849
+ const parsed = JSON.parse(jsonMatch[0]);
850
+ return {
851
+ ...defaultResult,
852
+ summary: parsed.summary || "",
853
+ issues: parsed.issues || [],
854
+ overallAssessment: parsed.overallAssessment || "comment",
855
+ recommendations: parsed.recommendations || [],
856
+ metrics: parsed.metrics || defaultResult.metrics
857
+ };
858
+ }
859
+ } catch (e) {
860
+ return {
861
+ ...defaultResult,
862
+ summary: content.slice(0, 500)
863
+ };
864
+ }
865
+ return defaultResult;
866
+ }
867
+ function parseSingleFileReview(content, filename) {
868
+ const defaultResult = {
869
+ issues: [],
870
+ suggestions: [],
871
+ summary: content.slice(0, 300)
872
+ };
873
+ try {
874
+ const jsonMatch = content.match(/\{[\s\S]*\}/);
875
+ if (jsonMatch) {
876
+ const parsed = JSON.parse(jsonMatch[0]);
877
+ return {
878
+ issues: (parsed.issues || []).map((issue) => ({
879
+ ...issue,
880
+ file: filename
881
+ })),
882
+ suggestions: parsed.suggestions || [],
883
+ summary: parsed.summary || ""
884
+ };
885
+ }
886
+ } catch (e) {
887
+ }
888
+ return defaultResult;
889
+ }
890
+ function buildReviewOptions(result) {
891
+ const comments = [];
892
+ for (const issue of result.issues) {
893
+ if (issue.line) {
894
+ comments.push({
895
+ path: issue.file,
896
+ line: issue.line,
897
+ body: `**${issue.severity.toUpperCase()}** (${issue.category}): ${issue.message}${issue.suggestion ? `
898
+
899
+ **Suggestion:** ${issue.suggestion}` : ""}`
900
+ });
901
+ }
902
+ }
903
+ let event;
904
+ switch (result.overallAssessment) {
905
+ case "approve":
906
+ event = "APPROVE";
907
+ break;
908
+ case "request-changes":
909
+ event = "REQUEST_CHANGES";
910
+ break;
911
+ default:
912
+ event = "COMMENT";
913
+ }
914
+ let body = `## AI Code Review
915
+
916
+ ${result.summary}
917
+
918
+ `;
919
+ if (result.issues.length > 0) {
920
+ body += `### Issues Found (${result.issues.length})
921
+
922
+ `;
923
+ const errorCount = result.issues.filter((i) => i.severity === "error").length;
924
+ const warningCount = result.issues.filter((i) => i.severity === "warning").length;
925
+ const infoCount = result.issues.filter((i) => i.severity === "info").length;
926
+ body += `- Errors: ${errorCount}
927
+ - Warnings: ${warningCount}
928
+ - Info: ${infoCount}
929
+
930
+ `;
931
+ }
932
+ if (result.recommendations.length > 0) {
933
+ body += `### Recommendations
934
+
935
+ `;
936
+ for (const rec of result.recommendations) {
937
+ body += `- ${rec}
938
+ `;
939
+ }
940
+ body += "\n";
941
+ }
942
+ body += `### Metrics
943
+
944
+ `;
945
+ body += `| Metric | Score |
946
+ |--------|-------|
947
+ `;
948
+ body += `| Security | ${result.metrics.securityScore}/100 |
949
+ `;
950
+ body += `| Maintainability | ${result.metrics.maintainabilityScore}/100 |
951
+ `;
952
+ body += `| Readability | ${result.metrics.readabilityScore}/100 |
953
+ `;
954
+ body += `| **Overall** | **${result.metrics.overallScore}/100** |
955
+ `;
956
+ body += `
957
+ ---
958
+ *Reviewed by OpenSentinel AI*`;
959
+ return {
960
+ event,
961
+ body,
962
+ comments: comments.length > 0 ? comments : void 0
963
+ };
964
+ }
965
+ function isGeneratedFile(filename) {
966
+ const generatedPatterns = [
967
+ /\.min\.(js|css)$/,
968
+ /\.bundle\.(js|css)$/,
969
+ /package-lock\.json$/,
970
+ /yarn\.lock$/,
971
+ /bun\.lockb$/,
972
+ /\.d\.ts$/,
973
+ /\.map$/,
974
+ /dist\//,
975
+ /build\//,
976
+ /node_modules\//,
977
+ /vendor\//,
978
+ /generated\//,
979
+ /\.pb\.(go|ts|js)$/,
980
+ /\.g\.(dart|swift|kt)$/
981
+ ];
982
+ return generatedPatterns.some((pattern) => pattern.test(filename));
983
+ }
984
+
985
+ export {
986
+ Octokit,
987
+ getOctokit,
988
+ createOctokit,
989
+ getAuthenticatedUser,
990
+ getRateLimit,
991
+ parseRepoString,
992
+ listPullRequests,
993
+ getPullRequest,
994
+ createPullRequest,
995
+ updatePullRequest,
996
+ closePullRequest,
997
+ reopenPullRequest,
998
+ markReadyForReview,
999
+ convertToDraft,
1000
+ requestReviewers,
1001
+ removeReviewRequest,
1002
+ listReviews,
1003
+ createReview,
1004
+ approvePullRequest,
1005
+ requestChanges,
1006
+ submitReview,
1007
+ dismissReview,
1008
+ listReviewComments,
1009
+ createReviewComment,
1010
+ replyToReviewComment,
1011
+ listFiles,
1012
+ listCommits,
1013
+ checkMergeability,
1014
+ mergePullRequest,
1015
+ updateBranch,
1016
+ reviewPullRequest,
1017
+ reviewFile,
1018
+ summarizeChanges,
1019
+ securityScan
1020
+ };
1021
+ //# sourceMappingURL=chunk-HKOPRRDJ.js.map