@akasecurity/cli 0.9.12 → 0.9.14

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 (217) hide show
  1. package/README.md +46 -3
  2. package/dist/cli.js +4008 -1567
  3. package/extension/background.js +1 -1
  4. package/extension/bridge.js +1 -0
  5. package/extension/content.js +1 -1
  6. package/extension/manifest.json +24 -1
  7. package/extension/popup.html +9 -0
  8. package/extension/popup.js +1 -1
  9. package/extension/tap.js +1 -0
  10. package/native-host/content-retention.js +35685 -0
  11. package/native-host/history-sync.js +36816 -0
  12. package/native-host/host.js +3346 -1155
  13. package/native-host/scan-worker.js +1963 -888
  14. package/native-host/sync.js +2517 -1018
  15. package/package.json +12 -12
  16. package/web-ui/package.json +3 -3
  17. package/web-ui/packages/dashboard-ui/package.json +5 -5
  18. package/web-ui/packages/plugin-sdk/package.json +2 -2
  19. package/web-ui/packages/schema/package.json +1 -1
  20. package/web-ui/packages/ui-kit/package.json +2 -2
  21. package/web-ui/web-ui/.next/BUILD_ID +1 -1
  22. package/web-ui/web-ui/.next/app-build-manifest.json +247 -247
  23. package/web-ui/web-ui/.next/app-path-routes-manifest.json +4 -4
  24. package/web-ui/web-ui/.next/build-manifest.json +14 -14
  25. package/web-ui/web-ui/.next/prerender-manifest.json +15 -15
  26. package/web-ui/web-ui/.next/required-server-files.json +1 -1
  27. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
  28. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  29. package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  30. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
  31. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
  32. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
  33. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
  34. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
  35. package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
  36. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
  37. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
  38. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
  39. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
  40. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
  41. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
  42. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +2 -2
  43. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
  44. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
  45. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
  46. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
  47. package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
  48. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
  49. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
  50. package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
  51. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
  52. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
  53. package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
  54. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +3 -3
  55. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
  56. package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
  57. package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
  58. package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
  59. package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  60. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
  61. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  62. package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  63. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
  64. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
  65. package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
  66. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
  67. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
  68. package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
  69. package/web-ui/web-ui/.next/server/app/_not-found/page.js +2 -2
  70. package/web-ui/web-ui/.next/server/app/_not-found/page.js.nft.json +1 -1
  71. package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  72. package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
  73. package/web-ui/web-ui/.next/server/app/_not-found.rsc +10 -10
  74. package/web-ui/web-ui/.next/server/app/icon.svg/route.js +1 -1
  75. package/web-ui/web-ui/.next/server/app/icon.svg/route.js.nft.json +1 -1
  76. package/web-ui/web-ui/.next/server/app/index.html +1 -1
  77. package/web-ui/web-ui/.next/server/app/index.rsc +10 -10
  78. package/web-ui/web-ui/.next/server/app/page.js +2 -2
  79. package/web-ui/web-ui/.next/server/app/page.js.nft.json +1 -1
  80. package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  81. package/web-ui/web-ui/.next/server/app-paths-manifest.json +4 -4
  82. package/web-ui/web-ui/.next/server/chunks/167.js +11 -0
  83. package/web-ui/web-ui/.next/server/chunks/197.js +12 -0
  84. package/web-ui/web-ui/.next/server/chunks/247.js +66 -0
  85. package/web-ui/web-ui/.next/server/chunks/259.js +22 -0
  86. package/web-ui/web-ui/.next/server/chunks/285.js +1 -0
  87. package/web-ui/web-ui/.next/server/chunks/293.js +1022 -0
  88. package/web-ui/web-ui/.next/server/chunks/498.js +1 -0
  89. package/web-ui/web-ui/.next/server/chunks/524.js +109 -0
  90. package/web-ui/web-ui/.next/server/chunks/618.js +1 -0
  91. package/web-ui/web-ui/.next/server/chunks/670.js +1 -0
  92. package/web-ui/web-ui/.next/server/chunks/74.js +1031 -0
  93. package/web-ui/web-ui/.next/server/chunks/807.js +6 -0
  94. package/web-ui/web-ui/.next/server/chunks/811.js +6 -0
  95. package/web-ui/web-ui/.next/server/chunks/97.js +1 -0
  96. package/web-ui/web-ui/.next/server/functions-config-manifest.json +6 -6
  97. package/web-ui/web-ui/.next/server/middleware-build-manifest.js +1 -1
  98. package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
  99. package/web-ui/web-ui/.next/server/middleware.js +2 -2
  100. package/web-ui/web-ui/.next/server/pages/404.html +1 -1
  101. package/web-ui/web-ui/.next/server/pages/500.html +1 -1
  102. package/web-ui/web-ui/.next/server/pages/_app.js +1 -1
  103. package/web-ui/web-ui/.next/server/pages/_app.js.nft.json +1 -1
  104. package/web-ui/web-ui/.next/server/pages/_document.js +1 -1
  105. package/web-ui/web-ui/.next/server/pages/_document.js.nft.json +1 -1
  106. package/web-ui/web-ui/.next/server/pages/_error.js +9 -9
  107. package/web-ui/web-ui/.next/server/pages/_error.js.nft.json +1 -1
  108. package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
  109. package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
  110. package/web-ui/web-ui/.next/static/{PMeePXfXsQ2xxrXppySG_ → 5Pl1KmhN7uMqXkPkq0ZmS}/_buildManifest.js +1 -1
  111. package/web-ui/web-ui/.next/static/chunks/333-837ec42ac57bd0f5.js +1 -0
  112. package/web-ui/web-ui/.next/static/chunks/423b6282-fc44d01f7ffd176d.js +1 -0
  113. package/web-ui/web-ui/.next/static/chunks/539-ca04468e745ed73a.js +1 -0
  114. package/web-ui/web-ui/.next/static/chunks/614-2c96a5e95ce63862.js +1 -0
  115. package/web-ui/web-ui/.next/static/chunks/639-6f64a434dce13266.js +1 -0
  116. package/web-ui/web-ui/.next/static/chunks/826-e806952dd7b636f8.js +55 -0
  117. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-dd5849a39c269cf4.js +1 -0
  118. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-5fc18420d8d5bf62.js +1 -0
  119. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-dd5849a39c269cf4.js +1 -0
  120. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-fe72214e54d52a14.js +1 -0
  121. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-dd5849a39c269cf4.js +1 -0
  122. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-47e4dd015f24c04d.js +1 -0
  123. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-be2032a4770a35bf.js +1 -0
  124. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-dd5849a39c269cf4.js +1 -0
  125. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-f90fbb03406e4383.js +1 -0
  126. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-dd5849a39c269cf4.js +1 -0
  127. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-dd5849a39c269cf4.js +1 -0
  128. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-0a1d6a3557b99750.js +1 -0
  129. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-dbf32c5303140e8c.js +1 -0
  130. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-dd5849a39c269cf4.js +1 -0
  131. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-cb1934547acde891.js +1 -0
  132. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-dd5849a39c269cf4.js +1 -0
  133. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-6688bc58741c7c7d.js +1 -0
  134. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-d357a1d54c653d14.js +1 -0
  135. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-dd5849a39c269cf4.js +1 -0
  136. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-bc95c7097cca0dfc.js +1 -0
  137. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-dd5849a39c269cf4.js +1 -0
  138. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-5bebd818c1bb3a79.js +1 -0
  139. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-dd5849a39c269cf4.js +1 -0
  140. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-42845dce0b734eeb.js +1 -0
  141. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-dd5849a39c269cf4.js +1 -0
  142. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-d3ce8a503e8ce592.js +1 -0
  143. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-dd5849a39c269cf4.js +1 -0
  144. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-802942c0a06fbe31.js +1 -0
  145. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-dd5849a39c269cf4.js +1 -0
  146. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-52c8cd3a2a09a067.js +1 -0
  147. package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-260d84f0d7697773.js +1 -0
  148. package/web-ui/web-ui/.next/static/chunks/app/layout-c64d57251ee073d5.js +1 -0
  149. package/web-ui/web-ui/.next/static/chunks/app/page-b7ea78b4203d219b.js +1 -0
  150. package/web-ui/web-ui/.next/static/chunks/framework-4a8a69f5ce633b25.js +1 -0
  151. package/web-ui/web-ui/.next/static/chunks/main-89a5d50418a9a7e3.js +1 -0
  152. package/web-ui/web-ui/.next/static/chunks/main-app-4a18e3117ef3af1e.js +1 -0
  153. package/web-ui/web-ui/.next/static/chunks/pages/_app-671d04cd06b05cac.js +1 -0
  154. package/web-ui/web-ui/.next/static/chunks/pages/_error-ae172b6a97f64258.js +1 -0
  155. package/web-ui/web-ui/.next/static/chunks/{webpack-f10501a57c4d919d.js → webpack-c0fb35a40828243e.js} +1 -1
  156. package/web-ui/web-ui/.next/static/css/616a1cc3e0d40480.css +2 -0
  157. package/web-ui/web-ui/dist/scan-worker.js +1963 -888
  158. package/web-ui/web-ui/package.json +7 -7
  159. package/web-ui/web-ui/.next/server/chunks/121.js +0 -1
  160. package/web-ui/web-ui/.next/server/chunks/19.js +0 -22
  161. package/web-ui/web-ui/.next/server/chunks/290.js +0 -6
  162. package/web-ui/web-ui/.next/server/chunks/475.js +0 -1
  163. package/web-ui/web-ui/.next/server/chunks/585.js +0 -12
  164. package/web-ui/web-ui/.next/server/chunks/589.js +0 -99
  165. package/web-ui/web-ui/.next/server/chunks/611.js +0 -1015
  166. package/web-ui/web-ui/.next/server/chunks/67.js +0 -6
  167. package/web-ui/web-ui/.next/server/chunks/7.js +0 -1
  168. package/web-ui/web-ui/.next/server/chunks/743.js +0 -11
  169. package/web-ui/web-ui/.next/server/chunks/816.js +0 -1
  170. package/web-ui/web-ui/.next/server/chunks/935.js +0 -61
  171. package/web-ui/web-ui/.next/server/chunks/968.js +0 -1006
  172. package/web-ui/web-ui/.next/static/chunks/288-2743815300ed0872.js +0 -1
  173. package/web-ui/web-ui/.next/static/chunks/399-6887e92996f64590.js +0 -1
  174. package/web-ui/web-ui/.next/static/chunks/526-f0156de7831566b3.js +0 -50
  175. package/web-ui/web-ui/.next/static/chunks/52b9c8c1-87132a73d61bdb69.js +0 -1
  176. package/web-ui/web-ui/.next/static/chunks/563-a96f29a2819589cb.js +0 -1
  177. package/web-ui/web-ui/.next/static/chunks/674-d8237c5d0faa4a53.js +0 -1
  178. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-5ae897a85d4509ca.js +0 -1
  179. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-a27c8937989448e4.js +0 -1
  180. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-5ae897a85d4509ca.js +0 -1
  181. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-2b805f9e1f995092.js +0 -1
  182. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-5ae897a85d4509ca.js +0 -1
  183. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-a87cfee370c4e0f4.js +0 -1
  184. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-190085728a856072.js +0 -1
  185. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-5ae897a85d4509ca.js +0 -1
  186. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-4e214491c7be8d43.js +0 -1
  187. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-5ae897a85d4509ca.js +0 -1
  188. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-5ae897a85d4509ca.js +0 -1
  189. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-c1bb992ee1f12566.js +0 -1
  190. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-f16ba40d88e414b1.js +0 -1
  191. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-5ae897a85d4509ca.js +0 -1
  192. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-59c76da638f22b0e.js +0 -1
  193. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-5ae897a85d4509ca.js +0 -1
  194. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-c37447caf89a86e1.js +0 -1
  195. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-cb3c8c7b6b33414c.js +0 -1
  196. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-5ae897a85d4509ca.js +0 -1
  197. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-ab639e48f60ad7ee.js +0 -1
  198. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-5ae897a85d4509ca.js +0 -1
  199. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-494614fccc8c62cc.js +0 -1
  200. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-5ae897a85d4509ca.js +0 -1
  201. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-a3095119b3e87341.js +0 -1
  202. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-5ae897a85d4509ca.js +0 -1
  203. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-469613d499e41093.js +0 -1
  204. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-5ae897a85d4509ca.js +0 -1
  205. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-5b32bd569c9569d9.js +0 -1
  206. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-5ae897a85d4509ca.js +0 -1
  207. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-3152ceb31f024b8d.js +0 -1
  208. package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-a0f1d816312dcb9c.js +0 -1
  209. package/web-ui/web-ui/.next/static/chunks/app/layout-d6718b04dff0ca9c.js +0 -1
  210. package/web-ui/web-ui/.next/static/chunks/app/page-9f976e619a11c1dd.js +0 -1
  211. package/web-ui/web-ui/.next/static/chunks/framework-78529e4152d251a3.js +0 -1
  212. package/web-ui/web-ui/.next/static/chunks/main-aef82d1ebf75b725.js +0 -1
  213. package/web-ui/web-ui/.next/static/chunks/main-app-ecdeb13a427413ee.js +0 -1
  214. package/web-ui/web-ui/.next/static/chunks/pages/_app-cb7c9f431bf725f7.js +0 -1
  215. package/web-ui/web-ui/.next/static/chunks/pages/_error-fae7cf4a2cfcee1b.js +0 -1
  216. package/web-ui/web-ui/.next/static/css/6e72259eccdf4435.css +0 -2
  217. /package/web-ui/web-ui/.next/static/{PMeePXfXsQ2xxrXppySG_ → 5Pl1KmhN7uMqXkPkq0ZmS}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{176:(e,t,n)=>{n.d(t,{TimeRangeSelect:()=>o});var s=n(2703),a=n(347),i=n(5149);function l(e){return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,s.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,s.jsx)("path",{d:"M4 9h16M8 3v4M16 3v4"})]})}function r(e){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,s.jsx)("path",{d:"m6 9 6 6 6-6"})})}function o(e){let{value:t,onChange:n}=e,o=(0,i.QT)(t);return(0,s.jsxs)(a.rI,{children:[(0,s.jsx)(a.ty,{asChild:!0,children:(0,s.jsxs)(a.$n,{variant:"outline",size:"md",children:[(0,s.jsx)(l,{"aria-hidden":!0,focusable:!1,className:"size-4 text-text-3"}),o,(0,s.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"})]})}),(0,s.jsx)(a.SQ,{align:"end",className:"w-44",children:(0,s.jsx)(a.Hr,{value:t,onValueChange:e=>{n(e)},children:i.hn.map(e=>(0,s.jsx)(a.Ht,{value:e.value,children:e.label},e.value))})})]})}},207:(e,t,n)=>{n.d(t,{AddExceptionForm:()=>r});var s=n(2703),a=n(347),i=n(6807),l=n(4621);function r(e){let{rules:t,onSubmit:n,busy:r,error:o}=e,[c,d]=(0,i.useState)(""),[x,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(null),[h,g]=(0,i.useState)(""),[f,j]=(0,i.useState)(""),v="permanent"===u,b=""!==c&&""!==x&&null!==u&&""!==h.trim()&&(!v||f===x);return(0,s.jsxs)("div",{className:"flex max-w-xl flex-col gap-4 rounded-xl border border-border bg-surface p-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Detection rule"}),(0,s.jsxs)(a.l6,{value:c,onValueChange:d,children:[(0,s.jsx)(a.bq,{children:(0,s.jsx)(a.yv,{placeholder:"Pick the rule this value matches"})}),(0,s.jsx)(a.gC,{children:t.map(e=>(0,s.jsx)(a.eb,{value:e.id,children:(0,s.jsx)("span",{className:"font-mono text-xs",children:e.id})},e.id))})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Value to pre-authorize"}),(0,s.jsx)(a.pd,{type:"password",autoComplete:"off",value:x,onChange:e=>{m(e.target.value)},placeholder:"Pasted once; stored only as a keyed fingerprint + masked preview",className:"font-mono"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Scope — pick one"}),(0,s.jsx)(l.ScopePicker,{value:u,onChange:p})]}),v&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Retype the value to confirm a permanent grant"}),(0,s.jsx)(a.pd,{type:"password",autoComplete:"off",value:f,onChange:e=>{j(e.target.value)},className:"font-mono"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Reason (required — the audit trail)"}),(0,s.jsx)(a.pd,{value:h,onChange:e=>{g(e.target.value)},placeholder:"Why this value may pass"})]}),o&&(0,s.jsx)("p",{className:"text-xs text-sev-critical-ink",children:o}),(0,s.jsx)("div",{children:(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!b||r,onClick:()=>{u&&n({ruleId:c,value:x,scope:u,reason:h.trim(),...v?{confirmation:f}:{}})},children:r?"Verifying…":"Grant exception"})})]})}},332:(e,t,n)=>{n.d(t,{PolicyDetailView:()=>m,PolicyListView:()=>x,PolicyStatsView:()=>c});var s=n(2703),a=n(347),i=n(8230),l=n(760),r=n(4975);function o(e){return void 0===e?"—":e.toLocaleString()}function c(e){let{stats:t,loading:n=!1,className:a}=e,i=[{icon:l.iB,value:o(null==t?void 0:t.policies),label:"Policies",tone:"primary"},{icon:l.Zu,value:o(null==t?void 0:t.builtin),label:"Built-in",tone:"neutral"},{icon:l.k3,value:o(null==t?void 0:t.custom),label:"Custom scripts",tone:"violet"},{icon:l.kp,value:o(null==t?void 0:t.detectionsGoverned),label:"Detections governed",tone:"ok"}];return(0,s.jsx)(r.s,{items:i,isLoading:n,className:a})}function d(e){let{policy:t,selected:n,onSelect:r}=e,{icon:o,tone:c}=(0,i.ES)(t.id),[d,x]=(0,a.vV)(c),m=t.usedByCount;return(0,s.jsxs)("button",{type:"button",onClick:r,"aria-pressed":n,className:(0,a.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg p-3 text-left transition-colors",n?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsx)("span",{className:"flex size-7.5 shrink-0 items-center justify-center rounded-lg [&_svg]:size-4",style:{background:x,color:d},children:(0,s.jsx)(o,{"aria-hidden":!0,focusable:!1})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,s.jsxs)("span",{className:"mt-px block text-xs text-text-3",children:[m," detection",1===m?"":"s"]})]}),"builtin"===t.kind&&(0,s.jsx)(l.XA,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0 text-text-3"})]})}function x(e){let{items:t,activeId:n,onSelect:i,loading:l=!1,error:r=null}=e;return(0,s.jsxs)(a.Zp,{className:"flex flex-col overflow-hidden p-2 shadow-sm",children:[(0,s.jsx)("div",{className:"mb-1 px-2.5 pb-1 pt-2 text-label font-semibold uppercase tracking-wider text-text-3",children:"Policies"}),(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto",children:r?(0,s.jsxs)("p",{className:"px-2.5 py-2 text-sm text-sev-critical-ink",children:["Error loading policies: ",r]}):l?(0,s.jsx)("p",{className:"px-2.5 py-2 text-sm text-text-3",children:"Loading policies…"}):0===t.length?(0,s.jsx)("p",{className:"px-2.5 py-2 text-sm text-text-3",children:"No policies yet."}):t.map(e=>(0,s.jsx)(d,{policy:e,selected:e.id===n,onSelect:()=>{i(e.id)}},e.id))})]})}function m(e){let{policy:t}=e,{icon:n,tone:r}=(0,i.ES)(t.id),[o,c]=(0,a.vV)(r),d="builtin"===t.kind,x=t.usedBy;return(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-4",children:[(0,s.jsx)("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-xl [&_svg]:size-5.5",style:{background:c,color:o},children:(0,s.jsx)(n,{"aria-hidden":!0,focusable:!1})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("h2",{className:"font-display text-xl font-semibold text-text",children:t.name}),d&&(0,s.jsx)(a.vw,{icon:(0,s.jsx)(l.XA,{"aria-hidden":!0,focusable:!1,className:"size-3"}),children:"Built-in"}),(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-xs font-semibold text-text-2",children:t.id})]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-3",children:d?"AKA \xb7 built-in \xb7 no configuration":"Custom policy"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-6 p-5",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface-2 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-sm leading-relaxed text-text",children:t.description}),d&&(0,s.jsxs)("p",{className:"mt-2 inline-flex items-center gap-1.5 text-xs text-text-3",children:[(0,s.jsx)(l.XA,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),"Built-in policy — behavior is fixed and can't be edited."]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2.5 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Applied by"}),(0,s.jsx)("span",{className:"rounded-full bg-surface-3 px-2 py-0.5 text-xs font-semibold text-text-2",children:x.length})]}),0===x.length?(0,s.jsx)("p",{className:"py-2 text-sm text-text-3",children:"No detections use this policy yet."}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(e=>(0,s.jsxs)(a.vw,{className:"h-7",dot:e.enabled?"var(--color-ok)":"var(--color-border-strong)",children:[e.name,(0,s.jsxs)("span",{className:"font-mono text-text-3",children:[e.ruleCount," rules"]})]},e.id))})]})]})]})}},347:(e,t,n)=>{n.d(t,{Ex:()=>u,$n:()=>j,Zp:()=>v,X9:()=>C,Wu:()=>Y,BT:()=>w,aR:()=>b,Lc:()=>y,AG:()=>k,ZB:()=>N,lG:()=>S,R4:()=>M,Cf:()=>A,rr:()=>R,Es:()=>L,c7:()=>z,L3:()=>O,rI:()=>E,hO:()=>$,SQ:()=>_,Hr:()=>P,Ht:()=>B,mB:()=>K,ty:()=>F,pd:()=>H,kI:()=>W,dK:()=>U,WA:()=>q,Eb:()=>G,D2:()=>Z,AM:()=>ee,hl:()=>en,Wv:()=>et,t0:()=>p,Iz:()=>ea,tR:()=>ei,l6:()=>er,gC:()=>em,eb:()=>eu,bq:()=>ex,yv:()=>eo,Pt:()=>h,cj:()=>eg,h:()=>ef,Qs:()=>eb,Fm:()=>ej,qp:()=>ev,EA:()=>ek,dO:()=>eN,cH:()=>o,id:()=>c,XI:()=>ew,BF:()=>eY,nA:()=>eA,nd:()=>eS,A0:()=>eC,Hj:()=>eI,tU:()=>eM,av:()=>eL,j7:()=>eO,Xi:()=>eR,vw:()=>eT,cn:()=>r,vV:()=>x});var s=n(2703),a=n(5733),i=n(2157);let l=(0,n(2453).zu)({extend:{classGroups:{"font-size":[{text:["ui","label"]}]}}});function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return l((0,i.$)(t))}let o={neutral:{fill:"bg-surface-3",text:"text-text-2"},critical:{fill:"bg-sev-critical-fill",text:"text-sev-critical-ink"},high:{fill:"bg-sev-high-fill",text:"text-sev-high-ink"},medium:{fill:"bg-sev-medium-fill",text:"text-sev-medium-ink"},low:{fill:"bg-sev-low-fill",text:"text-sev-low-ink"},ok:{fill:"bg-ok-fill",text:"text-ok-ink"},teal:{fill:"bg-teal-fill",text:"text-teal-ink"},violet:{fill:"bg-violet-fill",text:"text-violet-ink"},primary:{fill:"bg-primary-tint",text:"text-primary"}},c=Object.fromEntries(Object.entries(o).map(e=>{let[t,{fill:n,text:s}]=e;return[t,"".concat(n," ").concat(s)]}));function d(e){return"var(--color-".concat(e.replace(/^(?:text|bg)-/,""),")")}function x(e){let{fill:t,text:n}=o[e];return[d(n),d(t)]}let m=(0,a.F)("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{default:c.neutral,outline:"border border-border text-text-2",critical:c.critical,high:c.high,medium:c.medium,low:c.low,success:c.ok,teal:c.teal,primary:c.primary}},defaultVariants:{variant:"default"}});function u(e){let{variant:t,className:n,children:a}=e;return(0,s.jsx)("span",{className:r(m({variant:t}),n),children:a})}let p={critical:"bg-sev-critical",high:"bg-sev-high",medium:"bg-sev-medium",low:"bg-sev-low"};function h(e){let{severity:t}=e;return(0,s.jsxs)(u,{variant:t,className:"h-6",children:[(0,s.jsx)("span",{className:r("size-1.5 rounded-full",p[t])}),(0,s.jsx)("span",{className:"capitalize",children:t})]})}var g=n(8795);let f=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium transition-colors cursor-pointer disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{solid:"",outline:"border",ghost:"",link:""},tone:{primary:"",neutral:"",danger:""},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 text-sm",icon:"size-9"}},compoundVariants:[{variant:"solid",tone:"primary",class:"bg-primary-solid text-text-inv hover:bg-primary-hover"},{variant:"solid",tone:"neutral",class:"bg-surface-3 text-text hover:bg-border-strong"},{variant:"solid",tone:"danger",class:"bg-sev-critical-ink text-on-accent hover:bg-sev-critical-hover"},{variant:"outline",tone:"primary",class:"border-primary text-primary hover:bg-primary-tint"},{variant:"outline",tone:"neutral",class:"border-border bg-surface text-text hover:bg-surface-2"},{variant:"outline",tone:"danger",class:"border-sev-critical text-sev-critical-ink hover:bg-sev-critical-fill"},{variant:"ghost",tone:"primary",class:"text-primary hover:bg-primary-tint"},{variant:"ghost",tone:"neutral",class:"text-text-2 hover:bg-surface-2 hover:text-text"},{variant:"ghost",tone:"danger",class:"text-sev-critical-ink hover:bg-sev-critical-fill"},{variant:"link",class:"h-auto gap-1 rounded-sm p-0 align-baseline font-semibold underline-offset-4 [&_svg]:size-3.5"},{variant:"link",tone:"primary",class:"text-primary hover:underline"},{variant:"link",tone:"neutral",class:"text-text-2 hover:text-text hover:underline"},{variant:"link",tone:"danger",class:"text-sev-critical-ink hover:underline"}],defaultVariants:{variant:"solid",tone:"neutral",size:"md"}});function j(e){let{className:t,variant:n,tone:a,size:i,asChild:l=!1,type:o,...c}=e,d=l?g.DX:"button";return(0,s.jsx)(d,{className:r(f({variant:n,tone:a,size:i}),t),...l?{}:{type:null!=o?o:"button"},...c})}function v(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card",className:r("rounded-xl border border-border bg-surface",t),...n})}function b(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:r("flex items-center gap-3 px-5 pt-5",t),...n})}function k(e){var t;let{className:n,tone:a="neutral",...i}=e;return(0,s.jsx)("span",{"data-slot":"card-icon",className:r("flex size-7.5 shrink-0 items-center justify-center rounded-lg",null!=(t=Object.hasOwn(c,a)?c[a]:void 0)?t:c.neutral,n),...i})}function y(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-heading",className:r("min-w-0",t),...n})}function N(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:r("text-sm font-semibold text-text",t),...n})}function w(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:r("text-xs text-text-3",t),...n})}function C(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-action",className:r("ml-auto flex items-center",t),...n})}function Y(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:r("p-5",t),...n})}var I=n(985);let S=I.Root;function A(e){let{className:t,children:n,...a}=e;return(0,s.jsxs)(I.Portal,{children:[(0,s.jsx)(I.Overlay,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-50 bg-ink/40"}),(0,s.jsx)(I.Content,{"data-slot":"dialog-content",className:r("fixed left-1/2 top-1/2 z-50 flex max-h-[92vh] w-full max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-lg outline-none",t),...a,children:n})]})}function z(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:r("flex shrink-0 flex-col gap-1 border-b border-border px-5 py-4",t),...n})}function M(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"dialog-body",className:r("flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-5 py-4",t),...n})}function O(e){let{className:t,...n}=e;return(0,s.jsx)(I.Title,{"data-slot":"dialog-title",className:r("font-display text-base font-semibold text-text",t),...n})}function R(e){let{className:t,...n}=e;return(0,s.jsx)(I.Description,{"data-slot":"dialog-description",className:r("text-xs text-text-3",t),...n})}function L(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"dialog-footer",className:r("flex shrink-0 items-center gap-2.5 border-t border-border px-5 py-3.5",t),...n})}I.Trigger,I.Close;var T=n(9191);function D(e){let{className:t}=e;return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,s.jsx)("path",{d:"M13 4.5 6.5 11 3 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}let E=T.Root,F=T.Trigger;T.Group;let P=T.RadioGroup,V="flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-1.5 text-sm text-text-2 outline-none focus:bg-surface-2 focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50";function _(e){let{className:t,sideOffset:n=6,...a}=e;return(0,s.jsx)(T.Portal,{children:(0,s.jsx)(T.Content,{sideOffset:n,className:r("z-50 min-w-32 overflow-hidden rounded-lg border border-border bg-surface p-1 shadow-lg",t),...a})})}function B(e){let{className:t,children:n,...a}=e;return(0,s.jsxs)(T.RadioItem,{className:r(V,"data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...a,children:[(0,s.jsx)("span",{className:"flex-1",children:n}),(0,s.jsx)(T.ItemIndicator,{children:(0,s.jsx)(D,{className:"size-4 text-primary"})})]})}function $(e){let{className:t,children:n,...a}=e;return(0,s.jsxs)(T.CheckboxItem,{className:r(V,"group data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...a,children:[(0,s.jsx)("span",{className:"grid size-4 shrink-0 place-items-center rounded-[5px] border border-border-strong text-text-inv transition-colors group-data-[state=checked]:border-primary-solid group-data-[state=checked]:bg-primary-solid",children:(0,s.jsx)(T.ItemIndicator,{children:(0,s.jsx)(D,{className:"size-3"})})}),(0,s.jsx)("span",{className:"flex-1",children:n})]})}function K(e){let{className:t,...n}=e;return(0,s.jsx)(T.Separator,{className:r("-mx-1 my-1 h-px bg-border",t),...n})}function H(e){let{className:t,type:n="text",...a}=e;return(0,s.jsx)("input",{type:n,"data-slot":"input",className:r("h-9 w-full rounded-lg border border-border-field bg-surface-2 px-3 text-sm text-text","truncate placeholder:text-text-3 transition-colors","focus:border-primary focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40","disabled:cursor-not-allowed disabled:opacity-50",t),...a})}function W(e){let{value:t,max:n,color:a,height:i=8,className:l,style:o,...c}=e,d=Math.min(n,Math.max(0,t)),x=n>0?d/n*100:0;return(0,s.jsx)("span",{"data-slot":"meter",role:"meter","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":n,className:r("block flex-1 overflow-hidden rounded-full bg-surface-3",l),style:{height:i,...o},...c,children:(0,s.jsx)("span",{className:"block h-full rounded-full",style:{width:"".concat(String(x),"%"),background:a}})})}function U(e){let{className:t,...n}=e;return(0,s.jsx)("nav",{"data-slot":"pagination",role:"navigation","aria-label":"Pagination",className:r("flex items-center justify-center gap-3 py-4",t),...n})}function G(e){let{children:t,...n}=e;return(0,s.jsxs)(j,{"data-slot":"pagination-previous",variant:"outline",tone:"neutral",size:"sm",...n,children:[(0,s.jsx)(J,{"aria-hidden":!0,focusable:!1}),null!=t?t:"Previous"]})}function q(e){let{loading:t=!1,children:n,disabled:a=!1,...i}=e;return(0,s.jsxs)(j,{"data-slot":"pagination-next",variant:"outline",tone:"neutral",size:"sm",disabled:a||t,...i,children:[null!=n?n:t?"Loading…":"Next",t?(0,s.jsxs)("svg",{"aria-hidden":!0,focusable:!1,viewBox:"0 0 16 16",className:"size-3.5 animate-spin",fill:"none",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):(0,s.jsx)(X,{"aria-hidden":!0,focusable:!1})]})}function Z(e){let{className:t,...n}=e;return(0,s.jsx)("p",{"data-slot":"pagination-status","aria-live":"polite",className:r("text-xs text-text-3",t),...n})}function J(e){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,s.jsx)("path",{d:"m15 6-6 6 6 6"})})}function X(e){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,s.jsx)("path",{d:"m9 6 6 6-6 6"})})}var Q=n(6751);let ee=Q.Root,et=Q.Trigger;function en(e){let{className:t,align:n="start",sideOffset:a=6,collisionPadding:i=8,...l}=e;return(0,s.jsx)(Q.Portal,{children:(0,s.jsx)(Q.Content,{align:n,sideOffset:a,collisionPadding:i,className:r("z-50 max-h-(--radix-popover-content-available-height) min-w-32 overflow-y-auto rounded-lg border border-border bg-surface p-1 shadow-lg outline-none",t),...l})})}Q.Close,Q.Anchor;var es=n(3329);function ea(e){let{className:t,...n}=e;return(0,s.jsx)(es.Root,{type:"single","data-slot":"segmented-control",className:r("inline-flex items-center gap-0.5 rounded-lg border border-border bg-surface-2 p-0.5",t),...n})}function ei(e){let{className:t,...n}=e;return(0,s.jsx)(es.Item,{"data-slot":"segmented-control-item",className:r("inline-flex flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-xs font-semibold text-text-3 transition-colors cursor-pointer","hover:text-text-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40","data-[state=on]:bg-surface data-[state=on]:text-text data-[state=on]:shadow-sm","[&_svg]:size-4 [&_svg]:shrink-0",t),...n})}var el=n(8788);let er=el.Root;el.Group;let eo=el.Value;function ec(e){let{className:t}=e;return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,s.jsx)("path",{d:"m4 6 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function ed(e){let{className:t}=e;return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,s.jsx)("path",{d:"M13 4.5 6.5 11 3 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ex(e){let{className:t,children:n,...a}=e;return(0,s.jsxs)(el.Trigger,{"data-slot":"select-trigger",className:r("flex h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-border-field bg-surface-2 px-3 text-sm text-text","transition-colors focus:border-primary focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40","data-[placeholder]:text-text-3 disabled:cursor-not-allowed disabled:opacity-50","[&>span]:truncate",t),...a,children:[n,(0,s.jsx)(el.Icon,{asChild:!0,children:(0,s.jsx)(ec,{className:"size-4 shrink-0 text-text-3"})})]})}function em(e){let{className:t,children:n,position:a="popper",sideOffset:i=6,...l}=e;return(0,s.jsx)(el.Portal,{children:(0,s.jsxs)(el.Content,{"data-slot":"select-content",position:a,sideOffset:i,className:r("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 overflow-hidden rounded-lg border border-border bg-surface shadow-lg","popper"===a&&"w-(--radix-select-trigger-width)",t),...l,children:[(0,s.jsx)(ep,{}),(0,s.jsx)(el.Viewport,{className:"p-1",children:n}),(0,s.jsx)(eh,{})]})})}function eu(e){let{className:t,children:n,...a}=e;return(0,s.jsxs)(el.Item,{"data-slot":"select-item",className:r("relative flex w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2.5 pr-8 text-sm text-text-2 outline-none","hover:bg-surface-2 hover:text-text data-[highlighted]:bg-surface-2 data-[highlighted]:text-text","data-[state=checked]:font-semibold data-[state=checked]:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[(0,s.jsx)(el.ItemText,{children:n}),(0,s.jsx)("span",{className:"absolute right-2.5 flex items-center",children:(0,s.jsx)(el.ItemIndicator,{children:(0,s.jsx)(ed,{className:"size-4 text-primary"})})})]})}function ep(e){let{className:t,...n}=e;return(0,s.jsx)(el.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:r("flex cursor-default items-center justify-center py-1 text-text-3",t),...n,children:(0,s.jsx)(ec,{className:"size-4 rotate-180"})})}function eh(e){let{className:t,...n}=e;return(0,s.jsx)(el.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:r("flex cursor-default items-center justify-center py-1 text-text-3",t),...n,children:(0,s.jsx)(ec,{className:"size-4"})})}let eg=I.Root;function ef(e){let{className:t,children:n,side:a="right",...i}=e;return(0,s.jsxs)(I.Portal,{children:[(0,s.jsx)(I.Overlay,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-40 bg-ink/40 backdrop-blur-[1px]"}),(0,s.jsxs)(I.Content,{"data-slot":"sheet-content",className:r("fixed inset-y-0 z-50 flex h-full w-full max-w-md flex-col gap-4 overflow-y-auto border-border bg-surface p-6 shadow-lg outline-none","left"===a?"left-0 border-r":"right-0 border-l",t),...i,children:[n,(0,s.jsxs)(I.Close,{className:"absolute right-4 top-4 cursor-pointer rounded-md text-text-3 transition-colors hover:bg-surface-2 hover:text-text size-8 grid place-content-center",children:[(0,s.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:(0,s.jsx)("path",{d:"M6 6 18 18M18 6 6 18"})}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function ej(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1 pr-8",t),...n})}function ev(e){let{className:t,...n}=e;return(0,s.jsx)(I.Title,{"data-slot":"sheet-title",className:r("font-display text-lg font-semibold text-text",t),...n})}function eb(e){let{className:t,...n}=e;return(0,s.jsx)(I.Description,{"data-slot":"sheet-description",className:r("text-sm text-text-2",t),...n})}function ek(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:r("animate-pulse rounded-md bg-surface-3",t),...n})}I.Trigger,I.Close;var ey=n(7314);function eN(e){let{className:t,...n}=e;return(0,s.jsx)(ey.Root,{"data-slot":"switch",className:r("peer inline-flex h-5.5 w-9.5 shrink-0 cursor-pointer items-center rounded-full p-0.5 transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-ok data-[state=unchecked]:bg-border-strong",t),...n,children:(0,s.jsx)(ey.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4.5 rounded-full bg-switch-thumb shadow-sm transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"})})}function ew(e){let{className:t,...n}=e;return(0,s.jsx)("div",{className:"w-full overflow-x-auto",children:(0,s.jsx)("table",{"data-slot":"table",className:r("w-full caption-bottom border-collapse text-sm",t),...n})})}function eC(e){let{className:t,...n}=e;return(0,s.jsx)("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b [&_tr]:border-border",t),...n})}function eY(e){let{className:t,...n}=e;return(0,s.jsx)("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",t),...n})}function eI(e){let{className:t,onClick:n,onKeyDown:a,tabIndex:i,role:l,...o}=e,c="function"==typeof n;return(0,s.jsx)("tr",{"data-slot":"table-row",role:c?null!=l?l:"button":l,tabIndex:c?null!=i?i:0:i,onClick:n,onKeyDown:c?function(e){null==a||a(e),c&&!e.defaultPrevented&&e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),n(e))}:a,className:r("border-b border-hairline transition-colors",c&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40",t),...o})}function eS(e){let{scope:t="col",className:n,...a}=e;return(0,s.jsx)("th",{"data-slot":"table-head",scope:t,className:r("px-3 pb-3 text-left align-middle text-label font-semibold uppercase tracking-wider text-text-3",n),...a})}function eA(e){let{className:t,...n}=e;return(0,s.jsx)("td",{"data-slot":"table-cell",className:r("px-3 py-2 align-middle",t),...n})}var ez=n(7888);let eM=ez.Root;function eO(e){let{className:t,...n}=e;return(0,s.jsx)(ez.List,{"data-slot":"tabs-list",className:r("inline-flex items-center gap-0.5 rounded-lg border border-border bg-surface-2 p-0.5",t),...n})}function eR(e){let{className:t,...n}=e;return(0,s.jsx)(ez.Trigger,{"data-slot":"tabs-trigger",className:r("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-xs font-semibold text-text-3 transition-colors cursor-pointer","hover:text-text-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40","data-[state=active]:bg-surface data-[state=active]:text-text data-[state=active]:shadow-sm","[&_svg]:size-4 [&_svg]:shrink-0",t),...n})}function eL(e){let{className:t,...n}=e;return(0,s.jsx)(ez.Content,{"data-slot":"tabs-content",className:r("focus-visible:outline-none",t),...n})}function eT(e){let{children:t,icon:n,dot:a,className:i}=e;return(0,s.jsxs)("span",{className:r("inline-flex h-6 items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-surface px-2 text-label font-medium text-text-2",i),children:[a&&(0,s.jsx)("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:a}}),n,t]})}},447:(e,t,n)=>{n.d(t,{FindingLocationsListView:()=>c});var s=n(2703),a=n(347),i=n(9020),l=n(1759),r=n(9455);function o(e){let{location:t,sel:n,onClick:o,renderedAt:c}=e,d=t.ruleIds.slice(0,3),x=t.ruleIds.length-d.length,m=void 0===t.status?null:(0,r.Dx)(t.status);return(0,s.jsxs)("button",{type:"button",onClick:o,"aria-current":n?"true":void 0,className:(0,a.cn)("w-full cursor-pointer rounded-lg px-3 py-2.5 text-left transition-colors",n?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(a.Pt,{severity:t.maxSeverity}),(0,s.jsx)("span",{className:(0,a.cn)("min-w-0 flex-1 text-xs break-words [word-break:break-word]",t.repo?"text-text-3":"italic text-text-3"),children:t.repo||"No repository recorded"}),m&&(0,s.jsx)(a.Ex,{variant:m.badge,className:"h-5 shrink-0",children:m.label})]}),(0,s.jsx)("div",{className:(0,a.cn)("mt-1 text-sm font-semibold break-words [word-break:break-word]",t.file?"text-text":"italic text-text-3"),children:t.file||"No file recorded"}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5",children:[(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",title:t.ruleIds.join("\n"),children:[d.map(e=>(0,s.jsx)("span",{className:"max-w-full truncate rounded border border-border px-1.5 py-px text-label text-text-3",children:e},e)),x>0&&(0,s.jsxs)("span",{className:"shrink-0 text-label text-text-3",children:["+",x," more"]})]}),(0,s.jsx)("span",{className:"shrink-0 text-xs font-semibold tabular-nums text-text-2",title:"".concat(i.j.format(t.instanceCount)," ").concat(1===t.instanceCount?"finding":"findings"),children:(0,i.R)(t.instanceCount)}),(0,s.jsx)("span",{className:"shrink-0 text-xs text-text-3",children:(0,l.g)(t.latestDetectedAt,c)})]})]})}function c(e){let{locations:t,activeId:n,onSelect:i,renderedAt:l,hasNextPage:r=!1,hasPreviousPage:c=!1,onNextPage:d,onPreviousPage:x,loadingNextPage:m=!1,pageStart:u,total:p,emptyState:h}=e;return(0,s.jsxs)(a.Zp,{className:"flex h-full flex-col overflow-hidden shadow-sm",children:[(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:0===t.length?(0,s.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:null!=h?h:"No locations match these filters."}):t.map(e=>(0,s.jsx)(o,{location:e,sel:e.id===n,renderedAt:l,onClick:()=>{i(e)}},e.id))}),d&&(c||r||t.length>0)&&(0,s.jsxs)(a.dK,{children:[(0,s.jsx)(a.Eb,{disabled:!c||m,onClick:x}),(0,s.jsx)(a.D2,{children:0===t.length||void 0===p||void 0===u?"".concat(String(t.length)," shown"):"".concat(String(u),"–").concat(String(u+t.length-1)," of ").concat(String(p)," locations")}),(0,s.jsx)(a.WA,{disabled:!r||m,loading:m,onClick:d})]})]})}},723:(e,t,n)=>{n.d(t,{PWo:()=>eD,HUb:()=>na,spO:()=>n1,tLs:()=>F,V0H:()=>ns,MhX:()=>nq,fhc:()=>nc,F$B:()=>nH,xdw:()=>T,ap_:()=>R,UKt:()=>L,T2I:()=>nu,lgf:()=>nK,kqf:()=>nC,O2m:()=>nZ,bkE:()=>nB,EL9:()=>n_,qEQ:()=>t5,DLF:()=>nP,hds:()=>nR,Ly$:()=>nJ,y6l:()=>t4});var s=n(7390);let a=s.Ik({thresholdInputTokens:s.ai().int().positive(),input:s.ai().nonnegative().nullable(),output:s.ai().nonnegative().nullable()});function i(e,t,n){return Object.freeze({input:e,output:t,longContext:null,cacheWrite5m:1.25*e,cacheWrite1h:2*e,cacheRead:n,webSearch:.01})}function l(e,t){var n;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.freeze({input:e,output:t,longContext:void 0===s.longContext?null:Object.freeze(s.longContext),cacheWrite5m:null,cacheWrite1h:null,cacheRead:null!=(n=s.cacheRead)?n:null,webSearch:null})}s.Ik({input:s.ai().nonnegative(),output:s.ai().nonnegative(),longContext:a.nullable(),cacheWrite5m:s.ai().nonnegative().nullable(),cacheWrite1h:s.ai().nonnegative().nullable(),cacheRead:s.ai().nonnegative().nullable(),webSearch:s.ai().nonnegative().nullable()});let r=Object.freeze({input:0,output:0,longContext:null,cacheWrite5m:0,cacheWrite1h:0,cacheRead:0,webSearch:0});s.k5(["anthropic","openai","google","meta","mistral","deepseek","alibaba","xai","amazon","cohere","unknown"]),s.k5(["anthropic","openai","google-ai","mistral","deepseek","xai","cohere","bedrock","vertex","azure","foundry","together","fireworks","groq","openrouter","ollama","local"]),s.k5(["api","gateway","local"]);let o=new Map([["anthropic","api"],["openai","api"],["google-ai","api"],["mistral","api"],["deepseek","api"],["xai","api"],["cohere","api"],["bedrock","api"],["vertex","api"],["azure","api"],["foundry","api"],["together","gateway"],["fireworks","gateway"],["groq","gateway"],["openrouter","gateway"],["ollama","local"],["local","local"]]);function c(e){var t;return null!=(t=o.get(e))?t:"api"}let d=new Map([["anthropic","anthropic"],["openai","openai"],["google","google-ai"],["mistral","mistral"],["deepseek","deepseek"],["xai","xai"],["cohere","cohere"]]),x=Object.freeze(["anthropic","amazon","meta","mistral","deepseek","qwen","cohere","ai21","writer","luma","stability"]),m=Object.freeze(["us","eu","apac","au","jp","global"]);class u{model(e,t){var n,s,a,i,l,o,x,m,u,p,h,g,f,j,v,b,k,y,N,w,C,Y;let I=null!=(s=null!=(n=t.family)?n:this.defaults.family)?s:{id:e,name:t.name},S=!1===t.firstParty?null:(w=this.vendor,null!=(C=d.get(w))?C:null),A=null!=(i=null!=(a=t.openWeights)?a:this.defaults.openWeights)&&i,z=null!=(o=null!=(l=t.region)?l:this.defaults.region)?o:null,M=null!=(m=null!=(x=t.retention)?x:this.defaults.retention)?m:"unknown",O=new Map;for(let e of(null!==S&&O.set(S,Object.freeze({platform:S,hosting:c(S),firstParty:!0,price:null!=(u=t.price)?u:null,retention:M,region:z})),null!=(p=t.on)?p:[])){let{platform:n,price:s,retention:a,region:i}="string"==typeof e?{platform:e}:e,l=(Y=this.vendor,d.get(Y)===n),o=c(n),x="local"===o;O.set(n,Object.freeze({platform:n,hosting:o,firstParty:l,price:null!=s?s:x?r:l&&null!=(h=t.price)?h:null,retention:null!=a?a:x?"on_infrastructure":l?M:"unknown",region:void 0===i?l?z:null:i}))}let R=null!=(f=null!=(g=t.defaultHosting)?g:this.defaults.defaultHosting)?f:null===S?"gateway":c(S);if(void 0!==t.price&&![...O.values()].some(e=>e.price===t.price))throw Error("".concat(e,": a first-party price was declared but no platform can carry it — ")+"vendor '".concat(this.vendor,"' has no first-party endpoint. Price the serving ")+"platform explicitly via the object form of `on`.");let L={id:e,vendor:this.vendor,displayName:t.name,familyId:I.id,familyName:I.name,capability:null!=(j=t.capability)?j:null,contextWindow:null!=(v=t.ctx)?v:null,maxOutputTokens:null!=(b=t.maxOut)?b:null,openWeights:A,aliases:Object.freeze([...null!=(k=t.aliases)?k:[]]),training:null!=(y=this.defaults.training)?y:null,platforms:O,defaultHosting:R,seen:null!=(N=t.seen)?N:"managed"};return Object.freeze(L),Object.freeze(L.aliases),this.entries.push(L),L}models(){return this.entries}constructor(e,t={}){this.entries=[],this.vendor=e,this.defaults=t}}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new u(e,t)}RegExp("^(?:".concat(m.join("|"),")\\."),"u"),RegExp("^(?:".concat(x.join("|"),")\\."),"u"),RegExp("^(?:".concat(x.join("|"),")/"),"iu");let h=p("anthropic",{family:{id:"claude",name:"Claude"},region:"us",retention:"zero_retention",training:{apiDefault:"no",consumerDefault:"no",consumerControl:"opt-in",source:"https://privacy.claude.com/en/articles/7996868-is-my-data-used-for-model-training"}}),g=["bedrock","vertex","foundry"];h.model("claude-fable-5-1",{name:"Claude Fable 5.1",ctx:1e6,maxOut:128e3,capability:"reasoning",price:i(10,50,.25),on:[...g]}),h.model("claude-fable-5",{name:"Claude Fable 5",capability:"reasoning",price:i(10,50,1),on:[...g]}),h.model("claude-opus-5",{name:"Claude Opus 5",ctx:1e6,maxOut:128e3,capability:"reasoning",price:i(5,25,.5),on:[...g]}),h.model("claude-opus-4-8",{name:"Claude Opus 4.8",capability:"reasoning",price:i(5,25,.5),on:[...g]}),h.model("claude-opus-4-7",{name:"Claude Opus 4.7",capability:"reasoning",price:i(5,25,.5),on:[...g]}),h.model("claude-opus-4-6",{name:"Claude Opus 4.6",capability:"reasoning",price:i(5,25,.5),on:[...g]}),h.model("claude-opus-4-5",{name:"Claude Opus 4.5",capability:"reasoning",price:i(5,25,.5),on:[...g]}),h.model("claude-opus-4-1",{name:"Claude Opus 4.1",capability:"reasoning",price:i(15,75,1.5),on:[...g]}),h.model("claude-sonnet-5",{name:"Claude Sonnet 5",ctx:1e6,maxOut:128e3,capability:"reasoning",price:i(2,10,.2),on:[...g]}),h.model("claude-sonnet-4-6",{name:"Claude Sonnet 4.6",capability:"reasoning",price:i(3,15,.3),on:[...g]}),h.model("claude-sonnet-4-5",{name:"Claude Sonnet 4.5",capability:"reasoning",price:i(3,15,.3),on:[...g]}),h.model("claude-haiku-4-5",{name:"Claude Haiku 4.5",ctx:2e5,maxOut:64e3,capability:null,price:i(1,5,.1),aliases:["claude-haiku-4-5-20251001"],on:[...g]}),h.model("claude-sonnet-3-7",{name:"Claude Sonnet 3.7",on:[...g]});let f={thresholdInputTokens:272e3,input:null,output:null},j=p("openai",{family:{id:"gpt",name:"GPT"},region:"us",retention:"configurable",training:{apiDefault:"no",consumerDefault:"yes",consumerControl:"opt-out",source:"https://developers.openai.com/api/docs/guides/your-data"}}),v=["azure","foundry"];j.model("gpt-5.6-sol",{name:"GPT-5.6 Sol",ctx:105e4,maxOut:128e3,capability:"reasoning",price:l(4,20,{cacheRead:.4,longContext:f}),on:[...v]}),j.model("gpt-5.6-terra",{name:"GPT-5.6 Terra",ctx:105e4,maxOut:128e3,capability:"reasoning",price:l(2,12,{cacheRead:.2,longContext:f}),on:[...v]}),j.model("gpt-5.6-luna",{name:"GPT-5.6 Luna",ctx:105e4,maxOut:128e3,capability:null,price:l(.2,1.2,{cacheRead:.02,longContext:f}),on:[...v]}),j.model("gpt-5.5",{name:"GPT-5.5",ctx:105e4,maxOut:128e3,capability:"reasoning",price:l(5,30,{cacheRead:.5,longContext:f}),on:[...v]}),j.model("gpt-5.4",{name:"GPT-5.4",ctx:105e4,maxOut:128e3,capability:"reasoning",price:l(2.5,15,{cacheRead:.25,longContext:f}),on:[...v]}),j.model("gpt-5.4-mini",{name:"GPT-5.4 mini",ctx:4e5,maxOut:128e3,capability:null,price:l(.75,4.5,{cacheRead:.075}),on:[...v]}),j.model("gpt-5.4-nano",{name:"GPT-5.4 nano",ctx:4e5,maxOut:128e3,capability:null,price:l(.2,1.25,{cacheRead:.02}),on:[...v]}),j.model("gpt-5.3-codex",{name:"GPT-5.3 Codex",ctx:4e5,maxOut:128e3,capability:"code",price:l(1.75,14,{cacheRead:.175}),on:[...v]}),j.model("gpt-5.1",{name:"GPT-5.1",ctx:4e5,maxOut:128e3,capability:"reasoning",price:l(1.25,10,{cacheRead:.125}),on:[...v]}),j.model("gpt-5",{name:"GPT-5",ctx:4e5,maxOut:128e3,capability:"reasoning",price:l(1.25,10,{cacheRead:.125}),on:[...v]}),j.model("gpt-5-mini",{name:"GPT-5 mini",ctx:4e5,capability:null,price:l(.25,2,{cacheRead:.025}),on:[...v]}),j.model("gpt-5-nano",{name:"GPT-5 nano",ctx:4e5,maxOut:128e3,capability:null,price:l(.05,.4,{cacheRead:.005}),on:[...v]}),j.model("gpt-4.1",{name:"GPT-4.1",price:l(2,8,{cacheRead:.5}),on:[...v]}),j.model("gpt-4o",{name:"GPT-4o",price:l(2.5,10,{cacheRead:1.25}),on:[...v]}),j.model("gpt-4o-mini",{name:"GPT-4o mini",price:l(.15,.6,{cacheRead:.075}),on:[...v]}),j.model("gpt-4-turbo",{name:"GPT-4 Turbo",seen:"discovered",price:l(10,30),aliases:["gpt-4-turbo-2024-04-09"],on:[...v]}),j.model("o3",{name:"o3",capability:"reasoning",price:l(2,8,{cacheRead:.5}),on:[...v]}),j.model("gpt-oss-120b",{name:"GPT-OSS 120B",openWeights:!0,firstParty:!1,retention:"unknown",defaultHosting:"local",on:["together","fireworks","groq","openrouter","bedrock","ollama","local"]}),j.model("gpt-oss-20b",{name:"GPT-OSS 20B",openWeights:!0,firstParty:!1,retention:"unknown",defaultHosting:"local",on:["together","fireworks","groq","openrouter","ollama","local"]});let b=p("google",{family:{id:"gemini",name:"Gemini"},region:"us",retention:"configurable",training:{apiDefault:"no",consumerDefault:"yes",consumerControl:"none",source:"https://ai.google.dev/gemini-api/terms"}});b.model("gemini-3.7-flash",{name:"Gemini 3.7 Flash",capability:null,price:l(.75,3.75),on:["vertex"]}),b.model("gemini-3.6-flash",{name:"Gemini 3.6 Flash",capability:null,price:l(.75,3.75),on:["vertex"]}),b.model("gemini-3.5-flash",{name:"Gemini 3.5 Flash",capability:null,price:l(1.5,9),on:["vertex"]}),b.model("gemini-3.5-flash-lite",{name:"Gemini 3.5 Flash Lite",capability:null,price:l(.3,2.5),on:["vertex"]}),b.model("gemini-3.1-pro-preview",{name:"Gemini 3.1 Pro Preview",capability:"reasoning",price:l(2,12,{longContext:{thresholdInputTokens:2e5,input:4,output:18}}),on:["vertex"]}),b.model("gemini-2.5-pro",{name:"Gemini 2.5 Pro",capability:"reasoning",price:l(1.25,10,{longContext:{thresholdInputTokens:2e5,input:2.5,output:15}}),on:["vertex"]}),b.model("gemini-2.5-flash",{name:"Gemini 2.5 Flash",capability:null,price:l(.3,2.5),on:["vertex"]}),b.model("gemini-2.5-flash-lite",{name:"Gemini 2.5 Flash Lite",capability:null,price:l(.1,.4),on:["vertex"]}),b.model("gemini-1-5-pro",{name:"Gemini 1.5 Pro",on:["vertex"]}),b.model("gemini-1-5-flash",{name:"Gemini 1.5 Flash",on:["vertex"]});let k=p("xai",{family:{id:"grok",name:"Grok"},region:"us",retention:"configurable",training:{apiDefault:"no",consumerDefault:"unknown",consumerControl:"unknown",source:"https://docs.x.ai/developers/faq/security"}});k.model("grok-4.6",{name:"Grok 4.6",ctx:5e5,capability:"reasoning",price:l(2,6,{cacheRead:.5,longContext:{thresholdInputTokens:2e5,input:4,output:12}}),on:["bedrock"]}),k.model("grok-4.5",{name:"Grok 4.5",ctx:5e5,capability:"reasoning",price:l(2,6,{cacheRead:.3,longContext:{thresholdInputTokens:2e5,input:4,output:12}})}),k.model("grok-4.3",{name:"Grok 4.3",ctx:1e6,capability:"reasoning",price:l(1.25,2.5,{cacheRead:.2,longContext:{thresholdInputTokens:2e5,input:2.5,output:5}}),on:["bedrock"]}),k.model("grok-build-0.1",{name:"Grok Build 0.1",ctx:256e3,capability:"code",price:l(1,2,{cacheRead:.2,longContext:{thresholdInputTokens:2e5,input:2,output:4}})});let y=p("deepseek",{family:{id:"deepseek",name:"DeepSeek"},region:"cn",retention:"configurable",training:{apiDefault:"yes",consumerDefault:"yes",consumerControl:"opt-out",source:"https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"}});y.model("deepseek-v4-flash",{name:"DeepSeek V4 Flash",ctx:1e6,capability:null,price:l(.44,1.32,{cacheRead:.014}),on:["bedrock","together","fireworks","openrouter","ollama","local"]}),y.model("deepseek-v4-pro",{name:"DeepSeek V4 Pro",ctx:1e6,capability:"reasoning",price:l(1.32,3.96,{cacheRead:.044}),on:["bedrock","together","fireworks","openrouter"]}),y.model("deepseek-r1",{name:"DeepSeek R1",seen:"discovered",capability:"reasoning",openWeights:!0,defaultHosting:"local",on:["bedrock","together","fireworks","openrouter","ollama","local"]});let N=p("cohere",{family:{id:"command",name:"Command"},region:"us",retention:"configurable",training:{apiDefault:"unknown",consumerDefault:"unknown",consumerControl:"opt-out",source:"https://cohere.com/security"}});N.model("command-a-plus-05-2026",{name:"Command A+",ctx:128e3,maxOut:64e3,on:["bedrock"]}),N.model("command-a-03-2025",{name:"Command A",ctx:256e3,maxOut:8e3,on:["bedrock"]}),N.model("command-a-reasoning-08-2025",{name:"Command A Reasoning",ctx:256e3,maxOut:32e3,capability:"reasoning"}),N.model("command-r-plus-08-2024",{name:"Command R+",ctx:128e3,maxOut:4e3,price:l(2.5,10),aliases:["command-r-plus"],on:["bedrock"]});let w=p("meta",{family:{id:"llama",name:"Llama"},openWeights:!0,retention:"unknown",defaultHosting:"local"}),C=["bedrock","together","fireworks","groq","openrouter","ollama","local"];w.model("llama-3-3-70b",{name:"Llama 3.3 70B",ctx:128e3,on:[...C]}),w.model("llama-3-1-70b",{name:"Llama 3.1 70B",ctx:128e3,on:[...C]}),w.model("llama-3-1-8b",{name:"Llama 3.1 8B",ctx:128e3,on:[...C]});let Y=p("alibaba",{family:{id:"qwen",name:"Qwen"},openWeights:!0,retention:"unknown",defaultHosting:"local"});Y.model("qwen-3-235b",{name:"Qwen 3 235B",on:[...C]}),Y.model("qwen-3-coder-480b",{name:"Qwen 3 Coder 480B",capability:"code",on:[...C]});let I=p("amazon",{family:{id:"nova",name:"Nova"},retention:"configurable"});I.model("nova-2-lite",{name:"Nova 2 Lite",ctx:1e6,maxOut:64e3,aliases:["nova-2-lite-v1:0"],on:["bedrock"]});let S=p("mistral",{family:{id:"mistral",name:"Mistral"},openWeights:!0,retention:"unknown",defaultHosting:"local"});S.model("mixtral-8x7b",{name:"Mixtral 8x7B",seen:"discovered",on:[...C]}),function(e){let t=new Map;for(let n of e)t.set(n.id,n);for(let n of e)for(let e of n.aliases)t.has(e)||t.set(e,n);Object.freeze([...e])}(Object.freeze([...h.models(),...j.models(),...b.models(),...k.models(),...y.models(),...N.models(),...S.models(),...w.models(),...Y.models(),...I.models()])),s.k5(["reasoning","code"]),s.k5(["zero_retention","no_storage","configurable","on_device","on_infrastructure","unknown"]),s.k5(["managed","discovered"]);let A=s.k5(["yes","no","unknown"]),z=s.k5(["opt-in","opt-out","none","unknown"]);s.Ik({apiDefault:A,consumerDefault:A,consumerControl:z,source:s.Yj().nullable()});let M=s.k5(["api","consumer","enterprise","unknown"]);s.Ik({tier:M,controlExercised:s.zM().nullable()}),Object.freeze({tier:"unknown",controlExercised:null}),Object.freeze(["gateway","unknown","cli","api"]);let O=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function R(e){return O.format(e)}function L(e){return e>0&&e<.1?"$".concat(e.toFixed(4)):"$".concat(e.toFixed(2))}function T(e,t){return t?"≥ ".concat(L(e)):L(e)}var D=n(3763),E=n(4187);let F={ClaudeCode:"claudecode",Cursor:"cursor",Copilot:"copilot",Codex:"codex",Antigravity:"antigravity",Windsurf:"windsurf",ClaudeDesktop:"claudedesktop",ChatGpt:"chatgpt",ClaudeAi:"claudeai",Api:"api"},P=s.k5(F).meta({id:"Harness"}),V={ClaudeCode:"claude-code",ClaudeDesktop:"claude-desktop",Cursor:"cursor",ChatGpt:"chatgpt",ClaudeAi:"claude-ai",Copilot:"github-copilot",Codex:"codex",Antigravity:"antigravity",Cli:"cli",Unknown:"unknown"},_=s.k5(V).meta({id:"SourceTool"});V.ClaudeCode,F.ClaudeCode,V.ClaudeDesktop,F.ClaudeDesktop,V.Copilot,F.Copilot,V.Cursor,F.Cursor,V.ChatGpt,F.ChatGpt,V.Codex,F.Codex,V.Antigravity,F.Antigravity,V.ClaudeAi,F.ClaudeAi;let B=s.k5(["pii","financial","secret","phi","code_context","code_flaw","custom","config"]).meta({id:"DetectionCategory"}),$=s.k5(["critical","high","medium","low"]).meta({id:"Severity"}),K=s.k5(["warn","redact","block","allow","log"]).meta({id:"ActionTaken"}),H=K.options,W=s.Ik({start:s.ai().int().nonnegative(),end:s.ai().int().nonnegative()}).meta({id:"Span"});s.Ik({id:s.Os(),eventId:s.Os(),ruleId:s.Yj(),category:B,severity:$,span:W,maskedMatch:s.Yj(),actionTaken:K,confidence:s.ai().min(0).max(1)}).meta({id:"Finding"}).meta({id:"DetectedFinding"});let U=s.k5(["blocked","redacted","warned","allowed","quarantined","monitored"]).meta({id:"FindingAction"}),G=P.extract(["ClaudeCode","ClaudeDesktop","Cursor","Copilot","ChatGpt","ClaudeAi","Codex","Antigravity","Api"]).meta({id:"FindingProvider"}),q=s.k5(["secret","pii","source_code","code_flaw","external_share","mcp_server","customer_data","financial","phi","custom"]).meta({id:"FindingCategory"});s.k5(["in-flight","at-rest"]).meta({id:"FindingOrigin"});let Z=s.k5(["open","handled","resolved","dismissed"]).meta({id:"FindingStatus"}),J=s.k5(["deployment_refused","payload_invalid","detached_undelivered"]).meta({id:"SyncFailureReason"}),X=s.k5(["sent","queued","not_sent","never_offered","local_scan"]).meta({id:"FindingDeliveryState"}),Q=s.Ik({state:X,at:D.w$().optional(),reason:J.optional()}).meta({id:"FindingDelivery"});s.k5(["enforced-in-flight","fixed-at-source","exception","acknowledged","false-positive","redetected"]).meta({id:"ResolutionMethod"});let ee=s.Ik({maskedValue:s.Yj(),contextPrefix:s.Yj()}).meta({id:"FindingMatch"}),et=s.Ik({id:s.Yj(),name:s.Yj().nullable()}).meta({id:"FindingDetectionRef"}),en=s.Ik({id:s.Yj(),name:s.Yj()}).meta({id:"FindingPolicyRef"}),es=s.Ik({id:s.Yj(),name:s.Yj()}).meta({id:"FindingUser"}),ea=s.Ik({id:s.Yj(),provider:G,repo:s.Yj(),file:s.Yj(),user:es.optional(),toolName:s.Yj().optional(),action:U,detectedAt:D.w$(),confidence:s.ai().min(0).max(1),status:Z.optional(),eventId:s.Yj().optional(),sessionId:s.Yj().optional(),delivery:Q.optional()}).meta({id:"FindingInstance"}),ei=s.Ik({id:s.Yj(),category:q,subtype:s.Yj(),severity:$,match:ee,detection:et,policy:en,instanceCount:s.ai().int().nonnegative(),providers:s.YO(G),aggregateAction:U.nullable(),latestDetectedAt:D.w$(),instances:s.YO(ea),status:Z.optional(),users:s.YO(es).optional()}).meta({id:"FindingGroup"});s.Ik({findings:s.ai().int().nonnegative(),groups:s.ai().int().nonnegative(),bySeverity:s.Ik({critical:s.ai().int().nonnegative(),high:s.ai().int().nonnegative(),medium:s.ai().int().nonnegative(),low:s.ai().int().nonnegative()})}).meta({id:"FindingStats"});let el=s.Ik({value:s.Yj(),count:s.ai().int().nonnegative()}).meta({id:"FindingFacetItem"}),er=s.Ik({severity:s.YO(el),subtype:s.YO(el),provider:s.YO(el),action:s.YO(el),status:s.YO(el),tool:s.YO(el).optional(),deployment:s.YO(el).optional()}).meta({id:"FindingFacets"}),eo=ei.omit({instances:!0,match:!0}).meta({id:"FindingTypeSummary"});s.Ik({severity:s.YO($).optional(),subtype:s.YO(s.Yj()).optional(),provider:s.YO(G).optional(),action:s.YO(U).optional(),status:s.YO(Z).optional(),q:s.Yj().optional(),sessionId:s.Yj().optional(),from:D.w$().optional(),includeId:s.Yj().optional(),limit:E.ai().int().min(1).max(100).optional(),cursor:s.Yj().optional()}),s.Ik({totals:s.Ik({findings:s.ai().int().nonnegative(),types:s.ai().int().nonnegative()}),facets:er,items:s.YO(eo),nextCursor:s.Yj().nullable(),sessionFirings:s.g1(s.Yj(),s.ai().int().nonnegative()).optional()}).meta({id:"ListFindingTypesResponse"}),s.Ik({action:U.exclude(["quarantined"]),instanceId:s.Yj().optional()}).meta({id:"ApplyFindingActionRequest"}),ei.meta({id:"ApplyFindingActionResponse"}),s.Ik({severity:s.YO($).optional(),subtype:s.YO(s.Yj()).optional(),provider:s.YO(G).optional(),action:s.YO(U).optional(),q:s.Yj().optional(),format:s.k5(["csv","json"]).optional()});let ec=ea.extend({groupId:s.Yj(),category:q,subtype:s.Yj(),severity:$,match:ee,detection:et,policy:en}).meta({id:"FindingInstanceDetail"});s.Ik({severity:s.YO($).optional(),subtype:s.YO(s.Yj()).optional(),provider:s.YO(G).optional(),action:s.YO(U).optional(),status:s.YO(Z).optional(),tool:s.YO(s.Yj()).optional(),deployment:s.YO(X).optional(),repo:s.Yj().optional(),file:s.Yj().optional(),q:s.Yj().optional(),sessionId:s.Yj().optional(),from:D.w$().optional(),limit:E.ai().int().min(1).max(200).optional(),cursor:s.Yj().optional()}),s.Ik({totals:s.Ik({findings:s.ai().int().nonnegative()}),facets:er,items:s.YO(ec),nextCursor:s.Yj().nullable()}).meta({id:"ListFindingInstancesResponse"}),s.Ik({items:s.YO(ec),nextCursor:s.Yj().nullable()}).meta({id:"ListFindingInstancesPage"});let ed=s.Ik({id:s.Yj(),repo:s.Yj(),file:s.Yj(),instanceCount:s.ai().int().nonnegative(),maxSeverity:$,latestDetectedAt:D.w$(),status:Z.optional(),ruleIds:s.YO(s.Yj())}).meta({id:"FindingLocationSummary"});s.Ik({severity:s.YO($).optional(),subtype:s.YO(s.Yj()).optional(),provider:s.YO(G).optional(),action:s.YO(U).optional(),status:s.YO(Z).optional(),tool:s.YO(s.Yj()).optional(),deployment:s.YO(X).optional(),q:s.Yj().optional(),sessionId:s.Yj().optional(),from:D.w$().optional(),includeId:s.Yj().optional(),limit:E.ai().int().min(1).max(100).optional(),cursor:s.Yj().optional()}),s.Ik({totals:s.Ik({findings:s.ai().int().nonnegative(),locations:s.ai().int().nonnegative()}),facets:er,items:s.YO(ed),nextCursor:s.Yj().nullable()}).meta({id:"ListFindingLocationsResponse"});let ex=s.k5(["host","harness","user","skill","hook","mcp_server","config_file"]).meta({id:"InventoryObjectType"}),em=s.k5(["session","run","tool_call","llm_call","source_lookup","prompt","response","code_change","tool_use","model_refusal","config_scan"]).meta({id:"AuditEventType"}),eu=s.g1(s.Yj(),s.L5());s.Ik({host_name:s.Yj().optional(),os:s.Yj().optional(),os_version:s.Yj().optional(),arch:s.Yj().optional()}).catchall(s.L5()),s.Ik({harness_version:s.Yj().optional(),interface:s.Yj().optional()}).catchall(s.L5()),s.Ik({display_name:s.Yj().optional(),email:s.Yj().optional()}).catchall(s.L5()),s.Ik({source:s.Yj().optional(),version:s.Yj().optional(),description:s.Yj().optional(),updated_at:s.Yj().optional(),scope:s.Yj().optional(),plugin_name:s.Yj().optional()}).catchall(s.L5()),s.Ik({event:s.Yj().optional(),matcher:s.Yj().optional(),command:s.Yj().optional(),scope:s.Yj().optional(),plugin_name:s.Yj().optional(),timeout:s.ai().optional()}).catchall(s.L5()),s.Ik({scope:s.Yj().optional(),transport:s.Yj().optional(),command:s.Yj().optional(),url:s.Yj().optional(),env_keys:s.YO(s.Yj()).optional(),plugin_name:s.Yj().optional(),marketplace:s.Yj().optional(),project:s.Yj().optional()}).catchall(s.L5()),s.Ik({kind:s.Yj().optional(),detail:s.Yj().optional(),scope:s.Yj().optional(),updated_at:s.Yj().optional(),entry_count:s.ai().optional()}).catchall(s.L5());let ep=s.Ik({model:s.Yj().optional(),provider:s.Yj().optional(),input_tokens:s.ai().int().nonnegative().optional(),output_tokens:s.ai().int().nonnegative().optional(),cache_creation_input_tokens:s.ai().int().nonnegative().optional(),cache_read_input_tokens:s.ai().int().nonnegative().optional(),ephemeral_1h_input_tokens:s.ai().int().nonnegative().optional(),ephemeral_5m_input_tokens:s.ai().int().nonnegative().optional(),web_search_requests:s.ai().int().nonnegative().optional(),web_fetch_requests:s.ai().int().nonnegative().optional(),service_tier:s.Yj().optional(),stop_reason:s.Yj().optional(),message_id:s.Yj().optional(),uuid:s.Yj().optional(),parent_uuid:s.Yj().optional(),run_key:s.Yj().optional()}).catchall(s.L5());s.Ik({sessionId:s.Yj().min(1),messageId:s.Yj().min(1),parentId:s.Yj().min(1),rootSessionId:s.Yj().min(1),startedAt:D.w$(),attributes:ep});let eh=s.Ik({tool_name:s.Yj().optional(),tool_use_id:s.Yj().optional(),target:s.Yj().optional(),is_error:s.zM().optional(),input_size:s.ai().int().nonnegative().optional(),output_size:s.ai().int().nonnegative().optional(),uuid:s.Yj().optional(),parent_uuid:s.Yj().optional(),run_key:s.Yj().optional()}).catchall(s.L5());s.Ik({source_tool:s.Yj().optional(),file_path:s.Yj().optional(),repo:s.Yj().optional(),tool_name:s.Yj().optional(),gitignored:s.zM().optional(),whole_file:s.zM().optional(),correlation_id:s.uR().optional(),trace_id:s.Yj().regex(/^[0-9a-f]{32}$/).optional(),exception_ids:s.YO(s.Os()).optional(),message_id:s.Yj().optional(),conversation_id:s.Yj().optional(),inspection_ms:s.ai().int().nonnegative().optional(),redact_degraded_to:K.optional()}).catchall(s.L5());let eg=s.Ik({ruleId:s.Yj().min(1),ruleName:s.Yj(),ruleVersion:s.Yj().min(1),category:B,severity:$,span:W,maskedMatch:s.Yj(),actionTaken:K,confidence:s.ai().min(0).max(1)});s.Ik({sessionId:s.Yj().min(1),toolUseId:s.Yj().min(1),parentId:s.Yj().min(1),rootSessionId:s.Yj().min(1),startedAt:D.w$(),attributes:eh,inspections:s.YO(eg).default([])});let ef=s.Ik({objectType:ex,identityKey:s.Yj().min(1),location:s.Yj().optional(),title:s.Yj().optional(),hostId:s.Yj().optional(),attributes:eu.default({})}).meta({id:"InventoryInput"}),ej=s.Ik({url:s.Yj().min(1),name:s.Yj().optional(),attributes:eu.default({})}).meta({id:"SourceProjectInput"}),ev=s.Ik({id:s.Yj().min(1),eventType:em,startedAt:D.w$(),endedAt:D.w$().optional(),parentId:s.Yj().optional(),rootSessionId:s.Yj().optional(),hostId:s.Yj().optional(),harnessId:s.Yj().optional(),sourceProjectId:s.Yj().optional(),severity:$.optional(),priority:s.Yj().optional(),content:s.Yj().optional(),contentHash:s.Yj().optional(),attributes:eu.optional()}).meta({id:"AuditEventInput"});s.Ik({class:s.Yj().min(1),label:s.Yj().optional(),attributes:eu.optional()});let eb=s.Ik({ruleId:s.Yj().min(1),version:s.Yj().min(1),name:s.Yj(),category:B,severity:$,definition:s.Yj()});s.Ik({id:s.Yj().min(1),auditEventId:s.Yj().min(1),inspectionDefinitionId:s.Yj().min(1),classifiedDataId:s.Yj().optional(),span:W,maskedMatch:s.Yj(),actionTaken:K,confidence:s.ai().min(0).max(1),findingKey:s.Yj().optional(),firstDetectedAt:D.w$().optional()}),s.Ik({host:ef.optional(),harness:ef.optional(),project:ej.optional()}).meta({id:"InventoryContext"}),s.Ik({hostId:s.Yj().optional(),harnessId:s.Yj().optional(),accountId:s.Yj().optional(),sourceProjectId:s.Yj().optional()}).meta({id:"ResolvedInventory"}),s.Ik({hosts:s.YO(s.Yj()),harnesses:s.YO(s.Yj()),osVersions:s.YO(s.Yj()),projects:s.YO(s.Yj())}).meta({id:"InventoryFacets"});let ek=s.Ik({sessionId:s.Yj(),model:s.Yj(),provider:s.Yj(),inputTokens:s.ai().int().nonnegative(),outputTokens:s.ai().int().nonnegative(),cacheCreation:s.ai().int().nonnegative(),cacheRead:s.ai().int().nonnegative(),totalTokens:s.ai().int().nonnegative(),estimatedCostUsd:s.ai().nullable()}).meta({id:"TokenRollup"});s.Ik({sessionId:s.Yj(),rollups:s.YO(ek),totalTokens:s.ai().int().nonnegative(),estimatedCostUsd:s.ai().nullable(),costIsPartial:s.zM()});let ey=s.Ik({provider:s.Yj(),model:s.Yj(),inputTokens:s.ai().int().nonnegative(),outputTokens:s.ai().int().nonnegative(),cacheTokens:s.ai().int().nonnegative(),totalTokens:s.ai().int().nonnegative(),estimatedCostUsd:s.ai().nullable()});s.Ik({models:s.YO(ey),sessionCount:s.ai().int().nonnegative(),totalTokens:s.ai().int().nonnegative(),estimatedCostUsd:s.ai(),costIsPartial:s.zM()});let eN=s.k5(["active","completed","interrupted","error"]),ew=s.k5(["session","prompt","response","tool","hook","detection","share","permission","commit","error","active"]),eC=s.k5(["detections","shares","inventory"]),eY=s.Ik({id:s.Yj(),occurredAt:D.w$(),kind:ew,title:s.Yj(),detail:s.Yj(),tool:s.Yj().nullable(),severity:$.nullable(),link:eC.nullable(),targetId:s.Yj().nullable(),internal:s.zM(),flagged:s.zM(),bodyExpired:s.zM().default(!1)}).meta({id:"ActivityAuditEvent"}),eI=s.Ik({id:s.Yj(),harness:P,title:s.Yj(),project:s.Yj(),repo:s.Yj(),branches:s.YO(s.Yj()),startedAt:D.w$(),endedAt:D.w$().nullable(),status:eN,turns:s.ai().int().nonnegative(),findings:s.ai().int().nonnegative(),shares:s.ai().int().nonnegative()}).meta({id:"ActivitySessionSummary"});eI.extend({host:s.Yj(),cwd:s.Yj(),models:s.YO(s.Yj()),version:s.Yj(),tokens:ek,tools:s.g1(s.Yj(),s.ai().int().nonnegative()),files:s.YO(s.Yj()),commits:s.ai().int().nonnegative(),events:s.YO(eY)}).meta({id:"ActivitySession"}),s.Ik({tz:s.Yj().optional()});let eS=s.Ik({sessionsToday:s.ai().int().nonnegative(),liveNow:s.ai().int().nonnegative(),toolCallsToday:s.ai().int().nonnegative(),findingsToday:s.ai().int().nonnegative(),egressToday:s.ai().int().nonnegative()}).meta({id:"GetActivityStatsResponse"});s.Ik({q:s.Yj().optional(),harness:s.YO(P).optional(),from:s.KC([D.p6(),D.w$()]).optional(),to:s.KC([D.p6(),D.w$()]).optional(),excludeEmpty:s.uE().optional(),limit:E.ai().int().min(1).max(100).default(50),cursor:s.Yj().optional()});let eA=s.Ik({items:s.YO(eI),nextCursor:s.Yj().nullable(),emptyCount:s.ai().int().nonnegative()}).meta({id:"ListActivitySessionsResponse"});s.Ik({limit:E.ai().int().min(1).max(500).default(100),cursor:s.Yj().optional(),order:s.k5(["asc","desc"]).default("asc")}),s.Ik({items:s.YO(eY),nextCursor:s.Yj().nullable()}).meta({id:"ListSessionEventsResponse"}),s.Ik({format:s.k5(["ndjson","json"]).default("ndjson")}),s.Ik({format:s.k5(["csv","json"]).default("csv"),q:s.Yj().optional(),harness:s.YO(P).optional(),from:s.KC([D.p6(),D.w$()]).optional(),to:s.KC([D.p6(),D.w$()]).optional()}),s.Ik({stats:eS,sessions:eA}).meta({id:"ActivityOverviewResponse"});let ez=s.k5(["user","project","local","plugin"]),eM=s.Ik({name:s.Yj().min(1),source:s.Yj().min(1),scope:ez,pluginName:s.Yj().optional(),version:s.Yj().optional(),description:s.Yj().optional(),updatedAt:D.w$().optional(),location:s.Yj().optional()}),eO=s.Ik({event:s.Yj().min(1),matcher:s.Yj().optional(),command:s.Yj().min(1),timeout:s.ai().optional(),scope:ez,pluginName:s.Yj().optional(),location:s.Yj().optional()}),eR=s.Ik({name:s.Yj().min(1),scope:ez,pluginName:s.Yj().optional(),marketplace:s.Yj().optional(),project:s.Yj().optional(),transport:s.Yj().min(1),command:s.Yj().optional(),url:s.Yj().optional(),envKeys:s.YO(s.Yj()).optional(),location:s.Yj().optional()}),eL=s.Ik({name:s.Yj().min(1),path:s.Yj().min(1),scope:ez,kind:s.Yj().min(1),detail:s.Yj().optional(),entryCount:s.ai().optional(),updatedAt:D.w$().optional()});s.Ik({scannedAt:D.w$(),skills:s.YO(eM),hooks:s.YO(eO),mcpServers:s.YO(eR),configFiles:s.YO(eL),errors:s.YO(s.Ik({source:s.Yj(),reason:s.Yj()}))});let eT=s.Ik({ruleId:s.Yj().min(1),version:s.Yj().min(1),span:W,maskedMatch:s.Yj(),actionTaken:K,confidence:s.ai().min(0).max(1)});s.Ik({items:s.YO(ef),scanEvent:ev,definitions:s.YO(eb).optional(),findings:s.YO(eT).optional()});let eD=s.k5(["project","skill","mcp","hook","config"]).meta({id:"AssetType"}),eE=s.k5(["open","approved","blocked"]).meta({id:"AccessLevel"}),eF=s.k5(["source","public-dep","vendored","config","data","docs","generated"]).meta({id:"Origin"}),eP=s.k5(["known-good","risky","unapproved"]).meta({id:"TrustLevel"}),eV=s.k5(["update","stale","conflict","unknown","change","untracked","risk","findings"]).meta({id:"Flag"}),e_=s.k5(["public","private"]).meta({id:"Visibility"}),eB=s.k5(["block","redact","warn"]).meta({id:"HarnessEventKind"}),e$=P.extract(["ClaudeCode","Cursor","Codex","Antigravity"]).meta({id:"HarnessId"}),eK=s.Ik({open:s.ai().int().nonnegative(),approved:s.ai().int().nonnegative(),blocked:s.ai().int().nonnegative(),total:s.ai().int().nonnegative()}).meta({id:"AccessCounts"}),eH=s.Ik({id:s.Yj(),type:eD,name:s.Yj(),sub:s.Yj(),flags:s.YO(eV),trust:eP.optional()}).meta({id:"AssetSummary"}),eW=s.Ik({id:s.Yj(),name:s.Yj(),repo:s.Yj(),visibility:e_,language:s.Yj(),policyDefault:eE,updatedAt:D.w$(),accessCounts:eK,findingsCount:s.ai().int().nonnegative()}).meta({id:"ProjectSummary"}),eU=s.Ik({type:eD,assets:s.YO(eH)}),eG=s.Ik({id:e$,label:s.Yj(),kind:s.Yj(),version:s.Yj(),sessions:s.ai().int().nonnegative(),assetCount:s.ai().int().nonnegative(),flagCount:s.ai().int().nonnegative(),projects:s.YO(eW),categories:s.YO(eU)}).meta({id:"HarnessSummary"});s.Ik({items:s.YO(eG)}).meta({id:"ListHarnessesResponse"});let eq=s.Ik({type:eD,total:s.ai().int().nonnegative(),trustRollup:s.Ik({"known-good":s.ai().int().nonnegative(),risky:s.ai().int().nonnegative(),unapproved:s.ai().int().nonnegative()}).partial().strict().optional(),flagRollup:s.Ik({update:s.ai().int().nonnegative(),stale:s.ai().int().nonnegative(),conflict:s.ai().int().nonnegative(),unknown:s.ai().int().nonnegative(),change:s.ai().int().nonnegative(),untracked:s.ai().int().nonnegative(),risk:s.ai().int().nonnegative(),findings:s.ai().int().nonnegative()}).partial().strict(),items:s.YO(eH)}).meta({id:"AssetGroup"});s.Ik({groups:s.YO(eq)}).meta({id:"ListAssetsResponse"});let eZ=s.Ik({name:s.Yj(),signature:s.Yj(),description:s.Yj(),write:s.zM(),risk:s.Yj().nullable()}).meta({id:"McpTool"}),eJ=s.Ik({id:s.Yj(),title:s.Yj(),note:s.Yj()});eH.extend({description:s.Yj().nullable(),trust:eP.nullable(),meta:s.g1(s.Yj(),s.L5()),finding:eJ.nullable(),tools:s.YO(eZ).optional()}).meta({id:"AssetDetail"}),s.Ik({items:s.YO(eW)}).meta({id:"ListProjectsResponse"}),s.Ik({attention:s.ai().int().nonnegative(),byType:s.Ik({project:s.ai().int().nonnegative(),skill:s.ai().int().nonnegative(),mcp:s.ai().int().nonnegative(),hook:s.ai().int().nonnegative(),config:s.ai().int().nonnegative()}),harnesses:s.ai().int().nonnegative(),mcpTrust:s.Ik({"known-good":s.ai().int().nonnegative(),risky:s.ai().int().nonnegative(),unapproved:s.ai().int().nonnegative()})}).meta({id:"InventoryStats"});let eX=s.Ik({path:s.Yj(),name:s.Yj(),origin:eF,access:eE,isCustom:s.zM(),findings:s.ai().int().nonnegative(),blockedAt:D.w$().nullable().optional(),note:s.Yj().nullable().optional()}).meta({id:"FileSummary"}),eQ=s.Ik({name:s.Yj(),path:s.Yj(),accessCounts:eK}).meta({id:"FolderSummary"});s.Ik({project:s.Ik({id:s.Yj(),repo:s.Yj(),visibility:e_}),path:s.Yj(),folders:s.YO(eQ).optional(),files:s.YO(eX)}).meta({id:"ProjectTreeResponse"}),eX.extend({project:s.Ik({repo:s.Yj(),visibility:e_,language:s.Yj(),policyDefault:eE,updatedAt:D.w$()}),findingsRefs:s.YO(s.Ik({id:s.Yj(),title:s.Yj()}))}).meta({id:"FileDetail"}),s.Ik({path:s.Yj(),access:eE}).meta({id:"SetFileAccessBody"}),s.Ik({file:eX,accessCounts:eK}).meta({id:"SetFileAccessResponse"}),s.Ik({trust:eP}).meta({id:"SetMcpTrustBody"});let e0=s.Ik({kind:eB,title:s.Yj(),detail:s.Yj(),occurredAt:D.w$(),findingId:s.Yj().nullable().optional()}).meta({id:"HarnessEventItem"});s.Ik({counts:s.Ik({block:s.ai().int().nonnegative(),redact:s.ai().int().nonnegative(),warn:s.ai().int().nonnegative()}),items:s.YO(e0)}).meta({id:"HarnessEventsResponse"}),s.Ik({jobId:s.Yj(),startedAt:D.w$()}).meta({id:"RescanResponse"}),s.Ik({repo:s.Yj()}).meta({id:"ConnectProjectBody"}),s.Ik({type:s.YO(eD).optional(),q:s.Yj().optional()}),s.Ik({path:s.Yj().optional(),q:s.Yj().optional(),filter:s.k5(["blocked"]).optional()}),s.Ik({path:s.Yj()}),s.Ik({limit:E.ai().int().min(1).max(50).default(7)});let e1=s.k5(["provider","internal","external","ip"]).meta({id:"DestinationKind"}),e2=s.k5(["https","http","sftp","grpc","smtp","ws","wss"]).meta({id:"Transport"}),e3=s.k5(["secrets","pii","customer","source","telemetry","logs","metrics","none"]).meta({id:"DataClass"});e3.options;let e5=s.k5(["recognized","internal","unverified","ip"]).meta({id:"ShareTrustLevel"}),e4=s.k5(["allow","block"]).meta({id:"EgressDecision"}),e6=s.k5(["allowed","blocked","review"]).meta({id:"EgressStatus"}),e7=s.k5(["raw_ip","unverified_domain","plaintext_transport"]).meta({id:"ReviewReason"}),e8=s.k5(["GET","POST","PUT","DELETE","SDK","REF"]).meta({id:"HttpMethod"}),e9=s.Ik({needsReview:s.zM(),reasons:s.YO(e7)}).meta({id:"ReviewInfo"}),te=s.Ik({port:s.ai().int().nullable(),geo:s.Yj().nullable(),ptr:s.Yj().nullable()}).meta({id:"DestinationNetwork"}),tt=s.Ik({id:s.Yj(),method:e8,transport:e2,url:s.Yj(),template:s.zM(),dataClass:e3,lastSeen:D.w$(),callSiteCount:s.ai().int().nonnegative()}).meta({id:"EndpointSummary"}),tn=s.Ik({id:s.Yj(),project:s.Yj(),file:s.Yj(),line:s.ai().int().nonnegative(),snippet:s.Yj(),dynamic:s.zM(),vendored:s.zM(),projectId:s.Yj().nullable()}).meta({id:"CallSite"}),ts=tt.extend({sites:s.YO(tn)}).meta({id:"EndpointWithSites"}),ta=s.Ik({id:s.Yj(),kind:e1,name:s.Yj(),host:s.Yj(),category:s.Yj(),trust:e5,status:e6,isCustom:s.zM(),lastSeen:D.w$(),endpointCount:s.ai().int().nonnegative(),callSiteCount:s.ai().int().nonnegative(),transports:s.YO(e2),dataClasses:s.YO(e3),review:e9,network:te.nullable(),endpoints:s.YO(tt)}).meta({id:"ShareDestinationSummary"});ta.omit({endpointCount:!0,callSiteCount:!0,endpoints:!0}).extend({note:s.Yj().nullable(),endpoints:s.YO(ts)}).meta({id:"ShareDestinationDetail"});let ti=s.Ik({id:s.Yj(),kind:e1,name:s.Yj(),host:s.Yj(),trust:e5,status:e6,review:e9,topDataClass:e3,callSiteCount:s.ai().int().nonnegative(),lastSeen:D.w$()}).meta({id:"ReviewDestination"}),tl=s.Ik({kind:e1,total:s.ai().int().nonnegative(),items:s.YO(ta)}).meta({id:"ShareDestinationGroup"});s.Ik({groups:s.YO(tl)}).meta({id:"ListShareDestinationsResponse"}),s.Ik({items:s.YO(ti)}).meta({id:"NeedsReviewResponse"}),s.Ik({destinations:s.ai().int().nonnegative(),endpoints:s.ai().int().nonnegative(),callSites:s.ai().int().nonnegative(),needsReview:s.ai().int().nonnegative(),insecure:s.ai().int().nonnegative(),byKind:s.Ik({provider:s.ai().int().nonnegative(),internal:s.ai().int().nonnegative(),external:s.ai().int().nonnegative(),ip:s.ai().int().nonnegative()}),byTrust:s.Ik({recognized:s.ai().int().nonnegative(),internal:s.ai().int().nonnegative(),unverified:s.ai().int().nonnegative(),ip:s.ai().int().nonnegative()})}).meta({id:"SharesStats"}),s.Ik({decision:e4.nullable()}).meta({id:"SetEgressDecisionBody"}),s.Ik({destination:ta}).meta({id:"SetEgressDecisionResponse"}),s.Ik({q:s.Yj().optional(),kind:s.YO(e1).optional(),groupBy:s.k5(["destination"]).default("destination"),review:s.uE().default(!1)}),s.Ik({format:s.k5(["csv","json"]).default("csv"),q:s.Yj().optional(),kind:s.YO(e1).optional()});let tr=s.k5(["npm","pypi","go","maven","rubygems","cargo","composer","nuget"]).meta({id:"EgressEcosystem"});s.Ik({id:s.Yj(),name:s.Yj(),category:s.Yj(),hostSuffixes:s.YO(s.Yj()).min(1),apiBase:s.Yj(),defaultDataClasses:s.YO(e3).min(1),sdks:s.jg(tr,s.YO(s.Yj()))}).meta({id:"ProviderRegistryEntry"});let to=s.Ik({file:s.Yj(),line:s.ai().int().positive(),snippet:s.Yj(),dynamic:s.zM(),vendored:s.zM()}).meta({id:"EgressCallSiteHit"}),tc=s.Ik({host:s.Yj(),kind:e1,name:s.Yj(),category:s.Yj(),trust:e5,network:te.nullable(),method:e8,transport:e2,url:s.Yj(),template:s.zM(),dataClass:e3,site:to}).meta({id:"ResolvedEgressHit"}),td=s.gM("mode",[s.Ik({mode:s.eu("walk"),walkedPrefix:s.Yj()}),s.Ik({mode:s.eu("ledger"),scannedFiles:s.YO(s.Yj()),deletedFiles:s.YO(s.Yj())})]).meta({id:"EgressReconcile"});s.Ik({projectKey:s.Yj().min(1),project:s.Yj(),projectId:s.Yj().nullable(),reconcile:td,hits:s.YO(tc)}).meta({id:"RecordProjectEgressInput"}),s.Ik({destinations:s.ai().int().nonnegative(),endpoints:s.ai().int().nonnegative(),callSites:s.ai().int().nonnegative(),truncated:s.zM(),droppedFiles:s.YO(s.Yj()).default([])}).meta({id:"EgressWriteSummary"}),s.Ik({specVersion:s.eu(1),endpoint:s.Yj().min(1),apiKey:s.Yj().min(1),keyPrefix:s.Yj().min(1).max(16).optional(),mintedAt:D.w$().optional()});let tx=s.Ik({packId:s.Yj().min(1),version:s.Yj().min(1),enabled:s.zM(),updatedAt:s.Yj().nullable()}).meta({id:"StorePosturePack"}),tm=s.Ik({total:s.ai().int().min(0),disabled:s.ai().int().min(0),byAction:s.Ik({warn:s.ai().int().min(0),redact:s.ai().int().min(0),block:s.ai().int().min(0),allow:s.ai().int().min(0),log:s.ai().int().min(0)}).strict()}).meta({id:"StorePosturePolicyCounts"}),tu=s.Ik({package:s.Yj().min(1).max(200),version:s.Yj().min(1).max(64),ossVersion:s.Yj().max(64).nullable(),policyBundleVersion:s.Yj().max(200).nullable(),policyFetchedAt:s.ai().int().min(0).max(0xe677d21fdbff).nullable()}).meta({id:"StorePosturePlugin"});s.Ik({deviceId:s.Os(),hostname:s.Yj().min(1).max(253),capturedAt:s.ai().int().min(0).max(0xe677d21fdbff),storePresent:s.zM(),schemaVersion:s.ai().int().min(0).max(0x7fffffff).nullable(),findingsTotal:s.ai().int().min(0).max(0x7fffffff),findingsFirstAt:s.ai().int().min(0).max(0xe677d21fdbff).nullable(),findingsLastAt:s.ai().int().min(0).max(0xe677d21fdbff).nullable(),packs:s.YO(tx).max(500),policyCounts:tm,plugin:tu.optional()}).meta({id:"StorePostureSnapshot"});let tp="capture/",th=ev.extend({inspections:s.YO(eg).default([])}).refine(e=>e.inspections.every(e=>!e.ruleVersion.startsWith(tp)),{message:"inspections[].ruleVersion must not start with `".concat(tp,"` — that namespace is reserved for capture definitions the control plane mints itself"),path:["inspections"]}).meta({id:"RecordAuditEventRequest"});s.Ik({events:s.YO(th).min(1).max(50)}).meta({id:"RecordAuditEventBatch"});let tg=s.Ik({host:s.Yj(),kind:e1,name:s.Yj(),category:s.Yj(),trust:e5,network:te.nullable(),method:e8,transport:e2,url:s.Yj(),template:s.zM(),dataClass:e3,site:s.Ik({file:s.Yj(),line:s.ai().int().positive(),dynamic:s.zM(),vendored:s.zM()})}).meta({id:"EgressIngestHit"});s.Ik({projectKey:s.Yj().regex(/^[0-9a-f]{64}$/,"projectKey must be a 64-character lowercase hex digest"),project:s.Yj(),reconcile:td,hits:s.YO(tg)}).meta({id:"EgressIngestRequest"}),s.Ik({accepted:s.ai().int().nonnegative(),duplicates:s.ai().int().nonnegative()}),s.Ik({accepted:s.ai().int().nonnegative()});let tf=RegExp("^[^\\p{Cc}\\p{Cf}]*$","u"),tj=e=>s.Yj().max(e).regex(tf,"must not contain control characters");s.Ik({tenantName:tj(200),userEmail:tj(320),role:tj(64),keyKind:tj(64),serverTime:tj(64)}),s.Ik({error:s.Ik({code:s.Yj().optional(),message:s.Yj().optional()}).optional()}),s.k5(["unauthorized","forbidden","route-absent","invalid-request","rejected","unreachable"]),s.Ik({deviceId:tj(128).min(1),hostname:tj(255).min(1),os:tj(64).min(1),cliVersion:tj(64).min(1),label:tj(200).optional()}).meta({id:"AttachDeviceRequest"}),s.Ik({deviceCode:tj(128).min(1)}).meta({id:"AttachTokenRequest"}),s.Ik({deviceCode:tj(128),userCode:tj(32),verificationUri:tj(512),verificationUriComplete:tj(512).optional(),expiresIn:s.ai().int().positive(),interval:s.ai().int().positive()});let tv=s.Ik({status:s.eu("pending")}),tb=s.Ik({status:s.eu("slow_down"),interval:s.ai().int().positive()}),tk=s.Ik({status:s.eu("denied"),message:tj(500).optional()}),ty=s.Ik({status:s.eu("expired")}),tN=s.Ik({status:s.eu("issued"),apiKey:s.Yj().min(1).max(512),endpoint:tj(512),tenantName:tj(200).optional(),userEmail:tj(320).optional()});s.KC([tN,tv,tb,tk,ty,s.Ik({status:tj(64)})]);let tw=s.k5(["shares_rescan"]),tC=s.Ik({id:tj(128).min(1),kind:tw,issuedAt:tj(64).min(1),expiresAt:tj(64).min(1)}).strict();s.Ik({command:tC.nullable()});let tY=s.k5(["scan_failed","no_projects","expired"]);s.gM("outcome",[s.Ik({outcome:s.eu("reported"),projectsScanned:s.ai().int().nonnegative()}).strict(),s.Ik({outcome:s.eu("failed"),reason:tY,projectsScanned:s.ai().int().nonnegative()}).strict()]);let tI=s.Yj().regex(/^[a-z][a-z0-9-]*$/),tS=s.Yj().regex(/^[a-z][a-z0-9-]*$/),tA=s.Yj().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?$/),tz=s.k5(["labs","user","org"]),tM=s.k5(["keyword","regex"]).meta({id:"MatcherType"});s.k5(["safe","quarantined"]).meta({id:"RuleProbeVerdict"});let tO=s.re({type:s.eu("keyword"),keywords:s.YO(s.Yj().min(1)).min(1),caseSensitive:s.zM().default(!1)});function tR(e){return e.replace(/[gy]/g,"")}let tL=s.re({type:s.eu("regex"),pattern:s.Yj().min(1).max(2e3),flags:s.Yj().default("gi"),captureGroup:s.ai().int().nonnegative().optional()}).refine(e=>(function(e,t){try{return new RegExp(e,t),!0}catch(e){return!1}})(e.pattern,e.flags),{message:"pattern/flags do not form a valid JavaScript regular expression",path:["pattern"]}).refine(e=>!function(e){return void 0===e||0===e}(e.captureGroup)||!function(e,t){try{var n;return(null==(n=new RegExp(e,tR(t)).exec(""))?void 0:n[0].length)===0}catch(e){return!1}}(e.pattern,e.flags),{message:'a whole-match regex that can match the empty string (e.g. "\\d*", "a?", "(?:)") can hang the matcher — scope the quantifier to a captureGroup, or require at least one character',path:["pattern"]}).superRefine((e,t)=>{if(void 0===e.captureGroup)return;let n=function(e,t){try{let n=new RegExp("".concat(e,"|"),tR(t)).exec("");return n?n.length-1:void 0}catch(e){return}}(e.pattern,e.flags);void 0===n||e.captureGroup<=n||t.addIssue({code:"custom",path:["captureGroup"],message:"captureGroup ".concat(String(e.captureGroup)," is out of range — the pattern declares ").concat(String(n)," capture group(s), so valid values are 0-").concat(String(n),". An out-of-range group never matches, which would make the rule silently never fire.")})}),tT=s.gM("type",[tO,tL]).meta({id:"Matcher"});tM.options;let tD=s.re({extensions:s.YO(s.Yj().regex(/^\.[A-Za-z0-9]+$/)).min(1)}).meta({id:"AppliesTo"}),tE=s.k5(["entropy","luhn"]).meta({id:"PostValidatorName"}),tF=s.KC([tE,s.re({name:tE,config:s.g1(s.Yj(),s.L5()).optional()})],{error:()=>"not a valid post-validator: use a bare name (".concat(tE.options.map(e=>JSON.stringify(e)).join(" or "),') or { "name": ..., "config": { ... } }. An unrecognized name would be a false-positive guard that never runs.')}).meta({id:"PostValidatorRef"}),tP=s.re({categories:s.YO(B).min(1).optional(),ruleIds:s.YO(s.Yj().min(1)).min(1).optional(),labels:s.YO(s.Yj().min(1)).min(1).optional(),windowChars:s.ai().int().positive().default(160),confidenceBoost:s.ai().min(0).max(.3).optional()}).refine(e=>{var t,n,s,a,i,l;return(null!=(a=null==(t=e.categories)?void 0:t.length)?a:0)+(null!=(i=null==(n=e.ruleIds)?void 0:n.length)?i:0)+(null!=(l=null==(s=e.labels)?void 0:s.length)?l:0)>0},{message:"requiresNearby needs at least one of categories, ruleIds, or labels"}).meta({id:"RequiresNearby"});s.re({label:s.Yj(),text:s.Yj().max(5e4),shouldMatch:s.zM(),filePath:s.Yj().optional(),expectedSpans:s.YO(s.re({start:s.ai(),end:s.ai()})).optional()}).meta({id:"RuleFixture"});let tV=s.re({specVersion:s.eu(1),id:s.Yj().regex(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/),name:s.Yj(),category:B,severity:$,matcher:tT,appliesTo:tD.optional(),postValidators:s.YO(tF).optional(),requiresNearby:tP.optional(),examples:s.YO(s.Yj()).optional()}).meta({id:"Rule"}),t_=s.Ik({name:s.Yj(),email:s.Rp().optional(),url:s.OZ().optional()}).meta({id:"Author"});s.Ik({specVersion:s.eu(1),id:s.Yj(),name:s.Yj(),version:s.Yj(),rules:s.YO(s.Yj()),description:s.Yj().optional(),author:t_.optional(),license:s.Yj().optional(),sourceUrl:s.OZ().optional()}).meta({id:"PackManifest"});let tB=s.k5(["library","custom"]).meta({id:"OriginEnum"}),t$=s.k5(["all","library","custom","customized","updates"]),tK=s.k5(["new","imported","update"]).meta({id:"LibraryStateEnum"}),tH=s.Ik({all:s.ai().int().nonnegative(),library:s.ai().int().nonnegative(),custom:s.ai().int().nonnegative(),customized:s.ai().int().nonnegative(),updates:s.ai().int().nonnegative()}).meta({id:"DetectionCounts"}),tW=s.Ik({id:s.Yj(),name:s.Yj(),version:tA,enabled:s.zM(),origin:tB,publisher:tI.optional(),publisherKind:tz.optional(),ruleCount:s.ai().int().nonnegative(),namespace:tI,packId:tS,policyId:s.Yj().optional(),latestVersion:tA.optional()}).meta({id:"DetectionListItem"});s.Ik({counts:tH,items:s.YO(tW)}).meta({id:"ListDetectionsResponse"}),s.Ik({filter:t$.optional().default("all"),q:s.Yj().optional()}),s.Ik({detections:s.ai().int().nonnegative(),rules:s.ai().int().nonnegative(),active:s.ai().int().nonnegative(),findingsLast30d:s.ai().int().nonnegative()}).meta({id:"DetectionStats"});let tU=s.Ik({id:s.Yj(),name:s.Yj(),category:B,severity:$,matcher:tT,appliesTo:tD.optional(),postValidators:s.YO(tF).optional(),requiresNearby:tP.optional(),examples:s.YO(s.Yj()).optional()}).meta({id:"DetectionRule"}),tG=s.Ik({available:s.zM(),latestVersion:tA,latestRuleCount:s.ai().int().nonnegative().optional()}).nullable().meta({id:"DetectionUpdate"});s.Ik({id:s.Yj(),name:s.Yj(),version:tA,enabled:s.zM(),origin:tB,publisher:tI.optional(),publisherKind:tz.optional(),ruleCount:s.ai().int().nonnegative(),namespace:tI,packId:tS,description:s.Yj().optional(),editedAt:D.w$(),findingsLast30d:s.ai().int().nonnegative(),latestVersion:tA.nullable().optional(),update:tG,rules:s.YO(tU),modified:s.zM(),policyId:s.Yj().optional()}).meta({id:"DetectionDetail"});let tq=s.Ik({id:s.Yj(),name:s.Yj(),publisher:tI,publisherKind:tz.optional(),category:B.optional(),version:tA,ruleCount:s.ai().int().nonnegative(),description:s.Yj().optional(),updatedAt:D.w$(),state:tK,importedAs:s.Yj().nullable()}).meta({id:"LibraryItem"});s.Ik({categories:s.YO(B),items:s.YO(tq)}).meta({id:"ListLibraryResponse"}),s.Ik({libraryId:s.Yj().refine(e=>/^[^/]+\/[^/]+$/.test(e),{message:"libraryId must be in namespace/packId format"})}).meta({id:"ImportDetectionRequest"});let tZ=s.k5(["prompt","response","code_change","tool_use"]).meta({id:"EventKind"});tZ.options.map(e=>"'".concat(e,"'")).join(",");let tJ=s.Ik({sessionId:s.Yj().optional(),repo:s.Yj().optional(),filePath:s.Yj().optional(),toolName:s.Yj().optional(),gitignored:s.zM().optional(),wholeFile:s.zM().optional(),model:s.Yj().optional(),turnIndex:s.ai().int().nonnegative().optional(),correlationId:s.uR().optional(),traceId:s.Yj().regex(/^[0-9a-f]{32}$/).optional(),exceptionIds:s.YO(s.Os()).optional(),messageId:s.Yj().optional(),conversationId:s.Yj().optional(),inspectionMs:s.ai().int().nonnegative().optional(),redactDegradedTo:K.optional()}).meta({id:"EventMetadata"}),tX=s.Ik({id:s.Os(),sourceTool:_,kind:tZ,occurredAt:D.w$(),contentHash:s.Yj(),content:s.Yj(),metadata:tJ.optional()}).meta({id:"Event"}).meta({id:"IngestEvent"});s.Ik({events:s.YO(tX).min(1).max(100),dedupe:s.eu("content-hash").optional()}).meta({id:"IngestBatch"});let tQ=s.k5(["once","temporary","permanent"]),t0=s.Ik({repo:s.Yj().optional(),sourceTool:s.Yj().optional(),provider:s.Yj().optional()}).strict(),t1=s.k5(["suppress","reveal_to_model"]),t2=s.Ik({id:s.Os(),ruleId:s.Yj(),category:B,valueFingerprint:s.Yj().regex(/^[0-9a-f]{64}$/),keyVersion:s.ai().int().positive(),maskedValue:s.Yj(),capability:t1.default("suppress"),scope:tQ,expiresAt:D.w$().nullable(),maxUses:s.ai().int().positive().nullable(),useCount:s.ai().int().nonnegative(),lastUsedAt:D.w$().nullable(),justification:s.Yj().min(1),conditions:t0.nullable(),createdBy:s.Yj(),createdVia:s.k5(["cli-approve","cli-add","web-approve","web-add","api","setup-triage"]),createdAt:D.w$(),updatedAt:D.w$(),revokedAt:D.w$().nullable(),revokedBy:s.Yj().nullable(),revokeReason:s.Yj().nullable()}),t3=t2.pick({id:!0,ruleId:!0,valueFingerprint:!0,keyVersion:!0,capability:!0,expiresAt:!0,maxUses:!0,useCount:!0,conditions:!0});function t5(e,t){return"present"===t.status&&t.version===e}function t4(e){if(e<=0)return"Recently blocked detections are invalidated too: the ledger outlives a rotation, so its rows stay listed as a record of what was blocked but stop being approvable. Trigger the detection again to approve it under the new key.";let t="from the last ".concat(String(24)," hours"),n=1===e?"1 recently blocked detection ".concat(t," is still approvable; after rotating, none are"):"".concat(String(e)," recently blocked detections ").concat(t," are still approvable; after rotating, none are");return"".concat(n,". They stay listed as a record of what was blocked — trigger the detection again to approve under the new key.")}t2.omit({valueFingerprint:!0});let t6=s.Yj().optional();s.Ik({reference:s.Yj(),scope:s.Yj(),reason:s.Yj(),confirmation:t6}),s.Ik({ruleId:s.Yj(),value:s.Yj(),scope:s.Yj(),reason:s.Yj(),confirmation:t6}),s.Ik({pointer:s.Yj(),scope:s.Yj(),justification:s.Yj(),confirmation:t6}),s.Ik({id:s.Yj(),reason:s.Yj()}),s.Ik({confirmation:s.Yj()}),J.options,new WeakMap,new WeakMap,Object.fromEntries($.options.map((e,t)=>[e,t]));let t7=s.Ik({id:s.Os(),namespace:tI,packId:tS,version:tA,name:s.Yj(),enabled:s.zM().default(!0),policyId:s.Yj().optional()}).meta({id:"InstalledPack"});s.Ik({namespace:tI,packId:tS,version:tA}).meta({id:"InstallPackRequest"}),s.Ik({items:s.YO(t7)}).meta({id:"ListInstalledPacksResponse"}),s.Ik({enabled:s.zM().optional(),policyId:s.Yj().nullable().optional()}).refine(e=>Object.keys(e).some(t=>void 0!==e[t]),{message:"At least one field must be provided"}).meta({id:"PatchInstalledPackRequest"});let t8=s.k5(["global","repo","user"]).meta({id:"PolicyScope"}),t9=s.KC([s.Ik({ruleId:s.Yj()}),s.Ik({category:B})]).meta({id:"PolicyTarget"}),ne=s.k5(["builtin","custom"]).meta({id:"PolicyKind"}),nt=s.k5(["builtin","authored"]).meta({id:"PolicyProvenance"}),nn=s.Ik({id:s.Os(),scope:t8,target:t9,action:K,enabled:s.zM().default(!0),customKeywords:s.YO(s.Yj()).optional(),name:s.Yj().optional(),provenance:nt.optional()}).meta({id:"Policy"}),ns=["monitor","warn","redact","vault","block"],na=s.k5(ns).meta({id:"BuiltinPolicyId"}),ni=na.extract(["monitor","warn","block"]).meta({id:"RedactFallback"});[...Object.keys(s.Ik({version:s.Yj(),policies:s.YO(nn),rules:s.YO(tV).optional(),rulesComplete:s.zM().optional(),exceptions:s.YO(t3).optional(),reversibleRuleIds:s.YO(s.Yj()).optional(),ruleVersions:s.g1(s.Yj(),s.Yj()).optional(),prohibitedModels:s.YO(s.Yj()).optional(),redactFallback:ni.optional(),customKeywords:s.YO(s.Yj()),fetchedAt:D.w$()}).meta({id:"PolicyBundle"}).shape),...Object.keys(nn.shape).map(e=>"policies.".concat(e)),...t9.options.flatMap(e=>"shape"in e?Object.keys(e.shape):[]).map(e=>"policies.target.".concat(e)),...Object.keys(t3.shape).map(e=>"exceptions.".concat(e))].sort().join(",");let nl=["config"];B.options.filter(e=>!nl.includes(e));let nr={secret:"critical",financial:"critical",code_flaw:"critical",pii:"high",phi:"high",custom:"high",code_context:"low",config:"low"},no={monitor:{name:"Monitor",action:"log",reversible:!1,description:"Log every match for audit. The request is allowed through untouched."},warn:{name:"Warn",action:"warn",reversible:!1,description:"Allow the request, but warn the user inline before it is sent."},redact:{name:"Redact",action:"redact",reversible:!1,description:"Strip the matched value from the request and destroy it, then continue. What was removed cannot be recovered."},vault:{name:"Redact & Vault",action:"redact",reversible:!0,description:"Strip the matched value from the request and keep an encrypted, recoverable copy in the local vault, leaving a pointer in its place. Needs the vault consent granted under Settings; without it this behaves as Redact."},block:{name:"Block",action:"block",reversible:!1,description:"Refuse the request entirely whenever any rule in this detection matches."}};function nc(e){return no[e].action}let nd=[...new Set(ns.map(nc))],nx=[...H.filter(e=>!nd.includes(e)),...nd];function nm(e){return nx.indexOf(e)}function nu(e,t){return nm(e)>=nm(t)}s.Ik({floor:na,locked:s.zM()}).describe("PackPolicyFloor");let np=ns.filter(e=>!no[e].reversible);ns.filter(e=>no[e].reversible);let nh=s.k5(np).meta({id:"CategoryPolicyId"});Object.fromEntries(B.options.map(e=>[e,nc(function(e){if(nl.includes(e))return"monitor";let t=nr[e];return"critical"===t||"high"===t?"warn":"monitor"}(e))])),Object.fromEntries(ns.map(e=>[e,{id:e,...no[e]}]));let ng=s.Ik({id:s.Yj(),name:s.Yj(),ruleCount:s.ai().int().nonnegative(),enabled:s.zM()}).meta({id:"UsedByItem"}),nf=s.Ik({id:s.Yj(),kind:ne,name:s.Yj(),enabled:s.zM(),usedByCount:s.ai().int().nonnegative()}).meta({id:"PolicyListItem"});s.Ik({items:s.YO(nf)}).meta({id:"ListPoliciesResponse"}),s.Ik({specVersion:s.eu(1),id:s.Yj(),kind:ne,name:s.Yj(),enabled:s.zM(),description:s.Yj(),usedBy:s.YO(ng)}).meta({id:"PolicyDetail"}),s.Ik({policies:s.ai().int().nonnegative(),builtin:s.ai().int().nonnegative(),custom:s.ai().int().nonnegative(),detectionsGoverned:s.ai().int().nonnegative()}).meta({id:"PolicyStatsResponse"});let nj=B.options.join("|"),nv=new RegExp("\\[\\[aka:(?:".concat(nj,"):[A-Z2-7]{2,7}\\.[A-Z2-7]{26}\\.[A-Z2-7]{16}\\]\\]")),nb=new RegExp("^".concat(nv.source,"$"));s.Yj().regex(nb),s.Ik({category:B,keyVersion:s.ai().int().positive(),pointerId:s.Yj(),tag:s.Yj()}),s.Ik({pointerId:s.Yj(),valueFingerprint:s.Yj().regex(/^[0-9a-f]{64}$/),fingerprintKeyVersion:s.ai().int().positive(),keyVersion:s.ai().int().positive(),category:B,ruleId:s.Yj(),maskedMatch:s.Yj(),provider:s.Yj().optional(),ciphertext:s.Yj(),nonce:s.Yj(),authTag:s.Yj(),occurrenceCount:s.ai().int().nonnegative(),userAuthorized:s.zM(),firstSeen:s.Yj(),lastSeen:s.Yj()}),s.Ik({category:B,provider:s.Yj().optional(),maskedMatch:s.Yj(),occurrences:s.ai().int().nonnegative(),firstSeen:s.Yj(),lastSeen:s.Yj()}),s.Ik({ruleId:s.Yj(),valueFingerprint:s.Yj().regex(/^[0-9a-f]{64}$/),fingerprintKeyVersion:s.ai().int().positive()});let nk=s.k5(["human","model"]),ny=s.k5(["display","explicit-reveal","view-render","model-input","remediation","purge"]),nN=s.k5(["revealed","refused","unavailable"]),nw=["display","view-render"];function nC(e){return nw.includes(e)}let nY=s.Ik({id:s.Os(),pointerId:s.Yj(),at:s.Yj(),target:nk,reason:ny,outcome:nN,grantId:s.Yj().optional(),pointerCount:s.ai().int().positive().default(1)}),nI=s.k5(["prompt","tool-input","tool-output","file","transcript"]),nS=s.Ik({location:s.Yj(),kind:nI,firstSeen:s.Yj(),lastSeen:s.Yj()}),nA=s.Ik({pointerId:s.Yj(),category:B,provider:s.Yj().optional(),maskedMatch:s.Yj(),occurrences:s.ai().int().nonnegative(),firstSeen:s.Yj(),lastSeen:s.Yj(),revealGrantId:s.Yj().nullable(),sightings:s.YO(nS)});s.Ik({limit:E.ai().int().min(1).max(200).optional(),cursor:s.Yj().optional()}),s.Ik({totals:s.Ik({values:s.ai().int().nonnegative()}),items:s.YO(nA),nextCursor:s.Yj().nullable()}),s.Ik({limit:E.ai().int().min(1).max(200).optional(),cursor:s.Yj().optional()}),s.Ik({totals:s.Ik({reused:s.ai().int().nonnegative()}),items:s.YO(nA),nextCursor:s.Yj().nullable()}),s.Ik({includeBatched:s.zM().optional(),limit:E.ai().int().min(1).max(200).optional(),cursor:s.Yj().optional()}),s.Ik({items:s.YO(nY),nextCursor:s.Yj().nullable(),hiddenBatched:s.ai().int().nonnegative()});let nz=s.Yj(),nM=s.k5(["masked","full","off"]),nO=s.Ik({acknowledgedAt:D.w$(),version:s.ai().int().positive()});function nR(e){return(null==e?void 0:e.version)===1}let nL=s.k5(["standalone","attached"]),nT=s.Ik({endpoint:s.Yj().min(1),label:s.Yj().min(1).optional(),attachedAt:D.w$()}).meta({id:"ControlPlaneConnection"}),nD=s.k5(["redact","warn"]),nE=s.k5(["full","session-only"]),nF=s.Ik({acknowledgedAt:D.w$(),payloadVersion:s.ai().int().positive()});function nP(e){return(null==e?void 0:e.payloadVersion)===1}let nV=s.Ik({acknowledgedAt:D.w$(),payloadVersion:s.ai().int().positive(),endpoint:s.Yj()});function n_(e,t){return void 0!==e&&void 0!==t&&3===e.payloadVersion&&e.endpoint===t}function nB(e,t){return void 0!==e&&void 0!==t&&e.endpoint===t&&3!==e.payloadVersion}let n$=s.Ik({enabled:s.zM().default(!1),retainDays:s.ai().int().min(1).max(3650).default(30)}).meta({id:"BodyRetention"});function nK(e){return"attached"===e.runMode&&void 0!==e.controlPlane}function nH(e){var t;return null!=(t=e.label)?t:e.endpoint}s.Ik({specVersion:s.ai().int().positive().default(8),runMode:nL.default("standalone"),controlPlane:nT.optional(),policy:nD.default("redact"),historicalAccess:nE.default("session-only"),dataSharesInPlace:s.zM().default(!0),vaultConsent:nO.optional(),vaultKeyCustody:nz.default("file"),vaultInlineReveal:nM.default("masked"),redactFallback:ni.default("warn"),onboardedAt:D.w$().optional(),modelJudgeConsent:nF.optional(),historySyncConsent:nV.optional(),bodyRetention:n$.default({enabled:!1,retainDays:30})});var nW=n(358);let nU=s.k5(["runMode","historicalAccess","vaultConsent","vaultKeyCustody","vaultInlineReveal","modelJudgeConsent","dataSharesInPlace","redactFallback","bodyRetention"]).meta({id:"ManagedSettingKey"}),nG=s.Ik({runMode:s.k5(["standalone","attached"]).optional(),controlPlane:s.Ik({endpoint:s.Yj().min(1),label:s.Yj().min(1).optional()}).optional(),historicalAccess:s.k5(["full","session-only"]).optional(),vaultConsent:s.zM().optional(),vaultKeyCustody:s.k5(["file","keychain"]).optional(),vaultInlineReveal:s.k5(["masked","full","off"]).optional(),modelJudgeConsent:s.zM().optional(),dataSharesInPlace:s.zM().optional(),redactFallback:ni.optional(),bodyRetention:n$.optional()}).meta({id:"ManagedSettingsValues"});s.Ik({specVersion:s.ai().int().positive().default(1),organization:s.Yj().min(1).optional(),values:s.g1(s.Yj(),s.L5()).default({}),lockedFields:s.YO(s.Yj()).default([])}).transform((e,t)=>{let{lockedFields:n,values:s,...a}=e,i=[],l=[];for(let e of n)nU.safeParse(e).success?i.push(e):l.push(e);let r=Object.create(null),o=[];for(let[e,t]of Object.entries(s))Object.hasOwn(nG.shape,e)?r[e]=t:o.push(e);let c=nG.safeParse(r);if(!c.success){for(let e of c.error.issues)t.addIssue({...e,path:["values",...e.path]});return nW.tm}return{...a,values:c.data,lockedFields:i,...l.length>0?{unknownLockedFields:l}:{},...o.length>0?{unknownValueFields:o}:{}}}).meta({id:"ManagedSettings"});let nq={present:!1,lockedFields:[]};function nZ(e,t){return e.present&&e.lockedFields.includes(t)}function nJ(e){var t;return"Managed by ".concat(null!=(t=e.organization)?t:"your organization")}let nX=s.Ik({path:s.Yj().min(1),name:s.Yj().min(1),origin:eF,defaultAccess:eE});s.Ik({files:s.YO(nX),truncated:s.zM(),scannedAt:s.Yj()});let nQ=["7d","30d","3m","6m"],n0=s.k5(nQ).meta({id:"TimeRange"}),n1="7d";n0.catch(n1);let n2=s.k5(["still-valid","unknown","invalid"]),n3=s.Ik({filePath:s.Yj(),span:W.optional()}).strict(),n5=s.Ik({provider:s.Yj(),maskedToken:s.Yj(),where:n3,state:n2,observedAt:D.w$().optional()}).strict();s.Ik({provider:s.Yj(),maskedToken:s.Yj(),consolePath:s.Yj(),occurrenceSpread:s.ai().int().positive()}).strict();let n4=s.k5(["redact-rotation-checklist","redact-only","set-secret-redact","leave"]),n6=s.k5(["first-run","pre-push","secret-scan"]);s.Ik({entrySource:n6}).strict();let n7=s.Ik({id:n4,label:s.Yj()}),n8=s.Ik({kind:s.eu("decision"),entrySource:n6,secretCount:s.ai().int().positive(),prompt:s.Yj(),options:s.PV([n7.extend({id:s.eu("redact-rotation-checklist")}),n7.extend({id:s.eu("redact-only")}),n7.extend({id:s.eu("set-secret-redact")}),n7.extend({id:s.eu("leave")})])}),n9=s.Ik({kind:s.eu("no-decision")});s.gM("kind",[n8,n9]);let se=s.Ik({severity:$,count:s.ai().int().nonnegative(),caught:s.ai().int().nonnegative().optional(),openAtRest:s.ai().int().nonnegative().optional()}).meta({id:"SeveritySummaryItem"});s.Ik({total:s.ai().int().nonnegative(),needsRemediation:s.ai().int().nonnegative().optional(),bySeverity:s.YO(se)}).meta({id:"SeveritySummaryResponse"}),s.Ik({range:s.k5(nQ).default(n1)});let st=s.k5(["blocked","redacted","warned"]).meta({id:"EnforcementActionKind"}),sn=s.Ik({kind:st,count:s.ai().int().nonnegative(),delta:s.ai().int()}).meta({id:"EnforcementAction"});s.Ik({range:n0,total:s.ai().int().nonnegative(),actions:s.YO(sn)}).meta({id:"EnforcementActionsResponse"});let ss=s.k5(["day","week"]).meta({id:"TimeseriesGranularity"}),sa=s.Ik({timestamp:D.p6(),critical:s.ai().int().nonnegative(),high:s.ai().int().nonnegative(),medium:s.ai().int().nonnegative(),low:s.ai().int().nonnegative().optional()}).meta({id:"FindingsTimeseriesPoint"});s.Ik({range:n0,granularity:ss,points:s.YO(sa)}).meta({id:"FindingsTimeseriesResponse"});let si=s.Ik({timestamp:D.p6(),bySeverity:s.Ik({critical:s.ai().nonnegative().nullable(),high:s.ai().nonnegative().nullable(),medium:s.ai().nonnegative().nullable(),low:s.ai().nonnegative().nullable()})}).meta({id:"MttrTrendPoint"});s.Ik({range:n0,granularity:ss,points:s.YO(si)}).meta({id:"MttrTrendResponse"});let sl=s.Ik({findingKey:s.Yj(),ruleId:s.Yj(),severity:$,repo:s.Yj().optional(),path:s.Yj(),resolvedAt:D.w$(),detectedAt:D.w$()}).meta({id:"ResolvedFeedItem"});s.Ik({items:s.YO(sl)}).meta({id:"RecentlyResolvedResponse"});let sr=["repo","user"],so=s.k5(sr).meta({id:"SourceKind"}),sc=s.Ik({id:s.Yj(),name:s.Yj(),kind:so,findingsCount:s.ai().int().nonnegative()}).meta({id:"TopSource"});s.Ik({range:n0,items:s.YO(sc)}).meta({id:"TopSourcesResponse"}),s.Ik({range:s.k5(nQ).default(n1),limit:E.ai().int().min(1).max(50).default(5),kind:s.k5(sr).optional()});let sd=P.extract(["ClaudeCode","Cursor","Codex","Antigravity","ClaudeAi","ChatGpt","Copilot","Api"]).meta({id:"Provider"}),sx=s.Ik({provider:sd,coverage:s.ai().int().min(0).max(100),supported:s.zM()}).meta({id:"ScanCoverageProvider"});s.Ik({range:n0,providers:s.YO(sx)}).meta({id:"ScanCoverageResponse"});let sm=s.k5(["repo","user","team","policy","share","rule"]).meta({id:"SubjectType"}),su=s.Ik({type:sm,id:s.Yj(),label:s.Yj()}).meta({id:"RecommendationSubject"}),sp=s.k5(["apply","navigate"]).meta({id:"RecommendationActionMode"}),sh=s.Ik({mode:sp,type:s.Yj(),label:s.Yj(),href:s.Yj().optional(),policyId:s.Yj().optional(),teamId:s.Yj().optional()}).meta({id:"RecommendationAction"}),sg=s.Ik({id:s.Yj(),category:s.Yj(),severity:$,title:s.Yj(),description:s.Yj(),subjects:s.YO(su),action:sh}).meta({id:"RecommendedAction"});s.Ik({items:s.YO(sg)}).meta({id:"RecommendedActionsResponse"}),s.Ik({limit:E.ai().int().min(1).max(20).default(3)});let sf=s.Ik({type:s.Yj(),policyId:s.Yj().optional(),teamId:s.Yj().optional()}).meta({id:"AppliedAction"});s.Ik({id:s.Yj(),status:s.eu("applied"),appliedAction:sf}).meta({id:"ApplyRecommendedActionResponse"}),s.Ik({id:s.Yj(),status:s.eu("dismissed")}).meta({id:"DismissRecommendedActionResponse"}),s.Ik({id:s.Yj()});let sj=s.k5(["granted","revoked","unchanged"]).meta({id:"HistorySyncConsentChoice"}),sv=s.k5(["granted","revoked","unchanged"]).meta({id:"ModelJudgeConsentChoice"});s.Ik({historicalAccess:s.Yj(),modelJudgeConsent:sv,historySyncConsent:sj,vaultConsent:s.Yj(),vaultInlineReveal:s.Yj(),redactFallback:s.Yj(),bodyRetention:s.Ik({enabled:s.zM(),retainDays:s.ai()})}),s.Ik({endpoint:s.Yj(),label:tj(200).optional(),accessKey:s.Yj()}),s.Ik({ruleId:s.Yj(),category:B,severity:$,maskedMatch:s.Yj(),rawMatch:s.Yj(),context:s.Yj(),filePath:s.Yj().optional(),confidence:s.ai().min(0).max(1),id:s.Yj().optional(),valueFingerprint:s.Yj().optional(),keyVersion:s.ai().int().nonnegative().optional()});let sb=s.Ik({category:B,action:nh,reasoning:s.Yj(),genuineCount:s.ai().int().nonnegative(),fpCount:s.ai().int().nonnegative(),fpIds:s.YO(s.Yj())});s.Ik({perCategory:s.YO(sb),notes:s.Yj()});let sk=s.Ik({total:s.ai().int().nonnegative(),important:s.ai().int().nonnegative(),routine:s.ai().int().nonnegative()}).refine(e=>e.total===e.important+e.routine,{message:"total must equal important + routine",path:["total"]}),sy=s.Ik({ruleId:s.Yj(),category:B,valueFingerprint:s.Yj(),keyVersion:s.ai().int().nonnegative()}),sN=s.Ik({pattern:s.Yj(),count:s.ai().int().nonnegative(),values:s.YO(sy).min(1)}),sw=s.Ik({category:B,count:s.ai().int().nonnegative(),egress:s.zM()}),sC=s.Ik({counts:sk,routineCategories:s.YO(B),surfacedCategories:s.YO(B),findingKinds:s.YO(sw),posture:s.g1(B,na),maskedFindings:s.YO(n5).optional(),falsePositivePatterns:s.YO(sN).optional()}),sY=sb.pick({category:!0,genuineCount:!0,fpCount:!0}).extend({egress:s.zM()});s.Ik({categories:s.YO(sY),posture:s.g1(B,na)}),s.Ik({frame:sC,copy:s.Yj()}),s.k5(["scan","floor"]);let sI=s.Ik({id:s.k5(["enter-remediation","open-dashboard","not-now"]),label:s.Yj()}),sS=s.PV([sI.extend({id:s.eu("open-dashboard")}),sI.extend({id:s.eu("not-now")})]),sA=s.PV([sI.extend({id:s.eu("enter-remediation")}),sI.extend({id:s.eu("open-dashboard")}),sI.extend({id:s.eu("not-now")})]);s.Ik({worthALook:s.ai().int().nonnegative(),liveKeys:s.ai().int().nonnegative().optional(),options:s.KC([sS,sA])}).refine(e=>{var t;return e.options.some(e=>"enter-remediation"===e.id)===(null!=(t=e.liveKeys)?t:0)>0},{message:"the chain-entry option is present exactly when liveKeys > 0",path:["options"]}).refine(e=>{var t;return(null!=(t=e.liveKeys)?t:0)<=e.worthALook},{message:"liveKeys is a subset of worthALook and cannot exceed it",path:["liveKeys"]});let sz=s.k5(["site","estimated","none"]),sM=s.Ik({inputTokens:s.ai().int().nonnegative().optional(),outputTokens:s.ai().int().nonnegative().optional(),cacheReadInputTokens:s.ai().int().nonnegative().optional(),cacheCreationInputTokens:s.ai().int().nonnegative().optional()}),sO=s.Ik({toolUseId:s.Yj().min(1),toolName:s.Yj().min(1),target:s.Yj().optional(),isError:s.zM().optional(),inputSize:s.ai().int().nonnegative().optional(),outputSize:s.ai().int().nonnegative().optional()});s.Ik({messageId:s.Yj().min(1),startedAt:D.w$(),model:s.Yj().optional(),usage:sM.optional(),usageSource:sz,stopReason:s.Yj().optional(),conversationId:s.Yj().optional(),turnIndex:s.ai().int().nonnegative().optional(),toolCalls:s.YO(sO).default([]),responseText:s.Yj().optional(),truncated:s.zM().default(!1)}),s.Ik({patched:s.zM(),live:s.zM(),blind:s.zM(),sendsSeenDom:s.ai().int().nonnegative(),exchangesSeenNet:s.ai().int().nonnegative(),parseFailures:s.ai().int().nonnegative(),unparsedBodies:s.ai().int().nonnegative(),shapeMisses:s.YO(s.Yj()).default([])})},760:(e,t,n)=>{n.d(t,{BH:()=>U,BZ:()=>g,C1:()=>V,CT:()=>A,D3:()=>S,DQ:()=>ea,Ey:()=>T,JM:()=>K,K$:()=>W,Kp:()=>c,O4:()=>es,OK:()=>h,Qf:()=>O,Qq:()=>X,RR:()=>v,RY:()=>f,SY:()=>J,Sr:()=>N,Uy:()=>m,WI:()=>I,XA:()=>$,YJ:()=>M,ZL:()=>x,Ze:()=>et,Zu:()=>u,_0:()=>k,_G:()=>o,aR:()=>R,ai:()=>E,bM:()=>w,bN:()=>b,c1:()=>P,cZ:()=>L,f6:()=>ec,fC:()=>D,fN:()=>eo,fl:()=>d,hF:()=>H,hp:()=>ee,iB:()=>Q,iF:()=>y,jZ:()=>r,k3:()=>en,kp:()=>B,lm:()=>C,lo:()=>j,mL:()=>Y,mS:()=>ex,mo:()=>q,np:()=>G,ny:()=>p,oS:()=>el,pD:()=>l,qU:()=>ei,rX:()=>i,s3:()=>ed,sj:()=>er,ts:()=>Z,uv:()=>_,vK:()=>z,wy:()=>F});var s=n(2703);let a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"},i=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M8 2.5h8L21.5 8v8L16 21.5H8L2.5 16V8L8 2.5Z"}),(0,s.jsx)("path",{d:"M12 8v4"}),(0,s.jsx)("circle",{cx:"12",cy:"16",r:"1",fill:"currentColor",stroke:"none"})]}),l=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"m6 6 12 12"})]}),r=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("rect",{x:"3",y:"9",width:"18",height:"6",rx:"1.5",fill:"currentColor",stroke:"none"}),(0,s.jsx)("path",{d:"M3 5h18M3 19h12"})]}),o=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M14 4h6v6"}),(0,s.jsx)("path",{d:"M20 4 11 13"}),(0,s.jsx)("path",{d:"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4"})]}),c=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 19V5M6 11l6-6 6 6"})}),d=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})}),x=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 5v14M6 13l6 6 6-6"})}),m=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M4 20V10M10 20V4M16 20v-7M22 20H2"})}),u=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M12 3 4.5 6v5.5c0 4.6 3.2 7.6 7.5 9 4.3-1.4 7.5-4.4 7.5-9V6L12 3Z"}),(0,s.jsx)("path",{d:"m9 12 2 2 4-4"})]}),p=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"8",r:"3.6"}),(0,s.jsx)("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0"})]}),h=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M6 8.4v7.2"}),(0,s.jsx)("circle",{cx:"6",cy:"6",r:"2.4"}),(0,s.jsx)("circle",{cx:"6",cy:"18",r:"2.4"}),(0,s.jsx)("circle",{cx:"18",cy:"7",r:"2.4"}),(0,s.jsx)("path",{d:"M18 9.4a8.6 8.6 0 0 1-8.6 8.6"})]}),g=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M12 3.5 13.6 9 19 10.5 13.6 12 12 17.5 10.4 12 5 10.5 10.4 9 12 3.5Z"}),(0,s.jsx)("path",{d:"M18 16.5 18.7 19 21 19.7 18.7 20.4 18 23 17.3 20.4 15 19.7 17.3 19 18 16.5Z"})]}),f=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"8",cy:"12",r:"4"}),(0,s.jsx)("path",{d:"M11.5 12H21l-2 2.4M16.5 12v3"})]}),j=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"m8 8-4 4 4 4M16 8l4 4-4 4M13.5 6l-3 12"})}),v=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("rect",{x:"4",y:"4",width:"16",height:"7",rx:"2"}),(0,s.jsx)("rect",{x:"4",y:"13",width:"16",height:"7",rx:"2"}),(0,s.jsx)("circle",{cx:"8",cy:"7.5",r:"1",fill:"currentColor",stroke:"none"}),(0,s.jsx)("circle",{cx:"8",cy:"16.5",r:"1",fill:"currentColor",stroke:"none"})]}),b=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("ellipse",{cx:"12",cy:"6",rx:"7",ry:"3"}),(0,s.jsx)("path",{d:"M5 6v12c0 1.7 3.1 3 7 3s7-1.3 7-3V6"}),(0,s.jsx)("path",{d:"M5 12c0 1.7 3.1 3 7 3s7-1.3 7-3"})]}),k=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M12 3 2 20h20L12 3Z"}),(0,s.jsx)("path",{d:"M12 9v5"}),(0,s.jsx)("circle",{cx:"12",cy:"17",r:"1",fill:"currentColor",stroke:"none"})]}),y=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M5 21V4M5 4h11l-2 3 2 3H5"})}),N=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"m5 12 4.5 4.5L19 7"})}),w=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2.6"})]}),C=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 3 4.5 6v5.5c0 4.6 3.2 7.6 7.5 9 4.3-1.4 7.5-4.4 7.5-9V6L12 3Z"})}),Y=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"m12 3 9 5-9 5-9-5 9-5Z"}),(0,s.jsx)("path",{d:"m3 13 9 5 9-5M3 16.5l9 5 9-5"})]}),I=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,s.jsx)("path",{d:"m20 20-3.2-3.2"})]}),S=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"m6 9 6 6 6-6"})}),A=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,s.jsx)("path",{d:"M4 9h16M8 3v4M16 3v4"})]}),z=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"m9 6 6 6-6 6"})}),M=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"m15 6-6 6 6 6"})}),O=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M4 8h10M18 8h2M4 16h2M10 16h10"}),(0,s.jsx)("circle",{cx:"16",cy:"8",r:"2.2"}),(0,s.jsx)("circle",{cx:"8",cy:"16",r:"2.2"})]}),R=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M4 4 20 20"}),(0,s.jsx)("path",{d:"M9.5 9.6A2.6 2.6 0 0 0 12 14.6c.7 0 1.3-.25 1.8-.7M6.5 6.7C3.8 8.3 2.5 12 2.5 12S6 18.5 12 18.5c1.5 0 2.8-.4 4-1M17.5 17.3C20.2 15.7 21.5 12 21.5 12S18 5.5 12 5.5c-.5 0-1 0-1.4.1"})]}),L=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M8 4c-2 0-2 2-2 4s0 3-2 4c2 1 2 2 2 4s0 4 2 4M16 4c2 0 2 2 2 4s0 3 2 4c-2 1-2 2-2 4s0 4-2 4"})}),T=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M2 12C2 6.5 6.5 2 12 2a10 10 0 0 1 8 4"}),(0,s.jsx)("path",{d:"M5 19.5C5.5 18 6 15 6 12c0-.7.12-1.37.34-2"}),(0,s.jsx)("path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02"}),(0,s.jsx)("path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"}),(0,s.jsx)("path",{d:"M8.65 22c.21-.66.45-1.32.57-2"}),(0,s.jsx)("path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88"}),(0,s.jsx)("path",{d:"M2 16h.01"}),(0,s.jsx)("path",{d:"M21.8 16c.2-2 .13-5.354 0-6"}),(0,s.jsx)("path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2"})]}),D=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"M3 12h18"}),(0,s.jsx)("path",{d:"M12 3c2.6 2.6 2.6 15.4 0 18M12 3c-2.6 2.6-2.6 15.4 0 18"})]}),E=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16"}),(0,s.jsx)("path",{d:"M15 9h4a1 1 0 0 1 1 1v11"}),(0,s.jsx)("path",{d:"M3 21h18"}),(0,s.jsx)("path",{d:"M8 8h3M8 12h3M8 16h3"})]}),F=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"5",r:"1.4",fill:"currentColor",stroke:"none"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"1.4",fill:"currentColor",stroke:"none"}),(0,s.jsx)("circle",{cx:"12",cy:"19",r:"1.4",fill:"currentColor",stroke:"none"})]}),P=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 5v14M5 12h14"})}),V=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"m8.5 12 2.3 2.3 4.7-4.6"})]}),_=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M6 6 18 18M18 6 6 18"})}),B=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M8 6h12M8 12h12M8 18h12"}),(0,s.jsx)("circle",{cx:"3.6",cy:"6",r:"1.1",fill:"currentColor",stroke:"none"}),(0,s.jsx)("circle",{cx:"3.6",cy:"12",r:"1.1",fill:"currentColor",stroke:"none"}),(0,s.jsx)("circle",{cx:"3.6",cy:"18",r:"1.1",fill:"currentColor",stroke:"none"})]}),$=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("rect",{x:"5",y:"11",width:"14",height:"9",rx:"2"}),(0,s.jsx)("path",{d:"M8 11V8a4 4 0 0 1 8 0v3"})]}),K=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 20V9M7 13l5-5 5 5M5 4h14"})}),H=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"6",cy:"18",r:"2.4"}),(0,s.jsx)("path",{d:"M8.4 18H16a3 3 0 0 0 0-6H8a3 3 0 0 1 0-6h7.6"}),(0,s.jsx)("circle",{cx:"18",cy:"6",r:"2.4"})]}),W=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M3 13h5l1.5 3h5L16 13h5"}),(0,s.jsx)("path",{d:"M5 5h14l2 8v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5L5 5Z"})]}),U=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M3 12h3l2-5 4 14 3-9 2 2h4"})}),G=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M3 12h4l3 8 4-16 3 8h4"})}),q=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"M12 11v5"}),(0,s.jsx)("circle",{cx:"12",cy:"7.7",r:"1",fill:"currentColor",stroke:"none"})]}),Z=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M12 21s7-6.3 7-11a7 7 0 1 0-14 0c0 4.7 7 11 7 11Z"}),(0,s.jsx)("circle",{cx:"12",cy:"10",r:"2.4"})]}),J=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M6 3h11a1 1 0 0 1 1 1v17l-3-2-3 2-3-2-3 2V4a1 1 0 0 1 1-1Z"}),(0,s.jsx)("path",{d:"M9 8h6M9 12h5"})]}),X=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M7 17 17 7M8 7h9v9"})}),Q=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M6 3h9l3 3v15H6z"}),(0,s.jsx)("path",{d:"M15 3v3h3"}),(0,s.jsx)("path",{d:"M9 12h6M9 16h4"})]}),ee=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5.5 5.5 0 0 1 17 9.5a3.75 3.75 0 0 1 .5 7.5H7Z"})}),et=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),en=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,s.jsx)("path",{d:"m7 9 3 3-3 3M13 15h4"})]}),es=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"M12 7.5V12l3 2"})]}),ea=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8Z"})}),ei=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M4 20h4L19 9l-4-4L4 16v4Z"}),(0,s.jsx)("path",{d:"m14 6 4 4"})]}),el=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M6 3h8l4 4v14H6z"}),(0,s.jsx)("path",{d:"M14 3v4h4"})]}),er=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})}),eo=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),(0,s.jsx)("path",{d:"M21 3v5h-5"}),(0,s.jsx)("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"}),(0,s.jsx)("path",{d:"M3 21v-5h5"})]}),ec=e=>(0,s.jsxs)("svg",{...a,...e,children:[(0,s.jsx)("path",{d:"M7 4 3 8l4 4"}),(0,s.jsx)("path",{d:"M3 8h14"}),(0,s.jsx)("path",{d:"m17 20 4-4-4-4"}),(0,s.jsx)("path",{d:"M21 16H7"})]}),ed=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M12 4v11M7 11l5 5 5-5M5 20h14"})}),ex=e=>(0,s.jsx)("svg",{...a,...e,children:(0,s.jsx)("path",{d:"M14 4h6v6M20 4l-7 7M10 20H4v-6M4 20l7-7"})})},907:(e,t,n)=>{n.d(t,{FindingDetailView:()=>g,formatConfidence:()=>p});var s=n(2703),a=n(347),i=n(1759),l=n(3878),r=n(760),o=n(1145),c=n(8809),d=n(9455);function x(e){let{delivery:t,deployment:n,renderedAt:i}=e,r=(0,d.dL)(t.state);return(0,s.jsx)("div",{className:"col-span-2",children:(0,s.jsx)(l.p,{label:"Deployment",children:(0,s.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,s.jsx)(a.Ex,{variant:r.badge,className:"h-6",children:r.label}),(0,s.jsx)("span",{className:"text-xs font-normal text-text-2",children:(0,d.Ad)(t,n,i)}),(0,s.jsx)("span",{className:"text-xs font-normal text-text-3",children:"Based on its latest detection."})]})})})}var m=n(3399),u=n(2036);function p(e){let t=e.toFixed(2);return e>=.9?{label:"High \xb7 ".concat(t),tone:"text-ok-ink"}:e>=.7?{label:"Medium \xb7 ".concat(t),tone:"text-sev-high-ink"}:{label:"Low \xb7 ".concat(t),tone:"text-text-2"}}function h(e){let{confidence:t}=e,{label:n,tone:a}=p(t);return(0,s.jsx)("span",{className:a,children:n})}function g(e){var t;let{selection:n,onSelectInstance:o,onBack:p,footer:g,deployment:v,renderedAt:b}=e,{finding:k,instance:y}=n,N=null!=(t=d.y7[k.category])?t:r.RY,w=!y,C=k.providers.length,Y=(0,d.Jm)(k.category);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.Fm,{className:"flex-row items-center gap-2.5 border-b border-border p-4 pr-12",children:[(0,s.jsx)(a.Pt,{severity:k.severity}),(0,s.jsx)(a.qp,{className:"font-mono text-xs font-semibold text-text-3",children:w?Y:y.id})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 pb-4",children:[!w&&(0,s.jsxs)(a.$n,{variant:"link",tone:"primary",size:"sm",onClick:p,className:"self-start",children:[(0,s.jsx)(r.YJ,{"aria-hidden":!0,focusable:!1,className:"size-4"}),"Back to finding"]}),(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:(0,a.cn)("flex size-10 shrink-0 items-center justify-center rounded-lg",(0,d.i9)(k.category)),children:(0,s.jsx)(N,{className:"size-5"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"font-display text-base font-semibold",children:k.subtype}),(0,s.jsx)("span",{className:"text-xs text-text-3",children:w?"".concat(String(k.instanceCount)," locations \xb7 ").concat(String(C)," tool").concat(C>1?"s":""):"".concat(Y," \xb7 ").concat(y.repo," \xb7 detected ").concat((0,i.K)(y.detectedAt,b))})]})]}),(0,s.jsx)(f,{code:k.match.contextPrefix,snippet:k.match.maskedValue,file:w?"".concat(String(k.instanceCount)," locations"):(0,d.xE)(y)}),w?(0,s.jsxs)("div",{children:[(0,s.jsx)(l.e,{children:"Locations"}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:k.instances.map(e=>(0,s.jsx)(j,{instance:e,onClick:()=>{o(e)}},e.id))}),k.instances.length<k.instanceCount&&(0,s.jsx)("p",{className:"pt-2 text-xs text-text-3",children:0===k.instances.length?"No locations here match the current filters — the group has ".concat(String(k.instanceCount)," locations in total."):"Showing the ".concat(String(k.instances.length)," most recent of ").concat(String(k.instanceCount)," locations.")})]}):(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,s.jsx)(l.p,{label:"Source tool",children:(0,s.jsx)(m.i,{provider:y.provider})}),(0,s.jsx)(l.p,{label:"Repository",children:(0,s.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:y.repo})}),(0,s.jsx)(l.p,{label:"Location",children:(0,s.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:(0,d.xE)(y)})}),(0,s.jsx)(l.p,{label:"Action taken",children:(0,s.jsx)(c.T,{action:y.action})}),(0,s.jsx)(l.p,{label:"Detected",children:(0,i.K)(y.detectedAt,b)}),(0,s.jsx)(l.p,{label:"Confidence",children:(0,s.jsx)(h,{confidence:y.confidence})}),void 0!==y.user&&(0,s.jsx)(l.p,{label:"User",children:(0,s.jsx)("span",{title:d.O,children:(0,s.jsx)(u.c,{user:y.user})})}),null!=v&&void 0!==y.delivery&&(0,s.jsx)(x,{delivery:y.delivery,deployment:v,renderedAt:b})]}),g]})]})}function f(e){let{code:t,snippet:n,file:a}=e;return(0,s.jsxs)("div",{children:[(0,s.jsxs)(l.e,{className:"flex items-center gap-2",children:["Matched content",(0,s.jsx)(r.aR,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-ink p-3.5 font-mono text-xs leading-relaxed text-code-fg",children:[(0,s.jsx)("div",{className:"text-code-muted wrap-break-word",children:"// ".concat(a)}),(0,s.jsxs)("div",{children:[t,(0,s.jsx)("span",{className:"rounded bg-sev-critical/20 px-1 py-0.5 text-code-err wrap-break-word",children:'"'.concat(n,'"')}),";"]})]})]})}function j(e){let{instance:t,onClick:n}=e;return(0,s.jsxs)("button",{type:"button",onClick:n,className:"flex items-center cursor-pointer gap-3 rounded-lg border border-border bg-surface px-3 py-2.5 text-left transition-colors hover:bg-surface-2",children:[(0,s.jsx)(o.K,{id:t.provider}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text",children:t.repo}),(0,s.jsx)("span",{className:"font-mono text-label text-text-3 wrap-break-word",children:(0,d.xE)(t)}),void 0!==t.user&&(0,s.jsx)("span",{className:"text-label text-text-3 wrap-break-word",children:t.user.name})]}),(0,s.jsx)(c.T,{action:t.action}),(0,s.jsx)(r.vK,{className:"size-4 shrink-0 text-text-3"})]})}},919:(e,t,n)=>{n.d(t,{UpdateModal:()=>r});var s=n(2703),a=n(347),i=n(760),l=n(3783);function r(e){var t,n,r,o,c,d,x;let{det:m,isUpdating:u,onClose:p,onConfirm:h}=e,g=m?null!=(o=null!=(r=null==(t=m.update)?void 0:t.latestVersion)?r:m.latestVersion)?o:m.version:"",f=null==m||null==(n=m.update)?void 0:n.latestRuleCount,j=!!m&&g!==m.version;return(0,s.jsx)(a.lG,{open:!!m,onOpenChange:e=>{e||p()},children:(0,s.jsx)(a.Cf,{className:"w-155 max-w-[96vw]","aria-describedby":void 0,children:m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.L3,{className:"sr-only",children:["Update \xb7 ",m.name]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-5 py-4",children:[(0,s.jsx)("span",{className:"grid size-9.5 shrink-0 place-items-center rounded-lg bg-sev-high-fill text-sev-high-ink",children:(0,s.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"font-display text-base font-semibold text-text",children:["Update “",m.name,"”"]}),(0,s.jsxs)("div",{className:"text-xs text-text-3",children:["From the detection library \xb7 ",null!=(c=m.publisher)?c:m.namespace]})]}),(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:p,"aria-label":"Close",className:"size-8 text-text-3",children:(0,s.jsx)(i.uv,{"aria-hidden":!0,focusable:!1})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-5 overflow-y-auto p-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"rounded-lg border border-border bg-surface-2 px-3 py-1.5 font-mono text-sm font-semibold text-text-2",children:j?"v".concat(m.version):"".concat(String(m.ruleCount)," rules")}),(0,s.jsx)(i.fl,{"aria-hidden":!0,focusable:!1,className:"size-4 text-text-3"}),(0,s.jsx)("span",{className:"rounded-lg border border-sev-high bg-sev-high-fill px-3 py-1.5 font-mono text-sm font-bold text-sev-high-ink",children:j?"v".concat(g):"".concat(String(null!=f?f:m.ruleCount)," rules")}),(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsx)(l.Jk,{publisher:null!=(d=m.publisher)?d:m.namespace,kind:null!=(x=m.publisherKind)?x:"user"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg border border-ok bg-ok-fill px-3 py-2.5",children:[(0,s.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0 text-ok-ink"}),(0,s.jsx)("div",{className:"text-sm text-text-2",children:"Updates are never applied automatically — your enabled state and policy assignment are preserved."})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 border-t border-border px-5 py-4",children:[(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsx)(a.$n,{variant:"outline",tone:"neutral",onClick:p,children:"Cancel"}),(0,s.jsxs)(a.$n,{variant:"solid",tone:"primary",disabled:u,onClick:()=>{h(m.id)},children:[(0,s.jsx)(i.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"}),u?"Updating…":j?"Update to v".concat(g):"Update rules"]})]})]})})})}},980:(e,t,n)=>{n.d(t,{MatcherModal:()=>g,RuleInspectorBody:()=>h});var s=n(2703),a=n(347),i=n(760),l=n(8230);function r(e,t){return e.length>t?"".concat(e.slice(0,t),"…"):e}function o(e){let{hidden:t}=e;return t<=0?null:(0,s.jsxs)("div",{className:"text-xs text-text-2",children:["+",String(t)," more not shown"]})}function c(e){let{children:t}=e;return(0,s.jsx)("span",{className:"inline-flex h-6 items-center rounded-md border border-border bg-surface-2 px-2 font-mono text-xs text-text-2",children:t})}function d(e){let{children:t,emphasis:n=!1}=e;return(0,s.jsx)("code",{className:"block break-all rounded-md border border-border bg-surface-2 px-2.5 font-mono text-xs "+(n?"py-2 text-text":"py-1.5 text-text-2"),children:t})}function x(e){let{matcher:t}=e;return"regex"===t.type?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(m,{label:"Pattern",children:(0,s.jsx)(d,{emphasis:!0,children:t.pattern})}),(0,s.jsx)(m,{label:"Flags",children:(0,s.jsx)("code",{className:"font-mono text-xs text-text-2",children:t.flags||"—"})}),"number"==typeof t.captureGroup&&(0,s.jsx)(m,{label:"Capture group",children:(0,s.jsx)("span",{className:"font-mono text-xs text-text-2",children:t.captureGroup})})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(m,{label:"Keywords",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.keywords.map((e,t)=>(0,s.jsx)(c,{children:e},"".concat(e,"-").concat(String(t))))})}),(0,s.jsx)(m,{label:"Case sensitive",children:(0,s.jsx)("span",{className:"text-xs text-text-2",children:t.caseSensitive?"Yes":"No"})})]})}function m(e){let{label:t,children:n}=e;return(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("div",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:t}),n]})}function u(e){var t,n,a,i;let{rule:o}=e,d=o.requiresNearby,x=d?[...(null!=(n=d.categories)?n:[]).map(e=>"category ".concat(l.gh[e]||e)),...(null!=(a=d.ruleIds)?a:[]).map(e=>"rule ".concat(e)),...(null!=(i=d.labels)?i:[]).map(e=>'"'.concat(e,'"'))]:[];return o.appliesTo||(null==(t=o.postValidators)?void 0:t.length)||d?(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-3",children:[o.appliesTo&&(0,s.jsx)(m,{label:"Only in files",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.appliesTo.extensions.map((e,t)=>(0,s.jsx)(c,{children:e},"".concat(e,"-").concat(String(t))))})}),o.postValidators&&o.postValidators.length>0&&(0,s.jsx)(m,{label:"Must also pass",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.postValidators.map((e,t)=>{var n;let a="string"==typeof e?e:e.name,i="string"!=typeof e&&(n=e.config)?Object.entries(n).flatMap(e=>{let[t,n]=e;return"string"==typeof n||"number"==typeof n||"boolean"==typeof n?["".concat(r(t,120)," ").concat(r(String(n),120))]:[]}).slice(0,6).join(" \xb7 "):"";return(0,s.jsx)(c,{children:i?"".concat(a," \xb7 ").concat(i):a},"".concat(a,"-").concat(String(t)))})})}),d&&(0,s.jsxs)(m,{label:"Needs corroboration within ".concat(String(d.windowChars)," chars"),children:[(0,s.jsx)("div",{className:"text-xs leading-snug text-text-2",children:x.length>1?"Any of: ".concat(x.join(" \xb7 ")):x.join(" \xb7 ")}),void 0!==d.confidenceBoost&&(0,s.jsxs)("div",{className:"text-xs leading-snug text-text-3",children:["Corroborated matches gain ",String(d.confidenceBoost)," confidence"]})]})]}):null}function p(e){let{fixtures:t}=e,n=t.slice(0,20);return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[n.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-flex h-5 items-center rounded-full px-2 text-label font-semibold "+(e.shouldMatch?"bg-ok-fill text-ok-ink":"bg-surface-3 text-text-2"),children:e.shouldMatch?"matches":"does not match"}),(0,s.jsx)("span",{className:"text-xs text-text-2",children:r(e.label,120)}),void 0!==e.filePath&&(0,s.jsx)("span",{className:"font-mono text-label text-text-3",children:r(e.filePath,120)})]}),(0,s.jsx)(d,{children:r(e.text,1e3)})]},"".concat(r(e.label,120),"-").concat(String(t)))),(0,s.jsx)(o,{hidden:t.length-n.length})]})}function h(e){var t;let{rule:n,fixtures:a}=e,c=l.rE[n.matcher.type];if(!c)return null;let h=c.icon,g=null!=(t=n.examples)?t:[],j=(null==a?void 0:a.ruleId)===n.id?a.cases:[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,s.jsx)(f,{icon:(0,s.jsx)(i.kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:l.gh[n.category]||n.category}),(0,s.jsx)(f,{icon:(0,s.jsx)(h,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:c.blurb})]}),(0,s.jsx)(x,{matcher:n.matcher}),(0,s.jsx)(u,{rule:n}),g.length>0&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(m,{label:"Catches values like",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[g.slice(0,20).map((e,t)=>{let n=r(e,1e3);return(0,s.jsx)(d,{children:n},"".concat(n,"-").concat(String(t)))}),(0,s.jsx)(o,{hidden:g.length-20})]})})}),j.length>0&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(m,{label:"Test cases (".concat(String(j.length),")"),children:(0,s.jsx)(p,{fixtures:j})})})]})}function g(e){let{rule:t,fixtures:n,onClose:r}=e,o=!!t,c=t?l.rE[t.matcher.type]:null,d=null==c?void 0:c.icon;return(0,s.jsx)(a.lG,{open:o,onOpenChange:e=>{e||r()},children:(0,s.jsx)(a.Cf,{className:"max-w-3xl","aria-describedby":void 0,children:t&&c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.L3,{className:"sr-only",children:["Rule \xb7 ",t.name]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-5 py-4",children:[(0,s.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg",style:{background:c.fill,color:c.color},children:d&&(0,s.jsx)(d,{"aria-hidden":!0,focusable:!1,className:"size-4.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"font-display text-base font-semibold text-text",children:t.name}),(0,s.jsx)(a.Pt,{severity:t.severity})]}),(0,s.jsx)("div",{className:"mt-px font-mono text-xs text-text-3",children:t.id})]}),(0,s.jsx)("span",{className:"rounded-full px-2.5 py-1 text-xs font-semibold",style:{background:c.fill,color:c.color},children:c.label}),(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:r,"aria-label":"Close",className:"size-8 text-text-3",children:(0,s.jsx)(i.uv,{"aria-hidden":!0,focusable:!1})})]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-5",children:(0,s.jsx)(h,{rule:t,fixtures:n})})]})})})}function f(e){let{icon:t,children:n}=e;return(0,s.jsxs)("span",{className:"inline-flex h-6 items-center gap-1.5 rounded-md border border-border bg-surface px-2 text-label font-medium text-text-2",children:[t,n]})}},1142:(e,t,n)=>{n.d(t,{RecommendedActionsCardView:()=>c});var s=n(2703),a=n(347),i=n(760),l=n(4762);let r={block_credentials:i.pD,redact_pii:i.jZ,review_external_share:i._G},o={critical:"critical",high:"primary",medium:"teal",low:"teal"};function c(e){let{items:t,isLoading:n,error:c,applyAction:d,dismissAction:x,isMutating:m,mutationError:u,viewAllHref:p}=e;return(0,s.jsxs)(a.Zp,{className:"flex flex-col shadow-sm",children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsx)(a.AG,{tone:"primary",children:(0,s.jsx)(i.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Recommended actions"}),(0,s.jsx)(a.BT,{children:n?"Loading…":"".concat(String(t.length)," open, prioritized for you")})]}),p?(0,s.jsx)(a.X9,{children:(0,s.jsx)(a.$n,{asChild:!0,variant:"ghost",tone:"primary",size:"sm",children:(0,s.jsx)("a",{href:p,children:"View all"})})}):null]}),(0,s.jsx)(a.Wu,{"aria-busy":n,children:c?(0,s.jsx)(l.rJ,{message:c}):n?(0,s.jsx)("div",{className:"flex flex-col gap-3 py-2",children:[0,1,2].map(e=>(0,s.jsx)(a.EA,{className:"h-20 w-full"},e))}):0===t.length?(0,s.jsx)("div",{className:"py-6 text-center text-xs text-text-3",children:"No open findings."}):(0,s.jsxs)(s.Fragment,{children:[u&&(0,s.jsx)(l.rJ,{message:u}),t.map((e,n)=>{var l;let c=null!=(l=r[e.category])?l:i.rX;return(0,s.jsxs)("div",{className:(0,a.cn)("flex gap-3 py-3",n<t.length-1&&"border-b border-hairline"),children:[(0,s.jsx)("span",{className:(0,a.cn)("flex size-8 shrink-0 items-center justify-center rounded-lg",a.id[o[e.severity]]),children:(0,s.jsx)(c,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text",children:e.title}),(0,s.jsx)("div",{className:"mt-0.5 text-xs leading-relaxed text-text-2",children:e.description}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:e.subjects.map(e=>(0,s.jsx)(a.vw,{children:e.label},"".concat(e.type,"_").concat(e.id)))})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1.5",children:["apply"===e.action.mode?(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:m,onClick:()=>{d(e.id)},children:e.action.label}):e.action.href?(0,s.jsx)(a.$n,{asChild:!0,variant:"solid",tone:"primary",size:"sm",children:(0,s.jsx)("a",{href:e.action.href,children:e.action.label})}):(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!0,children:e.action.label}),(0,s.jsx)(a.$n,{variant:"ghost",size:"sm",disabled:m,onClick:()=>{x(e.id)},children:"Dismiss"})]})]},e.id)})]})})]})}},1145:(e,t,n)=>{n.d(t,{K:()=>l,x:()=>i});var s=n(2703),a=n(723);let i={[a.tLs.ClaudeCode]:{label:"Claude Code",short:"CC",color:"#C96442"},[a.tLs.ClaudeDesktop]:{label:"Claude Desktop",short:"CD",color:"#A8553A"},[a.tLs.Cursor]:{label:"Cursor",short:"Cu",color:"#252F3D"},[a.tLs.Windsurf]:{label:"Windsurf",short:"Wf",color:"#0B8F7B"},[a.tLs.Codex]:{label:"Codex CLI",short:"Cx",color:"#10A37F"},[a.tLs.Antigravity]:{label:"Antigravity",short:"Ag",color:"#4285F4"},[a.tLs.Copilot]:{label:"GitHub Copilot",short:"Co",color:"#0581D4"},[a.tLs.ChatGpt]:{label:"ChatGPT",short:"GP",color:"#0d8f6f"},[a.tLs.ClaudeAi]:{label:"Claude.ai",short:"Ca",color:"#D97757"},[a.tLs.Api]:{label:"Anthropic API",short:"AP",color:"#6058E9"}};function l(e){let{id:t,size:n=24}=e,a=i[t];return(0,s.jsx)("span",{className:"flex shrink-0 items-center justify-center rounded-lg font-display font-bold text-white ring-1 ring-inset ring-mark-edge",style:{width:n,height:n,background:a.color,fontSize:.36*n},children:a.short})}},1460:(e,t,n)=>{n.d(t,{DU:()=>x,eF:()=>i,gi:()=>c,hv:()=>l,rO:()=>a,rU:()=>d,y3:()=>o,y6:()=>s.y6l,yr:()=>r});var s=n(723);function a(e,t){return null!==e.revokedAt?"revoked":null!==e.maxUses&&e.useCount>=e.maxUses?"consumed":null!==e.expiresAt&&Date.parse(e.expiresAt)<=t?"expired":"active"}function i(e,t){if((0,s.qEQ)(e.keyVersion,t))return null;switch(t.status){case"unreadable":return"The fingerprint key file cannot be read, so no recorded detection can be matched right now. Check the permissions on ~/.aka/data — do not delete the key.";case"absent":return"The fingerprint key file is missing, so the fingerprint recorded for this detection can no longer be matched. Trigger the detection again.";default:return"Recorded under fingerprint key v".concat(String(e.keyVersion),"; the key is now v").concat(String(t.version),", so a grant from it could never match. Trigger the detection again.")}}let l={active:"success",consumed:"default",expired:"default",revoked:"critical"},r={once:"Once",temporary:"Temporary",permanent:"Permanent"},o={suppress:"Suppress",reveal_to_model:"Reveal to model"},c={"cli-approve":"CLI approve","cli-add":"CLI add","web-approve":"Web approve","web-add":"Web add",api:"API","setup-triage":"Setup triage"},d=["once","30m","1h","24h","permanent"],x={once:"Once","30m":"30 min","1h":"1 hour","24h":"24 hours",permanent:"Permanent"}},1468:(e,t,n)=>{n.d(t,{HarnessOverview:()=>x});var s=n(2703),a=n(347),i=n(3847),l=n(1145),r=n(8048),o=n(8215),c=n(5654);let d=["block","redact","warn"];function x(e){var t,n,x;let{harness:p,events:h,onSelect:g,onSelectProject:f,renderedAt:j}=e,v=(null!=(n=null==(t=p.categories.find(e=>"mcp"===e.type))?void 0:t.assets)?n:[]).filter(e=>"unapproved"===e.trust).length,b=null!=(x=null==h?void 0:h.items)?x:[],k=null==h?void 0:h.counts,y=k?k.block+k.redact+k.warn:0;return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-4",children:[(0,s.jsx)(l.K,{id:p.id,size:38}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"font-display text-base font-semibold",children:p.label}),(0,s.jsxs)("div",{className:"mt-px text-xs text-text-3",children:[p.kind," \xb7 ",p.version]})]})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4.5 overflow-y-auto p-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2.5 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Recent blocks, redactions & warnings"}),k&&(0,s.jsx)("span",{className:"ml-auto inline-flex items-center gap-1.5",children:d.map(e=>{let t=k[e];return t>0?(0,s.jsxs)(a.Ex,{variant:o.iL[e].tone,children:[t," ",o.iL[e].label.toLowerCase()]},e):null})})]}),0===b.length?(0,s.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg border border-dashed border-border-strong px-3 py-3.5 text-text-3",children:[(0,s.jsx)(c.m,{name:"check-circle",className:"size-4 text-ok-ink"}),(0,s.jsx)("span",{className:"text-xs",children:"No blocks, redactions or warnings from this harness"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[b.map(e=>{let t=o.iL[e.kind],{day:n,time:l}=function(e,t){let n=new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return{day:(0,i.nt)(e,new Date(t)),time:n}}(e.occurredAt,j);return(0,s.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-7 shrink-0 place-items-center rounded-md",t.bg,t.fg),children:(0,s.jsx)(c.m,{name:t.icon,className:"size-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-semibold text-text",children:e.title}),(0,s.jsx)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:e.detail})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,s.jsx)(a.Ex,{variant:t.tone,children:t.label}),(0,s.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[n," \xb7 ",l]})]})]},"".concat(e.occurredAt,"\xb7").concat(e.title))}),y>b.length&&(0,s.jsxs)("div",{className:"pt-0.5 text-center text-xs text-text-3",children:["Showing ",b.length," of ",y," events"]})]})]}),(p.flagCount>0||v>0)&&(0,s.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg border border-border bg-sev-high-fill px-3 py-2.5",children:[(0,s.jsx)(c.m,{name:"flag",className:"size-4 shrink-0 text-sev-high-ink"}),(0,s.jsxs)("div",{className:"text-xs font-medium text-text",children:[p.flagCount>0&&"".concat(String(p.flagCount)," item").concat(1===p.flagCount?"":"s"," need review"),p.flagCount>0&&v>0&&" \xb7 ",v>0&&"".concat(String(v)," unapproved MCP").concat(1===v?"":"s")]})]}),p.projects.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Projects"}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:p.projects.length})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:p.projects.map(e=>(0,s.jsx)(m,{p:e,onSelect:f},e.id))})]}),0===p.categories.length&&0===p.projects.length&&(0,s.jsx)(r.EmptyState,{message:"No projects, skills, MCP servers, hooks or configuration for this harness"}),p.categories.map(e=>{let t=o.pA[e.type];return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:t.label}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:e.assets.length})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:e.assets.map(e=>(0,s.jsx)(u,{it:e,onSelect:g},e.id))})]},e.type)})]})]})}function m(e){let{p:t,onSelect:n}=e,a=t.accessCounts;return(0,s.jsxs)("button",{type:"button",onClick:()=>{n(t.id)},className:"flex w-full items-center gap-2.5 rounded-lg border border-border bg-surface px-2.5 py-2 text-left cursor-pointer hover:bg-surface-2",children:[(0,s.jsx)("span",{className:"size-2.5 shrink-0 rounded-full",style:{background:(0,o.Cs)(t.language)}}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"truncate text-xs font-semibold text-text",children:t.name}),(0,s.jsx)(r.yk,{v:t.visibility})]}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 truncate font-mono text-xs text-text-3",children:[(0,s.jsx)(c.m,{name:"repo",className:"size-3 shrink-0"}),t.repo]})]}),(0,s.jsx)(r.AJ,{counts:a}),a.blocked>0&&(0,s.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[a.blocked," blocked"]}),t.findingsCount>0&&(0,s.jsx)(r.Kh,{flags:["findings"],mini:!0}),(0,s.jsx)(c.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}function u(e){let{it:t,onSelect:n}=e,i=(0,o.TW)(t.type),l="mcp"===t.type?t.trust:void 0;return(0,s.jsxs)("button",{type:"button",onClick:()=>{n(t)},className:"flex w-full items-center gap-2.5 rounded-lg border border-border bg-surface px-2.5 py-2 text-left cursor-pointer hover:bg-surface-2",children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-6.5 shrink-0 place-items-center rounded-md",i.bg,i.fg),children:(0,s.jsx)(c.m,{name:i.icon,className:"size-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"truncate font-mono text-xs font-semibold text-text",children:t.name}),(0,s.jsx)("div",{className:"truncate font-mono text-xs text-text-3 mt-0.5",children:t.sub})]}),l&&(0,s.jsx)(r.As,{value:l}),t.flags.length>0&&(0,s.jsx)(r.Kh,{flags:t.flags,mini:!0}),(0,s.jsx)(c.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}},1486:(e,t,n)=>{n.d(t,{ActivityTokenUsageView:()=>d});var s=n(2703),a=n(347),i=n(6807),l=n(760),r=n(6442),o=n(3847);function c(e){let{summary:t}=e;return(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:"Provider"}),(0,s.jsx)(a.nd,{children:"Model"}),(0,s.jsx)(a.nd,{className:"text-right",children:"Input"}),(0,s.jsx)(a.nd,{className:"text-right",children:"Output"}),(0,s.jsx)(a.nd,{className:"text-right",children:"Cache"}),(0,s.jsx)(a.nd,{className:"text-right",children:"Total"}),(0,s.jsx)(a.nd,{className:"text-right",children:"Cost"})]})}),(0,s.jsx)(a.BF,{children:t.models.map(e=>(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nA,{className:"text-text-2",children:e.provider}),(0,s.jsx)(a.nA,{className:"max-w-40 truncate font-mono text-text",title:e.model,children:e.model}),(0,s.jsx)(a.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.inputTokens)}),(0,s.jsx)(a.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.outputTokens)}),(0,s.jsx)(a.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.cacheTokens)}),(0,s.jsx)(a.nA,{className:"text-right font-semibold tabular-nums text-text",children:(0,o.Sk)(e.totalTokens)}),(0,s.jsx)(a.nA,{className:"text-right tabular-nums text-text",children:null!==e.estimatedCostUsd?(0,o.UK)(e.estimatedCostUsd):"—"})]},"".concat(e.provider," ").concat(e.model)))})]})}function d(e){let{summary:t,isLoading:n,error:d,rangeLabel:x}=e,[m,u]=(0,i.useState)(!1);if(n&&!t)return(0,s.jsx)(a.EA,{className:"h-9 w-44 rounded-lg","aria-busy":!0});let p=null!==t&&t.models.length>0,h=d?"Token usage":p?"".concat((0,o.Sk)(t.totalTokens)," tokens \xb7 ").concat((0,o.xd)(t.estimatedCostUsd,t.costIsPartial)):"No token usage",g=d?"Token usage could not be read — ".concat(d):p?"Token usage".concat(x?" \xb7 ".concat(x):""," — ").concat(String(t.sessionCount)," session").concat(1===t.sessionCount?"":"s",". Open the per-model breakdown."):"No token usage recorded yet — open for details";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.$n,{variant:"outline",size:"md",title:g,"aria-label":"Token usage — open the per-model breakdown",onClick:()=>{u(!0)},children:[(0,s.jsx)(l.Uy,{"aria-hidden":!0,focusable:!1,className:d?"size-4 text-sev-critical-ink":"size-4 text-primary"}),(0,s.jsx)("span",{className:"max-w-56 truncate tabular-nums",children:h})]}),(0,s.jsx)(a.cj,{open:m,onOpenChange:u,children:(0,s.jsxs)(a.h,{className:"w-200 max-w-[94%] gap-0 overflow-hidden p-0","aria-describedby":void 0,children:[(0,s.jsxs)(a.Fm,{className:"shrink-0 border-b border-border px-5 py-4",children:[(0,s.jsxs)(a.qp,{className:"flex items-center gap-2",children:[(0,s.jsx)(l.Uy,{"aria-hidden":!0,focusable:!1,className:"size-4 text-primary"}),"Token usage",x&&(0,s.jsxs)("span",{className:"text-ui font-normal text-text-3",children:["\xb7 ",x]})]}),p&&(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-x-2.5 gap-y-0.5 text-xs text-text-3",children:[(0,s.jsxs)("span",{children:[t.sessionCount," session",1===t.sessionCount?"":"s"]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsxs)("span",{className:"font-semibold tabular-nums text-text-2",children:[(0,o.Sk)(t.totalTokens)," tokens"]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{className:"font-semibold tabular-nums text-text-2",children:(0,o.xd)(t.estimatedCostUsd,t.costIsPartial)})]})]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-auto px-2 py-2",children:d?(0,s.jsx)("div",{className:"p-3",children:(0,s.jsx)(r.r,{message:d})}):p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c,{summary:t}),t.costIsPartial&&(0,s.jsx)("p",{className:"px-3 pb-1 pt-2 text-xs text-text-3",children:"— = unknown pricing (a local or non-Anthropic model); the cost total is a lower bound."})]}):(0,s.jsx)("div",{className:"p-3",children:(0,s.jsx)(r.A,{message:"No token usage recorded yet — sessions are reconciled as you work."})})})]})})]})}},1561:(e,t,n)=>{n.d(t,{ROTATE_CONFIRMATION:()=>r,RotateKeyDialog:()=>o});var s=n(2703),a=n(347),i=n(6807),l=n(1460);let r="rotate";function o(e){let{open:t,onOpenChange:n,activePermanent:o,approvableBlocked:c,keyVersion:d,onConfirm:x,busy:m,error:u}=e,[p,h]=(0,i.useState)(""),g=(0,l.y6)(c);return(0,s.jsx)(a.lG,{open:t,onOpenChange:e=>{e||h(""),n(e)},children:(0,s.jsxs)(a.Cf,{children:[(0,s.jsxs)(a.c7,{children:[(0,s.jsx)(a.L3,{children:"Rotate the fingerprint key"}),(0,s.jsxs)(a.rr,{children:["Rotation mints a fresh key",null!==d&&" (v".concat(String(d)," → v").concat(String(d+1),")")," and"," ",(0,s.jsx)("strong",{children:"invalidates every existing exception"})," — grants cannot be re-keyed and simply stop matching. They remain listed for audit."]})]}),(0,s.jsxs)(a.R4,{children:[o.length>0&&(0,s.jsxs)("div",{className:"rounded-lg border border-sev-high-fill bg-sev-high-fill p-3",children:[(0,s.jsx)("div",{className:"mb-2 text-label font-semibold uppercase tracking-wider text-sev-high-ink",children:"Active permanent grants that will stop applying"}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:o.map(e=>(0,s.jsxs)("li",{className:"font-mono text-xs text-text-2",children:[e.ruleId," \xb7 ",e.maskedValue]},e.id))})]}),c>0?(0,s.jsxs)("div",{className:"rounded-lg border border-sev-high-fill bg-sev-high-fill p-3",children:[(0,s.jsx)("div",{className:"mb-2 text-label font-semibold uppercase tracking-wider text-sev-high-ink",children:"Blocked detections that will stop being approvable"}),(0,s.jsx)("p",{className:"text-xs text-text-2",children:g})]}):(0,s.jsx)("p",{className:"text-xs text-text-3",children:g}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:["Type"," ",(0,s.jsxs)("span",{className:"font-mono normal-case tracking-normal",children:["“",r,"”"]})," ","to confirm"]}),(0,s.jsx)(a.pd,{value:p,onChange:e=>{h(e.target.value)},autoComplete:"off",className:"font-mono"})]}),u&&(0,s.jsx)("p",{className:"text-xs text-sev-critical-ink",children:u})]}),(0,s.jsxs)(a.Es,{children:[(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{n(!1)},children:"Cancel"}),(0,s.jsx)(a.$n,{variant:"solid",tone:"danger",size:"sm",disabled:p!==r||m,onClick:()=>{x(p)},children:m?"Rotating…":"Rotate key"})]})]})})}},1639:(e,t,n)=>{n.d(t,{WorkspaceSettingsFormView:()=>y});var s=n(2703),a=n(723),i=n(347),l=n(6807);let r=[{value:"monitor",label:"Let it through",description:"The call runs with the value unmasked and the finding is recorded."},{value:"warn",label:"Let it through, with a warning",description:"The call runs with the value unmasked, and the session is told what was found (default). A host with no channel to print on records the finding and shows nothing."},{value:"block",label:"Block the call",description:"The call is refused and the message says what to remove. The stricter answer, and the one to pick if a request that has already left cannot be recalled."}],o=[{value:"session-only",label:"Session only",description:"Only activity from after install is inspected (default — never assumed)."},{value:"full",label:"Full",description:"Pre-install surfaces (existing configs, history) may be scanned too. This grant covers reading them only — sending what the scan finds to the model API is the separate Model-judge consent below, which this one does not give. Switching back to Session only stops future scans; it cannot recall data already sent."}],c=[{value:"revoked",label:"Not granted",description:"The setup scan will not send findings to the model API (default — never assumed)."},{value:"granted",label:"Granted",description:"The setup scan may send each finding — its raw, unmasked value including any secret, plus about 120 characters of surrounding context on either side of it with any secrets in that window masked — to the model API to sort real leaks from noise."}],d=[{value:"revoked",label:"Not shared",description:"Anything not delivered live is dropped, as it was before this setting existed (default — never assumed)."},{value:"granted",label:"Shared",description:"Activity from before this machine attached, and anything undelivered since, may be sent later — including the text of prompts, replies and tool results, in which a value is masked only where the detection that flagged it is set to redact or block."}],x=[{value:"off",label:"Off (default)",description:"Nothing recoverable is stored. Detections set to Redact & Vault fall back to one-way Redact, so values are destroyed as they are redacted."},{value:"on",label:"Allow vaulting",description:"A detected value is replaced by a pointer, and an encrypted, recoverable copy is kept in the local vault under ~/.aka — this machine holds recoverable copies of detected secrets, encrypted at rest. The pointers written into files and transcripts show where each secret is used, and which places share the same secret, to anyone who can read those files. Switching back to Off stops new vaulting but does not erase what is already stored — purging the vault from the dashboard's Vault page is what erases it."}],m="Enter a whole number of days, ".concat(String(1),"–").concat(String(3650),"."),u=[{value:"off",label:"Keep everything",description:"Bodies are kept for as long as the store lives."},{value:"on",label:"Expire after a horizon",description:"Clear bodies past the horizon below. The events, their severities and every finding stay."}],p=[{value:"masked",label:"Masked badge (default)",description:"Pointers render as a masked badge (category and partial value). No raw value is resolved and nothing is written to the audit trail."},{value:"full",label:"Full reveal",description:"Pointers resolve to the real value on screen, capped at two per message and never inside code blocks or quotes. The risk is real: anything the model is induced to mention renders in plaintext where it can be shoulder-surfed, screen-shared, or copy-pasted onward. Every reveal is audited."},{value:"off",label:"Off",description:"Replies are not modified; pointers show as-is."}];function h(e){return e?"on":"off"}function g(e){return void 0!==e&&!(0,a.hds)(e)}function f(e){var t,n;let{label:a,description:i,name:l,choices:r,value:o,onChange:c,managed:d,notice:x,alert:m,defaultOpen:u,children:p}=e,h=r.find(e=>e.value===o),g="".concat(l,"-label");return(0,s.jsxs)("details",{className:"group border-b border-border last:border-b-0","data-slot":"setting-row",open:!0===u,children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-3 px-4 py-3 hover:bg-surface-2",children:[(0,s.jsx)(j,{}),(0,s.jsxs)("span",{className:"flex-1",children:[(0,s.jsx)("span",{id:g,className:"block text-sm font-medium text-text",children:a}),(0,s.jsx)("span",{className:"mt-0.5 block text-xs text-text-3",children:i})]}),void 0!==m&&(0,s.jsx)("span",{className:"shrink-0 rounded-full bg-sev-high-fill px-2 py-0.5 text-xs font-medium text-sev-high-ink","data-slot":"row-alert",children:m}),void 0===d?(0,s.jsx)("span",{className:"shrink-0 text-xs font-medium text-text-2","data-slot":"current-value",children:null!=(t=null==h?void 0:h.label)?t:o}):(0,s.jsxs)("span",{className:"shrink-0 rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-3","data-slot":"managed-badge",title:d,children:[null!=(n=null==h?void 0:h.label)?n:o," \xb7 locked"]})]}),(0,s.jsxs)("div",{className:"px-4 pb-4 pl-11",children:[x,void 0!==d&&(0,s.jsxs)("p",{className:"mb-3 text-xs text-text-3","data-slot":"managed-notice",children:[d,". This setting cannot be changed here."]}),(0,s.jsx)("fieldset",{disabled:void 0!==d,className:"contents",children:(0,s.jsx)(v,{name:l,labelledBy:g,choices:r,value:o,onChange:c,disabled:void 0!==d})}),p]})]})}function j(){return(0,s.jsx)("svg",{className:"size-4 shrink-0 text-text-3 transition-transform group-open:rotate-90",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M6 4l4 4-4 4",strokeLinecap:"round",strokeLinejoin:"round"})})}function v(e){let{name:t,labelledBy:n,choices:a,value:l,onChange:r,disabled:o}=e;return(0,s.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-labelledby":n,children:a.map(e=>(0,s.jsxs)("label",{className:(0,i.cn)("flex items-start gap-3 rounded-lg border p-3 transition-colors",o?"cursor-not-allowed opacity-60":"cursor-pointer",l===e.value?"border-primary bg-primary-tint":(0,i.cn)("border-border bg-surface",!o&&"hover:bg-surface-2")),children:[(0,s.jsx)("input",{type:"radio",name:t,checked:l===e.value,disabled:o,onChange:()=>{r(e.value)},className:"mt-1 accent-primary"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-sm font-semibold text-text",children:e.label}),(0,s.jsx)("span",{className:"mt-0.5 block text-xs text-text-2",children:e.description})]})]},e.value))})}function b(e){let{title:t,children:n}=e;return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"mb-2 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,s.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface",children:n})]})}let k=e=>1===e?"1 setting":"".concat(String(e)," settings");function y(e){var t,n;let{settings:j,managed:v=a.MhX,onSave:y,onAttach:w,onDetach:C,credentialState:Y,detectionsHref:I="/detections",busy:S,error:A,saved:z}=e,[M,O]=(0,l.useState)(j.historicalAccess),R=(0,a.DLF)(j.modelJudgeConsent)?"granted":"revoked",[L,T]=(0,l.useState)(R),[D,E]=(0,l.useState)(!1),F=(0,a.EL9)(j.historySyncConsent,null==(t=j.controlPlane)?void 0:t.endpoint)?"granted":"revoked",[P,V]=(0,l.useState)(F),[_,B]=(0,l.useState)(!1),$=(0,a.bkE)(j.historySyncConsent,null==(n=j.controlPlane)?void 0:n.endpoint),[K,H]=(0,l.useState)(h(j.vaultConsent)),[W,U]=(0,l.useState)(j.vaultInlineReveal),[G,q]=(0,l.useState)(j.redactFallback),[Z,J]=(0,l.useState)(j.bodyRetention.enabled?"on":"off"),[X,Q]=(0,l.useState)(String(j.bodyRetention.retainDays)),ee=Number(X),et=""!==X.trim()&&Number.isInteger(ee)&&ee>=1&&ee<=3650,en=e=>(0,a.O2m)(v,e)?(0,a.Ly$)(v):void 0,es=function(e){var t,n,s;let a=null!=(t=e.unknownLockedCount)?t:0,i=null!=(n=e.unknownValueCount)?n:0;if(!e.present||a+i===0)return;let l=null!=(s=e.organization)?s:"Your organization",r=[...i>0?["pins ".concat(k(i))]:[],...a>0?["locks ".concat(k(a))]:[]];return"".concat(l," ").concat(r.join(" and ")," this version of AKA does not recognize. Update AKA to apply ").concat(a+i===1?"it":"them",".")}(v),ea=M!==j.historicalAccess||Z!==(j.bodyRetention.enabled?"on":"off")||et&&ee!==j.bodyRetention.retainDays||L!==R||P!==F||K!==h(j.vaultConsent)||W!==j.vaultInlineReveal||G!==j.redactFallback||"on"===K&&g(j.vaultConsent)||_||D;return(0,s.jsxs)("div",{className:"flex max-w-4xl flex-col gap-7",children:[void 0!==es&&(0,s.jsx)("p",{className:"text-xs text-text-3","data-slot":"managed-unrecognized",children:es}),(0,s.jsx)(b,{title:"Connection",children:(0,s.jsx)(N,{settings:j,credentialState:Y,managedLabel:en("runMode"),onAttach:w,onDetach:C,busy:S})}),(0,s.jsxs)(b,{title:"Enforcement",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3","data-slot":"enforcement-pointer",children:[(0,s.jsx)("span",{className:"flex-1 text-xs text-text-3",children:"What happens when a detection fires — Monitor, Warn, Redact, Redact & Vault or Block — is assigned per detection on the Detections page. There is no global handling setting: one detection can block while another only logs, and this page would not be able to say which."}),(0,s.jsx)("a",{href:I,className:"shrink-0 text-xs font-medium text-primary hover:underline",children:"Configure detections"})]}),(0,s.jsx)(f,{label:"When masking is not possible",description:"Some fields cannot be masked in place: rewriting a shell command would change what runs, and rewriting a URL would fetch something else. A detection set to Redact cannot be carried out there, and this chooses what happens instead. It does not change what any detection is set to — only what happens where that answer cannot be applied. A plugin applies this once it reports which of its fields cannot be rewritten; until then it refuses those calls outright, and its Known limitations says where it stands.",name:"redactFallback",choices:r,value:G,onChange:q,managed:en("redactFallback")})]}),(0,s.jsxs)(b,{title:"Data access",children:[(0,s.jsx)(f,{label:"Historical access",description:"Consent to inspect surfaces that existed before AKA was installed.",name:"historicalAccess",choices:o,value:M,onChange:O,managed:en("historicalAccess")}),(0,s.jsx)(f,{label:"Model-judge consent",description:"Whether the setup scan may send findings to the model API.",name:"modelJudgeConsent",choices:c,value:L,onChange:e=>{E(!0),T(e)},managed:en("modelJudgeConsent"),notice:(0,s.jsx)("p",{className:"mb-3 text-xs text-text-3","data-slot":"model-judge-disclosure",children:"A separate consent from historical access: this governs whether the /aka:setup scan may send findings to the model API to sort real leaks from noise. Per finding that is the raw, unmasked value including any secret, about 120 characters of surrounding transcript text on either side of it, the rule, category, severity, masked value and confidence it was scored with, and a sequential counter the model echoes back. The file path is never sent, and any secrets in the surrounding context are masked before it goes. Revoking stops future scans; it cannot recall data already sent."})}),(0,a.lgf)(j)&&(0,s.jsx)(f,{label:"Unsent activity",description:"Whether activity this machine has not delivered may be sent later.",name:"historySyncConsent",choices:d,value:P,onChange:e=>{B(!0),V(e)},alert:$?"Paused":void 0,defaultOpen:$,notice:(0,s.jsxs)(s.Fragment,{children:[$&&(0,s.jsx)("p",{className:"mb-3 text-xs text-sev-high-ink","data-slot":"history-sync-stale-notice",children:'Your grant was recorded against an older version of this setting, which did not cover the text of the activity recorded before this machine attached — only what a live send failed to deliver afterward — sending is paused until you re-consent. Saving with "Shared" selected re-consents to the current version.'}),(0,s.jsx)("p",{className:"mb-3 text-xs text-text-3","data-slot":"history-sync-disclosure",children:"Whether activity this machine has not delivered to the deployment it is attached to may be sent later. Two kinds qualify: what was already recorded before it attached, and anything a live send could not deliver because the deployment was unreachable or refused the credential. Both are sent the same way: which sessions ran and when, in which project, repo and branch, token usage and model per call, which tools were called with their inputs truncated and every detected secret already masked, what was detected in those inputs, and the prompts, assistant replies and tool results themselves — for which a captured one INCLUDES ITS TEXT. What is masked in that text follows the policy assigned to the detection that flagged the value: it is masked only where that policy is redact or block, and under monitor or warn the value is sent as it was seen, as is everything outside a flagged span. Every detection ships on monitor, so on a default install nothing in that text is masked. Live sending is part of being attached and this setting does not change it: declining means an undelivered item is dropped rather than kept and retried. Sending happens in the background over later sessions. Revoking stops what has not been sent; it cannot recall what has."})]})}),(0,s.jsx)(f,{label:"Reversible secret vault",description:"Permission for AKA to keep recoverable copies of what it redacts. This grant does not by itself vault anything — a detection has to be set to Redact & Vault on the Detections page. Without the grant, those detections fall back to one-way Redact.",name:"vaultConsent",choices:x,value:K,onChange:H,managed:en("vaultConsent"),alert:g(j.vaultConsent)?"Paused":void 0,defaultOpen:g(j.vaultConsent),notice:g(j.vaultConsent)?(0,s.jsx)("p",{className:"mb-3 text-xs text-sev-high-ink","data-slot":"vault-stale-notice",children:'Your grant was recorded against an older version of the vault — vaulting is paused until you re-consent. Saving with "Allow vaulting" selected re-consents to the current version.'}):null})]}),(0,s.jsx)(b,{title:"Display",children:(0,s.jsx)(f,{label:"Inline reveal in the terminal",description:"How a vault pointer renders inside Claude's on-screen replies. Display-only — the transcript and what the model sees always keep the pointer.",name:"vaultInlineReveal",choices:p,value:W,onChange:U,managed:en("vaultInlineReveal")})}),(0,s.jsx)(b,{title:"Storage",children:(0,s.jsx)(f,{label:"Expire captured bodies",description:"Clear the stored text of old captures, keeping the events and their findings.",name:"bodyRetention",choices:u,value:Z,onChange:J,managed:en("bodyRetention"),children:"on"===Z&&(0,s.jsxs)("div",{className:"mt-3 flex items-center gap-2","data-slot":"retain-days",children:[(0,s.jsx)("label",{htmlFor:"retainDays",className:"text-xs text-text-2",children:"Keep bodies for"}),(0,s.jsx)("input",{id:"retainDays",name:"retainDays",type:"number",inputMode:"numeric",min:1,max:3650,value:X,disabled:void 0!==en("bodyRetention"),onChange:e=>{Q(e.target.value)},className:"w-20 rounded-md border border-border bg-surface px-2 py-1 text-sm text-text disabled:opacity-50","aria-invalid":!et,"aria-describedby":et?void 0:"retainDays-error"}),(0,s.jsx)("span",{className:"text-xs text-text-2",children:"days"}),!et&&(0,s.jsx)("span",{id:"retainDays-error",className:"text-xs text-sev-critical-ink",children:m})]})})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!ea||!0===S||"on"===Z&&!et,onClick:()=>{y({historicalAccess:M,redactFallback:G,modelJudgeConsent:D?"granted"===L?"granted":"revoked":"unchanged",historySyncConsent:_?"granted"===P?"granted":"revoked":"unchanged",vaultConsent:K,vaultInlineReveal:W,bodyRetention:{enabled:"on"===Z,retainDays:et?ee:j.bodyRetention.retainDays}})},children:S?"Saving…":"Save changes"}),z&&!ea&&(0,s.jsx)("span",{className:"text-xs text-ok-ink",children:"Saved."}),A&&(0,s.jsx)("span",{className:"text-xs text-sev-critical-ink",children:A})]})]})}function N(e){let{settings:t,credentialState:n,managedLabel:r,onAttach:o,onDetach:c,busy:d}=e,[x,m]=(0,l.useState)(""),[u,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(""),f=(0,a.lgf)(t),j=void 0!==r,v=f?function(e){if(void 0===e||e.usable)return null;if("absent"===e.reason)return"This machine is registered, but there is no access key stored on it — so nothing is being sent or received. Attach it again to restore the connection.";if("endpoint-mismatch"===e.reason){var t,n;return t=e.credentialEndpoint,n=e.settingsEndpoint,"This machine is set to ".concat(n,", but the access key stored on it was issued for ")+"".concat(t," — so nothing is being sent or received. Attach it again to ")+"".concat(n,", or point it back at ").concat(t,".")}return"This machine is registered, but the access key stored on it cannot be used — so nothing is being sent or received. Attach it again to replace it."}(n):null;return(0,s.jsxs)("div",{className:"px-4 py-3","data-slot":"connection-row",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsxs)("span",{className:"flex-1",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-text",children:"Run mode"}),(0,s.jsx)("span",{className:"mt-0.5 block text-xs text-text-3",children:f?"This machine is registered against your organization’s deployment. Detection, policy and history still run against the local store under ~/.aka.":"Everything stays on this machine: detection, policy and history all run against the local store under ~/.aka. Nothing is sent anywhere."}),f&&t.controlPlane&&(0,s.jsx)("span",{className:"mt-1 block text-xs text-text-2","data-slot":"control-plane-name",children:(0,a.F$B)(t.controlPlane)})]}),(0,s.jsxs)("span",{className:(0,i.cn)("shrink-0 rounded-full px-2 py-0.5 text-xs font-medium",null!==v?"bg-sev-high-fill text-sev-high-ink":f?"bg-teal-fill text-teal-ink":"bg-surface-2 text-text-3"),"data-slot":"run-mode-badge",children:[null!==v?"Not connected":f?"Attached":"Standalone",j&&" \xb7 locked"]})]}),null!==v&&(0,s.jsx)("p",{className:"mt-3 text-xs text-sev-high-ink","data-slot":"connection-credential-notice",children:v}),f&&(0,s.jsx)("p",{className:"mt-3 text-xs text-text-3","data-slot":"connection-forwarding",children:"While this machine is attached, the plugin forwards the activity that deployment is entitled to see and pulls the policy it sets. A scan you run from the Scan page also sends the Data Shares register it records — destinations and call sites, never source text. This page reads only your local store, so it cannot report what the deployment received. Detach to stop sending."}),j?(0,s.jsxs)("p",{className:"mt-3 text-xs text-text-3","data-slot":"connection-managed-notice",children:[r,". ",f?"Your organization set this connection, so this machine cannot be detached here.":""]}):f&&c?(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)(i.$n,{variant:"outline",tone:"danger",size:"sm",disabled:d,onClick:()=>{m(""),p(""),g(""),c()},"data-slot":"detach-button",children:"Detach"}),(0,s.jsx)("p",{className:"mt-2 text-xs text-text-3",children:"Detaching clears the connection and returns this machine to standalone. Findings and history already in the local store stay where they are."})]}):f?(0,s.jsx)("p",{className:"mt-3 text-xs text-text-3","data-slot":"detach-unavailable",children:"This machine is registered, and this build offers no way to detach it here."}):o?(0,s.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2","data-slot":"attach-form",children:[(0,s.jsx)(i.pd,{value:x,placeholder:"Deployment endpoint","aria-label":"Deployment endpoint",onChange:e=>{m(e.target.value)}}),(0,s.jsx)(i.pd,{value:u,placeholder:"Name (optional)","aria-label":"Deployment name",onChange:e=>{p(e.target.value)}}),(0,s.jsx)(i.pd,{className:"sm:col-span-2",type:"password",name:"aka-access-key",value:h,placeholder:"Access key","aria-label":"Access key",autoComplete:"new-password",spellCheck:!1,autoCorrect:"off",onChange:e=>{g(e.target.value)}}),(0,s.jsx)("p",{className:"text-xs text-text-3 sm:col-span-2","data-slot":"attach-key-hint",children:"Create a plugin key in your deployment and paste it here. It is stored on this machine only, in ~/.aka/settings."}),(0,s.jsx)("div",{className:"sm:col-span-2",children:(0,s.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!0===d||""===x.trim()||""===h.trim(),onClick:()=>{!function(e,t,n){let s=e.accessKey.trim();t(),n(e.endpoint.trim(),e.label.trim(),s)}({endpoint:x,label:u,accessKey:h},()=>{g("")},o)},"data-slot":"attach-button",children:"Attach"})})]}):(0,s.jsx)("p",{className:"mt-3 text-xs text-text-3","data-slot":"connection-unavailable",children:"This view cannot change the connection. Attach from the AKA dashboard, or with `aka attach` in a terminal."})]})}},1759:(e,t,n)=>{n.d(t,{K:()=>i,g:()=>r});let s=new Intl.RelativeTimeFormat("en",{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]];function i(e,t){if(!e)return"";let n=Date.parse(e);if(Number.isNaN(n))return"";let i=(n-t)/1e3,l=Math.abs(i);if(l<45)return"just now";for(let[e,t]of a)if(l>=t)return s.format(Math.round(i/t),e);return"just now"}let l={year:"y",month:"mo",week:"w",day:"d",hour:"h",minute:"m"};function r(e,t){if(!e)return"";let n=Date.parse(e);if(Number.isNaN(n))return"";let s=Math.abs((n-t)/1e3);if(s<45)return"now";for(let[e,t]of a){var i;if(s>=t)return"".concat(String(Math.floor(s/t))).concat(null!=(i=l[e])?i:"")}return"now"}},1941:(e,t,n)=>{n.d(t,{DataShareDetailView:()=>u});var s=n(2703),a=n(347),i=n(1759),l=n(3878),r=n(760),o=n(2146),c=n(3619);function d(e){let{st:t}=e;return(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-surface p-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,s.jsx)(r.SY,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text",children:t.project}),t.vendored?(0,s.jsx)("span",{className:"ml-auto",children:(0,s.jsx)(a.Ex,{variant:"high",children:"Vendored"})}):t.dynamic&&(0,s.jsx)("span",{className:"ml-auto",children:(0,s.jsxs)(a.Ex,{variant:"default",children:[(0,s.jsx)(r.cZ,{"aria-hidden":!0,focusable:!1,className:"size-2.5"}),"Dynamic"]})})]}),(0,s.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[t.file,":",(0,s.jsx)("b",{className:"text-text-2",children:t.line})]}),""!==t.snippet&&(0,s.jsxs)("div",{className:"overflow-x-auto whitespace-pre rounded-md bg-ink px-2.5 py-2 font-mono text-xs leading-relaxed text-white mt-0.5",children:[(0,s.jsxs)("span",{className:"text-code-muted",children:[t.file.split("/").pop(),":",t.line," "]}),t.snippet]})]})}function x(e){var t,n,i;let{d,onPick:x}=e,m=c.pN[d.trust].icon,u=d.endpoints.reduce((e,t)=>e+t.callSiteCount,0);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(o.Wi,{kind:d.kind,trust:d.trust,name:d.name,host:d.host,size:44}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:(0,a.cn)("text-lg font-semibold text-text","ip"===d.kind?"font-mono":"font-display"),children:d.name}),(0,s.jsxs)("div",{className:"mt-0.5 text-xs text-text-3",children:[d.category," \xb7 ",d.endpoints.length," endpoints \xb7 ",u," call sites"]})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(o.xB,{trust:d.trust}),d.transports.map(e=>(0,s.jsx)(o.eV,{transport:e},e))]}),(null!==d.note||(null==(t=d.network)?void 0:t.geo)!=null)&&(0,s.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,s.jsx)(m,{"aria-hidden":!0,focusable:!1,className:"mt-0.5 size-4 shrink-0 text-text-2"}),(0,s.jsxs)("div",{className:"text-xs leading-normal text-text-2",children:[(null==(n=d.network)?void 0:n.geo)!=null&&(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{className:"text-text",children:"Resolves to "}),d.network.geo,null!=d.network.ptr?" \xb7 "+d.network.ptr:""]}),null!=d.note&&(0,s.jsx)("div",{className:(null==(i=d.network)?void 0:i.geo)!=null?"mt-1":"",children:d.note})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.e,{children:"Endpoints"}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:d.endpoints.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{x(e.id)},className:"flex w-full cursor-pointer items-center gap-2.5 rounded-lg border border-border bg-surface px-3 py-2.5 text-left hover:bg-surface-2",children:[(0,s.jsx)(o.kX,{method:e.method}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)(o.UH,{url:e.url}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,s.jsx)(o.eV,{transport:e.transport,plain:!0}),(0,s.jsxs)("span",{className:"text-xs text-text-3",children:["\xb7 ",e.callSiteCount," call",1===e.callSiteCount?"":"s"]})]})]}),(0,s.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0 text-text-3"})]},e.id))})]})]})}function m(e){let{d:t,ep:n,onBack:c,renderedAt:x}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:(0,s.jsxs)(a.$n,{onClick:c,size:"sm",variant:"link",tone:"primary",children:[(0,s.jsx)(r.YJ,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),"Back to destination"]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,s.jsx)(o.kX,{method:n.method}),(0,s.jsx)(o.Wi,{kind:t.kind,trust:t.trust,name:t.name,host:t.host,size:22}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:t.name})]}),(0,s.jsx)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:(0,s.jsx)(o.UH,{url:n.url,big:!0})})]}),n.template&&(0,s.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-primary-tint px-3 py-2.5",children:[(0,s.jsx)(r.cZ,{"aria-hidden":!0,focusable:!1,className:"mt-0.5 size-4 shrink-0 text-primary"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 text-xs font-semibold text-text",children:"Templated URL"}),(0,s.jsxs)("div",{className:"text-xs leading-normal text-text-2",children:["Built at runtime — the"," ",(0,s.jsxs)("span",{className:"rounded bg-primary-tint px-1 font-mono font-semibold text-primary",children:["$","{…}"]})," ","segments vary per request, so individual generated URLs aren’t itemized."]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,s.jsx)(l.p,{label:"Method",children:n.method}),(0,s.jsx)(l.p,{label:"Transport",children:(0,s.jsx)(o.eV,{transport:n.transport,plain:!0})}),(0,s.jsx)(l.p,{label:"Data classification",children:(0,s.jsx)("span",{className:"inline-flex",children:(0,s.jsx)(o.HD,{cls:n.dataClass})})}),(0,s.jsx)(l.p,{label:"Last seen",children:(0,i.K)(n.lastSeen,x)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(l.e,{children:"Call sites"}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:n.sites.map(e=>(0,s.jsx)(d,{st:e},e.id))})]})]})}function u(e){let{destination:t,endpoint:n,onPick:i,onBack:l,onSetDecision:o,isSettingDecision:d,renderedAt:u}=e,p="blocked"===t.status;return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("header",{className:"flex items-center gap-2.5 border-b border-border px-4.5 py-4 pr-12",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-text-3",children:[(0,s.jsx)(r._G,{"aria-hidden":!0,focusable:!1,className:"size-4"}),n?"Endpoint":"Destination"]})}),(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4.5",children:n?(0,s.jsx)(m,{d:t,ep:n,onBack:l,renderedAt:u}):(0,s.jsx)(x,{d:t,onPick:i})}),(0,s.jsxs)("footer",{className:"flex flex-col gap-2 border-t border-border p-3.5",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(a.$n,{variant:"outline",className:"flex-1",children:[(0,s.jsx)(r.iB,{"aria-hidden":!0,focusable:!1}),"Add policy"]}),p?(0,s.jsxs)(a.$n,{variant:"outline",className:"flex-1 border-ok-fill text-ok-ink hover:bg-ok-fill",disabled:d,onClick:()=>{o("allow")},children:[(0,s.jsx)(r.Sr,{"aria-hidden":!0,focusable:!1}),"Allow egress"]}):(0,s.jsxs)(a.$n,{variant:"solid",tone:"danger",className:"flex-1",disabled:d,onClick:()=>{o("block")},children:[(0,s.jsx)(r.pD,{"aria-hidden":!0,focusable:!1}),"Block egress"]})]}),t.isCustom&&(0,s.jsxs)(a.$n,{variant:"ghost",size:"sm",tone:"neutral",className:"self-center text-xs text-text-3",disabled:d,onClick:()=>{o(null)},children:["Reset to default (",c.pN[t.trust].label,")"]})]})]})}},1955:(e,t,n)=>{n.d(t,{$$:()=>r,Ec:()=>o,V:()=>l});var s=n(2703),a=n(347);let i={prompt:"Prompt","tool-input":"Tool input","tool-output":"Tool output",file:"File",transcript:"Transcript"},l={display:"Display render","explicit-reveal":"Explicit reveal","view-render":"View render","model-input":"Model input",remediation:"Remediation",purge:"Purge"};function r(){return(0,s.jsx)(a.Ex,{variant:"critical",children:"Reveal to model"})}function o(e){let{kind:t}=e;return(0,s.jsx)(a.Ex,{variant:"outline",children:i[t]})}},2023:(e,t,n)=>{n.d(t,{FindingsOverTimeCardView:()=>x});var s=n(2703),a=n(347),i=n(2286),l=n(3749),r=n(760),o=n(4194),c=n(4762);let d=[{key:"critical",label:"Critical",color:i.l.sevCritical},{key:"high",label:"High",color:i.l.sevHigh},{key:"medium",label:"Medium",color:i.l.sevMedium},{key:"low",label:"Low",color:i.l.sevLow}];function x(e){let{points:t,granularity:n,isLoading:i,error:x}=e,m=t.every(e=>d.every(t=>!e[t.key])),u=(0,o.T)(d);return(0,s.jsxs)(a.Zp,{className:"mt-4 shadow-sm xl:mt-5",children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsx)(a.AG,{children:(0,s.jsx)(r.Uy,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Findings over time"}),(0,s.jsx)(a.BT,{children:"New sensitive-data detections".concat(null===n?"":" per ".concat(n))})]}),(0,s.jsx)(a.X9,{className:"gap-3 text-xs text-text-2",children:(0,s.jsx)(o.N,{series:d,visibility:u,interactive:!x&&!i&&!m})})]}),(0,s.jsx)(a.Wu,{"aria-busy":i,className:"pb-2",children:x?(0,s.jsx)(c.rJ,{message:x}):i?(0,s.jsx)(a.EA,{className:"h-40 w-full"}):m?(0,s.jsx)(c.AW,{message:"No findings in this range."}):(0,s.jsx)(l.AreaChart,{data:t,series:u.visible,height:160})})]})}},2036:(e,t,n)=>{n.d(t,{c:()=>a});var s=n(2703);function a(e){let{user:t}=e;return t?(0,s.jsx)("span",{className:"text-xs text-text-2 wrap-anywhere",title:t.name,children:t.name}):(0,s.jsx)("span",{className:"text-text-3",children:"—"})}},2071:(e,t,n)=>{n.d(t,{ApproveExceptionDialog:()=>r});var s=n(2703),a=n(347),i=n(6807),l=n(4621);function r(e){let{entry:t,open:n,onOpenChange:r,onSubmit:o,busy:c,error:d}=e,[x,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(""),[h,g]=(0,i.useState)(""),f="permanent"===x,j=null!==t&&null!==x&&""!==u.trim()&&(!f||h===t.maskedValue);return(0,s.jsx)(a.lG,{open:n,onOpenChange:e=>{e||(m(null),p(""),g("")),r(e)},children:(0,s.jsxs)(a.Cf,{children:[(0,s.jsxs)(a.c7,{children:[(0,s.jsx)(a.L3,{children:"Approve blocked detection"}),(0,s.jsx)(a.rr,{children:"Grant an explicit, audited bypass for this exact value. Enforcement continues for every other value."})]}),(0,s.jsx)(a.R4,{children:t&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 p-3 text-xs",children:[(0,s.jsx)("div",{className:"font-mono font-semibold text-text",children:t.ruleId}),(0,s.jsx)("div",{className:"mt-1 font-mono text-text-2",children:t.maskedValue})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Scope — pick one"}),(0,s.jsx)(l.ScopePicker,{value:x,onChange:m})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Reason (required — the audit trail)"}),(0,s.jsx)(a.pd,{value:u,onChange:e=>{p(e.target.value)},placeholder:"Why this value may pass"})]}),f&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Type the masked value to confirm a permanent grant"}),(0,s.jsx)(a.pd,{value:h,onChange:e=>{g(e.target.value)},placeholder:t.maskedValue,autoComplete:"off",className:"font-mono"})]}),d&&(0,s.jsx)("p",{className:"text-xs text-sev-critical-ink",children:d})]})}),(0,s.jsxs)(a.Es,{children:[(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{r(!1)},children:"Cancel"}),(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!j||c,onClick:()=>{t&&x&&o({reference:t.reference,scope:x,reason:u.trim(),...f?{confirmation:h}:{}})},children:c?"Granting…":"Grant exception"})]})]})})}},2146:(e,t,n)=>{n.d(t,{HD:()=>d,SU:()=>h,UH:()=>p,Wi:()=>u,eV:()=>c,hC:()=>m,kX:()=>o,xB:()=>x});var s=n(2703),a=n(347),i=n(760),l=n(3619);let r={GET:"low",POST:"ok",PUT:"high",DELETE:"critical",SDK:"ok",REF:"medium"};function o(e){let{method:t}=e;return(0,s.jsx)("span",{className:(0,a.cn)("inline-flex h-5 items-center rounded px-1.5 font-mono text-label leading-none font-bold py-0.5",a.id[r[t]]),children:t})}function c(e){let{transport:t,plain:n}=e,i=l.aD[t],r=i.icon;return n?(0,s.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 text-xs font-semibold",i.secure?"text-text-2":"text-sev-critical-ink"),children:[(0,s.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label,!i.secure&&" \xb7 plaintext"]}):(0,s.jsxs)(a.Ex,{variant:i.secure?"default":"critical",children:[(0,s.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label]})}function d(e){let{cls:t}=e,n=l.Hf[t],i=n.icon;return(0,s.jsxs)(a.Ex,{variant:n.tone,children:[(0,s.jsx)(i,{"aria-hidden":!0,focusable:!1,className:"size-3"}),n.label]})}function x(e){let{trust:t}=e,n=l.pN[t],i=n.icon;return(0,s.jsxs)(a.Ex,{variant:n.tone,children:[(0,s.jsx)(i,{"aria-hidden":!0,focusable:!1,className:"size-3"}),n.label]})}function m(e){let{status:t,isCustom:n}=e,i=l.P4[t],r=i.icon;return(0,s.jsxs)(a.Ex,{variant:n?i.tone:"default",children:[(0,s.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label,(0,s.jsx)("span",{className:"sr-only",children:n?" — set by an operator":" — trust default"})]})}function u(e){let{kind:t,trust:n,name:r,host:o,size:c=34}=e;if("provider"===t){let{short:e,color:t}=(0,l.Lh)(r,o);return(0,s.jsx)("span",{className:"inline-flex shrink-0 items-center justify-center rounded-lg font-display font-semibold text-white ring-1 ring-inset ring-mark-edge",style:{width:c,height:c,background:t,fontSize:.34*c},children:e})}let d={width:.5*c,height:.5*c},x="ip"===t?(0,s.jsx)(i.ts,{"aria-hidden":!0,focusable:!1,style:d}):"external"===t||"unverified"===n?(0,s.jsx)(i.ai,{"aria-hidden":!0,focusable:!1,style:d}):(0,s.jsx)(i.RR,{"aria-hidden":!0,focusable:!1,style:d});return(0,s.jsx)("span",{className:(0,a.cn)("grid shrink-0 place-items-center rounded-lg",(0,l.rL)({kind:t,trust:n})),style:{width:c,height:c},children:x})}function p(e){let{url:t,big:n}=e,i=t.split(/(\$\{[^}]+\})/g);return(0,s.jsx)("span",{className:(0,a.cn)("break-all font-mono",n?"text-ui":"text-xs"),children:i.map((e,t)=>e.startsWith("${")?(0,s.jsx)("span",{className:"rounded bg-primary-tint px-1 font-semibold text-primary",children:e},t):(0,s.jsx)("span",{children:e},t))})}function h(){return(0,s.jsxs)(a.Ex,{variant:"default",children:[(0,s.jsx)(i.cZ,{"aria-hidden":!0,focusable:!1,className:"size-2.5"}),"Template"]})}},2286:(e,t,n)=>{n.d(t,{l:()=>s});let s={primary:"var(--color-primary)",ok:"var(--color-ok)",violet:"var(--color-violet)",teal:"var(--color-teal)",sevCritical:"var(--color-sev-critical)",sevHigh:"var(--color-sev-high)",sevMedium:"var(--color-sev-medium)",sevLow:"var(--color-sev-low)",surface:"var(--color-surface)",surface3:"var(--color-surface-3)",border:"var(--color-border)",text2:"var(--color-text-2)",text3:"var(--color-text-3)"}},2728:(e,t,n)=>{n.d(t,{DataSharesTableView:()=>p});var s=n(2703),a=n(347),i=n(6807),l=n(1759),r=n(760),o=n(2146),c=n(7504),d=n(3619);function x(e){let{classes:t}=e;return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.slice(0,3).map(e=>(0,s.jsx)(o.HD,{cls:e},e)),t.length>3&&(0,s.jsxs)("span",{className:"text-xs text-text-3",children:["+",t.length-3]})]})}function m(e){var t;let{d:n,renderedAt:i,expanded:c,selected:m,onToggle:u,onOpen:p}=e,h=(0,d.EI)(n.transports);return(0,s.jsxs)(a.Hj,{onClick:p,"aria-label":"View details for destination ".concat(n.name),className:(0,a.cn)("cursor-pointer",m?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsx)(a.nA,{className:"w-9",children:(0,s.jsx)(a.$n,{"aria-label":c?"Collapse":"Expand",onClick:e=>{e.stopPropagation(),u()},variant:"ghost",size:"sm",children:(0,s.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:(0,a.cn)("size-4 transition-transform",c&&"rotate-90")})})}),(0,s.jsx)(a.nA,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(o.Wi,{kind:n.kind,trust:n.trust,name:n.name,host:n.host}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:(0,a.cn)("whitespace-nowrap font-semibold text-text","ip"===n.kind&&"font-mono"),children:n.name}),h&&(0,s.jsx)("span",{title:"Sends over plaintext",className:"inline-flex text-sev-critical-ink",children:(0,s.jsx)(r._0,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})})]}),(0,s.jsxs)("div",{className:"whitespace-nowrap text-xs text-text-3",children:[n.category,(null==(t=n.network)?void 0:t.geo)?" \xb7 "+n.network.geo:""]})]})]})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(o.xB,{trust:n.trust})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(o.hC,{status:n.status,isCustom:n.isCustom})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.transports.map(e=>(0,s.jsx)(o.eV,{transport:e},e))})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(x,{classes:n.dataClasses})}),(0,s.jsxs)(a.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,s.jsx)("b",{className:"text-text",children:n.endpointCount})," endpoint",1===n.endpointCount?"":"s"," \xb7 ",(0,s.jsx)("b",{className:"text-text",children:n.callSiteCount})," call",1===n.callSiteCount?"":"s"]}),(0,s.jsx)(a.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(n.lastSeen,i)})]})}function u(e){let{ep:t,renderedAt:n,selected:i,onClick:r}=e;return(0,s.jsxs)(a.Hj,{onClick:r,"aria-label":"View details for endpoint ".concat(t.method," ").concat(t.url),className:(0,a.cn)("cursor-pointer",i?"bg-primary-tint":"bg-surface-2 hover:bg-surface-3"),children:[(0,s.jsx)(a.nA,{className:"w-9"}),(0,s.jsx)(a.nA,{colSpan:3,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5 pl-1.5 py-1",children:[(0,s.jsx)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-bl border-b-[1.5px] border-l-[1.5px] border-border-strong"}),(0,s.jsx)(o.kX,{method:t.method}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(o.UH,{url:t.url}),t.template&&(0,s.jsx)(o.SU,{})]})]})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(o.eV,{transport:t.transport})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(o.HD,{cls:t.dataClass})}),(0,s.jsxs)(a.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,s.jsx)("b",{className:"text-text",children:t.callSiteCount})," call",1===t.callSiteCount?"":"s"]}),(0,s.jsx)(a.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(t.lastSeen,n)})]})}function p(e){let{group:t,expanded:n,forceExpand:l,selection:r,drawerOpen:o,onToggle:d,onOpenDest:x,onOpenEndpoint:p,renderedAt:h}=e;return(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{className:"w-9"}),(0,s.jsx)(a.nd,{children:"Destination"}),(0,s.jsx)(a.nd,{children:"Trust"}),(0,s.jsx)(a.nd,{children:"Status"}),(0,s.jsx)(a.nd,{children:"Transport"}),(0,s.jsx)(a.nd,{children:"Data sent"}),(0,s.jsx)(a.nd,{children:"Footprint"}),(0,s.jsx)(a.nd,{children:"Last seen"})]})}),(0,s.jsx)(a.BF,{children:t.items.map(e=>{let t=null!=l&&l||!!n[e.id],a=o&&(null==r?void 0:r.id)===e.id&&null==r.endpointId;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(m,{d:e,renderedAt:h,expanded:t,selected:a,onToggle:(0,c.T)(d,e.id),onOpen:(0,c.T)(x,e.id)}),t&&e.endpoints.map(t=>(0,s.jsx)(u,{ep:t,renderedAt:h,selected:o&&(null==r?void 0:r.id)===e.id&&r.endpointId===t.id,onClick:(0,c.i)(p,e.id,t.id)},t.id))]},e.id)})})]})}},2792:(e,t,n)=>{n.d(t,{ProjectPane:()=>x});var s=n(2703),a=n(347),i=n(6807),l=n(6574),r=n(8048),o=n(8215),c=n(5654);function d(e){let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)}function x(e){var t,n;let{proj:i,path:l,onPathChange:d,query:x,tree:h,isLoading:v,error:b,onClose:k}=e,y=x.trim().length>0,N=null!=(t=null==h?void 0:h.folders)?t:[],w=null!=(n=null==h?void 0:h.files)?n:[],C=i.accessCounts;return(0,s.jsxs)(a.Zp,{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[(0,s.jsxs)("div",{className:"border-b border-border px-5 py-3.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)(u,{proj:i,path:l,onPathChange:d})}),(0,s.jsx)(m,{...e}),k&&(0,s.jsx)(a.$n,{variant:"ghost",size:"icon","aria-label":"Back to harness",title:"Back to harness",onClick:k,children:(0,s.jsx)(c.m,{name:"x"})})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-start gap-2.5",children:[(0,s.jsx)(r.yk,{v:i.visibility}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 gap-2.5 flex-wrap justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-text-3",children:(0,o._t)(i,"source")}),(0,s.jsx)("span",{className:"flex items-center gap-3 text-xs text-text-3",children:o.IF.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:(0,a.cn)("size-2 rounded-sm",o.Pe[e].bar)}),C[e]," ",o.Pe[e].label]},e))})]})]})]}),!y&&e.blocked.length>0&&(0,s.jsx)(j,{...e}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pb-4 pt-2",children:v&&!h?(0,s.jsx)("div",{className:"py-12 text-center text-sm text-text-3",children:"Loading files…"}):b?(0,s.jsx)("div",{className:"py-12 text-center text-sm text-sev-critical-ink",children:b}):y?w.length>0?(0,s.jsx)(f,{caption:"".concat(String(w.length)," result").concat(1===w.length?"":"s"),rows:w,showPath:!0,...e}):(0,s.jsxs)("div",{className:"py-12 text-center text-text-3",children:[(0,s.jsx)(c.m,{name:"search",className:"mx-auto mb-2 size-6"}),(0,s.jsxs)("div",{className:"text-sm",children:["No files match “",x,"”"]})]}):0===N.length&&0===w.length?(0,s.jsx)("div",{className:"py-12 text-center text-sm text-text-3",children:"This folder is empty"}):(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:"Name"}),(0,s.jsx)(a.nd,{children:"Origin"}),(0,s.jsx)(a.nd,{children:"LLM access"}),(0,s.jsx)(a.nd,{className:"w-10"})]})}),(0,s.jsxs)(a.BF,{children:[N.map(e=>(0,s.jsx)(p,{folder:e,onOpen:()=>{d([...l,e.name])}},"d"+e.name)),w.map(t=>(0,s.jsx)(g,{file:t,...e},"f"+t.path))]})]})})]})}function m(e){let{proj:t,query:n,onQueryChange:a}=e;return(0,s.jsx)(l.SearchField,{value:n,onValueChange:a,label:"Search files in ".concat(t.name),placeholder:"Search files in ".concat(t.name,"…"),clearLabel:"Clear file search in ".concat(t.name),surface:"card",className:"h-9 w-70 shrink-0"})}function u(e){let{proj:t,path:n,onPathChange:l}=e,r=[t.name,...n];return(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[n.length>0&&(0,s.jsx)(a.$n,{variant:"ghost",size:"icon",className:"size-7",title:"Up one level",onClick:()=>{l(n.slice(0,-1))},children:(0,s.jsx)(c.m,{name:"arrow-up"})}),r.map((e,t)=>{let o=t===r.length-1;return(0,s.jsxs)(i.Fragment,{children:[t>0&&(0,s.jsx)(c.m,{name:"chevron-right",className:"size-3 text-text-3"}),(0,s.jsx)("button",{type:"button",onClick:()=>{l(n.slice(0,t))},className:(0,a.cn)("rounded px-1 py-0.5 text-sm",0===t&&"font-mono",o?"cursor-default font-bold text-text":"font-semibold text-text-2 hover:text-text"),children:e})]},t)})]})}function p(e){let{folder:t,onOpen:n}=e,i=t.accessCounts;return(0,s.jsxs)(a.Hj,{className:"cursor-pointer hover:bg-surface-2",onClick:n,children:[(0,s.jsx)(a.nA,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(c.m,{name:"folder",className:"size-4.5 shrink-0 text-primary"}),(0,s.jsx)("span",{className:"text-ui font-semibold text-text",children:t.name}),(0,s.jsxs)("span",{className:"text-xs text-text-3",children:[i.total," file",1===i.total?"":"s"]})]})}),(0,s.jsx)(a.nA,{className:"text-xs text-text-3",children:"Folder"}),(0,s.jsx)(a.nA,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(r.AJ,{counts:i}),i.blocked>0?(0,s.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[i.blocked," blocked"]}):(0,s.jsxs)("span",{className:"text-xs text-text-3",children:[i.total," allowed"]})]})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,s.jsx)(c.m,{name:"chevron-right",className:"size-4 text-text-3"})})})]})}function h(e){let{file:t,showPath:n}=e,a=d(t.path),i="blocked"===t.access;return(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,s.jsx)(c.m,{name:"file",className:"size-4.5 shrink-0 text-text-3"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[n&&a.length>0&&(0,s.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[a,"/"]}),(0,s.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:t.name})]}),t.blockedAt&&i&&(0,s.jsxs)("div",{className:"mt-px flex items-center gap-1.5 text-xs text-sev-critical-ink",children:[(0,s.jsx)(c.m,{name:"slash-circle",className:"size-3"}),t.note]})]})]})}function g(e){let{file:t,onSetAccess:n,onOpenFile:i,drawerPath:l,showPath:o}=e;return(0,s.jsxs)(a.Hj,{className:(0,a.cn)("cursor-pointer hover:bg-surface-2",l===t.path&&"bg-surface-2"),onClick:()=>{i(t.path)},children:[(0,s.jsx)(a.nA,{children:(0,s.jsx)(h,{file:t,showPath:o})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(r.TJ,{origin:t.origin})}),(0,s.jsx)(a.nA,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(r.kx,{value:t.access,onChange:e=>{n(t.path,e)}}),(0,s.jsx)(r.Vx,{value:t.access})]})}),(0,s.jsx)(a.nA,{children:(0,s.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,s.jsx)(c.m,{name:"chevron-right",className:"size-4 text-text-3"})})})]})}function f(e){let{caption:t,rows:n,showPath:i,...l}=e;return(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:t}),(0,s.jsx)(a.nd,{children:"Origin"}),(0,s.jsx)(a.nd,{children:"LLM access"}),(0,s.jsx)(a.nd,{className:"w-10"})]})}),(0,s.jsx)(a.BF,{children:n.map(e=>(0,s.jsx)(g,{file:e,showPath:i,...l},e.path))})]})}function j(e){let{blocked:t,showBlocked:n,onToggleBlocked:i,onSetAccess:l,onOpenFile:x}=e;return(0,s.jsxs)("div",{className:"border-b border-border bg-surface-2",children:[(0,s.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2.5 px-4.5 py-3 text-left cursor-pointer",onClick:i,children:[(0,s.jsx)("span",{className:"grid size-6 shrink-0 place-items-center rounded-md bg-sev-critical-fill text-sev-critical-ink",children:(0,s.jsx)(c.m,{name:"slash-circle",className:"size-3.5"})}),(0,s.jsx)("span",{className:"text-ui font-semibold",children:"Recently blocked"}),(0,s.jsx)("span",{className:"rounded-full bg-sev-critical-ink px-2 py-px text-xs font-bold text-on-accent",children:t.length}),(0,s.jsx)("span",{className:"text-xs text-text-3",children:"Auto-blocked on detection — review to adjust"}),(0,s.jsx)(c.m,{name:"chevron-down",className:(0,a.cn)("ml-auto size-4.5 text-text-3 transition-transform",!n&&"-rotate-90")})]}),n&&(0,s.jsx)("div",{className:"flex flex-col gap-2 px-3.5 pb-3",children:t.map(e=>{let t=d(e.path);return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-1.5 overflow-hidden whitespace-nowrap",children:[t.length>0&&(0,s.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[t,"/"]}),(0,s.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.name})]}),(0,s.jsxs)("div",{className:"mt-0.5 text-xs text-text-3",children:[e.note,e.blockedAt?" \xb7 blocked ".concat((0,o.v7)(e.blockedAt)):""]})]}),(0,s.jsx)(r.kx,{value:e.access,onChange:t=>{l(e.path,t)}}),(0,s.jsx)(r.Vx,{value:e.access}),(0,s.jsx)(a.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:()=>{x(e.path)},children:"Review"})]},e.path)})})]})}},2819:(e,t,n)=>{n.d(t,{Y:()=>i});var s=n(2703),a=n(347);function i(e){let{value:t,descriptor:n,className:i}=e;if(null===t&&null===n)return(0,s.jsx)("span",{"data-slot":"scrubbed-value",className:(0,a.cn)("text-ui text-text-3",i),children:"[unavailable]"});let l=null===n?null:(0,s.jsxs)(a.Ex,{variant:"primary",children:["scrubbed:"," ",void 0===n.provider?n.category:"".concat(n.category,"/").concat(n.provider)]});return(0,s.jsxs)("span",{"data-slot":"scrubbed-value",className:(0,a.cn)("inline-flex flex-wrap items-center gap-2",i),children:[null!==t?(0,s.jsx)("code",{className:"break-all font-mono text-ui text-text",children:t}):(0,s.jsx)("code",{className:"break-all font-mono text-ui text-text-2",children:null==n?void 0:n.maskedMatch}),l]})}},2909:(e,t,n)=>{n.d(t,{ExceptionsTableView:()=>o});var s=n(2703),a=n(347),i=n(1759),l=n(4621),r=n(1460);function o(e){let{items:t,includeTerminal:n,onSelect:o,renderedAt:c}=e;return 0===t.length?(0,s.jsx)("div",{className:"rounded-xl border border-border bg-surface py-10 text-center text-sm text-text-3",children:n?"No exceptions have ever been granted.":"No active exceptions — enforcement applies everywhere."}):(0,s.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:"ID"}),(0,s.jsx)(a.nd,{children:"Rule"}),(0,s.jsx)(a.nd,{children:"Value"}),(0,s.jsx)(a.nd,{children:"Scope"}),(0,s.jsx)(a.nd,{children:"Expires"}),(0,s.jsx)(a.nd,{children:"Uses"}),(0,s.jsx)(a.nd,{children:"Created"}),(0,s.jsx)(a.nd,{children:"State"})]})}),(0,s.jsx)(a.BF,{children:t.map(e=>(0,s.jsxs)(a.Hj,{className:"cursor-pointer","aria-label":"View details for exception ".concat(e.id.slice(0,8)),onClick:()=>{o(e.id)},children:[(0,s.jsx)(a.nA,{className:"font-mono text-xs text-text-3",children:e.id.slice(0,8)}),(0,s.jsx)(a.nA,{className:"font-mono text-xs",children:e.ruleId}),(0,s.jsx)(a.nA,{className:"font-mono text-xs",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[e.maskedValue,(0,s.jsx)(l._,{exception:e})]})}),(0,s.jsx)(a.nA,{className:"text-xs",children:r.yr[e.scope]}),(0,s.jsx)(a.nA,{className:"text-xs text-text-2",children:null===e.expiresAt?"—":(0,i.K)(e.expiresAt,c)}),(0,s.jsx)(a.nA,{className:"text-xs text-text-2",children:null===e.maxUses?String(e.useCount):"".concat(String(e.useCount),"/").concat(String(e.maxUses))}),(0,s.jsxs)(a.nA,{className:"text-xs text-text-2",children:[(0,i.K)(e.createdAt,c)," \xb7 ",r.gi[e.createdVia]]}),(0,s.jsx)(a.nA,{children:(0,s.jsx)(l.StateTagFor,{exception:e,now:c})})]},e.id))})]})})}},3169:(e,t,n)=>{n.d(t,{DerefAuditTableView:()=>d});var s=n(2703),a=n(723),i=n(347),l=n(1759),r=n(1955);let o={revealed:"border-l-2 border-l-sev-critical bg-sev-critical-fill font-medium",refused:"border-l-2 border-l-sev-high bg-sev-high-fill font-medium"};function c(e){let{row:t}=e;return"model"===t.target&&"revealed"===t.outcome?(0,s.jsx)(i.Ex,{variant:"critical",children:"revealed"}):"refused"===t.outcome?(0,s.jsx)(i.Ex,{variant:"high",children:"refused"}):"unavailable"===t.outcome?(0,s.jsx)(i.Ex,{variant:"outline",children:"unavailable"}):(0,s.jsx)(i.Ex,{variant:"default",children:"revealed"})}function d(e){let{rows:t,hiddenBatched:n,showBatched:d,onToggleBatched:x,hasNextPage:m=!1,hasPreviousPage:u=!1,onNextPage:p,onPreviousPage:h,loadingNextPage:g=!1,pageStart:f,renderedAt:j}=e,v=void 0===x?null:(0,s.jsx)(i.$n,{variant:"link",tone:"neutral",onClick:()=>{x(!d)},children:d?"Hide display/render resolutions":"Show them"}),b=!d&&n>0?(0,s.jsxs)("p",{className:"mt-3 flex items-center gap-2 text-xs text-text-3",children:[(0,s.jsxs)("span",{children:[String(n)," display/render"," ",1===n?"resolution":"resolutions"," hidden"]}),v]}):d&&void 0!==x?(0,s.jsx)("p",{className:"mt-3 text-xs text-text-3",children:v}):null,k=0===t.length;return!k||u||m?(0,s.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[k?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-text-3",children:"These rows moved while you were reading. Step back to see the rest."}):(0,s.jsxs)(i.XI,{children:[(0,s.jsx)(i.A0,{children:(0,s.jsxs)(i.Hj,{children:[(0,s.jsx)(i.nd,{children:"When"}),(0,s.jsx)(i.nd,{children:"Reason"}),(0,s.jsx)(i.nd,{children:"Target"}),(0,s.jsx)(i.nd,{children:"Outcome"}),(0,s.jsx)(i.nd,{children:"Grant"}),(0,s.jsx)(i.nd,{children:"Pointers"})]})}),(0,s.jsx)(i.BF,{children:t.map(e=>"purge"===e.reason?(0,s.jsxs)(i.Hj,{"data-purge":"",className:"bg-surface-2",children:[(0,s.jsx)(i.nA,{className:"text-xs text-text-2",children:(0,l.K)(e.at,j)}),(0,s.jsxs)(i.nA,{colSpan:5,className:"text-xs font-medium text-text-2",children:["Vault purge —"," ",1===e.pointerCount?"a pointer":"".concat(String(e.pointerCount)," pointers")," ","made permanently unresolvable"]})]},e.id):(0,s.jsxs)(i.Hj,{"data-model-crossing":"model"===e.target?e.outcome:void 0,className:(0,i.cn)("model"===e.target&&o[e.outcome],(0,a.kqf)(e.reason)&&"text-text-3"),children:[(0,s.jsx)(i.nA,{className:"text-xs text-text-2",children:(0,l.K)(e.at,j)}),(0,s.jsx)(i.nA,{className:"text-xs",children:r.V[e.reason]}),(0,s.jsx)(i.nA,{className:"text-xs",children:"model"===e.target?(0,s.jsx)("span",{className:"font-semibold text-sev-critical-ink",children:"model"}):(0,s.jsx)("span",{className:"text-text-2",children:"human"})}),(0,s.jsx)(i.nA,{children:(0,s.jsx)(c,{row:e})}),(0,s.jsx)(i.nA,{className:"font-mono text-xs text-text-3",children:void 0===e.grantId?"—":e.grantId.slice(0,8)}),(0,s.jsx)(i.nA,{className:"text-xs text-text-2",children:e.pointerCount>1?"\xd7".concat(String(e.pointerCount)):"—"})]},e.id))})]}),p?(0,s.jsxs)(i.dK,{children:[(0,s.jsx)(i.Eb,{disabled:!u||g,onClick:h}),(0,s.jsx)(i.D2,{children:void 0===f?"".concat(String(t.length)," shown"):k?"0 resolutions":"".concat(String(f),"–").concat(String(f+t.length-1)," resolutions")}),(0,s.jsx)(i.WA,{disabled:!m||g,loading:g,onClick:p})]}):m&&(0,s.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the most recent ",t.length," resolutions."]}),b]}):(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,s.jsx)("div",{className:"py-10 text-center text-sm text-text-3",children:"No de-references recorded — every resolution of a vaulted value lands here."}),b]})}},3183:(e,t,n)=>{n.d(t,{FindingLevelFilters:()=>m,FindingsToolbarView:()=>u});var s=n(2703),a=n(347),i=n(760),l=n(1145),r=n(6574),o=n(9455);let c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>e in l.x?l.x[e].label:e;function x(e,t,n){let s=new Set(e.map(e=>e.value));return[...e,...t.filter(e=>!s.has(e)).map(e=>({value:e,label:n(e),count:0}))]}function m(e){var t;let{facets:n,filters:a,onFiltersChange:i,showDeployment:l=!1}=e,r=x(n.provider.map(e=>({value:e.value,label:d(e.value),count:e.count})),a.provider,d),m=x(n.action.map(e=>({value:e.value,label:c(e.value),count:e.count})),a.action,c),u=new Map(n.status.map(e=>[e.value,e.count])),h=o.pM.map(e=>{var t;return{value:e,label:o.B5[e].label,count:null!=(t=u.get(e))?t:0}}),g=new Map((null!=(t=n.deployment)?t:[]).map(e=>[e.value,e.count])),f=o.Ec.map(e=>{var t;return{value:e,label:o.V_[e].label,count:null!=(t=g.get(e))?t:0}}),j=(e,t)=>{i({...a,[e]:t})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p,{label:"Provider",options:r,selected:a.provider,onChange:e=>{j("provider",e)}}),(0,s.jsx)(p,{label:"Action",options:m,selected:a.action,onChange:e=>{j("action",e)}}),(0,s.jsx)(p,{label:"Status",options:h,selected:a.status,onChange:e=>{j("status",e)}}),l&&(0,s.jsx)(p,{label:"Deployment",options:f,selected:a.deployment,onChange:e=>{j("deployment",e)}})]})}function u(e){let{facets:t,filters:n,onFiltersChange:a,query:i,onQueryChange:l,showDeployment:d=!1}=e,u=new Map(t.severity.map(e=>[e.value,e.count])),h=o.oC.map(e=>{var t;return{value:e,label:c(e),count:null!=(t=u.get(e))?t:0}}),g=x(t.subtype.map(e=>({value:e.value,label:e.value,count:e.count})),n.type,e=>e),f=(e,t)=>{a({...n,[e]:t})};return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(r.SearchField,{value:i,onValueChange:l,label:"Search findings",placeholder:"Search findings…",clearLabel:"Clear findings search",surface:"canvas",className:"h-9 w-64"}),(0,s.jsx)(p,{label:"Severity",options:h,selected:n.severity,onChange:e=>{f("severity",e)}}),(0,s.jsx)(p,{label:"Type",options:g,selected:n.type,onChange:e=>{f("type",e)}}),(0,s.jsx)(m,{facets:t,filters:n,onFiltersChange:a,showDeployment:d})]})}function p(e){let{label:t,options:n,selected:l,onChange:r}=e,o=l.length>0;return(0,s.jsxs)(a.AM,{children:[(0,s.jsxs)(a.Wv,{className:(0,a.cn)("inline-flex h-8 items-center gap-1.5 rounded-lg border px-3 text-sm font-medium transition-colors cursor-pointer",o?"border-primary bg-primary-tint text-primary":"border-border text-text-2 bg-surface hover:bg-surface-2"),children:[t,o&&(0,s.jsx)("span",{className:"flex size-4 items-center justify-center rounded-full bg-primary-solid text-[10px] font-semibold text-text-inv",children:l.length}),(0,s.jsx)(i.D3,{className:"size-3.5"})]}),(0,s.jsxs)(a.hl,{className:"min-w-52 max-h-80",children:[n.map(e=>{let t=l.includes(e.value);return(0,s.jsxs)("button",{type:"button",onClick:()=>{var t;t=e.value,r(l.includes(t)?l.filter(e=>e!==t):[...l,t])},className:"flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-text hover:bg-surface-2",children:[(0,s.jsx)("span",{className:(0,a.cn)("flex size-4 shrink-0 items-center justify-center rounded border",t?"border-primary-solid bg-primary-solid text-text-inv":"border-border"),children:t&&(0,s.jsx)(i.Sr,{className:"size-3"})}),(0,s.jsx)("span",{className:"flex-1",children:e.label}),void 0!==e.count&&(0,s.jsx)("span",{className:"text-xs tabular-nums text-text-3",children:e.count})]},e.value)}),o&&(0,s.jsx)("button",{type:"button",onClick:()=>{r([])},className:"mt-1 flex w-full cursor-pointer items-center rounded-md border-t border-border px-2 py-1.5 text-left text-sm text-text-2 hover:bg-surface-2",children:"Clear"})]})]})}},3193:(e,t,n)=>{n.d(t,{$x:()=>o,Ay:()=>l,Oy:()=>m,Tp:()=>u,ek:()=>d,nR:()=>x,ni:()=>p,oo:()=>r,pS:()=>c});var s=n(723),a=n(347),i=n(760);let l={[s.tLs.ClaudeCode]:"CLI agent",[s.tLs.Cursor]:"IDE",[s.tLs.Copilot]:"IDE",[s.tLs.Codex]:"CLI agent",[s.tLs.Antigravity]:"CLI agent",[s.tLs.Windsurf]:"IDE",[s.tLs.ClaudeDesktop]:"Desktop app",[s.tLs.ChatGpt]:"Web app",[s.tLs.ClaudeAi]:"Web app",[s.tLs.Api]:"API"},r=Object.values(s.tLs),o={session:{label:"Session",icon:i.k3,...a.cH.neutral},prompt:{label:"Prompt",icon:i.ny,...a.cH.primary},response:{label:"Response",icon:i.BZ,...a.cH.violet},tool:{label:"Tool",icon:i.k3,...a.cH.neutral},hook:{label:"Hook",icon:i.hF,...a.cH.low},detection:{label:"Detection",icon:i.Zu,...a.cH.critical},share:{label:"Egress",icon:i._G,...a.cH.teal},permission:{label:"Permission",icon:i.XA,...a.cH.high},commit:{label:"Commit",icon:i.OK,...a.cH.neutral},error:{label:"Error",icon:i._0,...a.cH.critical},active:{label:"In progress",icon:i.DQ,...a.cH.primary}},c={Bash:i.k3,Edit:i.qU,Write:i.qU,Read:i.oS,Grep:i.WI,WebFetch:i.fC,Task:i.hF,Agent:i.hF},d=i.k3,x={active:{label:"Live",badge:"success",dot:"bg-ok"},completed:{label:"Completed",badge:"default",dot:"bg-text-3"},interrupted:{label:"Interrupted",badge:"high",dot:"bg-sev-high"},error:{label:"Error",badge:"critical",dot:"bg-sev-critical"}},m={detections:"Findings",shares:"Data Shares",inventory:"Inventory"};function u(e){return Object.entries(e).map(e=>{let[t,n]=e;return{name:t,n}}).sort((e,t)=>t.n-e.n)}function p(e){return Object.values(e).reduce((e,t)=>e+t,0)}},3399:(e,t,n)=>{n.d(t,{i:()=>i});var s=n(2703),a=n(1145);function i(e){let{provider:t}=e;return(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 font-display text-xs text-text",children:[(0,s.jsx)(a.K,{id:t}),a.x[t].label]})}},3517:(e,t,n)=>{n.d(t,{ThemeToggle:()=>d});var s=n(2703),a=n(347),i=n(6807),l=n(7525);let r={light:"Light",dark:"Dark",system:"System"};function o(e){let{className:t}=e;return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,focusable:!1,className:t,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,s.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]})}function c(e){let{className:t}=e;return(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,focusable:!1,className:t,children:(0,s.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z"})})}function d(){let e=(0,i.useSyncExternalStore)(l.Mk,l.t$,l.Py),t=(0,i.useSyncExternalStore)(l.lr,l.Ud,l.LZ),n="system"===e?t?"dark":"light":e;(0,i.useEffect)(()=>{(0,l.AZ)(n)},[n]);let d="dark"===n?c:o;return(0,s.jsxs)(a.rI,{children:[(0,s.jsx)(a.ty,{asChild:!0,children:(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"icon","aria-label":"Theme: ".concat(r[e]),children:(0,s.jsx)(d,{className:"size-4"})})}),(0,s.jsx)(a.SQ,{align:"end",children:(0,s.jsx)(a.Hr,{value:e,onValueChange:e=>{(0,l.nk)(e)&&(0,l.pT)(e)},children:l.j0.map(e=>(0,s.jsx)(a.Ht,{value:e,children:r[e]},e))})})]})}},3585:(e,t,n)=>{n.d(t,{i:()=>c});var s=n(2703),a=n(347),i=n(760),l=n(3847),r=n(3193);function o(e){var t;let{event:n,first:o,last:c,linkHref:d}=e,x=r.$x[n.kind],m="tool"===n.kind&&n.tool&&null!=(t=r.pS[n.tool])?t:x.icon,u="active"===n.kind,p="tool"===n.kind||"commit"===n.kind,h=n.link?r.Oy[n.link]:null,g=n.link&&d?d(n.link,n.targetId):null;return(0,s.jsxs)("div",{className:"grid grid-cols-[60px_24px_1fr] gap-x-3",children:[(0,s.jsx)("div",{className:"whitespace-nowrap pt-1.5 text-right font-mono text-label text-text-3",children:(0,l.gE)(n.occurredAt)}),(0,s.jsxs)("div",{className:"relative flex justify-center",children:[!(o&&c)&&(0,s.jsx)("span",{className:(0,a.cn)("absolute left-1/2 w-px -translate-x-1/2 bg-border",o?"bottom-0 top-3":c?"top-0 h-3":"inset-y-0")}),(0,s.jsxs)("span",{className:(0,a.cn)("relative z-10 grid size-6 place-items-center rounded-md ring-2 ring-surface",x.fill,x.text),children:[u&&(0,s.jsx)("span",{className:"absolute inset-0 animate-ping rounded-md bg-current opacity-30"}),(0,s.jsx)(m,{"aria-hidden":!0,focusable:!1,className:"relative size-3.5"})]})]}),(0,s.jsxs)("div",{className:(0,a.cn)("pt-0.5",c?"pb-0":"pb-4.5"),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[n.bodyExpired?(0,s.jsx)("span",{className:"text-ui font-semibold text-text-2 italic",children:"Body expired"}):(0,s.jsx)("span",{className:"text-ui font-semibold text-text",children:n.title}),n.severity&&(0,s.jsx)(a.Pt,{severity:n.severity}),n.flagged&&(0,s.jsxs)(a.Ex,{variant:"critical",className:"h-6 gap-1.5",children:[(0,s.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"Flagged"]}),n.internal&&(0,s.jsxs)(a.Ex,{variant:"primary",className:"h-6 gap-1.5",children:[(0,s.jsx)(i.Zu,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"Internal"]})]}),(0,s.jsxs)("div",{className:(0,a.cn)("mt-0.5 text-xs text-text-2",p&&"font-mono"),children:[n.detail,h&&g&&(0,s.jsx)(a.$n,{asChild:!0,variant:"link",tone:"primary",className:"ml-2 text-xs font-normal",children:(0,s.jsxs)("a",{href:g,children:["Open in ",h,(0,s.jsx)(i.Qq,{"aria-hidden":!0,focusable:!1})]})})]})]})]})}function c(e){let{events:t,linkHref:n}=e;return(0,s.jsx)("div",{children:t.map((e,a)=>(0,s.jsx)(o,{event:e,first:0===a,last:a===t.length-1,...n?{linkHref:n}:{}},e.id))})}},3619:(e,t,n)=>{n.d(t,{CF:()=>d,EI:()=>l,Hf:()=>r,Lh:()=>g,P4:()=>c,ZX:()=>u,aD:()=>i,pN:()=>o,rL:()=>p});var s=n(347),a=n(760);let i={https:{label:"HTTPS",icon:a.XA,secure:!0},http:{label:"HTTP",icon:a.fC,secure:!1},sftp:{label:"SFTP",icon:a.JM,secure:!0},grpc:{label:"gRPC",icon:a.hF,secure:!0},smtp:{label:"SMTP",icon:a.K$,secure:!0},ws:{label:"WS",icon:a.fC,secure:!1},wss:{label:"WSS",icon:a.XA,secure:!0}};function l(e){return e.some(e=>!i[e].secure)}let r={secrets:{label:"Secrets",tone:"critical",icon:a.RY},pii:{label:"PII",tone:"high",icon:a.Ey},customer:{label:"Customer data",tone:"high",icon:a.ny},source:{label:"Source code",tone:"low",icon:a.lo},telemetry:{label:"Telemetry",tone:"teal",icon:a.BH},logs:{label:"Logs",tone:"default",icon:a.kp},metrics:{label:"Metrics",tone:"teal",icon:a.np},none:{label:"No payload",tone:"default",icon:a.mo}},o={recognized:{label:"Known provider",tone:"success",icon:a.C1},internal:{label:"Your organization",tone:"primary",icon:a.Zu},unverified:{label:"Unverified domain",tone:"high",icon:a._0},ip:{label:"Raw IP address",tone:"critical",icon:a.rX}},c={allowed:{label:"Allowed",tone:"success",icon:a.C1},blocked:{label:"Blocked",tone:"critical",icon:a.pD},review:{label:"Needs review",tone:"high",icon:a._0}},d={provider:"Providers",internal:"Internal & corporate domains",external:"External domains",ip:"Raw IP addresses"},x={raw_ip:"Connects to a raw IP with no reverse DNS",unverified_domain:"Corporate-looking domain not owned by your org",plaintext_transport:"Sends data over a plaintext transport"},m=["raw_ip","unverified_domain","plaintext_transport"];function u(e){let t=m.find(t=>e.includes(t));return t?x[t]:"Needs review"}function p(e){return"ip"===e.kind?s.id.critical:"external"===e.kind||"unverified"===e.trust?s.id.high:s.id.primary}let h=["#2563EB","#7C3AED","#DB2777","#0891B2","#CA8A04","#059669"];function g(e,t){var n;let s=null!=t?t:e,a=0;for(let e=0;e<s.length;e++)a=31*a+s.charCodeAt(e)>>>0;return{short:function(e){var t,n,s,a;let i=e.trim().split(/[\s.\-_/]+/u).filter(Boolean),l=null!=(t=i[0])?t:"";if(i.length<=1)return(l.slice(0,2)||"?").toUpperCase();let r=null!=(n=i[1])?n:"";return((null!=(s=l[0])?s:"")+(null!=(a=r[0])?a:"")).toUpperCase()||"?"}(e),color:null!=(n=h[a%h.length])?n:"#2563EB"}}},3649:(e,t,n)=>{n.d(t,{SessionListView:()=>h});var s=n(2703),a=n(347),i=n(1759),l=n(760),r=n(1145),o=n(6574),c=n(6442),d=n(9336),x=n(3847),m=n(6274);function u(e){let{session:t,selected:n,onSelect:o,renderedAt:c}=e,m=t.findings>0;return(0,s.jsxs)("button",{type:"button",onClick:o,"aria-current":n?"true":void 0,className:(0,a.cn)("relative cursor-pointer block w-full rounded-lg px-3 py-2.5 text-left transition-colors",n?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,s.jsx)(r.K,{id:t.harness,size:26}),(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)("div",{className:"truncate text-ui font-semibold text-text",title:t.title,children:t.title})}),(0,s.jsx)(d.md,{status:t.status})]}),(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 font-mono text-label text-text-3",children:[(0,s.jsx)(l.SY,{"aria-hidden":!0,focusable:!1,className:"size-3 shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 max-w-[50%] truncate",title:t.project,children:t.project}),(0,s.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),(0,s.jsx)(l.OK,{"aria-hidden":!0,focusable:!1,className:"size-3 shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",title:t.branches[0],children:t.branches[0]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-2",title:new Date(t.startedAt).toLocaleString(),suppressHydrationWarning:!0,children:(0,i.K)(t.startedAt,c)}),(0,s.jsx)(d.JW,{icon:l.O4,children:(0,x.vV)(t.startedAt,t.endedAt,t.status,c)}),(0,s.jsxs)(d.JW,{icon:l.kp,children:[t.turns," turns"]}),m&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs font-semibold text-sev-critical-ink",children:[(0,s.jsx)(l.Zu,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t.findings]})]})]})}function p(){return(0,s.jsxs)("div",{className:"rounded-lg px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,s.jsx)(a.EA,{className:"size-6.5 shrink-0 rounded-lg"}),(0,s.jsx)(a.EA,{className:"h-4 flex-1"})]}),(0,s.jsx)(a.EA,{className:"mb-2 h-3 w-2/3"}),(0,s.jsx)(a.EA,{className:"h-3 w-1/2"})]})}function h(e){let{sessions:t,selectedId:n,onSelect:i,query:l,onQuery:r,harness:d,harnessOptions:h,onHarness:g,isLoading:f,error:j,hasMore:v=!1,emptyCount:b=0,showEmpty:k=!1,onToggleEmpty:y,renderedAt:N}=e,w=(0,x.u3)(t,new Date(N)),C=""!==l.trim()||d.length>0,Y=1===b?"background session":"background sessions",I=b>0&&y?(0,s.jsx)("div",{className:"px-2 py-2 text-center",children:(0,s.jsx)(a.$n,{variant:"link",tone:"primary",className:"text-label font-normal",onClick:y,children:k?"Hide ".concat(String(b)," ").concat(Y):"".concat(String(b)," ").concat(Y," hidden — show")})}):null;return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)("div",{className:"shrink-0 border-b border-border p-3",children:[(0,s.jsx)(o.SearchField,{value:l,onValueChange:r,label:"Search sessions and events",placeholder:"Search sessions & events…",surface:"card",className:"mb-2 h-8.5 px-2.5",iconClassName:"size-3.5"}),(0,s.jsx)(m.HarnessSelect,{value:d,onChange:g,...h?{options:h}:{}})]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-2","aria-busy":f,children:j?(0,s.jsx)("div",{className:"p-2",children:(0,s.jsx)(c.r,{message:j})}):f&&0===t.length?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(p,{}),(0,s.jsx)(p,{}),(0,s.jsx)(p,{})]}):0===w.length?(0,s.jsxs)("div",{className:"py-10 text-center text-sm text-text-3",children:[C?"No sessions match":b>0?"No active sessions in this range":"No sessions recorded yet",I]}):(0,s.jsxs)(s.Fragment,{children:[w.map(e=>(0,s.jsxs)("div",{className:"mb-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2 pb-1.5 pt-2",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:e.day}),(0,s.jsx)("span",{className:"h-px flex-1 bg-hairline"}),(0,s.jsx)("span",{className:"text-label text-text-3",children:e.items.length})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:e.items.map(e=>(0,s.jsx)(u,{session:e,renderedAt:N,selected:e.id===n,onSelect:()=>{i(e.id)}},e.id))})]},e.day)),I,v&&(0,s.jsxs)("div",{className:"px-2 py-3 text-center text-label text-text-3",children:["Showing the most recent ",t.length," sessions — narrow the range to see more."]})]})})]})}},3749:(e,t,n)=>{n.r(t),n.d(t,{AreaChart:()=>h,Donut:()=>x,Sparkline:()=>m,useMeasuredWidth:()=>p});var s=n(2703),a=n(2830),i=n(5797),l=n(2137),r=n(8676),o=n(7054),c=n(6807),d=n(2286);function x(e){let{segments:t,size:n=120,thickness:l=16,children:r}=e,o=n/2,c=(0,a.A)().value(e=>e.value).sort(null)(t),d=(0,i.A)().innerRadius(o-l).outerRadius(o);return(0,s.jsxs)("div",{className:"relative shrink-0",style:{width:n,height:n},children:[(0,s.jsx)("div",{"aria-hidden":!0,children:(0,s.jsx)("svg",{width:n,height:n,children:(0,s.jsx)("g",{transform:"translate(".concat(String(o),",").concat(String(o),")"),children:c.map(e=>{var t;return(0,s.jsx)("path",{d:null!=(t=d(e))?t:void 0,fill:e.data.color,stroke:"none"},e.data.label)})})})}),r&&(0,s.jsx)("div",{className:"absolute inset-0 grid place-items-center text-center",children:r})]})}function m(e){var t,n;let{data:a,color:i,height:x=34,fill:m=!0,strokeWidth:u=2,labels:p,formatValue:h}=e,g="spark-".concat((0,c.useId)().replace(/:/g,"")),[f,j]=(0,c.useState)(null),v=Math.max(...a),b=Math.min(...a),k=v-b||1,y=e=>a.length<=1?50:2+e/(a.length-1)*96,N=e=>x-2-(e-b)/k*(x-4),w=a.map((e,t)=>[y(t),N(e)]),C=null!=(t=(0,l.A)().x(e=>e[0]).y(e=>e[1]).curve(r.G)(w))?t:void 0,Y=null!=(n=(0,o.A)().x(e=>e[0]).y0(x).y1(e=>e[1]).curve(r.G)(w))?n:void 0,I=(0,s.jsxs)("svg",{"aria-hidden":!0,width:"100%",height:x,viewBox:"0 0 ".concat(String(100)," ").concat(String(x)),preserveAspectRatio:"none",className:"block",children:[m&&(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:i,stopOpacity:.18}),(0,s.jsx)("stop",{offset:"100%",stopColor:i,stopOpacity:0})]})}),m&&(0,s.jsx)("path",{d:Y,fill:"url(#".concat(g,")"),stroke:"none"}),(0,s.jsx)("path",{d:C,fill:"none",stroke:i,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]});if(!((null==p?void 0:p.length)===a.length&&a.length>0))return I;let S=null===f?void 0:a[f],A=null===f?void 0:p[f];return(0,s.jsxs)("div",{"aria-hidden":!0,className:"relative",onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect();if(0===t.width)return;let n=(e.clientX-t.left)/t.width*100,s=a.length<=1?0:Math.round((n-2)/96*(a.length-1));j(Math.min(a.length-1,Math.max(0,s)))},onMouseLeave:()=>{j(null)},children:[I,null!==f&&void 0!==S&&void 0!==A&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"pointer-events-none absolute size-2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-surface/80",style:{left:"".concat(String(y(f)/100*100),"%"),top:N(S),background:i}}),(0,s.jsxs)("div",{className:"pointer-events-none absolute z-10 -translate-x-1/2 whitespace-nowrap",style:{left:"clamp(36px, ".concat(String(y(f)/100*100),"%, calc(100% - 36px))"),bottom:x+6,borderRadius:8,border:"1px solid ".concat(d.l.border),background:d.l.surface,padding:"4px 8px",fontSize:12,boxShadow:"0 4px 12px rgb(0 0 0 / 0.08)"},children:[(0,s.jsx)("div",{style:{color:d.l.text3,fontSize:11},children:A}),(0,s.jsx)("div",{className:"font-semibold",style:{color:d.l.text2},children:(null!=h?h:String)(S)})]})]})]})}let u={top:6,right:6,bottom:0,left:6};function p(){let e=(0,c.useRef)(null),[t,n]=(0,c.useState)(0);return(0,c.useEffect)(()=>{let t=e.current;if(!t)return;let s=new ResizeObserver(e=>{for(let t of e)n(t.contentRect.width)});return s.observe(t),()=>{s.disconnect()}},[]),[e,t]}function h(e){let{data:t,series:n,height:a=160,valueFormat:i=e=>String(e)}=e,x=(0,c.useId)().replace(/:/g,""),[m,h]=p(),[g,f]=(0,c.useState)(null),j=Math.max(0,h-u.left-u.right),v=Math.max(0,a-u.top-u.bottom),b=[];for(let e of t)for(let t of n){let n=e[t.key];"number"==typeof n&&b.push(n)}let k=Math.max(1,...b),y=e=>t.length<=1?0:e/(t.length-1)*j,N=e=>v-e/k*v,w=null===g?null:t[g];return(0,s.jsxs)("div",{ref:m,"aria-hidden":!0,className:"relative",style:{height:a},children:[h>0&&(0,s.jsxs)("svg",{width:h,height:a,onMouseMove:function(e){if(!m.current||0===t.length)return;let n=m.current.getBoundingClientRect(),s=e.clientX-n.left-u.left,a=t.length<=1?0:j/(t.length-1),i=0===a?0:Math.round(s/a);f(Math.min(t.length-1,Math.max(0,i)))},onMouseLeave:()=>{f(null)},children:[(0,s.jsx)("defs",{children:n.map(e=>(0,s.jsxs)("linearGradient",{id:"".concat(x,"-").concat(e.key),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:e.color,stopOpacity:.16}),(0,s.jsx)("stop",{offset:"100%",stopColor:e.color,stopOpacity:0})]},e.key))}),(0,s.jsxs)("g",{transform:"translate(".concat(String(u.left),",").concat(String(u.top),")"),children:[[0,.25,.5,.75,1].map(e=>(0,s.jsx)("line",{x1:0,x2:j,y1:v*e,y2:v*e,stroke:d.l.border,strokeOpacity:.6},e)),n.map(e=>{var n,a;let i=null!=(n=(0,o.A)().defined(t=>null!==t[e.key]).x((e,t)=>y(t)).y0(N(0)).y1(t=>{var n;return N(null!=(n=t[e.key])?n:0)}).curve(r.G)(t))?n:void 0,c=null!=(a=(0,l.A)().defined(t=>null!==t[e.key]).x((e,t)=>y(t)).y(t=>{var n;return N(null!=(n=t[e.key])?n:0)}).curve(r.G)(t))?a:void 0;return(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:i,fill:"url(#".concat(x,"-").concat(e.key,")"),stroke:"none"}),(0,s.jsx)("path",{d:c,fill:"none",stroke:e.color,strokeWidth:2})]},e.key)}),w&&null!==g&&(0,s.jsxs)("g",{children:[(0,s.jsx)("line",{x1:y(g),x2:y(g),y1:0,y2:v,stroke:d.l.border}),n.map(e=>{let t=w[e.key];return null===t?null:(0,s.jsx)("circle",{cx:y(g),cy:N(t),r:3,fill:e.color},e.key)})]})]})]}),w&&null!==g&&(0,s.jsxs)("div",{className:"pointer-events-none absolute top-0 -translate-x-1/2",style:{left:Math.min(h-60,Math.max(60,u.left+y(g))),borderRadius:8,border:"1px solid ".concat(d.l.border),background:d.l.surface,padding:"6px 8px",fontSize:12,boxShadow:"0 4px 12px rgb(0 0 0 / 0.08)"},children:[(0,s.jsx)("div",{style:{color:d.l.text3,fontSize:11,marginBottom:4},children:w.label}),n.map(e=>{let t=w[e.key];return null===t?null:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",style:{color:d.l.text2},children:[(0,s.jsx)("span",{className:"size-2 rounded-xs",style:{background:e.color,display:"inline-block"}}),(0,s.jsx)("span",{className:"font-semibold",children:i(t,e.key)})]},e.key)})]})]})}},3783:(e,t,n)=>{n.d(t,{$F:()=>c,Ai:()=>d,Jk:()=>m,Zp:()=>x});var s=n(2703),a=n(347),i=n(760),l=n(8230),r=n(8118);function o(e){let{tone:t,icon:n,children:i,className:l}=e,[r,o]=(0,a.vV)(t);return(0,s.jsxs)("span",{className:"inline-flex h-[22px] items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-xs font-semibold "+(null!=l?l:""),style:{color:r,background:o},children:[n&&(0,s.jsx)(n,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i]})}function c(e){let{policy:t,floor:n}=e,o=(0,r.N2)(t,n),c=(0,r.H1)(t,n),d=(0,l.ES)(o),[x,m]=(0,a.vV)(d.tone),u=d.icon,p=c&&n?(0,r.xf)(n):void 0;return(0,s.jsxs)("span",{className:"inline-flex h-5 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-xs font-semibold",style:{color:x,background:m},title:p,children:[(0,s.jsx)(u,{"aria-hidden":!0,focusable:!1,className:"size-3"}),d.label,void 0!==p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.ai,{"aria-hidden":!0,focusable:!1,className:"size-3"}),(0,s.jsx)("span",{className:"sr-only",children:p})]})]})}function d(e){let{origin:t}=e,n=l.H9[t];return(0,s.jsx)(o,{tone:n.tone,icon:n.icon,children:n.label})}function x(e){let{version:t}=e;return(0,s.jsxs)("span",{className:"inline-flex h-6 items-center gap-1.5 whitespace-nowrap rounded-full bg-sev-high-fill px-2 text-xs font-semibold text-sev-high-ink",children:[(0,s.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t?"Update \xb7 v"+t:"Update"]})}function m(e){let{publisher:t,kind:n}=e,i=l.jP[n],[r]=(0,a.vV)(i.tone),o=i.icon;return(0,s.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-semibold text-text-2",children:[(0,s.jsx)(o,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0",style:{color:r}}),(0,s.jsx)("span",{className:"truncate",title:t,children:t}),i.verified&&(0,s.jsx)("span",{title:i.label,className:"text-[10px] font-bold",style:{color:r},children:"✓"})]})}},3847:(e,t,n)=>{n.d(t,{Sk:()=>p,UK:()=>s.UKt,fz:()=>u,gE:()=>x,nt:()=>r,rw:()=>c,u3:()=>h,vV:()=>m,xd:()=>s.xdw});var s=n(723);let a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function l(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function r(e,t){var n,s;let r=new Date(e);if(Number.isNaN(r.getTime()))return"";let o=Math.round((l(t)-l(r))/864e5);return 0===o?"Today":1===o?"Yesterday":"".concat(null!=(n=i[r.getDay()])?n:"",", ").concat(null!=(s=a[r.getMonth()])?s:""," ").concat(String(r.getDate()))}let o=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});function c(e){let t=Date.parse(e);return Number.isNaN(t)?"":o.format(t)}let d=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"});function x(e){let t=Date.parse(e);return Number.isNaN(t)?"":d.format(t)}function m(e,t,n,s){let a=Date.parse(e);if(Number.isNaN(a))return"";let i=Math.max(0,Math.round(((t?Date.parse(t):s)-a)/6e4)),l=Math.floor(i/60),r=i%60,o=l>0?"".concat(String(l),"h ").concat(String(r),"m"):"".concat(String(r),"m");return"active"===n?"".concat(o," \xb7 live"):o}function u(e){let t=e.cacheRead+e.inputTokens;return t>0?Math.round(100*e.cacheRead/t):0}function p(e){return(0,s.ap_)(e)}function h(e,t){let n=[];for(let s of e){let e=r(s.startedAt,t),a=n.find(t=>t.day===e);a||(a={day:e,items:[]},n.push(a)),a.items.push(s)}return n}},3868:(e,t,n)=>{n.d(t,{DetectionDetailView:()=>u});var s=n(2703),a=n(347),i=n(6807),l=n(3878),r=n(760),o=n(8230),c=n(8118),d=n(8515),x=n(6057);function m(e){let{rule:t,onOpen:n}=e,i=o.rE[t.matcher.type],l=i.icon;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:[(0,s.jsxs)("div",{className:"mb-2.5 flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"grid size-7.5 shrink-0 place-items-center rounded-lg",style:{background:i.fill,color:i.color},children:(0,s.jsx)(l,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,s.jsx)("span",{className:"text-xs text-text-3",children:o.gh[t.category]||t.category})]}),(0,s.jsx)("div",{className:"mt-px font-mono text-label text-text-3",children:t.id})]}),(0,s.jsx)(a.Pt,{severity:t.severity}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-0.5 text-xs font-semibold",style:{background:i.fill,color:i.color},children:i.label})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate rounded-md border border-border bg-surface-2 px-2.5 py-1.5 font-mono text-xs text-text-2",children:(0,o.vm)(t.matcher)}),(0,s.jsxs)(a.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:n,className:"shrink-0",children:["View",(0,s.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]})]})}function u(e){let{d:t,onOpenRule:n,onToggleEnabled:u,onChangePolicy:p,unavailablePolicies:h,policyFloor:g,policyError:f,enabledError:j,onOpenUpdate:v,onRecheck:b,unknownHint:k}=e,y=(0,c.N2)(t.policyId,g),N=(0,o.ES)(y),w=N.icon,C=(0,c.Pt)(g),Y=void 0===h&&void 0===C?void 0:{...h,...C},I=void 0!==u&&(0,c.VA)(t.enabled,g),S=(0,i.useId)();return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)("div",{className:"border-b border-border px-5 pb-4 pt-5",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,s.jsx)("h2",{className:"font-display text-xl font-semibold text-text",children:t.name}),(0,s.jsxs)("span",{className:"rounded-full border border-border bg-surface-2 px-2 py-0.5 font-mono text-xs font-semibold text-text-2",children:["v",t.version]})]}),t.description&&(0,s.jsx)("div",{className:"mt-1.5 text-ui leading-snug text-text-2",children:t.description}),(0,s.jsx)("div",{className:"mt-2 font-mono text-xs text-text-3",children:t.id})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-ui font-semibold "+(t.enabled?"text-ok-ink":"text-text-3"),children:t.enabled?"Enabled":"Disabled"}),u&&(0,s.jsx)(a.dO,{checked:t.enabled,...I?{}:{onCheckedChange:u},"aria-disabled":I||void 0,"aria-describedby":I?S:void 0,title:I?c.q2:void 0,className:I?"cursor-not-allowed opacity-50":void 0,"aria-label":t.enabled?"Disable detection":"Enable detection"})]}),(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"icon","aria-label":"More",className:"size-8.5 text-text-3",children:(0,s.jsx)(r.wy,{"aria-hidden":!0,focusable:!1})})]})]}),I&&(0,s.jsx)("p",{id:S,className:"mt-2 text-xs text-text-3","data-slot":"enabled-locked-reason",children:c.q2}),j&&(0,s.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink","data-slot":"enabled-write-error",children:j})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-5",children:[(0,s.jsx)(x.t,{d:t,onOpenUpdate:v,onRecheck:b,unknownHint:k}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2.5 flex items-baseline gap-2",children:[(0,s.jsx)(l.e,{children:"Enforcement policy"}),(0,s.jsx)("span",{className:"text-xs text-text-3",children:"applied to every matching request"})]}),(0,s.jsx)(d.PolicyPicker,{value:y,onChange:p,unavailable:Y}),f&&(0,s.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink","data-slot":"policy-write-error",children:f}),(0,s.jsxs)("div",{className:"mt-3 flex items-start gap-2.5 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,s.jsx)(w,{"aria-hidden":!0,focusable:!1,className:"mt-px size-4 shrink-0",style:{color:(0,a.vV)(N.tone)[0]}}),(0,s.jsx)("div",{className:"text-xs leading-snug text-text-2",children:N.desc})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center gap-2.5",children:[(0,s.jsx)(l.e,{children:"Rules"}),(0,s.jsx)("span",{className:"rounded-full bg-surface-3 px-2 py-px text-xs font-semibold text-text-2",children:t.rules.length}),(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsxs)(a.$n,{variant:"outline",tone:"neutral",size:"sm",disabled:!0,title:"Rule authoring coming soon",children:[(0,s.jsx)(r.c1,{"aria-hidden":!0,focusable:!1}),"Add rule"]})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:t.rules.map(e=>(0,s.jsx)(m,{rule:e,onOpen:()=>{n(e.id)}},e.id))})]})]})]})}},3878:(e,t,n)=>{n.d(t,{e:()=>i,p:()=>l});var s=n(2703),a=n(347);function i(e){let{children:t,className:n}=e;return(0,s.jsx)("span",{className:(0,a.cn)("mb-2 block text-label font-semibold uppercase tracking-wider text-text-3",n),children:t})}function l(e){let{label:t,children:n}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,s.jsx)("div",{className:"text-ui font-medium text-text",children:n})]})}},4157:(e,t,n)=>{n.d(t,{FileDetailDrawer:()=>c});var s=n(2703),a=n(347),i=n(3878),l=n(8048),r=n(8215),o=n(5654);function c(e){var t;let{file:n,onChange:c}=e,d=r.Gb[n.origin],x=n.project;return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)(a.Fm,{className:"flex-row items-center gap-2.5 py-4 px-5",children:[(0,s.jsx)("span",{className:"grid size-7.5 shrink-0 place-items-center rounded-lg bg-surface-2 text-text-2",children:(0,s.jsx)(o.m,{name:"file",className:"size-4.5"})}),(0,s.jsx)(a.qp,{className:"min-w-0 truncate font-mono text-sm",children:n.name})]}),(0,s.jsxs)("div",{className:"mt-1 flex min-h-0 flex-1 flex-col gap-4.5 overflow-y-auto border-t border-border py-4 px-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"break-all font-mono text-xs text-text-3",children:[x.repo," › ",n.path]}),(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,s.jsx)(l.TJ,{origin:n.origin}),(0,s.jsx)(l.yk,{v:x.visibility}),n.findings>0&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-sev-critical-fill px-2 py-0.5 text-xs font-semibold text-sev-critical-ink",children:[(0,s.jsx)(o.m,{name:"alert",className:"size-3"}),n.findings," finding",1===n.findings?"":"s"]})]})]}),(0,s.jsx)(l.wn,{label:"LLM access",children:(0,s.jsx)(l.AC,{order:r.IF,meta:r.Pe,value:n.access,onChange:c,accentOf:e=>e.accent})}),(0,s.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,s.jsx)(o.m,{name:d.icon,className:"size-4.5 shrink-0 text-text-2"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 text-xs font-semibold",children:"Why this default"}),(0,s.jsx)("div",{className:"text-xs leading-relaxed text-text-2",children:(0,r._t)(x,n.origin)})]})]}),n.findingsRefs.length>0&&(0,s.jsx)(l.wn,{label:"Related findings",children:(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:n.findingsRefs.map(e=>(0,s.jsxs)("button",{type:"button",className:"flex w-full cursor-pointer items-center gap-2.5 rounded-lg border border-border bg-primary-tint px-3 py-2.5 text-left",children:[(0,s.jsx)(o.m,{name:"alert",className:"size-4 shrink-0 text-sev-critical-ink"}),(0,s.jsx)("span",{className:"flex-1 text-xs font-medium text-text",children:e.title||n.note}),(0,s.jsx)("span",{className:"text-xs text-primary",children:"Open in Findings"}),(0,s.jsx)(o.m,{name:"chevron-right",className:"size-4 text-text-3"})]},e.id))})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,s.jsx)(i.p,{label:"Repository",children:(0,s.jsx)("span",{className:"font-mono text-xs",children:x.repo})}),(0,s.jsx)(i.p,{label:"Visibility",children:"public"===x.visibility?"Public":"Private"}),(0,s.jsx)(i.p,{label:"Origin",children:d.label}),(0,s.jsx)(i.p,{label:"Set by",children:n.isCustom?(0,s.jsx)("span",{className:"text-primary",children:"You"}):"Default policy"}),(0,s.jsx)(i.p,{label:"Language",children:x.language}),(0,s.jsx)(i.p,{label:"Last activity",children:(0,r.v7)(null!=(t=n.blockedAt)?t:x.updatedAt)})]})]})]})}},4194:(e,t,n)=>{n.d(t,{N:()=>d,T:()=>l});var s=n(2703),a=n(347),i=n(6807);function l(e){let[t,n]=(0,i.useState)(()=>new Set);return{visible:e.filter(e=>!t.has(e.key)),hidden:t,toggle:function(t){n(n=>{if(n.has(t)){let e=new Set(n);return e.delete(t),e}if(!e.some(e=>e.key!==t&&!n.has(e.key)))return n;let s=new Set(n);return s.add(t),s})}}}function r(e){return void 0===e||""===e?null:e}function o(e){let{color:t,hollow:n}=e;return(0,s.jsx)("span",{className:"size-2 rounded-xs",style:n?{background:"transparent",boxShadow:"inset 0 0 0 1.5px ".concat(t)}:{background:t}})}function c(e){let{text:t}=e;return null===t?null:(0,s.jsx)("span",{className:"text-text-3",children:t})}function d(e){let{series:t,visibility:n,metaLabel:i,interactive:l}=e,{hidden:d,visible:x,toggle:m}=n;return l?(0,s.jsx)(s.Fragment,{children:t.map(e=>{let t=d.has(e.key),n=!t&&1===x.length,l=r(null==i?void 0:i(e.key)),u=null===l?e.label:"".concat(e.label,", ").concat(l);return(0,s.jsxs)("button",{type:"button","aria-label":n?"".concat(u,", only series left"):u,"aria-pressed":!t,"aria-disabled":n||void 0,title:n?"".concat(e.label," is the only series left — show another before hiding it"):t?"Show ".concat(e.label):"Hide ".concat(e.label),onClick:()=>{m(e.key)},className:(0,a.cn)("-mx-1 inline-flex cursor-pointer items-center gap-1.5 rounded-sm px-1 transition-colors","hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40",t&&"text-text-3",n&&"cursor-default hover:bg-transparent"),children:[(0,s.jsx)(o,{color:e.color,hollow:t}),e.label,(0,s.jsx)(c,{text:l})]},e.key)})}):(0,s.jsx)(s.Fragment,{children:t.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)(o,{color:e.color,hollow:!1}),e.label,(0,s.jsx)(c,{text:r(null==i?void 0:i(e.key))})]},e.key))})}},4330:(e,t,n)=>{n.d(t,{AssetDetail:()=>d});var s=n(2703),a=n(347),i=n(6807),l=n(8048),r=n(8215),o=n(5654);let c={skill:"Skill",mcp:"MCP server",hook:"Hook",config:"Configuration file"};function d(e){let{asset:t,onTrust:n,onClose:i}=e,d="mcp"===t.type,m=t.trust,u=(0,r.TW)(t.type),p=c[t.type];return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3.5",children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-8.5 shrink-0 place-items-center rounded-lg",u.bg,u.fg),children:(0,s.jsx)(o.m,{name:u.icon,className:"size-4.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"truncate font-mono text-sm font-semibold text-text",title:t.name,children:t.name}),(0,s.jsx)("div",{className:"mt-px text-xs text-text-3",children:p})]}),i&&(0,s.jsx)(a.$n,{variant:"ghost",size:"icon","aria-label":"Back to harness",title:"Back to harness",onClick:i,children:(0,s.jsx)(o.m,{name:"x"})})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4.5 overflow-y-auto p-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[d&&m&&(0,s.jsx)(l.As,{value:m}),(0,s.jsx)(l.Kh,{flags:t.flags})]}),t.description&&(0,s.jsx)("div",{className:"text-sm leading-relaxed text-text-2",children:t.description}),d&&m&&(0,s.jsx)(l.wn,{label:"Trust classification",children:(0,s.jsx)(l.AC,{order:r.yx,meta:r.ZY,value:m,onChange:n,accentOf:e=>e.iconBg})}),t.finding&&(0,s.jsx)(l.wn,{label:"Related finding",children:(0,s.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-lg border border-border bg-sev-critical-fill px-3 py-2.5 text-left",children:[(0,s.jsx)(o.m,{name:"alert",className:"size-4 shrink-0 text-sev-critical-ink"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-semibold text-text",children:t.finding.title}),t.finding.note&&(0,s.jsx)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:t.finding.note})]}),(0,s.jsx)(o.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}),(0,s.jsx)(l.wn,{label:"Details",children:(0,s.jsx)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-3.5",children:Object.entries(t.meta).map(e=>{let[t,n]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,s.jsx)("div",{className:"wrap-break-word font-mono text-xs font-medium",children:String(n)})]},t)})})}),d&&t.tools&&(0,s.jsx)(x,{tools:t.tools,blocked:"unapproved"===m}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:function(e,t){let n;if("skill"===e.type){let t="string"==typeof e.meta.Latest?e.meta.Latest:"";n=e.flags.includes("update")?[{key:"u",primary:!0,icon:"arrow-up",label:"Update to ".concat(t).trim()},{key:"c",icon:"book",label:"Changelog"}]:[{key:"r",icon:"refresh",label:"Check for updates"}]}else n="mcp"===e.type?"unapproved"===t?[{key:"a",primary:!0,icon:"shield-check",label:"Approve & allow-list"},{key:"b",icon:"slash-circle",label:"Block server"}]:[{key:"v",icon:"eye",label:"View tools"},{key:"r",icon:"refresh",label:"Re-verify"}]:"hook"===e.type?e.flags.includes("conflict")?[{key:"r",primary:!0,icon:"branch",label:"Resolve run order"},{key:"d",icon:"eye-off",label:"Disable hook"}]:e.flags.includes("unknown")?[{key:"v",primary:!0,icon:"shield-check",label:"Review & verify"},{key:"b",icon:"slash-circle",label:"Block"}]:[{key:"v",icon:"eye",label:"View script"}]:e.flags.includes("risk")?[{key:"r",primary:!0,icon:"shield-check",label:"Review change"},{key:"d",icon:"swap",label:"View diff"}]:e.flags.length?[{key:"d",icon:"swap",label:"View diff"},{key:"m",icon:"check",label:"Mark reviewed"}]:[{key:"o",icon:"eye",label:"Open file"}];return n.map(e=>(0,s.jsxs)(a.$n,{variant:e.primary?"solid":"outline",tone:e.primary?"primary":"neutral",size:"sm",children:[(0,s.jsx)(o.m,{name:e.icon,className:"size-3.5"}),e.label]},e.key))}(t,m)})]})]})}function x(e){let{tools:t,blocked:n}=e,[l,r]=(0,i.useState)(!1),c=l?t:t.slice(0,4);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Exposed tools"}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:t.length}),n&&(0,s.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1.5 text-xs font-semibold text-sev-critical-ink",children:[(0,s.jsx)(o.m,{name:"slash-circle",className:"size-3"})," Calls blocked"]})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:c.map(e=>(0,s.jsxs)("div",{className:(0,a.cn)("flex items-start gap-2.5 rounded-lg border px-3 py-2.5",e.risk?"border-sev-high-fill bg-sev-high-fill":"border-border bg-surface",n&&"opacity-70"),children:[(0,s.jsx)("span",{className:(0,a.cn)("mt-px grid size-5.5 shrink-0 place-items-center rounded-md",e.risk?"bg-sev-high-ink text-on-accent":e.write?"bg-surface-2 text-text-2":"bg-teal-fill text-teal-ink"),children:(0,s.jsx)(o.m,{name:e.risk?"alert":e.write?"edit":"eye",className:"size-3"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-1.5",children:[(0,s.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.name}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-3",children:e.signature}),e.write&&!e.risk&&(0,s.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-px text-xs font-semibold text-text-2",children:"write"})]}),(0,s.jsx)("div",{className:"mt-0.5 text-xs leading-relaxed text-text-2",children:e.description}),e.risk&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 text-xs font-semibold text-sev-high-ink",children:[(0,s.jsx)(o.m,{name:"alert",className:"size-3"})," ",e.risk]})]})]},e.name))}),t.length>4&&(0,s.jsxs)(a.$n,{variant:"ghost",tone:"primary",size:"sm",className:"mt-2 px-0",onClick:()=>{r(!l)},children:[(0,s.jsx)(o.m,{name:"chevron-down",className:(0,a.cn)("size-3.5 transition-transform",l&&"rotate-180")}),l?"Show fewer":"Show all ".concat(String(t.length)," tools")]})]})}},4409:(e,t,n)=>{n.d(t,{FindingsFlatTableView:()=>m});var s=n(2703),a=n(347),i=n(1759),l=n(760),r=n(8809),o=n(9455),c=n(3399),d=n(2036);let x={severity:"min-w-[110px] whitespace-nowrap",sources:"min-w-[140px] whitespace-nowrap",user:"min-w-[140px]",action:"min-w-[130px] whitespace-nowrap",status:"min-w-[110px] whitespace-nowrap",deployment:"min-w-[130px] whitespace-nowrap",latest:"min-w-[100px] whitespace-nowrap",location:"min-w-[200px]",type:"min-w-[200px]"};function m(e){let{items:t,selectedId:n,onSelect:m,onNextPage:u,onPreviousPage:p,hasNextPage:h=!1,hasPreviousPage:g=!1,loadingNextPage:f=!1,pageStart:j,total:v,isLoading:b=!1,emptyState:k,showUserColumn:y=!1,showDeploymentColumn:N=!1,pinnedType:w=!1,header:C,renderedAt:Y}=e;return(0,s.jsxs)(a.Zp,{className:"flex h-full min-h-0 flex-col overflow-hidden shadow-sm",children:[C,(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:b?(0,s.jsx)("div",{className:"flex flex-col gap-2 py-2",children:Array.from({length:8},(e,t)=>(0,s.jsx)("div",{className:"h-11 animate-pulse rounded-md bg-surface-3"},t))}):0===t.length?null!=k?k:(0,s.jsx)("p",{className:"py-8 text-center text-sm text-text-3",children:"No findings match these filters."}):(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[!w&&(0,s.jsx)(a.nd,{className:x.severity,children:"Severity"}),(0,s.jsx)(a.nd,{className:x.type,children:w?"Value":"Type"}),(0,s.jsx)(a.nd,{className:x.sources,children:"Source"}),y&&(0,s.jsx)(a.nd,{className:x.user,title:o.O,children:"User"}),(0,s.jsx)(a.nd,{className:x.location,children:"Location"}),(0,s.jsx)(a.nd,{className:x.action,children:"Action"}),(0,s.jsx)(a.nd,{className:x.status,children:"Status"}),N&&(0,s.jsx)(a.nd,{className:x.deployment,children:"Deployment"}),(0,s.jsx)(a.nd,{className:x.latest,children:"Detected"})]})}),(0,s.jsx)(a.BF,{children:t.map(e=>{var t;let u=null!=(t=o.y7[e.category])?t:l.RY;return(0,s.jsxs)(a.Hj,{"data-state":n===e.id?"selected":void 0,className:"cursor-pointer hover:bg-surface-2",onClick:()=>{m(e)},children:[!w&&(0,s.jsx)(a.nA,{className:x.severity,children:(0,s.jsx)(a.Pt,{severity:e.severity})}),(0,s.jsx)(a.nA,{className:x.type,children:w?(0,s.jsx)("span",{className:"font-mono text-ui text-text wrap-anywhere",children:e.match.maskedValue}):(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:(0,a.cn)("flex size-7 shrink-0 items-center justify-center rounded-lg",(0,o.i9)(e.category)),children:(0,s.jsx)(u,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-ui font-semibold text-text wrap-anywhere",children:e.subtype}),(0,s.jsx)("div",{className:"font-mono text-xs text-text-3 wrap-anywhere",children:e.match.maskedValue})]})]})}),(0,s.jsx)(a.nA,{className:x.sources,children:(0,s.jsx)(c.i,{provider:e.provider})}),y&&(0,s.jsx)(a.nA,{className:x.user,children:(0,s.jsx)(d.c,{user:e.user})}),(0,s.jsx)(a.nA,{className:x.location,children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"font-mono text-xs text-text-2 wrap-anywhere",children:(0,o.xE)(e)}),e.repo&&(0,s.jsx)("div",{className:"text-xs text-text-3 wrap-anywhere",children:e.repo})]})}),(0,s.jsx)(a.nA,{className:x.action,children:(0,s.jsx)(r.T,{action:e.action})}),(0,s.jsx)(a.nA,{className:x.status,children:void 0===e.status?(0,s.jsx)("span",{className:"text-text-3",children:"—"}):(0,s.jsx)(a.Ex,{variant:(0,o.Dx)(e.status).badge,className:"h-6",children:(0,o.Dx)(e.status).label})}),N&&(0,s.jsx)(a.nA,{className:x.deployment,children:void 0===e.delivery?(0,s.jsx)("span",{className:"text-text-3",children:"—"}):(0,s.jsx)(a.Ex,{variant:(0,o.dL)(e.delivery.state).badge,className:"h-6",children:(0,o.dL)(e.delivery.state).label})}),(0,s.jsx)(a.nA,{className:x.latest,children:(0,s.jsx)("span",{className:"text-text-3 text-xs",children:(0,i.K)(e.detectedAt,Y)})})]},e.id)})})]})}),u&&t.length>0&&(0,s.jsxs)(a.dK,{children:[(0,s.jsx)(a.Eb,{disabled:!g||f,onClick:p}),(0,s.jsx)(a.D2,{children:void 0===v||void 0===j?"".concat(String(t.length)," shown"):"".concat(String(j),"–").concat(String(j+t.length-1)," of ").concat(String(v)," findings")}),(0,s.jsx)(a.WA,{disabled:!h||f,loading:f,onClick:u})]})]})}},4411:(e,t,n)=>{n.d(t,{BlockedLedgerView:()=>d});var s=n(2703),a=n(347),i=n(1759),l=n(5149),r=n(760),o=n(7195);let c="This row cannot be approved. No reason was given.";function d(e){let{items:t,onApprove:n,blockedWindow:d,onBlockedWindowChange:x,blockReason:m,renderedAt:u}=e;return(0,s.jsxs)("div",{className:"mb-3.5 overflow-hidden rounded-xl border border-sev-high-fill bg-sev-high-fill",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-3.5 py-3",children:[(0,s.jsx)("span",{className:"grid size-6.5 shrink-0 place-items-center rounded-md bg-sev-high-ink text-on-accent",children:(0,s.jsx)(r.pD,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text",children:"Recently blocked"}),(0,s.jsx)("span",{className:"rounded-full bg-sev-high-ink px-2 py-0.5 text-xs font-bold text-on-accent",children:t.length}),(0,s.jsxs)("span",{className:"text-xs text-text-2",children:["Detections blocked in ",l.sr[d]," — approve one to grant an exception"]}),(0,s.jsx)("span",{className:"ml-auto shrink-0",children:(0,s.jsx)(o.BlockedWindowSelect,{value:d,onChange:x})})]}),0===t.length?(0,s.jsx)("div",{className:"px-3.5 pb-3.5 text-xs text-text-2",children:"Nothing blocked in this window."}):(0,s.jsx)("div",{className:"flex flex-col gap-1.5 px-3 pb-3",children:t.map(e=>{let t=function(e,t){let n;try{n=t(e)}catch(e){return c}return null===n?null:""===n.trim()?c:n}(e,m),l="blocked-reason-".concat(e.reference);return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,s.jsx)("span",{className:"font-mono text-xs font-semibold text-text-3",children:e.reference}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.ruleId}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-2",children:e.maskedValue})]}),(0,s.jsxs)("div",{className:(0,a.cn)("mt-1 text-label text-text-3"),children:[(0,i.K)(e.blockedAt,u),e.repo?" \xb7 ".concat(e.repo):"",null===t?"":" \xb7 not approvable"]}),null===t?null:(0,s.jsx)("div",{id:l,className:"mt-1 text-label text-text-3",children:t})]}),(0,s.jsx)(a.$n,{onClick:()=>{n(e.reference)},disabled:null!==t,"aria-describedby":null===t?void 0:l,variant:"ghost",tone:"primary",size:"sm",children:"Approve"})]},e.reference)})})]})}},4420:(e,t,n)=>{n.d(t,{InventoryNav:()=>m});var s=n(2703),a=n(347),i=n(6807),l=n(1145),r=n(6574),o=n(8048),c=n(8215),d=n(5654);let x=[{type:"all",label:"All"},...c.fd.map(e=>({type:e.type,label:"Configuration"===e.label?"Config":e.label.replace(" servers","")}))];function m(e){let{projects:t,assetGroups:n,harnesses:l,viewMode:o,onViewMode:c,typeFilter:m,onTypeFilter:p,query:g,onQuery:f,attention:j,isLoading:v}=e,b=(0,i.useMemo)(()=>{let e={skill:[],mcp:[],hook:[],config:[]};for(let t of n)"project"!==t.type&&(e[t.type]=t.items);return e},[n]),k=(0,i.useMemo)(()=>{let e=g.toLowerCase(),n=t=>!e||t.toLowerCase().includes(e);return t.filter(e=>n(e.name)||n(e.repo))},[t,g]);return(0,s.jsxs)(a.Zp,{className:"flex w-85 shrink-0 flex-col overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"border-b border-border px-4 pb-3 pt-4",children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-display text-base font-semibold",children:"All assets"}),void 0===j?(0,s.jsx)("span",{className:"ml-auto text-xs text-text-3",children:"…"}):(0,s.jsxs)("span",{className:(0,a.cn)("ml-auto inline-flex items-center gap-1.5 text-xs font-semibold",j?"text-sev-high-ink":"text-ok-ink"),children:[(0,s.jsx)(d.m,{name:j?"flag":"check-circle",className:"size-3.5"}),j?"".concat(String(j)," to review"):"All clear"]})]}),(0,s.jsx)(r.SearchField,{value:g,onValueChange:f,label:"Search assets",placeholder:"Search assets…",clearLabel:"Clear asset search",surface:"card",className:"h-8.5"}),(0,s.jsxs)(a.Iz,{className:"mt-3 flex w-full",value:o,onValueChange:e=>{e&&c(e)},children:[(0,s.jsxs)(a.tR,{value:"tree",children:[(0,s.jsx)(d.m,{name:"layers"})," By harness"]}),(0,s.jsxs)(a.tR,{value:"type",children:[(0,s.jsx)(d.m,{name:"list"})," By type"]})]}),"type"===o&&(0,s.jsx)(a.Iz,{className:"mt-2.5 flex w-full flex-wrap border-0 bg-transparent p-0 gap-1.5",value:m,onValueChange:e=>{e&&p(e)},children:x.map(e=>(0,s.jsx)(a.tR,{value:e.type,className:(0,a.cn)("flex-none rounded-full border border-border bg-surface px-2.5 py-1 text-text-2","data-[state=on]:border-transparent data-[state=on]:bg-text data-[state=on]:text-surface data-[state=on]:shadow-none"),children:e.label},e.type))})]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-2.5 pt-1",children:v&&0===l.length&&0===t.length&&0===n.length?(0,s.jsx)("div",{className:"px-3 py-6 text-center text-xs text-text-3",children:"Loading inventory…"}):"tree"===o?(0,s.jsx)(u,{...e}):(0,s.jsx)(h,{...e,projList:k,assetsByType:b})})]})}function u(e){let{harnesses:t,query:n}=e,a=n.toLowerCase(),i=e=>!a||e.toLowerCase().includes(a),l=a?t.map(e=>({...e,projects:e.projects.filter(e=>i(e.name)||i(e.repo)),categories:e.categories.map(e=>({...e,assets:e.assets.filter(e=>i(e.name)||i(e.sub))})).filter(e=>e.assets.length>0)})).filter(e=>e.projects.length>0||e.categories.length>0||i(e.label)||i(e.kind)):t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{iconName:"terminal",label:"Harnesses",count:l.length}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:l.length>0?l.map(t=>(0,s.jsx)(p,{h:t,...e},t.id)):(0,s.jsx)(o.EmptyState,{message:n?"No matches":"No harnesses detected"})})]})}function p(e){var t,n,i;let{h:r,sel:o,expanded:x,onToggleExpand:m,onSelectHarness:u,onSelectAsset:p,query:h}=e,j=r.projects,v=r.categories,b=null!=(n=x[r.id])?n:!!h&&(j.length>0||v.length>0),k=(null==o?void 0:o.type)==="harness"&&o.id===r.id,y=(null!=(i=null==(t=v.find(e=>"mcp"===e.type))?void 0:t.assets)?i:[]).filter(e=>"unapproved"===e.trust).length;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:(0,a.cn)("flex items-center rounded-lg",k?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsx)("button",{type:"button","aria-label":b?"Collapse":"Expand","aria-expanded":b,onClick:()=>{m(r.id,!b)},className:"my-2.5 ml-2.5 grid size-4.5 shrink-0 cursor-pointer place-items-center rounded text-text-3",children:(0,s.jsx)(d.m,{name:"chevron-right",className:(0,a.cn)("size-3.5 transition-transform",b&&"rotate-90")})}),(0,s.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2.5 p-2.5 text-left cursor-pointer",onClick:()=>{u(r.id),b||m(r.id,!0)},children:[(0,s.jsx)(l.K,{id:r.id,size:28}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"truncate text-sm font-semibold text-text",title:r.label,children:r.label}),(0,s.jsxs)("div",{className:"mt-px text-xs text-text-3",children:[r.kind," \xb7 ",r.assetCount," assets"]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[y>0&&(0,s.jsx)("span",{className:"size-2 rounded-full bg-sev-critical"}),0===r.flagCount?(0,s.jsx)(d.m,{name:"check-circle",className:"size-3.5 text-ok-ink"}):(0,s.jsx)("span",{className:"rounded-full bg-sev-high-ink px-1.5 py-px text-xs font-bold text-on-accent",children:r.flagCount})]})]})]}),b&&(0,s.jsxs)("div",{className:"my-0.5 ml-4 border-l border-border pl-2.5",children:[j.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 px-2 pb-1 pt-2",children:[(0,s.jsx)(d.m,{name:c.WD.icon,className:"size-3 text-text-3"}),(0,s.jsx)("span",{className:"text-label font-bold uppercase tracking-wider text-text-3",children:c.WD.label}),(0,s.jsx)("span",{className:"text-label font-semibold text-text-3",children:j.length})]}),j.map(t=>(0,s.jsx)(g,{p:t,fromHarness:r.id,...e},t.id))]}),v.map(e=>{let t=c.pA[e.type];return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 px-2 pb-1 pt-2",children:[(0,s.jsx)(d.m,{name:t.icon,className:"size-3 text-text-3"}),(0,s.jsx)("span",{className:"text-label font-bold uppercase tracking-wider text-text-3",children:t.label}),(0,s.jsx)("span",{className:"text-label font-semibold text-text-3",children:e.assets.length})]}),e.assets.map(e=>(0,s.jsx)(f,{it:e,indent:!0,fromHarness:r.id,sel:o,onSelectAsset:p},e.id))]},e.type)})]})]})}function h(e){let{typeFilter:t,query:n,projList:a,assetsByType:i}=e,l=n.toLowerCase(),r=e=>!l||e.toLowerCase().includes(l),d=0,x=c.fd.map(n=>{let l;if(l=n.type,"all"!==t&&t!==l)return null;if("project"===n.type){let i=a.length;return 0===i&&"all"===t?null:(i>0&&d++,(0,s.jsxs)("div",{children:[(0,s.jsx)(j,{group:n,items:a.map(e=>({flags:e.findingsCount>0?["findings"]:[]}))}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:0===i?(0,s.jsx)(o.EmptyState,{message:"No ".concat(n.label.toLowerCase())}):a.map(t=>(0,s.jsx)(g,{p:t,...e},t.id))})]},n.type))}let c=i[n.type].filter(e=>r(e.name)||r(e.sub));return 0===c.length&&"all"===t?null:(c.length>0&&d++,(0,s.jsxs)("div",{children:[(0,s.jsx)(j,{group:n,items:c,mcpItems:"mcp"===n.type?c:void 0}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:0===c.length?(0,s.jsx)(o.EmptyState,{message:"No ".concat(n.label.toLowerCase())}):c.map(t=>(0,s.jsx)(f,{it:t,sel:e.sel,onSelectAsset:e.onSelectAsset},t.id))})]},n.type))});return"all"===t&&0===d?(0,s.jsx)(o.EmptyState,{icon:"search",message:n?"No assets match “".concat(n,"”"):"No assets"}):(0,s.jsx)(s.Fragment,{children:x})}function g(e){let{p:t,fromHarness:n,selFromHarness:i,sel:l,onSelectProject:r}=e,x=t.accessCounts,m=t.findingsCount,u=(null==l?void 0:l.type)==="project"&&l.id===t.id&&(null==n||null==i||n===i);return(0,s.jsxs)("button",{type:"button",onClick:()=>{r(t.id,n)},className:(0,a.cn)("flex w-full flex-col rounded-lg p-2.5 text-left cursor-pointer",u?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"size-2 shrink-0 rounded-full",style:{background:(0,c.Cs)(t.language)}}),(0,s.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,s.jsx)("span",{className:"ml-auto shrink-0",children:(0,s.jsx)(o.yk,{v:t.visibility})})]}),(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 font-mono text-xs text-text-3",children:[(0,s.jsx)(d.m,{name:"repo",className:"size-3 shrink-0"}),(0,s.jsx)("span",{className:"truncate",title:t.repo,children:t.repo})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(o.AJ,{counts:x}),x.blocked>0?(0,s.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[x.blocked," blocked"]}):(0,s.jsxs)("span",{className:"text-xs text-text-3",children:[x.total," files"]}),m>0&&(0,s.jsx)("span",{className:"ml-auto shrink-0",children:(0,s.jsx)(o.Kh,{flags:["findings"],mini:!0})})]})]})}function f(e){let{it:t,indent:n,fromHarness:i,sel:l,onSelectAsset:r}=e,x=(null==l?void 0:l.type)===t.type&&l.id===t.id,m=(0,c.TW)(t.type),u="mcp"===t.type?t.trust:void 0;return(0,s.jsxs)("button",{type:"button",onClick:()=>{r(t,i)},className:(0,a.cn)("flex w-full items-center gap-2.5 rounded-lg py-3 text-left cursor-pointer",n?"px-3":"px-2.5",x?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-7.5 shrink-0 place-items-center rounded-md",m.bg,m.fg),children:(0,s.jsx)(d.m,{name:m.icon,className:"size-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"truncate font-mono text-xs font-semibold text-text",title:t.name,children:t.name}),(0,s.jsx)("div",{className:"mt-0.5 truncate font-mono text-label text-text-3",title:t.sub,children:t.sub})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[u&&(0,s.jsx)(o.As,{value:u}),t.flags.length>0&&(0,s.jsx)(o.Kh,{flags:t.flags,mini:!0})]})]})}function j(e){let{group:t,items:n,mcpItems:i}=e,l=(0,c.z)(n),r=i?["unapproved","risky"].map(e=>({k:e,n:i.filter(t=>t.trust===e).length})).filter(e=>e.n):[];return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2.5 pb-1.5 pt-3",children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-5 shrink-0 place-items-center rounded",t.bg,t.fg),children:(0,s.jsx)(d.m,{name:t.icon,className:"size-3"})}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-2",children:t.label}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:n.length}),(0,s.jsxs)("span",{className:"ml-auto inline-flex flex-wrap items-center justify-end gap-1.5",children:[r.map(e=>(0,s.jsxs)(a.Ex,{variant:c.ZY[e.k].tone,children:[e.n," ",c.ZY[e.k].label.toLowerCase()]},e.k)),l.map(e=>(0,s.jsxs)(a.Ex,{variant:c.lx[e.key].tone,children:[e.count," ",c.lx[e.key].short.toLowerCase()]},e.key))]})]})}function v(e){let{iconName:t,label:n,count:a}=e;return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2.5 pb-1.5 pt-3",children:[(0,s.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded bg-surface-2 text-text-2",children:(0,s.jsx)(d.m,{name:t,className:"size-3"})}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-2",children:n}),(0,s.jsx)("span",{className:"text-xs font-semibold text-text-3",children:a})]})}},4564:(e,t,n)=>{n.d(t,{FindingTypesListView:()=>d});var s=n(2703),a=n(347),i=n(760),l=n(6574),r=n(9455);function o(e){let{counts:t,selected:n,onChange:i}=e;return(0,s.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:r.oC.map(e=>{var l;let r=n.includes(e);return(0,s.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>{i(r?n.filter(t=>t!==e):[...n,e])},className:(0,a.cn)("inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-full border px-2.5 text-xs font-semibold capitalize",r?"border-primary bg-primary-tint text-primary":"border-border bg-surface text-text-2"),children:[(0,s.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",a.t0[e])}),e,(0,s.jsx)("span",{className:"text-label font-bold opacity-70",children:null!=(l=t.get(e))?l:0})]},e)})})}function c(e){var t;let{type:n,sel:l,onClick:o}=e,c=null!=(t=r.y7[n.category])?t:i.RY;return(0,s.jsx)("button",{type:"button",onClick:o,"aria-current":l?"true":void 0,className:(0,a.cn)("w-full cursor-pointer rounded-lg px-3 py-2.5 text-left transition-colors",l?"bg-primary-tint":"hover:bg-surface-2"),children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,s.jsx)("span",{className:(0,a.cn)("flex size-7 shrink-0 items-center justify-center rounded-lg",(0,r.i9)(n.category)),children:(0,s.jsx)(c,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:n.subtype,children:n.subtype}),(0,s.jsx)("span",{className:"truncate text-xs text-text-3",children:(0,r.Jm)(n.category)})]}),(0,s.jsx)("span",{className:"shrink-0 text-xs font-semibold tabular-nums text-text-2",children:n.instanceCount})]})})}function d(e){let{types:t,activeId:n,onSelect:i,query:r,onQueryChange:d,severityCounts:x,selectedSeverities:m,onSeverityChange:u,hasNextPage:p=!1,hasPreviousPage:h=!1,onNextPage:g,onPreviousPage:f,loadingNextPage:j=!1,pageStart:v,total:b,emptyState:k}=e;return(0,s.jsxs)(a.Zp,{className:"flex h-full flex-col overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"border-b border-border p-3",children:[(0,s.jsx)(l.SearchField,{value:r,onValueChange:d,label:"Search finding types",placeholder:"Search types…",clearLabel:"Clear type search",surface:"card",className:"h-9"}),(0,s.jsx)(o,{counts:x,selected:m,onChange:u})]}),(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:0===t.length?(0,s.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:null!=k?k:"No types match these filters."}):t.map(e=>(0,s.jsx)(c,{type:e,sel:e.id===n,onClick:()=>{i(e)}},e.id))}),g&&(h||p||t.length>0)&&(0,s.jsxs)(a.dK,{children:[(0,s.jsx)(a.Eb,{disabled:!h||j,onClick:f}),(0,s.jsx)(a.D2,{children:0===t.length||void 0===b||void 0===v?"".concat(String(t.length)," shown"):"".concat(String(v),"–").concat(String(v+t.length-1)," of ").concat(String(b)," types")}),(0,s.jsx)(a.WA,{disabled:!p||j,loading:j,onClick:g})]})]})}},4584:(e,t,n)=>{n.d(t,{SyncPanelView:()=>d});var s=n(2703),a=n(347),i=n(2286),l=n(1759);let r={ok:"Last pass sent what was waiting.",interrupted:"Last pass sent some of what was waiting.",unreachable:"Last pass could not reach your deployment. Nothing was lost; it stays queued.",refused:"Your deployment refused this machine’s key. Re-attach to resume."};function o(e){return e.toLocaleString("en-US")}function c(e){let{row:t}=e,n=0===t.queued&&0===t.notSent?i.l.ok:i.l.primary;return(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"w-24 shrink-0 truncate text-ui text-text",children:t.label}),(0,s.jsx)(a.kI,{value:t.synced,max:t.total,color:n,height:6,"aria-label":"".concat(t.label,": ").concat(o(t.synced)," of ").concat(o(t.total)," sent")}),(0,s.jsxs)("span",{className:"w-32 shrink-0 text-right text-label tabular-nums text-text-2",children:[o(t.synced)," of ",o(t.total)]}),t.notSent>0&&(0,s.jsxs)("span",{className:"w-24 shrink-0 text-right text-label text-text-3",children:[o(t.notSent)," not sent"]})]})}function d(e){let{state:t,deployment:n,lastOutcome:d,lastPassAt:x,renderedAt:m,running:u,paused:p,onSyncNow:h,busy:g,startError:f,localOnly:j}=e,v="ready"===t.status||"nothing-recorded"===t.status,b=v&&!0===p;return(0,s.jsxs)(a.Zp,{children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Sync"}),(0,s.jsxs)(a.BT,{children:["What this machine has sent to ",n,", and what it still owes."]})]}),u&&(0,s.jsx)(a.vw,{dot:i.l.primary,children:"Sending…"}),!u&&b&&(0,s.jsx)(a.vw,{dot:i.l.sevMedium,children:"Paused"}),"consent-stale"===t.status&&(0,s.jsx)(a.vw,{children:"Paused"})]}),(0,s.jsxs)(a.Wu,{className:"flex flex-col gap-3",children:["not-shared"===t.status&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:"Existing activity is not shared. Only what this machine records from now on is sent."}),"consent-stale"===t.status&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:"Paused: your grant predates a change to what is sent. Review it above to resume."}),"credential-unusable"===t.status&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:t.detail}),"nothing-recorded"===t.status&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:"Nothing recorded yet."}),"ready"===t.status&&t.kinds.map(e=>(0,s.jsx)(c,{row:e},e.kind)),void 0!==d&&(0,s.jsxs)("p",{className:(0,a.cn)("text-label","ok"===d?"text-text-3":"text-text-2"),children:[void 0!==x&&(0,s.jsxs)("span",{className:"text-text-3",children:[(0,l.K)(x,m)," \xb7 "]}),r[d]]}),b&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:"Sending is paused after repeated failures. It resumes on its own — nothing was lost, and what is queued above stays queued."}),void 0!==f&&(0,s.jsx)("p",{className:"text-ui text-text-2",children:f}),v&&void 0!==h&&(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(a.$n,{onClick:h,disabled:!0===g||u||b,children:u?"Sending…":"Sync now"}),(0,s.jsx)("span",{className:"text-label text-text-3",children:"Sends what is queued above."})]}),void 0!==j&&j.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:j.map(e=>(0,s.jsxs)("p",{className:"text-label text-text-3",children:[(0,s.jsx)("span",{className:"text-text-2",children:e.label}),void 0!==e.count&&(0,s.jsxs)(s.Fragment,{children:[" \xb7 ",o(e.count)," here"]})," — ",e.detail]},e.id))})]})]})}},4621:(e,t,n)=>{n.d(t,{ScopePicker:()=>c,StateTag:()=>l,StateTagFor:()=>r,_:()=>o});var s=n(2703),a=n(347),i=n(1460);function l(e){let{state:t}=e;return(0,s.jsx)(a.Ex,{variant:i.hv[t],children:t})}function r(e){let{exception:t,now:n}=e;return(0,s.jsx)(l,{state:(0,i.rO)(t,n)})}function o(e){let{exception:t}=e;return"reveal_to_model"!==t.capability?null:(0,s.jsx)(a.Ex,{variant:"critical",children:i.y3.reveal_to_model})}function c(e){let{value:t,onChange:n}=e;return(0,s.jsx)(a.Iz,{value:null!=t?t:"",onValueChange:e=>{e&&n(e)},children:i.rU.map(e=>(0,s.jsx)(a.tR,{value:e,children:i.DU[e]},e))})}},4762:(e,t,n)=>{n.d(t,{AW:()=>s.A,rJ:()=>s.r}),n(9020);var s=n(6442)},4975:(e,t,n)=>{n.d(t,{s:()=>r});var s=n(2703),a=n(347),i=n(6807);function l(e){let{icon:t,value:n,label:i,tone:l,isLoading:r}=e,{text:o,fill:c}=a.cH[l];return(0,s.jsxs)("div",{"data-slot":"summary-stat",className:"flex min-w-0 flex-1 items-center gap-2 px-4",children:[(0,s.jsx)("span",{"data-slot":"summary-stat-icon",className:(0,a.cn)("grid size-7 shrink-0 place-items-center rounded-lg",c,o),children:(0,s.jsx)(t,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})}),(0,s.jsxs)("div",{className:"flex min-w-0 items-baseline gap-1.5 overflow-hidden",title:r?i:"".concat(String(n)," ").concat(i),children:[r?(0,s.jsx)(a.EA,{className:"h-4 w-10 shrink-0"}):(0,s.jsx)("span",{className:"min-w-0 truncate font-display text-lg font-semibold leading-none tabular-nums text-text",children:n}),(0,s.jsx)("span",{className:"shrink-[9999] truncate text-xs text-text-3",children:i})]})]})}function r(e){let{items:t,isLoading:n,className:r}=e;return(0,s.jsx)(a.Zp,{className:(0,a.cn)("mb-3 flex shrink-0 items-stretch overflow-hidden py-2.5 shadow-sm",r),"aria-busy":n,children:t.map((e,t)=>(0,s.jsxs)(i.Fragment,{children:[t>0&&(0,s.jsx)("span",{className:"w-px shrink-0 self-stretch bg-hairline"}),(0,s.jsx)(l,{...e,isLoading:n})]},e.label))})}},5149:(e,t,n)=>{n.d(t,{Jy:()=>l,QT:()=>i,hn:()=>a,sp:()=>s.spO,sr:()=>r});var s=n(723);let a=[{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"3m",label:"Last 3 months"},{value:"6m",label:"Last 6 months"}];function i(e){var t,n;return null!=(n=null==(t=a.find(t=>t.value===e))?void 0:t.label)?n:e}let l=[{value:"30m",label:"Last 30 minutes"},{value:"1h",label:"Last hour"},{value:"4h",label:"Last 4 hours"},{value:"24h",label:"Last 24 hours"}],r={"30m":"the last 30 minutes","1h":"the last hour","4h":"the last 4 hours","24h":"the last 24 hours"}},5296:(e,t,n)=>{n.d(t,{NeedsReviewListView:()=>c});var s=n(2703),a=n(347),i=n(760),l=n(2146),r=n(7504),o=n(3619);function c(e){let{items:t,onReview:n}=e;return 0===t.length?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center text-text-3",children:[(0,s.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-6 text-ok-ink"}),(0,s.jsx)("div",{className:"text-sm",children:"Nothing needs review"})]}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,s.jsx)(l.Wi,{kind:e.kind,trust:e.trust,name:e.name,host:e.host,size:30}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:(0,a.cn)("text-xs font-semibold text-text","ip"===e.kind&&"font-mono"),children:e.name}),(0,s.jsx)(l.HD,{cls:e.topDataClass})]}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5 text-label text-sev-critical-ink",children:[(0,s.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),(0,o.ZX)(e.review.reasons)]})]}),(0,s.jsxs)("span",{className:"text-xs text-text-3",children:[e.callSiteCount," call",1===e.callSiteCount?"":"s"]}),(0,s.jsx)(a.$n,{onClick:(0,r.T)(n,e.id),variant:"ghost",tone:"primary",size:"sm",children:"Review"})]},e.id))})}},5654:(e,t,n)=>{n.d(t,{m:()=>r});var s=n(347),a=n(6807),i=n(760);let l={alert:i._0,"alert-octagon":i.rX,"arrow-up":i.Kp,bolt:i.DQ,book:i.oS,branch:i.OK,check:i.Sr,"check-circle":i.C1,"chevron-down":i.D3,"chevron-right":i.vK,clock:i.O4,cloud:i.hp,code:i.lo,database:i.bN,edit:i.qU,"external-share":i._G,eye:i.bM,"eye-off":i.aR,file:i.oS,flag:i.iF,folder:i.sj,globe:i.fC,help:i.mo,info:i.mo,layers:i.mL,list:i.kp,lock:i.XA,plus:i.c1,redact:i.jZ,refresh:i.fN,repo:i.SY,route:i.hF,search:i.WI,server:i.RR,settings:i.Ze,"shield-check":i.Zu,"slash-circle":i.pD,sliders:i.Qf,sparkles:i.BZ,swap:i.f6,terminal:i.k3,x:i.uv,"x-circle":i.pD};function r(e){let{name:t,className:n}=e;return(0,a.createElement)(l[t],{"aria-hidden":!0,focusable:!1,className:(0,s.cn)("size-4",n)})}},6057:(e,t,n)=>{n.d(t,{t:()=>o});var s=n(2703),a=n(347),i=n(760),l=n(3783),r=n(8230);function o(e){var t,n,o,c,d;let{d:x,onOpenUpdate:m,onRecheck:u,unknownHint:p}=e,h=(0,r.Xg)(x),g=null!=(o=null!=(n=null==(t=x.update)?void 0:t.latestVersion)?n:x.latestVersion)?o:"";return(0,s.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border shrink-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5 bg-surface-2 px-4 py-3 border-b border-border",children:[(0,s.jsx)(l.Ai,{origin:x.origin}),(0,s.jsx)(l.Jk,{publisher:null!=(c=x.publisher)?c:x.namespace,kind:null!=(d=x.publisherKind)?d:"user"}),(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsxs)("span",{className:"font-mono text-label text-text-2",children:["tracking v",x.version]})]}),"update-available"===h?(0,s.jsxs)("div",{className:"flex items-center gap-3 bg-sev-high-fill px-4 py-3",children:[(0,s.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-4.5 shrink-0 text-sev-high-ink"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"text-sm font-semibold text-sev-high-ink",children:["Update available \xb7 v",g]}),(0,s.jsx)("div",{className:"mt-px text-xs leading-snug text-text-2",children:"A newer version is published upstream."})]}),m&&(0,s.jsx)(a.$n,{size:"sm",onClick:m,className:"shrink-0 bg-sev-high-ink text-on-accent hover:bg-sev-high-ink",children:"Update"})]}):"up-to-date"===h?(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 text-xs text-text-3",children:[(0,s.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-4 text-ok-ink"}),"Up to date with upstream"]}):(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 text-xs text-text-3",children:[(0,s.jsx)(i.mo,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0"}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:["Update status unknown",p?(0,s.jsxs)(s.Fragment,{children:[" — ",p]}):"."]}),u&&(0,s.jsx)(a.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:u,children:"Check again"})]})]})}},6274:(e,t,n)=>{n.d(t,{HarnessSelect:()=>o});var s=n(2703),a=n(347),i=n(760),l=n(1145),r=n(3193);function o(e){let{value:t,onChange:n,options:o}=e,c=o?r.oo.filter(e=>o.includes(e)||t.includes(e)):r.oo,d=0===t.length,x=t[0],m=d?"All harnesses":1===t.length&&x?l.x[x].label:"".concat(String(t.length)," harnesses");return(0,s.jsxs)(a.rI,{children:[(0,s.jsxs)(a.ty,{className:(0,a.cn)("group flex h-8.5 w-full items-center gap-2 rounded-lg border bg-surface-2 px-2.5 text-sm focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40",d?"border-border-field":"border-primary"),children:[(0,s.jsx)(i.k3,{"aria-hidden":!0,focusable:!1,className:(0,a.cn)("size-3.5 shrink-0",d?"text-text-3":"text-primary")}),(0,s.jsx)("span",{className:"flex-1 text-left font-medium text-text",children:m}),!d&&(0,s.jsx)(a.Ex,{variant:"primary",className:"px-1.5 py-0 text-label bg-surface-2",children:t.length}),(0,s.jsx)(i.D3,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0 text-text-3 transition-transform group-data-[state=open]:rotate-180"})]}),(0,s.jsxs)(a.SQ,{align:"start",className:"w-(--radix-dropdown-menu-trigger-width)",children:[(0,s.jsx)(a.hO,{checked:d,onCheckedChange:()=>{n([])},onSelect:e=>{e.preventDefault()},children:"All harnesses"}),(0,s.jsx)(a.mB,{}),c.map(e=>(0,s.jsx)(a.hO,{checked:t.includes(e),onCheckedChange:()=>{let s=t.includes(e)?t.filter(t=>t!==e):[...t,e];n(s.length===c.length?[]:s)},onSelect:e=>{e.preventDefault()},children:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"size-2 shrink-0 rounded-xs",style:{background:l.x[e].color}}),l.x[e].label]})},e))]})]})}},6442:(e,t,n)=>{n.d(t,{A:()=>l,r:()=>i});var s=n(2703),a=n(347);function i(e){let{message:t}=e;return(0,s.jsxs)("div",{role:"alert",className:"text-xs text-text-3",children:["Couldn’t load data — ",t]})}function l(e){let{message:t,className:n}=e;return(0,s.jsx)("div",{className:(0,a.cn)("w-full py-6 text-center text-xs text-text-3",n),children:t})}},6574:(e,t,n)=>{n.d(t,{SearchField:()=>o});var s=n(2703),a=n(347),i=n(6807),l=n(760);let r={card:"rounded-lg border border-border-field bg-surface-2",canvas:"rounded-lg border border-border-field bg-surface"};function o(e){let{value:t,onValueChange:n,label:o,placeholder:c,surface:d,className:x,iconClassName:m,clearLabel:u="Clear search"}=e,p=(0,i.useRef)(null),h=()=>{var e;n(""),null==(e=p.current)||e.focus()};return(0,s.jsxs)("div",{className:(0,a.cn)("flex items-center gap-2 px-3 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/40",x,r[d]),children:[(0,s.jsx)(l.WI,{"aria-hidden":!0,focusable:!1,className:(0,a.cn)("size-4 shrink-0 text-text-3",m)}),(0,s.jsx)("input",{ref:p,type:"text",value:t,onChange:e=>{n(e.target.value)},onKeyDown:e=>{"Escape"===e.key&&""!==t&&(e.preventDefault(),e.stopPropagation(),h())},spellCheck:!1,placeholder:c,"aria-label":o,className:"min-w-0 flex-1 bg-transparent text-sm text-text placeholder:text-text-3 focus:outline-hidden"}),""!==t&&(0,s.jsx)("button",{type:"button","aria-label":u,onClick:h,className:"grid size-6 shrink-0 cursor-pointer place-items-center rounded text-text-3 hover:text-text focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40",children:(0,s.jsx)(l.uv,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})})]})}},6742:(e,t,n)=>{n.d(t,{SessionDetailView:()=>g});var s=n(2703),a=n(347),i=n(6807),l=n(3878),r=n(760),o=n(1145),c=n(6442),d=n(9336),x=n(3585),m=n(3847),u=n(3193);function p(e){let{text:t,mono:n=!1}=e;return(0,s.jsx)("span",{className:(0,a.cn)("block truncate",n&&"font-mono"),title:t,children:t})}function h(e){var t;let{session:n,tokenReport:h,liveFindings:g,linkHref:f,toolHref:j,onExpand:v,overlayClose:b=!1,renderedAt:k}=e,y=o.x[n.harness],N=(0,u.Tp)(n.tools),[w,C]=(0,i.useState)(!1);return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsxs)("div",{className:(0,a.cn)("shrink-0 border-b border-border px-5 py-4",b&&"pr-14"),children:[(0,s.jsxs)("div",{className:"flex items-start gap-3.5",children:[(0,s.jsx)(o.K,{id:n.harness,size:40}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"min-w-0 truncate font-display text-lg font-semibold text-text",title:n.title,children:n.title}),(0,s.jsx)(d.UD,{status:n.status})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-ui text-text-3",children:[(0,s.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:[y.label," \xb7 ",u.Ay[n.harness]]}),(0,s.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),(0,s.jsx)("span",{className:"min-w-0 truncate font-mono",title:n.id,children:n.id})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 gap-1",children:[v&&(0,s.jsx)(a.$n,{variant:"ghost",size:"sm",title:"Open this session in the full-width inspector","aria-label":"Open this session in the full-width inspector",onClick:v,children:(0,s.jsx)(r.mS,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsx)(a.$n,{variant:"ghost",size:"sm",title:"Export session data as JSON","aria-label":"Export session data as JSON",onClick:()=>{!function(e){if("undefined"==typeof document||"function"!=typeof URL.createObjectURL)return;let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download="session-".concat(e.id.slice(0,12),".json"),document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(n)}(n)},children:(0,s.jsx)(r.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"})})]})]}),(0,s.jsxs)("div",{className:"mt-3.5 grid 2xl:grid-cols-4 grid-cols-3 gap-x-4 gap-y-3 [&>*]:min-w-0",children:[(0,s.jsx)(l.p,{label:"Working dir",children:(0,s.jsx)(p,{text:n.cwd,mono:!0})}),(0,s.jsx)(l.p,{label:"Branch",children:(0,s.jsx)(d.Lw,{items:n.branches,mono:!0,nowrap:!0})}),(0,s.jsx)(l.p,{label:"Model",children:(0,s.jsx)(d.Lw,{items:n.models,mono:!0,nowrap:!0})}),(0,s.jsx)(l.p,{label:"Started",children:(0,s.jsx)(p,{text:"".concat((0,m.rw)(n.startedAt)," \xb7 ").concat((0,m.nt)(n.startedAt,new Date(k)))})}),(0,s.jsx)(l.p,{label:"Duration",children:(0,s.jsx)(p,{text:(0,m.vV)(n.startedAt,n.endedAt,n.status,k)})}),(0,s.jsx)(l.p,{label:"Turns",children:n.turns}),(0,s.jsx)(l.p,{label:"Findings",children:n.findings>0||g?(0,s.jsxs)("span",{className:"flex items-center gap-x-1.5 overflow-hidden whitespace-nowrap",children:[n.findings>0&&(0,s.jsxs)("span",{className:"min-w-0 shrink truncate font-semibold text-sev-critical-ink",title:"".concat(String(n.findings)," triggered — detection firings across this session's transcript; the same value fires once per event it appears in"),children:[n.findings," triggered"]}),n.findings>0&&g&&(0,s.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),g&&(0,s.jsxs)("a",{href:g.href,className:"inline-flex shrink-0 items-center gap-0.5 font-semibold text-sev-critical-ink underline-offset-2 hover:underline",title:"Unique findings recorded by live enforcement — open in Findings",children:[g.count," enforced live",(0,s.jsx)(r.Qq,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]}):(0,s.jsx)("span",{className:"text-ok-ink",children:"None"})}),(0,s.jsx)(l.p,{label:"Egress",children:n.shares>0?"".concat(String(n.shares)," destinations"):"None"})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-5 border-b border-border bg-surface-2 px-5 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,s.jsx)(r.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),(0,s.jsx)("b",{className:"font-semibold tabular-nums",children:(0,m.Sk)(n.tokens.inputTokens)}),(0,s.jsx)("span",{className:"text-text-3",children:"in"})]}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,s.jsx)(r.ZL,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),(0,s.jsx)("b",{className:"font-semibold tabular-nums",children:(0,m.Sk)(n.tokens.outputTokens)}),(0,s.jsx)("span",{className:"text-text-3",children:"out"})]}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,s.jsx)(r.DQ,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-primary"}),(0,s.jsxs)("b",{className:"font-semibold tabular-nums text-primary",children:[(0,m.fz)(n.tokens),"%"]}),(0,s.jsx)("span",{className:"text-text-3",children:"cache"})]}),h&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,s.jsx)("b",{className:"font-semibold tabular-nums text-text",children:(0,m.xd)(null!=(t=h.estimatedCostUsd)?t:0,h.costIsPartial)}),(0,s.jsx)("span",{className:"text-text-3",children:"est. cost"})]})]}),(0,s.jsx)("span",{className:"h-5 w-px bg-border"}),(0,s.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-2 max-h-22 overflow-y-auto",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-3",children:[(0,u.ni)(n.tools)," tool calls"]}),N.map(e=>(0,s.jsx)(d.zn,{name:e.name,n:e.n,...j?{href:j(e.name)}:{}},e.name))]})]}),h&&h.rollups.length>1&&(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b border-border bg-surface-2 px-5 py-2.5",children:[(0,s.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Cost by model"}),h.rollups.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border bg-surface py-0.5 px-2 text-xs text-text-2",children:[(0,s.jsx)("span",{className:"font-mono text-text",children:e.model}),(0,s.jsx)("span",{className:"tabular-nums text-text-3",children:(0,m.Sk)(e.totalTokens)}),(0,s.jsx)("span",{className:"tabular-nums text-text",children:null!==e.estimatedCostUsd?(0,m.UK)(e.estimatedCostUsd):"—"})]},"".concat(e.provider," ").concat(e.model)))]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4.5",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-label font-semibold uppercase tracking-wider text-text-3",children:[w?"Raw events":"Audit log",(0,s.jsx)("span",{className:"text-text-3",children:"\xb7"}),(0,s.jsxs)("span",{className:"font-mono text-label font-medium normal-case tracking-normal text-text-3",children:[n.events.length," events"]})]}),w?n.events.length>0?(0,s.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-border bg-surface-2 p-3 text-label leading-relaxed text-text-2",children:JSON.stringify(n.events,null,2)}):(0,s.jsx)(c.A,{message:"No events recorded for this session yet"}):(0,s.jsx)(x.i,{events:n.events,...f?{linkHref:f}:{}})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-t border-border px-5 py-2.5 text-xs text-text-3",children:[(0,s.jsx)(r.k3,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),(0,s.jsx)("span",{className:"font-mono",children:"Source: ~/.claude/audit.log"}),(0,s.jsxs)(a.$n,{variant:"link",tone:"primary",className:"ml-auto text-ui",onClick:()=>{C(e=>!e)},children:[(0,s.jsx)(r.kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),w?"View timeline":"View raw events"]})]})]})}function g(e){let{session:t,isLoading:n,error:i,tokenReport:l,liveFindings:r,linkHref:o,toolHref:d,onExpand:x,overlayClose:m,renderedAt:u}=e;return i?(0,s.jsx)("div",{className:"grid h-full place-items-center p-6",children:(0,s.jsx)(c.r,{message:i})}):n&&!t?(0,s.jsxs)("div",{className:"flex h-full flex-col gap-4 p-5","aria-busy":!0,children:[(0,s.jsx)(a.EA,{className:"h-10 w-2/3"}),(0,s.jsx)(a.EA,{className:"h-24 w-full"}),(0,s.jsx)(a.EA,{className:"h-12 w-full"}),(0,s.jsx)(a.EA,{className:"h-40 w-full"})]}):t?(0,s.jsx)(h,{session:t,tokenReport:null!=l?l:null,liveFindings:null!=r?r:null,...o?{linkHref:o}:{},...d?{toolHref:d}:{},...x?{onExpand:x}:{},...m?{overlayClose:m}:{},renderedAt:u}):(0,s.jsx)("div",{className:"grid h-full place-items-center p-6",children:(0,s.jsx)(c.A,{message:"Select a session to view its audit timeline"})})}},6913:(e,t,n)=>{n.d(t,{MttrTrendCardView:()=>m});var s=n(2703),a=n(347),i=n(2286),l=n(3749),r=n(760),o=n(4194);function c(e){if(null===e||Number.isNaN(e))return"—";let t=Math.round(Math.max(0,e)/6e4),n=Math.floor(t/1440),s=Math.floor((t-=24*n*60)/60);return(t-=60*s,n>0)?s>0?"".concat(String(n),"d ").concat(String(s),"h"):"".concat(String(n),"d"):s>0?t>0?"".concat(String(s),"h ").concat(String(t),"m"):"".concat(String(s),"h"):"".concat(String(Math.max(1,t)),"m")}var d=n(4762);let x=[{key:"critical",label:"Critical",color:i.l.sevCritical},{key:"high",label:"High",color:i.l.sevHigh},{key:"medium",label:"Medium",color:i.l.sevMedium},{key:"low",label:"Low",color:i.l.sevLow}];function m(e){var t;let{points:n,isLoading:i,error:m}=e,u=n.every(e=>x.every(t=>null===e[t.key])),p=null!=(t=n.at(-1))?t:null,h=(0,o.T)(x);return(0,s.jsxs)(a.Zp,{className:"mt-4 shadow-sm xl:mt-5",children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsx)(a.AG,{children:(0,s.jsx)(r.O4,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Time to remediate"}),(0,s.jsx)(a.BT,{children:"Mean time from detection to resolution, by severity"})]}),(0,s.jsx)(a.X9,{className:"gap-3 text-xs text-text-2",children:(0,s.jsx)(o.N,{series:x,visibility:h,interactive:!m&&!i&&!u,metaLabel:e=>null===p?null:c(p[e])})})]}),(0,s.jsx)(a.Wu,{"aria-busy":i,className:"pb-2",children:m?(0,s.jsx)(d.rJ,{message:m}):i?(0,s.jsx)(a.EA,{className:"h-40 w-full"}):u?(0,s.jsx)(d.AW,{message:"No resolved findings in this range."}):(0,s.jsx)(l.AreaChart,{data:n,series:h.visible,height:160,valueFormat:c})})]})}},7089:(e,t,n)=>{n.d(t,{DataSharesKindTabsView:()=>o});var s=n(2703),a=n(347),i=n(760),l=n(3619);function r(e){let{group:t}=e,n="ip"===t.kind||"external"===t.kind;return(0,s.jsxs)(s.Fragment,{children:[l.CF[t.kind],(0,s.jsx)(a.Ex,{variant:"outline",className:"px-1.5 text-label",children:t.total}),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"ip"===t.kind?"text-sev-critical-ink":"text-sev-high-ink"}),(0,s.jsx)("span",{className:"sr-only",children:"review recommended"})]})]})}function o(e){let{groups:t}=e;return(0,s.jsx)(a.j7,{className:"shrink-0",children:t.map(e=>(0,s.jsx)(a.Xi,{value:e.kind,children:(0,s.jsx)(r,{group:e})},e.kind))})}},7195:(e,t,n)=>{n.d(t,{BlockedWindowSelect:()=>r});var s=n(2703),a=n(347),i=n(5149),l=n(760);function r(e){var t,n;let{value:r,onChange:o}=e,c=null!=(n=null==(t=i.Jy.find(e=>e.value===r))?void 0:t.label)?n:r;return(0,s.jsxs)(a.rI,{children:[(0,s.jsx)(a.ty,{asChild:!0,children:(0,s.jsxs)(a.$n,{variant:"outline",tone:"neutral",size:"sm",children:[(0,s.jsx)(l.CT,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),c,(0,s.jsx)(l.D3,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"})]})}),(0,s.jsx)(a.SQ,{align:"end",className:"w-40",children:(0,s.jsx)(a.Hr,{value:r,onValueChange:e=>{o(e)},children:i.Jy.map(e=>(0,s.jsx)(a.Ht,{value:e.value,children:e.label},e.value))})})]})}},7308:(e,t,n)=>{n.d(t,{DETECTION_FILTER_TABS:()=>c,DetectionsListView:()=>x});var s=n(2703),a=n(347),i=n(760),l=n(6574),r=n(3783),o=n(8230);let c=[["all","All"],["library","Library"],["updates","Updates"]];function d(e){var t;let{d:n,sel:a,updateVersion:i,floor:l,onClick:c}=e;return(0,s.jsx)("button",{type:"button",onClick:c,className:"w-full cursor-pointer rounded-lg px-3 py-2.5 text-left transition-colors "+(a?"bg-primary-tint":"hover:bg-surface-2"),children:(0,s.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{title:n.enabled?"Enabled":"Disabled",className:"size-2 shrink-0 rounded-full "+(n.enabled?"bg-ok ring-3 ring-ok-fill":"bg-border-strong")}),(0,s.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:n.name,children:n.name})]}),(0,s.jsxs)("div",{className:"font-mono text-xs text-text-3",children:["v",n.version]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 justify-between",children:[(0,s.jsx)("span",{className:"font-mono text-xs text-text-3",children:n.id}),(0,s.jsxs)("span",{className:"text-xs text-text-3 shrink-0",children:[n.ruleCount," rule",1===n.ruleCount?"":"s"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5 mt-1",children:[(0,s.jsx)(r.Ai,{origin:n.origin}),(0,s.jsx)(r.$F,{policy:null!=(t=n.policyId)?t:o.tG,floor:l}),i?(0,s.jsx)(r.Zp,{version:i}):null]})]})})}function x(e){let{items:t,counts:n,activeId:r,query:o,filter:x,onQueryChange:m,onFilterChange:u,onSelect:p,isLoading:h=!1,error:g=null,updatesById:f,floorsById:j,filterTabs:v=c}=e;return(0,s.jsxs)(a.Zp,{className:"flex flex-col overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"border-b border-border p-3",children:[(0,s.jsx)(l.SearchField,{value:o,onValueChange:m,label:"Search detections",placeholder:"Search detections…",surface:"card",className:"h-9"}),(0,s.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:v.map(e=>{var t;let[a,l]=e,r=x===a,o=null!=(t=n[a])?t:0,c="updates"===a&&o>0;return(0,s.jsxs)("button",{type:"button",onClick:()=>{u(a)},className:"inline-flex h-7 items-center gap-1.5 cursor-pointer rounded-full border px-2.5 text-xs font-semibold "+(r?c?"border-sev-high bg-sev-high-fill text-sev-high-ink":"border-primary bg-primary-tint text-primary":c?"border-border text-sev-high-ink":"border-border bg-surface text-text-2"),children:[c&&(0,s.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3"}),l,(0,s.jsx)("span",{className:"text-label font-bold opacity-70",children:o})]},a)})})]}),(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:h?(0,s.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:"Loading detections…"}):g?(0,s.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-sev-critical-ink",children:g}):0===t.length?(0,s.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:o.trim()?"No detections match “".concat(o.trim(),"”"):"No detections in this view"}):t.map(e=>(0,s.jsx)(d,{d:e,sel:e.id===r,updateVersion:null==f?void 0:f.get(e.id),floor:null==j?void 0:j.get(e.id),onClick:()=>{p(e.id)}},e.id))})]})}},7504:(e,t,n)=>{function s(e,t){return()=>{e(t)}}function a(e,t,n){return()=>{e(t,n)}}n.d(t,{T:()=>s,i:()=>a})},7525:(e,t,n)=>{n.d(t,{AZ:()=>p,LZ:()=>f,Mk:()=>x,Py:()=>g,Ud:()=>u,j0:()=>s,lr:()=>h,nk:()=>r,pT:()=>m,t$:()=>c});let s=["light","dark","system"],a="system",i="aka-theme",l="(prefers-color-scheme: dark)";function r(e){return"string"==typeof e&&s.includes(e)}let o=null;function c(){if(null!==o)return o;try{let e=window.localStorage.getItem(i);return r(e)?e:a}catch(e){return a}}let d=new Set;function x(e){d.add(e);let t=t=>{(null===t.key||t.key===i)&&(o=null,e())};return window.addEventListener("storage",t),()=>{d.delete(e),window.removeEventListener("storage",t)}}function m(e){try{window.localStorage.setItem(i,e),o=null}catch(t){o=e}for(let e of d)e()}function u(){return window.matchMedia(l).matches}function p(e){document.documentElement.classList.toggle("dark","dark"===e)}function h(e){let t=window.matchMedia(l);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}function g(){return a}function f(){return!1}},7692:(e,t,n)=>{n.d(t,{VaultInventoryView:()=>c});var s=n(2703),a=n(347),i=n(1759),l=n(2819),r=n(1955);let o={occurrences:"min-w-[120px] whitespace-nowrap",firstSeen:"min-w-[110px] whitespace-nowrap",lastSeen:"min-w-[110px] whitespace-nowrap",grant:"min-w-[140px] whitespace-nowrap",action:"min-w-[120px] whitespace-nowrap"};function c(e){let{entries:t,onReveal:n,onRevoke:i,hasNextPage:l=!1,hasPreviousPage:r=!1,onNextPage:c,onPreviousPage:x,loadingNextPage:m=!1,pageStart:u,total:p,renderedAt:h}=e,g=0===t.length;if(g&&!r&&!l)return(0,s.jsx)("div",{className:"rounded-xl border border-border bg-surface py-10 text-center text-sm text-text-3",children:"Nothing vaulted yet — values land here when a redact policy fires with vault consent granted."});let f=void 0!==n||void 0!==i;return(0,s.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[g?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-text-3",children:"These rows moved while you were reading. Step back to see the rest."}):(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:"Value"}),(0,s.jsx)(a.nd,{className:o.occurrences,children:"Occurrences"}),(0,s.jsx)(a.nd,{className:o.firstSeen,children:"First seen"}),(0,s.jsx)(a.nd,{className:o.lastSeen,children:"Last seen"}),(0,s.jsx)(a.nd,{className:o.grant,children:"Grant"}),f?(0,s.jsx)(a.nd,{className:o.action,children:"Actions"}):null]})}),(0,s.jsx)(a.BF,{children:t.map(e=>(0,s.jsx)(d,{entry:e,hasActions:f,onReveal:n,onRevoke:i,renderedAt:h},e.pointerId))})]}),c?(0,s.jsxs)(a.dK,{children:[(0,s.jsx)(a.Eb,{disabled:!r||m,onClick:x}),(0,s.jsx)(a.D2,{children:void 0===p||void 0===u?"".concat(String(t.length)," shown"):g?"0 of ".concat(String(p)," values"):"".concat(String(u),"–").concat(String(u+t.length-1)," of ").concat(String(p)," values")}),(0,s.jsx)(a.WA,{disabled:!l||m,loading:m,onClick:c})]}):l&&(0,s.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the first ",t.length," values — the rest are in the store."]})]})}function d(e){let{entry:t,hasActions:n,onReveal:c,onRevoke:d,renderedAt:x}=e,m=t.revealGrantId;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nA,{children:(0,s.jsx)(l.Y,{value:null,descriptor:t})}),(0,s.jsx)(a.nA,{className:o.occurrences,children:(0,s.jsx)("span",{className:"text-xs text-text-2",children:String(t.occurrences)})}),(0,s.jsx)(a.nA,{className:o.firstSeen,children:(0,s.jsx)("span",{className:"text-xs text-text-2",children:(0,i.K)(t.firstSeen,x)})}),(0,s.jsx)(a.nA,{className:o.lastSeen,children:(0,s.jsx)("span",{className:"text-xs text-text-2",children:(0,i.K)(t.lastSeen,x)})}),(0,s.jsx)(a.nA,{className:o.grant,children:null===m?null:(0,s.jsx)(r.$$,{})}),n?(0,s.jsx)(a.nA,{className:o.action,children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[void 0===c?null:(0,s.jsx)(a.$n,{variant:"outline",tone:"neutral",size:"sm",onClick:()=>{c(t.pointerId)},children:"Reveal"}),null!==m&&void 0!==d?(0,s.jsx)(a.$n,{variant:"ghost",tone:"danger",size:"sm",onClick:()=>{d(m)},children:"Revoke grant"}):null]})}):null]}),t.sightings.length>0?(0,s.jsx)(a.Hj,{children:(0,s.jsx)(a.nA,{colSpan:n?6:5,className:"py-2",children:(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{className:"cursor-pointer text-xs font-medium text-text-2",children:["Written to ",String(t.sightings.length)," ",1===t.sightings.length?"location":"locations"," — anyone who can read them sees the correlation"]}),(0,s.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:t.sightings.map(e=>(0,s.jsxs)("li",{className:"grid grid-cols-[1fr_110px_100px] items-center gap-2 text-xs text-text-2",children:[(0,s.jsx)("code",{className:"break-all font-mono",children:e.location}),(0,s.jsx)("div",{children:(0,s.jsx)(r.Ec,{kind:e.kind})}),(0,s.jsx)("span",{className:"text-text-3",children:(0,i.K)(e.lastSeen,x)})]},"".concat(e.kind,":").concat(e.location)))})]})})}):null]})}},7881:(e,t,n)=>{n.d(t,{UpdateStatusCardView:()=>l});var s=n(2703),a=n(347),i=n(760);function l(e){let{statuses:t,checkedAt:n,onCheckNow:l,onApply:r,applyingId:o,outcomes:c,restartRequired:d,busy:x}=e;return(0,s.jsxs)(a.Zp,{className:"shadow-sm",children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsx)(a.AG,{tone:"primary",children:(0,s.jsx)(i.fN,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Installed components"}),(0,s.jsx)(a.BT,{children:n?"Last checked ".concat(n):"Not checked yet"})]}),(0,s.jsx)(a.$n,{variant:"outline",tone:"neutral",size:"sm",disabled:x,onClick:l,children:x?"Checking…":"Check now"})]}),(0,s.jsxs)(a.Wu,{children:[d&&(0,s.jsxs)("div",{className:"mb-3 rounded-lg border border-ok-fill bg-ok-fill px-3 py-2 text-xs font-medium text-text",children:["Update installed — restart ",(0,s.jsx)("code",{className:"font-mono",children:"aka dashboard"})," to load the new version."]}),(0,s.jsxs)("div",{className:"flex flex-col",children:[t.map((e,t)=>{var n;let i=c[e.id],l=function(e){let t=e.marketplacePin;if(t&&t.npmAhead&&null!==e.latest&&null!==t.npmLatest)return"".concat(t.marketplace," pins v").concat(e.latest," — npm has v").concat(t.npmLatest,", which this machine cannot install until that marketplace moves.")}(e);return(0,s.jsxs)("div",{className:(0,a.cn)("py-3",t>0&&"border-t border-hairline"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text",children:e.name}),(0,s.jsxs)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:[null!=(n=e.installed)?n:"—",e.latest&&e.updateAvailable&&" → ".concat(e.latest)]}),void 0!==l&&(0,s.jsx)("div",{className:"mt-1 text-xs text-text-3","data-slot":"marketplace-pin-note",children:l})]}),null===e.installed||null===e.latest?(0,s.jsx)(a.Ex,{variant:"default",children:"unknown"}):e.updateAvailable?(0,s.jsx)(a.Ex,{variant:"high",children:"update available"}):(0,s.jsx)(a.Ex,{variant:"success",children:"up to date"}),e.updateAvailable&&(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:null!==o,onClick:()=>{r(e.id)},children:o===e.id?"Updating…":"Update"})]}),i&&(0,s.jsxs)("div",{className:(0,a.cn)("mt-2 rounded-lg border p-2",i.ok?"border-ok-fill bg-ok-fill":"border-sev-critical-fill bg-sev-critical-fill"),children:[(0,s.jsx)("div",{className:"text-xs font-semibold text-text",children:i.ok?"Updated.":"Update failed"}),i.output&&(0,s.jsx)("pre",{className:"mt-1 max-h-40 overflow-auto whitespace-pre-wrap font-mono text-label text-text-2",children:i.output})]})]},e.id)}),0===t.length&&(0,s.jsx)("div",{className:"py-6 text-center text-xs text-text-3",children:"Nothing installed to report on yet."})]})]})]})}},8048:(e,t,n)=>{n.d(t,{AC:()=>d,AJ:()=>u,As:()=>p,EmptyState:()=>o,Kh:()=>g,TJ:()=>j,Vx:()=>m,kx:()=>x,wn:()=>c,yk:()=>f});var s=n(2703),a=n(347),i=n(8215),l=n(5654);function r(e){let{order:t,meta:n,value:i,onChange:r}=e;return(0,s.jsx)("span",{className:"inline-flex",onClick:e=>{e.stopPropagation()},children:(0,s.jsx)(a.Iz,{value:i,onValueChange:e=>{e&&r(e)},children:t.map(e=>{let t=n[e],r=e===i;return(0,s.jsx)(a.tR,{value:e,title:t.label,className:(0,a.cn)("size-7 flex-none gap-0 px-0 py-0","data-[state=on]:bg-transparent data-[state=on]:text-current data-[state=on]:shadow-none",r?(0,a.cn)(t.fg,t.bg):"text-text-3 hover:text-text-2"),children:(0,s.jsx)(l.m,{name:t.icon})},e)})})})}function o(e){let{message:t,icon:n="list",className:i}=e;return(0,s.jsxs)("div",{className:(0,a.cn)("flex items-center gap-2.5 rounded-lg border border-dashed border-border-strong px-3 py-3.5 text-text-3",i),children:[(0,s.jsx)(l.m,{name:n,className:"size-4 shrink-0"}),(0,s.jsx)("span",{className:"text-xs",children:t})]})}function c(e){let{label:t,children:n}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),n]})}function d(e){let{order:t,meta:n,value:i,onChange:r,accentOf:o}=e;return(0,s.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>{let t=n[e],c=e===i;return(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e)},className:(0,a.cn)("flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left cursor-pointer",c?(0,a.cn)(t.bg,"border-current",t.fg):"border-border bg-surface"),children:[(0,s.jsx)("span",{className:(0,a.cn)("grid size-8 shrink-0 place-items-center rounded-lg",c?"bg-surface":"bg-surface-2",t.fg),children:(0,s.jsx)(l.m,{name:t.icon,className:"size-4.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:(0,a.cn)("text-sm font-semibold",c?t.fg:"text-text"),children:t.label}),(0,s.jsx)("div",{className:"mt-0.5 text-xs text-text-2",children:t.desc})]}),(0,s.jsx)("span",{className:(0,a.cn)("grid size-4.5 shrink-0 place-items-center rounded-full border-[1.5px]",c?(0,a.cn)("border-current text-on-accent",o(t)):"border-border-strong"),children:c&&(0,s.jsx)(l.m,{name:"check",className:"size-3"})})]},e)})})}function x(e){let{value:t,onChange:n}=e;return(0,s.jsx)(r,{order:i.IF,meta:i.Pe,value:t,onChange:n})}function m(e){let{value:t}=e;return(0,s.jsx)("span",{className:(0,a.cn)("min-w-23 whitespace-nowrap text-xs font-semibold",i.Pe[t].fg),children:i.Pe[t].label})}function u(e){let{counts:t,className:n}=e,l=t.total||1;return(0,s.jsx)("span",{className:(0,a.cn)("flex h-1.5 w-30 overflow-hidden rounded-full bg-surface-3",n),children:i.IF.map(e=>{let n=t[e]/l*100;return n>0?(0,s.jsx)("span",{className:i.Pe[e].bar,style:{width:"".concat(String(n),"%")}},e):null})})}function p(e){let{value:t}=e,n=i.ZY[t];return(0,s.jsxs)(a.Ex,{variant:n.tone,children:[(0,s.jsx)(l.m,{name:n.icon,className:"size-3"}),n.label]})}function h(e){let{flag:t,mini:n}=e,r=i.lx[t];return(0,s.jsxs)(a.Ex,{variant:r.tone,children:[(0,s.jsx)(l.m,{name:r.icon,className:n?"size-2.5":"size-3"}),n?r.short:r.label]})}function g(e){let{flags:t,mini:n}=e;return 0===t.length?n?null:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-ok-ink",children:[(0,s.jsx)(l.m,{name:"check-circle",className:"size-3.5"})," OK"]}):(0,s.jsx)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:t.map(e=>(0,s.jsx)(h,{flag:e,mini:n},e))})}function f(e){let{v:t}=e;return"public"===t?(0,s.jsxs)(a.Ex,{variant:"success",children:[(0,s.jsx)(l.m,{name:"globe",className:"size-3"})," Public"]}):(0,s.jsxs)(a.Ex,{variant:"default",children:[(0,s.jsx)(l.m,{name:"lock",className:"size-3"})," Private"]})}function j(e){let{origin:t}=e,n=i.Gb[t];return(0,s.jsxs)(a.Ex,{variant:"default",children:[(0,s.jsx)(l.m,{name:n.icon,className:"size-3"})," ",n.short]})}},8118:(e,t,n)=>{n.d(t,{H1:()=>o,N2:()=>r,Pt:()=>l,VA:()=>d,q2:()=>c,xf:()=>i});var s=n(723),a=n(8230);function i(e){return e.locked?"Your organization sets the enforcement policy for this detection, so it cannot be changed on this machine.":"Your organization requires at least ".concat((0,a.ES)(e.floor).label," for this detection. ")+"You can choose a stronger action here, but not a weaker one."}function l(e){if(!e)return;let t=e.locked?s.V0H:s.V0H.filter(t=>!(0,s.T2I)((0,s.fhc)(t),(0,s.fhc)(e.floor)));if(0===t.length)return;let n=i(e);return Object.fromEntries(t.map(e=>[e,n]))}function r(e,t){let n=null!=e?e:a.tG;if(!t)return n;let i=s.HUb.safeParse(n);return i.success&&(0,s.T2I)((0,s.fhc)(i.data),(0,s.fhc)(t.floor))?n:t.floor}function o(e,t){return!!t&&(t.locked||r(e,t)!==(null!=e?e:a.tG))}let c="Your organization requires this detection to stay on, so it cannot be turned off on this machine. You can still give it a stronger enforcement policy here.";function d(e,t){return e&&!!t}},8215:(e,t,n)=>{n.d(t,{Cs:()=>f,Gb:()=>c,IF:()=>a,Pe:()=>s,TW:()=>u,WD:()=>d,ZY:()=>i,_t:()=>v,fd:()=>m,iL:()=>h,lx:()=>r,pA:()=>x,v7:()=>p,yx:()=>l,z:()=>j});let s={open:{label:"Any LLM",icon:"cloud",fg:"text-ok-ink",bg:"bg-ok-fill",bar:"bg-ok",accent:"bg-ok-ink",desc:"Allowed to any model — including public, consumer LLMs."},approved:{label:"Approved only",icon:"shield-check",fg:"text-primary",bg:"bg-primary-tint",bar:"bg-primary",accent:"bg-primary",desc:"Allowed only to approved, governed models."},blocked:{label:"No LLM",icon:"slash-circle",fg:"text-sev-critical-ink",bg:"bg-sev-critical-fill",bar:"bg-sev-critical",accent:"bg-sev-critical-ink",desc:"Never sent to any model. Blocked at the proxy."}},a=["open","approved","blocked"],i={"known-good":{label:"Known good",icon:"shield-check",tone:"success",fg:"text-ok-ink",bg:"bg-ok-fill",iconBg:"bg-ok-ink",desc:"Reviewed & allow-listed. Agents may call it freely."},risky:{label:"Risky",icon:"alert",tone:"high",fg:"text-sev-high-ink",bg:"bg-sev-high-fill",iconBg:"bg-sev-high-ink",desc:"Allowed, but reaches sensitive systems or external hosts. Use with care."},unapproved:{label:"Unapproved",icon:"x-circle",tone:"critical",fg:"text-sev-critical-ink",bg:"bg-sev-critical-fill",iconBg:"bg-sev-critical-ink",desc:"Not reviewed or explicitly denied — calls are blocked at the proxy."}},l=["known-good","risky","unapproved"],r={update:{label:"Update available",short:"Update",icon:"arrow-up",tone:"high"},stale:{label:"Stale",short:"Stale",icon:"clock",tone:"default"},conflict:{label:"Conflict",short:"Conflict",icon:"branch",tone:"critical"},unknown:{label:"Unverified",short:"Unverified",icon:"help",tone:"critical"},change:{label:"Changed",short:"Changed",icon:"edit",tone:"low"},untracked:{label:"Untracked",short:"Untracked",icon:"eye-off",tone:"high"},risk:{label:"Security risk",short:"Risk",icon:"alert",tone:"critical"},findings:{label:"Sensitive data",short:"Findings",icon:"alert",tone:"critical"}},o=["risk","conflict","unknown","change","untracked","update","stale"],c={source:{short:"Source",label:"First-party source code",icon:"code"},"public-dep":{short:"Public dep",label:"Public dependency \xb7 open source",icon:"cloud"},vendored:{short:"Vendored",label:"Vendored third-party",icon:"layers"},config:{short:"Config",label:"Configuration",icon:"settings"},data:{short:"Data",label:"Data \xb7 fixtures",icon:"database"},docs:{short:"Docs",label:"Documentation",icon:"book"},generated:{short:"Generated",label:"Generated artifact",icon:"bolt"}},d={type:"project",label:"Projects",icon:"repo",fg:"text-primary",bg:"bg-primary-tint"},x={skill:{type:"skill",label:"Skills",icon:"sparkles",fg:"text-violet-ink",bg:"bg-violet-fill"},mcp:{type:"mcp",label:"MCP servers",icon:"server",fg:"text-teal-ink",bg:"bg-teal-fill"},hook:{type:"hook",label:"Hooks",icon:"route",fg:"text-sev-low-ink",bg:"bg-sev-low-fill"},config:{type:"config",label:"Configuration",icon:"sliders",fg:"text-teal-ink",bg:"bg-surface-2"}},m=[d,x.skill,x.mcp,x.hook,x.config],u=e=>{let{icon:t,fg:n,bg:s}="project"===e?d:x[e];return{icon:t,fg:n,bg:s}};function p(e){return new Date(e).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}let h={block:{label:"Blocked",icon:"slash-circle",tone:"critical",fg:"text-sev-critical-ink",bg:"bg-sev-critical-fill"},redact:{label:"Redacted",icon:"redact",tone:"teal",fg:"text-teal-ink",bg:"bg-teal-fill"},warn:{label:"Warned",icon:"alert",tone:"high",fg:"text-sev-high-ink",bg:"bg-sev-high-fill"}},g={typescript:"#3178C6",javascript:"#F1E05A",rust:"#DEA584",python:"#3572A5",go:"#00ADD8",ruby:"#701516",java:"#B07219",hcl:"#844FBA",jupyter:"#DA5B0B","jupyter notebook":"#DA5B0B",mdx:"#1B1F24",markdown:"#083FA1",shell:"#89E051",c:"#555555","c++":"#F34B7D","c#":"#178600",php:"#4F5D95",swift:"#F05138",kotlin:"#A97BFF"};function f(e){var t;return null!=(t=g[e.toLowerCase()])?t:"var(--color-border-strong)"}function j(e){let t={};return e.forEach(e=>{e.flags.forEach(e=>{var n;t[e]=(null!=(n=t[e])?n:0)+1})}),o.filter(e=>t[e]).map(e=>{var n;return{key:e,count:null!=(n=t[e])?n:0}})}function v(e,t){if("public"===e.visibility)return"Public repository — every file is allowed to any LLM by default.";if("public-dep"===t)return"Public, open-source dependency — allowed to any LLM by default, even inside a private repo.";let n="blocked"===e.policyDefault?"No LLM":"Approved only";return"Private repository. First-party files default to “".concat(n,"”. Adjust per file as needed.")}},8230:(e,t,n)=>{n.d(t,{ES:()=>d,H9:()=>m,Xg:()=>p,gh:()=>x,jP:()=>u,rE:()=>r,tG:()=>i,uR:()=>c,vm:()=>l});var s=n(723),a=n(760);let i="monitor";function l(e){return"regex"===e.type?"/"+e.pattern+"/"+e.flags:e.keywords.join(" \xb7 ")}let r={regex:{label:"Regex",icon:a.cZ,color:"var(--color-violet-ink)",fill:"var(--color-violet-fill)",blurb:"Pattern match"},keyword:{label:"Keyword",icon:a.Ey,color:"var(--color-teal-ink)",fill:"var(--color-teal-fill)",blurb:"Literal lookup"}},o={monitor:{id:"monitor",label:"Monitor",icon:a.bM,tone:"neutral",desc:"Log every match for audit. The request is allowed through untouched."},warn:{id:"warn",label:"Warn",icon:a._0,tone:"high",desc:"Allow the request, but warn the user inline before it is sent."},redact:{id:"redact",label:"Redact",icon:a.jZ,tone:"primary",desc:"Strip the matched value from the request and destroy it, then continue. What was removed cannot be recovered."},vault:{id:"vault",label:"Redact & Vault",icon:a.XA,tone:"teal",desc:"Strip the matched value from the request and keep an encrypted, recoverable copy in the local vault, leaving a pointer in its place. Needs the vault consent granted under Settings; without it this behaves as Redact."},block:{id:"block",label:"Block",icon:a.pD,tone:"critical",desc:"Refuse the request entirely whenever any rule in this detection matches."}},c=s.V0H;function d(e){let t=Object.hasOwn(o,e)?o[e]:void 0;return null!=t?t:{id:e,label:e,icon:a.iB,tone:"neutral",desc:""}}let x={pii:"PII",financial:"Financial",secret:"Secret",phi:"PHI",code_context:"Code context",code_flaw:"Code flaw",custom:"Custom",config:"Configuration"},m={library:{label:"Library",icon:a.fC,tone:"teal",blurb:"Imported from the public library"},custom:{label:"Custom",icon:a.qU,tone:"violet",blurb:"Authored here — no upstream to track"}},u={labs:{label:"AKA Labs",icon:a.Zu,tone:"teal",verified:!0},org:{label:"Your org",icon:a.ai,tone:"violet",verified:!1},user:{label:"Community",icon:a.ny,tone:"neutral",verified:!1}};function p(e){return null==e.update?"unknown":e.update.available?"update-available":"up-to-date"}},8515:(e,t,n)=>{n.d(t,{PolicyPicker:()=>r});var s=n(2703),a=n(347),i=n(6807),l=n(8230);function r(e){let{value:t,onChange:n,unavailable:r}=e,o=!n,c=e=>null==r?void 0:r[e],d=[...new Set(l.uR.map(c).filter(e=>void 0!==e))],x=(0,i.useId)(),m=e=>"".concat(x,"-unavailable-").concat(String(d.indexOf(e)));return(0,s.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,s.jsx)("div",{className:"inline-flex gap-1 self-start rounded-lg border border-border bg-surface-2 p-0.5"+(o?" opacity-70":""),"aria-disabled":o||void 0,children:l.uR.map(e=>{let i=(0,l.ES)(e),r=t===e,[d,x]=(0,a.vV)(i.tone),u="neutral"===i.tone?"var(--color-surface)":x,p=i.icon,h=c(e);return(0,s.jsxs)("button",{type:"button",disabled:o,"aria-disabled":o||void 0!==h||void 0,"aria-describedby":void 0===h?void 0:m(h),title:h,onClick:n&&void 0===h?()=>{n(e)}:void 0,"aria-pressed":r,"data-unavailable":void 0===h?void 0:"",className:"inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-semibold "+(o||void 0!==h?"cursor-not-allowed ":"cursor-pointer ")+(void 0===h?"":"opacity-50 ")+(r?"shadow-sm":"text-text-3"),style:r?{color:d,background:u}:void 0,children:[(0,s.jsx)(p,{"aria-hidden":!0,focusable:!1,className:"size-4"}),i.label]},e)})}),d.map(e=>(0,s.jsx)("p",{id:m(e),className:"text-xs text-text-3","data-slot":"policy-unavailable-reason",children:e},e))]})}},8674:(e,t,n)=>{n.d(t,{dtc:()=>L.AddExceptionForm,rX:()=>v.rX,fu:()=>T.ApproveExceptionDialog,i5F:()=>Y.AssetDetail,JRA:()=>H.AvailablePluginsCardView,VBV:()=>E.BlockedLedgerView,VNw:()=>j.VN,spO:()=>a.sp,MXo:()=>q.DataShareDetailView,e3r:()=>Z.DataSharesKindTabsView,Imc:()=>J.DataSharesTableView,tlv:()=>B.DerefAuditTableView,MFC:()=>b.DetectionDetailView,A7Z:()=>k.DetectionsListView,ppr:()=>I.EmptyState,Gj:()=>F.ExceptionDetailView,Ebj:()=>P.ExceptionsTableView,_GS:()=>v._G,gsr:()=>j.gs,qWw:()=>j.qW,ToP:()=>S.FileDetailDrawer,Wjr:()=>u.FindingDetailView,tFx:()=>g.FindingLevelFilters,$Gd:()=>p.FindingLocationsListView,S$9:()=>f.FindingTypesListView,FGz:()=>h.FindingsFlatTableView,Dmd:()=>g.FindingsToolbarView,y2Z:()=>A.HarnessOverview,mD3:()=>z.m,_c:()=>M.InventoryNav,mLz:()=>v.mL,XAi:()=>v.XA,wO1:()=>N.MatcherModal,b6_:()=>X.NeedsReviewListView,t6e:()=>Q.NeedsReviewStripView,ece:()=>r,LKE:()=>C.PolicyDetailView,m$d:()=>C.PolicyListView,kLH:()=>O.ProjectPane,sJz:()=>R.RecommendedActionsCardView,nZB:()=>_.RotateKeyDialog,Tvj:()=>D.ScopePicker,YJs:()=>o.Y,Lwf:()=>c.SearchField,WIv:()=>v.WI,LOI:()=>x.SessionDetailView,md2:()=>m.SessionListView,Zus:()=>v.Zu,Zmc:()=>U.SyncPanelView,hny:()=>a.hn,k3y:()=>v.k3,$nP:()=>d.TimeRangeSelect,b1W:()=>w.UpdateModal,bnY:()=>W.UpdateStatusCardView,y6v:()=>$.VaultInventoryView,gvr:()=>K.VaultReuseView,A30:()=>G.WorkspaceSettingsFormView,uv5:()=>v.uv,eFG:()=>V.eF,XgB:()=>y.Xg,QTF:()=>a.QT,a5B:()=>i.useRenderClock});var s=n(2286);n(1759);var a=n(5149),i=n(8929);n(3749);var l=n(2703);function r(e){let{title:t,sub:n,actions:s}=e;return(0,l.jsxs)("div",{className:"flex items-start justify-between gap-4 pb-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"font-display text-2xl font-semibold text-text",children:t}),void 0!==n&&""!==n&&(0,l.jsx)("p",{className:"mt-1 text-sm text-text-3",children:n})]}),s&&(0,l.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}n(1145);var o=n(2819),c=n(6574);n(4975);var d=n(176);n(6442),n(3878),n(1486),n(9336),n(3585),n(3847),n(6274),n(3193);var x=n(6742),m=n(3649);n(8809);var u=n(907),p=n(447),h=n(4409),g=n(3183),f=n(4564),j=n(9455);n(3399),n(2036);var v=n(760);n(3783);var b=n(3868),k=n(7308),y=n(8230);n(8118),n(8515),n(6057);var N=n(980),w=n(919),C=n(332),Y=n(4330),I=n(8048);n(8215);var S=n(4157),A=n(1468),z=n(5654),M=n(4420),O=n(2792);n(347),s.l.sevCritical,s.l.sevHigh,s.l.sevMedium,s.l.sevLow,v.pD,s.l.sevCritical,v.jZ,s.l.primary,v.rX,s.l.sevHigh,n(4762),n(2023),n(6913),n(723);var R=n(1142),L=n(207),T=n(2071),D=n(4621),E=n(4411);n(7195);var F=n(9732),P=n(2909),V=n(1460),_=n(1561);n(1955);var B=n(3169),$=n(7692),K=n(9520),H=n(9103),W=n(7881),U=n(4584),G=n(1639);n(2146);var q=n(1941),Z=n(7089),J=n(2728);n(3619);var X=n(5296),Q=n(8928);n(7525),n(3517)},8809:(e,t,n)=>{n.d(t,{T:()=>l});var s=n(2703),a=n(347);n(760);var i=n(9455);function l(e){let{action:t}=e,n=(0,i.C$)(t),l=n.icon;return(0,s.jsx)(a.vw,{icon:(0,s.jsx)(l,{}),className:(0,a.cn)("rounded-full border-transparent px-2.5 text-xs [&_svg]:size-3.5",n.className),children:n.label})}},8928:(e,t,n)=>{n.d(t,{NeedsReviewStripView:()=>i});var s=n(2703),a=n(760);function i(e){let{items:t,scope:n,onOpen:i}=e;return 0===t.length?null:(0,s.jsx)("div",{className:"mb-3.5 overflow-hidden rounded-xl border border-sev-critical-fill bg-sev-critical-fill",children:(0,s.jsxs)("button",{type:"button",onClick:i,"aria-haspopup":"dialog",className:"flex w-full cursor-pointer items-center gap-2.5 px-3.5 py-3 text-left",children:[(0,s.jsx)("span",{className:"grid size-6.5 shrink-0 place-items-center rounded-md bg-sev-critical-ink text-on-accent",children:(0,s.jsx)(a._0,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text",children:"Needs review"}),(0,s.jsx)("span",{className:"rounded-full bg-sev-critical-ink px-2 text-xs py-0.5 font-bold text-on-accent",children:t.length}),n&&(0,s.jsx)("span",{className:"shrink-0 whitespace-nowrap text-xs font-semibold text-text-2",children:n}),(0,s.jsx)("span",{className:"text-xs text-text-2",children:"Raw IPs, plaintext transfers & unverified domains"}),(0,s.jsx)(a.vK,{"aria-hidden":!0,focusable:!1,className:"ml-auto size-4.5 text-text-3"})]})})}},8929:(e,t,n)=>{n.d(t,{CLOCK_TICK_MS:()=>a,useRenderClock:()=>i});var s=n(6807);let a=3e4;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=(0,s.useMemo)(()=>(function(e,t){let n,s=t,a=new Set,i=()=>{for(let e of(s=Date.now(),a))e()},l=()=>{"visible"===document.visibilityState&&i()};return{subscribe:t=>(a.add(t),void 0===n&&(s=Date.now(),n=setInterval(i,e),document.addEventListener("visibilitychange",l)),()=>{a.delete(t),0===a.size&&void 0!==n&&(clearInterval(n),n=void 0,document.removeEventListener("visibilitychange",l))}),getSnapshot:()=>s}})(t,e),[t,e]);return(0,s.useSyncExternalStore)(n.subscribe,n.getSnapshot,()=>e)}},9020:(e,t,n)=>{n.d(t,{R:()=>i,j:()=>s});let s=new Intl.NumberFormat("en-US"),a=new Intl.NumberFormat("en-US",{notation:"compact"});function i(e){return a.format(e).toLowerCase()}},9103:(e,t,n)=>{n.d(t,{AvailablePluginsCardView:()=>l});var s=n(2703),a=n(347),i=n(760);function l(e){let{plugins:t,onInstall:n,installingId:l,outcomes:r}=e;return 0===t.length?null:(0,s.jsxs)(a.Zp,{className:"shadow-sm",children:[(0,s.jsxs)(a.aR,{children:[(0,s.jsx)(a.AG,{tone:"teal",children:(0,s.jsx)(i.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,s.jsxs)(a.Lc,{children:[(0,s.jsx)(a.ZB,{children:"Available plugins"}),(0,s.jsx)(a.BT,{children:"Agent integrations you haven’t installed yet"})]})]}),(0,s.jsx)(a.Wu,{children:(0,s.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let i=r[e.id];return(0,s.jsxs)("div",{className:(0,a.cn)("py-3",t>0&&"border-t border-hairline"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text",children:e.name}),e.latest&&(0,s.jsxs)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:["v",e.latest]})]}),(0,s.jsx)(a.$n,{variant:"solid",tone:"primary",size:"sm",disabled:null!==l,onClick:()=>{n(e.id)},children:l===e.id?"Installing…":"Install"})]}),i&&(0,s.jsxs)("div",{className:(0,a.cn)("mt-2 rounded-lg border p-2",i.ok?"border-ok-fill bg-ok-fill":"border-sev-critical-fill bg-sev-critical-fill"),children:[(0,s.jsx)("div",{className:"text-xs font-semibold text-text",children:i.ok?"Installed — restart Claude Code to load it.":"Install failed"}),i.output&&(0,s.jsx)("pre",{className:"mt-1 max-h-40 overflow-auto whitespace-pre-wrap font-mono text-label text-text-2",children:i.output})]})]},e.id)})})})]})}},9336:(e,t,n)=>{n.d(t,{JW:()=>o,Lw:()=>d,UD:()=>r,md:()=>l,zn:()=>c});var s=n(2703),a=n(347),i=n(3193);function l(e){let{status:t}=e;return"active"===t?(0,s.jsxs)("span",{className:"relative flex size-2 shrink-0",title:"Live",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-ok opacity-75"}),(0,s.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-ok"})]}):(0,s.jsx)("span",{className:(0,a.cn)("size-1.5 shrink-0 rounded-full",i.nR[t].dot)})}function r(e){let{status:t}=e,n=i.nR[t];return(0,s.jsxs)(a.Ex,{variant:n.badge,className:"h-6 gap-1.5",children:[(0,s.jsx)(l,{status:t}),n.label]})}function o(e){let{icon:t,children:n}=e;return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs text-text-3",children:[(0,s.jsx)(t,{"aria-hidden":!0,focusable:!1,className:"size-3"}),n]})}function c(e){var t;let{name:n,n:l,href:r}=e,o=null!=(t=i.pS[n])?t:i.ek,c=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o,{"aria-hidden":!0,focusable:!1,className:"size-3 text-text-3"}),n,(0,s.jsx)("span",{className:"tabular-nums text-text",children:l})]}),d="inline-flex items-center gap-1.5 rounded-full border border-border bg-surface-2 py-0.5 px-2 text-xs font-semibold text-text-2";return r?(0,s.jsx)("a",{href:r,title:"Findings captured via ".concat(n),className:(0,a.cn)(d,"transition-colors hover:bg-surface-3 hover:text-text"),children:c}):(0,s.jsx)("span",{className:d,children:c})}function d(e){let{items:t,mono:n=!1,nowrap:i=!1}=e;return(0,s.jsx)("div",{className:(0,a.cn)("flex gap-1.5",i?"min-w-0 overflow-hidden":"flex-wrap"),children:t.map(e=>(0,s.jsx)("span",{title:e,className:(0,a.cn)("rounded-md border border-border bg-surface-2 px-1.5 py-0.5 text-xs text-text",n&&"font-mono",i&&"min-w-0 truncate"),children:e},e))})}},9455:(e,t,n)=>{n.d(t,{y7:()=>m,VN:()=>r,gs:()=>l,qW:()=>I,V_:()=>y,Ec:()=>w,pM:()=>k,B5:()=>v,oC:()=>o,O:()=>j,C$:()=>g,Jm:()=>p,i9:()=>u,Ad:()=>Y,dL:()=>N,Dx:()=>b,xE:()=>f});var s=n(347),a=n(1759),i=n(760);let l=["grouped","flat","files"],r="grouped",o=["critical","high","medium","low"],c={secret:"Secret",pii:"PII",source_code:"Source code",code_flaw:"Code flaw",external_share:"External share",mcp_server:"MCP server",customer_data:"Customer data",financial:"Financial",phi:"PHI",custom:"Custom"},d={secret:i.RY,pii:i.ny,source_code:i.lo,code_flaw:i._0,external_share:i._G,mcp_server:i.RR,customer_data:i.bN,financial:i.bN,phi:i.ny,custom:i.RY},x={secret:"critical",pii:"low",source_code:"violet",code_flaw:"high",external_share:"teal",mcp_server:"high",customer_data:"high",financial:"high",phi:"low",custom:"neutral"},m=Object.assign(Object.create(null),d),u=e=>{let t=Object.hasOwn(x,e)?x[e]:void 0;return s.id[null!=t?t:"neutral"]},p=e=>{let t=Object.hasOwn(c,e)?c[e]:void 0;return null!=t?t:e},h={blocked:{label:"Blocked",icon:i.pD,className:s.id.critical},redacted:{label:"Redacted",icon:i.jZ,className:s.id.primary},warned:{label:"Warned",icon:i._0,className:s.id.high},allowed:{label:"Allowed",icon:i.Sr,className:s.id.ok},monitored:{label:"Monitored",icon:i.bM,className:s.id.neutral},quarantined:{label:"Quarantined",icon:i.lm,className:s.id.critical}},g=e=>{let t=Object.hasOwn(h,e)?h[e]:void 0;return null!=t?t:{label:e,icon:i.RY,className:s.id.neutral}};function f(e){return e.file?e.file:e.toolName?"via ".concat(e.toolName):"—"}let j="Ingested by — the session user, or the owner of the api key that posted the event. An org-level ingest key names the key’s owner, not whoever ran the job.",v={open:{label:"Open",badge:"high"},handled:{label:"Handled",badge:"primary"},resolved:{label:"Resolved",badge:"success"},dismissed:{label:"Dismissed",badge:"default"}},b=e=>{let t=Object.hasOwn(v,e)?v[e]:void 0;return null!=t?t:{label:e,badge:"default"}},k=Object.keys(v),y={sent:{label:"Sent",badge:"success"},queued:{label:"Queued",badge:"primary"},not_sent:{label:"Not sent",badge:"high"},never_offered:{label:"Never offered",badge:"default"},local_scan:{label:"Local scan",badge:"default"}},N=e=>{let t=Object.hasOwn(y,e)?y[e]:void 0;return null!=t?t:{label:e,badge:"default"}},w=Object.keys(y),C={deployment_refused:"Your deployment refused it.",payload_invalid:"This machine couldn’t package it for sending.",detached_undelivered:"Still unsent when this machine detached."};function Y(e,t,n){switch(e.state){case"sent":return void 0===e.at?"Sent.":"Sent ".concat((0,a.K)(e.at,n),".");case"queued":return t.canRetry?"Waiting to be retried.":"Waiting to be retried. It won’t be retried until history sharing and this machine’s key are working — Settings → Sync.";case"not_sent":{let t=void 0!==e.reason&&Object.hasOwn(C,e.reason)?C[e.reason]:void 0;return void 0===t?"Not sent.":"Not sent. ".concat(t)}case"never_offered":return"Never queued: recorded while detached, before switching to this deployment, or its send wasn’t recorded.";case"local_scan":return"Found by a local scan (aka scan or the folder scan). Scanned files are never sent."}}let I={grouped:"By type",flat:"All findings",files:"By location"}},9520:(e,t,n)=>{n.d(t,{VaultReuseView:()=>r});var s=n(2703),a=n(347),i=n(2819);function l(e){return e.occurrences>1||e.sightings.length>1}function r(e){let{entries:t,hasNextPage:n=!1,hasPreviousPage:r=!1,onNextPage:o,onPreviousPage:c,loadingNextPage:d=!1,pageStart:x,total:m}=e,u=t.filter(l).sort((e,t)=>t.occurrences-e.occurrences),p=0===u.length;return!p||r||n?(0,s.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[(0,s.jsx)("p",{className:"mb-3 text-xs text-text-3",children:"Values detected more than once on this machine, most-reused first."}),p?(0,s.jsx)("div",{className:"py-10 text-center text-sm text-text-3",children:"These rows moved while you were reading. Step back to see the rest."}):(0,s.jsxs)(a.XI,{children:[(0,s.jsx)(a.A0,{children:(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nd,{children:"Value"}),(0,s.jsx)(a.nd,{children:"Occurrences"}),(0,s.jsx)(a.nd,{children:"Seen in"})]})}),(0,s.jsx)(a.BF,{children:u.map(e=>{let t=[...new Set(e.sightings.map(e=>e.location))];return(0,s.jsxs)(a.Hj,{children:[(0,s.jsx)(a.nA,{children:(0,s.jsx)(i.Y,{value:null,descriptor:e})}),(0,s.jsx)(a.nA,{className:"text-xs text-text-2",children:String(e.occurrences)}),(0,s.jsx)(a.nA,{children:(0,s.jsx)("ul",{className:"space-y-0.5 pl-3",children:t.map(e=>(0,s.jsx)("li",{className:"font-mono text-xs text-text-2 list-disc py-1",children:e},e))})})]},e.pointerId)})})]}),o?(0,s.jsxs)(a.dK,{children:[(0,s.jsx)(a.Eb,{disabled:!r||d,onClick:c}),(0,s.jsx)(a.D2,{children:void 0===m||void 0===x?"".concat(String(u.length)," shown"):p?"0 of ".concat(String(m)," reused values"):"".concat(String(x),"–").concat(String(x+u.length-1)," of ").concat(String(m)," reused values")}),(0,s.jsx)(a.WA,{disabled:!n||d,loading:d,onClick:o})]}):n&&(0,s.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the first ",u.length," reused values — the rest are in the store."]})]}):(0,s.jsx)("div",{className:"rounded-xl border border-border bg-surface py-10 text-center text-sm text-text-3",children:"No reused values detected on this machine."})}},9732:(e,t,n)=>{n.d(t,{ExceptionDetailView:()=>d});var s=n(2703),a=n(347),i=n(6807),l=n(1759),r=n(3878),o=n(4621),c=n(1460);function d(e){var t;let{exception:n,onRevoke:d,busy:x,error:m,renderedAt:u}=e,[p,h]=(0,i.useState)(""),g=(0,c.rO)(n,u);return(0,s.jsxs)("div",{className:"flex flex-col gap-6 rounded-xl border border-border bg-surface p-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-semibold text-text",children:n.id.slice(0,8)}),(0,s.jsx)(o.StateTagFor,{exception:n,now:u}),(0,s.jsx)(o._,{exception:n})]}),"reveal_to_model"===n.capability&&(0,s.jsxs)("div",{className:"rounded-lg border border-sev-critical-fill bg-sev-critical-fill p-3",children:[(0,s.jsx)(r.e,{className:"text-sev-critical-ink",children:"Reveal to model"}),(0,s.jsx)("p",{className:"text-sm text-text-2",children:"While this grant is active, the model can receive this value's raw form at tool boundaries. Every crossing is audited in the vault's de-reference trail."})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-6 gap-y-4 md:grid-cols-3",children:[(0,s.jsx)(r.p,{label:"Rule",children:(0,s.jsx)("span",{className:"font-mono text-xs",children:n.ruleId})}),(0,s.jsx)(r.p,{label:"Category",children:n.category}),(0,s.jsx)(r.p,{label:"Approved value",children:(0,s.jsx)("span",{className:"font-mono text-xs",children:n.maskedValue})}),(0,s.jsxs)(r.p,{label:"Scope",children:[c.yr[n.scope],"permanent"===n.scope&&" — until revoked"]}),(0,s.jsx)(r.p,{label:"Expires",children:null===n.expiresAt?"—":(0,l.K)(n.expiresAt,u)}),(0,s.jsxs)(r.p,{label:"Uses",children:[null===n.maxUses?String(n.useCount):"".concat(String(n.useCount),"/").concat(String(n.maxUses)),n.lastUsedAt&&" \xb7 last ".concat((0,l.K)(n.lastUsedAt,u))]}),(0,s.jsxs)(r.p,{label:"Created",children:[(0,l.K)(n.createdAt,u)," by ",n.createdBy," via"," ",c.gi[n.createdVia]]}),(0,s.jsx)(r.p,{label:"Key version",children:String(n.keyVersion)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.e,{children:"Justification"}),(0,s.jsx)("p",{className:"text-sm text-text-2",children:n.justification})]}),null!==n.revokedAt&&(0,s.jsxs)("div",{className:"rounded-lg border border-sev-critical-fill bg-sev-critical-fill p-3",children:[(0,s.jsx)(r.e,{className:"text-sev-critical-ink",children:"Revoked"}),(0,s.jsxs)("p",{className:"text-sm text-text-2",children:[(0,l.K)(n.revokedAt,u)," by ",null!=(t=n.revokedBy)?t:"unknown",n.revokeReason?" — ".concat(n.revokeReason):""]})]}),d&&"active"===g&&(0,s.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,s.jsx)(r.e,{children:"Revoke this grant"}),(0,s.jsx)("p",{className:"mb-2 text-xs text-text-3",children:"Revocation is immediate and terminal; the row is retained as audit evidence."}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a.pd,{value:p,onChange:e=>{h(e.target.value)},placeholder:"Reason (recorded in the audit trail)",className:"max-w-sm"}),(0,s.jsx)(a.$n,{variant:"solid",tone:"danger",size:"sm",disabled:x,onClick:()=>{d(p.trim())},children:"Revoke"})]}),m&&(0,s.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink",children:m})]})]})}}}]);