@akasecurity/cli 0.9.14 → 0.9.15
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.
- package/dist/cli.js +762 -267
- package/extension/manifest.json +1 -1
- package/native-host/content-retention.js +184 -55
- package/native-host/history-sync.js +190 -61
- package/native-host/host.js +469 -120
- package/native-host/scan-worker.js +241 -34
- package/native-host/sync.js +91 -36
- package/package.json +9 -9
- package/web-ui/package.json +6 -6
- package/web-ui/packages/dashboard-ui/package.json +1 -1
- package/web-ui/packages/plugin-sdk/package.json +1 -1
- package/web-ui/packages/schema/package.json +2 -2
- package/web-ui/web-ui/.next/BUILD_ID +1 -1
- package/web-ui/web-ui/.next/app-build-manifest.json +254 -254
- package/web-ui/web-ui/.next/app-path-routes-manifest.json +7 -7
- package/web-ui/web-ui/.next/build-manifest.json +14 -14
- package/web-ui/web-ui/.next/prerender-manifest.json +14 -14
- package/web-ui/web-ui/.next/required-server-files.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +3 -3
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.rsc +10 -10
- package/web-ui/web-ui/.next/server/app/icon.svg/route.js +1 -1
- package/web-ui/web-ui/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/index.html +1 -1
- package/web-ui/web-ui/.next/server/app/index.rsc +10 -10
- package/web-ui/web-ui/.next/server/app/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app-paths-manifest.json +7 -7
- package/web-ui/web-ui/.next/server/chunks/184.js +1039 -0
- package/web-ui/web-ui/.next/server/chunks/245.js +11 -0
- package/web-ui/web-ui/.next/server/chunks/{670.js → 250.js} +1 -1
- package/web-ui/web-ui/.next/server/chunks/491.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/51.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/511.js +66 -0
- package/web-ui/web-ui/.next/server/chunks/537.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/{74.js → 586.js} +55 -38
- package/web-ui/web-ui/.next/server/chunks/643.js +6 -0
- package/web-ui/web-ui/.next/server/chunks/660.js +109 -0
- package/web-ui/web-ui/.next/server/chunks/662.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/749.js +22 -0
- package/web-ui/web-ui/.next/server/chunks/756.js +6 -0
- package/web-ui/web-ui/.next/server/chunks/774.js +12 -0
- package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/middleware-build-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/middleware.js +2 -2
- package/web-ui/web-ui/.next/server/pages/404.html +1 -1
- package/web-ui/web-ui/.next/server/pages/500.html +1 -1
- package/web-ui/web-ui/.next/server/pages/_app.js +1 -1
- package/web-ui/web-ui/.next/server/pages/_app.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/pages/_document.js +1 -1
- package/web-ui/web-ui/.next/server/pages/_document.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/pages/_error.js +3 -3
- package/web-ui/web-ui/.next/server/pages/_error.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
- package/web-ui/web-ui/.next/static/chunks/394-310a18b4e4df5baf.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/458-51313fc93031a722.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/784-4ea191865f1d4d08.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/800-5a959d56ff462fa5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/982-d4c17097640bdc58.js +55 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-6a2b4ce7f62aa2ba.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-3032d8c5d83ed0ae.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-541933106e3fbbd5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/error-8db18c71ebeb633c.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-b2913fd29067c1aa.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-d71ddfb1b6a8508a.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-db4102808bb1d7ba.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-8fc32e776e5c8f17.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-5136fa903953a1f1.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-0a38af585fc577fa.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-7b0a5b76d199ec55.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-dd238c793fc58e5b.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-27448935d7ce4168.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-e8f75d1d2a05a860.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-34525856979b2faf.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-90ff82a26647fc29.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-688942265deca357.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/layout-66e4db4cb3e3b073.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/page-64c3ee82a8af8ca6.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/fc2b9f2a-dbaa334f7301101d.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/{framework-4a8a69f5ce633b25.js → framework-f6112ebf12822e8c.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/main-app-9c9fe8121a92e5d6.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/main-b1c87d0ac6039542.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/pages/_app-3a76cb93bbdd6993.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/pages/_error-690c2fcfe129b529.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/{webpack-c0fb35a40828243e.js → webpack-27570aabc530cb21.js} +1 -1
- package/web-ui/web-ui/.next/static/css/010b6061327092dd.css +2 -0
- package/web-ui/web-ui/.next/static/{5Pl1KmhN7uMqXkPkq0ZmS → zCQxcf2ZbK52vQeWXgBgs}/_buildManifest.js +1 -1
- package/web-ui/web-ui/dist/scan-worker.js +241 -34
- package/web-ui/web-ui/package.json +3 -3
- package/web-ui/web-ui/.next/server/chunks/167.js +0 -11
- package/web-ui/web-ui/.next/server/chunks/197.js +0 -12
- package/web-ui/web-ui/.next/server/chunks/247.js +0 -66
- package/web-ui/web-ui/.next/server/chunks/259.js +0 -22
- package/web-ui/web-ui/.next/server/chunks/285.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/293.js +0 -1022
- package/web-ui/web-ui/.next/server/chunks/498.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/524.js +0 -109
- package/web-ui/web-ui/.next/server/chunks/618.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/807.js +0 -6
- package/web-ui/web-ui/.next/server/chunks/811.js +0 -6
- package/web-ui/web-ui/.next/server/chunks/97.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/333-837ec42ac57bd0f5.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/423b6282-fc44d01f7ffd176d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/539-ca04468e745ed73a.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/614-2c96a5e95ce63862.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/639-6f64a434dce13266.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/826-e806952dd7b636f8.js +0 -55
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-5fc18420d8d5bf62.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-fe72214e54d52a14.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-47e4dd015f24c04d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/error-be2032a4770a35bf.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-f90fbb03406e4383.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-0a1d6a3557b99750.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-dbf32c5303140e8c.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-cb1934547acde891.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-6688bc58741c7c7d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-d357a1d54c653d14.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-bc95c7097cca0dfc.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-5bebd818c1bb3a79.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-42845dce0b734eeb.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-d3ce8a503e8ce592.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-802942c0a06fbe31.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-52c8cd3a2a09a067.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-260d84f0d7697773.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/layout-c64d57251ee073d5.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/page-b7ea78b4203d219b.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/main-89a5d50418a9a7e3.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/main-app-4a18e3117ef3af1e.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/pages/_app-671d04cd06b05cac.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/pages/_error-ae172b6a97f64258.js +0 -1
- package/web-ui/web-ui/.next/static/css/616a1cc3e0d40480.css +0 -2
- /package/web-ui/web-ui/.next/static/{5Pl1KmhN7uMqXkPkq0ZmS → zCQxcf2ZbK52vQeWXgBgs}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{223:(e,t,n)=>{n.d(t,{Sk:()=>p,UK:()=>a.UKt,fz:()=>m,gE:()=>x,nt:()=>r,rw:()=>c,u3:()=>h,vV:()=>u,xd:()=>a.xdw});var a=n(7971);let s=["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,a;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!=(a=s[r.getMonth()])?a:""," ").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 u(e,t,n,a){let s=Date.parse(e);if(Number.isNaN(s))return"";let i=Math.max(0,Math.round(((t?Date.parse(t):a)-s)/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 m(e){let t=e.cacheRead+e.inputTokens;return t>0?Math.round(100*e.cacheRead/t):0}function p(e){return(0,a.ap_)(e)}function h(e,t){let n=[];for(let a of e){let e=r(a.startedAt,t),s=n.find(t=>t.day===e);s||(s={day:e,items:[]},n.push(s)),s.items.push(a)}return n}},545:(e,t,n)=>{n.d(t,{T:()=>l});var a=n(7643),s=n(7228);n(8848);var i=n(3967);function l(e){let{action:t}=e,n=(0,i.C$)(t),l=n.icon;return(0,a.jsx)(s.vw,{icon:(0,a.jsx)(l,{}),className:(0,s.cn)("rounded-full border-transparent px-2.5 text-xs [&_svg]:size-3.5",n.className),children:n.label})}},826:(e,t,n)=>{n.d(t,{HD:()=>d,SU:()=>h,UH:()=>p,Wi:()=>m,eV:()=>c,hC:()=>u,kX:()=>o,xB:()=>x});var a=n(7643),s=n(7228),i=n(8848),l=n(4267);let r={GET:"low",POST:"ok",PUT:"high",DELETE:"critical",SDK:"ok",REF:"medium"};function o(e){let{method:t}=e;return(0,a.jsx)("span",{className:(0,s.cn)("inline-flex h-5 items-center rounded px-1.5 font-mono text-label leading-none font-bold py-0.5",s.id[r[t]]),children:t})}function c(e){let{transport:t,plain:n}=e,i=l.aD[t],r=i.icon;return n?(0,a.jsxs)("span",{className:(0,s.cn)("inline-flex items-center gap-1.5 text-xs font-semibold",i.secure?"text-text-2":"text-sev-critical-ink"),children:[(0,a.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label,!i.secure&&" \xb7 plaintext"]}):(0,a.jsxs)(s.Ex,{variant:i.secure?"default":"critical",children:[(0,a.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,a.jsxs)(s.Ex,{variant:n.tone,children:[(0,a.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,a.jsxs)(s.Ex,{variant:n.tone,children:[(0,a.jsx)(i,{"aria-hidden":!0,focusable:!1,className:"size-3"}),n.label]})}function u(e){let{status:t,isCustom:n}=e,i=l.P4[t],r=i.icon;return(0,a.jsxs)(s.Ex,{variant:n?i.tone:"default",children:[(0,a.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label,(0,a.jsx)("span",{className:"sr-only",children:n?" — set by an operator":" — trust default"})]})}function m(e){let{kind:t,trust:n,name:r,size:o=34}=e;if("provider"===t){let{short:e,color:t}=(0,l.Lh)(r);return(0,a.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:o,height:o,background:t,fontSize:.34*o},children:e})}let c={width:.5*o,height:.5*o},d="ip"===t?(0,a.jsx)(i.ts,{"aria-hidden":!0,focusable:!1,style:c}):"external"===t||"unverified"===n?(0,a.jsx)(i.ai,{"aria-hidden":!0,focusable:!1,style:c}):(0,a.jsx)(i.RR,{"aria-hidden":!0,focusable:!1,style:c});return(0,a.jsx)("span",{className:(0,s.cn)("grid shrink-0 place-items-center rounded-lg",(0,l.rL)({kind:t,trust:n})),style:{width:o,height:o},children:d})}function p(e){let{url:t,big:n}=e,i=t.split(/(\$\{[^}]+\})/g);return(0,a.jsx)("span",{className:(0,s.cn)("break-all font-mono",n?"text-ui":"text-xs"),children:i.map((e,t)=>e.startsWith("${")?(0,a.jsx)("span",{className:"rounded bg-primary-tint px-1 font-semibold text-primary",children:e},t):(0,a.jsx)("span",{children:e},t))})}function h(){return(0,a.jsxs)(s.Ex,{variant:"default",children:[(0,a.jsx)(i.cZ,{"aria-hidden":!0,focusable:!1,className:"size-2.5"}),"Template"]})}},887:(e,t,n)=>{n.d(t,{AddExceptionForm:()=>r});var a=n(7643),s=n(7228),i=n(1579),l=n(6597);function r(e){let{rules:t,onSubmit:n,busy:r,error:o}=e,[c,d]=(0,i.useState)(""),[x,u]=(0,i.useState)(""),[m,p]=(0,i.useState)(null),[h,g]=(0,i.useState)(""),[f,j]=(0,i.useState)(""),v="permanent"===m,b=""!==c&&""!==x&&null!==m&&""!==h.trim()&&(!v||f===x);return(0,a.jsxs)("div",{className:"flex max-w-xl flex-col gap-4 rounded-xl border border-border bg-surface p-5",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Detection rule"}),(0,a.jsxs)(s.l6,{value:c,onValueChange:d,children:[(0,a.jsx)(s.bq,{children:(0,a.jsx)(s.yv,{placeholder:"Pick the rule this value matches"})}),(0,a.jsx)(s.gC,{children:t.map(e=>(0,a.jsx)(s.eb,{value:e.id,children:(0,a.jsx)("span",{className:"font-mono text-xs",children:e.id})},e.id))})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Value to pre-authorize"}),(0,a.jsx)(s.pd,{type:"password",autoComplete:"off",value:x,onChange:e=>{u(e.target.value)},placeholder:"Pasted once; stored only as a keyed fingerprint + masked preview",className:"font-mono"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Scope — pick one"}),(0,a.jsx)(l.ScopePicker,{value:m,onChange:p})]}),v&&(0,a.jsxs)("div",{children:[(0,a.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,a.jsx)(s.pd,{type:"password",autoComplete:"off",value:f,onChange:e=>{j(e.target.value)},className:"font-mono"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Reason (required — the audit trail)"}),(0,a.jsx)(s.pd,{value:h,onChange:e=>{g(e.target.value)},placeholder:"Why this value may pass"})]}),o&&(0,a.jsx)("p",{className:"text-xs text-sev-critical-ink",children:o}),(0,a.jsx)("div",{children:(0,a.jsx)(s.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!b||r,onClick:()=>{m&&n({ruleId:c,value:x,scope:m,reason:h.trim(),...v?{confirmation:f}:{}})},children:r?"Verifying…":"Grant exception"})})]})}},896:(e,t,n)=>{n.d(t,{JW:()=>o,Lw:()=>d,UD:()=>r,md:()=>l,zn:()=>c});var a=n(7643),s=n(7228),i=n(5233);function l(e){let{status:t}=e;return"active"===t?(0,a.jsxs)("span",{className:"relative flex size-2 shrink-0",title:"Live",children:[(0,a.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-ok opacity-75"}),(0,a.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-ok"})]}):(0,a.jsx)("span",{className:(0,s.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,a.jsxs)(s.Ex,{variant:n.badge,className:"h-6 gap-1.5",children:[(0,a.jsx)(l,{status:t}),n.label]})}function o(e){let{icon:t,children:n}=e;return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs text-text-3",children:[(0,a.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,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{"aria-hidden":!0,focusable:!1,className:"size-3 text-text-3"}),n,(0,a.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,a.jsx)("a",{href:r,title:"Findings captured via ".concat(n),className:(0,s.cn)(d,"transition-colors hover:bg-surface-3 hover:text-text"),children:c}):(0,a.jsx)("span",{className:d,children:c})}function d(e){let{items:t,mono:n=!1,nowrap:i=!1}=e;return(0,a.jsx)("div",{className:(0,s.cn)("flex gap-1.5",i?"min-w-0 overflow-hidden":"flex-wrap"),children:t.map(e=>(0,a.jsx)("span",{title:e,className:(0,s.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))})}},980:(e,t,n)=>{n.d(t,{DETECTION_FILTER_TABS:()=>c,DetectionsListView:()=>x});var a=n(7643),s=n(7228),i=n(8848),l=n(9158),r=n(7052),o=n(9886);let c=[["all","All"],["library","Library"],["updates","Updates"]];function d(e){var t;let{d:n,sel:s,updateVersion:i,floor:l,onClick:c}=e;return(0,a.jsx)("button",{type:"button",onClick:c,className:"w-full cursor-pointer rounded-lg px-3 py-2.5 text-left transition-colors "+(s?"bg-primary-tint":"hover:bg-surface-2"),children:(0,a.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.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,a.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:n.name,children:n.name})]}),(0,a.jsxs)("div",{className:"font-mono text-xs text-text-3",children:["v",n.version]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 justify-between",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-text-3",children:n.id}),(0,a.jsxs)("span",{className:"text-xs text-text-3 shrink-0",children:[n.ruleCount," rule",1===n.ruleCount?"":"s"]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5 mt-1",children:[(0,a.jsx)(r.Ai,{origin:n.origin}),(0,a.jsx)(r.$F,{policy:null!=(t=n.policyId)?t:o.tG,floor:l}),i?(0,a.jsx)(r.Zp,{version:i}):null]})]})})}function x(e){let{items:t,counts:n,activeId:r,query:o,filter:x,onQueryChange:u,onFilterChange:m,onSelect:p,isLoading:h=!1,error:g=null,updatesById:f,floorsById:j,filterTabs:v=c}=e;return(0,a.jsxs)(s.Zp,{className:"flex flex-col overflow-hidden shadow-sm",children:[(0,a.jsxs)("div",{className:"border-b border-border p-3",children:[(0,a.jsx)(l.SearchField,{value:o,onValueChange:u,label:"Search detections",placeholder:"Search detections…",surface:"card",className:"h-9"}),(0,a.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:v.map(e=>{var t;let[s,l]=e,r=x===s,o=null!=(t=n[s])?t:0,c="updates"===s&&o>0;return(0,a.jsxs)("button",{type:"button",onClick:()=>{m(s)},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,a.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3"}),l,(0,a.jsx)("span",{className:"text-label font-bold opacity-70",children:o})]},s)})})]}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:h?(0,a.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:"Loading detections…"}):g?(0,a.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,a.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,a.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))})]})}},1015:(e,t,n)=>{n.d(t,{s:()=>r});var a=n(7643),s=n(7228),i=n(1579);function l(e){let{icon:t,value:n,label:i,tone:l,isLoading:r}=e,{text:o,fill:c}=s.cH[l];return(0,a.jsxs)("div",{"data-slot":"summary-stat",className:"flex min-w-0 flex-1 items-center gap-2 px-4",children:[(0,a.jsx)("span",{"data-slot":"summary-stat-icon",className:(0,s.cn)("grid size-7 shrink-0 place-items-center rounded-lg",c,o),children:(0,a.jsx)(t,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})}),(0,a.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,a.jsx)(s.EA,{className:"h-4 w-10 shrink-0"}):(0,a.jsx)("span",{className:"min-w-0 truncate font-display text-lg font-semibold leading-none tabular-nums text-text",children:n}),(0,a.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,a.jsx)(s.Zp,{className:(0,s.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,a.jsxs)(i.Fragment,{children:[t>0&&(0,a.jsx)("span",{className:"w-px shrink-0 self-stretch bg-hairline"}),(0,a.jsx)(l,{...e,isLoading:n})]},e.label))})}},1067:(e,t,n)=>{n.d(t,{$$:()=>r,Ec:()=>o,V:()=>l});var a=n(7643),s=n(7228);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,a.jsx)(s.Ex,{variant:"critical",children:"Reveal to model"})}function o(e){let{kind:t}=e;return(0,a.jsx)(s.Ex,{variant:"outline",children:i[t]})}},1108:(e,t,n)=>{n.d(t,{PolicyDetailView:()=>u,PolicyListView:()=>x,PolicyStatsView:()=>c});var a=n(7643),s=n(7228),i=n(9886),l=n(8848),r=n(1015);function o(e){return void 0===e?"—":e.toLocaleString()}function c(e){let{stats:t,loading:n=!1,className:s}=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,a.jsx)(r.s,{items:i,isLoading:n,className:s})}function d(e){let{policy:t,selected:n,onSelect:r}=e,{icon:o,tone:c}=(0,i.ES)(t.id),[d,x]=(0,s.vV)(c),u=t.usedByCount;return(0,a.jsxs)("button",{type:"button",onClick:r,"aria-pressed":n,className:(0,s.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,a.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,a.jsx)(o,{"aria-hidden":!0,focusable:!1})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,a.jsxs)("span",{className:"mt-px block text-xs text-text-3",children:[u," detection",1===u?"":"s"]})]}),"builtin"===t.kind&&(0,a.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,a.jsxs)(s.Zp,{className:"flex flex-col overflow-hidden p-2 shadow-sm",children:[(0,a.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,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto",children:r?(0,a.jsxs)("p",{className:"px-2.5 py-2 text-sm text-sev-critical-ink",children:["Error loading policies: ",r]}):l?(0,a.jsx)("p",{className:"px-2.5 py-2 text-sm text-text-3",children:"Loading policies…"}):0===t.length?(0,a.jsx)("p",{className:"px-2.5 py-2 text-sm text-text-3",children:"No policies yet."}):t.map(e=>(0,a.jsx)(d,{policy:e,selected:e.id===n,onSelect:()=>{i(e.id)}},e.id))})]})}function u(e){let{policy:t}=e,{icon:n,tone:r}=(0,i.ES)(t.id),[o,c]=(0,s.vV)(r),d="builtin"===t.kind,x=t.usedBy;return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-4",children:[(0,a.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,a.jsx)(n,{"aria-hidden":!0,focusable:!1})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("h2",{className:"font-display text-xl font-semibold text-text",children:t.name}),d&&(0,a.jsx)(s.vw,{icon:(0,a.jsx)(l.XA,{"aria-hidden":!0,focusable:!1,className:"size-3"}),children:"Built-in"}),(0,a.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,a.jsx)("p",{className:"mt-0.5 text-xs text-text-3",children:d?"AKA \xb7 built-in \xb7 no configuration":"Custom policy"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-6 p-5",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface-2 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-sm leading-relaxed text-text",children:t.description}),d&&(0,a.jsxs)("p",{className:"mt-2 inline-flex items-center gap-1.5 text-xs text-text-3",children:[(0,a.jsx)(l.XA,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),"Built-in policy — behavior is fixed and can't be edited."]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Applied by"}),(0,a.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,a.jsx)("p",{className:"py-2 text-sm text-text-3",children:"No detections use this policy yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(e=>(0,a.jsxs)(s.vw,{className:"h-7",dot:e.enabled?"var(--color-ok)":"var(--color-border-strong)",children:[e.name,(0,a.jsxs)("span",{className:"font-mono text-text-3",children:[e.ruleCount," rules"]})]},e.id))})]})]})]})}},1166:(e,t,n)=>{n.d(t,{e:()=>i,p:()=>l});var a=n(7643),s=n(7228);function i(e){let{children:t,className:n}=e;return(0,a.jsx)("span",{className:(0,s.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,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,a.jsx)("div",{className:"text-ui font-medium text-text",children:n})]})}},1272:(e,t,n)=>{n.d(t,{VaultReuseView:()=>r});var a=n(7643),s=n(7228),i=n(3883);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:u}=e,m=t.filter(l).sort((e,t)=>t.occurrences-e.occurrences),p=0===m.length;return!p||r||n?(0,a.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[(0,a.jsx)("p",{className:"mb-3 text-xs text-text-3",children:"Values detected more than once on this machine, most-reused first."}),p?(0,a.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,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:"Value"}),(0,a.jsx)(s.nd,{children:"Occurrences"}),(0,a.jsx)(s.nd,{children:"Seen in"})]})}),(0,a.jsx)(s.BF,{children:m.map(e=>{let t=[...new Set(e.sightings.map(e=>e.location))];return(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nA,{children:(0,a.jsx)(i.Y,{value:null,descriptor:e})}),(0,a.jsx)(s.nA,{className:"text-xs text-text-2",children:String(e.occurrences)}),(0,a.jsx)(s.nA,{children:(0,a.jsx)("ul",{className:"space-y-0.5 pl-3",children:t.map(e=>(0,a.jsx)("li",{className:"font-mono text-xs text-text-2 list-disc py-1",children:e},e))})})]},e.pointerId)})})]}),o?(0,a.jsxs)(s.dK,{children:[(0,a.jsx)(s.Eb,{disabled:!r||d,onClick:c}),(0,a.jsx)(s.D2,{children:void 0===u||void 0===x?"".concat(String(m.length)," shown"):p?"0 of ".concat(String(u)," reused values"):"".concat(String(x),"–").concat(String(x+m.length-1)," of ").concat(String(u)," reused values")}),(0,a.jsx)(s.WA,{disabled:!n||d,loading:d,onClick:o})]}):n&&(0,a.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the first ",m.length," reused values — the rest are in the store."]})]}):(0,a.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."})}},1397:(e,t,n)=>{n.d(t,{Aw:()=>s,JI:()=>l,zv:()=>i});var a=n(7971);let s=[{value:"acknowledged",label:"Accepted risk",description:"The finding is real, and this team has decided not to act on it."},{value:"false-positive",label:"Not a real finding",description:"The rule matched something that is not actually sensitive."}];function i(e){return!e.isMutating&&null!==e.method&&e.confirmation===a.H3X}function l(e){return["Closes the open findings for ".concat(e,", across every file and session."),"The findings stay in the store and keep their history — they are closed, not deleted.","While the value stays where it is, a later scan that finds it again will not reopen it.","If the value is removed and later re-added, a scan does reopen it.","There is no undo in the dashboard."]}},1433:(e,t,n)=>{n.d(t,{CLOCK_TICK_MS:()=>s,useRenderClock:()=>i});var a=n(1579);let s=3e4;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=(0,a.useMemo)(()=>(function(e,t){let n,a=t,s=new Set,i=()=>{for(let e of(a=Date.now(),s))e()},l=()=>{"visible"===document.visibilityState&&i()};return{subscribe:t=>(s.add(t),void 0===n&&(a=Date.now(),n=setInterval(i,e),document.addEventListener("visibilitychange",l)),()=>{s.delete(t),0===s.size&&void 0!==n&&(clearInterval(n),n=void 0,document.removeEventListener("visibilitychange",l))}),getSnapshot:()=>a}})(t,e),[t,e]);return(0,a.useSyncExternalStore)(n.subscribe,n.getSnapshot,()=>e)}},1710:(e,t,n)=>{n.d(t,{RecommendedActionsCardView:()=>p});var a=n(7643),s=n(7971),i=n(7228),l=n(1579),r=n(8052),o=n(8848),c=n(1397),d=n(5061);let x={block_credentials:o.pD,redact_pii:o.jZ,review_external_share:o._G},u={critical:"critical",high:"primary",medium:"teal",low:"teal"};function m(e){return e.subjects.find(e=>"rule"===e.type)}function p(e){var t,n;let{items:p,isLoading:h,error:g,applyAction:f,dismissAction:j,isMutating:v,mutationError:b,viewAllHref:k}=e,[y,N]=(0,l.useState)(null),[w,P]=(0,l.useState)(null),[Y,C]=(0,l.useState)(""),[I,S]=(0,l.useState)(!1),A=()=>{N(null),P(null),C(""),S(!1)};return(0,a.jsxs)(i.Zp,{className:"flex flex-col shadow-sm",children:[(0,a.jsxs)(i.aR,{children:[(0,a.jsx)(i.AG,{tone:"primary",children:(0,a.jsx)(o.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(i.Lc,{children:[(0,a.jsx)(i.ZB,{children:"Recommended actions"}),(0,a.jsx)(i.BT,{children:h?"Loading…":"".concat(String(p.length)," open, prioritized for you")})]}),k?(0,a.jsx)(i.X9,{children:(0,a.jsx)(i.$n,{asChild:!0,variant:"ghost",tone:"primary",size:"sm",children:(0,a.jsx)("a",{href:k,children:"View all"})})}):null]}),(0,a.jsx)(i.Wu,{"aria-busy":h,children:g?(0,a.jsx)(d.rJ,{message:g}):h?(0,a.jsx)("div",{className:"flex flex-col gap-3 py-2",children:[0,1,2].map(e=>(0,a.jsx)(i.EA,{className:"h-20 w-full"},e))}):0===p.length?(0,a.jsx)("div",{className:"py-6 text-center text-xs text-text-3",children:"No open findings."}):(0,a.jsx)(a.Fragment,{children:p.map((e,t)=>{var n;let s=null!=(n=x[e.category])?n:o.rX,l=m(e);return(0,a.jsxs)("div",{className:(0,i.cn)("flex gap-3 py-3",t<p.length-1&&"border-b border-hairline"),children:[(0,a.jsx)("span",{className:(0,i.cn)("flex size-8 shrink-0 items-center justify-center rounded-lg",i.id[u[e.severity]]),children:(0,a.jsx)(s,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-text",children:e.title}),(0,a.jsx)("div",{className:"mt-0.5 text-xs leading-relaxed text-text-2",children:e.description}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:e.subjects.map(e=>(0,a.jsx)(i.vw,{children:e.label},"".concat(e.type,"_").concat(e.id)))})]}),(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1.5",children:["apply"===e.action.mode?(0,a.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:v,onClick:()=>{f(e.id)},children:e.action.label}):e.action.href?(0,a.jsx)(i.$n,{asChild:!0,variant:"solid",tone:"primary",size:"sm",children:(0,a.jsx)("a",{href:e.action.href,children:e.action.label})}):(0,a.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!0,children:e.action.label}),void 0===l?null:(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",disabled:v,onClick:()=>{N({action:e,ruleId:l.id}),P(null),C("")},children:"Dismiss"})]})]},e.id)})})}),(0,a.jsx)(i.lG,{open:null!==y,onOpenChange:e=>{e||v||A()},children:null!==y&&(0,a.jsxs)(i.Cf,{children:[(0,a.jsxs)(i.c7,{children:[(0,a.jsxs)(i.L3,{children:["Dismiss ",y.ruleId," findings?"]}),(0,a.jsx)(i.rr,{children:null!=(n=null==(t=m(y.action))?void 0:t.label)?n:y.ruleId})]}),(0,a.jsxs)(i.R4,{className:"flex flex-col gap-4",children:[(0,a.jsx)("ul",{className:"flex list-disc flex-col gap-1 pl-4 text-xs leading-relaxed text-text-2",children:(0,c.JI)(y.ruleId).map(e=>(0,a.jsx)("li",{children:e},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{id:"dismiss-method-label",className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Why are you closing these?"}),(0,a.jsx)(r.n,{name:"dismiss-method",labelledBy:"dismiss-method-label",choices:c.Aw,value:w,onChange:P})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{id:"dismiss-confirmation-label",className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Confirm"}),(0,a.jsxs)("label",{"data-slot":"dismiss-confirmation-hint",className:"text-xs normal-case text-text-2",htmlFor:"dismiss-confirmation",children:["Type"," ",(0,a.jsx)("code",{className:"rounded bg-surface-2 px-1 py-0.5 font-mono text-text",children:s.H3X})," ","to confirm."]}),(0,a.jsx)(i.pd,{id:"dismiss-confirmation","data-slot":"dismiss-confirmation",value:Y,onChange:e=>{C(e.target.value)},placeholder:s.H3X,className:"max-w-56 font-mono"})]}),I&&null!==b&&(0,a.jsx)(d.rJ,{message:b})]}),(0,a.jsxs)(i.Es,{children:[(0,a.jsx)(i.$n,{variant:"ghost",size:"sm",disabled:v,onClick:()=>{A()},children:"Cancel"}),(0,a.jsx)(i.$n,{variant:"solid",tone:"danger",size:"sm",disabled:!(0,c.zv)({confirmation:Y,method:w,isMutating:v}),onClick:()=>{if(null!==y&&null!==w){S(!0);try{j({ruleId:y.ruleId,method:w,confirmation:Y}).then(e=>{e&&A()}).catch(()=>void 0)}catch(e){}}},children:v?"Dismissing…":"Dismiss findings"})]})]})})]})}},1857:(e,t,n)=>{n.d(t,{DetectionDetailView:()=>h});var a=n(7643),s=n(7228),i=n(1579),l=n(1166),r=n(8848);function o(e,t,n){return{"aria-disabled":!0,"aria-describedby":e,title:t,className:(0,s.cn)("cursor-not-allowed opacity-50",n)}}function c(e){let{id:t,dataSlot:n,className:i,children:l}=e;return(0,a.jsx)("p",{id:t,className:(0,s.cn)("text-xs text-text-3",i),"data-slot":n,children:l})}var d=n(9886),x=n(2494),u=n(2971),m=n(9889);function p(e){let{rule:t,onOpen:n}=e,i=d.rE[t.matcher.type],l=i.icon;return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"grid size-7.5 shrink-0 place-items-center rounded-lg",style:{background:i.fill,color:i.color},children:(0,a.jsx)(l,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:d.gh[t.category]||t.category})]}),(0,a.jsx)("div",{className:"mt-px font-mono text-label text-text-3",children:t.id})]}),(0,a.jsx)(s.Pt,{severity:t.severity}),(0,a.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,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.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,d.vm)(t.matcher)}),(0,a.jsxs)(s.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:n,className:"shrink-0",children:["View",(0,a.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]})]})}function h(e){let{d:t,onOpenRule:n,onToggleEnabled:h,onChangePolicy:g,unavailablePolicies:f,policyFloor:j,policyError:v,enabledError:b,onOpenUpdate:k,onRecheck:y,unknownHint:N,onAddRule:w,onEditRules:P,onDelete:Y}=e,C=(0,x.N2)(t.policyId,j),I=(0,d.ES)(C),S=I.icon,A=(0,x.Pt)(j),z=void 0===f&&void 0===A?void 0:{...f,...A},M=void 0!==h&&(0,x.VA)(t.enabled,j),O=(0,i.useId)(),R="custom"===t.origin,L=R&&void 0!==w,T=R&&void 0!==P,D=R&&void 0!==Y,E=T||D,F=R?"Adding rules is not available here":"Library rules are not edited in place",V=R?"Editing and deleting are not available here":"Library detections are not edited in place",_=(0,i.useId)(),B=(0,i.useId)(),$=L?null:o(_,F,"hover:bg-surface"),K=E?null:o(B,V,"hover:bg-transparent hover:text-text-3"),H=(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"icon","aria-label":"More","aria-disabled":null==K?void 0:K["aria-disabled"],"aria-describedby":null==K?void 0:K["aria-describedby"],title:null==K?void 0:K.title,className:(0,s.cn)("size-8.5 text-text-3",null==K?void 0:K.className),children:(0,a.jsx)(r.wy,{"aria-hidden":!0,focusable:!1})});return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:"border-b border-border px-5 pb-4 pt-5",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,a.jsx)("h2",{className:"font-display text-xl font-semibold text-text",children:t.name}),(0,a.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,a.jsx)("div",{className:"mt-1.5 text-ui leading-snug text-text-2",children:t.description}),(0,a.jsx)("div",{className:"mt-2 font-mono text-xs text-text-3",children:t.id})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-ui font-semibold "+(t.enabled?"text-ok-ink":"text-text-3"),children:t.enabled?"Enabled":"Disabled"}),h&&(0,a.jsx)(s.dO,{checked:t.enabled,...M?{}:{onCheckedChange:h},"aria-disabled":M||void 0,"aria-describedby":M?O:void 0,title:M?x.q2:void 0,className:M?"cursor-not-allowed opacity-50":void 0,"aria-label":t.enabled?"Disable detection":"Enable detection"})]}),E?(0,a.jsxs)(s.rI,{modal:!1,children:[(0,a.jsx)(s.ty,{asChild:!0,children:H}),(0,a.jsxs)(s.SQ,{align:"end",children:[T&&(0,a.jsx)(s._2,{onSelect:()=>{P()},children:"Edit rules"}),T&&D&&(0,a.jsx)(s.mB,{}),D&&(0,a.jsx)(s._2,{tone:"danger",onSelect:()=>{Y()},children:"Delete detection"})]})]}):H]})]}),M&&(0,a.jsx)("p",{id:O,className:"mt-2 text-xs text-text-3","data-slot":"enabled-locked-reason",children:x.q2}),b&&(0,a.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink","data-slot":"enabled-write-error",children:b}),K&&(0,a.jsx)(c,{id:B,dataSlot:"more-actions-reason",className:"mt-2",children:V})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-5",children:[(0,a.jsx)(m.t,{d:t,onOpenUpdate:k,onRecheck:y,unknownHint:N}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-baseline gap-2",children:[(0,a.jsx)(l.e,{children:"Enforcement policy"}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:"applied to every matching request"})]}),(0,a.jsx)(u.PolicyPicker,{value:C,onChange:g,unavailable:z}),v&&(0,a.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink","data-slot":"policy-write-error",children:v}),(0,a.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,a.jsx)(S,{"aria-hidden":!0,focusable:!1,className:"mt-px size-4 shrink-0",style:{color:(0,s.vV)(I.tone)[0]}}),(0,a.jsx)("div",{className:"text-xs leading-snug text-text-2",children:I.desc})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2.5",children:[(0,a.jsx)(l.e,{children:"Rules"}),(0,a.jsx)("span",{className:"rounded-full bg-surface-3 px-2 py-px text-xs font-semibold text-text-2",children:t.rules.length}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)(s.$n,{variant:"outline",tone:"neutral",size:"sm",onClick:L?()=>{w()}:void 0,"aria-disabled":null==$?void 0:$["aria-disabled"],"aria-describedby":null==$?void 0:$["aria-describedby"],title:null==$?void 0:$.title,className:null==$?void 0:$.className,"data-slot":"add-rule",children:[(0,a.jsx)(r.c1,{"aria-hidden":!0,focusable:!1}),"Add rule"]})]}),$&&(0,a.jsx)(c,{id:_,dataSlot:"add-rule-reason",className:"mb-3",children:F}),(0,a.jsx)("div",{className:"flex flex-col gap-2.5",children:t.rules.map(e=>(0,a.jsx)(p,{rule:e,onOpen:()=>{n(e.id)}},e.id))})]})]})]})}},1863:(e,t,n)=>{n.d(t,{K:()=>i,g:()=>r});let a=new Intl.RelativeTimeFormat("en",{numeric:"auto"}),s=[["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 s)if(l>=t)return a.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 a=Math.abs((n-t)/1e3);if(a<45)return"now";for(let[e,t]of s){var i;if(a>=t)return"".concat(String(Math.floor(a/t))).concat(null!=(i=l[e])?i:"")}return"now"}},1897:(e,t,n)=>{n.d(t,{SessionListView:()=>h});var a=n(7643),s=n(7228),i=n(1863),l=n(8848),r=n(3969),o=n(9158),c=n(6098),d=n(896),x=n(223),u=n(6570);function m(e){let{session:t,selected:n,onSelect:o,renderedAt:c}=e,u=t.findings>0;return(0,a.jsxs)("button",{type:"button",onClick:o,"aria-current":n?"true":void 0,className:(0,s.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,a.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,a.jsx)(r.K,{id:t.harness,size:26}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("div",{className:"truncate text-ui font-semibold text-text",title:t.title,children:t.title})}),(0,a.jsx)(d.md,{status:t.status})]}),(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 font-mono text-label text-text-3",children:[(0,a.jsx)(l.SY,{"aria-hidden":!0,focusable:!1,className:"size-3 shrink-0"}),(0,a.jsx)("span",{className:"min-w-0 max-w-[50%] truncate",title:t.project,children:t.project}),(0,a.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),(0,a.jsx)(l.OK,{"aria-hidden":!0,focusable:!1,className:"size-3 shrink-0"}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",title:t.branches[0],children:t.branches[0]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,a.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,a.jsx)(d.JW,{icon:l.O4,children:(0,x.vV)(t.startedAt,t.endedAt,t.status,c)}),(0,a.jsxs)(d.JW,{icon:l.kp,children:[t.turns," turns"]}),u&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs font-semibold text-sev-critical-ink",children:[(0,a.jsx)(l.Zu,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t.findings]})]})]})}function p(){return(0,a.jsxs)("div",{className:"rounded-lg px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,a.jsx)(s.EA,{className:"size-6.5 shrink-0 rounded-lg"}),(0,a.jsx)(s.EA,{className:"h-4 flex-1"})]}),(0,a.jsx)(s.EA,{className:"mb-2 h-3 w-2/3"}),(0,a.jsx)(s.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)),P=""!==l.trim()||d.length>0,Y=1===b?"background session":"background sessions",C=b>0&&y?(0,a.jsx)("div",{className:"px-2 py-2 text-center",children:(0,a.jsx)(s.$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,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:"shrink-0 border-b border-border p-3",children:[(0,a.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,a.jsx)(u.HarnessSelect,{value:d,onChange:g,...h?{options:h}:{}})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-2","aria-busy":f,children:j?(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)(c.r,{message:j})}):f&&0===t.length?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(p,{}),(0,a.jsx)(p,{}),(0,a.jsx)(p,{})]}):0===w.length?(0,a.jsxs)("div",{className:"py-10 text-center text-sm text-text-3",children:[P?"No sessions match":b>0?"No active sessions in this range":"No sessions recorded yet",C]}):(0,a.jsxs)(a.Fragment,{children:[w.map(e=>(0,a.jsxs)("div",{className:"mb-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 pb-1.5 pt-2",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:e.day}),(0,a.jsx)("span",{className:"h-px flex-1 bg-hairline"}),(0,a.jsx)("span",{className:"text-label text-text-3",children:e.items.length})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:e.items.map(e=>(0,a.jsx)(m,{session:e,renderedAt:N,selected:e.id===n,onSelect:()=>{i(e.id)}},e.id))})]},e.day)),C,v&&(0,a.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."]})]})})]})}},2007:(e,t,n)=>{n.d(t,{AvailablePluginsCardView:()=>l});var a=n(7643),s=n(7228),i=n(8848);function l(e){let{plugins:t,onInstall:n,installingId:l,outcomes:r}=e;return 0===t.length?null:(0,a.jsxs)(s.Zp,{className:"shadow-sm",children:[(0,a.jsxs)(s.aR,{children:[(0,a.jsx)(s.AG,{tone:"teal",children:(0,a.jsx)(i.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(s.Lc,{children:[(0,a.jsx)(s.ZB,{children:"Available plugins"}),(0,a.jsx)(s.BT,{children:"Agent integrations you haven’t installed yet"})]})]}),(0,a.jsx)(s.Wu,{children:(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let i=r[e.id];return(0,a.jsxs)("div",{className:(0,s.cn)("py-3",t>0&&"border-t border-hairline"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-text",children:e.name}),e.latest&&(0,a.jsxs)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:["v",e.latest]})]}),(0,a.jsx)(s.$n,{variant:"solid",tone:"primary",size:"sm",disabled:null!==l,onClick:()=>{n(e.id)},children:l===e.id?"Installing…":"Install"})]}),i&&(0,a.jsxs)("div",{className:(0,s.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,a.jsx)("div",{className:"text-xs font-semibold text-text",children:i.ok?"Installed — restart Claude Code to load it.":"Install failed"}),i.output&&(0,a.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)})})})]})}},2060:(e,t,n)=>{n.d(t,{InventoryNav:()=>u});var a=n(7643),s=n(7228),i=n(1579),l=n(3969),r=n(9158),o=n(4360),c=n(7199),d=n(7367);let x=[{type:"all",label:"All"},...c.fd.map(e=>({type:e.type,label:"Configuration"===e.label?"Config":e.label.replace(" servers","")}))];function u(e){let{projects:t,assetGroups:n,harnesses:l,viewMode:o,onViewMode:c,typeFilter:u,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,a.jsxs)(s.Zp,{className:"flex w-85 shrink-0 flex-col overflow-hidden shadow-sm",children:[(0,a.jsxs)("div",{className:"border-b border-border px-4 pb-3 pt-4",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-display text-base font-semibold",children:"All assets"}),void 0===j?(0,a.jsx)("span",{className:"ml-auto text-xs text-text-3",children:"…"}):(0,a.jsxs)("span",{className:(0,s.cn)("ml-auto inline-flex items-center gap-1.5 text-xs font-semibold",j?"text-sev-high-ink":"text-ok-ink"),children:[(0,a.jsx)(d.m,{name:j?"flag":"check-circle",className:"size-3.5"}),j?"".concat(String(j)," to review"):"All clear"]})]}),(0,a.jsx)(r.SearchField,{value:g,onValueChange:f,label:"Search assets",placeholder:"Search assets…",clearLabel:"Clear asset search",surface:"card",className:"h-8.5"}),(0,a.jsxs)(s.Iz,{className:"mt-3 flex w-full",value:o,onValueChange:e=>{e&&c(e)},children:[(0,a.jsxs)(s.tR,{value:"tree",children:[(0,a.jsx)(d.m,{name:"layers"})," By harness"]}),(0,a.jsxs)(s.tR,{value:"type",children:[(0,a.jsx)(d.m,{name:"list"})," By type"]})]}),"type"===o&&(0,a.jsx)(s.Iz,{className:"mt-2.5 flex w-full flex-wrap border-0 bg-transparent p-0 gap-1.5",value:u,onValueChange:e=>{e&&p(e)},children:x.map(e=>(0,a.jsx)(s.tR,{value:e.type,className:(0,s.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,a.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,a.jsx)("div",{className:"px-3 py-6 text-center text-xs text-text-3",children:"Loading inventory…"}):"tree"===o?(0,a.jsx)(m,{...e}):(0,a.jsx)(h,{...e,projList:k,assetsByType:b})})]})}function m(e){let{harnesses:t,query:n}=e,s=n.toLowerCase(),i=e=>!s||e.toLowerCase().includes(s),l=s?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,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{iconName:"terminal",label:"Harnesses",count:l.length}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:l.length>0?l.map(t=>(0,a.jsx)(p,{h:t,...e},t.id)):(0,a.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:u,onSelectHarness:m,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,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:(0,s.cn)("flex items-center rounded-lg",k?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,a.jsx)("button",{type:"button","aria-label":b?"Collapse":"Expand","aria-expanded":b,onClick:()=>{u(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,a.jsx)(d.m,{name:"chevron-right",className:(0,s.cn)("size-3.5 transition-transform",b&&"rotate-90")})}),(0,a.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2.5 p-2.5 text-left cursor-pointer",onClick:()=>{m(r.id),b||u(r.id,!0)},children:[(0,a.jsx)(l.K,{id:r.id,size:28}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate text-sm font-semibold text-text",title:r.label,children:r.label}),(0,a.jsxs)("div",{className:"mt-px text-xs text-text-3",children:[r.kind," \xb7 ",r.assetCount," assets"]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[y>0&&(0,a.jsx)("span",{className:"size-2 rounded-full bg-sev-critical"}),0===r.flagCount?(0,a.jsx)(d.m,{name:"check-circle",className:"size-3.5 text-ok-ink"}):(0,a.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,a.jsxs)("div",{className:"my-0.5 ml-4 border-l border-border pl-2.5",children:[j.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2 pb-1 pt-2",children:[(0,a.jsx)(d.m,{name:c.WD.icon,className:"size-3 text-text-3"}),(0,a.jsx)("span",{className:"text-label font-bold uppercase tracking-wider text-text-3",children:c.WD.label}),(0,a.jsx)("span",{className:"text-label font-semibold text-text-3",children:j.length})]}),j.map(t=>(0,a.jsx)(g,{p:t,fromHarness:r.id,...e},t.id))]}),v.map(e=>{let t=c.pA[e.type];return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2 pb-1 pt-2",children:[(0,a.jsx)(d.m,{name:t.icon,className:"size-3 text-text-3"}),(0,a.jsx)("span",{className:"text-label font-bold uppercase tracking-wider text-text-3",children:t.label}),(0,a.jsx)("span",{className:"text-label font-semibold text-text-3",children:e.assets.length})]}),e.assets.map(e=>(0,a.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:s,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=s.length;return 0===i&&"all"===t?null:(i>0&&d++,(0,a.jsxs)("div",{children:[(0,a.jsx)(j,{group:n,items:s.map(e=>({flags:e.findingsCount>0?["findings"]:[]}))}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:0===i?(0,a.jsx)(o.EmptyState,{message:"No ".concat(n.label.toLowerCase())}):s.map(t=>(0,a.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,a.jsxs)("div",{children:[(0,a.jsx)(j,{group:n,items:c,mcpItems:"mcp"===n.type?c:void 0}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:0===c.length?(0,a.jsx)(o.EmptyState,{message:"No ".concat(n.label.toLowerCase())}):c.map(t=>(0,a.jsx)(f,{it:t,sel:e.sel,onSelectAsset:e.onSelectAsset},t.id))})]},n.type))});return"all"===t&&0===d?(0,a.jsx)(o.EmptyState,{icon:"search",message:n?"No assets match “".concat(n,"”"):"No assets"}):(0,a.jsx)(a.Fragment,{children:x})}function g(e){let{p:t,fromHarness:n,selFromHarness:i,sel:l,onSelectProject:r}=e,x=t.accessCounts,u=t.findingsCount,m=(null==l?void 0:l.type)==="project"&&l.id===t.id&&(null==n||null==i||n===i);return(0,a.jsxs)("button",{type:"button",onClick:()=>{r(t.id,n)},className:(0,s.cn)("flex w-full flex-col rounded-lg p-2.5 text-left cursor-pointer",m?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,a.jsxs)("div",{className:"mb-1.5 flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"size-2 shrink-0 rounded-full",style:{background:(0,c.Cs)(t.language)}}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:t.name,children:t.name}),(0,a.jsx)("span",{className:"ml-auto shrink-0",children:(0,a.jsx)(o.yk,{v:t.visibility})})]}),(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 font-mono text-xs text-text-3",children:[(0,a.jsx)(d.m,{name:"repo",className:"size-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",title:t.repo,children:t.repo})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(o.AJ,{counts:x}),x.blocked>0?(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[x.blocked," blocked"]}):(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[x.total," files"]}),u>0&&(0,a.jsx)("span",{className:"ml-auto shrink-0",children:(0,a.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,u=(0,c.TW)(t.type),m="mcp"===t.type?t.trust:void 0;return(0,a.jsxs)("button",{type:"button",onClick:()=>{r(t,i)},className:(0,s.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,a.jsx)("span",{className:(0,s.cn)("grid size-7.5 shrink-0 place-items-center rounded-md",u.bg,u.fg),children:(0,a.jsx)(d.m,{name:u.icon,className:"size-3.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-mono text-xs font-semibold text-text",title:t.name,children:t.name}),(0,a.jsx)("div",{className:"mt-0.5 truncate font-mono text-label text-text-3",title:t.sub,children:t.sub})]}),(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[m&&(0,a.jsx)(o.As,{value:m}),t.flags.length>0&&(0,a.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,a.jsxs)("div",{className:"flex items-center gap-2 px-2.5 pb-1.5 pt-3",children:[(0,a.jsx)("span",{className:(0,s.cn)("grid size-5 shrink-0 place-items-center rounded",t.bg,t.fg),children:(0,a.jsx)(d.m,{name:t.icon,className:"size-3"})}),(0,a.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-2",children:t.label}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:n.length}),(0,a.jsxs)("span",{className:"ml-auto inline-flex flex-wrap items-center justify-end gap-1.5",children:[r.map(e=>(0,a.jsxs)(s.Ex,{variant:c.ZY[e.k].tone,children:[e.n," ",c.ZY[e.k].label.toLowerCase()]},e.k)),l.map(e=>(0,a.jsxs)(s.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:s}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2.5 pb-1.5 pt-3",children:[(0,a.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded bg-surface-2 text-text-2",children:(0,a.jsx)(d.m,{name:t,className:"size-3"})}),(0,a.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-2",children:n}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:s})]})}},2229:(e,t,n)=>{n.d(t,{Jy:()=>l,QT:()=>i,hn:()=>s,sp:()=>a.spO,sr:()=>r});var a=n(7971);let s=[{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=s.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"}},2276:(e,t,n)=>{n.d(t,{FindingLevelFilters:()=>u,FindingsToolbarView:()=>m});var a=n(7643),s=n(7228),i=n(8848),l=n(3969),r=n(9158),o=n(3967);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 a=new Set(e.map(e=>e.value));return[...e,...t.filter(e=>!a.has(e)).map(e=>({value:e,label:n(e),count:0}))]}function u(e){var t;let{facets:n,filters:s,onFiltersChange:i,showDeployment:l=!1}=e,r=x(n.provider.map(e=>({value:e.value,label:d(e.value),count:e.count})),s.provider,d),u=x(n.action.map(e=>({value:e.value,label:c(e.value),count:e.count})),s.action,c),m=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=m.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({...s,[e]:t})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{label:"Provider",options:r,selected:s.provider,onChange:e=>{j("provider",e)}}),(0,a.jsx)(p,{label:"Action",options:u,selected:s.action,onChange:e=>{j("action",e)}}),(0,a.jsx)(p,{label:"Status",options:h,selected:s.status,onChange:e=>{j("status",e)}}),l&&(0,a.jsx)(p,{label:"Deployment",options:f,selected:s.deployment,onChange:e=>{j("deployment",e)}})]})}function m(e){let{facets:t,filters:n,onFiltersChange:s,query:i,onQueryChange:l,showDeployment:d=!1}=e,m=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=m.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)=>{s({...n,[e]:t})};return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.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,a.jsx)(p,{label:"Severity",options:h,selected:n.severity,onChange:e=>{f("severity",e)}}),(0,a.jsx)(p,{label:"Type",options:g,selected:n.type,onChange:e=>{f("type",e)}}),(0,a.jsx)(u,{facets:t,filters:n,onFiltersChange:s,showDeployment:d})]})}function p(e){let{label:t,options:n,selected:l,onChange:r}=e,o=l.length>0;return(0,a.jsxs)(s.AM,{children:[(0,a.jsxs)(s.Wv,{className:(0,s.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,a.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,a.jsx)(i.D3,{className:"size-3.5"})]}),(0,a.jsxs)(s.hl,{className:"min-w-52 max-h-80",children:[n.map(e=>{let t=l.includes(e.value);return(0,a.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,a.jsx)("span",{className:(0,s.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,a.jsx)(i.Sr,{className:"size-3"})}),(0,a.jsx)("span",{className:"flex-1",children:e.label}),void 0!==e.count&&(0,a.jsx)("span",{className:"text-xs tabular-nums text-text-3",children:e.count})]},e.value)}),o&&(0,a.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"})]})]})}},2287:(e,t,n)=>{n.d(t,{ApproveExceptionDialog:()=>r});var a=n(7643),s=n(7228),i=n(1579),l=n(6597);function r(e){let{entry:t,open:n,onOpenChange:r,onSubmit:o,busy:c,error:d}=e,[x,u]=(0,i.useState)(null),[m,p]=(0,i.useState)(""),[h,g]=(0,i.useState)(""),f="permanent"===x,j=null!==t&&null!==x&&""!==m.trim()&&(!f||h===t.maskedValue);return(0,a.jsx)(s.lG,{open:n,onOpenChange:e=>{e||(u(null),p(""),g("")),r(e)},children:(0,a.jsxs)(s.Cf,{children:[(0,a.jsxs)(s.c7,{children:[(0,a.jsx)(s.L3,{children:"Approve blocked detection"}),(0,a.jsx)(s.rr,{children:"Grant an explicit, audited bypass for this exact value. Enforcement continues for every other value."})]}),(0,a.jsx)(s.R4,{children:t&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 p-3 text-xs",children:[(0,a.jsx)("div",{className:"font-mono font-semibold text-text",children:t.ruleId}),(0,a.jsx)("div",{className:"mt-1 font-mono text-text-2",children:t.maskedValue})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Scope — pick one"}),(0,a.jsx)(l.ScopePicker,{value:x,onChange:u})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:"Reason (required — the audit trail)"}),(0,a.jsx)(s.pd,{value:m,onChange:e=>{p(e.target.value)},placeholder:"Why this value may pass"})]}),f&&(0,a.jsxs)("div",{children:[(0,a.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,a.jsx)(s.pd,{value:h,onChange:e=>{g(e.target.value)},placeholder:t.maskedValue,autoComplete:"off",className:"font-mono"})]}),d&&(0,a.jsx)("p",{className:"text-xs text-sev-critical-ink",children:d})]})}),(0,a.jsxs)(s.Es,{children:[(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{r(!1)},children:"Cancel"}),(0,a.jsx)(s.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!j||c,onClick:()=>{t&&x&&o({reference:t.reference,scope:x,reason:m.trim(),...f?{confirmation:h}:{}})},children:c?"Granting…":"Grant exception"})]})]})})}},2383:(e,t,n)=>{n.d(t,{i:()=>i});var a=n(7643),s=n(3969);function i(e){let{provider:t}=e;return(0,a.jsxs)("span",{className:"inline-flex items-center gap-2 font-display text-xs text-text",children:[(0,a.jsx)(s.K,{id:t}),s.x[t].label]})}},2494:(e,t,n)=>{n.d(t,{H1:()=>o,N2:()=>r,Pt:()=>l,VA:()=>d,q2:()=>c,xf:()=>i});var a=n(7971),s=n(9886);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,s.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?a.V0H:a.V0H.filter(t=>!(0,a.T2I)((0,a.fhc)(t),(0,a.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:s.tG;if(!t)return n;let i=a.HUb.safeParse(n);return i.success&&(0,a.T2I)((0,a.fhc)(i.data),(0,a.fhc)(t.floor))?n:t.floor}function o(e,t){return!!t&&(t.locked||r(e,t)!==(null!=e?e:s.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}},2593:(e,t,n)=>{n.d(t,{UpdateStatusCardView:()=>l});var a=n(7643),s=n(7228),i=n(8848);function l(e){let{statuses:t,checkedAt:n,onCheckNow:l,onApply:r,applyingId:o,outcomes:c,restartRequired:d,busy:x}=e;return(0,a.jsxs)(s.Zp,{className:"shadow-sm",children:[(0,a.jsxs)(s.aR,{children:[(0,a.jsx)(s.AG,{tone:"primary",children:(0,a.jsx)(i.fN,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(s.Lc,{children:[(0,a.jsx)(s.ZB,{children:"Installed components"}),(0,a.jsx)(s.BT,{children:n?"Last checked ".concat(n):"Not checked yet"})]}),(0,a.jsx)(s.$n,{variant:"outline",tone:"neutral",size:"sm",disabled:x,onClick:l,children:x?"Checking…":"Check now"})]}),(0,a.jsxs)(s.Wu,{children:[d&&(0,a.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,a.jsx)("code",{className:"font-mono",children:"aka dashboard"})," to load the new version."]}),(0,a.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){if(void 0!==t.range){let e=null!==t.npmLatest?" npm has v".concat(t.npmLatest,"."):"";return"".concat(t.marketplace," pins ").concat(t.range,", which the host resolves within — not a single version this page can compare.").concat(e)}if(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,a.jsxs)("div",{className:(0,s.cn)("py-3",t>0&&"border-t border-hairline"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-text",children:e.name}),(0,a.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,a.jsx)("div",{className:"mt-1 text-xs text-text-3","data-slot":"marketplace-pin-note",children:l})]}),null===e.installed||null===e.latest?(0,a.jsx)(s.Ex,{variant:"default",children:"unknown"}):e.updateAvailable?(0,a.jsx)(s.Ex,{variant:"high",children:"update available"}):(0,a.jsx)(s.Ex,{variant:"success",children:"up to date"}),e.updateAvailable&&(0,a.jsx)(s.$n,{variant:"solid",tone:"primary",size:"sm",disabled:null!==o,onClick:()=>{r(e.id)},children:o===e.id?"Updating…":"Update"})]}),i&&(0,a.jsxs)("div",{className:(0,s.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,a.jsx)("div",{className:"text-xs font-semibold text-text",children:i.ok?"Updated.":"Update failed"}),i.output&&(0,a.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,a.jsx)("div",{className:"py-6 text-center text-xs text-text-3",children:"Nothing installed to report on yet."})]})]})]})}},2614:(e,t,n)=>{n.d(t,{dtc:()=>R.AddExceptionForm,rX:()=>v.rX,fu:()=>L.ApproveExceptionDialog,i5F:()=>Y.AssetDetail,JRA:()=>H.AvailablePluginsCardView,VBV:()=>D.BlockedLedgerView,VNw:()=>j.VN,spO:()=>s.sp,MXo:()=>Z.DataShareDetailView,e3r:()=>q.DataSharesKindTabsView,Imc:()=>J.DataSharesTableView,tlv:()=>B.DerefAuditTableView,MFC:()=>b.DetectionDetailView,A7Z:()=>k.DetectionsListView,ppr:()=>C.EmptyState,Gj:()=>E.ExceptionDetailView,Ebj:()=>F.ExceptionsTableView,_GS:()=>v._G,gsr:()=>j.gs,qWw:()=>j.qW,ToP:()=>I.FileDetailDrawer,Wjr:()=>m.FindingDetailView,tFx:()=>g.FindingLevelFilters,$Gd:()=>p.FindingLocationsListView,S$9:()=>f.FindingTypesListView,FGz:()=>h.FindingsFlatTableView,Dmd:()=>g.FindingsToolbarView,y2Z:()=>S.HarnessOverview,mD3:()=>A.m,_c:()=>z.InventoryNav,mLz:()=>v.mL,XAi:()=>v.XA,wO1:()=>N.MatcherModal,b6_:()=>Q.NeedsReviewListView,t6e:()=>ee.NeedsReviewStripView,ece:()=>r,LKE:()=>P.PolicyDetailView,m$d:()=>P.PolicyListView,kLH:()=>M.ProjectPane,sJz:()=>O.RecommendedActionsCardView,nZB:()=>_.RotateKeyDialog,Tvj:()=>T.ScopePicker,YJs:()=>o.Y,Lwf:()=>c.SearchField,WIv:()=>v.WI,LOI:()=>x.SessionDetailView,md2:()=>u.SessionListView,Zus:()=>v.Zu,Zmc:()=>U.SyncPanelView,hny:()=>s.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,nUl:()=>X.nU,XgB:()=>y.Xg,QTF:()=>s.QT,a5B:()=>i.useRenderClock});var a=n(7881);n(1863);var s=n(2229),i=n(1433);n(8189);var l=n(7643);function r(e){let{title:t,sub:n,actions:a}=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})]}),a&&(0,l.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}n(3969);var o=n(3883),c=n(9158);n(1015);var d=n(3704);n(6098),n(1166),n(6566),n(896),n(7545),n(223),n(6570),n(5233);var x=n(3454),u=n(1897);n(545);var m=n(4818),p=n(8279),h=n(6241),g=n(2276),f=n(7532),j=n(3967);n(2383),n(8396);var v=n(8848);n(7052);var b=n(1857),k=n(980),y=n(9886);n(2494),n(2971),n(9889);var N=n(7692),w=n(9999),P=n(1108),Y=n(5650),C=n(4360);n(7199);var I=n(6293),S=n(8084),A=n(7367),z=n(2060),M=n(3440);n(1397),n(7228),a.l.sevCritical,a.l.sevHigh,a.l.sevMedium,a.l.sevLow,v.pD,a.l.sevCritical,v.jZ,a.l.primary,v.rX,a.l.sevHigh,n(5061),n(9580),n(6673),n(7971);var O=n(1710),R=n(887),L=n(2287),T=n(6597),D=n(5331);n(6595);var E=n(7036),F=n(5218),V=n(8540),_=n(3121);n(1067);var B=n(4889),$=n(3988),K=n(1272),H=n(2007),W=n(2593),U=n(5440),G=n(8111);n(826);var Z=n(4381),q=n(3145),J=n(6323),X=n(7991);n(4267);var Q=n(6488),ee=n(9896);n(6669),n(5173)},2971:(e,t,n)=>{n.d(t,{PolicyPicker:()=>r});var a=n(7643),s=n(7228),i=n(1579),l=n(9886);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)(),u=e=>"".concat(x,"-unavailable-").concat(String(d.indexOf(e)));return(0,a.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,a.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,s.vV)(i.tone),m="neutral"===i.tone?"var(--color-surface)":x,p=i.icon,h=c(e);return(0,a.jsxs)("button",{type:"button",disabled:o,"aria-disabled":o||void 0!==h||void 0,"aria-describedby":void 0===h?void 0:u(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:m}:void 0,children:[(0,a.jsx)(p,{"aria-hidden":!0,focusable:!1,className:"size-4"}),i.label]},e)})}),d.map(e=>(0,a.jsx)("p",{id:u(e),className:"text-xs text-text-3","data-slot":"policy-unavailable-reason",children:e},e))]})}},3121:(e,t,n)=>{n.d(t,{ROTATE_CONFIRMATION:()=>r,RotateKeyDialog:()=>o});var a=n(7643),s=n(7228),i=n(1579),l=n(8540);let r="rotate";function o(e){let{open:t,onOpenChange:n,activePermanent:o,approvableBlocked:c,keyVersion:d,onConfirm:x,busy:u,error:m}=e,[p,h]=(0,i.useState)(""),g=(0,l.y6)(c);return(0,a.jsx)(s.lG,{open:t,onOpenChange:e=>{e||h(""),n(e)},children:(0,a.jsxs)(s.Cf,{children:[(0,a.jsxs)(s.c7,{children:[(0,a.jsx)(s.L3,{children:"Rotate the fingerprint key"}),(0,a.jsxs)(s.rr,{children:["Rotation mints a fresh key",null!==d&&" (v".concat(String(d)," → v").concat(String(d+1),")")," and"," ",(0,a.jsx)("strong",{children:"invalidates every existing exception"})," — grants cannot be re-keyed and simply stop matching. They remain listed for audit."]})]}),(0,a.jsxs)(s.R4,{children:[o.length>0&&(0,a.jsxs)("div",{className:"rounded-lg border border-sev-high-fill bg-sev-high-fill p-3",children:[(0,a.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,a.jsx)("ul",{className:"flex flex-col gap-1",children:o.map(e=>(0,a.jsxs)("li",{className:"font-mono text-xs text-text-2",children:[e.ruleId," \xb7 ",e.maskedValue]},e.id))})]}),c>0?(0,a.jsxs)("div",{className:"rounded-lg border border-sev-high-fill bg-sev-high-fill p-3",children:[(0,a.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,a.jsx)("p",{className:"text-xs text-text-2",children:g})]}):(0,a.jsx)("p",{className:"text-xs text-text-3",children:g}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1.5 text-label font-semibold uppercase tracking-wider text-text-3",children:["Type"," ",(0,a.jsxs)("span",{className:"font-mono normal-case tracking-normal",children:["“",r,"”"]})," ","to confirm"]}),(0,a.jsx)(s.pd,{value:p,onChange:e=>{h(e.target.value)},autoComplete:"off",className:"font-mono"})]}),m&&(0,a.jsx)("p",{className:"text-xs text-sev-critical-ink",children:m})]}),(0,a.jsxs)(s.Es,{children:[(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{n(!1)},children:"Cancel"}),(0,a.jsx)(s.$n,{variant:"solid",tone:"danger",size:"sm",disabled:p!==r||u,onClick:()=>{x(p)},children:u?"Rotating…":"Rotate key"})]})]})})}},3145:(e,t,n)=>{n.d(t,{DataSharesKindTabsView:()=>o});var a=n(7643),s=n(7228),i=n(8848),l=n(4267);function r(e){let{group:t}=e,n="ip"===t.kind||"external"===t.kind;return(0,a.jsxs)(a.Fragment,{children:[l.CF[t.kind],(0,a.jsx)(s.Ex,{variant:"outline",className:"px-1.5 text-label",children:t.total}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"ip"===t.kind?"text-sev-critical-ink":"text-sev-high-ink"}),(0,a.jsx)("span",{className:"sr-only",children:"review recommended"})]})]})}function o(e){let{groups:t}=e;return(0,a.jsx)(s.j7,{className:"shrink-0",children:t.map(e=>(0,a.jsx)(s.Xi,{value:e.kind,children:(0,a.jsx)(r,{group:e})},e.kind))})}},3440:(e,t,n)=>{n.d(t,{ProjectPane:()=>x});var a=n(7643),s=n(7228),i=n(1579),l=n(9158),r=n(4360),o=n(7199),c=n(7367);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:[],P=i.accessCounts;return(0,a.jsxs)(s.Zp,{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[(0,a.jsxs)("div",{className:"border-b border-border px-5 py-3.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)(m,{proj:i,path:l,onPathChange:d})}),(0,a.jsx)(u,{...e}),k&&(0,a.jsx)(s.$n,{variant:"ghost",size:"icon","aria-label":"Back to harness",title:"Back to harness",onClick:k,children:(0,a.jsx)(c.m,{name:"x"})})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-start gap-2.5",children:[(0,a.jsx)(r.yk,{v:i.visibility}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 gap-2.5 flex-wrap justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-3",children:(0,o._t)(i,"source")}),(0,a.jsx)("span",{className:"flex items-center gap-3 text-xs text-text-3",children:o.IF.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:(0,s.cn)("size-2 rounded-sm",o.Pe[e].bar)}),P[e]," ",o.Pe[e].label]},e))})]})]})]}),!y&&e.blocked.length>0&&(0,a.jsx)(j,{...e}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pb-4 pt-2",children:v&&!h?(0,a.jsx)("div",{className:"py-12 text-center text-sm text-text-3",children:"Loading files…"}):b?(0,a.jsx)("div",{className:"py-12 text-center text-sm text-sev-critical-ink",children:b}):y?w.length>0?(0,a.jsx)(f,{caption:"".concat(String(w.length)," result").concat(1===w.length?"":"s"),rows:w,showPath:!0,...e}):(0,a.jsxs)("div",{className:"py-12 text-center text-text-3",children:[(0,a.jsx)(c.m,{name:"search",className:"mx-auto mb-2 size-6"}),(0,a.jsxs)("div",{className:"text-sm",children:["No files match “",x,"”"]})]}):0===N.length&&0===w.length?(0,a.jsx)("div",{className:"py-12 text-center text-sm text-text-3",children:"This folder is empty"}):(0,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:"Name"}),(0,a.jsx)(s.nd,{children:"Origin"}),(0,a.jsx)(s.nd,{children:"LLM access"}),(0,a.jsx)(s.nd,{className:"w-10"})]})}),(0,a.jsxs)(s.BF,{children:[N.map(e=>(0,a.jsx)(p,{folder:e,onOpen:()=>{d([...l,e.name])}},"d"+e.name)),w.map(t=>(0,a.jsx)(g,{file:t,...e},"f"+t.path))]})]})})]})}function u(e){let{proj:t,query:n,onQueryChange:s}=e;return(0,a.jsx)(l.SearchField,{value:n,onValueChange:s,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 m(e){let{proj:t,path:n,onPathChange:l}=e,r=[t.name,...n];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[n.length>0&&(0,a.jsx)(s.$n,{variant:"ghost",size:"icon",className:"size-7",title:"Up one level",onClick:()=>{l(n.slice(0,-1))},children:(0,a.jsx)(c.m,{name:"arrow-up"})}),r.map((e,t)=>{let o=t===r.length-1;return(0,a.jsxs)(i.Fragment,{children:[t>0&&(0,a.jsx)(c.m,{name:"chevron-right",className:"size-3 text-text-3"}),(0,a.jsx)("button",{type:"button",onClick:()=>{l(n.slice(0,t))},className:(0,s.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,a.jsxs)(s.Hj,{className:"cursor-pointer hover:bg-surface-2",onClick:n,children:[(0,a.jsx)(s.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(c.m,{name:"folder",className:"size-4.5 shrink-0 text-primary"}),(0,a.jsx)("span",{className:"text-ui font-semibold text-text",children:t.name}),(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[i.total," file",1===i.total?"":"s"]})]})}),(0,a.jsx)(s.nA,{className:"text-xs text-text-3",children:"Folder"}),(0,a.jsx)(s.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.AJ,{counts:i}),i.blocked>0?(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[i.blocked," blocked"]}):(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[i.total," allowed"]})]})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,a.jsx)(c.m,{name:"chevron-right",className:"size-4 text-text-3"})})})]})}function h(e){let{file:t,showPath:n}=e,s=d(t.path),i="blocked"===t.access;return(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,a.jsx)(c.m,{name:"file",className:"size-4.5 shrink-0 text-text-3"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[n&&s.length>0&&(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[s,"/"]}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:t.name})]}),t.blockedAt&&i&&(0,a.jsxs)("div",{className:"mt-px flex items-center gap-1.5 text-xs text-sev-critical-ink",children:[(0,a.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,a.jsxs)(s.Hj,{className:(0,s.cn)("cursor-pointer hover:bg-surface-2",l===t.path&&"bg-surface-2"),onClick:()=>{i(t.path)},children:[(0,a.jsx)(s.nA,{children:(0,a.jsx)(h,{file:t,showPath:o})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(r.TJ,{origin:t.origin})}),(0,a.jsx)(s.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.kx,{value:t.access,onChange:e=>{n(t.path,e)}}),(0,a.jsx)(r.Vx,{value:t.access})]})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,a.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,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:t}),(0,a.jsx)(s.nd,{children:"Origin"}),(0,a.jsx)(s.nd,{children:"LLM access"}),(0,a.jsx)(s.nd,{className:"w-10"})]})}),(0,a.jsx)(s.BF,{children:n.map(e=>(0,a.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,a.jsxs)("div",{className:"border-b border-border bg-surface-2",children:[(0,a.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,a.jsx)("span",{className:"grid size-6 shrink-0 place-items-center rounded-md bg-sev-critical-fill text-sev-critical-ink",children:(0,a.jsx)(c.m,{name:"slash-circle",className:"size-3.5"})}),(0,a.jsx)("span",{className:"text-ui font-semibold",children:"Recently blocked"}),(0,a.jsx)("span",{className:"rounded-full bg-sev-critical-ink px-2 py-px text-xs font-bold text-on-accent",children:t.length}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:"Auto-blocked on detection — review to adjust"}),(0,a.jsx)(c.m,{name:"chevron-down",className:(0,s.cn)("ml-auto size-4.5 text-text-3 transition-transform",!n&&"-rotate-90")})]}),n&&(0,a.jsx)("div",{className:"flex flex-col gap-2 px-3.5 pb-3",children:t.map(e=>{let t=d(e.path);return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-1.5 overflow-hidden whitespace-nowrap",children:[t.length>0&&(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[t,"/"]}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.name})]}),(0,a.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,a.jsx)(r.kx,{value:e.access,onChange:t=>{l(e.path,t)}}),(0,a.jsx)(r.Vx,{value:e.access}),(0,a.jsx)(s.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:()=>{x(e.path)},children:"Review"})]},e.path)})})]})}},3454:(e,t,n)=>{n.d(t,{SessionDetailView:()=>g});var a=n(7643),s=n(7228),i=n(1579),l=n(1166),r=n(8848),o=n(3969),c=n(6098),d=n(896),x=n(7545),u=n(223),m=n(5233);function p(e){let{text:t,mono:n=!1}=e;return(0,a.jsx)("span",{className:(0,s.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,m.Tp)(n.tools),[w,P]=(0,i.useState)(!1);return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:(0,s.cn)("shrink-0 border-b border-border px-5 py-4",b&&"pr-14"),children:[(0,a.jsxs)("div",{className:"flex items-start gap-3.5",children:[(0,a.jsx)(o.K,{id:n.harness,size:40}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"min-w-0 truncate font-display text-lg font-semibold text-text",title:n.title,children:n.title}),(0,a.jsx)(d.UD,{status:n.status})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-ui text-text-3",children:[(0,a.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:[y.label," \xb7 ",m.Ay[n.harness]]}),(0,a.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),(0,a.jsx)("span",{className:"min-w-0 truncate font-mono",title:n.id,children:n.id})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 gap-1",children:[v&&(0,a.jsx)(s.$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,a.jsx)(r.mS,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsx)(s.$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),a=document.createElement("a");a.href=n,a.download="session-".concat(e.id.slice(0,12),".json"),document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(n)}(n)},children:(0,a.jsx)(r.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"})})]})]}),(0,a.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,a.jsx)(l.p,{label:"Working dir",children:(0,a.jsx)(p,{text:n.cwd,mono:!0})}),(0,a.jsx)(l.p,{label:"Branch",children:(0,a.jsx)(d.Lw,{items:n.branches,mono:!0,nowrap:!0})}),(0,a.jsx)(l.p,{label:"Model",children:(0,a.jsx)(d.Lw,{items:n.models,mono:!0,nowrap:!0})}),(0,a.jsx)(l.p,{label:"Started",children:(0,a.jsx)(p,{text:"".concat((0,u.rw)(n.startedAt)," \xb7 ").concat((0,u.nt)(n.startedAt,new Date(k)))})}),(0,a.jsx)(l.p,{label:"Duration",children:(0,a.jsx)(p,{text:(0,u.vV)(n.startedAt,n.endedAt,n.status,k)})}),(0,a.jsx)(l.p,{label:"Turns",children:n.turns}),(0,a.jsx)(l.p,{label:"Findings",children:n.findings>0||g?(0,a.jsxs)("span",{className:"flex items-center gap-x-1.5 overflow-hidden whitespace-nowrap",children:[n.findings>0&&(0,a.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,a.jsx)("span",{className:"shrink-0 text-text-3",children:"\xb7"}),g&&(0,a.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,a.jsx)(r.Qq,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]}):(0,a.jsx)("span",{className:"text-ok-ink",children:"None"})}),(0,a.jsx)(l.p,{label:"Egress",children:n.shares>0?"".concat(String(n.shares)," destinations"):"None"})]})]}),(0,a.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,a.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,a.jsx)(r.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),(0,a.jsx)("b",{className:"font-semibold tabular-nums",children:(0,u.Sk)(n.tokens.inputTokens)}),(0,a.jsx)("span",{className:"text-text-3",children:"in"})]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,a.jsx)(r.ZL,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),(0,a.jsx)("b",{className:"font-semibold tabular-nums",children:(0,u.Sk)(n.tokens.outputTokens)}),(0,a.jsx)("span",{className:"text-text-3",children:"out"})]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,a.jsx)(r.DQ,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-primary"}),(0,a.jsxs)("b",{className:"font-semibold tabular-nums text-primary",children:[(0,u.fz)(n.tokens),"%"]}),(0,a.jsx)("span",{className:"text-text-3",children:"cache"})]}),h&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-ui",children:[(0,a.jsx)("b",{className:"font-semibold tabular-nums text-text",children:(0,u.xd)(null!=(t=h.estimatedCostUsd)?t:0,h.costIsPartial)}),(0,a.jsx)("span",{className:"text-text-3",children:"est. cost"})]})]}),(0,a.jsx)("span",{className:"h-5 w-px bg-border"}),(0,a.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-2 max-h-22 overflow-y-auto",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-3",children:[(0,m.ni)(n.tools)," tool calls"]}),N.map(e=>(0,a.jsx)(d.zn,{name:e.name,n:e.n,...j?{href:j(e.name)}:{}},e.name))]})]}),h&&h.rollups.length>1&&(0,a.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,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Cost by model"}),h.rollups.map(e=>(0,a.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,a.jsx)("span",{className:"font-mono text-text",children:e.model}),(0,a.jsx)("span",{className:"tabular-nums text-text-3",children:(0,u.Sk)(e.totalTokens)}),(0,a.jsx)("span",{className:"tabular-nums text-text",children:null!==e.estimatedCostUsd?(0,u.UK)(e.estimatedCostUsd):"—"})]},"".concat(e.provider," ").concat(e.model)))]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4.5",children:[(0,a.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,a.jsx)("span",{className:"text-text-3",children:"\xb7"}),(0,a.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,a.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,a.jsx)(c.A,{message:"No events recorded for this session yet"}):(0,a.jsx)(x.i,{events:n.events,...f?{linkHref:f}:{}})]}),(0,a.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,a.jsx)(r.k3,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),(0,a.jsx)("span",{className:"font-mono",children:"Source: ~/.claude/audit.log"}),(0,a.jsxs)(s.$n,{variant:"link",tone:"primary",className:"ml-auto text-ui",onClick:()=>{P(e=>!e)},children:[(0,a.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:u,renderedAt:m}=e;return i?(0,a.jsx)("div",{className:"grid h-full place-items-center p-6",children:(0,a.jsx)(c.r,{message:i})}):n&&!t?(0,a.jsxs)("div",{className:"flex h-full flex-col gap-4 p-5","aria-busy":!0,children:[(0,a.jsx)(s.EA,{className:"h-10 w-2/3"}),(0,a.jsx)(s.EA,{className:"h-24 w-full"}),(0,a.jsx)(s.EA,{className:"h-12 w-full"}),(0,a.jsx)(s.EA,{className:"h-40 w-full"})]}):t?(0,a.jsx)(h,{session:t,tokenReport:null!=l?l:null,liveFindings:null!=r?r:null,...o?{linkHref:o}:{},...d?{toolHref:d}:{},...x?{onExpand:x}:{},...u?{overlayClose:u}:{},renderedAt:m}):(0,a.jsx)("div",{className:"grid h-full place-items-center p-6",children:(0,a.jsx)(c.A,{message:"Select a session to view its audit timeline"})})}},3704:(e,t,n)=>{n.d(t,{TimeRangeSelect:()=>o});var a=n(7643),s=n(7228),i=n(2229);function l(e){return(0,a.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,a.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,a.jsx)("path",{d:"M4 9h16M8 3v4M16 3v4"})]})}function r(e){return(0,a.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,a.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,a.jsxs)(s.rI,{children:[(0,a.jsx)(s.ty,{asChild:!0,children:(0,a.jsxs)(s.$n,{variant:"outline",size:"md",children:[(0,a.jsx)(l,{"aria-hidden":!0,focusable:!1,className:"size-4 text-text-3"}),o,(0,a.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"})]})}),(0,a.jsx)(s.SQ,{align:"end",className:"w-44",children:(0,a.jsx)(s.Hr,{value:t,onValueChange:e=>{n(e)},children:i.hn.map(e=>(0,a.jsx)(s.Ht,{value:e.value,children:e.label},e.value))})})]})}},3883:(e,t,n)=>{n.d(t,{Y:()=>i});var a=n(7643),s=n(7228);function i(e){let{value:t,descriptor:n,className:i}=e;if(null===t&&null===n)return(0,a.jsx)("span",{"data-slot":"scrubbed-value",className:(0,s.cn)("text-ui text-text-3",i),children:"[unavailable]"});let l=null===n?null:(0,a.jsxs)(s.Ex,{variant:"primary",children:["scrubbed:"," ",void 0===n.provider?n.category:"".concat(n.category,"/").concat(n.provider)]});return(0,a.jsxs)("span",{"data-slot":"scrubbed-value",className:(0,s.cn)("inline-flex flex-wrap items-center gap-2",i),children:[null!==t?(0,a.jsx)("code",{className:"break-all font-mono text-ui text-text",children:t}):(0,a.jsx)("code",{className:"break-all font-mono text-ui text-text-2",children:null==n?void 0:n.maskedMatch}),l]})}},3967:(e,t,n)=>{n.d(t,{y7:()=>u,VN:()=>r,gs:()=>l,qW:()=>C,V_:()=>y,Ec:()=>w,pM:()=>k,B5:()=>v,oC:()=>o,O:()=>j,C$:()=>g,Jm:()=>p,i9:()=>m,Ad:()=>Y,dL:()=>N,Dx:()=>b,xE:()=>f});var a=n(7228),s=n(1863),i=n(8848);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"},u=Object.assign(Object.create(null),d),m=e=>{let t=Object.hasOwn(x,e)?x[e]:void 0;return a.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:a.id.critical},redacted:{label:"Redacted",icon:i.jZ,className:a.id.primary},warned:{label:"Warned",icon:i._0,className:a.id.high},allowed:{label:"Allowed",icon:i.Sr,className:a.id.ok},monitored:{label:"Monitored",icon:i.bM,className:a.id.neutral},quarantined:{label:"Quarantined",icon:i.lm,className:a.id.critical}},g=e=>{let t=Object.hasOwn(h,e)?h[e]:void 0;return null!=t?t:{label:e,icon:i.RY,className:a.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),P={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,s.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(P,e.reason)?P[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 C={grouped:"By type",flat:"All findings",files:"By location"}},3969:(e,t,n)=>{n.d(t,{K:()=>l,x:()=>i});var a=n(7643),s=n(7971);let i={[s.tLs.ClaudeCode]:{label:"Claude Code",short:"CC",color:"#C96442"},[s.tLs.ClaudeDesktop]:{label:"Claude Desktop",short:"CD",color:"#A8553A"},[s.tLs.Cursor]:{label:"Cursor",short:"Cu",color:"#252F3D"},[s.tLs.Windsurf]:{label:"Windsurf",short:"Wf",color:"#0B8F7B"},[s.tLs.Codex]:{label:"Codex CLI",short:"Cx",color:"#10A37F"},[s.tLs.Antigravity]:{label:"Antigravity",short:"Ag",color:"#4285F4"},[s.tLs.Copilot]:{label:"GitHub Copilot",short:"Co",color:"#0581D4"},[s.tLs.ChatGpt]:{label:"ChatGPT",short:"GP",color:"#0d8f6f"},[s.tLs.ClaudeAi]:{label:"Claude.ai",short:"Ca",color:"#D97757"},[s.tLs.Api]:{label:"Anthropic API",short:"AP",color:"#6058E9"},[s.tLs.AiTcSdk]:{label:"Application SDK",short:"SD",color:"var(--color-mark-neutral)"}};function l(e){let{id:t,size:n=24}=e,s=i[t];return(0,a.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:s.color,fontSize:.36*n},children:s.short})}},3988:(e,t,n)=>{n.d(t,{VaultInventoryView:()=>c});var a=n(7643),s=n(7228),i=n(1863),l=n(3883),r=n(1067);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:u=!1,pageStart:m,total:p,renderedAt:h}=e,g=0===t.length;if(g&&!r&&!l)return(0,a.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,a.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[g?(0,a.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,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:"Value"}),(0,a.jsx)(s.nd,{className:o.occurrences,children:"Occurrences"}),(0,a.jsx)(s.nd,{className:o.firstSeen,children:"First seen"}),(0,a.jsx)(s.nd,{className:o.lastSeen,children:"Last seen"}),(0,a.jsx)(s.nd,{className:o.grant,children:"Grant"}),f?(0,a.jsx)(s.nd,{className:o.action,children:"Actions"}):null]})}),(0,a.jsx)(s.BF,{children:t.map(e=>(0,a.jsx)(d,{entry:e,hasActions:f,onReveal:n,onRevoke:i,renderedAt:h},e.pointerId))})]}),c?(0,a.jsxs)(s.dK,{children:[(0,a.jsx)(s.Eb,{disabled:!r||u,onClick:x}),(0,a.jsx)(s.D2,{children:void 0===p||void 0===m?"".concat(String(t.length)," shown"):g?"0 of ".concat(String(p)," values"):"".concat(String(m),"–").concat(String(m+t.length-1)," of ").concat(String(p)," values")}),(0,a.jsx)(s.WA,{disabled:!l||u,loading:u,onClick:c})]}):l&&(0,a.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,u=t.revealGrantId;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nA,{children:(0,a.jsx)(l.Y,{value:null,descriptor:t})}),(0,a.jsx)(s.nA,{className:o.occurrences,children:(0,a.jsx)("span",{className:"text-xs text-text-2",children:String(t.occurrences)})}),(0,a.jsx)(s.nA,{className:o.firstSeen,children:(0,a.jsx)("span",{className:"text-xs text-text-2",children:(0,i.K)(t.firstSeen,x)})}),(0,a.jsx)(s.nA,{className:o.lastSeen,children:(0,a.jsx)("span",{className:"text-xs text-text-2",children:(0,i.K)(t.lastSeen,x)})}),(0,a.jsx)(s.nA,{className:o.grant,children:null===u?null:(0,a.jsx)(r.$$,{})}),n?(0,a.jsx)(s.nA,{className:o.action,children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[void 0===c?null:(0,a.jsx)(s.$n,{variant:"outline",tone:"neutral",size:"sm",onClick:()=>{c(t.pointerId)},children:"Reveal"}),null!==u&&void 0!==d?(0,a.jsx)(s.$n,{variant:"ghost",tone:"danger",size:"sm",onClick:()=>{d(u)},children:"Revoke grant"}):null]})}):null]}),t.sightings.length>0?(0,a.jsx)(s.Hj,{children:(0,a.jsx)(s.nA,{colSpan:n?6:5,className:"py-2",children:(0,a.jsxs)("details",{children:[(0,a.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,a.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:t.sightings.map(e=>(0,a.jsxs)("li",{className:"grid grid-cols-[1fr_110px_100px] items-center gap-2 text-xs text-text-2",children:[(0,a.jsx)("code",{className:"break-all font-mono",children:e.location}),(0,a.jsx)("div",{children:(0,a.jsx)(r.Ec,{kind:e.kind})}),(0,a.jsx)("span",{className:"text-text-3",children:(0,i.K)(e.lastSeen,x)})]},"".concat(e.kind,":").concat(e.location)))})]})})}):null]})}},4267:(e,t,n)=>{n.d(t,{CF:()=>d,EI:()=>l,Hf:()=>r,Lh:()=>g,P4:()=>c,ZX:()=>m,aD:()=>i,pN:()=>o,rL:()=>p});var a=n(7228),s=n(8848);let i={https:{label:"HTTPS",icon:s.XA,secure:!0},http:{label:"HTTP",icon:s.fC,secure:!1},sftp:{label:"SFTP",icon:s.JM,secure:!0},grpc:{label:"gRPC",icon:s.hF,secure:!0},smtp:{label:"SMTP",icon:s.K$,secure:!0},ws:{label:"WS",icon:s.fC,secure:!1},wss:{label:"WSS",icon:s.XA,secure:!0}};function l(e){return e.some(e=>!i[e].secure)}let r={secrets:{label:"Secrets",tone:"critical",icon:s.RY},pii:{label:"PII",tone:"high",icon:s.Ey},customer:{label:"Customer data",tone:"high",icon:s.ny},source:{label:"Source code",tone:"low",icon:s.lo},telemetry:{label:"Telemetry",tone:"teal",icon:s.BH},logs:{label:"Logs",tone:"default",icon:s.kp},metrics:{label:"Metrics",tone:"teal",icon:s.np},none:{label:"No payload",tone:"default",icon:s.mo}},o={recognized:{label:"Known provider",tone:"success",icon:s.C1},internal:{label:"Your organization",tone:"primary",icon:s.Zu},unverified:{label:"Unverified domain",tone:"high",icon:s._0},ip:{label:"Raw IP address",tone:"critical",icon:s.rX}},c={allowed:{label:"Allowed",tone:"success",icon:s.C1},blocked:{label:"Blocked",tone:"critical",icon:s.pD},review:{label:"Needs review",tone:"high",icon:s._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"},u=["raw_ip","unverified_domain","plaintext_transport"];function m(e){let t=u.find(t=>e.includes(t));return t?x[t]:"Needs review"}function p(e){return"ip"===e.kind?a.id.critical:"external"===e.kind||"unverified"===e.trust?a.id.high:a.id.primary}let h=["#2563EB","#7C3AED","#DB2777","#0891B2","#CA8A04","#059669"];function g(e){var t;let n=0;for(let t=0;t<e.length;t++)n=31*n+e.charCodeAt(t)>>>0;return{short:function(e){var t,n,a,s;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!=(a=l[0])?a:"")+(null!=(s=r[0])?s:"")).toUpperCase()||"?"}(e),color:null!=(t=h[n%h.length])?t:"#2563EB"}}},4360:(e,t,n)=>{n.d(t,{AC:()=>d,AJ:()=>m,As:()=>p,EmptyState:()=>o,Kh:()=>g,TJ:()=>j,Vx:()=>u,kx:()=>x,wn:()=>c,yk:()=>f});var a=n(7643),s=n(7228),i=n(7199),l=n(7367);function r(e){let{order:t,meta:n,value:i,onChange:r}=e;return(0,a.jsx)("span",{className:"inline-flex",onClick:e=>{e.stopPropagation()},children:(0,a.jsx)(s.Iz,{value:i,onValueChange:e=>{e&&r(e)},children:t.map(e=>{let t=n[e],r=e===i;return(0,a.jsx)(s.tR,{value:e,title:t.label,className:(0,s.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,s.cn)(t.fg,t.bg):"text-text-3 hover:text-text-2"),children:(0,a.jsx)(l.m,{name:t.icon})},e)})})})}function o(e){let{message:t,icon:n="list",className:i}=e;return(0,a.jsxs)("div",{className:(0,s.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,a.jsx)(l.m,{name:n,className:"size-4 shrink-0"}),(0,a.jsx)("span",{className:"text-xs",children:t})]})}function c(e){let{label:t,children:n}=e;return(0,a.jsxs)("div",{children:[(0,a.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,a.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>{let t=n[e],c=e===i;return(0,a.jsxs)("button",{type:"button",onClick:()=>{r(e)},className:(0,s.cn)("flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left cursor-pointer",c?(0,s.cn)(t.bg,"border-current",t.fg):"border-border bg-surface"),children:[(0,a.jsx)("span",{className:(0,s.cn)("grid size-8 shrink-0 place-items-center rounded-lg",c?"bg-surface":"bg-surface-2",t.fg),children:(0,a.jsx)(l.m,{name:t.icon,className:"size-4.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:(0,s.cn)("text-sm font-semibold",c?t.fg:"text-text"),children:t.label}),(0,a.jsx)("div",{className:"mt-0.5 text-xs text-text-2",children:t.desc})]}),(0,a.jsx)("span",{className:(0,s.cn)("grid size-4.5 shrink-0 place-items-center rounded-full border-[1.5px]",c?(0,s.cn)("border-current text-on-accent",o(t)):"border-border-strong"),children:c&&(0,a.jsx)(l.m,{name:"check",className:"size-3"})})]},e)})})}function x(e){let{value:t,onChange:n}=e;return(0,a.jsx)(r,{order:i.IF,meta:i.Pe,value:t,onChange:n})}function u(e){let{value:t}=e;return(0,a.jsx)("span",{className:(0,s.cn)("min-w-23 whitespace-nowrap text-xs font-semibold",i.Pe[t].fg),children:i.Pe[t].label})}function m(e){let{counts:t,className:n}=e,l=t.total||1;return(0,a.jsx)("span",{className:(0,s.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,a.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,a.jsxs)(s.Ex,{variant:n.tone,children:[(0,a.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,a.jsxs)(s.Ex,{variant:r.tone,children:[(0,a.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,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-ok-ink",children:[(0,a.jsx)(l.m,{name:"check-circle",className:"size-3.5"})," OK"]}):(0,a.jsx)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:t.map(e=>(0,a.jsx)(h,{flag:e,mini:n},e))})}function f(e){let{v:t}=e;return"public"===t?(0,a.jsxs)(s.Ex,{variant:"success",children:[(0,a.jsx)(l.m,{name:"globe",className:"size-3"})," Public"]}):(0,a.jsxs)(s.Ex,{variant:"default",children:[(0,a.jsx)(l.m,{name:"lock",className:"size-3"})," Private"]})}function j(e){let{origin:t}=e,n=i.Gb[t];return(0,a.jsxs)(s.Ex,{variant:"default",children:[(0,a.jsx)(l.m,{name:n.icon,className:"size-3"})," ",n.short]})}},4381:(e,t,n)=>{n.d(t,{DataShareDetailView:()=>m});var a=n(7643),s=n(7228),i=n(1863),l=n(1166),r=n(8848),o=n(826),c=n(4267);function d(e){let{st:t}=e;return(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface p-3",children:[(0,a.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,a.jsx)(r.SY,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0 text-primary"}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text",children:t.project}),t.vendored?(0,a.jsx)("span",{className:"ml-auto",children:(0,a.jsx)(s.Ex,{variant:"high",children:"Vendored"})}):t.dynamic&&(0,a.jsx)("span",{className:"ml-auto",children:(0,a.jsxs)(s.Ex,{variant:"default",children:[(0,a.jsx)(r.cZ,{"aria-hidden":!0,focusable:!1,className:"size-2.5"}),"Dynamic"]})})]}),(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[t.file,":",(0,a.jsx)("b",{className:"text-text-2",children:t.line})]}),""!==t.snippet&&(0,a.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,a.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,u=c.pN[d.trust].icon,m=d.endpoints.reduce((e,t)=>e+t.callSiteCount,0);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(o.Wi,{kind:d.kind,trust:d.trust,name:d.name,size:44}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:(0,s.cn)("text-lg font-semibold text-text","ip"===d.kind?"font-mono":"font-display"),children:d.name}),d.host!==d.name&&(0,a.jsx)("div",{className:"text-xs text-text-3",children:d.host}),(0,a.jsxs)("div",{className:"mt-0.5 text-xs text-text-3",children:[d.category," \xb7 ",d.endpoints.length," endpoints \xb7 ",m," call sites"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(o.xB,{trust:d.trust}),d.transports.map(e=>(0,a.jsx)(o.eV,{transport:e},e))]}),(null!==d.note||(null==(t=d.network)?void 0:t.geo)!=null)&&(0,a.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,a.jsx)(u,{"aria-hidden":!0,focusable:!1,className:"mt-0.5 size-4 shrink-0 text-text-2"}),(0,a.jsxs)("div",{className:"text-xs leading-normal text-text-2",children:[(null==(n=d.network)?void 0:n.geo)!=null&&(0,a.jsxs)("div",{children:[(0,a.jsx)("b",{className:"text-text",children:"Resolves to "}),d.network.geo,null!=d.network.ptr?" \xb7 "+d.network.ptr:""]}),null!=d.note&&(0,a.jsx)("div",{className:(null==(i=d.network)?void 0:i.geo)!=null?"mt-1":"",children:d.note})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.e,{children:"Endpoints"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:d.endpoints.map(e=>(0,a.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,a.jsx)(o.kX,{method:e.method}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)(o.UH,{url:e.url}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,a.jsx)(o.eV,{transport:e.transport,plain:!0}),(0,a.jsxs)("span",{className:"text-xs text-text-3",children:["\xb7 ",e.callSiteCount," call",1===e.callSiteCount?"":"s"]})]})]}),(0,a.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0 text-text-3"})]},e.id))})]})]})}function u(e){let{d:t,ep:n,onBack:c,renderedAt:x}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)(s.$n,{onClick:c,size:"sm",variant:"link",tone:"primary",children:[(0,a.jsx)(r.YJ,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),"Back to destination"]})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2.5",children:[(0,a.jsx)(o.kX,{method:n.method}),(0,a.jsx)(o.Wi,{kind:t.kind,trust:t.trust,name:t.name,size:22}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:t.name})]}),(0,a.jsx)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:(0,a.jsx)(o.UH,{url:n.url,big:!0})})]}),n.template&&(0,a.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-primary-tint px-3 py-2.5",children:[(0,a.jsx)(r.cZ,{"aria-hidden":!0,focusable:!1,className:"mt-0.5 size-4 shrink-0 text-primary"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-0.5 text-xs font-semibold text-text",children:"Templated URL"}),(0,a.jsxs)("div",{className:"text-xs leading-normal text-text-2",children:["Built at runtime — the"," ",(0,a.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,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,a.jsx)(l.p,{label:"Method",children:n.method}),(0,a.jsx)(l.p,{label:"Transport",children:(0,a.jsx)(o.eV,{transport:n.transport,plain:!0})}),(0,a.jsx)(l.p,{label:"Data classification",children:(0,a.jsx)("span",{className:"inline-flex",children:(0,a.jsx)(o.HD,{cls:n.dataClass})})}),(0,a.jsx)(l.p,{label:"Last seen",children:(0,i.K)(n.lastSeen,x)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.e,{children:"Call sites"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:n.sites.map(e=>(0,a.jsx)(d,{st:e},e.id))})]})]})}function m(e){let{destination:t,endpoint:n,onPick:i,onBack:l,onSetDecision:o,isSettingDecision:d,renderedAt:m}=e,p="blocked"===t.status;return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsx)("header",{className:"flex items-center gap-2.5 border-b border-border px-4.5 py-4 pr-12",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-text-3",children:[(0,a.jsx)(r._G,{"aria-hidden":!0,focusable:!1,className:"size-4"}),n?"Endpoint":"Destination"]})}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4.5",children:n?(0,a.jsx)(u,{d:t,ep:n,onBack:l,renderedAt:m}):(0,a.jsx)(x,{d:t,onPick:i})}),(0,a.jsxs)("footer",{className:"flex flex-col gap-2 border-t border-border p-3.5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,a.jsxs)(s.$n,{variant:"outline",children:[(0,a.jsx)(r.iB,{"aria-hidden":!0,focusable:!1}),"Add policy"]}),p?(0,a.jsxs)(s.$n,{variant:"outline",className:"border-ok-fill text-ok-ink hover:bg-ok-fill",disabled:d,onClick:()=>{o("allow")},children:[(0,a.jsx)(r.Sr,{"aria-hidden":!0,focusable:!1}),"Allow egress"]}):(0,a.jsxs)(s.$n,{variant:"solid",tone:"danger",disabled:d,onClick:()=>{o("block")},children:[(0,a.jsx)(r.pD,{"aria-hidden":!0,focusable:!1}),"Block egress"]})]}),t.isCustom&&(0,a.jsxs)(s.$n,{variant:"ghost",size:"sm",tone:"neutral",className:"self-end text-xs text-text-3",disabled:d,onClick:()=>{o(null)},children:["Reset to default (",c.pN[t.trust].label,")"]})]})]})}},4420:(e,t,n)=>{n.d(t,{R:()=>i,j:()=>a});let a=new Intl.NumberFormat("en-US"),s=new Intl.NumberFormat("en-US",{notation:"compact"});function i(e){return s.format(e).toLowerCase()}},4818:(e,t,n)=>{n.d(t,{FindingDetailView:()=>h,formatConfidence:()=>m});var a=n(7643),s=n(7228),i=n(1863),l=n(1166),r=n(8848),o=n(545),c=n(3967);function d(e){let{delivery:t,deployment:n,renderedAt:i}=e,r=(0,c.dL)(t.state);return(0,a.jsx)("div",{className:"col-span-2",children:(0,a.jsx)(l.p,{label:"Deployment",children:(0,a.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,a.jsx)(s.Ex,{variant:r.badge,className:"h-6",children:r.label}),(0,a.jsx)("span",{className:"text-xs font-normal text-text-2",children:(0,c.Ad)(t,n,i)}),(0,a.jsx)("span",{className:"text-xs font-normal text-text-3",children:"Based on its latest detection."})]})})})}var x=n(2383),u=n(8396);function m(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 p(e){let{confidence:t}=e,{label:n,tone:s}=m(t);return(0,a.jsx)("span",{className:s,children:n})}function h(e){var t;let{selection:n,footer:m,deployment:h,renderedAt:f}=e,{finding:j,instance:v}=n,b=null!=(t=c.y7[j.category])?t:r.RY,k=(0,c.Jm)(j.category);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Fm,{className:"flex-row items-center gap-2.5 border-b border-border p-4 pr-12",children:[(0,a.jsx)(s.Pt,{severity:j.severity}),(0,a.jsx)(s.qp,{className:"min-w-0 font-mono text-xs font-semibold text-text-3 wrap-break-word",children:v.id})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 pb-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:(0,s.cn)("flex size-10 shrink-0 items-center justify-center rounded-lg",(0,c.i9)(j.category)),children:(0,a.jsx)(b,{className:"size-5"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-display text-base font-semibold",children:j.subtype}),(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[k," \xb7 ",v.repo," \xb7 detected"," ",(0,i.K)(v.detectedAt,f)]})]})]}),(0,a.jsx)(g,{code:j.match.contextPrefix,snippet:j.match.maskedValue,file:(0,c.xE)(v)}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,a.jsx)(l.p,{label:"Source tool",children:(0,a.jsx)(x.i,{provider:v.provider})}),(0,a.jsx)(l.p,{label:"Repository",children:(0,a.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:v.repo})}),(0,a.jsx)(l.p,{label:"Location",children:(0,a.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:(0,c.xE)(v)})}),(0,a.jsx)(l.p,{label:"Action taken",children:(0,a.jsx)(o.T,{action:v.action})}),(0,a.jsx)(l.p,{label:"Detected",children:(0,i.K)(v.detectedAt,f)}),(0,a.jsx)(l.p,{label:"Confidence",children:(0,a.jsx)(p,{confidence:v.confidence})}),void 0!==v.user&&(0,a.jsx)(l.p,{label:"User",children:(0,a.jsx)("span",{title:c.O,children:(0,a.jsx)(u.c,{user:v.user})})}),null!=h&&void 0!==v.delivery&&(0,a.jsx)(d,{delivery:v.delivery,deployment:h,renderedAt:f})]}),m]})]})}function g(e){let{code:t,snippet:n,file:s}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)(l.e,{children:"Matched content"}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-ink p-3.5 font-mono text-xs leading-relaxed text-code-fg",children:[(0,a.jsx)("div",{className:"text-code-muted wrap-break-word",children:"// ".concat(s)}),(0,a.jsxs)("div",{children:[t,(0,a.jsx)("span",{className:"rounded bg-sev-critical/20 px-1 py-0.5 text-code-err wrap-break-word",children:'"'.concat(n,'"')}),";"]})]})]})}},4889:(e,t,n)=>{n.d(t,{DerefAuditTableView:()=>d});var a=n(7643),s=n(7971),i=n(7228),l=n(1863),r=n(1067);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,a.jsx)(i.Ex,{variant:"critical",children:"revealed"}):"refused"===t.outcome?(0,a.jsx)(i.Ex,{variant:"high",children:"refused"}):"unavailable"===t.outcome?(0,a.jsx)(i.Ex,{variant:"outline",children:"unavailable"}):(0,a.jsx)(i.Ex,{variant:"default",children:"revealed"})}function d(e){let{rows:t,hiddenBatched:n,showBatched:d,onToggleBatched:x,hasNextPage:u=!1,hasPreviousPage:m=!1,onNextPage:p,onPreviousPage:h,loadingNextPage:g=!1,pageStart:f,renderedAt:j}=e,v=void 0===x?null:(0,a.jsx)(i.$n,{variant:"link",tone:"neutral",onClick:()=>{x(!d)},children:d?"Hide display/render resolutions":"Show them"}),b=!d&&n>0?(0,a.jsxs)("p",{className:"mt-3 flex items-center gap-2 text-xs text-text-3",children:[(0,a.jsxs)("span",{children:[String(n)," display/render"," ",1===n?"resolution":"resolutions"," hidden"]}),v]}):d&&void 0!==x?(0,a.jsx)("p",{className:"mt-3 text-xs text-text-3",children:v}):null,k=0===t.length;return!k||m||u?(0,a.jsxs)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:[k?(0,a.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,a.jsxs)(i.XI,{children:[(0,a.jsx)(i.A0,{children:(0,a.jsxs)(i.Hj,{children:[(0,a.jsx)(i.nd,{children:"When"}),(0,a.jsx)(i.nd,{children:"Reason"}),(0,a.jsx)(i.nd,{children:"Target"}),(0,a.jsx)(i.nd,{children:"Outcome"}),(0,a.jsx)(i.nd,{children:"Grant"}),(0,a.jsx)(i.nd,{children:"Pointers"})]})}),(0,a.jsx)(i.BF,{children:t.map(e=>"purge"===e.reason?(0,a.jsxs)(i.Hj,{"data-purge":"",className:"bg-surface-2",children:[(0,a.jsx)(i.nA,{className:"text-xs text-text-2",children:(0,l.K)(e.at,j)}),(0,a.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,a.jsxs)(i.Hj,{"data-model-crossing":"model"===e.target?e.outcome:void 0,className:(0,i.cn)("model"===e.target&&o[e.outcome],(0,s.kqf)(e.reason)&&"text-text-3"),children:[(0,a.jsx)(i.nA,{className:"text-xs text-text-2",children:(0,l.K)(e.at,j)}),(0,a.jsx)(i.nA,{className:"text-xs",children:r.V[e.reason]}),(0,a.jsx)(i.nA,{className:"text-xs",children:"model"===e.target?(0,a.jsx)("span",{className:"font-semibold text-sev-critical-ink",children:"model"}):(0,a.jsx)("span",{className:"text-text-2",children:"human"})}),(0,a.jsx)(i.nA,{children:(0,a.jsx)(c,{row:e})}),(0,a.jsx)(i.nA,{className:"font-mono text-xs text-text-3",children:void 0===e.grantId?"—":e.grantId.slice(0,8)}),(0,a.jsx)(i.nA,{className:"text-xs text-text-2",children:e.pointerCount>1?"\xd7".concat(String(e.pointerCount)):"—"})]},e.id))})]}),p?(0,a.jsxs)(i.dK,{children:[(0,a.jsx)(i.Eb,{disabled:!m||g,onClick:h}),(0,a.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,a.jsx)(i.WA,{disabled:!u||g,loading:g,onClick:p})]}):u&&(0,a.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the most recent ",t.length," resolutions."]}),b]}):(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,a.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]})}},5061:(e,t,n)=>{n.d(t,{AW:()=>a.A,rJ:()=>a.r}),n(4420);var a=n(6098)},5114:(e,t,n)=>{n.d(t,{N:()=>d,T:()=>l});var a=n(7643),s=n(7228),i=n(1579);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 a=new Set(n);return a.add(t),a})}}}function r(e){return void 0===e||""===e?null:e}function o(e){let{color:t,hollow:n}=e;return(0,a.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,a.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:u}=n;return l?(0,a.jsx)(a.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)),m=null===l?e.label:"".concat(e.label,", ").concat(l);return(0,a.jsxs)("button",{type:"button","aria-label":n?"".concat(m,", only series left"):m,"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:()=>{u(e.key)},className:(0,s.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,a.jsx)(o,{color:e.color,hollow:t}),e.label,(0,a.jsx)(c,{text:l})]},e.key)})}):(0,a.jsx)(a.Fragment,{children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(o,{color:e.color,hollow:!1}),e.label,(0,a.jsx)(c,{text:r(null==i?void 0:i(e.key))})]},e.key))})}},5173:(e,t,n)=>{n.d(t,{ThemeToggle:()=>d});var a=n(7643),s=n(7228),i=n(1579),l=n(6669);let r={light:"Light",dark:"Dark",system:"System"};function o(e){let{className:t}=e;return(0,a.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,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.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,a.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,a.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,a.jsxs)(s.rI,{children:[(0,a.jsx)(s.ty,{asChild:!0,children:(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"icon","aria-label":"Theme: ".concat(r[e]),children:(0,a.jsx)(d,{className:"size-4"})})}),(0,a.jsx)(s.SQ,{align:"end",children:(0,a.jsx)(s.Hr,{value:e,onValueChange:e=>{(0,l.nk)(e)&&(0,l.pT)(e)},children:l.j0.map(e=>(0,a.jsx)(s.Ht,{value:e,children:r[e]},e))})})]})}},5218:(e,t,n)=>{n.d(t,{ExceptionsTableView:()=>o});var a=n(7643),s=n(7228),i=n(1863),l=n(6597),r=n(8540);function o(e){let{items:t,includeTerminal:n,onSelect:o,renderedAt:c}=e;return 0===t.length?(0,a.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,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border bg-surface p-4",children:(0,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:"ID"}),(0,a.jsx)(s.nd,{children:"Rule"}),(0,a.jsx)(s.nd,{children:"Value"}),(0,a.jsx)(s.nd,{children:"Scope"}),(0,a.jsx)(s.nd,{children:"Expires"}),(0,a.jsx)(s.nd,{children:"Uses"}),(0,a.jsx)(s.nd,{children:"Created"}),(0,a.jsx)(s.nd,{children:"State"})]})}),(0,a.jsx)(s.BF,{children:t.map(e=>(0,a.jsxs)(s.Hj,{className:"cursor-pointer","aria-label":"View details for exception ".concat(e.id.slice(0,8)),onClick:()=>{o(e.id)},children:[(0,a.jsx)(s.nA,{className:"font-mono text-xs text-text-3",children:e.id.slice(0,8)}),(0,a.jsx)(s.nA,{className:"font-mono text-xs",children:e.ruleId}),(0,a.jsx)(s.nA,{className:"font-mono text-xs",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[e.maskedValue,(0,a.jsx)(l._,{exception:e})]})}),(0,a.jsx)(s.nA,{className:"text-xs",children:r.yr[e.scope]}),(0,a.jsx)(s.nA,{className:"text-xs text-text-2",children:null===e.expiresAt?"—":(0,i.K)(e.expiresAt,c)}),(0,a.jsx)(s.nA,{className:"text-xs text-text-2",children:null===e.maxUses?String(e.useCount):"".concat(String(e.useCount),"/").concat(String(e.maxUses))}),(0,a.jsxs)(s.nA,{className:"text-xs text-text-2",children:[(0,i.K)(e.createdAt,c)," \xb7 ",r.gi[e.createdVia]]}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(l.StateTagFor,{exception:e,now:c})})]},e.id))})]})})}},5233:(e,t,n)=>{n.d(t,{$x:()=>o,Ay:()=>l,Oy:()=>u,Tp:()=>m,ek:()=>d,nR:()=>x,ni:()=>p,oo:()=>r,pS:()=>c});var a=n(7971),s=n(7228),i=n(8848);let l={[a.tLs.ClaudeCode]:"CLI agent",[a.tLs.Cursor]:"IDE",[a.tLs.Copilot]:"IDE",[a.tLs.Codex]:"CLI agent",[a.tLs.Antigravity]:"CLI agent",[a.tLs.Windsurf]:"IDE",[a.tLs.ClaudeDesktop]:"Desktop app",[a.tLs.ChatGpt]:"Web app",[a.tLs.ClaudeAi]:"Web app",[a.tLs.Api]:"API",[a.tLs.AiTcSdk]:"Embedded SDK"},r=Object.values(a.tLs),o={session:{label:"Session",icon:i.k3,...s.cH.neutral},prompt:{label:"Prompt",icon:i.ny,...s.cH.primary},response:{label:"Response",icon:i.BZ,...s.cH.violet},tool:{label:"Tool",icon:i.k3,...s.cH.neutral},hook:{label:"Hook",icon:i.hF,...s.cH.low},detection:{label:"Detection",icon:i.Zu,...s.cH.critical},share:{label:"Egress",icon:i._G,...s.cH.teal},permission:{label:"Permission",icon:i.XA,...s.cH.high},commit:{label:"Commit",icon:i.OK,...s.cH.neutral},error:{label:"Error",icon:i._0,...s.cH.critical},active:{label:"In progress",icon:i.DQ,...s.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"}},u={detections:"Findings",shares:"Data Shares",inventory:"Inventory"};function m(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)}},5331:(e,t,n)=>{n.d(t,{BlockedLedgerView:()=>d});var a=n(7643),s=n(7228),i=n(1863),l=n(2229),r=n(8848),o=n(6595);let c="This row cannot be approved. No reason was given.";function d(e){let{items:t,onApprove:n,blockedWindow:d,onBlockedWindowChange:x,blockReason:u,renderedAt:m}=e;return(0,a.jsxs)("div",{className:"mb-3.5 overflow-hidden rounded-xl border border-sev-high-fill bg-sev-high-fill",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-3.5 py-3",children:[(0,a.jsx)("span",{className:"grid size-6.5 shrink-0 place-items-center rounded-md bg-sev-high-ink text-on-accent",children:(0,a.jsx)(r.pD,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text",children:"Recently blocked"}),(0,a.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,a.jsxs)("span",{className:"text-xs text-text-2",children:["Detections blocked in ",l.sr[d]," — approve one to grant an exception"]}),(0,a.jsx)("span",{className:"ml-auto shrink-0",children:(0,a.jsx)(o.BlockedWindowSelect,{value:d,onChange:x})})]}),0===t.length?(0,a.jsx)("div",{className:"px-3.5 pb-3.5 text-xs text-text-2",children:"Nothing blocked in this window."}):(0,a.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,u),l="blocked-reason-".concat(e.reference);return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-text-3",children:e.reference}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.ruleId}),(0,a.jsx)("span",{className:"font-mono text-xs text-text-2",children:e.maskedValue})]}),(0,a.jsxs)("div",{className:(0,s.cn)("mt-1 text-label text-text-3"),children:[(0,i.K)(e.blockedAt,m),e.repo?" \xb7 ".concat(e.repo):"",null===t?"":" \xb7 not approvable"]}),null===t?null:(0,a.jsx)("div",{id:l,className:"mt-1 text-label text-text-3",children:t})]}),(0,a.jsx)(s.$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)})})]})}},5440:(e,t,n)=>{n.d(t,{SyncPanelView:()=>d});var a=n(7643),s=n(7228),i=n(7881),l=n(1863);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,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-24 shrink-0 truncate text-ui text-text",children:t.label}),(0,a.jsx)(s.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,a.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,a.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:u,running:m,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,a.jsxs)(s.Zp,{children:[(0,a.jsxs)(s.aR,{children:[(0,a.jsxs)(s.Lc,{children:[(0,a.jsx)(s.ZB,{children:"Sync"}),(0,a.jsxs)(s.BT,{children:["What this machine has sent to ",n,", and what it still owes."]})]}),m&&(0,a.jsx)(s.vw,{dot:i.l.primary,children:"Sending…"}),!m&&b&&(0,a.jsx)(s.vw,{dot:i.l.sevMedium,children:"Paused"}),"consent-stale"===t.status&&(0,a.jsx)(s.vw,{children:"Paused"})]}),(0,a.jsxs)(s.Wu,{className:"flex flex-col gap-3",children:["not-shared"===t.status&&(0,a.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,a.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,a.jsx)("p",{className:"text-ui text-text-2",children:t.detail}),"nothing-recorded"===t.status&&(0,a.jsx)("p",{className:"text-ui text-text-2",children:"Nothing recorded yet."}),"ready"===t.status&&t.kinds.map(e=>(0,a.jsx)(c,{row:e},e.kind)),void 0!==d&&(0,a.jsxs)("p",{className:(0,s.cn)("text-label","ok"===d?"text-text-3":"text-text-2"),children:[void 0!==x&&(0,a.jsxs)("span",{className:"text-text-3",children:[(0,l.K)(x,u)," \xb7 "]}),r[d]]}),b&&(0,a.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,a.jsx)("p",{className:"text-ui text-text-2",children:f}),v&&void 0!==h&&(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(s.$n,{onClick:h,disabled:!0===g||m||b,children:m?"Sending…":"Sync now"}),(0,a.jsx)("span",{className:"text-label text-text-3",children:"Sends what is queued above."})]}),void 0!==j&&j.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:j.map(e=>(0,a.jsxs)("p",{className:"text-label text-text-3",children:[(0,a.jsx)("span",{className:"text-text-2",children:e.label}),void 0!==e.count&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",o(e.count)," here"]})," — ",e.detail]},e.id))})]})]})}},5650:(e,t,n)=>{n.d(t,{AssetDetail:()=>d});var a=n(7643),s=n(7228),i=n(1579),l=n(4360),r=n(7199),o=n(7367);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,u=t.trust,m=(0,r.TW)(t.type),p=c[t.type];return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3.5",children:[(0,a.jsx)("span",{className:(0,s.cn)("grid size-8.5 shrink-0 place-items-center rounded-lg",m.bg,m.fg),children:(0,a.jsx)(o.m,{name:m.icon,className:"size-4.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-mono text-sm font-semibold text-text",title:t.name,children:t.name}),(0,a.jsx)("div",{className:"mt-px text-xs text-text-3",children:p})]}),i&&(0,a.jsx)(s.$n,{variant:"ghost",size:"icon","aria-label":"Back to harness",title:"Back to harness",onClick:i,children:(0,a.jsx)(o.m,{name:"x"})})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4.5 overflow-y-auto p-5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[d&&u&&(0,a.jsx)(l.As,{value:u}),(0,a.jsx)(l.Kh,{flags:t.flags})]}),t.description&&(0,a.jsx)("div",{className:"text-sm leading-relaxed text-text-2",children:t.description}),d&&u&&(0,a.jsx)(l.wn,{label:"Trust classification",children:(0,a.jsx)(l.AC,{order:r.yx,meta:r.ZY,value:u,onChange:n,accentOf:e=>e.iconBg})}),t.finding&&(0,a.jsx)(l.wn,{label:"Related finding",children:(0,a.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,a.jsx)(o.m,{name:"alert",className:"size-4 shrink-0 text-sev-critical-ink"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-xs font-semibold text-text",children:t.finding.title}),t.finding.note&&(0,a.jsx)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:t.finding.note})]}),(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}),(0,a.jsx)(l.wn,{label:"Details",children:(0,a.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,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-1 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,a.jsx)("div",{className:"wrap-break-word font-mono text-xs font-medium",children:String(n)})]},t)})})}),d&&t.tools&&(0,a.jsx)(x,{tools:t.tools,blocked:"unapproved"===u}),(0,a.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,a.jsxs)(s.$n,{variant:e.primary?"solid":"outline",tone:e.primary?"primary":"neutral",size:"sm",children:[(0,a.jsx)(o.m,{name:e.icon,className:"size-3.5"}),e.label]},e.key))}(t,u)})]})]})}function x(e){let{tools:t,blocked:n}=e,[l,r]=(0,i.useState)(!1),c=l?t:t.slice(0,4);return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Exposed tools"}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:t.length}),n&&(0,a.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1.5 text-xs font-semibold text-sev-critical-ink",children:[(0,a.jsx)(o.m,{name:"slash-circle",className:"size-3"})," Calls blocked"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:c.map(e=>(0,a.jsxs)("div",{className:(0,s.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,a.jsx)("span",{className:(0,s.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,a.jsx)(o.m,{name:e.risk?"alert":e.write?"edit":"eye",className:"size-3"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline gap-1.5",children:[(0,a.jsx)("span",{className:"font-mono text-xs font-semibold text-text",children:e.name}),(0,a.jsx)("span",{className:"font-mono text-xs text-text-3",children:e.signature}),e.write&&!e.risk&&(0,a.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-px text-xs font-semibold text-text-2",children:"write"})]}),(0,a.jsx)("div",{className:"mt-0.5 text-xs leading-relaxed text-text-2",children:e.description}),e.risk&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 text-xs font-semibold text-sev-high-ink",children:[(0,a.jsx)(o.m,{name:"alert",className:"size-3"})," ",e.risk]})]})]},e.name))}),t.length>4&&(0,a.jsxs)(s.$n,{variant:"ghost",tone:"primary",size:"sm",className:"mt-2 px-0",onClick:()=>{r(!l)},children:[(0,a.jsx)(o.m,{name:"chevron-down",className:(0,s.cn)("size-3.5 transition-transform",l&&"rotate-180")}),l?"Show fewer":"Show all ".concat(String(t.length)," tools")]})]})}},6098:(e,t,n)=>{n.d(t,{A:()=>l,r:()=>i});var a=n(7643),s=n(7228);function i(e){let{message:t}=e;return(0,a.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,a.jsx)("div",{className:(0,s.cn)("w-full py-6 text-center text-xs text-text-3",n),children:t})}},6241:(e,t,n)=>{n.d(t,{FindingsFlatTableView:()=>u});var a=n(7643),s=n(7228),i=n(1863),l=n(8848),r=n(545),o=n(3967),c=n(2383),d=n(8396);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 u(e){let{items:t,selectedId:n,onSelect:u,onNextPage:m,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:P,renderedAt:Y}=e;return(0,a.jsxs)(s.Zp,{className:"flex h-full min-h-0 flex-col overflow-hidden shadow-sm",children:[P,(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:b?(0,a.jsx)("div",{className:"flex flex-col gap-2 py-2",children:Array.from({length:8},(e,t)=>(0,a.jsx)("div",{className:"h-11 animate-pulse rounded-md bg-surface-3"},t))}):0===t.length?null!=k?k:(0,a.jsx)("p",{className:"py-8 text-center text-sm text-text-3",children:"No findings match these filters."}):(0,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[!w&&(0,a.jsx)(s.nd,{className:x.severity,children:"Severity"}),(0,a.jsx)(s.nd,{className:x.type,children:w?"Value":"Type"}),(0,a.jsx)(s.nd,{className:x.sources,children:"Source"}),y&&(0,a.jsx)(s.nd,{className:x.user,title:o.O,children:"User"}),(0,a.jsx)(s.nd,{className:x.location,children:"Location"}),(0,a.jsx)(s.nd,{className:x.action,children:"Action"}),(0,a.jsx)(s.nd,{className:x.status,children:"Status"}),N&&(0,a.jsx)(s.nd,{className:x.deployment,children:"Deployment"}),(0,a.jsx)(s.nd,{className:x.latest,children:"Detected"})]})}),(0,a.jsx)(s.BF,{children:t.map(e=>{var t;let m=null!=(t=o.y7[e.category])?t:l.RY;return(0,a.jsxs)(s.Hj,{"data-state":n===e.id?"selected":void 0,className:"cursor-pointer hover:bg-surface-2",onClick:()=>{u(e)},children:[!w&&(0,a.jsx)(s.nA,{className:x.severity,children:(0,a.jsx)(s.Pt,{severity:e.severity})}),(0,a.jsx)(s.nA,{className:x.type,children:w?(0,a.jsx)("span",{className:"font-mono text-ui text-text wrap-anywhere",children:e.match.maskedValue}):(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:(0,s.cn)("flex size-7 shrink-0 items-center justify-center rounded-lg",(0,o.i9)(e.category)),children:(0,a.jsx)(m,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-ui font-semibold text-text wrap-anywhere",children:e.subtype}),(0,a.jsx)("div",{className:"font-mono text-xs text-text-3 wrap-anywhere",children:e.match.maskedValue})]})]})}),(0,a.jsx)(s.nA,{className:x.sources,children:(0,a.jsx)(c.i,{provider:e.provider})}),y&&(0,a.jsx)(s.nA,{className:x.user,children:(0,a.jsx)(d.c,{user:e.user})}),(0,a.jsx)(s.nA,{className:x.location,children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"font-mono text-xs text-text-2 wrap-anywhere",children:(0,o.xE)(e)}),e.repo&&(0,a.jsx)("div",{className:"text-xs text-text-3 wrap-anywhere",children:e.repo})]})}),(0,a.jsx)(s.nA,{className:x.action,children:(0,a.jsx)(r.T,{action:e.action})}),(0,a.jsx)(s.nA,{className:x.status,children:void 0===e.status?(0,a.jsx)("span",{className:"text-text-3",children:"—"}):(0,a.jsx)(s.Ex,{variant:(0,o.Dx)(e.status).badge,className:"h-6",children:(0,o.Dx)(e.status).label})}),N&&(0,a.jsx)(s.nA,{className:x.deployment,children:void 0===e.delivery?(0,a.jsx)("span",{className:"text-text-3",children:"—"}):(0,a.jsx)(s.Ex,{variant:(0,o.dL)(e.delivery.state).badge,className:"h-6",children:(0,o.dL)(e.delivery.state).label})}),(0,a.jsx)(s.nA,{className:x.latest,children:(0,a.jsx)("span",{className:"text-text-3 text-xs",children:(0,i.K)(e.detectedAt,Y)})})]},e.id)})})]})}),m&&t.length>0&&(0,a.jsxs)(s.dK,{children:[(0,a.jsx)(s.Eb,{disabled:!g||f,onClick:p}),(0,a.jsx)(s.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,a.jsx)(s.WA,{disabled:!h||f,loading:f,onClick:m})]})]})}},6293:(e,t,n)=>{n.d(t,{FileDetailDrawer:()=>c});var a=n(7643),s=n(7228),i=n(1166),l=n(4360),r=n(7199),o=n(7367);function c(e){var t;let{file:n,onChange:c}=e,d=r.Gb[n.origin],x=n.project;return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)(s.Fm,{className:"flex-row items-center gap-2.5 py-4 px-5",children:[(0,a.jsx)("span",{className:"grid size-7.5 shrink-0 place-items-center rounded-lg bg-surface-2 text-text-2",children:(0,a.jsx)(o.m,{name:"file",className:"size-4.5"})}),(0,a.jsx)(s.qp,{className:"min-w-0 truncate font-mono text-sm",children:n.name})]}),(0,a.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,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"break-all font-mono text-xs text-text-3",children:[x.repo," › ",n.path]}),(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)(l.TJ,{origin:n.origin}),(0,a.jsx)(l.yk,{v:x.visibility}),n.findings>0&&(0,a.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,a.jsx)(o.m,{name:"alert",className:"size-3"}),n.findings," finding",1===n.findings?"":"s"]})]})]}),(0,a.jsx)(l.wn,{label:"LLM access",children:(0,a.jsx)(l.AC,{order:r.IF,meta:r.Pe,value:n.access,onChange:c,accentOf:e=>e.accent})}),(0,a.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,a.jsx)(o.m,{name:d.icon,className:"size-4.5 shrink-0 text-text-2"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-0.5 text-xs font-semibold",children:"Why this default"}),(0,a.jsx)("div",{className:"text-xs leading-relaxed text-text-2",children:(0,r._t)(x,n.origin)})]})]}),n.findingsRefs.length>0&&(0,a.jsx)(l.wn,{label:"Related findings",children:(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:n.findingsRefs.map(e=>(0,a.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,a.jsx)(o.m,{name:"alert",className:"size-4 shrink-0 text-sev-critical-ink"}),(0,a.jsx)("span",{className:"flex-1 text-xs font-medium text-text",children:e.title||n.note}),(0,a.jsx)("span",{className:"text-xs text-primary",children:"Open in Findings"}),(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 text-text-3"})]},e.id))})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-3.5",children:[(0,a.jsx)(i.p,{label:"Repository",children:(0,a.jsx)("span",{className:"font-mono text-xs",children:x.repo})}),(0,a.jsx)(i.p,{label:"Visibility",children:"public"===x.visibility?"Public":"Private"}),(0,a.jsx)(i.p,{label:"Origin",children:d.label}),(0,a.jsx)(i.p,{label:"Set by",children:n.isCustom?(0,a.jsx)("span",{className:"text-primary",children:"You"}):"Default policy"}),(0,a.jsx)(i.p,{label:"Language",children:x.language}),(0,a.jsx)(i.p,{label:"Last activity",children:(0,r.v7)(null!=(t=n.blockedAt)?t:x.updatedAt)})]})]})]})}},6323:(e,t,n)=>{n.d(t,{DataSharesTableView:()=>j});var a=n(7643),s=n(7228),i=n(1579),l=n(1863),r=n(8848),o=n(826),c=n(8504),d=n(7991),x=n(4267);function u(e){let{classes:t}=e;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.slice(0,3).map(e=>(0,a.jsx)(o.HD,{cls:e},e)),t.length>3&&(0,a.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:d,onToggle:m,onOpen:p,showHost:h}=e,g=(0,x.EI)(n.transports);return(0,a.jsxs)(s.Hj,{onClick:p,"aria-label":"View details for destination ".concat(h?n.host:n.name),className:(0,s.cn)("cursor-pointer",d?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,a.jsx)(s.nA,{className:"w-9",children:(0,a.jsx)(s.$n,{"aria-label":c?"Collapse":"Expand",onClick:e=>{e.stopPropagation(),m()},variant:"ghost",size:"sm",children:(0,a.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:(0,s.cn)("size-4 transition-transform",c&&"rotate-90")})})}),(0,a.jsx)(s.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[h&&(0,a.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,a.jsx)(o.Wi,{kind:n.kind,trust:n.trust,name:n.name}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:(0,s.cn)("whitespace-nowrap font-semibold text-text",!h&&"ip"===n.kind&&"font-mono"),children:h?n.host:n.name}),g&&(0,a.jsx)("span",{title:"Sends over plaintext",className:"inline-flex text-sev-critical-ink",children:(0,a.jsx)(r._0,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})})]}),(0,a.jsx)("div",{className:"whitespace-nowrap text-xs text-text-3",children:h?(0,a.jsxs)(a.Fragment,{children:[n.name," \xb7 ",n.category]}):(0,a.jsxs)(a.Fragment,{children:[n.host!==n.name?"".concat(n.host," \xb7 "):"",n.category,(null==(t=n.network)?void 0:t.geo)?" \xb7 "+n.network.geo:""]})})]})]})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(o.xB,{trust:n.trust})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(o.hC,{status:n.status,isCustom:n.isCustom})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.transports.map(e=>(0,a.jsx)(o.eV,{transport:e},e))})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(u,{classes:n.dataClasses})}),(0,a.jsxs)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,a.jsx)("b",{className:"text-text",children:n.endpointCount})," endpoint",1===n.endpointCount?"":"s"," \xb7 ",(0,a.jsx)("b",{className:"text-text",children:n.callSiteCount})," call",1===n.callSiteCount?"":"s"]}),(0,a.jsx)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(n.lastSeen,i)})]})}function p(e,t){let[n,...a]=e;if(void 0===n)return null;let s=t(n);return a.every(e=>t(e)===s)?s:null}function h(e){let{g:t,renderedAt:n,expanded:i,pinnedOpen:c,onToggle:d}=e,x=p(t.hosts,e=>e.trust),m=p(t.hosts,e=>e.status),h=t.hosts.some(e=>e.isCustom),g=i?"Collapse":"Expand";return(0,a.jsxs)(s.Hj,{onClick:c?void 0:d,"aria-label":"".concat(g," provider ").concat(t.name),className:(0,s.cn)(!c&&"cursor-pointer hover:bg-surface-2"),children:[(0,a.jsx)(s.nA,{className:"w-9",children:(0,a.jsx)(s.$n,{"aria-label":c?"Kept open while a host is selected":g,disabled:c,onClick:e=>{e.stopPropagation(),d()},variant:"ghost",size:"sm",children:(0,a.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:(0,s.cn)("size-4 transition-transform",i&&"rotate-90")})})}),(0,a.jsx)(s.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(o.Wi,{kind:"provider",trust:"recognized",name:t.name}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"whitespace-nowrap font-semibold text-text",children:t.name}),t.insecure&&(0,a.jsx)("span",{title:"Sends over plaintext",className:"inline-flex text-sev-critical-ink",children:(0,a.jsx)(r._0,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})})]}),(0,a.jsxs)("div",{className:"whitespace-nowrap text-xs text-text-3",children:[t.category," \xb7 ",t.hosts.length," hosts"]})]})]})}),(0,a.jsx)(s.nA,{children:x?(0,a.jsx)(o.xB,{trust:x}):(0,a.jsx)("span",{className:"text-xs text-text-3",children:"Mixed"})}),(0,a.jsx)(s.nA,{children:m?(0,a.jsx)(o.hC,{status:m,isCustom:h}):(0,a.jsx)("span",{className:"text-xs text-text-3",children:"Mixed"})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.transports.map(e=>(0,a.jsx)(o.eV,{transport:e},e))})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(u,{classes:t.dataClasses})}),(0,a.jsxs)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,a.jsx)("b",{className:"text-text",children:t.endpointCount})," endpoint",1===t.endpointCount?"":"s"," \xb7 ",(0,a.jsx)("b",{className:"text-text",children:t.callSiteCount})," call",1===t.callSiteCount?"":"s"]}),(0,a.jsx)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(t.lastSeen,n)})]})}function g(e){let{ep:t,renderedAt:n,selected:i,onClick:r}=e;return(0,a.jsxs)(s.Hj,{onClick:r,"aria-label":"View details for endpoint ".concat(t.method," ").concat(t.url),className:(0,s.cn)("cursor-pointer",i?"bg-primary-tint":"bg-surface-2 hover:bg-surface-3"),children:[(0,a.jsx)(s.nA,{className:"w-9"}),(0,a.jsx)(s.nA,{colSpan:3,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5 pl-1.5 py-1",children:[(0,a.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,a.jsx)(o.kX,{method:t.method}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(o.UH,{url:t.url}),t.template&&(0,a.jsx)(o.SU,{})]})]})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(o.eV,{transport:t.transport})}),(0,a.jsx)(s.nA,{children:(0,a.jsx)(o.HD,{cls:t.dataClass})}),(0,a.jsxs)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,a.jsx)("b",{className:"text-text",children:t.callSiteCount})," call",1===t.callSiteCount?"":"s"]}),(0,a.jsx)(s.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(t.lastSeen,n)})]})}function f(e){let{d:t,renderedAt:n,expanded:s,selection:i,drawerOpen:l,onToggle:r,onOpenDest:o,onOpenEndpoint:d,showHost:x}=e,u=l&&(null==i?void 0:i.id)===t.id&&null==i.endpointId;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m,{d:t,renderedAt:n,expanded:s,selected:u,onToggle:(0,c.T)(r,t.id),onOpen:(0,c.T)(o,t.id),...x?{showHost:!0}:{}}),s&&t.endpoints.map(e=>(0,a.jsx)(g,{ep:e,renderedAt:n,selected:l&&(null==i?void 0:i.id)===t.id&&i.endpointId===e.id,onClick:(0,c.i)(d,t.id,e.id)},e.id))]})}function j(e){let{group:t,expanded:n,forceExpand:l,selection:r,drawerOpen:o,onToggle:x,onOpenDest:u,onOpenEndpoint:m,renderedAt:p,groupByProvider:g}=e,j=g?(0,d.cT)(t.items):t.items.map(e=>({type:"destination",item:e}));return(0,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{className:"w-9"}),(0,a.jsx)(s.nd,{children:"Destination"}),(0,a.jsx)(s.nd,{children:"Trust"}),(0,a.jsx)(s.nd,{children:"Status"}),(0,a.jsx)(s.nd,{children:"Transport"}),(0,a.jsx)(s.nd,{children:"Data sent"}),(0,a.jsx)(s.nd,{children:"Footprint"}),(0,a.jsx)(s.nd,{children:"Last seen"})]})}),(0,a.jsx)(s.BF,{children:j.map(e=>{if("destination"===e.type){let t=e.item,s=null!=l&&l||!!n[t.id];return(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(f,{d:t,renderedAt:p,expanded:s,selection:r,drawerOpen:o,onToggle:x,onOpenDest:u,onOpenEndpoint:m})},t.id)}let t=e.group,s=o&&t.hosts.some(e=>e.id===(null==r?void 0:r.id)),d=null!=l&&l||!!n[t.id]||s;return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(h,{g:t,renderedAt:p,expanded:d,pinnedOpen:s,onToggle:(0,c.T)(x,t.id)}),d&&t.hosts.map(e=>{let t=null!=l&&l||!!n[e.id];return(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(f,{d:e,renderedAt:p,expanded:t,selection:r,drawerOpen:o,onToggle:x,onOpenDest:u,onOpenEndpoint:m,showHost:!0})},e.id)})]},t.id)})})]})}},6488:(e,t,n)=>{n.d(t,{NeedsReviewListView:()=>c});var a=n(7643),s=n(7228),i=n(8848),l=n(826),r=n(8504),o=n(4267);function c(e){let{items:t,onReview:n}=e;return 0===t.length?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center text-text-3",children:[(0,a.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-6 text-ok-ink"}),(0,a.jsx)("div",{className:"text-sm",children:"Nothing needs review"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-surface-2 px-3 py-2.5",children:[(0,a.jsx)(l.Wi,{kind:e.kind,trust:e.trust,name:e.name,size:30}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:(0,s.cn)("text-xs font-semibold text-text","ip"===e.kind&&"font-mono"),children:e.name}),(0,a.jsx)(l.HD,{cls:e.topDataClass})]}),e.host!==e.name&&(0,a.jsx)("div",{className:"text-xs text-text-3",children:e.host}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5 text-label text-sev-critical-ink",children:[(0,a.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),(0,o.ZX)(e.review.reasons)]})]}),(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[e.callSiteCount," call",1===e.callSiteCount?"":"s"]}),(0,a.jsx)(s.$n,{onClick:(0,r.T)(n,e.id),variant:"ghost",tone:"primary",size:"sm",children:"Review"})]},e.id))})}},6566:(e,t,n)=>{n.d(t,{ActivityTokenUsageView:()=>d});var a=n(7643),s=n(7228),i=n(1579),l=n(8848),r=n(6098),o=n(223);function c(e){let{summary:t}=e;return(0,a.jsxs)(s.XI,{children:[(0,a.jsx)(s.A0,{children:(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nd,{children:"Provider"}),(0,a.jsx)(s.nd,{children:"Model"}),(0,a.jsx)(s.nd,{className:"text-right",children:"Input"}),(0,a.jsx)(s.nd,{className:"text-right",children:"Output"}),(0,a.jsx)(s.nd,{className:"text-right",children:"Cache"}),(0,a.jsx)(s.nd,{className:"text-right",children:"Total"}),(0,a.jsx)(s.nd,{className:"text-right",children:"Cost"})]})}),(0,a.jsx)(s.BF,{children:t.models.map(e=>(0,a.jsxs)(s.Hj,{children:[(0,a.jsx)(s.nA,{className:"text-text-2",children:e.provider}),(0,a.jsx)(s.nA,{className:"max-w-40 truncate font-mono text-text",title:e.model,children:e.model}),(0,a.jsx)(s.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.inputTokens)}),(0,a.jsx)(s.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.outputTokens)}),(0,a.jsx)(s.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.cacheTokens)}),(0,a.jsx)(s.nA,{className:"text-right font-semibold tabular-nums text-text",children:(0,o.Sk)(e.totalTokens)}),(0,a.jsx)(s.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,[u,m]=(0,i.useState)(!1);if(n&&!t)return(0,a.jsx)(s.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,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.$n,{variant:"outline",size:"md",title:g,"aria-label":"Token usage — open the per-model breakdown",onClick:()=>{m(!0)},children:[(0,a.jsx)(l.Uy,{"aria-hidden":!0,focusable:!1,className:d?"size-4 text-sev-critical-ink":"size-4 text-primary"}),(0,a.jsx)("span",{className:"max-w-56 truncate tabular-nums",children:h})]}),(0,a.jsx)(s.cj,{open:u,onOpenChange:m,children:(0,a.jsxs)(s.h,{className:"w-200 max-w-[94%] gap-0 overflow-hidden p-0","aria-describedby":void 0,children:[(0,a.jsxs)(s.Fm,{className:"shrink-0 border-b border-border px-5 py-4",children:[(0,a.jsxs)(s.qp,{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Uy,{"aria-hidden":!0,focusable:!1,className:"size-4 text-primary"}),"Token usage",x&&(0,a.jsxs)("span",{className:"text-ui font-normal text-text-3",children:["\xb7 ",x]})]}),p&&(0,a.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,a.jsxs)("span",{children:[t.sessionCount," session",1===t.sessionCount?"":"s"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{className:"font-semibold tabular-nums text-text-2",children:[(0,o.Sk)(t.totalTokens)," tokens"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsx)("span",{className:"font-semibold tabular-nums text-text-2",children:(0,o.xd)(t.estimatedCostUsd,t.costIsPartial)})]})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto px-2 py-2",children:d?(0,a.jsx)("div",{className:"p-3",children:(0,a.jsx)(r.r,{message:d})}):p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c,{summary:t}),t.costIsPartial&&(0,a.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,a.jsx)("div",{className:"p-3",children:(0,a.jsx)(r.A,{message:"No token usage recorded yet — sessions are reconciled as you work."})})})]})})]})}},6570:(e,t,n)=>{n.d(t,{HarnessSelect:()=>o});var a=n(7643),s=n(7228),i=n(8848),l=n(3969),r=n(5233);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],u=d?"All harnesses":1===t.length&&x?l.x[x].label:"".concat(String(t.length)," harnesses");return(0,a.jsxs)(s.rI,{children:[(0,a.jsxs)(s.ty,{className:(0,s.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,a.jsx)(i.k3,{"aria-hidden":!0,focusable:!1,className:(0,s.cn)("size-3.5 shrink-0",d?"text-text-3":"text-primary")}),(0,a.jsx)("span",{className:"flex-1 text-left font-medium text-text",children:u}),!d&&(0,a.jsx)(s.Ex,{variant:"primary",className:"px-1.5 py-0 text-label bg-surface-2",children:t.length}),(0,a.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,a.jsxs)(s.SQ,{align:"start",className:"w-(--radix-dropdown-menu-trigger-width)",children:[(0,a.jsx)(s.hO,{checked:d,onCheckedChange:()=>{n([])},onSelect:e=>{e.preventDefault()},children:"All harnesses"}),(0,a.jsx)(s.mB,{}),c.map(e=>(0,a.jsx)(s.hO,{checked:t.includes(e),onCheckedChange:()=>{let a=t.includes(e)?t.filter(t=>t!==e):[...t,e];n(a.length===c.length?[]:a)},onSelect:e=>{e.preventDefault()},children:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"size-2 shrink-0 rounded-xs",style:{background:l.x[e].color}}),l.x[e].label]})},e))]})]})}},6595:(e,t,n)=>{n.d(t,{BlockedWindowSelect:()=>r});var a=n(7643),s=n(7228),i=n(2229),l=n(8848);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,a.jsxs)(s.rI,{children:[(0,a.jsx)(s.ty,{asChild:!0,children:(0,a.jsxs)(s.$n,{variant:"outline",tone:"neutral",size:"sm",children:[(0,a.jsx)(l.CT,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"}),c,(0,a.jsx)(l.D3,{"aria-hidden":!0,focusable:!1,className:"size-3.5 text-text-3"})]})}),(0,a.jsx)(s.SQ,{align:"end",className:"w-40",children:(0,a.jsx)(s.Hr,{value:r,onValueChange:e=>{o(e)},children:i.Jy.map(e=>(0,a.jsx)(s.Ht,{value:e.value,children:e.label},e.value))})})]})}},6597:(e,t,n)=>{n.d(t,{ScopePicker:()=>c,StateTag:()=>l,StateTagFor:()=>r,_:()=>o});var a=n(7643),s=n(7228),i=n(8540);function l(e){let{state:t}=e;return(0,a.jsx)(s.Ex,{variant:i.hv[t],children:t})}function r(e){let{exception:t,now:n}=e;return(0,a.jsx)(l,{state:(0,i.rO)(t,n)})}function o(e){let{exception:t}=e;return"reveal_to_model"!==t.capability?null:(0,a.jsx)(s.Ex,{variant:"critical",children:i.y3.reveal_to_model})}function c(e){let{value:t,onChange:n}=e;return(0,a.jsx)(s.Iz,{value:null!=t?t:"",onValueChange:e=>{e&&n(e)},children:i.rU.map(e=>(0,a.jsx)(s.tR,{value:e,children:i.DU[e]},e))})}},6669:(e,t,n)=>{n.d(t,{AZ:()=>p,LZ:()=>f,Mk:()=>x,Py:()=>g,Ud:()=>m,j0:()=>a,lr:()=>h,nk:()=>r,pT:()=>u,t$:()=>c});let a=["light","dark","system"],s="system",i="aka-theme",l="(prefers-color-scheme: dark)";function r(e){return"string"==typeof e&&a.includes(e)}let o=null;function c(){if(null!==o)return o;try{let e=window.localStorage.getItem(i);return r(e)?e:s}catch(e){return s}}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 u(e){try{window.localStorage.setItem(i,e),o=null}catch(t){o=e}for(let e of d)e()}function m(){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 s}function f(){return!1}},6673:(e,t,n)=>{n.d(t,{MttrTrendCardView:()=>u});var a=n(7643),s=n(7228),i=n(7881),l=n(8189),r=n(8848),o=n(5114);function c(e){if(null===e||Number.isNaN(e))return"—";let t=Math.round(Math.max(0,e)/6e4),n=Math.floor(t/1440),a=Math.floor((t-=24*n*60)/60);return(t-=60*a,n>0)?a>0?"".concat(String(n),"d ").concat(String(a),"h"):"".concat(String(n),"d"):a>0?t>0?"".concat(String(a),"h ").concat(String(t),"m"):"".concat(String(a),"h"):"".concat(String(Math.max(1,t)),"m")}var d=n(5061);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 u(e){var t;let{points:n,isLoading:i,error:u}=e,m=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,a.jsxs)(s.Zp,{className:"mt-4 shadow-sm xl:mt-5",children:[(0,a.jsxs)(s.aR,{children:[(0,a.jsx)(s.AG,{children:(0,a.jsx)(r.O4,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(s.Lc,{children:[(0,a.jsx)(s.ZB,{children:"Time to remediate"}),(0,a.jsx)(s.BT,{children:"Mean time from detection to resolution, by severity"})]}),(0,a.jsx)(s.X9,{className:"gap-3 text-xs text-text-2",children:(0,a.jsx)(o.N,{series:x,visibility:h,interactive:!u&&!i&&!m,metaLabel:e=>null===p?null:c(p[e])})})]}),(0,a.jsx)(s.Wu,{"aria-busy":i,className:"pb-2",children:u?(0,a.jsx)(d.rJ,{message:u}):i?(0,a.jsx)(s.EA,{className:"h-40 w-full"}):m?(0,a.jsx)(d.AW,{message:"No resolved findings in this range."}):(0,a.jsx)(l.AreaChart,{data:n,series:h.visible,height:160,valueFormat:c})})]})}},7036:(e,t,n)=>{n.d(t,{ExceptionDetailView:()=>d});var a=n(7643),s=n(7228),i=n(1579),l=n(1863),r=n(1166),o=n(6597),c=n(8540);function d(e){var t;let{exception:n,onRevoke:d,busy:x,error:u,renderedAt:m}=e,[p,h]=(0,i.useState)(""),g=(0,c.rO)(n,m);return(0,a.jsxs)("div",{className:"flex flex-col gap-6 rounded-xl border border-border bg-surface p-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"font-mono text-sm font-semibold text-text",children:n.id.slice(0,8)}),(0,a.jsx)(o.StateTagFor,{exception:n,now:m}),(0,a.jsx)(o._,{exception:n})]}),"reveal_to_model"===n.capability&&(0,a.jsxs)("div",{className:"rounded-lg border border-sev-critical-fill bg-sev-critical-fill p-3",children:[(0,a.jsx)(r.e,{className:"text-sev-critical-ink",children:"Reveal to model"}),(0,a.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,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-6 gap-y-4 md:grid-cols-3",children:[(0,a.jsx)(r.p,{label:"Rule",children:(0,a.jsx)("span",{className:"font-mono text-xs",children:n.ruleId})}),(0,a.jsx)(r.p,{label:"Category",children:n.category}),(0,a.jsx)(r.p,{label:"Approved value",children:(0,a.jsx)("span",{className:"font-mono text-xs",children:n.maskedValue})}),(0,a.jsxs)(r.p,{label:"Scope",children:[c.yr[n.scope],"permanent"===n.scope&&" — until revoked"]}),(0,a.jsx)(r.p,{label:"Expires",children:null===n.expiresAt?"—":(0,l.K)(n.expiresAt,m)}),(0,a.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,m))]}),(0,a.jsxs)(r.p,{label:"Created",children:[(0,l.K)(n.createdAt,m)," by ",n.createdBy," via"," ",c.gi[n.createdVia]]}),(0,a.jsx)(r.p,{label:"Key version",children:String(n.keyVersion)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(r.e,{children:"Justification"}),(0,a.jsx)("p",{className:"text-sm text-text-2",children:n.justification})]}),null!==n.revokedAt&&(0,a.jsxs)("div",{className:"rounded-lg border border-sev-critical-fill bg-sev-critical-fill p-3",children:[(0,a.jsx)(r.e,{className:"text-sev-critical-ink",children:"Revoked"}),(0,a.jsxs)("p",{className:"text-sm text-text-2",children:[(0,l.K)(n.revokedAt,m)," by ",null!=(t=n.revokedBy)?t:"unknown",n.revokeReason?" — ".concat(n.revokeReason):""]})]}),d&&"active"===g&&(0,a.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,a.jsx)(r.e,{children:"Revoke this grant"}),(0,a.jsx)("p",{className:"mb-2 text-xs text-text-3",children:"Revocation is immediate and terminal; the row is retained as audit evidence."}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(s.pd,{value:p,onChange:e=>{h(e.target.value)},placeholder:"Reason (recorded in the audit trail)",className:"max-w-sm"}),(0,a.jsx)(s.$n,{variant:"solid",tone:"danger",size:"sm",disabled:x,onClick:()=>{d(p.trim())},children:"Revoke"})]}),u&&(0,a.jsx)("p",{className:"mt-2 text-xs text-sev-critical-ink",children:u})]})]})}},7052:(e,t,n)=>{n.d(t,{$F:()=>c,Ai:()=>d,Jk:()=>u,Zp:()=>x});var a=n(7643),s=n(7228),i=n(8848),l=n(9886),r=n(2494);function o(e){let{tone:t,icon:n,children:i,className:l}=e,[r,o]=(0,s.vV)(t);return(0,a.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,a.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,u]=(0,s.vV)(d.tone),m=d.icon,p=c&&n?(0,r.xf)(n):void 0;return(0,a.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:u},title:p,children:[(0,a.jsx)(m,{"aria-hidden":!0,focusable:!1,className:"size-3"}),d.label,void 0!==p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.ai,{"aria-hidden":!0,focusable:!1,className:"size-3"}),(0,a.jsx)("span",{className:"sr-only",children:p})]})]})}function d(e){let{origin:t}=e,n=l.H9[t];return(0,a.jsx)(o,{tone:n.tone,icon:n.icon,children:n.label})}function x(e){let{version:t}=e;return(0,a.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,a.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t?"Update \xb7 v"+t:"Update"]})}function u(e){let{publisher:t,kind:n}=e,i=l.jP[n],[r]=(0,s.vV)(i.tone),o=i.icon;return(0,a.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-semibold text-text-2",children:[(0,a.jsx)(o,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0",style:{color:r}}),(0,a.jsx)("span",{className:"truncate",title:t,children:t}),i.verified&&(0,a.jsx)("span",{title:i.label,className:"text-[10px] font-bold",style:{color:r},children:"✓"})]})}},7199:(e,t,n)=>{n.d(t,{Cs:()=>f,Gb:()=>c,IF:()=>s,Pe:()=>a,TW:()=>m,WD:()=>d,ZY:()=>i,_t:()=>v,fd:()=>u,iL:()=>h,lx:()=>r,pA:()=>x,v7:()=>p,yx:()=>l,z:()=>j});let a={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."}},s=["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"}},u=[d,x.skill,x.mcp,x.hook,x.config],m=e=>{let{icon:t,fg:n,bg:a}="project"===e?d:x[e];return{icon:t,fg:n,bg:a}};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.")}},7228:(e,t,n)=>{n.d(t,{Ex:()=>m,$n:()=>j,Zp:()=>v,X9:()=>P,Wu:()=>Y,BT:()=>w,aR:()=>b,Lc:()=>y,AG:()=>k,ZB:()=>N,lG:()=>I,R4:()=>z,Cf:()=>S,rr:()=>O,Es:()=>R,c7:()=>A,L3:()=>M,rI:()=>D,hO:()=>H,SQ:()=>B,_2:()=>$,Hr:()=>F,Ht:()=>K,mB:()=>W,ty:()=>E,pd:()=>U,kI:()=>G,dK:()=>Z,WA:()=>J,Eb:()=>q,D2:()=>X,AM:()=>en,hl:()=>es,Wv:()=>ea,t0:()=>p,Iz:()=>el,tR:()=>er,l6:()=>ec,gC:()=>ep,eb:()=>eh,bq:()=>em,yv:()=>ed,Pt:()=>h,cj:()=>ej,h:()=>ev,Qs:()=>ey,Fm:()=>eb,qp:()=>ek,EA:()=>eN,dO:()=>eP,cH:()=>o,id:()=>c,XI:()=>eY,BF:()=>eI,nA:()=>ez,nd:()=>eA,A0:()=>eC,Hj:()=>eS,tU:()=>eO,av:()=>eT,j7:()=>eR,Xi:()=>eL,vw:()=>eD,cn:()=>r,vV:()=>x});var a=n(7643),s=n(9229),i=n(1477);let l=(0,n(7076).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:a}]=e;return[t,"".concat(n," ").concat(a)]}));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 u=(0,s.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 m(e){let{variant:t,className:n,children:s}=e;return(0,a.jsx)("span",{className:r(u({variant:t}),n),children:s})}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,a.jsxs)(m,{variant:t,className:"h-6",children:[(0,a.jsx)("span",{className:r("size-1.5 rounded-full",p[t])}),(0,a.jsx)("span",{className:"capitalize",children:t})]})}var g=n(600);let f=(0,s.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:s,size:i,asChild:l=!1,type:o,...c}=e,d=l?g.DX:"button";return(0,a.jsx)(d,{className:r(f({variant:n,tone:s,size:i}),t),...l?{}:{type:null!=o?o:"button"},...c})}function v(e){let{className:t,...n}=e;return(0,a.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,a.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:s="neutral",...i}=e;return(0,a.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,s)?c[s]:void 0)?t:c.neutral,n),...i})}function y(e){let{className:t,...n}=e;return(0,a.jsx)("div",{"data-slot":"card-heading",className:r("min-w-0",t),...n})}function N(e){let{className:t,...n}=e;return(0,a.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,a.jsx)("div",{"data-slot":"card-description",className:r("text-xs text-text-3",t),...n})}function P(e){let{className:t,...n}=e;return(0,a.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,a.jsx)("div",{"data-slot":"card-content",className:r("p-5",t),...n})}var C=n(9883);let I=C.Root;function S(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(C.Portal,{children:[(0,a.jsx)(C.Overlay,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-50 bg-ink/40"}),(0,a.jsx)(C.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),...s,children:n})]})}function A(e){let{className:t,...n}=e;return(0,a.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 z(e){let{className:t,...n}=e;return(0,a.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 M(e){let{className:t,...n}=e;return(0,a.jsx)(C.Title,{"data-slot":"dialog-title",className:r("font-display text-base font-semibold text-text",t),...n})}function O(e){let{className:t,...n}=e;return(0,a.jsx)(C.Description,{"data-slot":"dialog-description",className:r("text-xs text-text-3",t),...n})}function R(e){let{className:t,...n}=e;return(0,a.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})}C.Trigger,C.Close;var L=n(3512);function T(e){let{className:t}=e;return(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,a.jsx)("path",{d:"M13 4.5 6.5 11 3 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}let D=L.Root,E=L.Trigger;L.Group;let F=L.RadioGroup,V=(0,s.F)("flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{tone:{default:"text-text-2 focus:bg-surface-2 focus:text-text",danger:"text-sev-critical-ink focus:bg-sev-critical-fill focus:text-sev-critical-ink"}},defaultVariants:{tone:"default"}}),_=V();function B(e){let{className:t,sideOffset:n=6,...s}=e;return(0,a.jsx)(L.Portal,{children:(0,a.jsx)(L.Content,{sideOffset:n,className:r("z-50 min-w-32 overflow-hidden rounded-lg border border-border bg-surface p-1 shadow-lg",t),...s})})}function $(e){let{className:t,tone:n,...s}=e;return(0,a.jsx)(L.Item,{className:r(V({tone:n}),t),...s})}function K(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(L.RadioItem,{className:r(_,"data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...s,children:[(0,a.jsx)("span",{className:"flex-1",children:n}),(0,a.jsx)(L.ItemIndicator,{children:(0,a.jsx)(T,{className:"size-4 text-primary"})})]})}function H(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(L.CheckboxItem,{className:r(_,"group data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...s,children:[(0,a.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,a.jsx)(L.ItemIndicator,{children:(0,a.jsx)(T,{className:"size-3"})})}),(0,a.jsx)("span",{className:"flex-1",children:n})]})}function W(e){let{className:t,...n}=e;return(0,a.jsx)(L.Separator,{className:r("-mx-1 my-1 h-px bg-border",t),...n})}function U(e){let{className:t,type:n="text",...s}=e;return(0,a.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),...s})}function G(e){let{value:t,max:n,color:s,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,a.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,a.jsx)("span",{className:"block h-full rounded-full",style:{width:"".concat(String(x),"%"),background:s}})})}function Z(e){let{className:t,...n}=e;return(0,a.jsx)("nav",{"data-slot":"pagination",role:"navigation","aria-label":"Pagination",className:r("flex items-center justify-center gap-3 py-4",t),...n})}function q(e){let{children:t,...n}=e;return(0,a.jsxs)(j,{"data-slot":"pagination-previous",variant:"outline",tone:"neutral",size:"sm",...n,children:[(0,a.jsx)(Q,{"aria-hidden":!0,focusable:!1}),null!=t?t:"Previous"]})}function J(e){let{loading:t=!1,children:n,disabled:s=!1,...i}=e;return(0,a.jsxs)(j,{"data-slot":"pagination-next",variant:"outline",tone:"neutral",size:"sm",disabled:s||t,...i,children:[null!=n?n:t?"Loading…":"Next",t?(0,a.jsxs)("svg",{"aria-hidden":!0,focusable:!1,viewBox:"0 0 16 16",className:"size-3.5 animate-spin",fill:"none",children:[(0,a.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),(0,a.jsx)("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):(0,a.jsx)(ee,{"aria-hidden":!0,focusable:!1})]})}function X(e){let{className:t,...n}=e;return(0,a.jsx)("p",{"data-slot":"pagination-status","aria-live":"polite",className:r("text-xs text-text-3",t),...n})}function Q(e){return(0,a.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,a.jsx)("path",{d:"m15 6-6 6 6 6"})})}function ee(e){return(0,a.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,a.jsx)("path",{d:"m9 6 6 6-6 6"})})}var et=n(5767);let en=et.Root,ea=et.Trigger;function es(e){let{className:t,align:n="start",sideOffset:s=6,collisionPadding:i=8,...l}=e;return(0,a.jsx)(et.Portal,{children:(0,a.jsx)(et.Content,{align:n,sideOffset:s,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})})}et.Close,et.Anchor;var ei=n(8357);function el(e){let{className:t,...n}=e;return(0,a.jsx)(ei.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 er(e){let{className:t,...n}=e;return(0,a.jsx)(ei.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 eo=n(6268);let ec=eo.Root;eo.Group;let ed=eo.Value;function ex(e){let{className:t}=e;return(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,a.jsx)("path",{d:"m4 6 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function eu(e){let{className:t}=e;return(0,a.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:!1,className:t,children:(0,a.jsx)("path",{d:"M13 4.5 6.5 11 3 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function em(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(eo.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),...s,children:[n,(0,a.jsx)(eo.Icon,{asChild:!0,children:(0,a.jsx)(ex,{className:"size-4 shrink-0 text-text-3"})})]})}function ep(e){let{className:t,children:n,position:s="popper",sideOffset:i=6,...l}=e;return(0,a.jsx)(eo.Portal,{children:(0,a.jsxs)(eo.Content,{"data-slot":"select-content",position:s,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"===s&&"w-(--radix-select-trigger-width)",t),...l,children:[(0,a.jsx)(eg,{}),(0,a.jsx)(eo.Viewport,{className:"p-1",children:n}),(0,a.jsx)(ef,{})]})})}function eh(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(eo.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),...s,children:[(0,a.jsx)(eo.ItemText,{children:n}),(0,a.jsx)("span",{className:"absolute right-2.5 flex items-center",children:(0,a.jsx)(eo.ItemIndicator,{children:(0,a.jsx)(eu,{className:"size-4 text-primary"})})})]})}function eg(e){let{className:t,...n}=e;return(0,a.jsx)(eo.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,a.jsx)(ex,{className:"size-4 rotate-180"})})}function ef(e){let{className:t,...n}=e;return(0,a.jsx)(eo.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,a.jsx)(ex,{className:"size-4"})})}let ej=C.Root;function ev(e){let{className:t,children:n,side:s="right",...i}=e;return(0,a.jsxs)(C.Portal,{children:[(0,a.jsx)(C.Overlay,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-40 bg-ink/40 backdrop-blur-[1px]"}),(0,a.jsxs)(C.Content,{"data-slot":"sheet-content",className:r("fixed inset-y-0 z-50 flex h-full w-full max-w-xl flex-col gap-4 overflow-y-auto border-border bg-surface p-6 shadow-lg outline-none","left"===s?"left-0 border-r":"right-0 border-l",t),...i,children:[n,(0,a.jsxs)(C.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,a.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,a.jsx)("path",{d:"M6 6 18 18M18 6 6 18"})}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function eb(e){let{className:t,...n}=e;return(0,a.jsx)("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1 pr-8",t),...n})}function ek(e){let{className:t,...n}=e;return(0,a.jsx)(C.Title,{"data-slot":"sheet-title",className:r("font-display text-lg font-semibold text-text",t),...n})}function ey(e){let{className:t,...n}=e;return(0,a.jsx)(C.Description,{"data-slot":"sheet-description",className:r("text-sm text-text-2",t),...n})}function eN(e){let{className:t,...n}=e;return(0,a.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:r("animate-pulse rounded-md bg-surface-3",t),...n})}C.Trigger,C.Close;var ew=n(9627);function eP(e){let{className:t,...n}=e;return(0,a.jsx)(ew.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,a.jsx)(ew.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 eY(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:"w-full overflow-x-auto",children:(0,a.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,a.jsx)("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b [&_tr]:border-border",t),...n})}function eI(e){let{className:t,...n}=e;return(0,a.jsx)("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",t),...n})}function eS(e){let{className:t,onClick:n,onKeyDown:s,tabIndex:i,role:l,...o}=e,c="function"==typeof n;return(0,a.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==s||s(e),c&&!e.defaultPrevented&&e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),n(e))}:s,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 eA(e){let{scope:t="col",className:n,...s}=e;return(0,a.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),...s})}function ez(e){let{className:t,...n}=e;return(0,a.jsx)("td",{"data-slot":"table-cell",className:r("px-3 py-2 align-middle",t),...n})}var eM=n(3487);let eO=eM.Root;function eR(e){let{className:t,...n}=e;return(0,a.jsx)(eM.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 eL(e){let{className:t,...n}=e;return(0,a.jsx)(eM.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 eT(e){let{className:t,...n}=e;return(0,a.jsx)(eM.Content,{"data-slot":"tabs-content",className:r("focus-visible:outline-none",t),...n})}function eD(e){let{children:t,icon:n,dot:s,className:i}=e;return(0,a.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:[s&&(0,a.jsx)("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:s}}),n,t]})}},7367:(e,t,n)=>{n.d(t,{m:()=>r});var a=n(7228),s=n(1579),i=n(8848);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,s.createElement)(l[t],{"aria-hidden":!0,focusable:!1,className:(0,a.cn)("size-4",n)})}},7532:(e,t,n)=>{n.d(t,{FindingTypesListView:()=>d});var a=n(7643),s=n(7228),i=n(8848),l=n(9158),r=n(3967);function o(e){let{counts:t,selected:n,onChange:i}=e;return(0,a.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,a.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>{i(r?n.filter(t=>t!==e):[...n,e])},className:(0,s.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,a.jsx)("span",{className:(0,s.cn)("size-1.5 rounded-full",s.t0[e])}),e,(0,a.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,a.jsx)("button",{type:"button",onClick:o,"aria-current":l?"true":void 0,className:(0,s.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,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,a.jsx)("span",{className:(0,s.cn)("flex size-7 shrink-0 items-center justify-center rounded-lg",(0,r.i9)(n.category)),children:(0,a.jsx)(c,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:n.subtype,children:n.subtype}),(0,a.jsx)("span",{className:"truncate text-xs text-text-3",children:(0,r.Jm)(n.category)})]}),(0,a.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:u,onSeverityChange:m,hasNextPage:p=!1,hasPreviousPage:h=!1,onNextPage:g,onPreviousPage:f,loadingNextPage:j=!1,pageStart:v,total:b,emptyState:k}=e;return(0,a.jsxs)(s.Zp,{className:"flex h-full flex-col overflow-hidden shadow-sm",children:[(0,a.jsxs)("div",{className:"border-b border-border p-3",children:[(0,a.jsx)(l.SearchField,{value:r,onValueChange:d,label:"Search finding types",placeholder:"Search types…",clearLabel:"Clear type search",surface:"card",className:"h-9"}),(0,a.jsx)(o,{counts:x,selected:u,onChange:m})]}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:0===t.length?(0,a.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,a.jsx)(c,{type:e,sel:e.id===n,onClick:()=>{i(e)}},e.id))}),g&&(h||p||t.length>0)&&(0,a.jsxs)(s.dK,{children:[(0,a.jsx)(s.Eb,{disabled:!h||j,onClick:f}),(0,a.jsx)(s.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,a.jsx)(s.WA,{disabled:!p||j,loading:j,onClick:g})]})]})}},7545:(e,t,n)=>{n.d(t,{i:()=>c});var a=n(7643),s=n(7228),i=n(8848),l=n(223),r=n(5233);function o(e){var t;let{event:n,first:o,last:c,linkHref:d}=e,x=r.$x[n.kind],u="tool"===n.kind&&n.tool&&null!=(t=r.pS[n.tool])?t:x.icon,m="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,a.jsxs)("div",{className:"grid grid-cols-[60px_24px_1fr] gap-x-3",children:[(0,a.jsx)("div",{className:"whitespace-nowrap pt-1.5 text-right font-mono text-label text-text-3",children:(0,l.gE)(n.occurredAt)}),(0,a.jsxs)("div",{className:"relative flex justify-center",children:[!(o&&c)&&(0,a.jsx)("span",{className:(0,s.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,a.jsxs)("span",{className:(0,s.cn)("relative z-10 grid size-6 place-items-center rounded-md ring-2 ring-surface",x.fill,x.text),children:[m&&(0,a.jsx)("span",{className:"absolute inset-0 animate-ping rounded-md bg-current opacity-30"}),(0,a.jsx)(u,{"aria-hidden":!0,focusable:!1,className:"relative size-3.5"})]})]}),(0,a.jsxs)("div",{className:(0,s.cn)("pt-0.5",c?"pb-0":"pb-4.5"),children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[n.bodyExpired?(0,a.jsx)("span",{className:"text-ui font-semibold text-text-2 italic",children:"Body expired"}):(0,a.jsx)("span",{className:"text-ui font-semibold text-text",children:n.title}),n.severity&&(0,a.jsx)(s.Pt,{severity:n.severity}),n.flagged&&(0,a.jsxs)(s.Ex,{variant:"critical",className:"h-6 gap-1.5",children:[(0,a.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"Flagged"]}),n.internal&&(0,a.jsxs)(s.Ex,{variant:"primary",className:"h-6 gap-1.5",children:[(0,a.jsx)(i.Zu,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"Internal"]})]}),(0,a.jsxs)("div",{className:(0,s.cn)("mt-0.5 text-xs text-text-2",p&&"font-mono"),children:[n.detail,h&&g&&(0,a.jsx)(s.$n,{asChild:!0,variant:"link",tone:"primary",className:"ml-2 text-xs font-normal",children:(0,a.jsxs)("a",{href:g,children:["Open in ",h,(0,a.jsx)(i.Qq,{"aria-hidden":!0,focusable:!1})]})})]})]})]})}function c(e){let{events:t,linkHref:n}=e;return(0,a.jsx)("div",{children:t.map((e,s)=>(0,a.jsx)(o,{event:e,first:0===s,last:s===t.length-1,...n?{linkHref:n}:{}},e.id))})}},7692:(e,t,n)=>{n.d(t,{MatcherModal:()=>g,RuleInspectorBody:()=>h});var a=n(7643),s=n(7228),i=n(8848),l=n(9886);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,a.jsxs)("div",{className:"text-xs text-text-2",children:["+",String(t)," more not shown"]})}function c(e){let{children:t}=e;return(0,a.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,a.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,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(u,{label:"Pattern",children:(0,a.jsx)(d,{emphasis:!0,children:t.pattern})}),(0,a.jsx)(u,{label:"Flags",children:(0,a.jsx)("code",{className:"font-mono text-xs text-text-2",children:t.flags||"—"})}),"number"==typeof t.captureGroup&&(0,a.jsx)(u,{label:"Capture group",children:(0,a.jsx)("span",{className:"font-mono text-xs text-text-2",children:t.captureGroup})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(u,{label:"Keywords",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.keywords.map((e,t)=>(0,a.jsx)(c,{children:e},"".concat(e,"-").concat(String(t))))})}),(0,a.jsx)(u,{label:"Case sensitive",children:(0,a.jsx)("span",{className:"text-xs text-text-2",children:t.caseSensitive?"Yes":"No"})})]})}function u(e){let{label:t,children:n}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:t}),n]})}function m(e){var t,n,s,i;let{rule:o}=e,d=o.requiresNearby,x=d?[...(null!=(n=d.categories)?n:[]).map(e=>"category ".concat(l.gh[e]||e)),...(null!=(s=d.ruleIds)?s:[]).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,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3",children:[o.appliesTo&&(0,a.jsx)(u,{label:"Only in files",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.appliesTo.extensions.map((e,t)=>(0,a.jsx)(c,{children:e},"".concat(e,"-").concat(String(t))))})}),o.postValidators&&o.postValidators.length>0&&(0,a.jsx)(u,{label:"Must also pass",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.postValidators.map((e,t)=>{var n;let s="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,a.jsx)(c,{children:i?"".concat(s," \xb7 ").concat(i):s},"".concat(s,"-").concat(String(t)))})})}),d&&(0,a.jsxs)(u,{label:"Needs corroboration within ".concat(String(d.windowChars)," chars"),children:[(0,a.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,a.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,a.jsxs)("div",{className:"flex flex-col gap-2",children:[n.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.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,a.jsx)("span",{className:"text-xs text-text-2",children:r(e.label,120)}),void 0!==e.filePath&&(0,a.jsx)("span",{className:"font-mono text-label text-text-3",children:r(e.filePath,120)})]}),(0,a.jsx)(d,{children:r(e.text,1e3)})]},"".concat(r(e.label,120),"-").concat(String(t)))),(0,a.jsx)(o,{hidden:t.length-n.length})]})}function h(e){var t;let{rule:n,fixtures:s}=e,c=l.rE[n.matcher.type];if(!c)return null;let h=c.icon,g=null!=(t=n.examples)?t:[],j=(null==s?void 0:s.ruleId)===n.id?s.cases:[];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,a.jsx)(f,{icon:(0,a.jsx)(i.kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:l.gh[n.category]||n.category}),(0,a.jsx)(f,{icon:(0,a.jsx)(h,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:c.blurb})]}),(0,a.jsx)(x,{matcher:n.matcher}),(0,a.jsx)(m,{rule:n}),g.length>0&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(u,{label:"Catches values like",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[g.slice(0,20).map((e,t)=>{let n=r(e,1e3);return(0,a.jsx)(d,{children:n},"".concat(n,"-").concat(String(t)))}),(0,a.jsx)(o,{hidden:g.length-20})]})})}),j.length>0&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(u,{label:"Test cases (".concat(String(j.length),")"),children:(0,a.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,a.jsx)(s.lG,{open:o,onOpenChange:e=>{e||r()},children:(0,a.jsx)(s.Cf,{className:"max-w-3xl","aria-describedby":void 0,children:t&&c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.L3,{className:"sr-only",children:["Rule \xb7 ",t.name]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-5 py-4",children:[(0,a.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg",style:{background:c.fill,color:c.color},children:d&&(0,a.jsx)(d,{"aria-hidden":!0,focusable:!1,className:"size-4.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"font-display text-base font-semibold text-text",children:t.name}),(0,a.jsx)(s.Pt,{severity:t.severity})]}),(0,a.jsx)("div",{className:"mt-px font-mono text-xs text-text-3",children:t.id})]}),(0,a.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,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:r,"aria-label":"Close",className:"size-8 text-text-3",children:(0,a.jsx)(i.uv,{"aria-hidden":!0,focusable:!1})})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-5",children:(0,a.jsx)(h,{rule:t,fixtures:n})})]})})})}function f(e){let{icon:t,children:n}=e;return(0,a.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]})}},7881:(e,t,n)=>{n.d(t,{l:()=>a});let a={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)"}},7971:(e,t,n)=>{n.d(t,{PWo:()=>eD,HUb:()=>nl,spO:()=>n8,H3X:()=>n7,tLs:()=>E,V0H:()=>ni,MhX:()=>n1,fhc:()=>nx,F$B:()=>nJ,hzO:()=>aF,xdw:()=>L,ap_:()=>O,UKt:()=>R,T2I:()=>nh,lgf:()=>nq,kqf:()=>nC,O2m:()=>n2,bkE:()=>nK,EL9:()=>n$,qEQ:()=>t6,DLF:()=>n_,hds:()=>nL,dnP:()=>nG,Ly$:()=>n5,y6l:()=>t8});var a=n(2914);let s=a.Ikc({thresholdInputTokens:a.aig().int().positive(),input:a.aig().nonnegative().nullable(),output:a.aig().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 a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.freeze({input:e,output:t,longContext:void 0===a.longContext?null:Object.freeze(a.longContext),cacheWrite5m:null,cacheWrite1h:null,cacheRead:null!=(n=a.cacheRead)?n:null,webSearch:null})}a.Ikc({input:a.aig().nonnegative(),output:a.aig().nonnegative(),longContext:s.nullable(),cacheWrite5m:a.aig().nonnegative().nullable(),cacheWrite1h:a.aig().nonnegative().nullable(),cacheRead:a.aig().nonnegative().nullable(),webSearch:a.aig().nonnegative().nullable()});let r=Object.freeze({input:0,output:0,longContext:null,cacheWrite5m:0,cacheWrite1h:0,cacheRead:0,webSearch:0});a.k5n(["anthropic","openai","google","meta","mistral","deepseek","alibaba","xai","amazon","cohere","unknown"]),a.k5n(["anthropic","openai","google-ai","mistral","deepseek","xai","cohere","bedrock","vertex","azure","foundry","together","fireworks","groq","openrouter","ollama","local"]),a.k5n(["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"]),u=Object.freeze(["us","eu","apac","au","jp","global"]);class m{model(e,t){var n,a,s,i,l,o,x,u,m,p,h,g,f,j,v,b,k,y,N,w,P,Y;let C=null!=(a=null!=(n=t.family)?n:this.defaults.family)?a:{id:e,name:t.name},I=!1===t.firstParty?null:(w=this.vendor,null!=(P=d.get(w))?P:null),S=null!=(i=null!=(s=t.openWeights)?s:this.defaults.openWeights)&&i,A=null!=(o=null!=(l=t.region)?l:this.defaults.region)?o:null,z=null!=(u=null!=(x=t.retention)?x:this.defaults.retention)?u:"unknown",M=new Map;for(let e of(null!==I&&M.set(I,Object.freeze({platform:I,hosting:c(I),firstParty:!0,price:null!=(m=t.price)?m:null,retention:z,region:A})),null!=(p=t.on)?p:[])){let{platform:n,price:a,retention:s,region:i}="string"==typeof e?{platform:e}:e,l=(Y=this.vendor,d.get(Y)===n),o=c(n),x="local"===o;M.set(n,Object.freeze({platform:n,hosting:o,firstParty:l,price:null!=a?a:x?r:l&&null!=(h=t.price)?h:null,retention:null!=s?s:x?"on_infrastructure":l?z:"unknown",region:void 0===i?l?A:null:i}))}let O=null!=(f=null!=(g=t.defaultHosting)?g:this.defaults.defaultHosting)?f:null===I?"gateway":c(I);if(void 0!==t.price&&![...M.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 R={id:e,vendor:this.vendor,displayName:t.name,familyId:C.id,familyName:C.name,capability:null!=(j=t.capability)?j:null,contextWindow:null!=(v=t.ctx)?v:null,maxOutputTokens:null!=(b=t.maxOut)?b:null,openWeights:S,aliases:Object.freeze([...null!=(k=t.aliases)?k:[]]),training:null!=(y=this.defaults.training)?y:null,platforms:M,defaultHosting:O,seen:null!=(N=t.seen)?N:"managed"};return Object.freeze(R),Object.freeze(R.aliases),this.entries.push(R),R}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 m(e,t)}RegExp("^(?:".concat(u.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"}),P=["bedrock","together","fireworks","groq","openrouter","ollama","local"];w.model("llama-3-3-70b",{name:"Llama 3.3 70B",ctx:128e3,on:[...P]}),w.model("llama-3-1-70b",{name:"Llama 3.1 70B",ctx:128e3,on:[...P]}),w.model("llama-3-1-8b",{name:"Llama 3.1 8B",ctx:128e3,on:[...P]});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:[...P]}),Y.model("qwen-3-coder-480b",{name:"Qwen 3 Coder 480B",capability:"code",on:[...P]});let C=p("amazon",{family:{id:"nova",name:"Nova"},retention:"configurable"});C.model("nova-2-lite",{name:"Nova 2 Lite",ctx:1e6,maxOut:64e3,aliases:["nova-2-lite-v1:0"],on:["bedrock"]});let I=p("mistral",{family:{id:"mistral",name:"Mistral"},openWeights:!0,retention:"unknown",defaultHosting:"local"});I.model("mixtral-8x7b",{name:"Mixtral 8x7B",seen:"discovered",on:[...P]}),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(),...I.models(),...w.models(),...Y.models(),...C.models()])),a.k5n(["reasoning","code"]),a.k5n(["zero_retention","no_storage","configurable","on_device","on_infrastructure","unknown"]),a.k5n(["managed","discovered"]);let S=a.k5n(["yes","no","unknown"]),A=a.k5n(["opt-in","opt-out","none","unknown"]);a.Ikc({apiDefault:S,consumerDefault:S,consumerControl:A,source:a.YjP().nullable()});let z=a.k5n(["api","consumer","enterprise","unknown"]);a.Ikc({tier:z,controlExercised:a.zMY().nullable()}),Object.freeze({tier:"unknown",controlExercised:null}),Object.freeze(["gateway","unknown","cli","api","chatgpt","claude-ai"]);let M=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function O(e){return M.format(e)}function R(e){return e>0&&e<.1?"$".concat(e.toFixed(4)):"$".concat(e.toFixed(2))}function L(e,t){return t?"≥ ".concat(R(e)):R(e)}var T=n(2613),D=n(3673);let E={ClaudeCode:"claudecode",Cursor:"cursor",Copilot:"copilot",Codex:"codex",Antigravity:"antigravity",Windsurf:"windsurf",ClaudeDesktop:"claudedesktop",ChatGpt:"chatgpt",ClaudeAi:"claudeai",Api:"api",AiTcSdk:"ai-tc-sdk"},F=a.k5n(E).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",AiTcSdk:"ai-tc-sdk"},_=a.k5n(V).meta({id:"SourceTool"});_.extract(["ChatGpt","ClaudeAi"]),V.ClaudeCode,E.ClaudeCode,V.ClaudeDesktop,E.ClaudeDesktop,V.Copilot,E.Copilot,V.Cursor,E.Cursor,V.ChatGpt,E.ChatGpt,V.Codex,E.Codex,V.Antigravity,E.Antigravity,V.ClaudeAi,E.ClaudeAi,V.AiTcSdk,E.AiTcSdk;let B=a.k5n(["pii","financial","secret","phi","code_context","code_flaw","custom","config"]).meta({id:"DetectionCategory"}),$=a.k5n(["critical","high","medium","low"]).meta({id:"Severity"}),K=a.k5n(["warn","redact","block","allow","log"]).meta({id:"ActionTaken"}),H=K.options,W=a.Ikc({start:a.aig().int().nonnegative(),end:a.aig().int().nonnegative()}).meta({id:"Span"});a.Ikc({id:a.OsD(),eventId:a.OsD(),ruleId:a.YjP(),category:B,severity:$,span:W,maskedMatch:a.YjP(),actionTaken:K,confidence:a.aig().min(0).max(1)}).meta({id:"Finding"}).meta({id:"DetectedFinding"});let U=a.k5n(["blocked","redacted","warned","allowed","quarantined","monitored"]).meta({id:"FindingAction"}),G=F.extract(["ClaudeCode","ClaudeDesktop","Cursor","Copilot","ChatGpt","ClaudeAi","Codex","Antigravity","Api","AiTcSdk"]).meta({id:"FindingProvider"}),Z=a.k5n(["secret","pii","source_code","code_flaw","external_share","mcp_server","customer_data","financial","phi","custom"]).meta({id:"FindingCategory"});a.k5n(["in-flight","at-rest"]).meta({id:"FindingOrigin"});let q=a.k5n(["open","handled","resolved","dismissed"]).meta({id:"FindingStatus"}),J=a.k5n(["deployment_refused","payload_invalid","detached_undelivered"]).meta({id:"SyncFailureReason"}),X=a.k5n(["sent","queued","not_sent","never_offered","local_scan"]).meta({id:"FindingDeliveryState"}),Q=a.Ikc({state:X,at:T.w$().optional(),reason:J.optional()}).meta({id:"FindingDelivery"}),ee=a.k5n(["enforced-in-flight","fixed-at-source","exception","acknowledged","false-positive","redetected"]).meta({id:"ResolutionMethod"}),et=a.Ikc({maskedValue:a.YjP(),contextPrefix:a.YjP()}).meta({id:"FindingMatch"}),en=a.Ikc({id:a.YjP(),name:a.YjP().nullable()}).meta({id:"FindingDetectionRef"}),ea=a.Ikc({id:a.YjP(),name:a.YjP()}).meta({id:"FindingPolicyRef"}),es=a.Ikc({id:a.YjP(),name:a.YjP()}).meta({id:"FindingUser"}),ei=a.Ikc({id:a.YjP(),provider:G,repo:a.YjP(),file:a.YjP(),user:es.optional(),toolName:a.YjP().optional(),action:U,detectedAt:T.w$(),confidence:a.aig().min(0).max(1),status:q.optional(),eventId:a.YjP().optional(),sessionId:a.YjP().optional(),delivery:Q.optional()}).meta({id:"FindingInstance"}),el=a.Ikc({id:a.YjP(),category:Z,subtype:a.YjP(),severity:$,match:et,detection:en,policy:ea,instanceCount:a.aig().int().nonnegative(),providers:a.YOg(G),aggregateAction:U.nullable(),latestDetectedAt:T.w$(),instances:a.YOg(ei),status:q.optional(),users:a.YOg(es).optional()}).meta({id:"FindingGroup"});a.Ikc({findings:a.aig().int().nonnegative(),groups:a.aig().int().nonnegative(),bySeverity:a.Ikc({critical:a.aig().int().nonnegative(),high:a.aig().int().nonnegative(),medium:a.aig().int().nonnegative(),low:a.aig().int().nonnegative()})}).meta({id:"FindingStats"});let er=a.Ikc({value:a.YjP(),count:a.aig().int().nonnegative()}).meta({id:"FindingFacetItem"}),eo=a.Ikc({severity:a.YOg(er),subtype:a.YOg(er),provider:a.YOg(er),action:a.YOg(er),status:a.YOg(er),tool:a.YOg(er).optional(),deployment:a.YOg(er).optional()}).meta({id:"FindingFacets"}),ec=el.omit({instances:!0,match:!0}).meta({id:"FindingTypeSummary"});a.Ikc({severity:a.YOg($).optional(),subtype:a.YOg(a.YjP()).optional(),provider:a.YOg(G).optional(),action:a.YOg(U).optional(),status:a.YOg(q).optional(),q:a.YjP().optional(),sessionId:a.YjP().optional(),from:T.w$().optional(),includeId:a.YjP().optional(),limit:D.ai().int().min(1).max(100).optional(),cursor:a.YjP().optional()}),a.Ikc({totals:a.Ikc({findings:a.aig().int().nonnegative(),types:a.aig().int().nonnegative()}),facets:eo,items:a.YOg(ec),nextCursor:a.YjP().nullable(),sessionFirings:a.g1P(a.YjP(),a.aig().int().nonnegative()).optional()}).meta({id:"ListFindingTypesResponse"}),a.Ikc({action:U.exclude(["quarantined"]),instanceId:a.YjP().optional()}).meta({id:"ApplyFindingActionRequest"}),el.meta({id:"ApplyFindingActionResponse"}),a.Ikc({severity:a.YOg($).optional(),subtype:a.YOg(a.YjP()).optional(),provider:a.YOg(G).optional(),action:a.YOg(U).optional(),q:a.YjP().optional(),format:a.k5n(["csv","json"]).optional()});let ed=ei.extend({groupId:a.YjP(),category:Z,subtype:a.YjP(),severity:$,match:et,detection:en,policy:ea}).meta({id:"FindingInstanceDetail"});a.Ikc({severity:a.YOg($).optional(),subtype:a.YOg(a.YjP()).optional(),provider:a.YOg(G).optional(),action:a.YOg(U).optional(),status:a.YOg(q).optional(),tool:a.YOg(a.YjP()).optional(),deployment:a.YOg(X).optional(),repo:a.YjP().optional(),file:a.YjP().optional(),q:a.YjP().optional(),sessionId:a.YjP().optional(),from:T.w$().optional(),limit:D.ai().int().min(1).max(200).optional(),cursor:a.YjP().optional()}),a.Ikc({totals:a.Ikc({findings:a.aig().int().nonnegative()}),facets:eo,items:a.YOg(ed),nextCursor:a.YjP().nullable()}).meta({id:"ListFindingInstancesResponse"}),a.Ikc({items:a.YOg(ed),nextCursor:a.YjP().nullable()}).meta({id:"ListFindingInstancesPage"});let ex=a.Ikc({id:a.YjP(),repo:a.YjP(),file:a.YjP(),instanceCount:a.aig().int().nonnegative(),maxSeverity:$,latestDetectedAt:T.w$(),status:q.optional(),ruleIds:a.YOg(a.YjP())}).meta({id:"FindingLocationSummary"});a.Ikc({severity:a.YOg($).optional(),subtype:a.YOg(a.YjP()).optional(),provider:a.YOg(G).optional(),action:a.YOg(U).optional(),status:a.YOg(q).optional(),tool:a.YOg(a.YjP()).optional(),deployment:a.YOg(X).optional(),q:a.YjP().optional(),sessionId:a.YjP().optional(),from:T.w$().optional(),includeId:a.YjP().optional(),limit:D.ai().int().min(1).max(100).optional(),cursor:a.YjP().optional()}),a.Ikc({totals:a.Ikc({findings:a.aig().int().nonnegative(),locations:a.aig().int().nonnegative()}),facets:eo,items:a.YOg(ex),nextCursor:a.YjP().nullable()}).meta({id:"ListFindingLocationsResponse"});let eu=a.k5n(["host","harness","user","skill","hook","mcp_server","config_file"]).meta({id:"InventoryObjectType"}),em=a.k5n(["session","run","tool_call","llm_call","source_lookup","prompt","response","code_change","tool_use","model_refusal","request_decision","config_scan","capture_status"]).meta({id:"AuditEventType"}),ep=a.g1P(a.YjP(),a.L5J());a.Ikc({host_name:a.YjP().optional(),os:a.YjP().optional(),os_version:a.YjP().optional(),arch:a.YjP().optional()}).catchall(a.L5J()),a.Ikc({harness_version:a.YjP().optional(),interface:a.YjP().optional()}).catchall(a.L5J()),a.Ikc({display_name:a.YjP().optional(),email:a.YjP().optional()}).catchall(a.L5J()),a.Ikc({source:a.YjP().optional(),version:a.YjP().optional(),description:a.YjP().optional(),updated_at:a.YjP().optional(),scope:a.YjP().optional(),plugin_name:a.YjP().optional()}).catchall(a.L5J()),a.Ikc({event:a.YjP().optional(),matcher:a.YjP().optional(),command:a.YjP().optional(),scope:a.YjP().optional(),plugin_name:a.YjP().optional(),timeout:a.aig().optional()}).catchall(a.L5J()),a.Ikc({scope:a.YjP().optional(),transport:a.YjP().optional(),command:a.YjP().optional(),url:a.YjP().optional(),env_keys:a.YOg(a.YjP()).optional(),plugin_name:a.YjP().optional(),marketplace:a.YjP().optional(),project:a.YjP().optional()}).catchall(a.L5J()),a.Ikc({kind:a.YjP().optional(),detail:a.YjP().optional(),scope:a.YjP().optional(),updated_at:a.YjP().optional(),entry_count:a.aig().optional()}).catchall(a.L5J());let eh=a.Ikc({model:a.YjP().optional(),provider:a.YjP().optional(),input_tokens:a.aig().int().nonnegative().optional(),output_tokens:a.aig().int().nonnegative().optional(),cache_creation_input_tokens:a.aig().int().nonnegative().optional(),cache_read_input_tokens:a.aig().int().nonnegative().optional(),ephemeral_1h_input_tokens:a.aig().int().nonnegative().optional(),ephemeral_5m_input_tokens:a.aig().int().nonnegative().optional(),web_search_requests:a.aig().int().nonnegative().optional(),web_fetch_requests:a.aig().int().nonnegative().optional(),service_tier:a.YjP().optional(),stop_reason:a.YjP().optional(),message_id:a.YjP().optional(),uuid:a.YjP().optional(),parent_uuid:a.YjP().optional(),run_key:a.YjP().optional()}).catchall(a.L5J());a.Ikc({sessionId:a.YjP().min(1),messageId:a.YjP().min(1),parentId:a.YjP().min(1),rootSessionId:a.YjP().min(1),startedAt:T.w$(),attributes:eh});let eg=a.Ikc({tool_name:a.YjP().optional(),tool_use_id:a.YjP().optional(),target:a.YjP().optional(),is_error:a.zMY().optional(),input_size:a.aig().int().nonnegative().optional(),output_size:a.aig().int().nonnegative().optional(),uuid:a.YjP().optional(),parent_uuid:a.YjP().optional(),run_key:a.YjP().optional()}).catchall(a.L5J());a.Ikc({source_tool:a.YjP().optional(),file_path:a.YjP().optional(),repo:a.YjP().optional(),tool_name:a.YjP().optional(),gitignored:a.zMY().optional(),whole_file:a.zMY().optional(),correlation_id:a.uRe().optional(),trace_id:a.YjP().regex(/^[0-9a-f]{32}$/).optional(),exception_ids:a.YOg(a.OsD()).optional(),message_id:a.YjP().optional(),conversation_id:a.YjP().optional(),inspection_ms:a.aig().int().nonnegative().optional(),redact_degraded_to:K.optional()}).catchall(a.L5J()),a.Ikc({source_tool:a.YjP().optional(),patched:a.zMY().optional(),live:a.zMY().optional(),blind:a.zMY().optional(),sends_seen_dom:a.aig().int().nonnegative().optional(),exchanges_seen_net:a.aig().int().nonnegative().optional(),parse_failures:a.aig().int().nonnegative().optional(),unparsed_bodies:a.aig().int().nonnegative().optional(),shape_misses:a.YOg(a.YjP()).optional(),conversation_endpoints:a.aig().int().nonnegative().optional(),closed:a.zMY().optional(),enforcement:a.YjP().optional()}).catchall(a.L5J());let ef=a.Ikc({ruleId:a.YjP().min(1),ruleName:a.YjP(),ruleVersion:a.YjP().min(1),category:B,severity:$,span:W,maskedMatch:a.YjP(),actionTaken:K,confidence:a.aig().min(0).max(1)});a.Ikc({sessionId:a.YjP().min(1),toolUseId:a.YjP().min(1),parentId:a.YjP().min(1),rootSessionId:a.YjP().min(1),startedAt:T.w$(),attributes:eg,inspections:a.YOg(ef).default([])});let ej=a.Ikc({objectType:eu,identityKey:a.YjP().min(1),location:a.YjP().optional(),title:a.YjP().optional(),hostId:a.YjP().optional(),attributes:ep.default({})}).meta({id:"InventoryInput"}),ev=a.Ikc({url:a.YjP().min(1),name:a.YjP().optional(),attributes:ep.default({})}).meta({id:"SourceProjectInput"}),eb=a.Ikc({id:a.YjP().min(1),eventType:em,startedAt:T.w$(),endedAt:T.w$().optional(),parentId:a.YjP().optional(),rootSessionId:a.YjP().optional(),hostId:a.YjP().optional(),harnessId:a.YjP().optional(),sourceProjectId:a.YjP().optional(),severity:$.optional(),priority:a.YjP().optional(),content:a.YjP().optional(),contentHash:a.YjP().optional(),attributes:ep.optional()}).meta({id:"AuditEventInput"});a.Ikc({class:a.YjP().min(1),label:a.YjP().optional(),attributes:ep.optional()});let ek=a.Ikc({ruleId:a.YjP().min(1),version:a.YjP().min(1),name:a.YjP(),category:B,severity:$,definition:a.YjP()});a.Ikc({id:a.YjP().min(1),auditEventId:a.YjP().min(1),inspectionDefinitionId:a.YjP().min(1),classifiedDataId:a.YjP().optional(),span:W,maskedMatch:a.YjP(),actionTaken:K,confidence:a.aig().min(0).max(1),findingKey:a.YjP().optional(),firstDetectedAt:T.w$().optional()}),a.Ikc({host:ej.optional(),harness:ej.optional(),project:ev.optional()}).meta({id:"InventoryContext"}),a.Ikc({hostId:a.YjP().optional(),harnessId:a.YjP().optional(),accountId:a.YjP().optional(),sourceProjectId:a.YjP().optional()}).meta({id:"ResolvedInventory"}),a.Ikc({hosts:a.YOg(a.YjP()),harnesses:a.YOg(a.YjP()),osVersions:a.YOg(a.YjP()),projects:a.YOg(a.YjP())}).meta({id:"InventoryFacets"});let ey=a.Ikc({sessionId:a.YjP(),model:a.YjP(),provider:a.YjP(),inputTokens:a.aig().int().nonnegative(),outputTokens:a.aig().int().nonnegative(),cacheCreation:a.aig().int().nonnegative(),cacheRead:a.aig().int().nonnegative(),totalTokens:a.aig().int().nonnegative(),estimatedCostUsd:a.aig().nullable()}).meta({id:"TokenRollup"});a.Ikc({sessionId:a.YjP(),rollups:a.YOg(ey),totalTokens:a.aig().int().nonnegative(),estimatedCostUsd:a.aig().nullable(),costIsPartial:a.zMY()});let eN=a.Ikc({provider:a.YjP(),model:a.YjP(),inputTokens:a.aig().int().nonnegative(),outputTokens:a.aig().int().nonnegative(),cacheTokens:a.aig().int().nonnegative(),totalTokens:a.aig().int().nonnegative(),estimatedCostUsd:a.aig().nullable()});a.Ikc({models:a.YOg(eN),sessionCount:a.aig().int().nonnegative(),totalTokens:a.aig().int().nonnegative(),estimatedCostUsd:a.aig(),costIsPartial:a.zMY()});let ew=a.k5n(["active","completed","interrupted","error"]),eP=a.k5n(["session","prompt","response","tool","hook","detection","share","permission","commit","error","active"]),eY=a.k5n(["detections","shares","inventory"]),eC=a.Ikc({id:a.YjP(),occurredAt:T.w$(),kind:eP,title:a.YjP(),detail:a.YjP(),tool:a.YjP().nullable(),severity:$.nullable(),link:eY.nullable(),targetId:a.YjP().nullable(),internal:a.zMY(),flagged:a.zMY(),bodyExpired:a.zMY().default(!1)}).meta({id:"ActivityAuditEvent"}),eI=a.Ikc({id:a.YjP(),harness:F,title:a.YjP(),project:a.YjP(),repo:a.YjP(),branches:a.YOg(a.YjP()),startedAt:T.w$(),endedAt:T.w$().nullable(),status:ew,turns:a.aig().int().nonnegative(),findings:a.aig().int().nonnegative(),shares:a.aig().int().nonnegative()}).meta({id:"ActivitySessionSummary"});eI.extend({host:a.YjP(),cwd:a.YjP(),models:a.YOg(a.YjP()),version:a.YjP(),tokens:ey,tools:a.g1P(a.YjP(),a.aig().int().nonnegative()),files:a.YOg(a.YjP()),commits:a.aig().int().nonnegative(),events:a.YOg(eC)}).meta({id:"ActivitySession"}),a.Ikc({tz:a.YjP().optional()});let eS=a.Ikc({sessionsToday:a.aig().int().nonnegative(),liveNow:a.aig().int().nonnegative(),toolCallsToday:a.aig().int().nonnegative(),findingsToday:a.aig().int().nonnegative(),egressToday:a.aig().int().nonnegative()}).meta({id:"GetActivityStatsResponse"});a.Ikc({q:a.YjP().optional(),harness:a.YOg(F).optional(),from:a.KCZ([T.p6(),T.w$()]).optional(),to:a.KCZ([T.p6(),T.w$()]).optional(),excludeEmpty:a.uEf().optional(),limit:D.ai().int().min(1).max(100).default(50),cursor:a.YjP().optional()});let eA=a.Ikc({items:a.YOg(eI),nextCursor:a.YjP().nullable(),emptyCount:a.aig().int().nonnegative()}).meta({id:"ListActivitySessionsResponse"});a.Ikc({limit:D.ai().int().min(1).max(500).default(100),cursor:a.YjP().optional(),order:a.k5n(["asc","desc"]).default("asc")}),a.Ikc({items:a.YOg(eC),nextCursor:a.YjP().nullable()}).meta({id:"ListSessionEventsResponse"}),a.Ikc({format:a.k5n(["ndjson","json"]).default("ndjson")}),a.Ikc({format:a.k5n(["csv","json"]).default("csv"),q:a.YjP().optional(),harness:a.YOg(F).optional(),from:a.KCZ([T.p6(),T.w$()]).optional(),to:a.KCZ([T.p6(),T.w$()]).optional()}),a.Ikc({stats:eS,sessions:eA}).meta({id:"ActivityOverviewResponse"});let ez=a.k5n(["user","project","local","plugin"]),eM=a.Ikc({name:a.YjP().min(1),source:a.YjP().min(1),scope:ez,pluginName:a.YjP().optional(),version:a.YjP().optional(),description:a.YjP().optional(),updatedAt:T.w$().optional(),location:a.YjP().optional()}),eO=a.Ikc({event:a.YjP().min(1),matcher:a.YjP().optional(),command:a.YjP().min(1),timeout:a.aig().optional(),scope:ez,pluginName:a.YjP().optional(),location:a.YjP().optional()}),eR=a.Ikc({name:a.YjP().min(1),scope:ez,pluginName:a.YjP().optional(),marketplace:a.YjP().optional(),project:a.YjP().optional(),transport:a.YjP().min(1),command:a.YjP().optional(),url:a.YjP().optional(),envKeys:a.YOg(a.YjP()).optional(),location:a.YjP().optional()}),eL=a.Ikc({name:a.YjP().min(1),path:a.YjP().min(1),scope:ez,kind:a.YjP().min(1),detail:a.YjP().optional(),entryCount:a.aig().optional(),updatedAt:T.w$().optional()});a.Ikc({scannedAt:T.w$(),skills:a.YOg(eM),hooks:a.YOg(eO),mcpServers:a.YOg(eR),configFiles:a.YOg(eL),errors:a.YOg(a.Ikc({source:a.YjP(),reason:a.YjP()}))});let eT=a.Ikc({ruleId:a.YjP().min(1),version:a.YjP().min(1),span:W,maskedMatch:a.YjP(),actionTaken:K,confidence:a.aig().min(0).max(1)});a.Ikc({items:a.YOg(ej),scanEvent:eb,definitions:a.YOg(ek).optional(),findings:a.YOg(eT).optional()});let eD=a.k5n(["project","skill","mcp","hook","config"]).meta({id:"AssetType"}),eE=a.k5n(["open","approved","blocked"]).meta({id:"AccessLevel"}),eF=a.k5n(["source","public-dep","vendored","config","data","docs","generated"]).meta({id:"Origin"}),eV=a.k5n(["known-good","risky","unapproved"]).meta({id:"TrustLevel"}),e_=a.k5n(["update","stale","conflict","unknown","change","untracked","risk","findings"]).meta({id:"Flag"}),eB=a.k5n(["public","private"]).meta({id:"Visibility"}),e$=a.k5n(["block","redact","warn"]).meta({id:"HarnessEventKind"}),eK=F.extract(["ClaudeCode","Cursor","Codex","Antigravity","Copilot"]).meta({id:"HarnessId"}),eH=a.Ikc({open:a.aig().int().nonnegative(),approved:a.aig().int().nonnegative(),blocked:a.aig().int().nonnegative(),total:a.aig().int().nonnegative()}).meta({id:"AccessCounts"}),eW=a.Ikc({id:a.YjP(),type:eD,name:a.YjP(),sub:a.YjP(),flags:a.YOg(e_),trust:eV.optional()}).meta({id:"AssetSummary"}),eU=a.Ikc({id:a.YjP(),name:a.YjP(),repo:a.YjP(),visibility:eB,language:a.YjP(),policyDefault:eE,updatedAt:T.w$(),accessCounts:eH,findingsCount:a.aig().int().nonnegative()}).meta({id:"ProjectSummary"}),eG=a.Ikc({type:eD,assets:a.YOg(eW)}),eZ=a.Ikc({id:eK,label:a.YjP(),kind:a.YjP(),version:a.YjP(),sessions:a.aig().int().nonnegative(),assetCount:a.aig().int().nonnegative(),flagCount:a.aig().int().nonnegative(),projects:a.YOg(eU),categories:a.YOg(eG)}).meta({id:"HarnessSummary"});a.Ikc({items:a.YOg(eZ)}).meta({id:"ListHarnessesResponse"});let eq=a.Ikc({type:eD,total:a.aig().int().nonnegative(),trustRollup:a.Ikc({"known-good":a.aig().int().nonnegative(),risky:a.aig().int().nonnegative(),unapproved:a.aig().int().nonnegative()}).partial().strict().optional(),flagRollup:a.Ikc({update:a.aig().int().nonnegative(),stale:a.aig().int().nonnegative(),conflict:a.aig().int().nonnegative(),unknown:a.aig().int().nonnegative(),change:a.aig().int().nonnegative(),untracked:a.aig().int().nonnegative(),risk:a.aig().int().nonnegative(),findings:a.aig().int().nonnegative()}).partial().strict(),items:a.YOg(eW)}).meta({id:"AssetGroup"});a.Ikc({groups:a.YOg(eq)}).meta({id:"ListAssetsResponse"});let eJ=a.Ikc({name:a.YjP(),signature:a.YjP(),description:a.YjP(),write:a.zMY(),risk:a.YjP().nullable()}).meta({id:"McpTool"}),eX=a.Ikc({id:a.YjP(),title:a.YjP(),note:a.YjP()});eW.extend({description:a.YjP().nullable(),trust:eV.nullable(),meta:a.g1P(a.YjP(),a.L5J()),finding:eX.nullable(),tools:a.YOg(eJ).optional()}).meta({id:"AssetDetail"}),a.Ikc({items:a.YOg(eU)}).meta({id:"ListProjectsResponse"}),a.Ikc({attention:a.aig().int().nonnegative(),byType:a.Ikc({project:a.aig().int().nonnegative(),skill:a.aig().int().nonnegative(),mcp:a.aig().int().nonnegative(),hook:a.aig().int().nonnegative(),config:a.aig().int().nonnegative()}),harnesses:a.aig().int().nonnegative(),mcpTrust:a.Ikc({"known-good":a.aig().int().nonnegative(),risky:a.aig().int().nonnegative(),unapproved:a.aig().int().nonnegative()})}).meta({id:"InventoryStats"});let eQ=a.Ikc({path:a.YjP(),name:a.YjP(),origin:eF,access:eE,isCustom:a.zMY(),findings:a.aig().int().nonnegative(),blockedAt:T.w$().nullable().optional(),note:a.YjP().nullable().optional()}).meta({id:"FileSummary"}),e0=a.Ikc({name:a.YjP(),path:a.YjP(),accessCounts:eH}).meta({id:"FolderSummary"});a.Ikc({project:a.Ikc({id:a.YjP(),repo:a.YjP(),visibility:eB}),path:a.YjP(),folders:a.YOg(e0).optional(),files:a.YOg(eQ)}).meta({id:"ProjectTreeResponse"}),eQ.extend({project:a.Ikc({repo:a.YjP(),visibility:eB,language:a.YjP(),policyDefault:eE,updatedAt:T.w$()}),findingsRefs:a.YOg(a.Ikc({id:a.YjP(),title:a.YjP()}))}).meta({id:"FileDetail"}),a.Ikc({path:a.YjP(),access:eE}).meta({id:"SetFileAccessBody"}),a.Ikc({file:eQ,accessCounts:eH}).meta({id:"SetFileAccessResponse"}),a.Ikc({trust:eV}).meta({id:"SetMcpTrustBody"});let e1=a.Ikc({kind:e$,title:a.YjP(),detail:a.YjP(),occurredAt:T.w$(),findingId:a.YjP().nullable().optional()}).meta({id:"HarnessEventItem"});a.Ikc({counts:a.Ikc({block:a.aig().int().nonnegative(),redact:a.aig().int().nonnegative(),warn:a.aig().int().nonnegative()}),items:a.YOg(e1)}).meta({id:"HarnessEventsResponse"}),a.Ikc({jobId:a.YjP(),startedAt:T.w$()}).meta({id:"RescanResponse"}),a.Ikc({repo:a.YjP()}).meta({id:"ConnectProjectBody"}),a.Ikc({type:a.YOg(eD).optional(),q:a.YjP().optional()}),a.Ikc({path:a.YjP().optional(),q:a.YjP().optional(),filter:a.k5n(["blocked"]).optional()}),a.Ikc({path:a.YjP()}),a.Ikc({limit:D.ai().int().min(1).max(50).default(7)});let e2=a.k5n(["provider","internal","external","ip"]).meta({id:"DestinationKind"}),e5=a.k5n(["https","http","sftp","grpc","smtp","ws","wss"]).meta({id:"Transport"}),e3=a.k5n(["secrets","pii","customer","source","telemetry","logs","metrics","none"]).meta({id:"DataClass"}),e4=e3.options,e6=a.k5n(["recognized","internal","unverified","ip"]).meta({id:"ShareTrustLevel"}),e8=a.k5n(["allow","block"]).meta({id:"EgressDecision"}),e7=a.k5n(["allowed","blocked","review"]).meta({id:"EgressStatus"}),e9=a.k5n(["raw_ip","unverified_domain","plaintext_transport"]).meta({id:"ReviewReason"}),te=a.k5n(["GET","POST","PUT","DELETE","SDK","REF"]).meta({id:"HttpMethod"}),tt=a.Ikc({needsReview:a.zMY(),reasons:a.YOg(e9)}).meta({id:"ReviewInfo"}),tn=a.Ikc({port:a.aig().int().nullable(),geo:a.YjP().nullable(),ptr:a.YjP().nullable()}).meta({id:"DestinationNetwork"}),ta=a.Ikc({id:a.YjP(),method:te,transport:e5,url:a.YjP(),template:a.zMY(),dataClass:e3,lastSeen:T.w$(),callSiteCount:a.aig().int().nonnegative()}).meta({id:"EndpointSummary"}),ts=a.Ikc({id:a.YjP(),project:a.YjP(),file:a.YjP(),line:a.aig().int().nonnegative(),snippet:a.YjP(),dynamic:a.zMY(),vendored:a.zMY(),projectId:a.YjP().nullable()}).meta({id:"CallSite"}),ti=ta.extend({sites:a.YOg(ts)}).meta({id:"EndpointWithSites"}),tl=a.Ikc({id:a.YjP(),kind:e2,name:a.YjP(),host:a.YjP(),providerId:a.YjP().nullable(),category:a.YjP(),trust:e6,status:e7,isCustom:a.zMY(),lastSeen:T.w$(),endpointCount:a.aig().int().nonnegative(),callSiteCount:a.aig().int().nonnegative(),transports:a.YOg(e5),dataClasses:a.YOg(e3),review:tt,network:tn.nullable(),endpoints:a.YOg(ta)}).meta({id:"ShareDestinationSummary"});tl.omit({endpointCount:!0,callSiteCount:!0,endpoints:!0}).extend({note:a.YjP().nullable(),endpoints:a.YOg(ti)}).meta({id:"ShareDestinationDetail"});let tr=a.Ikc({id:a.YjP(),kind:e2,name:a.YjP(),host:a.YjP(),providerId:a.YjP().nullable(),trust:e6,status:e7,review:tt,topDataClass:e3,callSiteCount:a.aig().int().nonnegative(),lastSeen:T.w$()}).meta({id:"ReviewDestination"}),to=a.Ikc({kind:e2,total:a.aig().int().nonnegative(),items:a.YOg(tl)}).meta({id:"ShareDestinationGroup"});a.Ikc({groups:a.YOg(to)}).meta({id:"ListShareDestinationsResponse"}),a.Ikc({items:a.YOg(tr)}).meta({id:"NeedsReviewResponse"}),a.Ikc({destinations:a.aig().int().nonnegative(),endpoints:a.aig().int().nonnegative(),callSites:a.aig().int().nonnegative(),needsReview:a.aig().int().nonnegative(),insecure:a.aig().int().nonnegative(),byKind:a.Ikc({provider:a.aig().int().nonnegative(),internal:a.aig().int().nonnegative(),external:a.aig().int().nonnegative(),ip:a.aig().int().nonnegative()}),byTrust:a.Ikc({recognized:a.aig().int().nonnegative(),internal:a.aig().int().nonnegative(),unverified:a.aig().int().nonnegative(),ip:a.aig().int().nonnegative()})}).meta({id:"SharesStats"}),a.Ikc({decision:e8.nullable()}).meta({id:"SetEgressDecisionBody"}),a.Ikc({destination:tl}).meta({id:"SetEgressDecisionResponse"}),a.Ikc({q:a.YjP().optional(),kind:a.YOg(e2).optional(),groupBy:a.k5n(["destination"]).default("destination"),review:a.uEf().default(!1)}),a.Ikc({format:a.k5n(["csv","json"]).default("csv"),q:a.YjP().optional(),kind:a.YOg(e2).optional()});let tc=a.k5n(["npm","pypi","go","maven","rubygems","cargo","composer","nuget"]).meta({id:"EgressEcosystem"});a.Ikc({id:a.YjP(),name:a.YjP(),category:a.YjP(),hostSuffixes:a.YOg(a.YjP()).min(1),apiBase:a.YjP(),defaultDataClasses:a.YOg(e3).min(1),sdks:a.jgl(tc,a.YOg(a.YjP()))}).meta({id:"ProviderRegistryEntry"});let td=a.Ikc({file:a.YjP(),line:a.aig().int().positive(),snippet:a.YjP(),dynamic:a.zMY(),vendored:a.zMY()}).meta({id:"EgressCallSiteHit"}),tx=a.Ikc({host:a.YjP(),kind:e2,name:a.YjP(),category:a.YjP(),providerId:a.YjP().nullable(),trust:e6,network:tn.nullable(),method:te,transport:e5,url:a.YjP(),template:a.zMY(),dataClass:e3,site:td}).meta({id:"ResolvedEgressHit"}),tu=a.gMt("mode",[a.Ikc({mode:a.euz("walk"),walkedPrefix:a.YjP()}),a.Ikc({mode:a.euz("ledger"),scannedFiles:a.YOg(a.YjP()),deletedFiles:a.YOg(a.YjP())})]).meta({id:"EgressReconcile"});a.Ikc({projectKey:a.YjP().min(1),project:a.YjP(),projectId:a.YjP().nullable(),reconcile:tu,hits:a.YOg(tx)}).meta({id:"RecordProjectEgressInput"}),a.Ikc({destinations:a.aig().int().nonnegative(),endpoints:a.aig().int().nonnegative(),callSites:a.aig().int().nonnegative(),truncated:a.zMY(),droppedFiles:a.YOg(a.YjP()).default([])}).meta({id:"EgressWriteSummary"}),a.Ikc({specVersion:a.euz(1),endpoint:a.YjP().min(1),apiKey:a.YjP().min(1),keyPrefix:a.YjP().min(1).max(16).optional(),mintedAt:T.w$().optional()});let tm=a.Ikc({packId:a.YjP().min(1),version:a.YjP().min(1),enabled:a.zMY(),updatedAt:a.YjP().nullable()}).meta({id:"StorePosturePack"}),tp=a.Ikc({total:a.aig().int().min(0),disabled:a.aig().int().min(0),byAction:a.Ikc({warn:a.aig().int().min(0),redact:a.aig().int().min(0),block:a.aig().int().min(0),allow:a.aig().int().min(0),log:a.aig().int().min(0)}).strict()}).meta({id:"StorePosturePolicyCounts"}),th=a.Ikc({package:a.YjP().min(1).max(200),version:a.YjP().min(1).max(64),ossVersion:a.YjP().max(64).nullable(),policyBundleVersion:a.YjP().max(200).nullable(),policyFetchedAt:a.aig().int().min(0).max(0xe677d21fdbff).nullable()}).meta({id:"StorePosturePlugin"});a.Ikc({deviceId:a.OsD(),hostname:a.YjP().min(1).max(253),capturedAt:a.aig().int().min(0).max(0xe677d21fdbff),storePresent:a.zMY(),schemaVersion:a.aig().int().min(0).max(0x7fffffff).nullable(),findingsTotal:a.aig().int().min(0).max(0x7fffffff),findingsFirstAt:a.aig().int().min(0).max(0xe677d21fdbff).nullable(),findingsLastAt:a.aig().int().min(0).max(0xe677d21fdbff).nullable(),packs:a.YOg(tm).max(500),policyCounts:tp,plugin:th.optional()}).meta({id:"StorePostureSnapshot"});let tg="capture/",tf=eb.extend({inspections:a.YOg(ef).default([])}).refine(e=>e.inspections.every(e=>!e.ruleVersion.startsWith(tg)),{message:"inspections[].ruleVersion must not start with `".concat(tg,"` — that namespace is reserved for capture definitions the control plane mints itself"),path:["inspections"]}).meta({id:"RecordAuditEventRequest"});a.Ikc({events:a.YOg(tf).min(1).max(50)}).meta({id:"RecordAuditEventBatch"});let tj=a.Ikc({host:a.YjP(),kind:e2,name:a.YjP(),category:a.YjP(),providerId:a.YjP().nullable().optional(),trust:e6,network:tn.nullable(),method:te,transport:e5,url:a.YjP(),template:a.zMY(),dataClass:e3,site:a.Ikc({file:a.YjP(),line:a.aig().int().positive(),dynamic:a.zMY(),vendored:a.zMY()})}).meta({id:"EgressIngestHit"});a.Ikc({projectKey:a.YjP().regex(/^[0-9a-f]{64}$/,"projectKey must be a 64-character lowercase hex digest"),project:a.YjP(),reconcile:tu,hits:a.YOg(tj)}).meta({id:"EgressIngestRequest"}),a.Ikc({accepted:a.aig().int().nonnegative(),duplicates:a.aig().int().nonnegative()}),a.Ikc({accepted:a.aig().int().nonnegative()});let tv=RegExp("^[^\\p{Cc}\\p{Cf}]*$","u"),tb=e=>a.YjP().max(e).regex(tv,"must not contain control characters");a.Ikc({tenantName:tb(200),userEmail:tb(320),role:tb(64),keyKind:tb(64),serverTime:tb(64)}),a.Ikc({error:a.Ikc({code:a.YjP().optional(),message:a.YjP().optional()}).optional()}),a.k5n(["unauthorized","forbidden","route-absent","invalid-request","rejected","unreachable"]).extract(["unauthorized","forbidden","unreachable"]),a.Ikc({deviceId:tb(128).min(1),hostname:tb(255).min(1),os:tb(64).min(1),cliVersion:tb(64).min(1),label:tb(200).optional()}).meta({id:"AttachDeviceRequest"}),a.Ikc({deviceCode:tb(128).min(1)}).meta({id:"AttachTokenRequest"}),a.Ikc({deviceCode:tb(128),userCode:tb(32),verificationUri:tb(512),verificationUriComplete:tb(512).optional(),expiresIn:a.aig().int().positive(),interval:a.aig().int().positive()});let tk=a.Ikc({status:a.euz("pending")}),ty=a.Ikc({status:a.euz("slow_down"),interval:a.aig().int().positive()}),tN=a.Ikc({status:a.euz("denied"),message:tb(500).optional()}),tw=a.Ikc({status:a.euz("expired")}),tP=a.Ikc({status:a.euz("issued"),apiKey:a.YjP().min(1).max(512),endpoint:tb(512),tenantName:tb(200).optional(),userEmail:tb(320).optional()});a.KCZ([tP,tk,ty,tN,tw,a.Ikc({status:tb(64)})]);let tY=a.k5n(["shares_rescan"]),tC=a.Ikc({id:tb(128).min(1),kind:tY,issuedAt:tb(64).min(1),expiresAt:tb(64).min(1)}).strict();a.Ikc({command:tC.nullable()});let tI=a.k5n(["scan_failed","no_projects","expired"]);a.gMt("outcome",[a.Ikc({outcome:a.euz("reported"),projectsScanned:a.aig().int().nonnegative()}).strict(),a.Ikc({outcome:a.euz("failed"),reason:tI,projectsScanned:a.aig().int().nonnegative()}).strict()]);let tS=a.YjP().regex(/^[a-z][a-z0-9-]*$/),tA=a.YjP().regex(/^[a-z][a-z0-9-]*$/),tz=a.YjP().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?$/),tM=a.k5n(["labs","user","org"]),tO=a.k5n(["keyword","regex"]).meta({id:"MatcherType"});a.k5n(["safe","quarantined"]).meta({id:"RuleProbeVerdict"});let tR=a.rej({type:a.euz("keyword"),keywords:a.YOg(a.YjP().min(1)).min(1),caseSensitive:a.zMY().default(!1)});function tL(e){return e.replace(/[gy]/g,"")}let tT=a.rej({type:a.euz("regex"),pattern:a.YjP().min(1).max(2e3),flags:a.YjP().default("gi"),captureGroup:a.aig().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,tL(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,"|"),tL(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.")})}),tD=a.gMt("type",[tR,tT]).meta({id:"Matcher"});tO.options;let tE=a.rej({extensions:a.YOg(a.YjP().regex(/^\.[A-Za-z0-9]+$/)).min(1)}).meta({id:"AppliesTo"}),tF=a.k5n(["entropy","luhn"]).meta({id:"PostValidatorName"}),tV=a.KCZ([tF,a.rej({name:tF,config:a.g1P(a.YjP(),a.L5J()).optional()})],{error:()=>"not a valid post-validator: use a bare name (".concat(tF.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"}),t_=a.rej({categories:a.YOg(B).min(1).optional(),ruleIds:a.YOg(a.YjP().min(1)).min(1).optional(),labels:a.YOg(a.YjP().min(1)).min(1).optional(),windowChars:a.aig().int().positive().default(160),confidenceBoost:a.aig().min(0).max(.3).optional()}).refine(e=>{var t,n,a,s,i,l;return(null!=(s=null==(t=e.categories)?void 0:t.length)?s:0)+(null!=(i=null==(n=e.ruleIds)?void 0:n.length)?i:0)+(null!=(l=null==(a=e.labels)?void 0:a.length)?l:0)>0},{message:"requiresNearby needs at least one of categories, ruleIds, or labels"}).meta({id:"RequiresNearby"});a.rej({label:a.YjP(),text:a.YjP().max(5e4),shouldMatch:a.zMY(),filePath:a.YjP().optional(),expectedSpans:a.YOg(a.rej({start:a.aig(),end:a.aig()})).optional()}).meta({id:"RuleFixture"});let tB=a.rej({specVersion:a.euz(1),id:a.YjP().regex(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/),name:a.YjP(),category:B,severity:$,matcher:tD,appliesTo:tE.optional(),postValidators:a.YOg(tV).optional(),requiresNearby:t_.optional(),examples:a.YOg(a.YjP()).optional()}).meta({id:"Rule"}),t$=a.Ikc({name:a.YjP(),email:a.Rpp().optional(),url:a.OZ5().optional()}).meta({id:"Author"});a.Ikc({specVersion:a.euz(1),id:a.YjP(),name:a.YjP(),version:a.YjP(),rules:a.YOg(a.YjP()),description:a.YjP().optional(),author:t$.optional(),license:a.YjP().optional(),sourceUrl:a.OZ5().optional()}).meta({id:"PackManifest"});let tK=a.k5n(["library","custom"]).meta({id:"OriginEnum"}),tH=a.k5n(["all","library","custom","customized","updates"]),tW=a.k5n(["new","imported","update"]).meta({id:"LibraryStateEnum"}),tU=a.Ikc({all:a.aig().int().nonnegative(),library:a.aig().int().nonnegative(),custom:a.aig().int().nonnegative(),customized:a.aig().int().nonnegative(),updates:a.aig().int().nonnegative()}).meta({id:"DetectionCounts"}),tG=a.Ikc({id:a.YjP(),name:a.YjP(),version:tz,enabled:a.zMY(),origin:tK,publisher:tS.optional(),publisherKind:tM.optional(),ruleCount:a.aig().int().nonnegative(),namespace:tS,packId:tA,policyId:a.YjP().optional(),latestVersion:tz.optional()}).meta({id:"DetectionListItem"});a.Ikc({counts:tU,items:a.YOg(tG)}).meta({id:"ListDetectionsResponse"}),a.Ikc({filter:tH.optional().default("all"),q:a.YjP().optional()}),a.Ikc({detections:a.aig().int().nonnegative(),rules:a.aig().int().nonnegative(),active:a.aig().int().nonnegative(),findingsLast30d:a.aig().int().nonnegative()}).meta({id:"DetectionStats"});let tZ=a.Ikc({id:a.YjP(),name:a.YjP(),category:B,severity:$,matcher:tD,appliesTo:tE.optional(),postValidators:a.YOg(tV).optional(),requiresNearby:t_.optional(),examples:a.YOg(a.YjP()).optional()}).meta({id:"DetectionRule"}),tq=a.Ikc({available:a.zMY(),latestVersion:tz,latestRuleCount:a.aig().int().nonnegative().optional()}).nullable().meta({id:"DetectionUpdate"});a.Ikc({id:a.YjP(),name:a.YjP(),version:tz,enabled:a.zMY(),origin:tK,publisher:tS.optional(),publisherKind:tM.optional(),ruleCount:a.aig().int().nonnegative(),namespace:tS,packId:tA,description:a.YjP().optional(),editedAt:T.w$(),findingsLast30d:a.aig().int().nonnegative(),latestVersion:tz.nullable().optional(),update:tq,rules:a.YOg(tZ),modified:a.zMY(),policyId:a.YjP().optional()}).meta({id:"DetectionDetail"});let tJ=a.Ikc({id:a.YjP(),name:a.YjP(),publisher:tS,publisherKind:tM.optional(),category:B.optional(),version:tz,ruleCount:a.aig().int().nonnegative(),description:a.YjP().optional(),updatedAt:T.w$(),state:tW,importedAs:a.YjP().nullable()}).meta({id:"LibraryItem"});a.Ikc({categories:a.YOg(B),items:a.YOg(tJ)}).meta({id:"ListLibraryResponse"}),a.Ikc({libraryId:a.YjP().refine(e=>/^[^/]+\/[^/]+$/.test(e),{message:"libraryId must be in namespace/packId format"})}).meta({id:"ImportDetectionRequest"});let tX=a.k5n(["prompt","response","code_change","tool_use"]).meta({id:"EventKind"});tX.options.map(e=>"'".concat(e,"'")).join(",");let tQ=a.Ikc({sessionId:a.YjP().optional(),repo:a.YjP().optional(),filePath:a.YjP().optional(),toolName:a.YjP().optional(),gitignored:a.zMY().optional(),wholeFile:a.zMY().optional(),model:a.YjP().optional(),turnIndex:a.aig().int().nonnegative().optional(),correlationId:a.uRe().optional(),traceId:a.YjP().regex(/^[0-9a-f]{32}$/).optional(),exceptionIds:a.YOg(a.OsD()).optional(),messageId:a.YjP().min(1).optional(),conversationId:a.YjP().optional(),inspectionMs:a.aig().int().nonnegative().optional(),redactDegradedTo:K.optional()}).meta({id:"EventMetadata"}),t0=a.Ikc({id:a.OsD(),sourceTool:_,kind:tX,occurredAt:T.w$(),contentHash:a.YjP(),content:a.YjP(),metadata:tQ.optional()}).meta({id:"Event"}).meta({id:"IngestEvent"});a.Ikc({events:a.YOg(t0).min(1).max(100),dedupe:a.euz("content-hash").optional()}).meta({id:"IngestBatch"});let t1=a.k5n(["once","temporary","permanent"]),t2=a.Ikc({repo:a.YjP().optional(),sourceTool:a.YjP().optional(),provider:a.YjP().optional()}).strict(),t5=a.k5n(["suppress","reveal_to_model"]),t3=a.Ikc({id:a.OsD(),ruleId:a.YjP(),category:B,valueFingerprint:a.YjP().regex(/^[0-9a-f]{64}$/),keyVersion:a.aig().int().positive(),maskedValue:a.YjP(),capability:t5.default("suppress"),scope:t1,expiresAt:T.w$().nullable(),maxUses:a.aig().int().positive().nullable(),useCount:a.aig().int().nonnegative(),lastUsedAt:T.w$().nullable(),justification:a.YjP().min(1),conditions:t2.nullable(),createdBy:a.YjP(),createdVia:a.k5n(["cli-approve","cli-add","web-approve","web-add","api","setup-triage"]),createdAt:T.w$(),updatedAt:T.w$(),revokedAt:T.w$().nullable(),revokedBy:a.YjP().nullable(),revokeReason:a.YjP().nullable()}),t4=t3.pick({id:!0,ruleId:!0,valueFingerprint:!0,keyVersion:!0,capability:!0,expiresAt:!0,maxUses:!0,useCount:!0,conditions:!0});function t6(e,t){return"present"===t.status&&t.version===e}function t8(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.")}t3.omit({valueFingerprint:!0});let t7=a.YjP().optional();a.Ikc({reference:a.YjP(),scope:a.YjP(),reason:a.YjP(),confirmation:t7}),a.Ikc({ruleId:a.YjP(),value:a.YjP(),scope:a.YjP(),reason:a.YjP(),confirmation:t7}),a.Ikc({pointer:a.YjP(),scope:a.YjP(),justification:a.YjP(),confirmation:t7}),a.Ikc({id:a.YjP(),reason:a.YjP()}),a.Ikc({confirmation:a.YjP()}),J.options,new WeakMap,new WeakMap,Object.fromEntries($.options.map((e,t)=>[e,t]));let t9=a.Ikc({id:a.OsD(),namespace:tS,packId:tA,version:tz,name:a.YjP(),enabled:a.zMY().default(!0),policyId:a.YjP().optional()}).meta({id:"InstalledPack"});a.Ikc({namespace:tS,packId:tA,version:tz}).meta({id:"InstallPackRequest"}),a.Ikc({items:a.YOg(t9)}).meta({id:"ListInstalledPacksResponse"}),a.Ikc({enabled:a.zMY().optional(),policyId:a.YjP().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 ne=a.k5n(["global","repo","user"]).meta({id:"PolicyScope"}),nt=a.KCZ([a.Ikc({ruleId:a.YjP()}),a.Ikc({category:B})]).meta({id:"PolicyTarget"}),nn=a.k5n(["builtin","custom"]).meta({id:"PolicyKind"}),na=a.k5n(["builtin","authored"]).meta({id:"PolicyProvenance"}),ns=a.Ikc({id:a.OsD(),scope:ne,target:nt,action:K,enabled:a.zMY().default(!0),customKeywords:a.YOg(a.YjP()).optional(),name:a.YjP().optional(),provenance:na.optional()}).meta({id:"Policy"}),ni=["monitor","warn","redact","vault","block"],nl=a.k5n(ni).meta({id:"BuiltinPolicyId"}),nr=nl.extract(["monitor","warn","block"]).meta({id:"RedactFallback"});[...Object.keys(a.Ikc({version:a.YjP(),policies:a.YOg(ns),rules:a.YOg(tB).optional(),rulesComplete:a.zMY().optional(),exceptions:a.YOg(t4).optional(),reversibleRuleIds:a.YOg(a.YjP()).optional(),ruleVersions:a.g1P(a.YjP(),a.YjP()).optional(),prohibitedModels:a.YOg(a.YjP()).optional(),redactFallback:nr.optional(),customKeywords:a.YOg(a.YjP()),fetchedAt:T.w$()}).meta({id:"PolicyBundle"}).shape),...Object.keys(ns.shape).map(e=>"policies.".concat(e)),...nt.options.flatMap(e=>"shape"in e?Object.keys(e.shape):[]).map(e=>"policies.target.".concat(e)),...Object.keys(t4.shape).map(e=>"exceptions.".concat(e))].sort().join(",");let no=["config"];B.options.filter(e=>!no.includes(e));let nc={secret:"critical",financial:"critical",code_flaw:"critical",pii:"high",phi:"high",custom:"high",code_context:"low",config:"low"},nd={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 nx(e){return nd[e].action}let nu=[...new Set(ni.map(nx))],nm=[...H.filter(e=>!nu.includes(e)),...nu];function np(e){return nm.indexOf(e)}function nh(e,t){return np(e)>=np(t)}a.Ikc({floor:nl,locked:a.zMY()}).describe("PackPolicyFloor");let ng=ni.filter(e=>!nd[e].reversible);ni.filter(e=>nd[e].reversible);let nf=a.k5n(ng).meta({id:"CategoryPolicyId"});Object.fromEntries(B.options.map(e=>[e,nx(function(e){if(no.includes(e))return"monitor";let t=nc[e];return"critical"===t||"high"===t?"warn":"monitor"}(e))])),Object.fromEntries(ni.map(e=>[e,{id:e,...nd[e]}]));let nj=a.Ikc({id:a.YjP(),name:a.YjP(),ruleCount:a.aig().int().nonnegative(),enabled:a.zMY()}).meta({id:"UsedByItem"}),nv=a.Ikc({id:a.YjP(),kind:nn,name:a.YjP(),enabled:a.zMY(),usedByCount:a.aig().int().nonnegative()}).meta({id:"PolicyListItem"});a.Ikc({items:a.YOg(nv)}).meta({id:"ListPoliciesResponse"}),a.Ikc({specVersion:a.euz(1),id:a.YjP(),kind:nn,name:a.YjP(),enabled:a.zMY(),description:a.YjP(),usedBy:a.YOg(nj)}).meta({id:"PolicyDetail"}),a.Ikc({policies:a.aig().int().nonnegative(),builtin:a.aig().int().nonnegative(),custom:a.aig().int().nonnegative(),detectionsGoverned:a.aig().int().nonnegative()}).meta({id:"PolicyStatsResponse"});let nb=B.options.join("|"),nk=new RegExp("\\[\\[aka:(?:".concat(nb,"):[A-Z2-7]{2,7}\\.[A-Z2-7]{26}\\.[A-Z2-7]{16}\\]\\]")),ny=new RegExp("^".concat(nk.source,"$"));a.YjP().regex(ny),a.Ikc({category:B,keyVersion:a.aig().int().positive(),pointerId:a.YjP(),tag:a.YjP()}),a.Ikc({pointerId:a.YjP(),valueFingerprint:a.YjP().regex(/^[0-9a-f]{64}$/),fingerprintKeyVersion:a.aig().int().positive(),keyVersion:a.aig().int().positive(),category:B,ruleId:a.YjP(),maskedMatch:a.YjP(),provider:a.YjP().optional(),ciphertext:a.YjP(),nonce:a.YjP(),authTag:a.YjP(),occurrenceCount:a.aig().int().nonnegative(),userAuthorized:a.zMY(),firstSeen:a.YjP(),lastSeen:a.YjP()}),a.Ikc({category:B,provider:a.YjP().optional(),maskedMatch:a.YjP(),occurrences:a.aig().int().nonnegative(),firstSeen:a.YjP(),lastSeen:a.YjP()}),a.Ikc({ruleId:a.YjP(),valueFingerprint:a.YjP().regex(/^[0-9a-f]{64}$/),fingerprintKeyVersion:a.aig().int().positive()});let nN=a.k5n(["human","model"]),nw=a.k5n(["display","explicit-reveal","view-render","model-input","remediation","purge"]),nP=a.k5n(["revealed","refused","unavailable"]),nY=["display","view-render"];function nC(e){return nY.includes(e)}let nI=a.Ikc({id:a.OsD(),pointerId:a.YjP(),at:a.YjP(),target:nN,reason:nw,outcome:nP,grantId:a.YjP().optional(),pointerCount:a.aig().int().positive().default(1)}),nS=a.k5n(["prompt","tool-input","tool-output","file","transcript"]),nA=a.Ikc({location:a.YjP(),kind:nS,firstSeen:a.YjP(),lastSeen:a.YjP()}),nz=a.Ikc({pointerId:a.YjP(),category:B,provider:a.YjP().optional(),maskedMatch:a.YjP(),occurrences:a.aig().int().nonnegative(),firstSeen:a.YjP(),lastSeen:a.YjP(),revealGrantId:a.YjP().nullable(),sightings:a.YOg(nA)});a.Ikc({limit:D.ai().int().min(1).max(200).optional(),cursor:a.YjP().optional()}),a.Ikc({totals:a.Ikc({values:a.aig().int().nonnegative()}),items:a.YOg(nz),nextCursor:a.YjP().nullable()}),a.Ikc({limit:D.ai().int().min(1).max(200).optional(),cursor:a.YjP().optional()}),a.Ikc({totals:a.Ikc({reused:a.aig().int().nonnegative()}),items:a.YOg(nz),nextCursor:a.YjP().nullable()}),a.Ikc({includeBatched:a.zMY().optional(),limit:D.ai().int().min(1).max(200).optional(),cursor:a.YjP().optional()}),a.Ikc({items:a.YOg(nI),nextCursor:a.YjP().nullable(),hiddenBatched:a.aig().int().nonnegative()});let nM=a.YjP(),nO=a.k5n(["masked","full","off"]),nR=a.Ikc({acknowledgedAt:T.w$(),version:a.aig().int().positive()});function nL(e){return(null==e?void 0:e.version)===1}let nT=a.k5n(["standalone","attached"]),nD=a.Ikc({endpoint:a.YjP().min(1),label:a.YjP().min(1).optional(),attachedAt:T.w$()}).meta({id:"ControlPlaneConnection"}),nE=a.k5n(["redact","warn"]),nF=a.k5n(["full","session-only"]),nV=a.Ikc({acknowledgedAt:T.w$(),payloadVersion:a.aig().int().positive()});function n_(e){return(null==e?void 0:e.payloadVersion)===1}let nB=a.Ikc({acknowledgedAt:T.w$(),payloadVersion:a.aig().int().positive(),endpoint:a.YjP()});function n$(e,t){return void 0!==e&&void 0!==t&&3===e.payloadVersion&&e.endpoint===t}function nK(e,t){return void 0!==e&&void 0!==t&&e.endpoint===t&&3!==e.payloadVersion}let nH=a.Ikc({acknowledgedAt:T.w$(),version:a.aig().int().positive()}),nW=a.k5n(["with-findings","always","never"]),nU=a.Ikc({responses:nW.default("with-findings"),account:a.zMY().default(!1),consent:nH.optional()});function nG(e){return(null==e?void 0:e.version)===1}let nZ=a.Ikc({enabled:a.zMY().default(!1),retainDays:a.aig().int().min(1).max(3650).default(30)}).meta({id:"BodyRetention"});function nq(e){return"attached"===e.runMode&&void 0!==e.controlPlane}function nJ(e){var t;return null!=(t=e.label)?t:e.endpoint}a.Ikc({specVersion:a.aig().int().positive().default(8),runMode:nT.default("standalone"),controlPlane:nD.optional(),policy:nE.default("redact"),historicalAccess:nF.default("session-only"),dataSharesInPlace:a.zMY().default(!0),vaultConsent:nR.optional(),vaultKeyCustody:nM.default("file"),vaultInlineReveal:nO.default("masked"),redactFallback:nr.default("warn"),onboardedAt:T.w$().optional(),modelJudgeConsent:nV.optional(),historySyncConsent:nB.optional(),webChatCapture:nU.optional(),bodyRetention:nZ.default({enabled:!1,retainDays:30})});var nX=n(5432);let nQ=a.k5n(["runMode","historicalAccess","vaultConsent","vaultKeyCustody","vaultInlineReveal","modelJudgeConsent","dataSharesInPlace","redactFallback","bodyRetention"]).meta({id:"ManagedSettingKey"}),n0=a.Ikc({runMode:a.k5n(["standalone","attached"]).optional(),controlPlane:a.Ikc({endpoint:a.YjP().min(1),label:a.YjP().min(1).optional()}).optional(),historicalAccess:a.k5n(["full","session-only"]).optional(),vaultConsent:a.zMY().optional(),vaultKeyCustody:a.k5n(["file","keychain"]).optional(),vaultInlineReveal:a.k5n(["masked","full","off"]).optional(),modelJudgeConsent:a.zMY().optional(),dataSharesInPlace:a.zMY().optional(),redactFallback:nr.optional(),bodyRetention:nZ.optional()}).meta({id:"ManagedSettingsValues"});a.Ikc({specVersion:a.aig().int().positive().default(1),organization:a.YjP().min(1).optional(),values:a.g1P(a.YjP(),a.L5J()).default({}),lockedFields:a.YOg(a.YjP()).default([])}).transform((e,t)=>{let{lockedFields:n,values:a,...s}=e,i=[],l=[];for(let e of n)nQ.safeParse(e).success?i.push(e):l.push(e);let r=Object.create(null),o=[];for(let[e,t]of Object.entries(a))Object.hasOwn(n0.shape,e)?r[e]=t:o.push(e);let c=n0.safeParse(r);if(!c.success){for(let e of c.error.issues)t.addIssue({...e,path:["values",...e.path]});return nX.tm}return{...s,values:c.data,lockedFields:i,...l.length>0?{unknownLockedFields:l}:{},...o.length>0?{unknownValueFields:o}:{}}}).meta({id:"ManagedSettings"});let n1={present:!1,lockedFields:[]};function n2(e,t){return e.present&&e.lockedFields.includes(t)}function n5(e){var t;return"Managed by ".concat(null!=(t=e.organization)?t:"your organization")}let n3=a.Ikc({path:a.YjP().min(1),name:a.YjP().min(1),origin:eF,defaultAccess:eE});a.Ikc({files:a.YOg(n3),truncated:a.zMY(),scannedAt:a.YjP()});let n4=["7d","30d","3m","6m"],n6=a.k5n(n4).meta({id:"TimeRange"}),n8="7d";n6.catch(n8);let n7="dismiss",n9=ee.extract(["acknowledged","false-positive"]).meta({id:"DismissMethod"});a.Ikc({ruleId:a.YjP().max(200),method:a.YjP(),confirmation:a.YjP()}),a.Ikc({ruleId:a.YjP().max(200),method:n9,confirmation:a.YjP()});let ae=a.k5n(["still-valid","unknown","invalid"]),at=a.Ikc({filePath:a.YjP(),span:W.optional()}).strict(),an=a.Ikc({provider:a.YjP(),maskedToken:a.YjP(),where:at,state:ae,observedAt:T.w$().optional()}).strict();a.Ikc({provider:a.YjP(),maskedToken:a.YjP(),consolePath:a.YjP(),occurrenceSpread:a.aig().int().positive()}).strict();let aa=a.k5n(["redact-rotation-checklist","redact-only","set-secret-redact","leave"]),as=a.k5n(["first-run","pre-push","secret-scan"]);a.Ikc({entrySource:as}).strict();let ai=a.Ikc({id:aa,label:a.YjP()}),al=a.Ikc({kind:a.euz("decision"),entrySource:as,secretCount:a.aig().int().positive(),prompt:a.YjP(),options:a.PVZ([ai.extend({id:a.euz("redact-rotation-checklist")}),ai.extend({id:a.euz("redact-only")}),ai.extend({id:a.euz("set-secret-redact")}),ai.extend({id:a.euz("leave")})])}),ar=a.Ikc({kind:a.euz("no-decision")});a.gMt("kind",[al,ar]);let ao=a.Ikc({severity:$,count:a.aig().int().nonnegative(),caught:a.aig().int().nonnegative().optional(),openAtRest:a.aig().int().nonnegative().optional()}).meta({id:"SeveritySummaryItem"});a.Ikc({total:a.aig().int().nonnegative(),needsRemediation:a.aig().int().nonnegative().optional(),bySeverity:a.YOg(ao)}).meta({id:"SeveritySummaryResponse"}),a.Ikc({range:a.k5n(n4).default(n8)});let ac=a.k5n(["blocked","redacted","warned"]).meta({id:"EnforcementActionKind"}),ad=a.Ikc({kind:ac,count:a.aig().int().nonnegative(),delta:a.aig().int()}).meta({id:"EnforcementAction"});a.Ikc({range:n6,total:a.aig().int().nonnegative(),actions:a.YOg(ad)}).meta({id:"EnforcementActionsResponse"});let ax=a.k5n(["day","week"]).meta({id:"TimeseriesGranularity"}),au=a.Ikc({timestamp:T.p6(),critical:a.aig().int().nonnegative(),high:a.aig().int().nonnegative(),medium:a.aig().int().nonnegative(),low:a.aig().int().nonnegative().optional()}).meta({id:"FindingsTimeseriesPoint"});a.Ikc({range:n6,granularity:ax,points:a.YOg(au)}).meta({id:"FindingsTimeseriesResponse"});let am=a.Ikc({timestamp:T.p6(),bySeverity:a.Ikc({critical:a.aig().nonnegative().nullable(),high:a.aig().nonnegative().nullable(),medium:a.aig().nonnegative().nullable(),low:a.aig().nonnegative().nullable()})}).meta({id:"MttrTrendPoint"});a.Ikc({range:n6,granularity:ax,points:a.YOg(am)}).meta({id:"MttrTrendResponse"});let ap=a.Ikc({findingKey:a.YjP(),ruleId:a.YjP(),severity:$,repo:a.YjP().optional(),path:a.YjP(),resolvedAt:T.w$(),detectedAt:T.w$()}).meta({id:"ResolvedFeedItem"});a.Ikc({items:a.YOg(ap)}).meta({id:"RecentlyResolvedResponse"});let ah=["repo","user"],ag=a.k5n(ah).meta({id:"SourceKind"}),af=a.Ikc({id:a.YjP(),name:a.YjP(),kind:ag,findingsCount:a.aig().int().nonnegative()}).meta({id:"TopSource"});a.Ikc({range:n6,items:a.YOg(af)}).meta({id:"TopSourcesResponse"}),a.Ikc({range:a.k5n(n4).default(n8),limit:D.ai().int().min(1).max(50).default(5),kind:a.k5n(ah).optional()});let aj=F.extract(["ClaudeCode","Cursor","Codex","Antigravity","ClaudeAi","ChatGpt","Copilot","Api"]).meta({id:"Provider"}),av=a.Ikc({provider:aj,coverage:a.aig().int().min(0).max(100),supported:a.zMY()}).meta({id:"ScanCoverageProvider"});a.Ikc({range:n6,providers:a.YOg(av)}).meta({id:"ScanCoverageResponse"});let ab=a.k5n(["repo","user","team","policy","share","rule"]).meta({id:"SubjectType"}),ak=a.Ikc({type:ab,id:a.YjP(),label:a.YjP()}).meta({id:"RecommendationSubject"}),ay=a.k5n(["apply","navigate"]).meta({id:"RecommendationActionMode"}),aN=a.Ikc({mode:ay,type:a.YjP(),label:a.YjP(),href:a.YjP().optional(),policyId:a.YjP().optional(),teamId:a.YjP().optional()}).meta({id:"RecommendationAction"}),aw=a.Ikc({id:a.YjP(),category:a.YjP(),severity:$,title:a.YjP(),description:a.YjP(),subjects:a.YOg(ak),action:aN}).meta({id:"RecommendedAction"});a.Ikc({items:a.YOg(aw)}).meta({id:"RecommendedActionsResponse"}),a.Ikc({limit:D.ai().int().min(1).max(20).default(3)});let aP=a.Ikc({type:a.YjP(),policyId:a.YjP().optional(),teamId:a.YjP().optional()}).meta({id:"AppliedAction"});a.Ikc({id:a.YjP(),status:a.euz("applied"),appliedAction:aP}).meta({id:"ApplyRecommendedActionResponse"}),a.Ikc({id:a.YjP(),status:a.euz("dismissed")}).meta({id:"DismissRecommendedActionResponse"}),a.Ikc({id:a.YjP()});let aY=a.k5n(["granted","revoked","unchanged"]).meta({id:"HistorySyncConsentChoice"}),aC=a.k5n(["granted","revoked","unchanged"]).meta({id:"ModelJudgeConsentChoice"}),aI=a.k5n(["granted","revoked","unchanged"]).meta({id:"WebChatCaptureConsentChoice"});a.Ikc({historicalAccess:a.YjP(),modelJudgeConsent:aC,historySyncConsent:aY,vaultConsent:a.YjP(),vaultInlineReveal:a.YjP(),webChatCaptureConsent:aI,redactFallback:a.YjP(),bodyRetention:a.Ikc({enabled:a.zMY(),retainDays:a.aig()})}),a.Ikc({endpoint:a.YjP(),label:tb(200).optional(),accessKey:a.YjP()}),a.Ikc({ruleId:a.YjP(),category:B,severity:$,maskedMatch:a.YjP(),rawMatch:a.YjP(),context:a.YjP(),filePath:a.YjP().optional(),confidence:a.aig().min(0).max(1),id:a.YjP().optional(),valueFingerprint:a.YjP().optional(),keyVersion:a.aig().int().nonnegative().optional()});let aS=a.Ikc({category:B,action:nf,reasoning:a.YjP(),genuineCount:a.aig().int().nonnegative(),fpCount:a.aig().int().nonnegative(),fpIds:a.YOg(a.YjP())});a.Ikc({perCategory:a.YOg(aS),notes:a.YjP()});let aA=a.Ikc({total:a.aig().int().nonnegative(),important:a.aig().int().nonnegative(),routine:a.aig().int().nonnegative()}).refine(e=>e.total===e.important+e.routine,{message:"total must equal important + routine",path:["total"]}),az=a.Ikc({ruleId:a.YjP(),category:B,valueFingerprint:a.YjP(),keyVersion:a.aig().int().nonnegative()}),aM=a.Ikc({pattern:a.YjP(),count:a.aig().int().nonnegative(),values:a.YOg(az).min(1)}),aO=a.Ikc({category:B,count:a.aig().int().nonnegative(),egress:a.zMY()}),aR=a.Ikc({counts:aA,routineCategories:a.YOg(B),surfacedCategories:a.YOg(B),findingKinds:a.YOg(aO),posture:a.g1P(B,nl),maskedFindings:a.YOg(an).optional(),falsePositivePatterns:a.YOg(aM).optional()}),aL=aS.pick({category:!0,genuineCount:!0,fpCount:!0}).extend({egress:a.zMY()});a.Ikc({categories:a.YOg(aL),posture:a.g1P(B,nl)}),a.Ikc({frame:aR,copy:a.YjP()}),a.k5n(["scan","floor"]);let aT=a.Ikc({id:a.k5n(["enter-remediation","open-dashboard","not-now"]),label:a.YjP()}),aD=a.PVZ([aT.extend({id:a.euz("open-dashboard")}),aT.extend({id:a.euz("not-now")})]),aE=a.PVZ([aT.extend({id:a.euz("enter-remediation")}),aT.extend({id:a.euz("open-dashboard")}),aT.extend({id:a.euz("not-now")})]);function aF(e){let t=new Set(e);return e4.filter(e=>t.has(e))}a.Ikc({worthALook:a.aig().int().nonnegative(),liveKeys:a.aig().int().nonnegative().optional(),options:a.KCZ([aD,aE])}).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 aV={Stable:"stable",Beta:"beta",Nightly:"nightly"};aV.Stable,aV.Beta,aV.Nightly;let a_=a.k5n(["site","estimated","none"]),aB=a.Ikc({inputTokens:a.aig().int().nonnegative().optional(),outputTokens:a.aig().int().nonnegative().optional(),cacheReadInputTokens:a.aig().int().nonnegative().optional(),cacheCreationInputTokens:a.aig().int().nonnegative().optional()}),a$=a.Ikc({toolUseId:a.YjP().min(1),toolName:a.YjP().min(1),target:a.YjP().optional(),isError:a.zMY().optional(),inputSize:a.aig().int().nonnegative().optional(),outputSize:a.aig().int().nonnegative().optional()});a.Ikc({messageId:a.YjP().min(1),startedAt:T.w$(),model:a.YjP().optional(),usage:aB.optional(),usageSource:a_,stopReason:a.YjP().optional(),conversationId:a.YjP().optional(),turnIndex:a.aig().int().nonnegative().optional(),toolCalls:a.YOg(a$).default([]),responseText:a.YjP().optional(),truncated:a.zMY().default(!1)});let aK=a.k5n(["watching","composer-only","button-only","unattached","unknown"]);a.Ikc({patched:a.zMY(),live:a.zMY(),blind:a.zMY(),sendsSeenDom:a.aig().int().nonnegative(),exchangesSeenNet:a.aig().int().nonnegative(),parseFailures:a.aig().int().nonnegative(),unparsedBodies:a.aig().int().nonnegative(),shapeMisses:a.YOg(a.YjP()).default([]),conversationEndpoints:a.aig().int().nonnegative().default(0),closed:a.zMY().default(!1),enforcement:aK.default("unknown")})},7991:(e,t,n)=>{n.d(t,{cT:()=>o,nU:()=>c});var a=n(7971),s=n(4267);let i="provider:";function l(e){return null!==e.providerId&&"provider"===e.kind}function r(e){let t=new Map;for(let n of e){if(!l(n))continue;let e=t.get(n.providerId);e?e.push(n):t.set(n.providerId,[n])}return t}function o(e){let t=r(e),n=[],o=new Set;for(let r of e){if(l(r)){var c;let e=r.providerId,l=null!=(c=t.get(e))?c:[];if(l.length>=2){if(o.has(e))continue;o.add(e),n.push({type:"provider",group:function(e,t){let n=0,l=0,r=[],o=!1;for(let e of t){for(let t of(n+=e.endpointCount,l+=e.callSiteCount,e.transports))r.includes(t)||r.push(t);(0,s.EI)(e.transports)&&(o=!0)}let c=t.reduce((e,t)=>t.lastSeen>e.lastSeen?t:e);return{id:i+e,providerId:e,name:c.name,category:c.category,hosts:t,endpointCount:n,callSiteCount:l,transports:r,dataClasses:(0,a.hzO)(t.flatMap(e=>e.dataClasses)),lastSeen:c.lastSeen,insecure:o}}(e,l)});continue}}n.push({type:"destination",item:r})}return n}function c(e,t){var n;let a=e.find(e=>e.id===t);return void 0!==a&&l(a)&&(null!=(n=r(e).get(a.providerId))?n:[]).length>=2?i+a.providerId:null}},8052:(e,t,n)=>{n.d(t,{n:()=>i});var a=n(7643),s=n(7228);function i(e){let{name:t,labelledBy:n,choices:i,value:l,onChange:r,disabled:o}=e;return(0,a.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-labelledby":n,children:i.map(e=>(0,a.jsxs)("label",{className:(0,s.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,s.cn)("border-border bg-surface",!o&&"hover:bg-surface-2")),children:[(0,a.jsx)("input",{type:"radio",name:t,checked:l===e.value,disabled:o,onChange:()=>{r(e.value)},className:"mt-1 accent-primary"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-text",children:e.label}),(0,a.jsx)("span",{className:"mt-0.5 block text-xs text-text-2",children:e.description})]})]},e.value))})}},8084:(e,t,n)=>{n.d(t,{HarnessOverview:()=>x});var a=n(7643),s=n(7228),i=n(223),l=n(3969),r=n(4360),o=n(7199),c=n(7367);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,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-4",children:[(0,a.jsx)(l.K,{id:p.id,size:38}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"font-display text-base font-semibold",children:p.label}),(0,a.jsxs)("div",{className:"mt-px text-xs text-text-3",children:[p.kind," \xb7 ",p.version]})]})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4.5 overflow-y-auto p-5",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Recent blocks, redactions & warnings"}),k&&(0,a.jsx)("span",{className:"ml-auto inline-flex items-center gap-1.5",children:d.map(e=>{let t=k[e];return t>0?(0,a.jsxs)(s.Ex,{variant:o.iL[e].tone,children:[t," ",o.iL[e].label.toLowerCase()]},e):null})})]}),0===b.length?(0,a.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,a.jsx)(c.m,{name:"check-circle",className:"size-4 text-ok-ink"}),(0,a.jsx)("span",{className:"text-xs",children:"No blocks, redactions or warnings from this harness"})]}):(0,a.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,a.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg border border-border bg-surface px-3 py-2.5",children:[(0,a.jsx)("span",{className:(0,s.cn)("grid size-7 shrink-0 place-items-center rounded-md",t.bg,t.fg),children:(0,a.jsx)(c.m,{name:t.icon,className:"size-3.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-xs font-semibold text-text",children:e.title}),(0,a.jsx)("div",{className:"mt-0.5 font-mono text-xs text-text-3",children:e.detail})]}),(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,a.jsx)(s.Ex,{variant:t.tone,children:t.label}),(0,a.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,a.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,a.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,a.jsx)(c.m,{name:"flag",className:"size-4 shrink-0 text-sev-high-ink"}),(0,a.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,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:"Projects"}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:p.projects.length})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:p.projects.map(e=>(0,a.jsx)(u,{p:e,onSelect:f},e.id))})]}),0===p.categories.length&&0===p.projects.length&&(0,a.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,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:t.label}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:e.assets.length})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:e.assets.map(e=>(0,a.jsx)(m,{it:e,onSelect:g},e.id))})]},e.type)})]})]})}function u(e){let{p:t,onSelect:n}=e,s=t.accessCounts;return(0,a.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,a.jsx)("span",{className:"size-2.5 shrink-0 rounded-full",style:{background:(0,o.Cs)(t.language)}}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"truncate text-xs font-semibold text-text",children:t.name}),(0,a.jsx)(r.yk,{v:t.visibility})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 truncate font-mono text-xs text-text-3",children:[(0,a.jsx)(c.m,{name:"repo",className:"size-3 shrink-0"}),t.repo]})]}),(0,a.jsx)(r.AJ,{counts:s}),s.blocked>0&&(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical-ink",children:[s.blocked," blocked"]}),t.findingsCount>0&&(0,a.jsx)(r.Kh,{flags:["findings"],mini:!0}),(0,a.jsx)(c.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}function m(e){let{it:t,onSelect:n}=e,i=(0,o.TW)(t.type),l="mcp"===t.type?t.trust:void 0;return(0,a.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,a.jsx)("span",{className:(0,s.cn)("grid size-6.5 shrink-0 place-items-center rounded-md",i.bg,i.fg),children:(0,a.jsx)(c.m,{name:i.icon,className:"size-3.5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-mono text-xs font-semibold text-text",children:t.name}),(0,a.jsx)("div",{className:"truncate font-mono text-xs text-text-3 mt-0.5",children:t.sub})]}),l&&(0,a.jsx)(r.As,{value:l}),t.flags.length>0&&(0,a.jsx)(r.Kh,{flags:t.flags,mini:!0}),(0,a.jsx)(c.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}},8111:(e,t,n)=>{n.d(t,{WorkspaceSettingsFormView:()=>N});var a=n(7643),s=n(7971),i=n(7228),l=n(1579),r=n(8052);let o=[{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."}],c=[{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."}],d=[{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."}],x=[{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."}],u=[{value:"revoked",label:"Not granted",description:"The extension records nothing new from a web chat — no per-turn metadata and no reply text (default — never assumed). Enforcement is unaffected: what you send is still blocked, redacted or warned on exactly as before."},{value:"granted",label:"Granted",description:"The extension may record per-turn model, token and masked tool-call metadata, and may store the assistant reply text this machine is set to keep under ~/.aka — in which a value is masked only where the detection that flagged it is set to redact, vault or block, and every detection ships on monitor."}],m=[{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."}],p="Enter a whole number of days, ".concat(String(1),"–").concat(String(3650),"."),h=[{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."}],g=[{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 f(e){return e?"on":"off"}function j(e){return void 0!==e&&!(0,s.hds)(e)}function v(e){var t,n;let{label:s,description:i,name:l,choices:o,value:c,onChange:d,managed:x,notice:u,alert:m,defaultOpen:p,children:h}=e,g=o.find(e=>e.value===c),f="".concat(l,"-label");return(0,a.jsxs)("details",{className:"group border-b border-border last:border-b-0","data-slot":"setting-row",open:!0===p,children:[(0,a.jsxs)("summary",{className:"flex cursor-pointer list-none items-start gap-3 px-4 py-3 hover:bg-surface-2",children:[(0,a.jsx)(b,{}),(0,a.jsxs)("span",{className:"flex-1",children:[(0,a.jsx)("span",{id:f,className:"block text-sm font-medium text-text",children:s}),(0,a.jsx)("span",{className:"mt-0.5 block text-xs text-text-3",children:i})]}),void 0!==m&&(0,a.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===x?(0,a.jsx)("span",{className:"shrink-0 text-xs font-medium text-text-2","data-slot":"current-value",children:null!=(t=null==g?void 0:g.label)?t:c}):(0,a.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:x,children:[null!=(n=null==g?void 0:g.label)?n:c," \xb7 locked"]})]}),(0,a.jsxs)("div",{className:"px-4 pb-4 pl-11 pt-3",children:[u,void 0!==x&&(0,a.jsxs)("p",{className:"mb-3 text-xs text-text-3","data-slot":"managed-notice",children:[x,". This setting cannot be changed here."]}),(0,a.jsx)("fieldset",{disabled:void 0!==x,className:"contents",children:(0,a.jsx)(r.n,{name:l,labelledBy:f,choices:o,value:c,onChange:d,disabled:void 0!==x})}),h]})]})}function b(){return(0,a.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,a.jsx)("path",{d:"M6 4l4 4-4 4",strokeLinecap:"round",strokeLinejoin:"round"})})}function k(e){let{title:t,children:n}=e;return(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:"mb-2 text-label font-semibold uppercase tracking-wider text-text-3",children:t}),(0,a.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface",children:n})]})}let y=e=>1===e?"1 setting":"".concat(String(e)," settings");function N(e){var t,n,r,b,N;let{settings:P,managed:Y=s.MhX,onSave:C,onAttach:I,onDetach:S,credentialState:A,connectionHeld:z,detectionsHref:M="/detections",busy:O,error:R,saved:L}=e,[T,D]=(0,l.useState)(P.historicalAccess),E=(0,s.DLF)(P.modelJudgeConsent)?"granted":"revoked",[F,V]=(0,l.useState)(E),[_,B]=(0,l.useState)(!1),$=(0,s.EL9)(P.historySyncConsent,null==(t=P.controlPlane)?void 0:t.endpoint)?"granted":"revoked",[K,H]=(0,l.useState)($),[W,U]=(0,l.useState)(!1),G=(0,s.bkE)(P.historySyncConsent,null==(n=P.controlPlane)?void 0:n.endpoint),Z=(0,s.dnP)(null==(r=P.webChatCapture)?void 0:r.consent)?"granted":"revoked",[q,J]=(0,l.useState)(Z),[X,Q]=(0,l.useState)(!1),ee=(null==(N=P.webChatCapture)?void 0:N.consent)!==void 0&&!(0,s.dnP)(N.consent),[et,en]=(0,l.useState)(f(P.vaultConsent)),[ea,es]=(0,l.useState)(P.vaultInlineReveal),[ei,el]=(0,l.useState)(P.redactFallback),[er,eo]=(0,l.useState)(P.bodyRetention.enabled?"on":"off"),[ec,ed]=(0,l.useState)(String(P.bodyRetention.retainDays)),ex=Number(ec),eu=""!==ec.trim()&&Number.isInteger(ex)&&ex>=1&&ex<=3650,em=e=>(0,s.O2m)(Y,e)?(0,s.Ly$)(Y):void 0,ep=function(e){var t,n,a;let s=null!=(t=e.unknownLockedCount)?t:0,i=null!=(n=e.unknownValueCount)?n:0;if(!e.present||s+i===0)return;let l=null!=(a=e.organization)?a:"Your organization",r=[...i>0?["pins ".concat(y(i))]:[],...s>0?["locks ".concat(y(s))]:[]];return"".concat(l," ").concat(r.join(" and ")," this version of AKA does not recognize. Update AKA to apply ").concat(s+i===1?"it":"them",".")}(Y),eh=T!==P.historicalAccess||er!==(P.bodyRetention.enabled?"on":"off")||eu&&ex!==P.bodyRetention.retainDays||F!==E||K!==$||et!==f(P.vaultConsent)||ea!==P.vaultInlineReveal||ei!==P.redactFallback||"on"===et&&j(P.vaultConsent)||W||_||X;return(0,a.jsxs)("div",{className:"flex flex-col gap-7",children:[void 0!==ep&&(0,a.jsx)("p",{className:"text-xs text-text-3","data-slot":"managed-unrecognized",children:ep}),(0,a.jsx)(k,{title:"Connection",children:(0,a.jsx)(w,{settings:P,credentialState:A,managedLabel:null!=(b=em("runMode"))?b:!0===z?(0,s.Ly$)(Y):void 0,onAttach:I,onDetach:S,busy:O})}),(0,a.jsxs)(k,{title:"Enforcement",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3","data-slot":"enforcement-pointer",children:[(0,a.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,a.jsx)("a",{href:M,className:"shrink-0 text-xs font-medium text-primary hover:underline",children:"Configure detections"})]}),(0,a.jsx)(v,{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:o,value:ei,onChange:el,managed:em("redactFallback")})]}),(0,a.jsxs)(k,{title:"Data access",children:[(0,a.jsx)(v,{label:"Historical access",description:"Consent to inspect surfaces that existed before AKA was installed.",name:"historicalAccess",choices:c,value:T,onChange:D,managed:em("historicalAccess")}),(0,a.jsx)(v,{label:"Model-judge consent",description:"Whether the setup scan may send findings to the model API.",name:"modelJudgeConsent",choices:d,value:F,onChange:e=>{B(!0),V(e)},managed:em("modelJudgeConsent"),notice:(0,a.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.jsx)(v,{label:"Web chat capture",description:"Whether the browser extension may record what it sees on a web chat.",name:"webChatCaptureConsent",choices:u,value:q,onChange:e=>{Q(!0),J(e)},alert:ee?"Expired":void 0,defaultOpen:ee,notice:(0,a.jsxs)(a.Fragment,{children:[ee&&(0,a.jsx)("p",{className:"mb-3 text-xs text-sev-high-ink","data-slot":"web-chat-stale-notice",children:'Your grant was recorded against an older version of this setting, which covered less than is recorded now, so it no longer counts as consent. Saving with "Granted" selected re-consents to the current version.'}),(0,a.jsx)("p",{className:"mb-3 text-xs text-text-3","data-slot":"web-chat-disclosure",children:"Permission for the AKA browser extension to record what it observes on a web chat — ChatGPT and Claude.ai. Per assistant turn it may record the model, the token counts the site reported, and the name of each tool call the reply made with its salient argument masked; plus the reply text itself, for the replies this machine is set to keep — by default only a reply a scan found something in. 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, vault or block, and under monitor or warn the value is stored 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. Your own messages are already recorded and this grant does not widen that; account, plan and quota data are not covered by it. What is recorded goes to the local store under ~/.aka, and on a machine attached to a deployment it is forwarded there like any other activity — this grant opens no outbound path of its own. It covers what is written down, not what is protected: blocking, redaction and warnings on what you send run whether or not it is given. Revoking stops future recording; it does not erase what is already stored."})]})}),(0,s.lgf)(P)&&(0,a.jsx)(v,{label:"Unsent activity",description:"Whether activity this machine has not delivered may be sent later.",name:"historySyncConsent",choices:x,value:K,onChange:e=>{U(!0),H(e)},alert:G?"Paused":void 0,defaultOpen:G,notice:(0,a.jsxs)(a.Fragment,{children:[G&&(0,a.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,a.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,a.jsx)(v,{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:m,value:et,onChange:en,managed:em("vaultConsent"),alert:j(P.vaultConsent)?"Paused":void 0,defaultOpen:j(P.vaultConsent),notice:j(P.vaultConsent)?(0,a.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,a.jsx)(k,{title:"Display",children:(0,a.jsx)(v,{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:g,value:ea,onChange:es,managed:em("vaultInlineReveal")})}),(0,a.jsx)(k,{title:"Storage",children:(0,a.jsx)(v,{label:"Expire captured bodies",description:"Clear the stored text of old captures, keeping the events and their findings.",name:"bodyRetention",choices:h,value:er,onChange:eo,managed:em("bodyRetention"),children:"on"===er&&(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2","data-slot":"retain-days",children:[(0,a.jsx)("label",{htmlFor:"retainDays",className:"text-xs text-text-2",children:"Keep bodies for"}),(0,a.jsx)("input",{id:"retainDays",name:"retainDays",type:"number",inputMode:"numeric",min:1,max:3650,value:ec,disabled:void 0!==em("bodyRetention"),onChange:e=>{ed(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":!eu,"aria-describedby":eu?void 0:"retainDays-error"}),(0,a.jsx)("span",{className:"text-xs text-text-2",children:"days"}),!eu&&(0,a.jsx)("span",{id:"retainDays-error",className:"text-xs text-sev-critical-ink",children:p})]})})}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!eh||!0===O||"on"===er&&!eu,onClick:()=>{C({historicalAccess:T,redactFallback:ei,modelJudgeConsent:_?"granted"===F?"granted":"revoked":"unchanged",historySyncConsent:W?"granted"===K?"granted":"revoked":"unchanged",vaultConsent:et,webChatCaptureConsent:X?"granted"===q?"granted":"revoked":"unchanged",vaultInlineReveal:ea,bodyRetention:{enabled:"on"===er,retainDays:eu?ex:P.bodyRetention.retainDays}})},children:O?"Saving…":"Save changes"}),L&&!eh&&(0,a.jsx)("span",{className:"text-xs text-ok-ink",children:"Saved."}),R&&(0,a.jsx)("span",{className:"text-xs text-sev-critical-ink",children:R})]})]})}function w(e){let{settings:t,credentialState:n,managedLabel:r,onAttach:o,onDetach:c,busy:d}=e,[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(""),f=(0,s.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,a.jsxs)("div",{className:"px-4 py-3","data-slot":"connection-row",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsxs)("span",{className:"flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-text",children:"Run mode"}),(0,a.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,a.jsx)("span",{className:"mt-1 block text-xs text-text-2","data-slot":"control-plane-name",children:(0,s.F$B)(t.controlPlane)})]}),(0,a.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,a.jsx)("p",{className:"mt-3 text-xs text-sev-high-ink","data-slot":"connection-credential-notice",children:v}),f&&(0,a.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,a.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,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)(i.$n,{variant:"outline",tone:"danger",size:"sm",disabled:d,onClick:()=>{u(""),p(""),g(""),c()},"data-slot":"detach-button",children:"Detach"}),(0,a.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,a.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,a.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2","data-slot":"attach-form",children:[(0,a.jsx)(i.pd,{value:x,placeholder:"Deployment endpoint","aria-label":"Deployment endpoint",onChange:e=>{u(e.target.value)}}),(0,a.jsx)(i.pd,{value:m,placeholder:"Name (optional)","aria-label":"Deployment name",onChange:e=>{p(e.target.value)}}),(0,a.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,a.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,a.jsx)("div",{className:"sm:col-span-2",children:(0,a.jsx)(i.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!0===d||""===x.trim()||""===h.trim(),onClick:()=>{!function(e,t,n){let a=e.accessKey.trim();t(),n(e.endpoint.trim(),e.label.trim(),a)}({endpoint:x,label:m,accessKey:h},()=>{g("")},o)},"data-slot":"attach-button",children:"Attach"})})]}):(0,a.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."})]})}},8189:(e,t,n)=>{n.r(t),n.d(t,{AreaChart:()=>h,Donut:()=>x,Sparkline:()=>u,useMeasuredWidth:()=>p});var a=n(7643),s=n(2381),i=n(4269),l=n(6065),r=n(5996),o=n(7158),c=n(1579),d=n(7881);function x(e){let{segments:t,size:n=120,thickness:l=16,children:r}=e,o=n/2,c=(0,s.A)().value(e=>e.value).sort(null)(t),d=(0,i.A)().innerRadius(o-l).outerRadius(o);return(0,a.jsxs)("div",{className:"relative shrink-0",style:{width:n,height:n},children:[(0,a.jsx)("div",{"aria-hidden":!0,children:(0,a.jsx)("svg",{width:n,height:n,children:(0,a.jsx)("g",{transform:"translate(".concat(String(o),",").concat(String(o),")"),children:c.map(e=>{var t;return(0,a.jsx)("path",{d:null!=(t=d(e))?t:void 0,fill:e.data.color,stroke:"none"},e.data.label)})})})}),r&&(0,a.jsx)("div",{className:"absolute inset-0 grid place-items-center text-center",children:r})]})}function u(e){var t,n;let{data:s,color:i,height:x=34,fill:u=!0,strokeWidth:m=2,labels:p,formatValue:h}=e,g="spark-".concat((0,c.useId)().replace(/:/g,"")),[f,j]=(0,c.useState)(null),v=Math.max(...s),b=Math.min(...s),k=v-b||1,y=e=>s.length<=1?50:2+e/(s.length-1)*96,N=e=>x-2-(e-b)/k*(x-4),w=s.map((e,t)=>[y(t),N(e)]),P=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,C=(0,a.jsxs)("svg",{"aria-hidden":!0,width:"100%",height:x,viewBox:"0 0 ".concat(String(100)," ").concat(String(x)),preserveAspectRatio:"none",className:"block",children:[u&&(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:i,stopOpacity:.18}),(0,a.jsx)("stop",{offset:"100%",stopColor:i,stopOpacity:0})]})}),u&&(0,a.jsx)("path",{d:Y,fill:"url(#".concat(g,")"),stroke:"none"}),(0,a.jsx)("path",{d:P,fill:"none",stroke:i,strokeWidth:m,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]});if(!((null==p?void 0:p.length)===s.length&&s.length>0))return C;let I=null===f?void 0:s[f],S=null===f?void 0:p[f];return(0,a.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,a=s.length<=1?0:Math.round((n-2)/96*(s.length-1));j(Math.min(s.length-1,Math.max(0,a)))},onMouseLeave:()=>{j(null)},children:[C,null!==f&&void 0!==I&&void 0!==S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.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(I),background:i}}),(0,a.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,a.jsx)("div",{style:{color:d.l.text3,fontSize:11},children:S}),(0,a.jsx)("div",{className:"font-semibold",style:{color:d.l.text2},children:(null!=h?h:String)(I)})]})]})]})}let m={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 a=new ResizeObserver(e=>{for(let t of e)n(t.contentRect.width)});return a.observe(t),()=>{a.disconnect()}},[]),[e,t]}function h(e){let{data:t,series:n,height:s=160,valueFormat:i=e=>String(e)}=e,x=(0,c.useId)().replace(/:/g,""),[u,h]=p(),[g,f]=(0,c.useState)(null),j=Math.max(0,h-m.left-m.right),v=Math.max(0,s-m.top-m.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,a.jsxs)("div",{ref:u,"aria-hidden":!0,className:"relative",style:{height:s},children:[h>0&&(0,a.jsxs)("svg",{width:h,height:s,onMouseMove:function(e){if(!u.current||0===t.length)return;let n=u.current.getBoundingClientRect(),a=e.clientX-n.left-m.left,s=t.length<=1?0:j/(t.length-1),i=0===s?0:Math.round(a/s);f(Math.min(t.length-1,Math.max(0,i)))},onMouseLeave:()=>{f(null)},children:[(0,a.jsx)("defs",{children:n.map(e=>(0,a.jsxs)("linearGradient",{id:"".concat(x,"-").concat(e.key),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:e.color,stopOpacity:.16}),(0,a.jsx)("stop",{offset:"100%",stopColor:e.color,stopOpacity:0})]},e.key))}),(0,a.jsxs)("g",{transform:"translate(".concat(String(m.left),",").concat(String(m.top),")"),children:[[0,.25,.5,.75,1].map(e=>(0,a.jsx)("line",{x1:0,x2:j,y1:v*e,y2:v*e,stroke:d.l.border,strokeOpacity:.6},e)),n.map(e=>{var n,s;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!=(s=(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))?s:void 0;return(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:i,fill:"url(#".concat(x,"-").concat(e.key,")"),stroke:"none"}),(0,a.jsx)("path",{d:c,fill:"none",stroke:e.color,strokeWidth:2})]},e.key)}),w&&null!==g&&(0,a.jsxs)("g",{children:[(0,a.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,a.jsx)("circle",{cx:y(g),cy:N(t),r:3,fill:e.color},e.key)})]})]})]}),w&&null!==g&&(0,a.jsxs)("div",{className:"pointer-events-none absolute top-0 -translate-x-1/2",style:{left:Math.min(h-60,Math.max(60,m.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,a.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,a.jsxs)("div",{className:"flex items-center gap-1.5",style:{color:d.l.text2},children:[(0,a.jsx)("span",{className:"size-2 rounded-xs",style:{background:e.color,display:"inline-block"}}),(0,a.jsx)("span",{className:"font-semibold",children:i(t,e.key)})]},e.key)})]})]})}},8279:(e,t,n)=>{n.d(t,{FindingLocationsListView:()=>c});var a=n(7643),s=n(7228),i=n(4420),l=n(1863),r=n(3967);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,u=void 0===t.status?null:(0,r.Dx)(t.status);return(0,a.jsxs)("button",{type:"button",onClick:o,"aria-current":n?"true":void 0,className:(0,s.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,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(s.Pt,{severity:t.maxSeverity}),(0,a.jsx)("span",{className:(0,s.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"}),u&&(0,a.jsx)(s.Ex,{variant:u.badge,className:"h-5 shrink-0",children:u.label})]}),(0,a.jsx)("div",{className:(0,s.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,a.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5",children:[(0,a.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,a.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,a.jsxs)("span",{className:"shrink-0 text-label text-text-3",children:["+",x," more"]})]}),(0,a.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,a.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:u=!1,pageStart:m,total:p,emptyState:h}=e;return(0,a.jsxs)(s.Zp,{className:"flex h-full flex-col overflow-hidden shadow-sm",children:[(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:0===t.length?(0,a.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,a.jsx)(o,{location:e,sel:e.id===n,renderedAt:l,onClick:()=>{i(e)}},e.id))}),d&&(c||r||t.length>0)&&(0,a.jsxs)(s.dK,{children:[(0,a.jsx)(s.Eb,{disabled:!c||u,onClick:x}),(0,a.jsx)(s.D2,{children:0===t.length||void 0===p||void 0===m?"".concat(String(t.length)," shown"):"".concat(String(m),"–").concat(String(m+t.length-1)," of ").concat(String(p)," locations")}),(0,a.jsx)(s.WA,{disabled:!r||u,loading:u,onClick:d})]})]})}},8396:(e,t,n)=>{n.d(t,{c:()=>s});var a=n(7643);function s(e){let{user:t}=e;return t?(0,a.jsx)("span",{className:"text-xs text-text-2 wrap-anywhere",title:t.name,children:t.name}):(0,a.jsx)("span",{className:"text-text-3",children:"—"})}},8504:(e,t,n)=>{function a(e,t){return()=>{e(t)}}function s(e,t,n){return()=>{e(t,n)}}n.d(t,{T:()=>a,i:()=>s})},8540:(e,t,n)=>{n.d(t,{DU:()=>x,eF:()=>i,gi:()=>c,hv:()=>l,rO:()=>s,rU:()=>d,y3:()=>o,y6:()=>a.y6l,yr:()=>r});var a=n(7971);function s(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,a.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"}},8848:(e,t,n)=>{n.d(t,{BH:()=>U,BZ:()=>g,C1:()=>V,CT:()=>S,D3:()=>I,DQ:()=>es,Ey:()=>L,JM:()=>K,K$:()=>W,Kp:()=>c,O4:()=>ea,OK:()=>h,Qf:()=>M,Qq:()=>X,RR:()=>v,RY:()=>f,SY:()=>J,Sr:()=>N,Uy:()=>u,WI:()=>C,XA:()=>$,YJ:()=>z,ZL:()=>x,Ze:()=>et,Zu:()=>m,_0:()=>k,_G:()=>o,aR:()=>O,ai:()=>D,bM:()=>w,bN:()=>b,c1:()=>F,cZ:()=>R,f6:()=>ec,fC:()=>T,fN:()=>eo,fl:()=>d,hF:()=>H,hp:()=>ee,iB:()=>Q,iF:()=>y,jZ:()=>r,k3:()=>en,kp:()=>B,lm:()=>P,lo:()=>j,mL:()=>Y,mS:()=>ex,mo:()=>Z,np:()=>G,ny:()=>p,oS:()=>el,pD:()=>l,qU:()=>ei,rX:()=>i,s3:()=>ed,sj:()=>er,ts:()=>q,uv:()=>_,vK:()=>A,wy:()=>E});var a=n(7643);let s={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,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M8 2.5h8L21.5 8v8L16 21.5H8L2.5 16V8L8 2.5Z"}),(0,a.jsx)("path",{d:"M12 8v4"}),(0,a.jsx)("circle",{cx:"12",cy:"16",r:"1",fill:"currentColor",stroke:"none"})]}),l=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"m6 6 12 12"})]}),r=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("rect",{x:"3",y:"9",width:"18",height:"6",rx:"1.5",fill:"currentColor",stroke:"none"}),(0,a.jsx)("path",{d:"M3 5h18M3 19h12"})]}),o=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M14 4h6v6"}),(0,a.jsx)("path",{d:"M20 4 11 13"}),(0,a.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,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M12 19V5M6 11l6-6 6 6"})}),d=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})}),x=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M12 5v14M6 13l6 6 6-6"})}),u=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M4 20V10M10 20V4M16 20v-7M22 20H2"})}),m=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.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,a.jsx)("path",{d:"m9 12 2 2 4-4"})]}),p=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"8",r:"3.6"}),(0,a.jsx)("path",{d:"M5.5 20a6.5 6.5 0 0 1 13 0"})]}),h=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M6 8.4v7.2"}),(0,a.jsx)("circle",{cx:"6",cy:"6",r:"2.4"}),(0,a.jsx)("circle",{cx:"6",cy:"18",r:"2.4"}),(0,a.jsx)("circle",{cx:"18",cy:"7",r:"2.4"}),(0,a.jsx)("path",{d:"M18 9.4a8.6 8.6 0 0 1-8.6 8.6"})]}),g=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.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,a.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,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"8",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M11.5 12H21l-2 2.4M16.5 12v3"})]}),j=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"m8 8-4 4 4 4M16 8l4 4-4 4M13.5 6l-3 12"})}),v=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("rect",{x:"4",y:"4",width:"16",height:"7",rx:"2"}),(0,a.jsx)("rect",{x:"4",y:"13",width:"16",height:"7",rx:"2"}),(0,a.jsx)("circle",{cx:"8",cy:"7.5",r:"1",fill:"currentColor",stroke:"none"}),(0,a.jsx)("circle",{cx:"8",cy:"16.5",r:"1",fill:"currentColor",stroke:"none"})]}),b=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("ellipse",{cx:"12",cy:"6",rx:"7",ry:"3"}),(0,a.jsx)("path",{d:"M5 6v12c0 1.7 3.1 3 7 3s7-1.3 7-3V6"}),(0,a.jsx)("path",{d:"M5 12c0 1.7 3.1 3 7 3s7-1.3 7-3"})]}),k=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M12 3 2 20h20L12 3Z"}),(0,a.jsx)("path",{d:"M12 9v5"}),(0,a.jsx)("circle",{cx:"12",cy:"17",r:"1",fill:"currentColor",stroke:"none"})]}),y=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M5 21V4M5 4h11l-2 3 2 3H5"})}),N=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"m5 12 4.5 4.5L19 7"})}),w=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.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,a.jsx)("circle",{cx:"12",cy:"12",r:"2.6"})]}),P=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.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,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"m12 3 9 5-9 5-9-5 9-5Z"}),(0,a.jsx)("path",{d:"m3 13 9 5 9-5M3 16.5l9 5 9-5"})]}),C=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{d:"m20 20-3.2-3.2"})]}),I=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"m6 9 6 6 6-6"})}),S=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,a.jsx)("path",{d:"M4 9h16M8 3v4M16 3v4"})]}),A=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"m9 6 6 6-6 6"})}),z=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"m15 6-6 6 6 6"})}),M=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M4 8h10M18 8h2M4 16h2M10 16h10"}),(0,a.jsx)("circle",{cx:"16",cy:"8",r:"2.2"}),(0,a.jsx)("circle",{cx:"8",cy:"16",r:"2.2"})]}),O=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M4 4 20 20"}),(0,a.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"})]}),R=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.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"})}),L=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M2 12C2 6.5 6.5 2 12 2a10 10 0 0 1 8 4"}),(0,a.jsx)("path",{d:"M5 19.5C5.5 18 6 15 6 12c0-.7.12-1.37.34-2"}),(0,a.jsx)("path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02"}),(0,a.jsx)("path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"}),(0,a.jsx)("path",{d:"M8.65 22c.21-.66.45-1.32.57-2"}),(0,a.jsx)("path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88"}),(0,a.jsx)("path",{d:"M2 16h.01"}),(0,a.jsx)("path",{d:"M21.8 16c.2-2 .13-5.354 0-6"}),(0,a.jsx)("path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2"})]}),T=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"M3 12h18"}),(0,a.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"})]}),D=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16"}),(0,a.jsx)("path",{d:"M15 9h4a1 1 0 0 1 1 1v11"}),(0,a.jsx)("path",{d:"M3 21h18"}),(0,a.jsx)("path",{d:"M8 8h3M8 12h3M8 16h3"})]}),E=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"5",r:"1.4",fill:"currentColor",stroke:"none"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"1.4",fill:"currentColor",stroke:"none"}),(0,a.jsx)("circle",{cx:"12",cy:"19",r:"1.4",fill:"currentColor",stroke:"none"})]}),F=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M12 5v14M5 12h14"})}),V=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"m8.5 12 2.3 2.3 4.7-4.6"})]}),_=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M6 6 18 18M18 6 6 18"})}),B=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M8 6h12M8 12h12M8 18h12"}),(0,a.jsx)("circle",{cx:"3.6",cy:"6",r:"1.1",fill:"currentColor",stroke:"none"}),(0,a.jsx)("circle",{cx:"3.6",cy:"12",r:"1.1",fill:"currentColor",stroke:"none"}),(0,a.jsx)("circle",{cx:"3.6",cy:"18",r:"1.1",fill:"currentColor",stroke:"none"})]}),$=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("rect",{x:"5",y:"11",width:"14",height:"9",rx:"2"}),(0,a.jsx)("path",{d:"M8 11V8a4 4 0 0 1 8 0v3"})]}),K=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M12 20V9M7 13l5-5 5 5M5 4h14"})}),H=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"6",cy:"18",r:"2.4"}),(0,a.jsx)("path",{d:"M8.4 18H16a3 3 0 0 0 0-6H8a3 3 0 0 1 0-6h7.6"}),(0,a.jsx)("circle",{cx:"18",cy:"6",r:"2.4"})]}),W=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M3 13h5l1.5 3h5L16 13h5"}),(0,a.jsx)("path",{d:"M5 5h14l2 8v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5L5 5Z"})]}),U=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M3 12h3l2-5 4 14 3-9 2 2h4"})}),G=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M3 12h4l3 8 4-16 3 8h4"})}),Z=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"M12 11v5"}),(0,a.jsx)("circle",{cx:"12",cy:"7.7",r:"1",fill:"currentColor",stroke:"none"})]}),q=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M12 21s7-6.3 7-11a7 7 0 1 0-14 0c0 4.7 7 11 7 11Z"}),(0,a.jsx)("circle",{cx:"12",cy:"10",r:"2.4"})]}),J=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.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,a.jsx)("path",{d:"M9 8h6M9 12h5"})]}),X=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M7 17 17 7M8 7h9v9"})}),Q=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M6 3h9l3 3v15H6z"}),(0,a.jsx)("path",{d:"M15 3v3h3"}),(0,a.jsx)("path",{d:"M9 12h6M9 16h4"})]}),ee=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.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,a.jsxs)("svg",{...s,...e,children:[(0,a.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,a.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),en=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,a.jsx)("path",{d:"m7 9 3 3-3 3M13 15h4"})]}),ea=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"M12 7.5V12l3 2"})]}),es=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8Z"})}),ei=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M4 20h4L19 9l-4-4L4 16v4Z"}),(0,a.jsx)("path",{d:"m14 6 4 4"})]}),el=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M6 3h8l4 4v14H6z"}),(0,a.jsx)("path",{d:"M14 3v4h4"})]}),er=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.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,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),(0,a.jsx)("path",{d:"M21 3v5h-5"}),(0,a.jsx)("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"}),(0,a.jsx)("path",{d:"M3 21v-5h5"})]}),ec=e=>(0,a.jsxs)("svg",{...s,...e,children:[(0,a.jsx)("path",{d:"M7 4 3 8l4 4"}),(0,a.jsx)("path",{d:"M3 8h14"}),(0,a.jsx)("path",{d:"m17 20 4-4-4-4"}),(0,a.jsx)("path",{d:"M21 16H7"})]}),ed=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M12 4v11M7 11l5 5 5-5M5 20h14"})}),ex=e=>(0,a.jsx)("svg",{...s,...e,children:(0,a.jsx)("path",{d:"M14 4h6v6M20 4l-7 7M10 20H4v-6M4 20l7-7"})})},9158:(e,t,n)=>{n.d(t,{SearchField:()=>o});var a=n(7643),s=n(7228),i=n(1579),l=n(8848);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:u,clearLabel:m="Clear search"}=e,p=(0,i.useRef)(null),h=()=>{var e;n(""),null==(e=p.current)||e.focus()};return(0,a.jsxs)("div",{className:(0,s.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,a.jsx)(l.WI,{"aria-hidden":!0,focusable:!1,className:(0,s.cn)("size-4 shrink-0 text-text-3",u)}),(0,a.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,a.jsx)("button",{type:"button","aria-label":m,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,a.jsx)(l.uv,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})})]})}},9580:(e,t,n)=>{n.d(t,{FindingsOverTimeCardView:()=>x});var a=n(7643),s=n(7228),i=n(7881),l=n(8189),r=n(8848),o=n(5114),c=n(5061);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,u=t.every(e=>d.every(t=>!e[t.key])),m=(0,o.T)(d);return(0,a.jsxs)(s.Zp,{className:"mt-4 shadow-sm xl:mt-5",children:[(0,a.jsxs)(s.aR,{children:[(0,a.jsx)(s.AG,{children:(0,a.jsx)(r.Uy,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(s.Lc,{children:[(0,a.jsx)(s.ZB,{children:"Findings over time"}),(0,a.jsx)(s.BT,{children:"New sensitive-data detections".concat(null===n?"":" per ".concat(n))})]}),(0,a.jsx)(s.X9,{className:"gap-3 text-xs text-text-2",children:(0,a.jsx)(o.N,{series:d,visibility:m,interactive:!x&&!i&&!u})})]}),(0,a.jsx)(s.Wu,{"aria-busy":i,className:"pb-2",children:x?(0,a.jsx)(c.rJ,{message:x}):i?(0,a.jsx)(s.EA,{className:"h-40 w-full"}):u?(0,a.jsx)(c.AW,{message:"No findings in this range."}):(0,a.jsx)(l.AreaChart,{data:t,series:m.visible,height:160})})]})}},9886:(e,t,n)=>{n.d(t,{ES:()=>d,H9:()=>u,Xg:()=>p,gh:()=>x,jP:()=>m,rE:()=>r,tG:()=>i,uR:()=>c,vm:()=>l});var a=n(7971),s=n(8848);let i="monitor";function l(e){return"regex"===e.type?"/"+e.pattern+"/"+e.flags:e.keywords.join(" \xb7 ")}let r={regex:{label:"Regex",icon:s.cZ,color:"var(--color-violet-ink)",fill:"var(--color-violet-fill)",blurb:"Pattern match"},keyword:{label:"Keyword",icon:s.Ey,color:"var(--color-teal-ink)",fill:"var(--color-teal-fill)",blurb:"Literal lookup"}},o={monitor:{id:"monitor",label:"Monitor",icon:s.bM,tone:"neutral",desc:"Log every match for audit. The request is allowed through untouched."},warn:{id:"warn",label:"Warn",icon:s._0,tone:"high",desc:"Allow the request, but warn the user inline before it is sent."},redact:{id:"redact",label:"Redact",icon:s.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:s.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:s.pD,tone:"critical",desc:"Refuse the request entirely whenever any rule in this detection matches."}},c=a.V0H;function d(e){let t=Object.hasOwn(o,e)?o[e]:void 0;return null!=t?t:{id:e,label:e,icon:s.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"},u={library:{label:"Library",icon:s.fC,tone:"teal",blurb:"Imported from the public library"},custom:{label:"Custom",icon:s.qU,tone:"violet",blurb:"Authored here — no upstream to track"}},m={labs:{label:"AKA Labs",icon:s.Zu,tone:"teal",verified:!0},org:{label:"Your org",icon:s.ai,tone:"violet",verified:!1},user:{label:"Community",icon:s.ny,tone:"neutral",verified:!1}};function p(e){return null==e.update?"unknown":e.update.available?"update-available":"up-to-date"}},9889:(e,t,n)=>{n.d(t,{t:()=>o});var a=n(7643),s=n(7228),i=n(8848),l=n(7052),r=n(9886);function o(e){var t,n,o,c,d;let{d:x,onOpenUpdate:u,onRecheck:m,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,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border shrink-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5 bg-surface-2 px-4 py-3 border-b border-border",children:[(0,a.jsx)(l.Ai,{origin:x.origin}),(0,a.jsx)(l.Jk,{publisher:null!=(c=x.publisher)?c:x.namespace,kind:null!=(d=x.publisherKind)?d:"user"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)("span",{className:"font-mono text-label text-text-2",children:["tracking v",x.version]})]}),"update-available"===h?(0,a.jsxs)("div",{className:"flex items-center gap-3 bg-sev-high-fill px-4 py-3",children:[(0,a.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-4.5 shrink-0 text-sev-high-ink"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"text-sm font-semibold text-sev-high-ink",children:["Update available \xb7 v",g]}),(0,a.jsx)("div",{className:"mt-px text-xs leading-snug text-text-2",children:"A newer version is published upstream."})]}),u&&(0,a.jsx)(s.$n,{size:"sm",onClick:u,className:"shrink-0 bg-sev-high-ink text-on-accent hover:bg-sev-high-ink",children:"Update"})]}):"up-to-date"===h?(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 text-xs text-text-3",children:[(0,a.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-4 text-ok-ink"}),"Up to date with upstream"]}):(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 text-xs text-text-3",children:[(0,a.jsx)(i.mo,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:["Update status unknown",p?(0,a.jsxs)(a.Fragment,{children:[" — ",p]}):"."]}),m&&(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:m,children:"Check again"})]})]})}},9896:(e,t,n)=>{n.d(t,{NeedsReviewStripView:()=>i});var a=n(7643),s=n(8848);function i(e){let{items:t,scope:n,onOpen:i}=e;return 0===t.length?null:(0,a.jsx)("div",{className:"mb-3.5 overflow-hidden rounded-xl border border-sev-critical-fill bg-sev-critical-fill",children:(0,a.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,a.jsx)("span",{className:"grid size-6.5 shrink-0 place-items-center rounded-md bg-sev-critical-ink text-on-accent",children:(0,a.jsx)(s._0,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text",children:"Needs review"}),(0,a.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,a.jsx)("span",{className:"shrink-0 whitespace-nowrap text-xs font-semibold text-text-2",children:n}),(0,a.jsx)("span",{className:"text-xs text-text-2",children:"Raw IPs, plaintext transfers & unverified domains"}),(0,a.jsx)(s.vK,{"aria-hidden":!0,focusable:!1,className:"ml-auto size-4.5 text-text-3"})]})})}},9999:(e,t,n)=>{n.d(t,{UpdateModal:()=>r});var a=n(7643),s=n(7228),i=n(8848),l=n(7052);function r(e){var t,n,r,o,c,d,x;let{det:u,isUpdating:m,onClose:p,onConfirm:h}=e,g=u?null!=(o=null!=(r=null==(t=u.update)?void 0:t.latestVersion)?r:u.latestVersion)?o:u.version:"",f=null==u||null==(n=u.update)?void 0:n.latestRuleCount,j=!!u&&g!==u.version;return(0,a.jsx)(s.lG,{open:!!u,onOpenChange:e=>{e||p()},children:(0,a.jsx)(s.Cf,{className:"w-155 max-w-[96vw]","aria-describedby":void 0,children:u&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.L3,{className:"sr-only",children:["Update \xb7 ",u.name]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-5 py-4",children:[(0,a.jsx)("span",{className:"grid size-9.5 shrink-0 place-items-center rounded-lg bg-sev-high-fill text-sev-high-ink",children:(0,a.jsx)(i.Kp,{"aria-hidden":!0,focusable:!1,className:"size-5"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"font-display text-base font-semibold text-text",children:["Update “",u.name,"”"]}),(0,a.jsxs)("div",{className:"text-xs text-text-3",children:["From the detection library \xb7 ",null!=(c=u.publisher)?c:u.namespace]})]}),(0,a.jsx)(s.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:p,"aria-label":"Close",className:"size-8 text-text-3",children:(0,a.jsx)(i.uv,{"aria-hidden":!0,focusable:!1})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-5 overflow-y-auto p-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.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(u.version):"".concat(String(u.ruleCount)," rules")}),(0,a.jsx)(i.fl,{"aria-hidden":!0,focusable:!1,className:"size-4 text-text-3"}),(0,a.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:u.ruleCount)," rules")}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(l.Jk,{publisher:null!=(d=u.publisher)?d:u.namespace,kind:null!=(x=u.publisherKind)?x:"user"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg border border-ok bg-ok-fill px-3 py-2.5",children:[(0,a.jsx)(i.C1,{"aria-hidden":!0,focusable:!1,className:"size-4 shrink-0 text-ok-ink"}),(0,a.jsx)("div",{className:"text-sm text-text-2",children:"Updates are never applied automatically — your enabled state and policy assignment are preserved."})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 border-t border-border px-5 py-4",children:[(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(s.$n,{variant:"outline",tone:"neutral",onClick:p,children:"Cancel"}),(0,a.jsxs)(s.$n,{variant:"solid",tone:"primary",disabled:m,onClick:()=>{h(u.id)},children:[(0,a.jsx)(i.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"}),m?"Updating…":j?"Update to v".concat(g):"Update rules"]})]})]})})})}}}]);
|