tenjin-cli 0.1.0-alpha.33 → 0.1.0-alpha.35

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 (495) hide show
  1. package/NOTICE.md +110 -0
  2. package/README.md +87 -81
  3. package/dist/{_esm-BIN7VY2L.js → _esm-2KST7HQ7.js} +7 -7
  4. package/dist/alive-5TV22PNF.js +51 -0
  5. package/dist/auth-XI7BJFLW.js +47 -0
  6. package/dist/{auto-update-Y24UL56V.js → auto-update-7L24KDWA.js} +4 -5
  7. package/dist/balance-DFHC6XEU.js +71 -0
  8. package/dist/{ccip-DHDFKTQV.js → ccip-HOW3DZYF.js} +4 -4
  9. package/dist/chunk-24XKUN2S.js +202 -0
  10. package/dist/chunk-24XKUN2S.js.map +1 -0
  11. package/dist/chunk-2L7TDGLV.js +56 -0
  12. package/dist/chunk-2L7TDGLV.js.map +1 -0
  13. package/dist/{chunk-C2Q76BVM.js → chunk-2U7H35IP.js} +29 -7
  14. package/dist/chunk-2U7H35IP.js.map +1 -0
  15. package/dist/chunk-2W4DQQUU.js +176 -0
  16. package/dist/chunk-2W4DQQUU.js.map +1 -0
  17. package/dist/{chunk-LRW6S53P.js → chunk-34SAECKZ.js} +35 -11
  18. package/dist/chunk-34SAECKZ.js.map +1 -0
  19. package/dist/{chunk-2I4QTOLB.js → chunk-3MZ7DYRO.js} +1 -1
  20. package/dist/chunk-3MZ7DYRO.js.map +1 -0
  21. package/dist/{chunk-RVPYTUP4.js → chunk-3Y2EHT4F.js} +13 -9
  22. package/dist/chunk-3Y2EHT4F.js.map +1 -0
  23. package/dist/chunk-3Y6BHIN6.js +169 -0
  24. package/dist/chunk-3Y6BHIN6.js.map +1 -0
  25. package/dist/{chunk-4K7TQHNP.js → chunk-3YPL6T3P.js} +17 -33
  26. package/dist/chunk-3YPL6T3P.js.map +1 -0
  27. package/dist/{chunk-E7SW44LM.js → chunk-44MVIRZH.js} +121 -6
  28. package/dist/chunk-44MVIRZH.js.map +1 -0
  29. package/dist/chunk-45MMSBHA.js +321 -0
  30. package/dist/chunk-45MMSBHA.js.map +1 -0
  31. package/dist/{chunk-3FMZGI7I.js → chunk-4CE6TMI5.js} +1 -1
  32. package/dist/chunk-4CE6TMI5.js.map +1 -0
  33. package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
  34. package/dist/chunk-4MBCJFY4.js.map +1 -0
  35. package/dist/chunk-4TPL54KW.js +227 -0
  36. package/dist/chunk-4TPL54KW.js.map +1 -0
  37. package/dist/chunk-54ELBTKE.js +1615 -0
  38. package/dist/chunk-54ELBTKE.js.map +1 -0
  39. package/dist/{chunk-NDGZDTSJ.js → chunk-5F4OB5B3.js} +115 -57
  40. package/dist/chunk-5F4OB5B3.js.map +1 -0
  41. package/dist/chunk-5HN4KVQU.js +3348 -0
  42. package/dist/chunk-5HN4KVQU.js.map +1 -0
  43. package/dist/{chunk-ZDZERB6L.js → chunk-5J4E5GYI.js} +572 -407
  44. package/dist/chunk-5J4E5GYI.js.map +1 -0
  45. package/dist/{chunk-ZNNXRNFD.js → chunk-5N4GGUBN.js} +48 -6
  46. package/dist/chunk-5N4GGUBN.js.map +1 -0
  47. package/dist/chunk-5USBZ2MU.js +58 -0
  48. package/dist/chunk-5USBZ2MU.js.map +1 -0
  49. package/dist/chunk-64WOMNYR.js +183 -0
  50. package/dist/chunk-64WOMNYR.js.map +1 -0
  51. package/dist/{chunk-ILNIZ5I2.js → chunk-65RS4LQS.js} +1825 -1715
  52. package/dist/chunk-65RS4LQS.js.map +1 -0
  53. package/dist/{chunk-IE7P2BZE.js → chunk-6QMDUDF2.js} +3 -3
  54. package/dist/{chunk-IADZOXKN.js → chunk-7SLOTLO7.js} +19 -697
  55. package/dist/chunk-7SLOTLO7.js.map +1 -0
  56. package/dist/{chunk-WFSPCCVW.js → chunk-7V25UAQO.js} +99 -99
  57. package/dist/{chunk-WFSPCCVW.js.map → chunk-7V25UAQO.js.map} +1 -1
  58. package/dist/chunk-BGA4DO5M.js +719 -0
  59. package/dist/chunk-BGA4DO5M.js.map +1 -0
  60. package/dist/chunk-BVP7YK2J.js +706 -0
  61. package/dist/chunk-BVP7YK2J.js.map +1 -0
  62. package/dist/chunk-C265QIMJ.js +83 -0
  63. package/dist/chunk-C265QIMJ.js.map +1 -0
  64. package/dist/{chunk-XQJXNMSB.js → chunk-CRG54LEB.js} +1 -1
  65. package/dist/chunk-CRG54LEB.js.map +1 -0
  66. package/dist/{chunk-KG3D7FIF.js → chunk-CZJOMUBP.js} +2 -2
  67. package/dist/{chunk-36RVGZNY.js → chunk-D6M3ZK66.js} +22 -39
  68. package/dist/chunk-D6M3ZK66.js.map +1 -0
  69. package/dist/{chunk-3UCIG4TG.js → chunk-DI4QAGRZ.js} +1 -11
  70. package/dist/chunk-DI4QAGRZ.js.map +1 -0
  71. package/dist/{chunk-JKKAIPTU.js → chunk-DIH2G3YG.js} +47 -10
  72. package/dist/chunk-DIH2G3YG.js.map +1 -0
  73. package/dist/chunk-DJ36BM62.js +78 -0
  74. package/dist/chunk-DJ36BM62.js.map +1 -0
  75. package/dist/chunk-DTEWAVNE.js +114 -0
  76. package/dist/chunk-DTEWAVNE.js.map +1 -0
  77. package/dist/chunk-F2KJAJ7T.js +13 -0
  78. package/dist/chunk-F2KJAJ7T.js.map +1 -0
  79. package/dist/{chunk-BF4XHEQK.js → chunk-F3QPGYOY.js} +6 -6
  80. package/dist/chunk-F3QPGYOY.js.map +1 -0
  81. package/dist/{chunk-3GNJXKIT.js → chunk-F43CV6UC.js} +2 -2
  82. package/dist/{chunk-J57UC3DD.js → chunk-FKVJKLPI.js} +3 -3
  83. package/dist/{chunk-V2LQLN5H.js → chunk-FYFHH7V5.js} +59 -8
  84. package/dist/{chunk-V2LQLN5H.js.map → chunk-FYFHH7V5.js.map} +1 -1
  85. package/dist/chunk-GAJC4BQZ.js +1096 -0
  86. package/dist/chunk-GAJC4BQZ.js.map +1 -0
  87. package/dist/{chunk-DOQGNFHM.js → chunk-GH5UKMZD.js} +2 -12
  88. package/dist/{chunk-DOQGNFHM.js.map → chunk-GH5UKMZD.js.map} +1 -1
  89. package/dist/{chunk-WYXUQGOL.js → chunk-HAZAN4UM.js} +7 -6
  90. package/dist/chunk-HAZAN4UM.js.map +1 -0
  91. package/dist/chunk-HI5XQOX2.js +393 -0
  92. package/dist/chunk-HI5XQOX2.js.map +1 -0
  93. package/dist/chunk-HKGUKAQW.js +488 -0
  94. package/dist/chunk-HKGUKAQW.js.map +1 -0
  95. package/dist/{chunk-SO3XRZPX.js → chunk-HPRVFJPM.js} +6 -6
  96. package/dist/{chunk-L6JEXB3E.js → chunk-HQR4BWKX.js} +3 -131
  97. package/dist/chunk-HQR4BWKX.js.map +1 -0
  98. package/dist/chunk-HZKANST2.js +177 -0
  99. package/dist/chunk-HZKANST2.js.map +1 -0
  100. package/dist/{chunk-UUGOUOVT.js → chunk-I557SAOM.js} +8 -2
  101. package/dist/chunk-I557SAOM.js.map +1 -0
  102. package/dist/{chunk-TC2WZLSC.js → chunk-IGLWLH73.js} +8 -7
  103. package/dist/chunk-IGLWLH73.js.map +1 -0
  104. package/dist/chunk-ILWCKCOI.js +58 -0
  105. package/dist/chunk-ILWCKCOI.js.map +1 -0
  106. package/dist/{chunk-2GP3HRYK.js → chunk-INSIW65E.js} +182 -182
  107. package/dist/{chunk-MPZUYCAP.js → chunk-IULCDMVG.js} +12 -1
  108. package/dist/chunk-IULCDMVG.js.map +1 -0
  109. package/dist/{chunk-INTFHMU4.js → chunk-IVNSUAVC.js} +25 -26
  110. package/dist/chunk-IVNSUAVC.js.map +1 -0
  111. package/dist/chunk-JDQZCREI.js +87 -0
  112. package/dist/chunk-JDQZCREI.js.map +1 -0
  113. package/dist/chunk-JHFFUVON.js +1050 -0
  114. package/dist/chunk-JHFFUVON.js.map +1 -0
  115. package/dist/{chunk-RL5UUDT4.js → chunk-JNUKLSMZ.js} +3 -3
  116. package/dist/chunk-JTILUN4W.js +2933 -0
  117. package/dist/chunk-JTILUN4W.js.map +1 -0
  118. package/dist/{chunk-OJNTCYQQ.js → chunk-JTX3BUDK.js} +37 -53
  119. package/dist/chunk-JTX3BUDK.js.map +1 -0
  120. package/dist/{chunk-X5ZBP3IY.js → chunk-JUUBBBY5.js} +2 -2
  121. package/dist/chunk-JUUBBBY5.js.map +1 -0
  122. package/dist/chunk-JWAK7JQB.js +15 -0
  123. package/dist/chunk-JWAK7JQB.js.map +1 -0
  124. package/dist/{chunk-UXZONNEQ.js → chunk-K5KNGC4I.js} +34 -31
  125. package/dist/chunk-K5KNGC4I.js.map +1 -0
  126. package/dist/chunk-KAQ4Q3TO.js +135 -0
  127. package/dist/chunk-KAQ4Q3TO.js.map +1 -0
  128. package/dist/chunk-KFVJYLVL.js +125 -0
  129. package/dist/chunk-KFVJYLVL.js.map +1 -0
  130. package/dist/chunk-KGUE5AVX.js +69 -0
  131. package/dist/chunk-KGUE5AVX.js.map +1 -0
  132. package/dist/{chunk-FVIGCDSV.js → chunk-KLDMLWXT.js} +11 -85
  133. package/dist/chunk-KLDMLWXT.js.map +1 -0
  134. package/dist/chunk-KNKDMTHU.js +453 -0
  135. package/dist/chunk-KNKDMTHU.js.map +1 -0
  136. package/dist/chunk-LDA6TAYQ.js +95 -0
  137. package/dist/chunk-LDA6TAYQ.js.map +1 -0
  138. package/dist/chunk-LWSSIZOY.js +347 -0
  139. package/dist/chunk-LWSSIZOY.js.map +1 -0
  140. package/dist/{chunk-ZURZHELF.js → chunk-MAHNZA6C.js} +158 -41
  141. package/dist/chunk-MAHNZA6C.js.map +1 -0
  142. package/dist/chunk-MEWZCIA6.js +220 -0
  143. package/dist/chunk-MEWZCIA6.js.map +1 -0
  144. package/dist/{chunk-2SNUOHAT.js → chunk-MEZJ3I63.js} +49 -1
  145. package/dist/chunk-MEZJ3I63.js.map +1 -0
  146. package/dist/chunk-MJDO4EXD.js +353 -0
  147. package/dist/chunk-MJDO4EXD.js.map +1 -0
  148. package/dist/chunk-NJA6NT3A.js +6595 -0
  149. package/dist/chunk-NJA6NT3A.js.map +1 -0
  150. package/dist/{chunk-LHHMV4GU.js → chunk-NVSKJPRC.js} +1 -1
  151. package/dist/{chunk-LHHMV4GU.js.map → chunk-NVSKJPRC.js.map} +1 -1
  152. package/dist/{chunk-4YOZGGTZ.js → chunk-OC7K2DVZ.js} +5 -5
  153. package/dist/chunk-OC7K2DVZ.js.map +1 -0
  154. package/dist/chunk-ODRPASFP.js +2078 -0
  155. package/dist/chunk-ODRPASFP.js.map +1 -0
  156. package/dist/chunk-OJJFANO6.js +133 -0
  157. package/dist/chunk-OJJFANO6.js.map +1 -0
  158. package/dist/{chunk-JNJWBTU2.js → chunk-OQWPRFAC.js} +332 -882
  159. package/dist/chunk-OQWPRFAC.js.map +1 -0
  160. package/dist/chunk-P4I7BFNJ.js +11 -0
  161. package/dist/chunk-P4I7BFNJ.js.map +1 -0
  162. package/dist/{chunk-SNNSAGMT.js → chunk-P6YQWIT2.js} +4058 -4039
  163. package/dist/chunk-P6YQWIT2.js.map +1 -0
  164. package/dist/{chunk-JRGFKVAZ.js → chunk-PETQ5WEA.js} +2 -2
  165. package/dist/{chunk-HMWYAUA6.js → chunk-Q6RSJCXB.js} +29 -69
  166. package/dist/chunk-Q6RSJCXB.js.map +1 -0
  167. package/dist/{chunk-U3IKUGRP.js → chunk-QKEUKBRK.js} +17 -23
  168. package/dist/chunk-QKEUKBRK.js.map +1 -0
  169. package/dist/{chunk-2RWB7RKE.js → chunk-QKYUCITR.js} +174 -5814
  170. package/dist/chunk-QKYUCITR.js.map +1 -0
  171. package/dist/chunk-QQDPRTLP.js +127 -0
  172. package/dist/chunk-QQDPRTLP.js.map +1 -0
  173. package/dist/chunk-QQYCYAKI.js +79 -0
  174. package/dist/chunk-QQYCYAKI.js.map +1 -0
  175. package/dist/chunk-R4KDH477.js +1064 -0
  176. package/dist/chunk-R4KDH477.js.map +1 -0
  177. package/dist/chunk-R5TR2DIK.js +119 -0
  178. package/dist/chunk-R5TR2DIK.js.map +1 -0
  179. package/dist/chunk-R62PKTAG.js +66 -0
  180. package/dist/chunk-R62PKTAG.js.map +1 -0
  181. package/dist/{chunk-BFDQ4WNW.js → chunk-RFZA7PSM.js} +4 -5
  182. package/dist/chunk-RFZA7PSM.js.map +1 -0
  183. package/dist/chunk-RGCPELQN.js +219 -0
  184. package/dist/chunk-RGCPELQN.js.map +1 -0
  185. package/dist/chunk-RGVCOG2S.js +910 -0
  186. package/dist/chunk-RGVCOG2S.js.map +1 -0
  187. package/dist/chunk-SOLNJ3AZ.js +209 -0
  188. package/dist/chunk-SOLNJ3AZ.js.map +1 -0
  189. package/dist/chunk-TFT2X7SH.js +77 -0
  190. package/dist/chunk-TFT2X7SH.js.map +1 -0
  191. package/dist/chunk-TUCKEEXE.js +2 -0
  192. package/dist/chunk-TVWCLUBI.js +293 -0
  193. package/dist/chunk-TVWCLUBI.js.map +1 -0
  194. package/dist/chunk-U4TRWSVE.js +78 -0
  195. package/dist/chunk-U4TRWSVE.js.map +1 -0
  196. package/dist/chunk-UIB33QQP.js +379 -0
  197. package/dist/chunk-UIB33QQP.js.map +1 -0
  198. package/dist/chunk-V6GIVALQ.js +1889 -0
  199. package/dist/chunk-V6GIVALQ.js.map +1 -0
  200. package/dist/chunk-VHXCPXUS.js +366 -0
  201. package/dist/chunk-VHXCPXUS.js.map +1 -0
  202. package/dist/{chunk-HGZEPQUT.js → chunk-VU6GMWF6.js} +17 -8
  203. package/dist/chunk-VU6GMWF6.js.map +1 -0
  204. package/dist/chunk-VWZYE3NC.js +8415 -0
  205. package/dist/chunk-VWZYE3NC.js.map +1 -0
  206. package/dist/{chunk-AGMVASXZ.js → chunk-W2GXIARJ.js} +88 -11
  207. package/dist/chunk-W2GXIARJ.js.map +1 -0
  208. package/dist/chunk-W4G3K3V7.js +288 -0
  209. package/dist/chunk-W4G3K3V7.js.map +1 -0
  210. package/dist/chunk-W74LJ5OT.js +588 -0
  211. package/dist/chunk-W74LJ5OT.js.map +1 -0
  212. package/dist/chunk-W7ELYLYK.js +233 -0
  213. package/dist/chunk-W7ELYLYK.js.map +1 -0
  214. package/dist/{chunk-BPMWXTFX.js → chunk-WFZX352D.js} +7 -7
  215. package/dist/chunk-WXA3WTPF.js +20 -0
  216. package/dist/chunk-WXA3WTPF.js.map +1 -0
  217. package/dist/chunk-XRGFH7FI.js +454 -0
  218. package/dist/chunk-XRGFH7FI.js.map +1 -0
  219. package/dist/chunk-XSCGUO2U.js +330 -0
  220. package/dist/chunk-XSCGUO2U.js.map +1 -0
  221. package/dist/chunk-XWROSMI5.js +1039 -0
  222. package/dist/chunk-XWROSMI5.js.map +1 -0
  223. package/dist/chunk-Y2EXZ47H.js +40 -0
  224. package/dist/chunk-Y2EXZ47H.js.map +1 -0
  225. package/dist/chunk-YJGEVBKZ.js +47 -0
  226. package/dist/chunk-YJGEVBKZ.js.map +1 -0
  227. package/dist/{chunk-6CMM6YCB.js → chunk-YWWMISDY.js} +2 -2
  228. package/dist/{chunk-WXA2BWTE.js → chunk-ZCT5DJ3G.js} +2 -48
  229. package/dist/chunk-ZCT5DJ3G.js.map +1 -0
  230. package/dist/chunk-ZEYA2WWX.js +982 -0
  231. package/dist/chunk-ZEYA2WWX.js.map +1 -0
  232. package/dist/chunk-ZRC7Z5X3.js +82 -0
  233. package/dist/chunk-ZRC7Z5X3.js.map +1 -0
  234. package/dist/{chunk-3AIHRXKO.js → chunk-ZS7JIUJ3.js} +12 -10
  235. package/dist/chunk-ZS7JIUJ3.js.map +1 -0
  236. package/dist/{clack-EZ7TDWQU.js → clack-Q4RNC5VE.js} +2 -6
  237. package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
  238. package/dist/claude-install-BAUSJMW3.js +64 -0
  239. package/dist/{cli-E36SPKBW.js → cli-QY4KKA3D.js} +632 -150
  240. package/dist/cli-QY4KKA3D.js.map +1 -0
  241. package/dist/client-3YQKORVK.js +710 -0
  242. package/dist/client-3YQKORVK.js.map +1 -0
  243. package/dist/{codex-event-ZO2GEFE6.js → codex-event-EUTCAOTQ.js} +3 -5
  244. package/dist/{codex-host-KECJVTA2.js → codex-host-ZON3S6HU.js} +7 -7
  245. package/dist/{codex-install-HQZDGFXW.js → codex-install-HZV2DOAB.js} +242 -88
  246. package/dist/codex-install-HZV2DOAB.js.map +1 -0
  247. package/dist/config-QZOBMTEL.js +57 -0
  248. package/dist/config-names-Z5NZD5R2.js +224 -0
  249. package/dist/config-names-Z5NZD5R2.js.map +1 -0
  250. package/dist/config-rules-YOYHS6YL.js +55 -0
  251. package/dist/config-subagents-WQV2ZAD5.js +362 -0
  252. package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
  253. package/dist/connect-YDWTYU4B.js +1020 -0
  254. package/dist/connect-YDWTYU4B.js.map +1 -0
  255. package/dist/core-0a66n3e7-TTP554XV.js +127 -0
  256. package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
  257. package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
  258. package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
  259. package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
  260. package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
  261. package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
  262. package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
  263. package/dist/core-zg882d22-LKV5DZYW.js +37 -0
  264. package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
  265. package/dist/decision-QSKHOGCO.js +145 -0
  266. package/dist/{doctor-I6XQEKWD.js → doctor-ZWJXRD75.js} +162 -148
  267. package/dist/doctor-ZWJXRD75.js.map +1 -0
  268. package/dist/{env-proxy-R6ZMLQTT.js → env-proxy-XLSLHBKQ.js} +2 -2
  269. package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js → ethersCompat-Df4a6QIZ-K3DMHR6Y.js} +5 -5
  270. package/dist/explicit-ME2NRADQ.js +371 -0
  271. package/dist/explicit-ME2NRADQ.js.map +1 -0
  272. package/dist/flush-stdio-NYIJ3QXT.js +18 -0
  273. package/dist/fund-VF7TLDJH.js +722 -0
  274. package/dist/fund-VF7TLDJH.js.map +1 -0
  275. package/dist/hook-command-VZ27MGWO.js +49 -0
  276. package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
  277. package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
  278. package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
  279. package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
  280. package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
  281. package/dist/hosts/claude/tenjin/hooks/register.tsx +527 -56
  282. package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
  283. package/dist/hosts/claude/tenjin/types/index.d.ts +144 -1
  284. package/dist/{hosts-DVQJ32QC.js → hosts-3EMTVM4H.js} +7 -6
  285. package/dist/index.js +18 -15
  286. package/dist/index.js.map +1 -1
  287. package/dist/install-ZA7L2UF3.js +115 -0
  288. package/dist/install-funding-JDGYTF72.js +30 -0
  289. package/dist/install-identity-FFAYEFLX.js +30 -0
  290. package/dist/{install-wallet-5M4OTYLX.js → install-wallet-2SFOVE3Q.js} +68 -53
  291. package/dist/install-wallet-2SFOVE3Q.js.map +1 -0
  292. package/dist/mcp-36S6MK3C.js +67642 -0
  293. package/dist/mcp-36S6MK3C.js.map +1 -0
  294. package/dist/new-install-5L4GY3LN.js +51 -0
  295. package/dist/{package-IJFGMWEV.js → package-BONDXSV3.js} +2 -2
  296. package/dist/{passphrase-IFTDS3CU.js → passphrase-T4ULBN4M.js} +16 -12
  297. package/dist/{paths-XCSAKISU.js → paths-O2KDWZ76.js} +18 -28
  298. package/dist/pay-CMV5KL74.js +74 -0
  299. package/dist/{payments-HFPPWHTV.js → payments-Z6UBZL4Z.js} +36 -26
  300. package/dist/payments-Z6UBZL4Z.js.map +1 -0
  301. package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
  302. package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
  303. package/dist/{redact-D7ASVWKL.js → redact-LOTHE5TS.js} +2 -8
  304. package/dist/redact-LOTHE5TS.js.map +1 -0
  305. package/dist/routing-quote-AHLAREXR.js +40 -0
  306. package/dist/routing-quote-AHLAREXR.js.map +1 -0
  307. package/dist/run-JH7ELYAM.js +88 -0
  308. package/dist/run-JH7ELYAM.js.map +1 -0
  309. package/dist/runtime-2GX4ALJP.js +410 -0
  310. package/dist/runtime-2GX4ALJP.js.map +1 -0
  311. package/dist/runtime-activate-IDQ2NCSP.js +39 -0
  312. package/dist/runtime-activate-IDQ2NCSP.js.map +1 -0
  313. package/dist/{runtime-fetch-ZSSSK72Y.js → runtime-fetch-6LOBHBEN.js} +4 -4
  314. package/dist/runtime-fetch-6LOBHBEN.js.map +1 -0
  315. package/dist/runtime-launchers-YAPKCBHV.js +31 -0
  316. package/dist/runtime-launchers-YAPKCBHV.js.map +1 -0
  317. package/dist/{runtime-layout-WIDILZ6K.js → runtime-layout-QHZQJV7C.js} +5 -4
  318. package/dist/runtime-layout-QHZQJV7C.js.map +1 -0
  319. package/dist/runtime-place-4POL4KK4.js +37 -0
  320. package/dist/runtime-place-4POL4KK4.js.map +1 -0
  321. package/dist/runtime-provenance-MNJGVBV2.js +12 -0
  322. package/dist/runtime-provenance-MNJGVBV2.js.map +1 -0
  323. package/dist/{secp256k1-ZZZT2CAX.js → secp256k1-N5P2GVGF.js} +3 -3
  324. package/dist/secp256k1-N5P2GVGF.js.map +1 -0
  325. package/dist/{send-GCVEAQKL.js → send-ELXFKEKY.js} +35 -32
  326. package/dist/send-ELXFKEKY.js.map +1 -0
  327. package/dist/status-FXUFWJDM.js +404 -0
  328. package/dist/status-FXUFWJDM.js.map +1 -0
  329. package/dist/{status-line-OPCXDHL2.js → status-line-IH5JBWBC.js} +51 -43
  330. package/dist/status-line-IH5JBWBC.js.map +1 -0
  331. package/dist/streamableHttp-CP2ZQBIK.js +768 -0
  332. package/dist/streamableHttp-CP2ZQBIK.js.map +1 -0
  333. package/dist/{uninstall-BAWRBXXQ.js → uninstall-LJZUKM4D.js} +76 -76
  334. package/dist/uninstall-LJZUKM4D.js.map +1 -0
  335. package/dist/update-EUIX72IX.js +68 -0
  336. package/dist/update-EUIX72IX.js.map +1 -0
  337. package/dist/usage-EKDC7LUC.js +180 -0
  338. package/dist/usage-EKDC7LUC.js.map +1 -0
  339. package/dist/{usdc-VG4CIOUK.js → usdc-YIHK2OMC.js} +8 -12
  340. package/dist/usdc-YIHK2OMC.js.map +1 -0
  341. package/dist/{viemAdapter-By13KInL-DOFTEIJV.js → viemAdapter-By13KInL-PRLSIESK.js} +5 -5
  342. package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
  343. package/dist/wallet-HSW757W6.js +80 -0
  344. package/dist/wallet-HSW757W6.js.map +1 -0
  345. package/dist/wallet-kdf-worker.mjs +1433 -818
  346. package/docs/agent-permissions.md +88 -155
  347. package/docs/router-reference.md +236 -0
  348. package/docs/safety-model.md +31 -33
  349. package/docs/subagents-internals.md +97 -0
  350. package/docs/subagents.md +348 -0
  351. package/docs/troubleshooting.md +10 -6
  352. package/package.json +12 -8
  353. package/scripts/installers/install.sh +7 -1
  354. package/dist/alive-GSOWKUOY.js +0 -38
  355. package/dist/chunk-2I4QTOLB.js.map +0 -1
  356. package/dist/chunk-2M2VPI2E.js +0 -560
  357. package/dist/chunk-2M2VPI2E.js.map +0 -1
  358. package/dist/chunk-2RWB7RKE.js.map +0 -1
  359. package/dist/chunk-2SNUOHAT.js.map +0 -1
  360. package/dist/chunk-3623BLPV.js +0 -184
  361. package/dist/chunk-3623BLPV.js.map +0 -1
  362. package/dist/chunk-36RVGZNY.js.map +0 -1
  363. package/dist/chunk-3AIHRXKO.js.map +0 -1
  364. package/dist/chunk-3FMZGI7I.js.map +0 -1
  365. package/dist/chunk-3UCIG4TG.js.map +0 -1
  366. package/dist/chunk-4K7TQHNP.js.map +0 -1
  367. package/dist/chunk-4LMUQMBH.js +0 -29
  368. package/dist/chunk-4LMUQMBH.js.map +0 -1
  369. package/dist/chunk-4USCZ2NI.js +0 -228
  370. package/dist/chunk-4USCZ2NI.js.map +0 -1
  371. package/dist/chunk-4YOZGGTZ.js.map +0 -1
  372. package/dist/chunk-62KNUYWD.js +0 -111
  373. package/dist/chunk-62KNUYWD.js.map +0 -1
  374. package/dist/chunk-A5GKIG5O.js +0 -2037
  375. package/dist/chunk-A5GKIG5O.js.map +0 -1
  376. package/dist/chunk-AGMVASXZ.js.map +0 -1
  377. package/dist/chunk-BF4XHEQK.js.map +0 -1
  378. package/dist/chunk-BFDQ4WNW.js.map +0 -1
  379. package/dist/chunk-C2Q76BVM.js.map +0 -1
  380. package/dist/chunk-CEXSOI5R.js +0 -808
  381. package/dist/chunk-CEXSOI5R.js.map +0 -1
  382. package/dist/chunk-E7SW44LM.js.map +0 -1
  383. package/dist/chunk-EDJWHDDL.js +0 -33
  384. package/dist/chunk-EDJWHDDL.js.map +0 -1
  385. package/dist/chunk-FVIGCDSV.js.map +0 -1
  386. package/dist/chunk-GTTUCOPD.js +0 -105
  387. package/dist/chunk-GTTUCOPD.js.map +0 -1
  388. package/dist/chunk-HDPUXS3Z.js +0 -122
  389. package/dist/chunk-HDPUXS3Z.js.map +0 -1
  390. package/dist/chunk-HGGWCP7W.js +0 -120
  391. package/dist/chunk-HGGWCP7W.js.map +0 -1
  392. package/dist/chunk-HGZEPQUT.js.map +0 -1
  393. package/dist/chunk-HMWYAUA6.js.map +0 -1
  394. package/dist/chunk-IADZOXKN.js.map +0 -1
  395. package/dist/chunk-ILNIZ5I2.js.map +0 -1
  396. package/dist/chunk-INTFHMU4.js.map +0 -1
  397. package/dist/chunk-JKKAIPTU.js.map +0 -1
  398. package/dist/chunk-JNJWBTU2.js.map +0 -1
  399. package/dist/chunk-KM7RY2ZS.js +0 -246
  400. package/dist/chunk-KM7RY2ZS.js.map +0 -1
  401. package/dist/chunk-KOGZDMHO.js +0 -21
  402. package/dist/chunk-KOGZDMHO.js.map +0 -1
  403. package/dist/chunk-L6JEXB3E.js.map +0 -1
  404. package/dist/chunk-LRW6S53P.js.map +0 -1
  405. package/dist/chunk-LXAYUOXI.js +0 -511
  406. package/dist/chunk-LXAYUOXI.js.map +0 -1
  407. package/dist/chunk-MEFB5KHA.js +0 -59
  408. package/dist/chunk-MEFB5KHA.js.map +0 -1
  409. package/dist/chunk-MPZUYCAP.js.map +0 -1
  410. package/dist/chunk-NDGZDTSJ.js.map +0 -1
  411. package/dist/chunk-OJNTCYQQ.js.map +0 -1
  412. package/dist/chunk-P3LFTKE7.js +0 -58
  413. package/dist/chunk-P3LFTKE7.js.map +0 -1
  414. package/dist/chunk-QXP3Z3JN.js.map +0 -1
  415. package/dist/chunk-RVPYTUP4.js.map +0 -1
  416. package/dist/chunk-SNNSAGMT.js.map +0 -1
  417. package/dist/chunk-TC2WZLSC.js.map +0 -1
  418. package/dist/chunk-TKPF35W6.js +0 -29
  419. package/dist/chunk-TKPF35W6.js.map +0 -1
  420. package/dist/chunk-U3IKUGRP.js.map +0 -1
  421. package/dist/chunk-UUGOUOVT.js.map +0 -1
  422. package/dist/chunk-UXZONNEQ.js.map +0 -1
  423. package/dist/chunk-WXA2BWTE.js.map +0 -1
  424. package/dist/chunk-WYXUQGOL.js.map +0 -1
  425. package/dist/chunk-X5ZBP3IY.js.map +0 -1
  426. package/dist/chunk-XKESD27X.js +0 -10
  427. package/dist/chunk-XKESD27X.js.map +0 -1
  428. package/dist/chunk-XQJXNMSB.js.map +0 -1
  429. package/dist/chunk-Y527D4TV.js +0 -56
  430. package/dist/chunk-Y527D4TV.js.map +0 -1
  431. package/dist/chunk-ZDZERB6L.js.map +0 -1
  432. package/dist/chunk-ZNNXRNFD.js.map +0 -1
  433. package/dist/chunk-ZURZHELF.js.map +0 -1
  434. package/dist/cli-E36SPKBW.js.map +0 -1
  435. package/dist/codex-install-HQZDGFXW.js.map +0 -1
  436. package/dist/config-HY2E4GGW.js +0 -55
  437. package/dist/doctor-I6XQEKWD.js.map +0 -1
  438. package/dist/fund-2QRO7OJL.js +0 -378
  439. package/dist/fund-2QRO7OJL.js.map +0 -1
  440. package/dist/hook-command-2UBCSZG6.js +0 -43
  441. package/dist/install-ILUX5C4A.js +0 -107
  442. package/dist/install-identity-TZKGY6LQ.js +0 -31
  443. package/dist/install-wallet-5M4OTYLX.js.map +0 -1
  444. package/dist/mcp-LE4DUS22.js +0 -14127
  445. package/dist/mcp-LE4DUS22.js.map +0 -1
  446. package/dist/pay-WCG3IH4R.js +0 -55
  447. package/dist/payments-HFPPWHTV.js.map +0 -1
  448. package/dist/plugin-registration-PZFI5GZW.js +0 -68
  449. package/dist/runtime-UZOKSUZX.js +0 -1321
  450. package/dist/runtime-UZOKSUZX.js.map +0 -1
  451. package/dist/send-GCVEAQKL.js.map +0 -1
  452. package/dist/status-HCVAOCN7.js +0 -150
  453. package/dist/status-HCVAOCN7.js.map +0 -1
  454. package/dist/status-line-OPCXDHL2.js.map +0 -1
  455. package/dist/uninstall-BAWRBXXQ.js.map +0 -1
  456. package/dist/update-CACXLQLR.js +0 -56
  457. package/dist/wallet-QL4UUXEZ.js +0 -55
  458. /package/dist/{_esm-BIN7VY2L.js.map → _esm-2KST7HQ7.js.map} +0 -0
  459. /package/dist/{alive-GSOWKUOY.js.map → alive-5TV22PNF.js.map} +0 -0
  460. /package/dist/{auto-update-Y24UL56V.js.map → auth-XI7BJFLW.js.map} +0 -0
  461. /package/dist/{ccip-DHDFKTQV.js.map → auto-update-7L24KDWA.js.map} +0 -0
  462. /package/dist/{clack-EZ7TDWQU.js.map → balance-DFHC6XEU.js.map} +0 -0
  463. /package/dist/{claude-cli-2YKABJJZ.js.map → ccip-HOW3DZYF.js.map} +0 -0
  464. /package/dist/{chunk-IE7P2BZE.js.map → chunk-6QMDUDF2.js.map} +0 -0
  465. /package/dist/{chunk-KG3D7FIF.js.map → chunk-CZJOMUBP.js.map} +0 -0
  466. /package/dist/{chunk-3GNJXKIT.js.map → chunk-F43CV6UC.js.map} +0 -0
  467. /package/dist/{chunk-J57UC3DD.js.map → chunk-FKVJKLPI.js.map} +0 -0
  468. /package/dist/{chunk-SO3XRZPX.js.map → chunk-HPRVFJPM.js.map} +0 -0
  469. /package/dist/{chunk-2GP3HRYK.js.map → chunk-INSIW65E.js.map} +0 -0
  470. /package/dist/{chunk-RL5UUDT4.js.map → chunk-JNUKLSMZ.js.map} +0 -0
  471. /package/dist/{chunk-JRGFKVAZ.js.map → chunk-PETQ5WEA.js.map} +0 -0
  472. /package/dist/{codex-event-ZO2GEFE6.js.map → chunk-TUCKEEXE.js.map} +0 -0
  473. /package/dist/{chunk-BPMWXTFX.js.map → chunk-WFZX352D.js.map} +0 -0
  474. /package/dist/{chunk-6CMM6YCB.js.map → chunk-YWWMISDY.js.map} +0 -0
  475. /package/dist/{codex-host-KECJVTA2.js.map → clack-Q4RNC5VE.js.map} +0 -0
  476. /package/dist/{config-HY2E4GGW.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
  477. /package/dist/{env-proxy-R6ZMLQTT.js.map → claude-install-BAUSJMW3.js.map} +0 -0
  478. /package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js.map → codex-event-EUTCAOTQ.js.map} +0 -0
  479. /package/dist/{hook-command-2UBCSZG6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
  480. /package/dist/{hosts-DVQJ32QC.js.map → config-QZOBMTEL.js.map} +0 -0
  481. /package/dist/{install-ILUX5C4A.js.map → config-rules-YOYHS6YL.js.map} +0 -0
  482. /package/dist/{install-identity-TZKGY6LQ.js.map → decision-QSKHOGCO.js.map} +0 -0
  483. /package/dist/{package-IJFGMWEV.js.map → env-proxy-XLSLHBKQ.js.map} +0 -0
  484. /package/dist/{passphrase-IFTDS3CU.js.map → ethersCompat-Df4a6QIZ-K3DMHR6Y.js.map} +0 -0
  485. /package/dist/{paths-XCSAKISU.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
  486. /package/dist/{pay-WCG3IH4R.js.map → hook-command-VZ27MGWO.js.map} +0 -0
  487. /package/dist/{plugin-registration-PZFI5GZW.js.map → hosts-3EMTVM4H.js.map} +0 -0
  488. /package/dist/{redact-D7ASVWKL.js.map → install-ZA7L2UF3.js.map} +0 -0
  489. /package/dist/{runtime-fetch-ZSSSK72Y.js.map → install-funding-JDGYTF72.js.map} +0 -0
  490. /package/dist/{runtime-layout-WIDILZ6K.js.map → install-identity-FFAYEFLX.js.map} +0 -0
  491. /package/dist/{secp256k1-ZZZT2CAX.js.map → new-install-5L4GY3LN.js.map} +0 -0
  492. /package/dist/{update-CACXLQLR.js.map → package-BONDXSV3.js.map} +0 -0
  493. /package/dist/{usdc-VG4CIOUK.js.map → passphrase-T4ULBN4M.js.map} +0 -0
  494. /package/dist/{viemAdapter-By13KInL-DOFTEIJV.js.map → paths-O2KDWZ76.js.map} +0 -0
  495. /package/dist/{wallet-QL4UUXEZ.js.map → pay-CMV5KL74.js.map} +0 -0
@@ -6,7 +6,7 @@ import { createHash } from "node:crypto";
6
6
  // src/lib/redact-rules.json
7
7
  var redact_rules_default = {
8
8
  schemaVersion: 1,
9
- note: "One rule table for every redaction surface in the CLI (src/lib/redact.ts), kept as data so the tenjin server-side ingest gate can vendor it verbatim. Every row is one detector: `id` is the stable finding `check`, `tier` is the finding severity, `match` is a JS regex or the name of an algorithmic detector a consumer must implement, `excerpt` is the masked-excerpt policy (never the secret), `skip` names a suppression predicate. `scopes` says where the row applies: `publish` (reported on the public marketplace), `team` (reported on a team shelf), `query` (its matches are replaced by the excerpt in hook queries and router packets by `mask()`; regex rows, plus the `hex64`, `pemBlock` and `bip39` algorithm rows). A row scoped `query` alone is masked and never reported. Precision first, as gitleaks and GitHub push protection do: a block row fires on a vendor prefix or an unambiguous shape, the generic `secret-assignment` row needs a secret-named word plus `=` or `:`, and entropy is never a trigger for a query. Table order is mask() order (the assignment row runs first, see its description). Several entries may share an `id`; they are one detector expressed as more than one pattern. Patterns adapted from gitleaks are MIT and attributed in NOTICE.md.",
9
+ note: "The rule table for mask() in src/lib/redact.ts, the redaction applied to hook queries and router packets before they leave this machine. Every row is one detector: `id` names it, `tier` says how sure a match is (`block`: a vendor prefix or an unambiguous shape; `warn`: a heuristic shape), `match` is a JS regex or the name of an algorithmic detector (`hex64`, `pemBlock`, `bip39`), `excerpt` is what replaces a match (never the secret), and `skip` names a predicate that leaves a match as written. Precision first, as gitleaks and GitHub push protection do: a block row fires on a vendor prefix or an unambiguous shape, the generic `secret-assignment` row needs a secret-named word plus `=` or `:`, and entropy is never a trigger. Table order is mask() order (the assignment row runs first, see its description). Several entries may share an `id`; they are one detector expressed as more than one pattern. Patterns adapted from gitleaks are MIT and attributed in NOTICE.md.",
10
10
  publicHexConstants: [
11
11
  {
12
12
  value: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
@@ -59,15 +59,12 @@ var redact_rules_default = {
59
59
  ],
60
60
  excerptPolicies: {
61
61
  mask: "Keep the first `keep` characters (a public type marker) and replace the rest with a redaction count.",
62
- verbatim: "Echo the match, truncated to `max` characters when set. Only for non-secret matches.",
63
- abbreviate: "Keep `head` leading and `tail` trailing characters joined by an ellipsis.",
64
62
  custom: "Consumer-implemented builder named by `handler`."
65
63
  },
66
64
  rules: [
67
65
  {
68
66
  id: "secret-assignment",
69
67
  tier: "warn",
70
- scopes: ["query", "publish", "team"],
71
68
  description: 'Secret-named assignment (API_KEY=, password:, token=) with a literal value. The JSON-quoted form ("password": "...") is the third row, not a quote read here: reading a quote after this name turned ordinary config keys into findings ({"credentials": "include"}, {"max_tokens": 128000}, {"tokenizer": "cl100k_base"}, review round 6). The separator class is [ \\t] rather than \\s so a heading line (`## Token:`) never swallows the next line when mask() runs over whole text. FIRST IN THE TABLE ON PURPOSE: mask() applies rows in table order, and a value that is itself a vendor token (`OPENAI_API_KEY=sk-...`) must be taken whole by this row, name kept, before a vendor row could leave a stub for this row to re-match.',
72
69
  source: "tenjin",
73
70
  match: {
@@ -86,7 +83,6 @@ var redact_rules_default = {
86
83
  {
87
84
  id: "secret-assignment",
88
85
  tier: "warn",
89
- scopes: ["query", "publish", "team"],
90
86
  description: "Secret-named command-line flag with a SPACE-separated literal value (--api-key <v>, --token <v>): the one credential position the assignment form above cannot see, since it needs `=` or `:` after the name. `X-Api-Key: <v>` and `--api-key=<v>` already match above (Api-Key, api-key) and are deliberately not repeated here, so one value yields one finding. For the shapes a recorded command line takes (tenjin-agent#281): a hex-only key has no vendor prefix, and bare hex is deliberately never reported so a commit SHA still syncs, so the credential POSITION is the signal.",
91
87
  source: "tenjin (closes tenjin-agent#281)",
92
88
  match: {
@@ -105,7 +101,6 @@ var redact_rules_default = {
105
101
  {
106
102
  id: "secret-assignment",
107
103
  tier: "warn",
108
- scopes: ["query", "publish", "team"],
109
104
  description: 'Quoted secret name before `:` or `=` with a quoted value ("password": "...", \'api_key\' = \'...\'), the JSON and YAML form of the first row (tenjin-agent#296). Narrower than the first row on purpose, so the review-round-6 config keys stay clean: the name must END in the secret word (no `max_tokens`, `tokenizer`, `passwordHash`), and the value must be quoted and carry a letter and a digit (no `128000`, no `"include"`). A letters-only quoted password is an accepted miss.',
110
105
  source: "tenjin (tenjin-agent#296)",
111
106
  match: {
@@ -124,7 +119,6 @@ var redact_rules_default = {
124
119
  {
125
120
  id: "aws-access-key",
126
121
  tier: "block",
127
- scopes: ["query", "publish", "team"],
128
122
  description: "AWS access key id (AKIA/ASIA/ABIA/ACCA/A3T prefixes).",
129
123
  source: "gitleaks:aws-access-token",
130
124
  match: {
@@ -140,7 +134,6 @@ var redact_rules_default = {
140
134
  {
141
135
  id: "jwt",
142
136
  tier: "block",
143
- scopes: ["query", "publish", "team"],
144
137
  description: "JSON Web Token: three base64url segments whose header starts eyJ.",
145
138
  source: "gitleaks:jwt",
146
139
  match: {
@@ -156,7 +149,6 @@ var redact_rules_default = {
156
149
  {
157
150
  id: "github-token",
158
151
  tier: "block",
159
- scopes: ["query", "publish", "team"],
160
152
  description: "GitHub classic PAT/OAuth/app/refresh token or fine-grained PAT (github_pat_).",
161
153
  source: "gitleaks:github-pat + github-fine-grained-pat",
162
154
  match: {
@@ -172,7 +164,6 @@ var redact_rules_default = {
172
164
  {
173
165
  id: "slack-token",
174
166
  tier: "block",
175
- scopes: ["query", "publish", "team"],
176
167
  description: "Slack bot/user/app/refresh/legacy token.",
177
168
  source: "gitleaks:slack-*-token",
178
169
  match: {
@@ -188,7 +179,6 @@ var redact_rules_default = {
188
179
  {
189
180
  id: "stripe-token",
190
181
  tier: "block",
191
- scopes: ["query", "publish", "team"],
192
182
  description: "Stripe live or test secret/restricted key.",
193
183
  source: "gitleaks:stripe-access-token",
194
184
  match: {
@@ -204,7 +194,6 @@ var redact_rules_default = {
204
194
  {
205
195
  id: "anthropic-key",
206
196
  tier: "block",
207
- scopes: ["query", "publish", "team"],
208
197
  description: "Anthropic API key (sk-ant-).",
209
198
  source: "gitleaks:anthropic-api-key",
210
199
  match: {
@@ -220,7 +209,6 @@ var redact_rules_default = {
220
209
  {
221
210
  id: "openai-key",
222
211
  tier: "block",
223
- scopes: ["query", "publish", "team"],
224
212
  description: "OpenAI key: classic sk- plus sk-proj-/sk-svcacct-/sk-admin-. The body must carry a digit so sk- kebab identifiers do not hard-block. Project, service-account and admin keys carry `_` and `-` throughout the body, so the prefixed branch takes the wider class and its own trailing guard; the bare branch keeps the digit requirement and its own guard. The guards live INSIDE each branch: a shared guard outside the alternation made a classic key followed by `-old` fail outright (review round 6).",
225
213
  source: "gitleaks:openai-api-key",
226
214
  match: {
@@ -236,7 +224,6 @@ var redact_rules_default = {
236
224
  {
237
225
  id: "google-key",
238
226
  tier: "block",
239
- scopes: ["query", "publish", "team"],
240
227
  description: "Google API key (AIza) or OAuth client secret (GOCSPX-).",
241
228
  source: "gitleaks:gcp-api-key + gcp-oauth-client-secret",
242
229
  match: {
@@ -252,7 +239,6 @@ var redact_rules_default = {
252
239
  {
253
240
  id: "npm-token",
254
241
  tier: "block",
255
- scopes: ["query", "publish", "team"],
256
242
  description: "npm access token.",
257
243
  source: "gitleaks:npm-access-token",
258
244
  match: {
@@ -268,7 +254,6 @@ var redact_rules_default = {
268
254
  {
269
255
  id: "supabase-token",
270
256
  tier: "block",
271
- scopes: ["query", "publish", "team"],
272
257
  description: "Supabase personal access token (sbp_) or secret/publishable API key (sb_*_).",
273
258
  source: "gitleaks:supabase-access-token",
274
259
  match: {
@@ -284,7 +269,6 @@ var redact_rules_default = {
284
269
  {
285
270
  id: "twilio-key",
286
271
  tier: "block",
287
- scopes: ["query", "publish", "team"],
288
272
  description: "Twilio API key SID (SK + 32 lowercase hex).",
289
273
  source: "gitleaks:twilio-api-key",
290
274
  match: {
@@ -300,7 +284,6 @@ var redact_rules_default = {
300
284
  {
301
285
  id: "sendgrid-token",
302
286
  tier: "block",
303
- scopes: ["query", "publish", "team"],
304
287
  description: "SendGrid API key (SG.<id>.<secret>).",
305
288
  source: "gitleaks:sendgrid-api-token",
306
289
  match: {
@@ -316,7 +299,6 @@ var redact_rules_default = {
316
299
  {
317
300
  id: "huggingface-token",
318
301
  tier: "block",
319
- scopes: ["query", "publish", "team"],
320
302
  description: "Hugging Face user access token (hf_).",
321
303
  source: "gitleaks:huggingface-access-token",
322
304
  match: {
@@ -332,7 +314,6 @@ var redact_rules_default = {
332
314
  {
333
315
  id: "vercel-token",
334
316
  tier: "block",
335
- scopes: ["query", "publish", "team"],
336
317
  description: "Vercel Blob read/write store token.",
337
318
  source: "tenjin (shape from the Vercel Blob docs)",
338
319
  match: {
@@ -348,7 +329,6 @@ var redact_rules_default = {
348
329
  {
349
330
  id: "vercel-token",
350
331
  tier: "block",
351
- scopes: ["query", "publish", "team"],
352
332
  description: "Vercel platform token (vcp_/vci_/vca_/vcr_/vck_ prefixes).",
353
333
  source: "secretlint:@secretlint/secretlint-rule-vercel",
354
334
  match: {
@@ -364,7 +344,6 @@ var redact_rules_default = {
364
344
  {
365
345
  id: "notion-token",
366
346
  tier: "block",
367
- scopes: ["query", "publish", "team"],
368
347
  description: "Notion integration token (ntn_).",
369
348
  source: "secretlint:@secretlint/secretlint-rule-notion",
370
349
  match: {
@@ -380,7 +359,6 @@ var redact_rules_default = {
380
359
  {
381
360
  id: "linear-token",
382
361
  tier: "block",
383
- scopes: ["query", "publish", "team"],
384
362
  description: "Linear API key (lin_api_).",
385
363
  source: "secretlint:@secretlint/secretlint-rule-linear",
386
364
  match: {
@@ -396,7 +374,6 @@ var redact_rules_default = {
396
374
  {
397
375
  id: "figma-token",
398
376
  tier: "block",
399
- scopes: ["query", "publish", "team"],
400
377
  description: "Figma personal access token (figd_).",
401
378
  source: "secretlint:@secretlint/secretlint-rule-figma",
402
379
  match: {
@@ -412,7 +389,6 @@ var redact_rules_default = {
412
389
  {
413
390
  id: "gitlab-token",
414
391
  tier: "block",
415
- scopes: ["query", "publish", "team"],
416
392
  description: "GitLab personal access token (glpat-).",
417
393
  source: "secretlint:@secretlint/secretlint-rule-gitlab",
418
394
  match: {
@@ -428,7 +404,6 @@ var redact_rules_default = {
428
404
  {
429
405
  id: "docker-token",
430
406
  tier: "block",
431
- scopes: ["query", "publish", "team"],
432
407
  description: "Docker Hub personal access token (dckr_pat_).",
433
408
  source: "secretlint:@secretlint/secretlint-rule-docker",
434
409
  match: {
@@ -444,7 +419,6 @@ var redact_rules_default = {
444
419
  {
445
420
  id: "cloudflare-token",
446
421
  tier: "block",
447
- scopes: ["query", "publish", "team"],
448
422
  description: "Cloudflare API key or account/user token (cfk_/cfut_/cfat_).",
449
423
  source: "secretlint:@secretlint/secretlint-rule-cloudflare",
450
424
  match: {
@@ -460,7 +434,6 @@ var redact_rules_default = {
460
434
  {
461
435
  id: "databricks-token",
462
436
  tier: "block",
463
- scopes: ["query", "publish", "team"],
464
437
  description: "Databricks personal access token (dapi).",
465
438
  source: "secretlint:@secretlint/secretlint-rule-databricks",
466
439
  match: {
@@ -476,7 +449,6 @@ var redact_rules_default = {
476
449
  {
477
450
  id: "openssh-private-key",
478
451
  tier: "block",
479
- scopes: ["query", "publish", "team"],
480
452
  description: "OpenSSH private key body pasted without its PEM framing (base64 of the openssh-key-v1 magic).",
481
453
  source: "gitleaks:private-key (framing-free variant)",
482
454
  match: {
@@ -492,7 +464,6 @@ var redact_rules_default = {
492
464
  {
493
465
  id: "totp-uri",
494
466
  tier: "block",
495
- scopes: ["query", "publish", "team"],
496
467
  description: "otpauth:// TOTP/HOTP provisioning URI; its secret= parameter is a live second factor.",
497
468
  source: "tenjin (RFC-style otpauth key URI)",
498
469
  match: {
@@ -508,7 +479,6 @@ var redact_rules_default = {
508
479
  {
509
480
  id: "db-connection-uri",
510
481
  tier: "block",
511
- scopes: ["query", "publish", "team"],
512
482
  description: "Basic-auth style URI with an embedded password (scheme://user:pass@host), including database connection strings. The scheme run is length-bounded: unbounded, it backtracks quadratically across a transcript-length dotted-token line that never reaches ://. The user may be empty: `redis://:password@host` is the standard Redis form.",
513
483
  source: "tenjin",
514
484
  match: {
@@ -527,7 +497,6 @@ var redact_rules_default = {
527
497
  {
528
498
  id: "bearer-token",
529
499
  tier: "block",
530
- scopes: ["query", "publish", "team"],
531
500
  description: "Authorization: Bearer header carrying a live token.",
532
501
  source: "tenjin",
533
502
  match: {
@@ -546,7 +515,6 @@ var redact_rules_default = {
546
515
  {
547
516
  id: "basic-auth-header",
548
517
  tier: "warn",
549
- scopes: ["query", "publish"],
550
518
  description: "Authorization: Basic header: the base64 of user:password, under the entropy floor and on no vendor prefix (tenjin-agent#296). The header name is a bounded lookbehind behind a shape lookahead, so the mask keeps it, replaces the credential alone, and a whitespace run stays linear.",
551
519
  source: "tenjin (tenjin-agent#296)",
552
520
  match: {
@@ -562,7 +530,6 @@ var redact_rules_default = {
562
530
  {
563
531
  id: "curl-user-credential",
564
532
  tier: "warn",
565
- scopes: ["query", "publish"],
566
533
  description: "curl -u / --user user:password on one command (tenjin-agent#296): the password is masked and the command and user kept. Anchored on `curl` within 200 characters of the flag on the same pipeline segment, so `docker run -u 1000:1000` never matches. A `$VAR`, a placeholder or a bare lowercase word is skipped as the assignment row skips it.",
567
534
  source: "tenjin (tenjin-agent#296)",
568
535
  match: {
@@ -581,8 +548,7 @@ var redact_rules_default = {
581
548
  {
582
549
  id: "rpc-url-key",
583
550
  tier: "warn",
584
- scopes: ["query"],
585
- description: "An RPC provider key in a URL path, keyed on the provider's documented host: QuickNode (<name>.<network>.quiknode.pro/<key>/), Alchemy (<chain>.g.alchemy.com/v2/<key> and /nft/v3/<key>), Infura (<network>.infura.io/v3/<key> and /ws/v3/<key>), Ankr (rpc.ankr.com/<chain>/<token>), Chainstack (nd-NNN-NNN-NNN.p2pify.com/<key>, <network>.core.chainstack.com/<key> and /ws/<key>), GetBlock (go.getblock.io/<token>/, shared.<region>.getblock.io/<token>/), dRPC (lb.drpc.live/<network>/<key>) and Tenderly (<network>.gateway.tenderly.co/<key>). Query only: it keeps the node key of tenjin-agent#388 out of a router packet now that url-path-credential no longer masks in queries (tenjin-agent#489). The key must be 16 or more [A-Za-z0-9_-] characters with a letter and a digit, so a keyless path (Alchemy `demo`, a chain name) stays. Blast API is left out: it shut down.",
551
+ description: "An RPC provider key in a URL path, keyed on the provider's documented host: QuickNode (<name>.<network>.quiknode.pro/<key>/), Alchemy (<chain>.g.alchemy.com/v2/<key> and /nft/v3/<key>), Infura (<network>.infura.io/v3/<key> and /ws/v3/<key>), Ankr (rpc.ankr.com/<chain>/<token>), Chainstack (nd-NNN-NNN-NNN.p2pify.com/<key>, <network>.core.chainstack.com/<key> and /ws/<key>), GetBlock (go.getblock.io/<token>/, shared.<region>.getblock.io/<token>/), dRPC (lb.drpc.live/<network>/<key>) and Tenderly (<network>.gateway.tenderly.co/<key>). It keeps the node key of tenjin-agent#388 out of a router packet now that url-path-credential no longer masks in queries (tenjin-agent#489). The key must be 16 or more [A-Za-z0-9_-] characters with a letter and a digit, so a keyless path (Alchemy `demo`, a chain name) stays. Blast API is left out: it shut down.",
586
552
  source: "tenjin (tenjin-agent#489)",
587
553
  match: {
588
554
  kind: "regex",
@@ -597,8 +563,7 @@ var redact_rules_default = {
597
563
  {
598
564
  id: "webhook-url-token",
599
565
  tier: "warn",
600
- scopes: ["query"],
601
- description: "A webhook token in a URL path, keyed on the service's documented host: Slack (hooks.slack.com/services/T.../B.../<token> and /triggers/...), Discord (discord.com/api/webhooks/<id>/<token>, with or without /v10, and the discordapp.com, ptb and canary hosts) and Make (hook.make.com/<token>, and the regional hook.<region>.make.com). Query only: anyone holding the URL can post as the hook, and url-path-credential no longer masks in queries (tenjin-agent#489). Any path segment of 16 or more [A-Za-z0-9_-] characters after the host is the token; ids before it are shorter. The Slack lookbehind spans at most four segments, so a line of long segments stays linear. Google Chat carries its token in the query string, which url-query-credential masks. Teams connector URLs are retired (2026-05), and a Zapier catch-hook id is 5 characters, so neither is listed.",
566
+ description: "A webhook token in a URL path, keyed on the service's documented host: Slack (hooks.slack.com/services/T.../B.../<token> and /triggers/...), Discord (discord.com/api/webhooks/<id>/<token>, with or without /v10, and the discordapp.com, ptb and canary hosts) and Make (hook.make.com/<token>, and the regional hook.<region>.make.com). Anyone holding the URL can post as the hook, and url-path-credential no longer masks in queries (tenjin-agent#489). Any path segment of 16 or more [A-Za-z0-9_-] characters after the host is the token; ids before it are shorter. The Slack lookbehind spans at most four segments, so a line of long segments stays linear. Google Chat carries its token in the query string, which url-query-credential masks. Teams connector URLs are retired (2026-05), and a Zapier catch-hook id is 5 characters, so neither is listed.",
602
567
  source: "tenjin (tenjin-agent#489)",
603
568
  match: {
604
569
  kind: "regex",
@@ -613,7 +578,6 @@ var redact_rules_default = {
613
578
  {
614
579
  id: "url-query-credential",
615
580
  tier: "warn",
616
- scopes: ["query", "publish"],
617
581
  description: "Credential-named query parameter on a URL (?key=, &api_key=, ?token=, ?sig=, ?password=): the value is masked and the name kept. The value class stops at `&`, `#`, whitespace, quotes and brackets, so a value another row already replaced with `[redacted \u2026]` is not masked twice.",
618
582
  source: "tenjin (tenjin-agent#388)",
619
583
  match: {
@@ -626,26 +590,9 @@ var redact_rules_default = {
626
590
  handler: "labeledValue"
627
591
  }
628
592
  },
629
- {
630
- id: "url-path-credential",
631
- tier: "warn",
632
- scopes: ["publish"],
633
- description: "A path segment of 24 or more [A-Za-z0-9_-] characters that mixes letters and digits, on an http(s) URL: the shape a webhook secret or a signed-link token takes. Not masked in a query: a document id, a gist, a share link or a Reddit slug has the same shape, and a mask there stops a public read with nothing sent (tenjin-agent#489). `rpc-url-key` masks the node keys a query can carry in a path. Four exclusions, each from a measured miss: a segment with two hyphenated words (an article slug), a 40-hex git commit after a git path marker (/commit/, /commits/, /blob/, /tree/, /raw/, /compare/) or on a git host (github.com, gitlab.com, bitbucket.org, codeberg.org), since elsewhere a 40-hex segment is a node key (https://<name>.quiknode.pro/<40 hex>/), a 0x-prefixed 64-hex (the hex64 row already calls a 64-hex inside a URL a hash), a UUID, and a URL character class that stops at quotes, brackets and commas, so one match never spans two URLs in a JSON string. The segment must be whole (a `.` or `%` inside it is a filename or an encoded slug, not a token). The shape lookahead runs before the scheme lookbehind, and the lookbehind is bounded, so a line of short segments stays linear.",
634
- source: "tenjin (tenjin-agent#388)",
635
- match: {
636
- kind: "regex",
637
- pattern: "\\/(?=[\\w-]{24})(?<=\\bhttps?:\\/\\/[^\\s?#\"'`<>()\\[\\]{},]{1,2048}\\/)(?=[\\w-]*[A-Za-z])(?=[\\w-]*\\d)(?![\\w-]*?(?<![A-Za-z])[A-Za-z]{3,}-[A-Za-z]{3})(?!(?:0x[0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?![\\w-]))(?!(?=[0-9a-f]{40}(?![\\w-]))(?<=\\/(?:commit|commits|blob|tree|raw|compare)\\/|\\bhttps?:\\/\\/(?:www\\.)?(?:github\\.com|gitlab\\.com|bitbucket\\.org|codeberg\\.org)\\/[^\\s?#\"'`<>()\\[\\]{},]{0,2048}))[\\w-]{24,}(?=[.;:!]*(?:[\\/?#\\s\"'<>(),\\[\\]{}`]|$))",
638
- flags: "gi"
639
- },
640
- excerpt: {
641
- kind: "mask",
642
- keep: 1
643
- }
644
- },
645
593
  {
646
594
  id: "bare-hex-key",
647
595
  tier: "warn",
648
- scopes: ["query", "publish"],
649
596
  description: "64 hex with no 0x, the shape a private key takes when a tool exports it bare (tenjin-agent#388). A hash label within two tokens before it (tx, txn, txid, hash, sha, sha256, hmac, digest, commit, id, checksum, sig, signature, across markdown emphasis) or an http(s) URL around it makes it a hash and it is kept, the same downgrade the 0x form has. A 128-hex run (sha512) is not a 64-hex run and never matches.",
650
597
  source: "tenjin (tenjin-agent#388)",
651
598
  match: {
@@ -664,7 +611,6 @@ var redact_rules_default = {
664
611
  {
665
612
  id: "bare-hex-key",
666
613
  tier: "warn",
667
- scopes: ["query", "publish"],
668
614
  description: "A 64-hex key split into two 32-hex halves by one space or one newline, with an optional 0x on the first half. Bounded to exactly two adjacent halves: a third 32-hex run before or after (a list of MD5 sums) keeps the whole list as written, and a hash label keeps it as for the row above.",
669
615
  source: "tenjin (tenjin-agent#388)",
670
616
  match: {
@@ -683,7 +629,6 @@ var redact_rules_default = {
683
629
  {
684
630
  id: "solana-secret-key",
685
631
  tier: "warn",
686
- scopes: ["query", "publish"],
687
632
  description: "An 87 or 88 character base58 run: a Solana keypair's 64-byte secret key as a wallet exports it (tenjin-agent#388). A transaction signature has the same shape, so a tx or sig label before it or an http(s) URL around it keeps it, as for bare-hex-key. A 32-byte public key is 43 or 44 characters and never matches.",
688
633
  source: "tenjin (tenjin-agent#388)",
689
634
  match: {
@@ -702,7 +647,6 @@ var redact_rules_default = {
702
647
  {
703
648
  id: "solana-secret-key",
704
649
  tier: "warn",
705
- scopes: ["query", "publish"],
706
650
  description: "A JSON array of exactly 64 integers from 0 to 255: the solana-keygen keypair file.",
707
651
  source: "tenjin (tenjin-agent#388)",
708
652
  match: {
@@ -715,285 +659,10 @@ var redact_rules_default = {
715
659
  keep: 1
716
660
  }
717
661
  },
718
- {
719
- id: "wallet-address",
720
- tier: "warn",
721
- scopes: ["publish"],
722
- description: "EVM account/contract address (0x + 40 hex).",
723
- source: "blockrun-mcp (wallet-key leak scanner)",
724
- match: {
725
- kind: "regex",
726
- pattern: "(?<![0-9a-fx])0x[0-9a-fA-F]{40}(?![0-9a-fA-F])",
727
- flags: "gi"
728
- },
729
- excerpt: {
730
- kind: "abbreviate",
731
- head: 6,
732
- tail: 4
733
- }
734
- },
735
- {
736
- id: "confidential-marker",
737
- tier: "warn",
738
- scopes: ["publish"],
739
- description: "Document classification legend (CONFIDENTIAL stamp, INTERNAL USE ONLY, DO NOT DISTRIBUTE). Case-sensitive: marker-shaped, not word-in-phrase.",
740
- source: "tenjin",
741
- match: {
742
- kind: "regex",
743
- pattern: "\\b(?:STRICTLY|COMPANY|HIGHLY)\\s+CONFIDENTIAL\\b|(?<![A-Z]{2,}[ \\t]+)\\bCONFIDENTIAL\\b|\\bCONFIDENTIAL\\b(?![ \\t]+[A-Z]{2,})|\\bConfidential(?=\\s*(?:[-:.,;\u2013\u2014]|$))|\\b(?:INTERNAL|Internal)(?:\\s+(?:USE|Use))?\\s+(?:ONLY|Only)\\b|\\b(?:DO\\s+NOT\\s+DISTRIBUTE|Do\\s+Not\\s+Distribute)\\b",
744
- flags: "g"
745
- },
746
- excerpt: {
747
- kind: "verbatim"
748
- }
749
- },
750
- {
751
- id: "internal-hostname",
752
- tier: "warn",
753
- scopes: ["publish"],
754
- description: "Hostname on a private-use suffix (.internal, .corp, .local, .lan, .intranet). Label count and label length are bounded: an unbounded (label\\.)+ run is quadratic on a transcript-length line of dotted digits.",
755
- source: "tenjin",
756
- match: {
757
- kind: "regex",
758
- pattern: "\\b(?:[a-z0-9-]{1,63}\\.){1,6}(?:internal|corp|local|lan|intranet)\\b",
759
- flags: "gi"
760
- },
761
- excerpt: {
762
- kind: "verbatim"
763
- }
764
- },
765
- {
766
- id: "private-network-endpoint",
767
- tier: "warn",
768
- scopes: ["publish"],
769
- description: "RFC1918 / link-local IPv4 endpoint (10/8, 172.16/12, 192.168/16, 169.254/16).",
770
- source: "tenjin (closes tenjin-agent#45)",
771
- match: {
772
- kind: "regex",
773
- pattern: "(?<![\\d.])(?:10\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|172\\.(?:1[6-9]|2\\d|3[01])\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|192\\.168\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|169\\.254\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))(?::\\d{2,5})?(?!\\.?\\d)",
774
- flags: "g"
775
- },
776
- excerpt: {
777
- kind: "verbatim"
778
- }
779
- },
780
- {
781
- id: "private-network-endpoint",
782
- tier: "warn",
783
- scopes: ["publish"],
784
- description: "Loopback / wildcard-bind development endpoint. Scheme or port required so prose about localhost does not warn.",
785
- source: "tenjin (closes tenjin-agent#45)",
786
- match: {
787
- kind: "regex",
788
- pattern: "https?:\\/\\/(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\])(?::\\d{2,5})?(?:\\/[^\\s\"'`<>?&)\\]]*)?|\\b(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):\\d{2,5}\\b",
789
- flags: "gi"
790
- },
791
- excerpt: {
792
- kind: "verbatim",
793
- max: 80
794
- }
795
- },
796
- {
797
- id: "collaboration-url",
798
- tier: "warn",
799
- scopes: ["publish"],
800
- description: "Link into a collaboration workspace (Google Docs/Drive, Notion, Figma, Slack archives, Linear, Jira/Confluence): the target is usually access-controlled.",
801
- source: "tenjin (closes tenjin-agent#45)",
802
- match: {
803
- kind: "regex",
804
- pattern: "https?:\\/\\/(?:docs\\.google\\.com|drive\\.google\\.com|(?:[a-z0-9-]+\\.)?notion\\.(?:so|site)|(?:www\\.)?figma\\.com|(?:[a-z0-9-]+\\.)?slack\\.com\\/archives|linear\\.app|[a-z0-9-]+\\.atlassian\\.net)(?:\\/[^\\s\"'`<>?&)\\]]*)?",
805
- flags: "gi"
806
- },
807
- excerpt: {
808
- kind: "verbatim",
809
- max: 80
810
- }
811
- },
812
- {
813
- id: "cloud-resource-id",
814
- tier: "warn",
815
- scopes: ["publish"],
816
- description: "AWS ARN: names an account, region, and resource.",
817
- source: "tenjin (closes tenjin-agent#45)",
818
- match: {
819
- kind: "regex",
820
- pattern: "\\barn:aws[0-9a-z-]*:[0-9a-z-]+:[0-9a-z-]*:\\d{0,12}:[^\\s\"'`<>,)\\]]+",
821
- flags: "gi"
822
- },
823
- excerpt: {
824
- kind: "verbatim",
825
- max: 80
826
- }
827
- },
828
- {
829
- id: "cloud-resource-id",
830
- tier: "warn",
831
- scopes: ["publish"],
832
- description: "GCP fully-qualified resource name (projects/<id>/<collection>/<name>).",
833
- source: "tenjin (closes tenjin-agent#45)",
834
- match: {
835
- kind: "regex",
836
- pattern: "\\bprojects\\/[a-z][a-z0-9-]{4,28}[a-z0-9]\\/(?:locations|topics|subscriptions|secrets|instances|serviceAccounts|datasets|buckets|zones|keyRings|clusters|jobs|models)\\/[^\\s\"'`<>,)\\]]+",
837
- flags: "g"
838
- },
839
- excerpt: {
840
- kind: "verbatim",
841
- max: 80
842
- }
843
- },
844
- {
845
- id: "cloud-resource-id",
846
- tier: "warn",
847
- scopes: ["publish"],
848
- description: "Azure resource id: /subscriptions/<guid>/resourceGroups/<name>/...",
849
- source: "tenjin (closes tenjin-agent#45)",
850
- match: {
851
- kind: "regex",
852
- pattern: "\\/subscriptions\\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\/resourceGroups\\/[^\\s\"'`<>,)\\]/]+(?:\\/[^\\s\"'`<>,)\\]]*)?",
853
- flags: "g"
854
- },
855
- excerpt: {
856
- kind: "verbatim",
857
- max: 80
858
- }
859
- },
860
- {
861
- id: "cloud-resource-id",
862
- tier: "warn",
863
- scopes: ["publish"],
864
- description: "Cloud object-storage location (s3://, gs://, or an S3/Azure Blob/GCS bucket hostname).",
865
- source: "tenjin (closes tenjin-agent#45)",
866
- match: {
867
- kind: "regex",
868
- pattern: "\\b(?:s3|gs):\\/\\/[a-z0-9][a-z0-9._-]{2,62}(?:\\/[^\\s\"'`<>,?&)\\]]*)?|\\b[a-z0-9][a-z0-9.-]{1,62}\\.(?:s3(?:[.-][a-z0-9-]+)?\\.amazonaws\\.com|blob\\.core\\.windows\\.net|storage\\.googleapis\\.com)\\b",
869
- flags: "gi"
870
- },
871
- excerpt: {
872
- kind: "verbatim",
873
- max: 80
874
- }
875
- },
876
- {
877
- id: "local-path",
878
- tier: "warn",
879
- scopes: ["publish"],
880
- description: "Home-anchored local filesystem path: leaks the machine username and private project layout.",
881
- source: "tenjin",
882
- match: {
883
- kind: "regex",
884
- pattern: `(?:(?<![\\w.-])\\/(?:Users|home)\\/([A-Za-z0-9._-]+)(?:\\/[^\\s"'\`)\\]}>:,;?&/]+)+|\\b[A-Za-z]:\\\\[Uu]sers\\\\([^\\\\\\s"']+)(?:\\\\[^\\\\\\s"']+)+)`,
885
- flags: "dg"
886
- },
887
- excerpt: {
888
- kind: "custom",
889
- handler: "localPath"
890
- },
891
- skip: {
892
- handler: "placeholderUsername"
893
- }
894
- },
895
- {
896
- id: "customer-identifier",
897
- tier: "warn",
898
- scopes: ["publish"],
899
- description: "Labeled customer/account/tenant identifier with a literal value.",
900
- source: "tenjin",
901
- match: {
902
- kind: "regex",
903
- pattern: `\\b((?:customer|client|account|tenant|subscriber)[ _-]?(?:id|number|no))\\b\\s*[:=#]\\s*("[^"]{2,}"|'[^']{2,}'|[A-Za-z0-9][A-Za-z0-9._-]{2,})`,
904
- flags: "gi"
905
- },
906
- excerpt: {
907
- kind: "custom",
908
- handler: "labeledValue"
909
- },
910
- skip: {
911
- handler: "nonLiteralValue"
912
- }
913
- },
914
- {
915
- id: "paid-content-marker",
916
- tier: "warn",
917
- scopes: ["publish"],
918
- description: "Third-party rights legend suggesting copied licensed material. Legend shapes only: bare paywall vocabulary is this marketplace\u2019s own subject matter.",
919
- source: "tenjin",
920
- match: {
921
- kind: "regex",
922
- pattern: "\\ball rights reserved\\b|\\b(?:reprinted|reproduced|used) with permission\\b|\\bnot for (?:redistribution|republication)\\b|\\bdo not (?:redistribute|republish)\\b|(?:\xA9|\\(c\\)|copyright)\\s*(?:19|20)\\d{2}\\b",
923
- flags: "gi"
924
- },
925
- excerpt: {
926
- kind: "verbatim"
927
- }
928
- },
929
- {
930
- id: "embedded-instruction",
931
- tier: "warn",
932
- scopes: ["publish"],
933
- description: "Injection-shaped imperative captured from a prompt or tool output.",
934
- source: "tenjin",
935
- match: {
936
- kind: "regex",
937
- pattern: "\\b(?:ignore|disregard|forget)\\s+(?:all\\s+|any\\s+)?(?:previous|prior|above|earlier|preceding)\\s+(?:instructions?|prompts?|context|messages?)\\b|\\bdo not (?:reveal|disclose|mention) (?:this|these|the above)\\b",
938
- flags: "gi"
939
- },
940
- excerpt: {
941
- kind: "verbatim"
942
- }
943
- },
944
- {
945
- id: "embedded-instruction",
946
- tier: "warn",
947
- scopes: ["publish"],
948
- description: "Hidden-prompt document header. Case-sensitive: the all-caps header form is the injection-typed one.",
949
- source: "tenjin",
950
- match: {
951
- kind: "regex",
952
- pattern: "\\bBEGIN (?:SYSTEM|HIDDEN) (?:PROMPT|INSTRUCTIONS)\\b",
953
- flags: "g"
954
- },
955
- excerpt: {
956
- kind: "verbatim"
957
- }
958
- },
959
- {
960
- id: "email",
961
- tier: "warn",
962
- scopes: ["publish"],
963
- description: "Email address (PII), subsuming corporate-domain addresses. Lengths follow the RFC limits so the local part and the domain cannot backtrack against each other: unbounded, the pair is quadratic on a transcript-length line.",
964
- source: "tenjin",
965
- match: {
966
- kind: "regex",
967
- pattern: "\\b[A-Za-z0-9._%+-]{1,64}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.){1,8}[A-Za-z]{2,24}\\b",
968
- flags: "g"
969
- },
970
- excerpt: {
971
- kind: "verbatim"
972
- },
973
- skip: {
974
- handler: "reservedExampleEmail"
975
- }
976
- },
977
- {
978
- id: "phone",
979
- tier: "warn",
980
- scopes: ["publish"],
981
- description: "Telephone number (PII).",
982
- source: "tenjin",
983
- match: {
984
- kind: "regex",
985
- pattern: "(?<!\\d)(?:\\+?\\d{1,2}[\\s.-]?)?(?:\\(\\d{3}\\)|\\d{3})[\\s.-]\\d{3}[\\s.-]\\d{4}(?!\\d)",
986
- flags: "g"
987
- },
988
- excerpt: {
989
- kind: "verbatim"
990
- }
991
- },
992
662
  {
993
663
  id: "raw-private-key",
994
664
  tier: "block",
995
- scopes: ["query", "publish", "team"],
996
- description: "0x + 64 hex with no hash context. Demoted to the warn detector hex32-value when a hash/identifier label precedes it (within two intervening tokens, across markdown and quote punctuation), when it sits inside an http(s) URL, or when it is one of the publicHexConstants below. An unlabeled bare 64-hex stays block: that is the floor.",
665
+ description: "0x + 64 hex with no hash context. Left as written, as a hash, when a hash/identifier label precedes it (within two intervening tokens, across markdown and quote punctuation), when it sits inside an http(s) URL, or when it is one of the publicHexConstants below. An unlabeled bare 64-hex is masked: that is the floor.",
997
666
  source: "blockrun-mcp (wallet-key leak scanner)",
998
667
  match: {
999
668
  kind: "algorithm",
@@ -1007,7 +676,6 @@ var redact_rules_default = {
1007
676
  {
1008
677
  id: "pem-private-key",
1009
678
  tier: "block",
1010
- scopes: ["query", "publish", "team"],
1011
679
  description: "PEM private-key armor (-----BEGIN ... PRIVATE KEY-----), RSA/EC/OPENSSH/PGP variants.",
1012
680
  source: "gitleaks:private-key",
1013
681
  match: {
@@ -1022,7 +690,6 @@ var redact_rules_default = {
1022
690
  {
1023
691
  id: "bip39-seed-phrase",
1024
692
  tier: "block",
1025
- scopes: ["query", "publish", "team"],
1026
693
  description: 'Twelve or more consecutive BIP-39 English wordlist words separated only by whitespace or quote characters, so a quoted `.env` value (MNEMONIC="abandon ... about") counts (tenjin-agent#296): a wallet recovery phrase.',
1027
694
  source: "tenjin; wordlist from BIP-0039 (see NOTICE.md)",
1028
695
  match: {
@@ -1033,51 +700,6 @@ var redact_rules_default = {
1033
700
  kind: "custom",
1034
701
  handler: "bip39"
1035
702
  }
1036
- },
1037
- {
1038
- id: "env-dump-block",
1039
- tier: "warn",
1040
- scopes: ["publish"],
1041
- description: "Three or more consecutive SHOUTY_KEY=value lines carrying at least one substantial literal: a pasted .env file.",
1042
- source: "tenjin",
1043
- match: {
1044
- kind: "algorithm",
1045
- algorithm: "envDump"
1046
- },
1047
- excerpt: {
1048
- kind: "custom",
1049
- handler: "envDump"
1050
- }
1051
- },
1052
- {
1053
- id: "high-entropy-string",
1054
- tier: "warn",
1055
- scopes: ["publish"],
1056
- description: "Catch-all for unknown credential formats: a long mixed-case alphanumeric token whose Shannon entropy and case-run profile match random key material rather than an identifier.",
1057
- source: "tenjin (entropy heuristic in the spirit of gitleaks entropy gating)",
1058
- match: {
1059
- kind: "algorithm",
1060
- algorithm: "entropy"
1061
- },
1062
- excerpt: {
1063
- kind: "custom",
1064
- handler: "entropy"
1065
- }
1066
- },
1067
- {
1068
- id: "long-verbatim-quote",
1069
- tier: "warn",
1070
- scopes: ["publish"],
1071
- description: "Fenced block or blockquote run long enough to read as copied third-party material.",
1072
- source: "tenjin",
1073
- match: {
1074
- kind: "algorithm",
1075
- algorithm: "longVerbatim"
1076
- },
1077
- excerpt: {
1078
- kind: "custom",
1079
- handler: "longVerbatim"
1080
- }
1081
703
  }
1082
704
  ]
1083
705
  };
@@ -1090,23 +712,6 @@ var bip39_wordlist_default = {
1090
712
  };
1091
713
 
1092
714
  // src/lib/redact.ts
1093
- var LONG_QUOTE_WORDS = 80;
1094
- function findings(text, scope) {
1095
- const lines = text.split("\n");
1096
- const found = [
1097
- ...scanHex64(lines),
1098
- ...scanLineDetectors(lines),
1099
- ...scanPemBlocks(lines),
1100
- ...scanSeedPhrases(lines),
1101
- ...scanEnvDumpBlocks(lines),
1102
- ...scanLongVerbatim(lines)
1103
- ];
1104
- const named = dedupeAndSort(suppressEmailsInDbUris(found));
1105
- const all = dedupeAndSort([...named, ...scanHighEntropy(lines, named)]);
1106
- if (scope === "publish") return all;
1107
- const keep = CHECKS[scope];
1108
- return all.filter((f) => keep.has(f.check));
1109
- }
1110
715
  function mask(text) {
1111
716
  let out = text.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g, "");
1112
717
  for (const detector of MASK_DETECTORS) {
@@ -1119,18 +724,13 @@ function mask(text) {
1119
724
  return detector.skip?.(m) === true ? m[0] : detector.excerpt(m);
1120
725
  });
1121
726
  }
1122
- if (MASKED_ALGORITHMS.has("hex64") || MASKED_ALGORITHMS.has("bip39")) {
1123
- out = out.split("\n").map(maskLineSpans).join("\n");
1124
- }
1125
- if (MASKED_ALGORITHMS.has("bip39")) out = maskLooseMnemonics(out);
1126
- return MASKED_ALGORITHMS.has("pemBlock") ? maskPemBlocks(out) : out;
727
+ out = out.split("\n").map(maskLineSpans).join("\n");
728
+ out = maskLooseMnemonics(out);
729
+ return maskPemBlocks(out);
1127
730
  }
1128
731
  function maskLineSpans(line) {
1129
732
  const lines = [line];
1130
- const spans = [
1131
- ...MASKED_ALGORITHMS.has("hex64") ? scanHex64(lines) : [],
1132
- ...MASKED_ALGORITHMS.has("bip39") ? scanSeedPhrases(lines) : []
1133
- ].filter((f) => f.check !== "hex32-value").filter(
733
+ const spans = [...scanHex64(lines), ...scanSeedPhrases(lines)].filter(
1134
734
  (f) => f.check !== "bip39-seed-phrase" || line.slice(f.span[0], f.span[1]).split(/[\s"'`]+/).length <= SEED_PHRASE_MAX_WORDS
1135
735
  ).sort((a, b) => a.span[0] - b.span[0]);
1136
736
  if (spans.length === 0) return line;
@@ -1157,48 +757,24 @@ function maskPemBlocks(text) {
1157
757
  rest = rest.slice(stop);
1158
758
  }
1159
759
  }
1160
- var SCOPES = /* @__PURE__ */ new Set(["query", "publish", "team"]);
1161
760
  var CORPUS = redact_rules_default;
1162
- var ALGORITHMS = /* @__PURE__ */ new Set(["hex64", "pemBlock", "bip39", "envDump", "entropy", "longVerbatim"]);
1163
- var MASKABLE_ALGORITHMS = /* @__PURE__ */ new Set(["hex64", "pemBlock", "bip39"]);
761
+ var ALGORITHMS = /* @__PURE__ */ new Set(["hex64", "pemBlock", "bip39"]);
1164
762
  var EXCERPT_HANDLERS = {
1165
763
  googleKey: (m) => maskKeeping(m[0], m[0].startsWith("AIza") ? 4 : 7),
1166
764
  dbConnectionUri: (m) => `${m[1]}://${m[2]}:[redacted]@${m[4]}`,
1167
765
  bearerToken: (m) => `Authorization: Bearer [redacted ${m[1]?.length ?? 0} chars]`,
1168
- labeledValue: (m) => `${m[1]}=[redacted ${dequote(m[2] ?? "").length} chars]`,
1169
- localPath: localPathExcerpt
766
+ labeledValue: (m) => `${m[1]}=[redacted ${dequote(m[2] ?? "").length} chars]`
1170
767
  };
1171
768
  var SKIP_HANDLERS = {
1172
769
  exampleDbPassword: (m) => isPlaceholder(m[3] ?? "") || isExamplePassword(m[3] ?? ""),
1173
770
  placeholderGroup1: (m) => isPlaceholder(m[1] ?? ""),
1174
771
  nonLiteralValue: skipNonLiteralValue,
1175
- placeholderUsername: (m) => PLACEHOLDER_USERNAME.test(m[1] ?? m[2] ?? ""),
1176
- reservedExampleEmail: (m) => RESERVED_EXAMPLE_DOMAIN.test(m[0]),
1177
772
  hashLabelled: isLabelledHash
1178
773
  };
1179
- function validateScopes(rule) {
1180
- if (!Array.isArray(rule.scopes) || rule.scopes.length === 0) {
1181
- throw new Error(`redact-rules.json: rule ${rule.id} has no scopes`);
1182
- }
1183
- for (const scope of rule.scopes) {
1184
- if (!SCOPES.has(scope))
1185
- throw new Error(`redact-rules.json: rule ${rule.id} names unknown scope ${scope}`);
1186
- }
774
+ function validateTier(rule) {
1187
775
  if (rule.tier !== "block" && rule.tier !== "warn") {
1188
776
  throw new Error(`redact-rules.json: rule ${rule.id} has unknown tier ${String(rule.tier)}`);
1189
777
  }
1190
- if (rule.scopes.includes("team") && !rule.scopes.includes("publish")) {
1191
- throw new Error(`redact-rules.json: rule ${rule.id} reports for team but not publish`);
1192
- }
1193
- if (rule.tier === "block" && !rule.scopes.includes("team")) {
1194
- throw new Error(`redact-rules.json: block rule ${rule.id} must be scoped to team as well`);
1195
- }
1196
- const maskable = rule.match.kind === "regex" || rule.match.kind === "algorithm" && MASKABLE_ALGORITHMS.has(rule.match.algorithm ?? "");
1197
- if (rule.scopes.includes("query") && !maskable) {
1198
- throw new Error(
1199
- `redact-rules.json: rule ${rule.id} is masked in queries but mask() cannot apply it`
1200
- );
1201
- }
1202
778
  }
1203
779
  function compileSkip(rule) {
1204
780
  const skip = rule.skip === void 0 ? void 0 : SKIP_HANDLERS[rule.skip.handler];
@@ -1217,20 +793,13 @@ function compileLineDetectors(rules) {
1217
793
  const out = [];
1218
794
  for (const rule of rules) {
1219
795
  if (rule.match.kind === "algorithm") continue;
1220
- out.push({
1221
- check: rule.id,
1222
- severity: rule.tier,
1223
- scopes: new Set(rule.scopes),
1224
- re: compileRegex(rule),
1225
- excerpt: compileExcerpt(rule),
1226
- skip: compileSkip(rule)
1227
- });
796
+ out.push({ re: compileRegex(rule), excerpt: compileExcerpt(rule), skip: compileSkip(rule) });
1228
797
  }
1229
798
  return out;
1230
799
  }
1231
800
  function validateCorpus(rules) {
1232
801
  for (const rule of rules) {
1233
- validateScopes(rule);
802
+ validateTier(rule);
1234
803
  if (rule.match.kind === "algorithm") {
1235
804
  if (!ALGORITHMS.has(rule.match.algorithm ?? "")) {
1236
805
  throw new Error(`redact-rules.json: rule ${rule.id} names unknown algorithm`);
@@ -1257,15 +826,6 @@ function compileExcerpt(rule) {
1257
826
  const keep = policy.keep ?? 0;
1258
827
  return (m) => maskKeeping(m[0], keep);
1259
828
  }
1260
- case "verbatim": {
1261
- const max = policy.max;
1262
- return (m) => max === void 0 ? m[0] : truncate(m[0], max);
1263
- }
1264
- case "abbreviate": {
1265
- const head = policy.head ?? 6;
1266
- const tail = policy.tail ?? 4;
1267
- return (m) => `${m[0].slice(0, head)}\u2026${m[0].slice(-tail)}`;
1268
- }
1269
829
  case "custom": {
1270
830
  const handler = EXCERPT_HANDLERS[policy.handler ?? ""];
1271
831
  if (handler === void 0) {
@@ -1278,59 +838,11 @@ function compileExcerpt(rule) {
1278
838
  }
1279
839
  }
1280
840
  validateCorpus(CORPUS.rules);
1281
- var LINE_DETECTORS = compileLineDetectors(CORPUS.rules);
1282
- var MASK_DETECTORS = LINE_DETECTORS.filter((d) => d.scopes.has("query"));
1283
- var REPORT_DETECTORS = LINE_DETECTORS.filter((d) => d.scopes.has("publish"));
1284
- var MASKED_ALGORITHMS = new Set(
1285
- CORPUS.rules.filter((r) => r.match.kind === "algorithm" && r.scopes.includes("query")).map((r) => r.match.algorithm ?? "")
1286
- );
1287
- function scanLineDetectors(lines) {
1288
- const out = [];
1289
- for (let i = 0; i < lines.length; i++) {
1290
- const line = lines[i] ?? "";
1291
- for (const detector of REPORT_DETECTORS) {
1292
- detector.re.lastIndex = 0;
1293
- let m;
1294
- while ((m = detector.re.exec(line)) !== null) {
1295
- if (!isSuppressedAsDocs(detector, m) && detector.skip?.(m) !== true) {
1296
- out.push({
1297
- check: detector.check,
1298
- severity: detector.severity,
1299
- line: i + 1,
1300
- span: [m.index, m.index + m[0].length],
1301
- excerpt: detector.excerpt(m)
1302
- });
1303
- }
1304
- }
1305
- }
1306
- }
1307
- return out;
1308
- }
1309
- var DOCS_PLACEHOLDER = /x{6,}|<[^<>]*>|\{\{[^{}]*\}\}|\byour[_-]?(?:key|token|secret|password)\b/i;
1310
- function isSuppressedAsDocs(detector, m) {
1311
- return detector.severity === "warn" && DOCS_PLACEHOLDER.test(m[0]);
1312
- }
1313
- var RESERVED_EXAMPLE_DOMAIN = /@(?:[A-Za-z0-9-]+\.)*example\.(?:com|org|net)$/i;
1314
- var PLACEHOLDER_USERNAME = /^(?:user(?:name)?|you(?:rname)?|example|foo|me|myuser|somebody)$/i;
1315
- function suppressEmailsInDbUris(findings2) {
1316
- const uris = findings2.filter((f) => f.check === "db-connection-uri");
1317
- if (uris.length === 0) return findings2;
1318
- return findings2.filter(
1319
- (f) => f.check !== "email" || !uris.some((u) => u.line === f.line && f.span[0] >= u.span[0] && f.span[1] <= u.span[1])
1320
- );
1321
- }
841
+ var MASK_DETECTORS = compileLineDetectors(CORPUS.rules);
1322
842
  function maskKeeping(match, prefixLen) {
1323
843
  const prefix = match.slice(0, Math.min(prefixLen, match.length));
1324
844
  return `${prefix}\u2026[redacted ${match.length - prefix.length} chars]`;
1325
845
  }
1326
- function truncate(value, max) {
1327
- return value.length > max ? `${value.slice(0, max - 3)}\u2026` : value;
1328
- }
1329
- function localPathExcerpt(m) {
1330
- const bounds = m.indices?.[1] ?? m.indices?.[2];
1331
- const masked = bounds === void 0 ? m[0] : `${m[0].slice(0, bounds[0] - m.index)}[user]${m[0].slice(bounds[1] - m.index)}`;
1332
- return truncate(masked, 60);
1333
- }
1334
846
  function skipNonLiteralValue(m) {
1335
847
  const raw = m[2] ?? "";
1336
848
  const value = dequote(raw);
@@ -1385,13 +897,11 @@ function scanHex64(lines) {
1385
897
  HEX64_RE.lastIndex = 0;
1386
898
  let m;
1387
899
  while ((m = HEX64_RE.exec(line)) !== null) {
1388
- const hash = isHashContext(line, m.index, m[0]);
900
+ if (isHashContext(line, m.index, m[0])) continue;
1389
901
  out.push({
1390
- check: hash ? "hex32-value" : "raw-private-key",
1391
- severity: hash ? "warn" : "block",
1392
- line: i + 1,
902
+ check: "raw-private-key",
1393
903
  span: [m.index, m.index + m[0].length],
1394
- excerpt: hash ? `${m[0].slice(0, 6)}\u2026${m[0].slice(-4)}` : maskKeeping(m[0], 2)
904
+ excerpt: maskKeeping(m[0], 2)
1395
905
  });
1396
906
  }
1397
907
  }
@@ -1419,24 +929,6 @@ function isLabelledHash(m) {
1419
929
  }
1420
930
  var PEM_BEGIN = /-----BEGIN[ A-Z0-9]*PRIVATE KEY(?: BLOCK)?-----/;
1421
931
  var PEM_END = /-----END[ A-Z0-9]*PRIVATE KEY(?: BLOCK)?-----/;
1422
- function scanPemBlocks(lines) {
1423
- const out = [];
1424
- for (let i = 0; i < lines.length; i++) {
1425
- const line = lines[i] ?? "";
1426
- const m = PEM_BEGIN.exec(line);
1427
- if (m !== null) {
1428
- out.push({
1429
- check: "pem-private-key",
1430
- severity: "block",
1431
- line: i + 1,
1432
- span: [m.index, m.index + m[0].length],
1433
- excerpt: m[0]
1434
- // the header marker only — no key material follows on it
1435
- });
1436
- }
1437
- }
1438
- return out;
1439
- }
1440
932
  var BIP39_WORDS = new Set(bip39_wordlist_default.words.split(" "));
1441
933
  var SEED_PHRASE_MIN_WORDS = 12;
1442
934
  var SEED_PHRASE_MAX_WORDS = 24;
@@ -1517,8 +1009,6 @@ function scanSeedPhrases(lines) {
1517
1009
  if (runWords >= SEED_PHRASE_MIN_WORDS) {
1518
1010
  out.push({
1519
1011
  check: "bip39-seed-phrase",
1520
- severity: "block",
1521
- line: i + 1,
1522
1012
  span: [runStart, runEnd],
1523
1013
  excerpt: `[redacted ${runWords}-word BIP-39 recovery phrase]`
1524
1014
  });
@@ -1538,176 +1028,8 @@ function scanSeedPhrases(lines) {
1538
1028
  }
1539
1029
  return out;
1540
1030
  }
1541
- var ENV_LINE = /^\s*(?:export\s+)?([A-Z][A-Z0-9_]{2,})=(\S.*)$/;
1542
- var ENV_BLOCK_MIN_LINES = 3;
1543
- var ENV_SUBSTANTIAL_VALUE = 12;
1544
- function scanEnvDumpBlocks(lines) {
1545
- const out = [];
1546
- let i = 0;
1547
- while (i < lines.length) {
1548
- const keys = [];
1549
- let substantial = false;
1550
- const start = i;
1551
- let m;
1552
- while (i < lines.length && (m = ENV_LINE.exec(lines[i] ?? "")) !== null) {
1553
- keys.push(m[1] ?? "");
1554
- const value = dequote((m[2] ?? "").trim());
1555
- if (value.length >= ENV_SUBSTANTIAL_VALUE && !isPlaceholder(value) && !isStructural(value)) {
1556
- substantial = true;
1557
- }
1558
- i++;
1559
- }
1560
- if (keys.length >= ENV_BLOCK_MIN_LINES && substantial) {
1561
- const shown = keys.slice(0, 3).join(", ");
1562
- const rest = keys.length - 3;
1563
- out.push({
1564
- check: "env-dump-block",
1565
- severity: "warn",
1566
- line: start + 1,
1567
- span: [0, (lines[start] ?? "").length],
1568
- excerpt: `${keys.length} KEY=VALUE lines (${shown}${rest > 0 ? `, +${rest} more` : ""})`
1569
- });
1570
- }
1571
- if (i === start) i++;
1572
- }
1573
- return out;
1574
- }
1575
- var ENTROPY_CANDIDATE = /[A-Za-z0-9+_-]{32,}/g;
1576
- var MIN_ENTROPY_BITS = 3.5;
1577
- var MAX_SAME_CASE_RUN = 8;
1578
- function scanHighEntropy(lines, named) {
1579
- const out = [];
1580
- for (let i = 0; i < lines.length; i++) {
1581
- const line = lines[i] ?? "";
1582
- ENTROPY_CANDIDATE.lastIndex = 0;
1583
- let m;
1584
- while ((m = ENTROPY_CANDIDATE.exec(line)) !== null) {
1585
- const token = m[0];
1586
- if (!looksRandom(token) || DOCS_PLACEHOLDER.test(token)) continue;
1587
- const span = [m.index, m.index + token.length];
1588
- if (named.some((f) => f.line === i + 1 && f.span[0] < span[1] && span[0] < f.span[1])) {
1589
- continue;
1590
- }
1591
- out.push({
1592
- check: "high-entropy-string",
1593
- severity: "warn",
1594
- line: i + 1,
1595
- span,
1596
- excerpt: maskKeeping(token, 4)
1597
- });
1598
- }
1599
- }
1600
- return out;
1601
- }
1602
- function looksRandom(token) {
1603
- if (!/[a-z]/.test(token) || !/[A-Z]/.test(token) || !/[0-9]/.test(token)) return false;
1604
- if (longestSameCaseRun(token) > MAX_SAME_CASE_RUN) return false;
1605
- return shannonBits(token) >= MIN_ENTROPY_BITS;
1606
- }
1607
- function longestSameCaseRun(token) {
1608
- let best = 0;
1609
- let run = 0;
1610
- let previous = "";
1611
- for (const ch of token) {
1612
- let kind = "";
1613
- if (/[a-z]/.test(ch)) kind = "lower";
1614
- else if (/[A-Z]/.test(ch)) kind = "upper";
1615
- if (kind === "") run = 0;
1616
- else run = kind === previous ? run + 1 : 1;
1617
- previous = kind;
1618
- if (run > best) best = run;
1619
- }
1620
- return best;
1621
- }
1622
- function shannonBits(token) {
1623
- const counts = /* @__PURE__ */ new Map();
1624
- for (const ch of token) counts.set(ch, (counts.get(ch) ?? 0) + 1);
1625
- let bits = 0;
1626
- for (const n of counts.values()) {
1627
- const p = n / token.length;
1628
- bits -= p * Math.log2(p);
1629
- }
1630
- return bits;
1631
- }
1632
- var EMITTED_CHECKS = {
1633
- "hex32-value": "raw-private-key"
1634
- };
1635
- function checksFor(scope) {
1636
- const ids = new Set(CORPUS.rules.filter((r) => r.scopes.includes(scope)).map((r) => r.id));
1637
- for (const [check, rule] of Object.entries(EMITTED_CHECKS)) if (ids.has(rule)) ids.add(check);
1638
- return ids;
1639
- }
1640
- var CHECKS = {
1641
- publish: checksFor("publish"),
1642
- team: checksFor("team")
1643
- };
1644
- var FENCE = /^(\s*)(`{3,}|~{3,})/;
1645
- function scanLongVerbatim(lines) {
1646
- const out = [];
1647
- let i = 0;
1648
- while (i < lines.length) {
1649
- const line = lines[i] ?? "";
1650
- const fence = FENCE.exec(line);
1651
- if (fence !== null) {
1652
- const marker = fence[2] ?? "```";
1653
- const start = i;
1654
- const body = [];
1655
- i++;
1656
- while (i < lines.length && !closesFence(lines[i] ?? "", marker)) {
1657
- body.push(lines[i] ?? "");
1658
- i++;
1659
- }
1660
- i++;
1661
- pushIfLong(out, body, start, line);
1662
- continue;
1663
- }
1664
- if (/^\s*>/.test(line)) {
1665
- const start = i;
1666
- const body = [];
1667
- while (i < lines.length && /^\s*>/.test(lines[i] ?? "")) {
1668
- body.push((lines[i] ?? "").replace(/^\s*>\s?/, ""));
1669
- i++;
1670
- }
1671
- pushIfLong(out, body, start, lines[start] ?? "");
1672
- continue;
1673
- }
1674
- i++;
1675
- }
1676
- return out;
1677
- }
1678
- function closesFence(line, marker) {
1679
- const m = FENCE.exec(line);
1680
- return m !== null && (m[2] ?? "").startsWith(marker);
1681
- }
1682
- function pushIfLong(out, body, startLine, firstLine) {
1683
- const text = body.join(" ").trim();
1684
- const words = text.length === 0 ? 0 : text.split(/\s+/).length;
1685
- if (words < LONG_QUOTE_WORDS) return;
1686
- out.push({
1687
- check: "long-verbatim-quote",
1688
- severity: "warn",
1689
- line: startLine + 1,
1690
- span: [0, firstLine.length],
1691
- excerpt: truncate(text, 60)
1692
- });
1693
- }
1694
- function dedupeAndSort(findings2) {
1695
- const seen = /* @__PURE__ */ new Set();
1696
- const unique = findings2.filter((f) => {
1697
- const key = `${f.check}:${f.line}:${f.span[0]}:${f.span[1]}`;
1698
- if (seen.has(key)) return false;
1699
- seen.add(key);
1700
- return true;
1701
- });
1702
- return unique.sort(
1703
- (a, b) => a.line - b.line || a.span[0] - b.span[0] || a.check.localeCompare(b.check)
1704
- );
1705
- }
1706
1031
 
1707
1032
  export {
1708
- findings,
1709
- mask,
1710
- EMITTED_CHECKS,
1711
- checksFor
1033
+ mask
1712
1034
  };
1713
- //# sourceMappingURL=chunk-IADZOXKN.js.map
1035
+ //# sourceMappingURL=chunk-7SLOTLO7.js.map