@akasecurity/cli 0.9.0-rc1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cli.js +2559 -546
- package/package.json +4 -4
- package/web-ui/web-ui/.next/BUILD_ID +1 -1
- package/web-ui/web-ui/.next/app-build-manifest.json +58 -58
- package/web-ui/web-ui/.next/app-path-routes-manifest.json +7 -7
- package/web-ui/web-ui/.next/build-manifest.json +2 -2
- package/web-ui/web-ui/.next/prerender-manifest.json +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/_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 +2 -2
- package/web-ui/web-ui/.next/server/app/index.html +1 -1
- package/web-ui/web-ui/.next/server/app/index.rsc +2 -2
- 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/{366.js → 244.js} +92 -25
- package/web-ui/web-ui/.next/server/chunks/264.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/291.js +647 -0
- package/web-ui/web-ui/.next/server/chunks/45.js +1 -1
- package/web-ui/web-ui/.next/server/chunks/461.js +5 -5
- package/web-ui/web-ui/.next/server/chunks/773.js +4 -4
- package/web-ui/web-ui/.next/server/chunks/983.js +2 -0
- package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
- 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/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/{24-55b96836aea5ce23.js → 24-d36fb6bd72e29537.js} +2 -2
- package/web-ui/web-ui/.next/static/chunks/561-52ad6ae6bf64b471.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/{page-0c208c8b275a69ac.js → page-797e2ce43b8db7e1.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/{page-041187c76bd42461.js → page-d9e9023871035a2d.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-5bd8e04955058e46.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-a254c9fc7cc27b97.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/{page-2cfe42c3dd4833c3.js → page-622151ff8e6960c8.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-c1221106bd6ba356.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/{page-d33f3999e89c7e77.js → page-fc68b0fb9b669a03.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-68418378cfb10a0f.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-2b9ea3e95dbe82fb.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-315b8b57329d5eb6.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-77adb595bb447040.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/{layout-40fea3e270a8e120.js → layout-8b19b03146218dc7.js} +1 -1
- package/web-ui/web-ui/.next/static/css/{43f95c94ecc1bd17.css → 500a1c2bf0fc64fb.css} +1 -1
- package/web-ui/web-ui/.next/server/chunks/484.js +0 -580
- package/web-ui/web-ui/.next/server/chunks/900.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/918.js +0 -2
- package/web-ui/web-ui/.next/static/chunks/561-c3388f066f813e17.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-481fedcbfb474cef.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-a20e7d7a2f0ad507.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-849d66cc2cd77cb6.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-76edd10592ba3cb1.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-50b604f229747240.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-92d1086c8e8ed3bf.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-c3c1671d32547619.js +0 -1
- /package/web-ui/web-ui/.next/static/{unUYwnPVSRwxtrUFgSAxr → ez8SLWYcUCScGuFekZ-G_}/_buildManifest.js +0 -0
- /package/web-ui/web-ui/.next/static/{unUYwnPVSRwxtrUFgSAxr → ez8SLWYcUCScGuFekZ-G_}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[561],{209:(e,t,s)=>{s.d(t,{AvailablePluginsCardView:()=>l});var a=s(2330),n=s(8726),i=s(7581);function l(e){let{plugins:t,onInstall:s,installingId:l,outcomes:r}=e;return 0===t.length?null:(0,a.jsxs)(n.Zp,{className:"shadow-sm",children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.AG,{className:"bg-teal-fill text-teal",children:(0,a.jsx)(i.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(n.Lc,{children:[(0,a.jsx)(n.ZB,{children:"Available plugins"}),(0,a.jsx)(n.BT,{children:"Agent integrations you haven’t installed yet"})]})]}),(0,a.jsx)(n.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,n.cn)("py-3",t>0&&"border-t border-text/6"),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)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:null!==l,onClick:()=>{s(e.id)},children:l===e.id?"Installing…":"Install"})]}),i&&(0,a.jsxs)("div",{className:(0,n.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)})})})]})}},402:(e,t,s)=>{s.d(t,{JW:()=>o,Lw:()=>d,UD:()=>r,md:()=>l,zn:()=>c});var a=s(2330),n=s(8726),i=s(6563);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,n.cn)("size-1.5 shrink-0 rounded-full",i.nR[t].dot)})}function r(e){let{status:t}=e,s=i.nR[t];return(0,a.jsxs)(n.Ex,{variant:s.badge,className:"h-6 gap-1.5",children:[(0,a.jsx)(l,{status:t}),s.label]})}function o(e){let{icon:t,children:s}=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"}),s]})}function c(e){var t;let{name:s,n:l,href:r}=e,o=null!=(t=i.pS[s])?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"}),s,(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(s),className:(0,n.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:s=!1}=e;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.map(e=>(0,a.jsx)("span",{className:(0,n.cn)("rounded-md border border-border bg-surface-2 px-1.5 py-0.5 text-xs text-text",s&&"font-mono"),children:e},e))})}},514:(e,t,s)=>{s.d(t,{m:()=>r});var a=s(8726),n=s(6146),i=s(7581);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:s}=e;return(0,n.createElement)(l[t],{"aria-hidden":!0,focusable:!1,className:(0,a.cn)("size-4",s)})}},666:(e,t,s)=>{s.d(t,{ExceptionDetailView:()=>d});var a=s(2330),n=s(8726),i=s(6146),l=s(8553),r=s(7524),o=s(1247),c=s(4574);function d(e){var t;let{exception:s,onRevoke:d,busy:x,error:m}=e,[p,u]=(0,i.useState)(""),h=(0,c.rO)(s);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:s.id.slice(0,8)}),(0,a.jsx)(o.StateTagFor,{exception:s})]}),(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:s.ruleId})}),(0,a.jsx)(r.p,{label:"Category",children:s.category}),(0,a.jsx)(r.p,{label:"Approved value",children:(0,a.jsx)("span",{className:"font-mono text-xs",children:s.maskedValue})}),(0,a.jsxs)(r.p,{label:"Scope",children:[c.yr[s.scope],"permanent"===s.scope&&" — until revoked"]}),(0,a.jsx)(r.p,{label:"Expires",children:null===s.expiresAt?"—":(0,l.K)(s.expiresAt)}),(0,a.jsxs)(r.p,{label:"Uses",children:[null===s.maxUses?String(s.useCount):"".concat(String(s.useCount),"/").concat(String(s.maxUses)),s.lastUsedAt&&" \xb7 last ".concat((0,l.K)(s.lastUsedAt))]}),(0,a.jsxs)(r.p,{label:"Created",children:[(0,l.K)(s.createdAt)," by ",s.createdBy," via"," ",c.gi[s.createdVia]]}),(0,a.jsx)(r.p,{label:"Key version",children:String(s.keyVersion)}),(0,a.jsx)(r.p,{label:"Fingerprint",children:(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[s.valueFingerprint.slice(0,16),"…"]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(r.e,{children:"Justification"}),(0,a.jsx)("p",{className:"text-sm text-text-2",children:s.justification})]}),null!==s.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",children:"Revoked"}),(0,a.jsxs)("p",{className:"text-sm text-text-2",children:[(0,l.K)(s.revokedAt)," by ",null!=(t=s.revokedBy)?t:"unknown",s.revokeReason?" — ".concat(s.revokeReason):""]})]}),d&&"active"===h&&(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)(n.pd,{value:p,onChange:e=>{u(e.target.value)},placeholder:"Reason (recorded in the audit trail)",className:"max-w-sm"}),(0,a.jsx)(n.$n,{variant:"solid",tone:"danger",size:"sm",disabled:x,onClick:()=>{d(p.trim())},children:"Revoke"})]}),m&&(0,a.jsx)("p",{className:"mt-2 text-xs text-sev-critical",children:m})]})]})}},801:(e,t,s)=>{s.d(t,{ColumnsMenu:()=>u,FindingsToolbarView:()=>m});var a=s(2330),n=s(8726),i=s(3439),l=s(7581),r=s(5823),o=s(8810);let c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>e in r.x?r.x[e].label:e;function x(e,t,s){let a=new Set(e.map(e=>e.value));return[...e,...t.filter(e=>!a.has(e)).map(e=>({value:e,label:s(e),count:0}))]}function m(e){let{facets:t,filters:s,onFiltersChange:n,query:r,onQueryChange:m,findingCount:u,typeCount:h}=e,j=new Map(t.severity.map(e=>[e.value,e.count])),f=o.oC.map(e=>{var t;return{value:e,label:c(e),count:null!=(t=j.get(e))?t:0}}),g=x(t.subtype.map(e=>({value:e.value,label:e.value,count:e.count})),s.type,e=>e),v=x(t.provider.map(e=>({value:e.value,label:d(e.value),count:e.count})),s.provider,d),b=x(t.action.map(e=>({value:e.value,label:c(e.value),count:e.count})),s.action,c),k=(e,t)=>{n({...s,[e]:t})};return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"relative w-64",children:[(0,a.jsx)(l.WI,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-3"}),(0,a.jsx)("input",{type:"text","aria-label":"Search findings",placeholder:"Search findings…",value:r,onChange:e=>{m(e.target.value)},className:"h-9 w-full rounded-lg border border-border bg-surface-2 pl-9 pr-3 text-sm text-text placeholder:text-text-3 focus:border-primary focus:outline-none"})]}),(0,a.jsx)(p,{label:"Severity",options:f,selected:s.severity,onChange:e=>{k("severity",e)}}),(0,a.jsx)(p,{label:"Type",options:g,selected:s.type,onChange:e=>{k("type",e)}}),(0,a.jsx)(p,{label:"Provider",options:v,selected:s.provider,onChange:e=>{k("provider",e)}}),(0,a.jsx)(p,{label:"Action",options:b,selected:s.action,onChange:e=>{k("action",e)}}),(0,a.jsx)("span",{className:"h-6 bg-border w-px"}),(0,a.jsxs)("span",{className:"text-sm text-text-3",children:[(0,a.jsx)("span",{className:"font-semibold text-text",children:i.jq.format(u)})," finding",1===u?"":"s"," \xb7"," ",(0,a.jsx)("span",{className:"font-semibold text-text",children:i.jq.format(h)})," type",1===h?"":"s"]})]})}function p(e){let{label:t,options:s,selected:i,onChange:r}=e,o=i.length>0;return(0,a.jsxs)(n.AM,{children:[(0,a.jsxs)(n.Wv,{className:(0,n.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 text-[10px] font-semibold text-text-inv",children:i.length}),(0,a.jsx)(l.D3,{className:"size-3.5"})]}),(0,a.jsxs)(n.hl,{className:"min-w-52 max-h-80",children:[s.map(e=>{let t=i.includes(e.value);return(0,a.jsxs)("button",{type:"button",onClick:()=>{var t;t=e.value,r(i.includes(t)?i.filter(e=>e!==t):[...i,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,n.cn)("flex size-4 shrink-0 items-center justify-center rounded border",t?"border-primary bg-primary text-text-inv":"border-border"),children:t&&(0,a.jsx)(l.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"})]})]})}function u(e){let{columns:t,visibility:s,onChange:i}=e,r=e=>!1!==s[e],o=t.filter(e=>r(e.id)).length;return(0,a.jsxs)(n.AM,{children:[(0,a.jsx)(n.Wv,{asChild:!0,children:(0,a.jsxs)(n.$n,{variant:"outline",children:[(0,a.jsx)(l.Qf,{})," Columns"]})}),(0,a.jsx)(n.hl,{align:"end",className:"min-w-44 p-1",children:t.map(e=>{let t=r(e.id);return(0,a.jsxs)("button",{type:"button",onClick:()=>{t&&1===o?i({}):i({...s,[e.id]:!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,n.cn)("flex size-4 shrink-0 items-center justify-center rounded border",t?"border-primary bg-primary text-text-inv":"border-border"),children:t&&(0,a.jsx)(l.Sr,{className:"size-3"})}),e.header]},e.id)})})]})}},805:(e,t,s)=>{s.d(t,{B:()=>i,i:()=>l});var a=s(2330),n=s(5823);function i(e){let{ids:t}=e;return(0,a.jsx)("div",{className:"flex items-center -space-x-1.5",children:t.map(e=>(0,a.jsx)("span",{title:n.x[e].label,className:"inline-flex rounded-lg ring-2 ring-surface",children:(0,a.jsx)(n.K,{id:e})},e))})}function l(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)(n.K,{id:t}),n.x[t].label]})}},965:(e,t,s)=>{s.d(t,{PolicyPicker:()=>i});var a=s(2330),n=s(4424);function i(e){let{value:t,onChange:s}=e,i=!s;return(0,a.jsx)("div",{className:"inline-flex gap-1 self-start rounded-lg border border-border bg-surface-2 p-0.5"+(i?" opacity-70":""),"aria-disabled":i||void 0,children:n.uR.map(e=>{let l=(0,n.ES)(e),r=t===e,[o,c]=(0,n.vV)(l.tone),d="gray"===l.tone?"var(--color-surface)":c,x=l.icon;return(0,a.jsxs)("button",{type:"button",disabled:i,onClick:s?()=>{s(e)}:void 0,"aria-pressed":r,className:"inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-semibold "+(i?"cursor-not-allowed ":"cursor-pointer ")+(r?"shadow-sm":"text-text-3"),style:r?{color:o,background:d}:void 0,children:[(0,a.jsx)(x,{"aria-hidden":!0,focusable:!1,className:"size-4"}),l.label]},e)})})}},974:(e,t,s)=>{s.d(t,{InventoryNav:()=>x});var a=s(2330),n=s(8726),i=s(6146),l=s(5823),r=s(6909),o=s(1809),c=s(514);let d=[{type:"all",label:"All"},...o.fd.map(e=>({type:e.type,label:"Configuration"===e.label?"Config":e.label.replace(" servers","")}))];function x(e){let{projects:t,assetGroups:s,harnesses:l,viewMode:r,onViewMode:o,typeFilter:x,onTypeFilter:p,query:h,onQuery:j,attention:f,isLoading:g}=e,v=(0,i.useMemo)(()=>{let e={skill:[],mcp:[],hook:[],config:[]};for(let t of s)"project"!==t.type&&(e[t.type]=t.items);return e},[s]),b=(0,i.useMemo)(()=>{let e=h.toLowerCase(),s=t=>!e||t.toLowerCase().includes(e);return t.filter(e=>s(e.name)||s(e.repo))},[t,h]);return(0,a.jsxs)(n.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===f?(0,a.jsx)("span",{className:"ml-auto text-xs text-text-3",children:"…"}):(0,a.jsxs)("span",{className:(0,n.cn)("ml-auto inline-flex items-center gap-1.5 text-xs font-semibold",f?"text-sev-high":"text-ok"),children:[(0,a.jsx)(c.m,{name:f?"flag":"check-circle",className:"size-3.5"}),f?"".concat(String(f)," to review"):"All clear"]})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.m,{name:"search",className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-3"}),(0,a.jsx)("input",{value:h,onChange:e=>{j(e.target.value)},placeholder:"Search assets…",className:"h-8.5 w-full rounded-lg border border-border bg-surface-2 pl-9 pr-3 text-sm text-text placeholder:text-text-3 focus:border-primary focus:outline-none"})]}),(0,a.jsxs)(n.Iz,{className:"mt-3 flex w-full",value:r,onValueChange:e=>{e&&o(e)},children:[(0,a.jsxs)(n.tR,{value:"tree",children:[(0,a.jsx)(c.m,{name:"layers"})," By harness"]}),(0,a.jsxs)(n.tR,{value:"type",children:[(0,a.jsx)(c.m,{name:"list"})," By type"]})]}),"type"===r&&(0,a.jsx)(n.Iz,{className:"mt-2.5 flex w-full flex-wrap border-0 bg-transparent p-0 gap-1.5",value:x,onValueChange:e=>{e&&p(e)},children:d.map(e=>(0,a.jsx)(n.tR,{value:e.type,className:(0,n.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:g&&0===l.length&&0===t.length&&0===s.length?(0,a.jsx)("div",{className:"px-3 py-6 text-center text-xs text-text-3",children:"Loading inventory…"}):"tree"===r?(0,a.jsx)(m,{...e}):(0,a.jsx)(u,{...e,projList:b,assetsByType:v})})]})}function m(e){let{harnesses:t,query:s}=e,n=s.toLowerCase(),i=e=>!n||e.toLowerCase().includes(n),l=n?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)(g,{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)(r.EmptyState,{message:s?"No matches":"No harnesses detected"})})]})}function p(e){var t,s,i;let{h:r,sel:d,expanded:x,onToggleExpand:m,onSelectHarness:p,onSelectAsset:u,query:f}=e,g=r.projects,v=r.categories,b=null!=(s=x[r.id])?s:!!f&&(g.length>0||v.length>0),k=(null==d?void 0:d.type)==="harness"&&d.id===r.id,N=(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,n.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:()=>{m(r.id,!b)},className:"my-2.5 ml-2.5 grid size-4.5 shrink-0 cursor-pointer place-items-center rounded text-text-3",children:(0,a.jsx)(c.m,{name:"chevron-right",className:(0,n.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:()=>{p(r.id),b||m(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:[N>0&&(0,a.jsx)("span",{className:"size-2 rounded-full bg-sev-critical"}),0===r.flagCount?(0,a.jsx)(c.m,{name:"check-circle",className:"size-3.5 text-ok"}):(0,a.jsx)("span",{className:"rounded-full bg-sev-high px-1.5 py-px text-xs font-bold text-white",children:r.flagCount})]})]})]}),b&&(0,a.jsxs)("div",{className:"my-0.5 ml-4 border-l border-border pl-2.5",children:[g.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)(c.m,{name:o.WD.icon,className:"size-3 text-text-3"}),(0,a.jsx)("span",{className:"text-label font-bold uppercase tracking-wider text-text-3",children:o.WD.label}),(0,a.jsx)("span",{className:"text-label font-semibold text-text-3",children:g.length})]}),g.map(t=>(0,a.jsx)(h,{p:t,fromHarness:r.id,...e},t.id))]}),v.map(e=>{let t=o.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)(c.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)(j,{it:e,indent:!0,fromHarness:r.id,sel:d,onSelectAsset:u},e.id))]},e.type)})]})]})}function u(e){let{typeFilter:t,query:s,projList:n,assetsByType:i}=e,l=s.toLowerCase(),c=e=>!l||e.toLowerCase().includes(l),d=0,x=o.fd.map(s=>{let l;if(l=s.type,"all"!==t&&t!==l)return null;if("project"===s.type){let i=n.length;return 0===i&&"all"===t?null:(i>0&&d++,(0,a.jsxs)("div",{children:[(0,a.jsx)(f,{group:s,items:n.map(e=>({flags:e.findingsCount>0?["findings"]:[]}))}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:0===i?(0,a.jsx)(r.EmptyState,{message:"No ".concat(s.label.toLowerCase())}):n.map(t=>(0,a.jsx)(h,{p:t,...e},t.id))})]},s.type))}let o=i[s.type].filter(e=>c(e.name)||c(e.sub));return 0===o.length&&"all"===t?null:(o.length>0&&d++,(0,a.jsxs)("div",{children:[(0,a.jsx)(f,{group:s,items:o,mcpItems:"mcp"===s.type?o:void 0}),(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:0===o.length?(0,a.jsx)(r.EmptyState,{message:"No ".concat(s.label.toLowerCase())}):o.map(t=>(0,a.jsx)(j,{it:t,sel:e.sel,onSelectAsset:e.onSelectAsset},t.id))})]},s.type))});return"all"===t&&0===d?(0,a.jsx)(r.EmptyState,{icon:"search",message:s?"No assets match “".concat(s,"”"):"No assets"}):(0,a.jsx)(a.Fragment,{children:x})}function h(e){let{p:t,fromHarness:s,selFromHarness:i,sel:l,onSelectProject:d}=e,x=t.accessCounts,m=t.findingsCount,p=(null==l?void 0:l.type)==="project"&&l.id===t.id&&(null==s||null==i||s===i);return(0,a.jsxs)("button",{type:"button",onClick:()=>{d(t.id,s)},className:(0,n.cn)("flex w-full flex-col rounded-lg p-2.5 text-left cursor-pointer",p?"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,o.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)(r.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)(c.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)(r.AJ,{counts:x}),x.blocked>0?(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical",children:[x.blocked," blocked"]}):(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[x.total," files"]}),m>0&&(0,a.jsx)("span",{className:"ml-auto shrink-0",children:(0,a.jsx)(r.Kh,{flags:["findings"],mini:!0})})]})]})}function j(e){let{it:t,indent:s,fromHarness:i,sel:l,onSelectAsset:d}=e,x=(null==l?void 0:l.type)===t.type&&l.id===t.id,m=(0,o.TW)(t.type),p="mcp"===t.type?t.trust:void 0;return(0,a.jsxs)("button",{type:"button",onClick:()=>{d(t,i)},className:(0,n.cn)("flex w-full items-center gap-2.5 rounded-lg py-3 text-left cursor-pointer",s?"px-3":"px-2.5",x?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,a.jsx)("span",{className:(0,n.cn)("grid size-7.5 shrink-0 place-items-center rounded-md",m.bg,m.fg),children:(0,a.jsx)(c.m,{name:m.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:[p&&(0,a.jsx)(r.As,{value:p}),t.flags.length>0&&(0,a.jsx)(r.Kh,{flags:t.flags,mini:!0})]})]})}function f(e){let{group:t,items:s,mcpItems:i}=e,l=(0,o.z)(s),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,n.cn)("grid size-5 shrink-0 place-items-center rounded",t.bg,t.fg),children:(0,a.jsx)(c.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:s.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)(n.Ex,{variant:o.ZY[e.k].tone,children:[e.n," ",o.ZY[e.k].label.toLowerCase()]},e.k)),l.map(e=>(0,a.jsxs)(n.Ex,{variant:o.lx[e.key].tone,children:[e.count," ",o.lx[e.key].short.toLowerCase()]},e.key))]})]})}function g(e){let{iconName:t,label:s,count:n}=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)(c.m,{name:t,className:"size-3"})}),(0,a.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-text-2",children:s}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-3",children:n})]})}},1236:(e,t,s)=>{s.d(t,{A:()=>l,r:()=>i});var a=s(2330),n=s(8726);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:s}=e;return(0,a.jsx)("div",{className:(0,n.cn)("w-full py-6 text-center text-xs text-text-3",s),children:t})}},1247:(e,t,s)=>{s.d(t,{ScopePicker:()=>o,StateTag:()=>l,StateTagFor:()=>r});var a=s(2330),n=s(8726),i=s(4574);function l(e){let{state:t}=e;return(0,a.jsx)(n.Ex,{variant:i.hv[t],children:t})}function r(e){let{exception:t,now:s}=e;return(0,a.jsx)(l,{state:(0,i.rO)(t,s)})}function o(e){let{value:t,onChange:s}=e;return(0,a.jsx)(n.Iz,{value:null!=t?t:"",onValueChange:e=>{e&&s(e)},children:i.rU.map(e=>(0,a.jsx)(n.tR,{value:e,children:i.DU[e]},e))})}},1252:(e,t,s)=>{s.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)"}},1415:(e,t,s)=>{s.d(t,{Jy:()=>l,QT:()=>i,hn:()=>n,sp:()=>a.spO,sr:()=>r});var a=s(8338);let n=[{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,s;return null!=(s=null==(t=n.find(t=>t.value===e))?void 0:t.label)?s: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"}},1447:(e,t,s)=>{s.d(t,{ROTATE_CONFIRMATION:()=>l,RotateKeyDialog:()=>r});var a=s(2330),n=s(8726),i=s(6146);let l="rotate";function r(e){let{open:t,onOpenChange:s,activePermanent:r,keyVersion:o,onConfirm:c,busy:d,error:x}=e,[m,p]=(0,i.useState)("");return(0,a.jsx)(n.lG,{open:t,onOpenChange:e=>{e||p(""),s(e)},children:(0,a.jsxs)(n.Cf,{children:[(0,a.jsxs)(n.c7,{children:[(0,a.jsx)(n.L3,{children:"Rotate the fingerprint key"}),(0,a.jsxs)(n.rr,{children:["Rotation mints a fresh key",null!==o&&" (v".concat(String(o)," → v").concat(String(o+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)(n.R4,{children:[r.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",children:"Active permanent grants that will stop applying"}),(0,a.jsx)("ul",{className:"flex flex-col gap-1",children:r.map(e=>(0,a.jsxs)("li",{className:"font-mono text-xs text-text-2",children:[e.ruleId," \xb7 ",e.maskedValue]},e.id))})]}),(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 “",l,"” to confirm"]}),(0,a.jsx)(n.pd,{value:m,onChange:e=>{p(e.target.value)},autoComplete:"off"})]}),x&&(0,a.jsx)("p",{className:"text-xs text-sev-critical",children:x})]}),(0,a.jsxs)(n.Es,{children:[(0,a.jsx)(n.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{s(!1)},children:"Cancel"}),(0,a.jsx)(n.$n,{variant:"solid",tone:"danger",size:"sm",disabled:m!==l||d,onClick:()=>{c(m)},children:d?"Rotating…":"Rotate key"})]})]})})}},1462:(e,t,s)=>{s.d(t,{DETECTION_FILTER_TABS:()=>o,DetectionsListView:()=>d});var a=s(2330),n=s(8726),i=s(7581),l=s(2769),r=s(4424);let o=[["all","All"],["library","Library"],["updates","Updates"]];function c(e){var t;let{d:s,sel:n,updateVersion:i,onClick:o}=e;return(0,a.jsx)("button",{type:"button",onClick:o,className:"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:"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:s.enabled?"Enabled":"Disabled",className:"size-2 shrink-0 rounded-full "+(s.enabled?"bg-ok ring-3 ring-ok-fill":"bg-border-strong")}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-text",title:s.name,children:s.name})]}),(0,a.jsxs)("div",{className:"font-mono text-xs text-text-3",children:["v",s.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:s.id}),(0,a.jsxs)("span",{className:"text-xs text-text-3 shrink-0",children:[s.ruleCount," rule",1===s.ruleCount?"":"s"]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5 mt-1",children:[(0,a.jsx)(l.Ai,{origin:s.origin}),(0,a.jsx)(l.$F,{policy:null!=(t=s.policyId)?t:r.tG}),i?(0,a.jsx)(l.Zp,{version:i}):null]})]})})}function d(e){let{items:t,counts:s,activeId:l,query:r,filter:d,onQueryChange:x,onFilterChange:m,onSelect:p,isLoading:u=!1,error:h=null,updatesById:j,filterTabs:f=o}=e;return(0,a.jsxs)(n.Zp,{className:"flex flex-col overflow-hidden shadow-sm",children:[(0,a.jsxs)("div",{className:"border-b border-border p-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.WI,{"aria-hidden":!0,focusable:!1,className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-3"}),(0,a.jsx)("input",{value:r,onChange:e=>{x(e.target.value)},spellCheck:!1,placeholder:"Search detections…",className:"h-9 w-full rounded-lg border border-border bg-surface-2 pl-9 pr-3 text-sm text-text placeholder:text-text-3 focus:border-primary focus:outline-none"})]}),(0,a.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:f.map(e=>{var t;let[n,l]=e,r=d===n,o=null!=(t=s[n])?t:0,c="updates"===n&&o>0;return(0,a.jsxs)("button",{type:"button",onClick:()=>{m(n)},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":"border-primary bg-primary-tint text-primary":c?"border-border text-sev-high":"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})]},n)})})]}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-3",children:u?(0,a.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:"Loading detections…"}):h?(0,a.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-sev-critical",children:h}):0===t.length?(0,a.jsx)("div",{className:"grid flex-1 place-items-center p-6 text-center text-xs text-text-3",children:r.trim()?"No detections match “".concat(r.trim(),"”"):"No detections in this view"}):t.map(e=>(0,a.jsx)(c,{d:e,sel:e.id===l,updateVersion:null==j?void 0:j.get(e.id),onClick:()=>{p(e.id)}},e.id))})]})}},1648:(e,t,s)=>{s.d(t,{ExceptionsTableView:()=>o});var a=s(2330),n=s(8726),i=s(8553),l=s(1247),r=s(4574);function o(e){let{items:t,includeTerminal:s,onSelect:o}=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:s?"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)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{children:"ID"}),(0,a.jsx)(n.nd,{children:"Rule"}),(0,a.jsx)(n.nd,{children:"Value"}),(0,a.jsx)(n.nd,{children:"Scope"}),(0,a.jsx)(n.nd,{children:"Expires"}),(0,a.jsx)(n.nd,{children:"Uses"}),(0,a.jsx)(n.nd,{children:"Created"}),(0,a.jsx)(n.nd,{children:"State"})]})}),(0,a.jsx)(n.BF,{children:t.map(e=>(0,a.jsxs)(n.Hj,{className:"cursor-pointer",onClick:()=>{o(e.id)},children:[(0,a.jsx)(n.nA,{className:"font-mono text-xs text-text-3",children:e.id.slice(0,8)}),(0,a.jsx)(n.nA,{className:"font-mono text-xs",children:e.ruleId}),(0,a.jsx)(n.nA,{className:"font-mono text-xs",children:e.maskedValue}),(0,a.jsx)(n.nA,{className:"text-xs",children:r.yr[e.scope]}),(0,a.jsx)(n.nA,{className:"text-xs text-text-2",children:null===e.expiresAt?"—":(0,i.K)(e.expiresAt)}),(0,a.jsx)(n.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)(n.nA,{className:"text-xs text-text-2",children:[(0,i.K)(e.createdAt)," \xb7 ",r.gi[e.createdVia]]}),(0,a.jsx)(n.nA,{children:(0,a.jsx)(l.StateTagFor,{exception:e})})]},e.id))})]})})}},1660:(e,t,s)=>{s.d(t,{HD:()=>d,SU:()=>u,UH:()=>p,Wi:()=>m,eV:()=>c,kX:()=>o,xB:()=>x});var a=s(2330),n=s(8726),i=s(7581),l=s(1789);let r={GET:"bg-sev-low-fill text-sev-low",POST:"bg-ok-fill text-ok",PUT:"bg-sev-high-fill text-sev-high",DELETE:"bg-sev-critical-fill text-sev-critical"};function o(e){let{method:t}=e;return(0,a.jsx)("span",{className:(0,n.cn)("inline-flex h-5 items-center rounded px-1.5 font-mono text-label leading-none font-bold py-0.5",r[t]),children:t})}function c(e){let{transport:t,plain:s}=e,i=l.aD[t],r=i.icon;return s?(0,a.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1.5 text-xs font-semibold",i.secure?"text-text-2":"text-sev-critical"),children:[(0,a.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),i.label,!i.secure&&" \xb7 plaintext"]}):(0,a.jsxs)(n.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,s=l.Hf[t],i=s.icon;return(0,a.jsxs)(n.Ex,{variant:s.tone,children:[(0,a.jsx)(i,{"aria-hidden":!0,focusable:!1,className:"size-3"}),s.label]})}function x(e){let{trust:t}=e,s=l.pN[t],i=s.icon;return(0,a.jsxs)(n.Ex,{variant:s.tone,children:[(0,a.jsx)(i,{"aria-hidden":!0,focusable:!1,className:"size-3"}),s.label]})}function m(e){let{kind:t,trust:s,name:r,host:o,size:c=34}=e;if("provider"===t){let{short:e,color:t}=(0,l.Lh)(r,o);return(0,a.jsx)("span",{className:"inline-flex shrink-0 items-center justify-center rounded-lg font-display font-semibold text-white",style:{width:c,height:c,background:t,fontSize:.34*c},children:e})}let d={width:.5*c,height:.5*c},x="ip"===t?(0,a.jsx)(i.ts,{"aria-hidden":!0,focusable:!1,style:d}):"unverified"===s?(0,a.jsx)(i.ai,{"aria-hidden":!0,focusable:!1,style:d}):(0,a.jsx)(i.RR,{"aria-hidden":!0,focusable:!1,style:d});return(0,a.jsx)("span",{className:(0,n.cn)("grid shrink-0 place-items-center rounded-lg",(0,l.rL)({kind:t,trust:s})),style:{width:c,height:c},children:x})}function p(e){let{url:t,big:s}=e,i=t.split(/(\$\{[^}]+\})/g);return(0,a.jsx)("span",{className:(0,n.cn)("break-all font-mono",s?"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 u(){return(0,a.jsxs)(n.Ex,{variant:"default",children:[(0,a.jsx)(i.cZ,{"aria-hidden":!0,focusable:!1,className:"size-2.5"}),"Template"]})}},1789:(e,t,s)=>{s.d(t,{CF:()=>o,EI:()=>i,Hf:()=>l,Lh:()=>u,ZX:()=>x,aD:()=>n,pN:()=>r,rL:()=>m});var a=s(7581);let n={https:{label:"HTTPS",icon:a.XA,secure:!0},http:{label:"HTTP",icon:a.fC,secure:!1},sftp:{label:"SFTP",icon:a.JM,secure:!0},grpc:{label:"gRPC",icon:a.hF,secure:!0},smtp:{label:"SMTP",icon:a.K$,secure:!0}};function i(e){return e.some(e=>!n[e].secure)}let l={secrets:{label:"Secrets",tone:"critical",icon:a.RY},pii:{label:"PII",tone:"high",icon:a.Ey},customer:{label:"Customer data",tone:"high",icon:a.ny},source:{label:"Source code",tone:"low",icon:a.lo},telemetry:{label:"Telemetry",tone:"teal",icon:a.BH},logs:{label:"Logs",tone:"default",icon:a.kp},metrics:{label:"Metrics",tone:"teal",icon:a.np},none:{label:"No payload",tone:"default",icon:a.mo}},r={recognized:{label:"Known provider",tone:"success",icon:a.C1},internal:{label:"Your organization",tone:"primary",icon:a.Zu},unverified:{label:"Unverified domain",tone:"high",icon:a._0},ip:{label:"Raw IP address",tone:"critical",icon:a.rX}},o={provider:"Providers",internal:"Internal & corporate domains",ip:"Raw IP addresses"},c={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"},d=["raw_ip","unverified_domain","plaintext_transport"];function x(e){let t=d.find(t=>e.includes(t));return t?c[t]:"Needs review"}function m(e){return"ip"===e.kind?"bg-sev-critical-fill text-sev-critical":"unverified"===e.trust?"bg-sev-high-fill text-sev-high":"bg-primary-tint text-primary"}let p=["#2563EB","#7C3AED","#DB2777","#0891B2","#CA8A04","#059669"];function u(e,t){var s;let a=null!=t?t:e,n=0;for(let e=0;e<a.length;e++)n=31*n+a.charCodeAt(e)>>>0;return{short:function(e){var t,s,a,n;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!=(s=i[1])?s:"";return((null!=(a=l[0])?a:"")+(null!=(n=r[0])?n:"")).toUpperCase()||"?"}(e),color:null!=(s=p[n%p.length])?s:"#2563EB"}}},1809:(e,t,s)=>{s.d(t,{Cs:()=>f,Gb:()=>c,IF:()=>n,Pe:()=>a,TW:()=>p,WD:()=>d,ZY:()=>i,_t:()=>v,fd:()=>m,iL:()=>h,lx:()=>r,pA:()=>x,v7:()=>u,yx:()=>l,z:()=>g});let a={open:{label:"Any LLM",icon:"cloud",fg:"text-ok",bg:"bg-ok-fill",bar:"bg-ok",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",desc:"Allowed only to approved, governed models."},blocked:{label:"No LLM",icon:"slash-circle",fg:"text-sev-critical",bg:"bg-sev-critical-fill",bar:"bg-sev-critical",desc:"Never sent to any model. Blocked at the proxy."}},n=["open","approved","blocked"],i={"known-good":{label:"Known good",icon:"shield-check",tone:"success",fg:"text-ok",bg:"bg-ok-fill",iconBg:"bg-ok",desc:"Reviewed & allow-listed. Agents may call it freely."},risky:{label:"Risky",icon:"alert",tone:"high",fg:"text-sev-high",bg:"bg-sev-high-fill",iconBg:"bg-sev-high",desc:"Allowed, but reaches sensitive systems or external hosts. Use with care."},unapproved:{label:"Unapproved",icon:"x-circle",tone:"critical",fg:"text-sev-critical",bg:"bg-sev-critical-fill",iconBg:"bg-sev-critical",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",bg:"bg-violet-fill"},mcp:{type:"mcp",label:"MCP servers",icon:"server",fg:"text-teal",bg:"bg-teal-fill"},hook:{type:"hook",label:"Hooks",icon:"route",fg:"text-sev-low",bg:"bg-sev-low-fill"},config:{type:"config",label:"Configuration",icon:"sliders",fg:"text-teal",bg:"bg-surface-2"}},m=[d,x.skill,x.mcp,x.hook,x.config],p=e=>{let{icon:t,fg:s,bg:a}="project"===e?d:x[e];return{icon:t,fg:s,bg:a}};function u(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",bg:"bg-sev-critical-fill"},redact:{label:"Redacted",icon:"redact",tone:"teal",fg:"text-teal",bg:"bg-teal-fill"},warn:{label:"Warned",icon:"alert",tone:"high",fg:"text-sev-high",bg:"bg-sev-high-fill"}},j={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=j[e.toLowerCase()])?t:"var(--color-border-strong)"}function g(e){let t={};return e.forEach(e=>{e.flags.forEach(e=>{var s;t[e]=(null!=(s=t[e])?s:0)+1})}),o.filter(e=>t[e]).map(e=>{var s;return{key:e,count:null!=(s=t[e])?s: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 s="blocked"===e.policyDefault?"No LLM":"Approved only";return"Private repository. First-party files default to “".concat(s,"”. Adjust per file as needed.")}},1951:(e,t,s)=>{s.d(t,{UpdateStatusCardView:()=>l});var a=s(2330),n=s(8726),i=s(7581);function l(e){let{statuses:t,checkedAt:s,onCheckNow:l,onApply:r,applyingId:o,outcomes:c,restartRequired:d,busy:x}=e;return(0,a.jsxs)(n.Zp,{className:"shadow-sm",children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.AG,{className:"bg-primary-tint text-primary",children:(0,a.jsx)(i.fN,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(n.Lc,{children:[(0,a.jsx)(n.ZB,{children:"Installed components"}),(0,a.jsx)(n.BT,{children:s?"Last checked ".concat(s):"Not checked yet"})]}),(0,a.jsx)(n.$n,{variant:"outline",tone:"neutral",size:"sm",disabled:x,onClick:l,children:x?"Checking…":"Check now"})]}),(0,a.jsxs)(n.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 s;let i=c[e.id];return(0,a.jsxs)("div",{className:(0,n.cn)("py-3",t>0&&"border-t border-text/6"),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!=(s=e.installed)?s:"—",e.latest&&e.updateAvailable&&" → ".concat(e.latest)]})]}),null===e.installed||null===e.latest?(0,a.jsx)(n.Ex,{variant:"default",children:"unknown"}):e.updateAvailable?(0,a.jsx)(n.Ex,{variant:"high",children:"update available"}):(0,a.jsx)(n.Ex,{variant:"success",children:"up to date"}),e.updateAvailable&&(0,a.jsx)(n.$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,n.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."})]})]})]})}},2011:(e,t,s)=>{s.d(t,{t:()=>o});var a=s(2330),n=s(8726),i=s(7581),l=s(2769),r=s(4424);function o(e){var t,s,o,c,d;let{d:x,onOpenUpdate:m,onRecheck:p,unknownHint:u}=e,h=(0,r.Xg)(x),j=null!=(o=null!=(s=null==(t=x.update)?void 0:t.latestVersion)?s: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"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"text-sm font-semibold text-sev-high",children:["Update available \xb7 v",j]}),(0,a.jsx)("div",{className:"mt-px text-xs leading-snug text-text-2",children:"A newer version is published upstream."})]}),m&&(0,a.jsx)(n.$n,{size:"sm",onClick:m,className:"shrink-0 bg-sev-high text-white hover:bg-sev-high",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"}),"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",u?(0,a.jsxs)(a.Fragment,{children:[" — ",u]}):"."]}),p&&(0,a.jsx)(n.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:p,children:"Check again"})]})]})}},2769:(e,t,s)=>{s.d(t,{$F:()=>r,Ai:()=>o,Jk:()=>d,Zp:()=>c});var a=s(2330),n=s(7581),i=s(4424);function l(e){let{tone:t,icon:s,children:n,className:l}=e,[r,o]=(0,i.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:[s&&(0,a.jsx)(s,{"aria-hidden":!0,focusable:!1,className:"size-3"}),n]})}function r(e){let{policy:t}=e,s=(0,i.ES)(t),[n,l]=(0,i.vV)(s.tone),r=s.icon;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:n,background:l},children:[(0,a.jsx)(r,{"aria-hidden":!0,focusable:!1,className:"size-3"}),s.label]})}function o(e){let{origin:t}=e,s=i.H9[t];return(0,a.jsx)(l,{tone:s.tone,icon:s.icon,children:s.label})}function c(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",children:[(0,a.jsx)(n.Kp,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t?"Update \xb7 v"+t:"Update"]})}function d(e){let{publisher:t,kind:s}=e,n=i.jP[s],[l]=(0,i.vV)(n.tone),r=n.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)(r,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0",style:{color:l}}),(0,a.jsx)("span",{className:"truncate",title:t,children:t}),n.verified&&(0,a.jsx)("span",{title:n.label,className:"text-[10px] font-bold",style:{color:l},children:"✓"})]})}},3365:(e,t,s)=>{s.d(t,{WorkspaceSettingsFormView:()=>d});var a=s(2330),n=s(8726),i=s(6146),l=s(7524);let r=[{value:"redact",label:"Redact",description:"Lean toward replacing sensitive values before they reach the model (recommended)."},{value:"warn",label:"Warn only",description:"Lean toward surfacing detections rather than redacting them by default."}],o=[{value:"session-only",label:"Session only",description:"Only activity from after install is inspected (default — never assumed)."},{value:"full",label:"Full",description:"Pre-install surfaces (existing configs, history) may be scanned too."}];function c(e){let{name:t,choices:s,value:i,onChange:l}=e;return(0,a.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":t,children:s.map(e=>(0,a.jsxs)("label",{className:(0,n.cn)("flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors",i===e.value?"border-primary bg-primary-tint":"border-border bg-surface hover:bg-surface-2"),children:[(0,a.jsx)("input",{type:"radio",name:t,checked:i===e.value,onChange:()=>{l(e.value)},className:"mt-1 accent-primary"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block text-sm font-semibold text-text",children:e.label}),(0,a.jsx)("span",{className:"mt-0.5 block text-xs text-text-2",children:e.description})]})]},e.value))})}function d(e){let{settings:t,onSave:s,busy:d,error:x,saved:m}=e,[p,u]=(0,i.useState)(t.policy),[h,j]=(0,i.useState)(t.historicalAccess),f=p!==t.policy||h!==t.historicalAccess;return(0,a.jsxs)("div",{className:"flex max-w-2xl flex-col gap-6",children:[(0,a.jsxs)("section",{className:"rounded-xl border border-border bg-surface p-5",children:[(0,a.jsx)(l.e,{children:"Sensitive-data handling"}),(0,a.jsx)("p",{className:"mb-3 text-xs text-text-3",children:"Your default leaning for sensitive detections. What actually happens per detection is governed by the per-category Policies, not this global default."}),(0,a.jsx)(c,{name:"policy",choices:r,value:p,onChange:u})]}),(0,a.jsxs)("section",{className:"rounded-xl border border-border bg-surface p-5",children:[(0,a.jsx)(l.e,{children:"Historical access"}),(0,a.jsx)("p",{className:"mb-3 text-xs text-text-3",children:"Consent to inspect surfaces that existed before AKA was installed."}),(0,a.jsx)(c,{name:"historicalAccess",choices:o,value:h,onChange:j})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!f||d,onClick:()=>{s({policy:p,historicalAccess:h})},children:d?"Saving…":"Save changes"}),m&&!f&&(0,a.jsx)("span",{className:"text-xs text-ok",children:"Saved."}),x&&(0,a.jsx)("span",{className:"text-xs text-sev-critical",children:x})]})]})}},3439:(e,t,s)=>{s.d(t,{AW:()=>n.A,rJ:()=>n.r,jq:()=>a});let a=new Intl.NumberFormat("en-US");var n=s(1236)},3492:(e,t,s)=>{s.d(t,{AssetDetail:()=>d});var a=s(2330),n=s(8726),i=s(6146),l=s(6909),r=s(1809),o=s(514);let c={skill:"Skill",mcp:"MCP server",hook:"Hook",config:"Configuration file"};function d(e){let{asset:t,onTrust:s,onClose:i}=e,d="mcp"===t.type,m=t.trust,p=(0,r.TW)(t.type),u=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,n.cn)("grid size-8.5 shrink-0 place-items-center rounded-lg",p.bg,p.fg),children:(0,a.jsx)(o.m,{name:p.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:u})]}),i&&(0,a.jsx)(n.$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&&m&&(0,a.jsx)(l.As,{value:m}),(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&&m&&(0,a.jsx)(l.wn,{label:"Trust classification",children:(0,a.jsx)(l.AC,{order:r.yx,meta:r.ZY,value:m,onChange:s,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"}),(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,s]=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(s)})]},t)})})}),d&&t.tools&&(0,a.jsx)(x,{tools:t.tools,blocked:"unapproved"===m}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:function(e,t){let s;if("skill"===e.type){let t="string"==typeof e.meta.Latest?e.meta.Latest:"";s=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 s="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 s.map(e=>(0,a.jsxs)(n.$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,m)})]})]})}function x(e){let{tools:t,blocked:s}=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}),s&&(0,a.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1.5 text-xs font-semibold text-sev-critical",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,n.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",s&&"opacity-70"),children:[(0,a.jsx)("span",{className:(0,n.cn)("mt-px grid size-5.5 shrink-0 place-items-center rounded-md",e.risk?"bg-sev-high text-white":e.write?"bg-surface-2 text-text-2":"bg-teal-fill text-teal"),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",children:[(0,a.jsx)(o.m,{name:"alert",className:"size-3"})," ",e.risk]})]})]},e.name))}),t.length>4&&(0,a.jsxs)(n.$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,n.cn)("size-3.5 transition-transform",l&&"rotate-180")}),l?"Show fewer":"Show all ".concat(String(t.length)," tools")]})]})}},3741:(e,t,s)=>{s.d(t,{BlockedWindowSelect:()=>r});var a=s(2330),n=s(8726),i=s(1415),l=s(7581);function r(e){var t,s;let{value:r,onChange:o}=e,c=null!=(s=null==(t=i.Jy.find(e=>e.value===r))?void 0:t.label)?s:r;return(0,a.jsxs)(n.rI,{children:[(0,a.jsx)(n.ty,{asChild:!0,children:(0,a.jsxs)(n.$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)(n.SQ,{align:"end",className:"w-40",children:(0,a.jsx)(n.Hr,{value:r,onValueChange:e=>{o(e)},children:i.Jy.map(e=>(0,a.jsx)(n.Ht,{value:e.value,children:e.label},e.value))})})]})}},3760:(e,t,s)=>{s.d(t,{MatcherModal:()=>c});var a=s(2330),n=s(8726),i=s(7581),l=s(4424);function r(e){let{matcher:t}=e;return"regex"===t.type?(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(o,{label:"Pattern",children:(0,a.jsx)("code",{className:"block break-all rounded-md border border-border bg-surface-2 px-2.5 py-2 font-mono text-xs text-text",children:t.pattern})}),(0,a.jsx)(o,{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)(o,{label:"Capture group",children:(0,a.jsx)("span",{className:"font-mono text-xs text-text-2",children:t.captureGroup})})]}):"keyword"===t.type?(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(o,{label:"Keywords",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.keywords.map(e=>(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:e},e))})}),(0,a.jsx)(o,{label:"Case sensitive",children:(0,a.jsx)("span",{className:"text-xs text-text-2",children:t.caseSensitive?"Yes":"No"})})]}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(0,a.jsx)(o,{label:"Validator",children:(0,a.jsx)("code",{className:"font-mono text-xs text-text-2",children:t.name})})})}function o(e){let{label:t,children:s}=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}),s]})}function c(e){let{rule:t,onClose:s}=e,o=!!t,c=t?l.rE[t.matcher.type]:null,x=null==c?void 0:c.icon;return(0,a.jsx)(n.lG,{open:o,onOpenChange:e=>{e||s()},children:(0,a.jsx)(n.Cf,{className:"max-w-3xl","aria-describedby":void 0,children:t&&c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.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:x&&(0,a.jsx)(x,{"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)(n.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)(n.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:s,"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:"min-h-0 flex-1 overflow-y-auto p-5",children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,a.jsx)(d,{icon:(0,a.jsx)(i.kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:l.gh[t.category]||t.category}),(0,a.jsx)(d,{icon:x&&(0,a.jsx)(x,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),children:c.blurb})]}),(0,a.jsx)(r,{matcher:t.matcher})]})]})})})}function d(e){let{icon:t,children:s}=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,s]})}},3868:(e,t,s)=>{s.d(t,{HarnessSelect:()=>o});var a=s(2330),n=s(8726),i=s(7581),l=s(5823),r=s(6563);function o(e){let{value:t,onChange:s,options:o}=e,c=o?r.oo.filter(e=>o.includes(e)||t.includes(e)):r.oo,d=0===t.length,x=t[0],m=d?"All harnesses":1===t.length&&x?l.x[x].label:"".concat(String(t.length)," harnesses");return(0,a.jsxs)(n.rI,{children:[(0,a.jsxs)(n.ty,{className:(0,n.cn)("group flex h-8.5 w-full items-center gap-2 rounded-lg border bg-surface px-2.5 text-sm outline-none focus-visible:ring-2 focus-visible:ring-primary/40",d?"border-border":"border-primary"),children:[(0,a.jsx)(i.k3,{"aria-hidden":!0,focusable:!1,className:(0,n.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:m}),!d&&(0,a.jsx)(n.Ex,{variant:"primary",className:"px-1.5 py-0 text-label bg-surface",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)(n.SQ,{align:"start",className:"w-(--radix-dropdown-menu-trigger-width)",children:[(0,a.jsx)(n.hO,{checked:d,onCheckedChange:()=>{s([])},onSelect:e=>{e.preventDefault()},children:"All harnesses"}),(0,a.jsx)(n.mB,{}),c.map(e=>(0,a.jsx)(n.hO,{checked:t.includes(e),onCheckedChange:()=>{let a=t.includes(e)?t.filter(t=>t!==e):[...t,e];s(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))]})]})}},4026:(e,t,s)=>{s.d(t,{FindingDetailView:()=>u,formatConfidence:()=>m});var a=s(2330),n=s(8726),i=s(8553),l=s(7524),r=s(7581),o=s(5823),c=s(8519),d=s(8810),x=s(805);function m(e){let t=e.toFixed(2);return e>=.9?{label:"High \xb7 ".concat(t),tone:"text-ok"}:e>=.7?{label:"Medium \xb7 ".concat(t),tone:"text-sev-high"}:{label:"Low \xb7 ".concat(t),tone:"text-text-2"}}function p(e){let{confidence:t}=e,{label:s,tone:n}=m(t);return(0,a.jsx)("span",{className:n,children:s})}function u(e){var t;let{selection:s,onSelectInstance:o,onBack:m,footer:u}=e,{finding:f,instance:g}=s,v=null!=(t=d.y7[f.category])?t:r.RY,b=!g,k=f.providers.length,N=function(e){let t=d.gh[e];return t||e}(f.category);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Fm,{className:"flex-row items-center gap-2.5 border-b border-border p-4 pr-12",children:[(0,a.jsx)(n.Pt,{severity:f.severity}),(0,a.jsx)(n.qp,{className:"font-mono text-xs font-semibold text-text-3",children:b?N:g.id})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 pb-4",children:[!b&&(0,a.jsxs)(n.$n,{variant:"link",tone:"primary",size:"sm",onClick:m,className:"self-start",children:[(0,a.jsx)(r.YJ,{"aria-hidden":!0,focusable:!1,className:"size-4"}),"Back to finding"]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:(0,n.cn)("flex size-10 shrink-0 items-center justify-center rounded-lg",(0,d.i9)(f.category)),children:(0,a.jsx)(v,{className:"size-5"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-display text-base font-semibold",children:f.subtype}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:b?"".concat(String(f.instanceCount)," locations \xb7 ").concat(String(k)," tool").concat(k>1?"s":""):"".concat(N," \xb7 ").concat(g.repo," \xb7 detected ").concat((0,i.K)(g.detectedAt))})]})]}),(0,a.jsx)(h,{code:f.match.contextPrefix,snippet:f.match.maskedValue,file:b?"".concat(String(f.instanceCount)," locations"):(0,d.xE)(g)}),b?(0,a.jsxs)("div",{children:[(0,a.jsx)(l.e,{children:"Locations"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:f.instances.map(e=>(0,a.jsx)(j,{instance:e,onClick:()=>{o(e)}},e.id))}),f.instances.length<f.instanceCount&&(0,a.jsxs)("p",{className:"pt-2 text-xs text-text-3",children:["Showing the ",f.instances.length," most recent of ",f.instanceCount," ","locations."]})]}):(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:g.provider})}),(0,a.jsx)(l.p,{label:"Repository",children:(0,a.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:g.repo})}),(0,a.jsx)(l.p,{label:"Location",children:(0,a.jsx)("span",{className:"font-mono text-xs wrap-break-word",children:(0,d.xE)(g)})}),(0,a.jsx)(l.p,{label:"Action taken",children:(0,a.jsx)(c.T,{action:g.action})}),(0,a.jsx)(l.p,{label:"Detected",children:(0,i.K)(g.detectedAt)}),(0,a.jsx)(l.p,{label:"Confidence",children:(0,a.jsx)(p,{confidence:g.confidence})})]}),u]})]})}function h(e){let{code:t,snippet:s,file:n}=e;return(0,a.jsxs)("div",{children:[(0,a.jsxs)(l.e,{className:"flex items-center gap-2",children:["Matched content",(0,a.jsx)(r.aR,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]}),(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(n)}),(0,a.jsxs)("div",{children:[t,(0,a.jsx)("span",{className:"rounded bg-sev-critical/20 px-1 py-0.5 text-code-err",children:'"'.concat(s,'"')}),";"]})]})]})}function j(e){let{instance:t,onClick:s}=e;return(0,a.jsxs)("button",{type:"button",onClick:s,className:"flex items-center cursor-pointer gap-3 rounded-lg border border-border bg-surface px-3 py-2.5 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)(o.K,{id:t.provider}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text",children:t.repo}),(0,a.jsx)("span",{className:"font-mono text-label text-text-3 wrap-break-word",children:(0,d.xE)(t)})]}),(0,a.jsx)(c.T,{action:t.action}),(0,a.jsx)(r.vK,{className:"size-4 shrink-0 text-text-3"})]})}},4127:(e,t,s)=>{s.r(t),s.d(t,{AreaChart:()=>h,Donut:()=>x,Sparkline:()=>m,useMeasuredWidth:()=>u});var a=s(2330),n=s(6541),i=s(4131),l=s(9991),r=s(6725),o=s(588),c=s(6146),d=s(1252);function x(e){let{segments:t,size:s=120,thickness:l=16,children:r}=e,o=s/2,c=(0,n.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:s,height:s},children:[(0,a.jsx)("div",{"aria-hidden":!0,children:(0,a.jsx)("svg",{width:s,height:s,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 m(e){var t,s;let{data:n,color:i,height:x=34,fill:m=!0,strokeWidth:p=2,labels:u,formatValue:h}=e,j="spark-".concat((0,c.useId)().replace(/:/g,"")),[f,g]=(0,c.useState)(null),v=Math.max(...n),b=Math.min(...n),k=v-b||1,N=e=>n.length<=1?50:2+e/(n.length-1)*96,y=e=>x-2-(e-b)/k*(x-4),w=n.map((e,t)=>[N(t),y(e)]),Y=null!=(t=(0,l.A)().x(e=>e[0]).y(e=>e[1]).curve(r.G)(w))?t:void 0,C=null!=(s=(0,o.A)().x(e=>e[0]).y0(x).y1(e=>e[1]).curve(r.G)(w))?s:void 0,I=(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:[m&&(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:j,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})]})}),m&&(0,a.jsx)("path",{d:C,fill:"url(#".concat(j,")"),stroke:"none"}),(0,a.jsx)("path",{d:Y,fill:"none",stroke:i,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]});if(!((null==u?void 0:u.length)===n.length&&n.length>0))return I;let z=null===f?void 0:n[f],A=null===f?void 0:u[f];return(0,a.jsxs)("div",{"aria-hidden":!0,className:"relative",onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect();if(0===t.width)return;let s=(e.clientX-t.left)/t.width*100,a=n.length<=1?0:Math.round((s-2)/96*(n.length-1));g(Math.min(n.length-1,Math.max(0,a)))},onMouseLeave:()=>{g(null)},children:[I,null!==f&&void 0!==z&&void 0!==A&&(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-white/80",style:{left:"".concat(String(N(f)/100*100),"%"),top:y(z),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(N(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:A}),(0,a.jsx)("div",{className:"font-semibold",style:{color:d.l.text2},children:(null!=h?h:String)(z)})]})]})]})}let p={top:6,right:6,bottom:0,left:6};function u(){let e=(0,c.useRef)(null),[t,s]=(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)s(t.contentRect.width)});return a.observe(t),()=>{a.disconnect()}},[]),[e,t]}function h(e){let{data:t,series:s,height:n=160,valueFormat:i=e=>String(e)}=e,x=(0,c.useId)().replace(/:/g,""),[m,h]=u(),[j,f]=(0,c.useState)(null),g=Math.max(0,h-p.left-p.right),v=Math.max(0,n-p.top-p.bottom),b=[];for(let e of t)for(let t of s){let s=e[t.key];"number"==typeof s&&b.push(s)}let k=Math.max(1,...b),N=e=>t.length<=1?0:e/(t.length-1)*g,y=e=>v-e/k*v,w=null===j?null:t[j];return(0,a.jsxs)("div",{ref:m,"aria-hidden":!0,className:"relative",style:{height:n},children:[h>0&&(0,a.jsxs)("svg",{width:h,height:n,onMouseMove:function(e){if(!m.current||0===t.length)return;let s=m.current.getBoundingClientRect(),a=e.clientX-s.left-p.left,n=t.length<=1?0:g/(t.length-1),i=0===n?0:Math.round(a/n);f(Math.min(t.length-1,Math.max(0,i)))},onMouseLeave:()=>{f(null)},children:[(0,a.jsx)("defs",{children:s.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(p.left),",").concat(String(p.top),")"),children:[[0,.25,.5,.75,1].map(e=>(0,a.jsx)("line",{x1:0,x2:g,y1:v*e,y2:v*e,stroke:d.l.border,strokeOpacity:.6},e)),s.map(e=>{var s,n;let i=null!=(s=(0,o.A)().defined(t=>null!==t[e.key]).x((e,t)=>N(t)).y0(y(0)).y1(t=>{var s;return y(null!=(s=t[e.key])?s:0)}).curve(r.G)(t))?s:void 0,c=null!=(n=(0,l.A)().defined(t=>null!==t[e.key]).x((e,t)=>N(t)).y(t=>{var s;return y(null!=(s=t[e.key])?s:0)}).curve(r.G)(t))?n: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!==j&&(0,a.jsxs)("g",{children:[(0,a.jsx)("line",{x1:N(j),x2:N(j),y1:0,y2:v,stroke:d.l.border}),s.map(e=>{let t=w[e.key];return null===t?null:(0,a.jsx)("circle",{cx:N(j),cy:y(t),r:3,fill:e.color},e.key)})]})]})]}),w&&null!==j&&(0,a.jsxs)("div",{className:"pointer-events-none absolute top-0 -translate-x-1/2",style:{left:Math.min(h-60,Math.max(60,p.left+N(j))),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}),s.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)})]})]})}},4285:(e,t,s)=>{s.d(t,{ApproveExceptionDialog:()=>r});var a=s(2330),n=s(8726),i=s(6146),l=s(1247);function r(e){let{entry:t,open:s,onOpenChange:r,onSubmit:o,busy:c,error:d}=e,[x,m]=(0,i.useState)(null),[p,u]=(0,i.useState)(""),[h,j]=(0,i.useState)(""),f="permanent"===x,g=null!==t&&null!==x&&""!==p.trim()&&(!f||h===t.maskedValue);return(0,a.jsx)(n.lG,{open:s,onOpenChange:e=>{e||(m(null),u(""),j("")),r(e)},children:(0,a.jsxs)(n.Cf,{children:[(0,a.jsxs)(n.c7,{children:[(0,a.jsx)(n.L3,{children:"Approve blocked detection"}),(0,a.jsx)(n.rr,{children:"Grant an explicit, audited bypass for this exact value. Enforcement continues for every other value."})]}),(0,a.jsx)(n.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:m})]}),(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)(n.pd,{value:p,onChange:e=>{u(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)(n.pd,{value:h,onChange:e=>{j(e.target.value)},placeholder:t.maskedValue,autoComplete:"off",className:"font-mono"})]}),d&&(0,a.jsx)("p",{className:"text-xs text-sev-critical",children:d})]})}),(0,a.jsxs)(n.Es,{children:[(0,a.jsx)(n.$n,{variant:"ghost",tone:"neutral",size:"sm",onClick:()=>{r(!1)},children:"Cancel"}),(0,a.jsx)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!g||c,onClick:()=>{t&&x&&o({reference:t.reference,scope:x,reason:p.trim(),...f?{confirmation:h}:{}})},children:c?"Granting…":"Grant exception"})]})]})})}},4424:(e,t,s)=>{s.d(t,{ES:()=>x,H9:()=>p,Xg:()=>h,gh:()=>m,jP:()=>u,rE:()=>o,tG:()=>i,uR:()=>d,vV:()=>l,vm:()=>r});var a=s(8338),n=s(7581);let i="monitor";function l(e){return({primary:["var(--color-primary)","var(--color-primary-tint)"],teal:["var(--color-teal)","var(--color-teal-fill)"],green:["var(--color-ok)","var(--color-ok-fill)"],red:["var(--color-sev-critical)","var(--color-sev-critical-fill)"],orange:["var(--color-sev-high)","var(--color-sev-high-fill)"],gray:["var(--color-text-2)","var(--color-surface-3)"],blue:["var(--color-sev-low)","var(--color-sev-low-fill)"],violet:["var(--color-violet)","var(--color-violet-fill)"]})[e]}function r(e){return"regex"===e.type?"/"+e.pattern+"/"+e.flags:"keyword"===e.type?e.keywords.join(" \xb7 "):e.name}let o={regex:{label:"Regex",icon:n.cZ,color:"var(--color-violet)",fill:"var(--color-violet-fill)",blurb:"Pattern match"},keyword:{label:"Keyword",icon:n.Ey,color:"var(--color-teal)",fill:"var(--color-teal-fill)",blurb:"Literal lookup"},validator:{label:"Validator",icon:n.BZ,color:"var(--color-primary)",fill:"var(--color-primary-tint)",blurb:"Checksum / entropy"}},c={monitor:{id:"monitor",label:"Monitor",icon:n.bM,tone:"gray",desc:"Log every match for audit. The request is allowed through untouched."},warn:{id:"warn",label:"Warn",icon:n._0,tone:"orange",desc:"Allow the request, but warn the user inline before it is sent."},redact:{id:"redact",label:"Redact",icon:n.jZ,tone:"primary",desc:"Automatically strip the matched value from the request, then continue."},block:{id:"block",label:"Block",icon:n.pD,tone:"red",desc:"Refuse the request entirely whenever any rule in this detection matches."}},d=a.V0H;function x(e){let t=Object.hasOwn(c,e)?c[e]:void 0;return null!=t?t:{id:e,label:e,icon:n.iB,tone:"gray",desc:""}}let m={pii:"PII",financial:"Financial",secret:"Secret",phi:"PHI",code_context:"Code context",code_flaw:"Code flaw",custom:"Custom",config:"Configuration"},p={library:{label:"Library",icon:n.fC,tone:"teal",blurb:"Imported from the public library"}},u={labs:{label:"AKA Labs",icon:n.Zu,tone:"teal",verified:!0},org:{label:"Your org",icon:n.ai,tone:"violet",verified:!1},user:{label:"Community",icon:n.ny,tone:"gray",verified:!1}};function h(e){return null==e.update?"unknown":e.update.available?"update-available":"up-to-date"}},4453:(e,t,s)=>{s.d(t,{BlockedLedgerView:()=>c});var a=s(2330),n=s(8726),i=s(8553),l=s(1415),r=s(7581),o=s(3741);function c(e){let{items:t,onApprove:s,blockedWindow:c,onBlockedWindowChange:d}=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 text-white",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 px-2 py-0.5 text-xs font-bold text-white",children:t.length}),(0,a.jsxs)("span",{className:"text-xs text-text-2",children:["Detections blocked in ",l.sr[c]," — approve one to grant an exception"]}),(0,a.jsx)("span",{className:"ml-auto shrink-0",children:(0,a.jsx)(o.BlockedWindowSelect,{value:c,onChange:d})})]}),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=>(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,n.cn)("mt-1 text-label text-text-3"),children:[(0,i.K)(e.blockedAt),e.repo?" \xb7 ".concat(e.repo):""]})]}),(0,a.jsx)(n.$n,{onClick:()=>{s(e.reference)},variant:"ghost",tone:"primary",size:"sm",children:"Approve"})]},e.reference))})]})}},4574:(e,t,s)=>{function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return null!==e.revokedAt?"revoked":null!==e.maxUses&&e.useCount>=e.maxUses?"consumed":null!==e.expiresAt&&Date.parse(e.expiresAt)<=t?"expired":"active"}s.d(t,{DU:()=>o,gi:()=>l,hv:()=>n,rO:()=>a,rU:()=>r,yr:()=>i});let n={active:"success",consumed:"default",expired:"default",revoked:"critical"},i={once:"Once",temporary:"Temporary",permanent:"Permanent"},l={"cli-approve":"CLI approve","cli-add":"CLI add","web-approve":"Web approve","web-add":"Web add",api:"API","setup-triage":"Setup triage"},r=["once","30m","1h","24h","permanent"],o={once:"Once","30m":"30 min","1h":"1 hour","24h":"24 hours",permanent:"Permanent"}},4952:(e,t,s)=>{s.d(t,{RecommendedActionsCardView:()=>d});var a=s(2330),n=s(8726),i=s(7581),l=s(3439);let r={critical:"bg-sev-critical-fill text-sev-critical",primary:"bg-primary-tint text-primary",teal:"bg-teal-fill text-teal"},o={block_credentials:i.pD,redact_pii:i.jZ,review_external_share:i._G},c={critical:"critical",high:"primary",medium:"teal",low:"teal"};function d(e){let{items:t,isLoading:s,error:d,applyAction:x,dismissAction:m,isMutating:p,mutationError:u}=e;return(0,a.jsxs)(n.Zp,{className:"flex flex-col shadow-sm",children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.AG,{className:"bg-primary-tint text-primary",children:(0,a.jsx)(i.BZ,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(n.Lc,{children:[(0,a.jsx)(n.ZB,{children:"Recommended actions"}),(0,a.jsx)(n.BT,{children:s?"Loading…":"".concat(String(t.length)," prioritized for your environment")})]}),(0,a.jsx)(n.X9,{children:(0,a.jsx)(n.$n,{variant:"ghost",tone:"primary",size:"sm",children:"View all"})})]}),(0,a.jsx)(n.Wu,{"aria-busy":s,children:d?(0,a.jsx)(l.rJ,{message:d}):s?(0,a.jsx)("div",{className:"flex flex-col gap-3 py-2",children:[0,1,2].map(e=>(0,a.jsx)(n.EA,{className:"h-20 w-full"},e))}):0===t.length?(0,a.jsx)("div",{className:"py-6 text-center text-xs text-text-3",children:"No recommendations right now."}):(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)(l.rJ,{message:u}),t.map((e,s)=>{var l;let d=null!=(l=o[e.category])?l:i.rX;return(0,a.jsxs)("div",{className:(0,n.cn)("flex gap-3 py-3",s<t.length-1&&"border-b border-text/6"),children:[(0,a.jsx)("span",{className:(0,n.cn)("flex size-8 shrink-0 items-center justify-center rounded-lg",r[c[e.severity]]),children:(0,a.jsx)(d,{"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)(n.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)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:p,onClick:()=>{x(e.id)},children:e.action.label}):e.action.href?(0,a.jsx)(n.$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)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!0,children:e.action.label}),(0,a.jsx)(n.$n,{variant:"ghost",size:"sm",disabled:p,onClick:()=>{m(e.id)},children:"Dismiss"})]})]},e.id)})]})})]})}},5130:(e,t,s)=>{s.d(t,{NeedsReviewStripView:()=>o});var a=s(2330),n=s(8726),i=s(7581),l=s(1660),r=s(1789);function o(e){let{items:t,open:s,onToggle:o,onReview:c}=e;return 0===t.length?null:(0,a.jsxs)("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:o,"aria-expanded":s,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 text-white",children:(0,a.jsx)(i._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 px-2 text-xs py-0.5 font-bold text-white",children:t.length}),(0,a.jsx)("span",{className:"text-xs text-text-2",children:"Raw IPs, plaintext transfers & unverified domains"}),(0,a.jsx)(i.D3,{"aria-hidden":!0,focusable:!1,className:(0,n.cn)("ml-auto size-4.5 text-text-3 transition-transform",!s&&"-rotate-90")})]}),s&&(0,a.jsx)("div",{className:"flex flex-col gap-1.5 px-3 pb-3",children:t.map(e=>(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)(l.Wi,{kind:e.kind,trust:e.trust,name:e.name,host:e.host,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,n.cn)("text-xs font-semibold text-text","ip"===e.kind&&"font-mono"),children:e.name}),(0,a.jsx)(l.HD,{cls:e.topDataClass})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5 text-label text-sev-critical",children:[(0,a.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),(0,r.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)(n.$n,{onClick:()=>{c(e.id)},variant:"ghost",tone:"primary",size:"sm",children:"Review"})]},e.id))})]})}},5392:(e,t,s)=>{s.d(t,{FindingsTableView:()=>x});var a=s(2330),n=s(8726),i=s(6146),l=s(8553),r=s(7581),o=s(8519),c=s(8810),d=s(805);function x(e){let{groups:t,columns:s,selection:l,expandedIds:o,onToggleExpand:d,onSelectGroup:x,onSelectInstance:m,hasMore:p=!1,isLoading:j=!1,error:f=null,emptyState:g,sessionFirings:v}=e,[b,k]=(0,i.useState)("all"),N=(0,c.ei)(t,b);return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4 shadow-sm",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-end gap-2",children:[(0,a.jsx)("label",{htmlFor:"findings-status-filter",className:"text-xs font-medium text-text-3",children:"Status"}),(0,a.jsx)("select",{id:"findings-status-filter",value:b,onChange:e=>{k(e.target.value)},className:"h-8 rounded-lg border border-border bg-surface px-2 text-sm text-text-2 focus:border-primary focus:outline-none",children:c.zq.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),f?(0,a.jsxs)("p",{className:"py-8 text-center text-sm text-sev-critical",children:["Error loading findings: ",f]}):j?(0,a.jsx)("p",{className:"py-8 text-center text-sm text-text-3",children:"Loading findings…"}):0===N.length?"all"!==b?(0,a.jsxs)("p",{className:"py-8 text-center text-sm text-text-3",children:["No ",c.B5[b].label.toLowerCase()," findings on this page",p?" — more results may exist beyond the fetched limit.":"."]}):null!=g?g:(0,a.jsx)("p",{className:"py-8 text-center text-sm text-text-3",children:"No findings match these filters."}):(0,a.jsxs)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{className:"w-10"}),s.map(e=>(0,a.jsx)(n.nd,{children:e.header},e.id))]})}),(0,a.jsx)(n.BF,{children:N.map(e=>{var t;let p=o.has(e.id),j=(null==l?void 0:l.finding.id)===e.id&&!l.instance;return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)(n.Hj,{onClick:()=>{x(e)},className:(0,n.cn)("cursor-pointer hover:bg-surface-2",j&&"bg-surface-2"),children:[(0,a.jsx)(n.nA,{className:"text-text-3",children:(0,a.jsx)(n.$n,{"aria-label":p?"Collapse":"Expand",onClick:t=>{t.stopPropagation(),d(e.id)},size:"icon",variant:"ghost",children:(0,a.jsx)(r.vK,{className:(0,n.cn)("size-4 transition-transform",p&&"rotate-90")})})}),s.map(t=>(0,a.jsx)(n.nA,{children:u[t.id](e)},t.id))]}),p&&(0,c.EQ)(e.instances,b).map(t=>{var i;return(0,a.jsxs)(n.Hj,{onClick:()=>{m(e,t)},className:(0,n.cn)("cursor-pointer hover:bg-surface-2",(null==l||null==(i=l.instance)?void 0:i.id)===t.id?"bg-surface-2":"bg-surface-2/50"),children:[(0,a.jsx)(n.nA,{}),s.map(s=>(0,a.jsx)(n.nA,{children:h[s.id](e,t)},s.id))]},t.id)}),p&&v&&(0,a.jsxs)(n.Hj,{className:"bg-surface-2/50 hover:bg-surface-2/50",children:[(0,a.jsx)(n.nA,{}),(0,a.jsx)(n.nA,{colSpan:s.length,className:"text-xs text-text-3",children:(null!=(t=v[e.id])?t:0)>0?"Fired ".concat(String(v[e.id])," times in this session's transcript — the session's \"triggered\" tally counts every firing, this row counts unique values."):"Caught by live enforcement only — not re-detected in this session's transcript."})]}),p&&e.instances.length<e.instanceCount&&(0,a.jsxs)(n.Hj,{className:"bg-surface-2/50 hover:bg-surface-2/50",children:[(0,a.jsx)(n.nA,{}),(0,a.jsxs)(n.nA,{colSpan:s.length,className:"text-xs text-text-3",children:["Showing the ",e.instances.length," most recent of ",e.instanceCount," ","locations."]})]})]},e.id)})})]}),p&&("all"===b?(0,a.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing the first ",t.length," findings — refine the filters to narrow results."]}):(0,a.jsxs)("p",{className:"mt-4 text-center text-xs text-text-3",children:["Showing ",N.length," ",c.B5[b].label.toLowerCase()," ","findings from the first ",t.length," fetched — more may exist beyond the fetched limit."]}))]})}function m(e){var t;let{finding:s}=e,i=null!=(t=c.y7[s.category])?t:r.RY;return(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:(0,n.cn)("flex size-7 shrink-0 items-center justify-center rounded-lg",(0,c.i9)(s.category)),children:(0,a.jsx)(i,{className:"size-4"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-semibold text-text",children:s.subtype}),(0,a.jsx)("span",{className:"block max-w-[20rem] truncate font-mono text-xs text-text-3",title:s.match.maskedValue,children:s.match.maskedValue})]})]})}function p(e){let{status:t}=e;if(!t)return(0,a.jsx)("span",{className:"text-text-3",children:"—"});let s=c.B5[t];return(0,a.jsx)(n.Ex,{variant:s.badge,className:"h-6",children:s.label})}let u={severity:e=>(0,a.jsx)(n.Pt,{severity:e.severity}),subtype:e=>(0,a.jsx)(m,{finding:e}),sources:e=>(0,a.jsx)(d.B,{ids:e.providers}),locations:e=>(0,a.jsxs)("span",{className:"text-text-3",children:[e.instanceCount," locations"]}),action:e=>(0,a.jsx)(o._,{aggregateAction:e.aggregateAction}),status:e=>(0,a.jsx)(p,{status:e.status}),latest:e=>(0,a.jsx)("span",{className:"text-text-3 text-xs",children:(0,l.K)(e.latestDetectedAt)})},h={severity:e=>(0,a.jsx)(n.Pt,{severity:e.severity}),subtype:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2.5 pl-1",children:[(0,a.jsx)("span",{className:"-mt-1.5 size-3.5 shrink-0 rounded-bl border-b-[1.5px] border-l-[1.5px] border-border-strong"}),(0,a.jsxs)("div",{className:"flex flex-col gap-px",children:[(0,a.jsx)("span",{className:"font-semibold text-text text-ui",children:t.repo}),(0,a.jsx)("span",{className:"font-mono text-label text-text-3",children:t.id})]})]}),sources:(e,t)=>(0,a.jsx)(d.i,{provider:t.provider}),locations:(e,t)=>(0,a.jsx)("span",{className:"font-mono text-xs text-text-3 block max-w-[20rem] truncate",title:(0,c.xE)(t),children:(0,c.xE)(t)}),action:(e,t)=>(0,a.jsx)(o.T,{action:t.action}),status:(e,t)=>(0,a.jsx)(p,{status:t.status}),latest:(e,t)=>(0,a.jsx)("span",{className:"text-text-3 text-xs",children:(0,l.K)(t.detectedAt)})}},5530:(e,t,s)=>{s.d(t,{HarnessOverview:()=>d});var a=s(2330),n=s(8726),i=s(5823),l=s(6909),r=s(1809),o=s(514);let c=["block","redact","warn"];function d(e){var t,s,d;let{harness:p,events:u,onSelect:h,onSelectProject:j}=e,f=(null!=(s=null==(t=p.categories.find(e=>"mcp"===e.type))?void 0:t.assets)?s:[]).filter(e=>"unapproved"===e.trust).length,g=null!=(d=null==u?void 0:u.items)?d:[],v=null==u?void 0:u.counts,b=v?v.block+v.redact+v.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)(i.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"}),v&&(0,a.jsx)("span",{className:"ml-auto inline-flex items-center gap-1.5",children:c.map(e=>{let t=v[e];return t>0?(0,a.jsxs)(n.Ex,{variant:r.iL[e].tone,children:[t," ",r.iL[e].label.toLowerCase()]},e):null})})]}),0===g.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)(o.m,{name:"check-circle",className:"size-4 text-ok"}),(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:[g.map(e=>{let t=r.iL[e.kind],{day:s,time:i}=function(e){let t=new Date(e),s=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),a=new Date,n=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=Math.round((n(a)-n(t))/864e5);return{day:0===i?"Today":1===i?"Yesterday":t.toLocaleDateString([],{month:"short",day:"numeric"}),time:s}}(e.occurredAt);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,n.cn)("grid size-7 shrink-0 place-items-center rounded-md",t.bg,t.fg),children:(0,a.jsx)(o.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)(n.Ex,{variant:t.tone,children:t.label}),(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[s," \xb7 ",i]})]})]},"".concat(e.occurredAt,"\xb7").concat(e.title))}),b>g.length&&(0,a.jsxs)("div",{className:"pt-0.5 text-center text-xs text-text-3",children:["Showing ",g.length," of ",b," events"]})]})]}),(p.flagCount>0||f>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)(o.m,{name:"flag",className:"size-4 shrink-0 text-sev-high"}),(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&&f>0&&" \xb7 ",f>0&&"".concat(String(f)," unapproved MCP").concat(1===f?"":"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)(x,{p:e,onSelect:j},e.id))})]}),0===p.categories.length&&0===p.projects.length&&(0,a.jsx)(l.EmptyState,{message:"No projects, skills, MCP servers, hooks or configuration for this harness"}),p.categories.map(e=>{let t=r.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:h},e.id))})]},e.type)})]})]})}function x(e){let{p:t,onSelect:s}=e,n=t.accessCounts;return(0,a.jsxs)("button",{type:"button",onClick:()=>{s(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,r.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)(l.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)(o.m,{name:"repo",className:"size-3 shrink-0"}),t.repo]})]}),(0,a.jsx)(l.AJ,{counts:n}),n.blocked>0&&(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical",children:[n.blocked," blocked"]}),t.findingsCount>0&&(0,a.jsx)(l.Kh,{flags:["findings"],mini:!0}),(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}function m(e){let{it:t,onSelect:s}=e,i=(0,r.TW)(t.type),c="mcp"===t.type?t.trust:void 0;return(0,a.jsxs)("button",{type:"button",onClick:()=>{s(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,n.cn)("grid size-6.5 shrink-0 place-items-center rounded-md",i.bg,i.fg),children:(0,a.jsx)(o.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})]}),c&&(0,a.jsx)(l.As,{value:c}),t.flags.length>0&&(0,a.jsx)(l.Kh,{flags:t.flags,mini:!0}),(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 shrink-0 text-text-3"})]})}},5823:(e,t,s)=>{s.d(t,{K:()=>i,x:()=>n});var a=s(2330);let n={claudecode:{label:"Claude Code",short:"CC",color:"#C96442"},claudedesktop:{label:"Claude Desktop",short:"CD",color:"#A8553A"},cursor:{label:"Cursor",short:"Cu",color:"#252F3D"},windsurf:{label:"Windsurf",short:"Wf",color:"#0B8F7B"},codex:{label:"Codex CLI",short:"Cx",color:"#10A37F"},copilot:{label:"GitHub Copilot",short:"Co",color:"#0581D4"},chatgpt:{label:"ChatGPT",short:"GP",color:"#0d8f6f"},api:{label:"Anthropic API",short:"AP",color:"#6058E9"}};function i(e){let{id:t,size:s=24}=e,i=n[t];return(0,a.jsx)("span",{className:"flex shrink-0 items-center justify-center rounded-lg font-display font-bold text-white",style:{width:s,height:s,background:i.color,fontSize:.36*s},children:i.short})}},5850:(e,t,s)=>{s.d(t,{PolicyDetailView:()=>m,PolicyListView:()=>x,PolicyStatsView:()=>c});var a=s(2330),n=s(8726),i=s(4424),l=s(7581),r=s(9602);function o(e){return void 0===e?"—":String(e)}function c(e){let{stats:t,loading:s=!1}=e;return(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,a.jsx)(r.T,{icon:l.iB,iconBg:"var(--color-primary-tint)",iconColor:"var(--color-primary)",label:"Policies",value:o(null==t?void 0:t.policies),loading:s}),(0,a.jsx)(r.T,{icon:l.Zu,iconBg:"var(--color-surface-2)",iconColor:"var(--color-text-2)",label:"Built-in",value:o(null==t?void 0:t.builtin),loading:s}),(0,a.jsx)(r.T,{icon:l.k3,iconBg:"var(--color-violet-fill)",iconColor:"var(--color-violet)",label:"Custom scripts",value:o(null==t?void 0:t.custom),loading:s}),(0,a.jsx)(r.T,{icon:l.kp,iconBg:"var(--color-ok-fill)",iconColor:"var(--color-ok)",label:"Detections governed",value:o(null==t?void 0:t.detectionsGoverned),loading:s})]})}function d(e){let{policy:t,selected:s,onSelect:r}=e,{icon:o,tone:c}=(0,i.ES)(t.id),[d,x]=(0,i.vV)(c),m=t.usedByCount;return(0,a.jsxs)("button",{type:"button",onClick:r,"aria-pressed":s,className:(0,n.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg p-3 text-left transition-colors",s?"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:[m," detection",1===m?"":"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:s,onSelect:i,loading:l=!1,error:r=null}=e;return(0,a.jsxs)(n.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",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===s,onSelect:()=>{i(e.id)}},e.id))})]})}function m(e){let{policy:t}=e,{icon:s,tone:r}=(0,i.ES)(t.id),[o,c]=(0,i.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)(s,{"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)(n.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)(n.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))})]})]})]})}},5875:(e,t,s)=>{s.d(t,{FileDetailDrawer:()=>c});var a=s(2330),n=s(8726),i=s(7524),l=s(6909),r=s(1809),o=s(514);function c(e){var t;let{file:s,onChange:c}=e,d=r.Gb[s.origin],x=s.project;return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)(n.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)(n.qp,{className:"min-w-0 truncate font-mono text-sm",children:s.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," › ",s.path]}),(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)(l.TJ,{origin:s.origin}),(0,a.jsx)(l.yk,{v:x.visibility}),s.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",children:[(0,a.jsx)(o.m,{name:"alert",className:"size-3"}),s.findings," finding",1===s.findings?"":"s"]})]})]}),(0,a.jsx)(l.wn,{label:"LLM access",children:(0,a.jsx)(l.AC,{order:r.IF,meta:r.Pe,value:s.access,onChange:c,accentOf:e=>e.bar})}),(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,s.origin)})]})]}),s.findingsRefs.length>0&&(0,a.jsx)(l.wn,{label:"Related findings",children:(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:s.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"}),(0,a.jsx)("span",{className:"flex-1 text-xs font-medium text-text",children:e.title||s.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:s.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=s.blockedAt)?t:x.updatedAt)})]})]})]})}},6053:(e,t,s)=>{s.d(t,{DataSharesTableView:()=>u});var a=s(2330),n=s(8726),i=s(6146),l=s(8553),r=s(7581),o=s(1660),c=s(1789);function d(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 x(e){var t;let{d:s,expanded:i,selected:x,onToggle:m,onOpen:p}=e,u=(0,c.EI)(s.transports);return(0,a.jsxs)(n.Hj,{onClick:p,className:(0,n.cn)("cursor-pointer",x?"bg-primary-tint":"hover:bg-surface-2"),children:[(0,a.jsx)(n.nA,{className:"w-9",children:(0,a.jsx)(n.$n,{"aria-label":i?"Collapse":"Expand",onClick:e=>{e.stopPropagation(),m()},variant:"ghost",size:"sm",children:(0,a.jsx)(r.vK,{"aria-hidden":!0,focusable:!1,className:(0,n.cn)("size-4 transition-transform",i&&"rotate-90")})})}),(0,a.jsx)(n.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(o.Wi,{kind:s.kind,trust:s.trust,name:s.name,host:s.host}),(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,n.cn)("whitespace-nowrap font-semibold text-text","ip"===s.kind&&"font-mono"),children:s.name}),u&&(0,a.jsx)("span",{title:"Sends over plaintext",className:"inline-flex text-sev-critical",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:[s.category,(null==(t=s.network)?void 0:t.geo)?" \xb7 "+s.network.geo:""]})]})]})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)(o.xB,{trust:s.trust})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.transports.map(e=>(0,a.jsx)(o.eV,{transport:e},e))})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)(d,{classes:s.dataClasses})}),(0,a.jsxs)(n.nA,{className:"whitespace-nowrap text-xs text-text-3",children:[(0,a.jsx)("b",{className:"text-text",children:s.endpointCount})," endpoint",1===s.endpointCount?"":"s"," \xb7 ",(0,a.jsx)("b",{className:"text-text",children:s.callSiteCount})," call",1===s.callSiteCount?"":"s"]}),(0,a.jsx)(n.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(s.lastSeen)})]})}function m(e){let{ep:t,selected:s,onClick:i}=e;return(0,a.jsxs)(n.Hj,{onClick:i,className:(0,n.cn)("cursor-pointer",s?"bg-primary-tint":"bg-surface-2 hover:bg-surface-3"),children:[(0,a.jsx)(n.nA,{className:"w-9"}),(0,a.jsx)(n.nA,{colSpan:2,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)(n.nA,{children:(0,a.jsx)(o.eV,{transport:t.transport})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)(o.HD,{cls:t.dataClass})}),(0,a.jsxs)(n.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)(n.nA,{className:"whitespace-nowrap text-xs text-text-3",children:(0,l.K)(t.lastSeen)})]})}function p(e){let{group:t}=e;return(0,a.jsx)(n.Hj,{className:"border-0 hover:bg-transparent",children:(0,a.jsx)(n.nA,{colSpan:7,className:"pb-2 pt-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-label font-semibold uppercase tracking-wider text-text-3",children:c.CF[t.kind]}),(0,a.jsx)("span",{className:"rounded-full border border-border bg-surface-2 px-1.5 text-label py-0.5 font-semibold text-text-2",children:t.total}),"ip"===t.kind&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-sev-critical",children:[(0,a.jsx)(r._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"review recommended"]})]})})})}function u(e){let{groups:t,expanded:s,forceExpand:l,selection:r,drawerOpen:o,onToggle:c,onOpenDest:d,onOpenEndpoint:u}=e;return(0,a.jsxs)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{className:"w-9"}),(0,a.jsx)(n.nd,{children:"Destination"}),(0,a.jsx)(n.nd,{children:"Trust"}),(0,a.jsx)(n.nd,{children:"Transport"}),(0,a.jsx)(n.nd,{children:"Data sent"}),(0,a.jsx)(n.nd,{children:"Footprint"}),(0,a.jsx)(n.nd,{children:"Last seen"})]})}),(0,a.jsx)(n.BF,{children:t.map(e=>(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(p,{group:e}),e.items.map(e=>{let t=null!=l&&l||!!s[e.id],n=o&&(null==r?void 0:r.id)===e.id&&null==r.endpointId;return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(x,{d:e,expanded:t,selected:n,onToggle:()=>{c(e.id)},onOpen:()=>{d(e.id)}}),t&&e.endpoints.map(t=>(0,a.jsx)(m,{ep:t,selected:o&&(null==r?void 0:r.id)===e.id&&r.endpointId===t.id,onClick:()=>{u(e.id,t.id)}},t.id))]},e.id)})]},e.kind))})]})}},6324:(e,t,s)=>{s.d(t,{SessionDetailView:()=>h});var a=s(2330),n=s(8726),i=s(6146),l=s(7524),r=s(7581),o=s(5823),c=s(1236),d=s(402),x=s(6615),m=s(7381),p=s(6563);function u(e){var t;let{session:s,tokenReport:u,liveFindings:h,linkHref:j,toolHref:f}=e,g=o.x[s.harness],v=(0,p.Tp)(s.tools),[b,k]=(0,i.useState)(!1);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 px-5 py-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3.5",children:[(0,a.jsx)(o.K,{id:s.harness,size:40}),(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)("span",{className:"font-display text-lg font-semibold text-text",children:s.title}),(0,a.jsx)(d.UD,{status:s.status})]}),(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-ui text-text-3",children:[g.label," \xb7 ",p.Ay[s.harness],(0,a.jsx)("span",{className:"text-border-strong",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono",children:s.id})]})]}),(0,a.jsx)("div",{className:"flex gap-1",children:(0,a.jsx)(n.$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"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download="session-".concat(e.id.slice(0,12),".json"),document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}(s)},children:(0,a.jsx)(r.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"})})})]}),(0,a.jsxs)("div",{className:"mt-4 grid 2xl:grid-cols-4 grid-cols-3 gap-x-4 gap-y-3.5 max-h-44 overflow-y-auto",children:[(0,a.jsx)(l.p,{label:"Working dir",children:(0,a.jsx)("span",{className:"font-mono break-all",children:s.cwd})}),(0,a.jsx)(l.p,{label:"Branch",children:(0,a.jsx)(d.Lw,{items:s.branches,mono:!0})}),(0,a.jsx)(l.p,{label:"Model",children:(0,a.jsx)(d.Lw,{items:s.models,mono:!0})}),(0,a.jsxs)(l.p,{label:"Started",children:[(0,m.rw)(s.startedAt)," \xb7 ",(0,m.nt)(s.startedAt)]}),(0,a.jsx)(l.p,{label:"Duration",children:(0,m.vV)(s.startedAt,s.endedAt,s.status)}),(0,a.jsx)(l.p,{label:"Turns",children:s.turns}),(0,a.jsx)(l.p,{label:"Findings",children:s.findings>0||h?(0,a.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-1.5",children:[s.findings>0&&(0,a.jsxs)("span",{className:"font-semibold text-sev-critical",title:"Detection firings across this session's transcript — the same value fires once per event it appears in",children:[s.findings," triggered"]}),s.findings>0&&h&&(0,a.jsx)("span",{className:"text-border-strong",children:"\xb7"}),h&&(0,a.jsxs)("a",{href:h.href,className:"inline-flex items-center gap-0.5 font-semibold text-sev-critical underline-offset-2 hover:underline",title:"Unique findings recorded by live enforcement — open in Findings",children:[h.count," enforced live",(0,a.jsx)(r.Qq,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]}):(0,a.jsx)("span",{className:"text-ok",children:"None"})}),(0,a.jsx)(l.p,{label:"Egress",children:s.shares>0?"".concat(String(s.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,m.Sk)(s.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,m.Sk)(s.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,m.fz)(s.tokens),"%"]}),(0,a.jsx)("span",{className:"text-text-3",children:"cache"})]}),u&&(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,m.xd)(null!=(t=u.estimatedCostUsd)?t:0,u.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,p.ni)(s.tools)," tool calls"]}),v.map(e=>(0,a.jsx)(d.zn,{name:e.name,n:e.n,...f?{href:f(e.name)}:{}},e.name))]})]}),u&&u.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"}),u.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,m.Sk)(e.totalTokens)}),(0,a.jsx)("span",{className:"tabular-nums text-text",children:null!==e.estimatedCostUsd?(0,m.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:[b?"Raw events":"Audit log",(0,a.jsx)("span",{className:"text-border-strong",children:"\xb7"}),(0,a.jsxs)("span",{className:"font-mono text-label font-medium normal-case tracking-normal text-text-3",children:[s.events.length," events"]})]}),b?s.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(s.events,null,2)}):(0,a.jsx)(c.A,{message:"No events recorded for this session yet"}):(0,a.jsx)(x.i,{events:s.events,...j?{linkHref:j}:{}})]}),(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)(n.$n,{variant:"link",tone:"primary",className:"ml-auto text-ui",onClick:()=>{k(e=>!e)},children:[(0,a.jsx)(r.kp,{"aria-hidden":!0,focusable:!1,className:"size-3.5"}),b?"View timeline":"View raw events"]})]})]})}function h(e){let{session:t,isLoading:s,error:i,tokenReport:l,liveFindings:r,linkHref:o,toolHref:d}=e;return i?(0,a.jsx)("div",{className:"grid h-full place-items-center p-6",children:(0,a.jsx)(c.r,{message:i})}):s&&!t?(0,a.jsxs)("div",{className:"flex h-full flex-col gap-4 p-5","aria-busy":!0,children:[(0,a.jsx)(n.EA,{className:"h-10 w-2/3"}),(0,a.jsx)(n.EA,{className:"h-24 w-full"}),(0,a.jsx)(n.EA,{className:"h-12 w-full"}),(0,a.jsx)(n.EA,{className:"h-40 w-full"})]}):t?(0,a.jsx)(u,{session:t,tokenReport:null!=l?l:null,liveFindings:null!=r?r:null,...o?{linkHref:o}:{},...d?{toolHref:d}:{}}):(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"})})}},6418:(e,t,s)=>{s.d(t,{DetectionDetailView:()=>x});var a=s(2330),n=s(8726),i=s(7524),l=s(7581),r=s(4424),o=s(965),c=s(2011);function d(e){let{rule:t,onOpen:s}=e,i=r.rE[t.matcher.type],o=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)(o,{"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:r.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)(n.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,r.vm)(t.matcher)}),(0,a.jsxs)(n.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:s,className:"shrink-0",children:["View",(0,a.jsx)(l.vK,{"aria-hidden":!0,focusable:!1,className:"size-3.5"})]})]})]})}function x(e){var t;let{d:s,onOpenRule:x,onToggleEnabled:m,onChangePolicy:p,onOpenUpdate:u,onRecheck:h,unknownHint:j}=e,f=null!=(t=s.policyId)?t:r.tG,g=(0,r.ES)(f),v=g.icon;return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsx)("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:s.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",s.version]})]}),s.description&&(0,a.jsx)("div",{className:"mt-1.5 text-ui leading-snug text-text-2",children:s.description}),(0,a.jsx)("div",{className:"mt-2 font-mono text-xs text-text-3",children:s.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 "+(s.enabled?"text-ok":"text-text-3"),children:s.enabled?"Enabled":"Disabled"}),m&&(0,a.jsx)(n.dO,{checked:s.enabled,onCheckedChange:m,"aria-label":s.enabled?"Disable detection":"Enable detection"})]}),(0,a.jsx)(n.$n,{variant:"ghost",tone:"neutral",size:"icon","aria-label":"More",className:"size-8.5 text-text-3",children:(0,a.jsx)(l.wy,{"aria-hidden":!0,focusable:!1})})]})]})}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-5",children:[(0,a.jsx)(c.t,{d:s,onOpenUpdate:u,onRecheck:h,unknownHint:j}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-baseline gap-2",children:[(0,a.jsx)(i.e,{children:"Enforcement policy"}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:"applied to every matching request"})]}),(0,a.jsx)(o.PolicyPicker,{value:f,onChange:p}),(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)(v,{"aria-hidden":!0,focusable:!1,className:"mt-px size-4 shrink-0",style:{color:(0,r.vV)(g.tone)[0]}}),(0,a.jsx)("div",{className:"text-xs leading-snug text-text-2",children:g.desc})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2.5",children:[(0,a.jsx)(i.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:s.rules.length}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)(n.$n,{variant:"outline",tone:"neutral",size:"sm",disabled:!0,title:"Rule authoring coming soon",children:[(0,a.jsx)(l.c1,{"aria-hidden":!0,focusable:!1}),"Add rule"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2.5",children:s.rules.map(e=>(0,a.jsx)(d,{rule:e,onOpen:()=>{x(e.id)}},e.id))})]})]})]})}},6563:(e,t,s)=>{s.d(t,{$x:()=>l,Ay:()=>n,Oy:()=>d,Tp:()=>x,ek:()=>o,nR:()=>c,ni:()=>m,oo:()=>i,pS:()=>r});var a=s(7581);let n={claudecode:"CLI agent",cursor:"IDE",copilot:"IDE",codex:"CLI agent",windsurf:"IDE",claudedesktop:"Desktop app",chatgpt:"Web app",api:"API"},i=["claudecode","cursor","copilot","codex","windsurf","claudedesktop","chatgpt","api"],l={session:{label:"Session",icon:a.k3,text:"text-text-2",fill:"bg-surface-3"},prompt:{label:"Prompt",icon:a.ny,text:"text-primary",fill:"bg-primary-tint"},response:{label:"Response",icon:a.BZ,text:"text-violet",fill:"bg-violet-fill"},tool:{label:"Tool",icon:a.k3,text:"text-text-2",fill:"bg-surface-3"},hook:{label:"Hook",icon:a.hF,text:"text-sev-low",fill:"bg-sev-low-fill"},detection:{label:"Detection",icon:a.Zu,text:"text-sev-critical",fill:"bg-sev-critical-fill"},share:{label:"Egress",icon:a._G,text:"text-teal",fill:"bg-teal-fill"},permission:{label:"Permission",icon:a.XA,text:"text-sev-high",fill:"bg-sev-high-fill"},commit:{label:"Commit",icon:a.OK,text:"text-text-2",fill:"bg-surface-3"},error:{label:"Error",icon:a._0,text:"text-sev-critical",fill:"bg-sev-critical-fill"},active:{label:"In progress",icon:a.DQ,text:"text-primary",fill:"bg-primary-tint"}},r={Bash:a.k3,Edit:a.qU,Write:a.qU,Read:a.oS,Grep:a.WI,WebFetch:a.fC,Task:a.hF},o=a.k3,c={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"}},d={detections:"Findings",shares:"Data Shares",inventory:"Inventory"};function x(e){return Object.entries(e).map(e=>{let[t,s]=e;return{name:t,n:s}}).sort((e,t)=>t.n-e.n)}function m(e){return Object.values(e).reduce((e,t)=>e+t,0)}},6615:(e,t,s)=>{s.d(t,{i:()=>c});var a=s(2330),n=s(8726),i=s(7581),l=s(7381),r=s(6563);function o(e){var t;let{event:s,first:o,last:c,linkHref:d}=e,x=r.$x[s.kind],m="tool"===s.kind&&s.tool&&null!=(t=r.pS[s.tool])?t:x.icon,p="active"===s.kind,u="tool"===s.kind||"commit"===s.kind,h=s.link?r.Oy[s.link]:null,j=s.link&&d?d(s.link,s.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)(s.occurredAt)}),(0,a.jsxs)("div",{className:"relative flex justify-center",children:[!(o&&c)&&(0,a.jsx)("span",{className:(0,n.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,n.cn)("relative z-10 grid size-6 place-items-center rounded-md ring-2 ring-surface",x.fill,x.text),children:[p&&(0,a.jsx)("span",{className:"absolute inset-0 animate-ping rounded-md bg-current opacity-30"}),(0,a.jsx)(m,{"aria-hidden":!0,focusable:!1,className:"relative size-3.5"})]})]}),(0,a.jsxs)("div",{className:(0,n.cn)("pt-0.5",c?"pb-0":"pb-4.5"),children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-ui font-semibold text-text",children:s.title}),s.severity&&(0,a.jsx)(n.Pt,{severity:s.severity}),s.flagged&&(0,a.jsxs)(n.Ex,{variant:"critical",className:"h-6 gap-1.5",children:[(0,a.jsx)(i._0,{"aria-hidden":!0,focusable:!1,className:"size-3"}),"Flagged"]}),s.internal&&(0,a.jsxs)(n.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,n.cn)("mt-0.5 text-xs text-text-2",u&&"font-mono"),children:[s.detail,h&&j&&(0,a.jsx)(n.$n,{asChild:!0,variant:"link",tone:"primary",className:"ml-2 text-xs font-normal",children:(0,a.jsxs)("a",{href:j,children:["Open in ",h,(0,a.jsx)(i.Qq,{"aria-hidden":!0,focusable:!1})]})})]})]})]})}function c(e){let{events:t,linkHref:s}=e;return(0,a.jsx)("div",{children:t.map((e,n)=>(0,a.jsx)(o,{event:e,first:0===n,last:n===t.length-1,...s?{linkHref:s}:{}},e.id))})}},6909:(e,t,s)=>{s.d(t,{AC:()=>d,AJ:()=>p,As:()=>u,EmptyState:()=>o,Kh:()=>j,TJ:()=>g,Vx:()=>m,kx:()=>x,wn:()=>c,yk:()=>f});var a=s(2330),n=s(8726),i=s(1809),l=s(514);function r(e){let{order:t,meta:s,value:i,onChange:r}=e;return(0,a.jsx)("span",{className:"inline-flex",onClick:e=>{e.stopPropagation()},children:(0,a.jsx)(n.Iz,{value:i,onValueChange:e=>{e&&r(e)},children:t.map(e=>{let t=s[e],r=e===i;return(0,a.jsx)(n.tR,{value:e,title:t.label,className:(0,n.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,n.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:s="list",className:i}=e;return(0,a.jsxs)("div",{className:(0,n.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:s,className:"size-4 shrink-0"}),(0,a.jsx)("span",{className:"text-xs",children:t})]})}function c(e){let{label:t,children:s}=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}),s]})}function d(e){let{order:t,meta:s,value:i,onChange:r,accentOf:o}=e;return(0,a.jsx)("div",{className:"flex flex-col gap-2",children:t.map(e=>{let t=s[e],c=e===i;return(0,a.jsxs)("button",{type:"button",onClick:()=>{r(e)},className:(0,n.cn)("flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left cursor-pointer",c?(0,n.cn)(t.bg,"border-current",t.fg):"border-border bg-surface"),children:[(0,a.jsx)("span",{className:(0,n.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,n.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,n.cn)("grid size-4.5 shrink-0 place-items-center rounded-full border-[1.5px]",c?(0,n.cn)("border-current text-white",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:s}=e;return(0,a.jsx)(r,{order:i.IF,meta:i.Pe,value:t,onChange:s})}function m(e){let{value:t}=e;return(0,a.jsx)("span",{className:(0,n.cn)("min-w-23 whitespace-nowrap text-xs font-semibold",i.Pe[t].fg),children:i.Pe[t].label})}function p(e){let{counts:t,className:s}=e,l=t.total||1;return(0,a.jsx)("span",{className:(0,n.cn)("flex h-1.5 w-30 overflow-hidden rounded-full bg-surface-3",s),children:i.IF.map(e=>{let s=t[e]/l*100;return s>0?(0,a.jsx)("span",{className:i.Pe[e].bar,style:{width:"".concat(String(s),"%")}},e):null})})}function u(e){let{value:t}=e,s=i.ZY[t];return(0,a.jsxs)(n.Ex,{variant:s.tone,children:[(0,a.jsx)(l.m,{name:s.icon,className:"size-3"}),s.label]})}function h(e){let{flag:t,mini:s}=e,r=i.lx[t];return(0,a.jsxs)(n.Ex,{variant:r.tone,children:[(0,a.jsx)(l.m,{name:r.icon,className:s?"size-2.5":"size-3"}),s?r.short:r.label]})}function j(e){let{flags:t,mini:s}=e;return 0===t.length?s?null:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-ok",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:s},e))})}function f(e){let{v:t}=e;return"public"===t?(0,a.jsxs)(n.Ex,{variant:"success",children:[(0,a.jsx)(l.m,{name:"globe",className:"size-3"})," Public"]}):(0,a.jsxs)(n.Ex,{variant:"default",children:[(0,a.jsx)(l.m,{name:"lock",className:"size-3"})," Private"]})}function g(e){let{origin:t}=e,s=i.Gb[t];return(0,a.jsxs)(n.Ex,{variant:"default",children:[(0,a.jsx)(l.m,{name:s.icon,className:"size-3"})," ",s.short]})}},7381:(e,t,s)=>{s.d(t,{Sk:()=>u,UK:()=>a.UKt,fz:()=>p,gE:()=>x,nt:()=>r,rw:()=>c,u3:()=>h,vV:()=>m,xd:()=>a.xdw});var a=s(8338);let n=["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){var t,s;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=new Date(e);if(Number.isNaN(r.getTime()))return"";let o=Math.round((l(a)-l(r))/864e5);return 0===o?"Today":1===o?"Yesterday":"".concat(null!=(t=i[r.getDay()])?t:"",", ").concat(null!=(s=n[r.getMonth()])?s:""," ").concat(String(r.getDate()))}let o=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});function c(e){let t=Date.parse(e);return Number.isNaN(t)?"":o.format(t)}let d=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"});function x(e){let t=Date.parse(e);return Number.isNaN(t)?"":d.format(t)}function m(e,t,s){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now(),n=Date.parse(e);if(Number.isNaN(n))return"";let i=Math.max(0,Math.round(((t?Date.parse(t):a)-n)/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"===s?"".concat(o," \xb7 live"):o}function p(e){let t=e.cacheRead+e.inputTokens;return t>0?Math.round(100*e.cacheRead/t):0}function u(e){return(0,a.ap_)(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,s=[];for(let a of e){let e=r(a.startedAt,t),n=s.find(t=>t.day===e);n||(n={day:e,items:[]},s.push(n)),n.items.push(a)}return s}},7461:(e,t,s)=>{s.d(t,{AddExceptionForm:()=>r});var a=s(2330),n=s(8726),i=s(6146),l=s(1247);function r(e){let{rules:t,onSubmit:s,busy:r,error:o}=e,[c,d]=(0,i.useState)(""),[x,m]=(0,i.useState)(""),[p,u]=(0,i.useState)(null),[h,j]=(0,i.useState)(""),[f,g]=(0,i.useState)(""),v="permanent"===p,b=""!==c&&""!==x&&null!==p&&""!==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)(n.l6,{value:c,onValueChange:d,children:[(0,a.jsx)(n.bq,{children:(0,a.jsx)(n.yv,{placeholder:"Pick the rule this value matches"})}),(0,a.jsx)(n.gC,{children:t.map(e=>(0,a.jsx)(n.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)(n.pd,{type:"password",autoComplete:"off",value:x,onChange:e=>{m(e.target.value)},placeholder:"Pasted once; stored only as a keyed fingerprint + masked preview",className:"font-mono"})]}),(0,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:p,onChange:u})]}),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)(n.pd,{type:"password",autoComplete:"off",value:f,onChange:e=>{g(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)(n.pd,{value:h,onChange:e=>{j(e.target.value)},placeholder:"Why this value may pass"})]}),o&&(0,a.jsx)("p",{className:"text-xs text-sev-critical",children:o}),(0,a.jsx)("div",{children:(0,a.jsx)(n.$n,{variant:"solid",tone:"primary",size:"sm",disabled:!b||r,onClick:()=>{p&&s({ruleId:c,value:x,scope:p,reason:h.trim(),...v?{confirmation:f}:{}})},children:r?"Verifying…":"Grant exception"})})]})}},7524:(e,t,s)=>{s.d(t,{e:()=>i,p:()=>l});var a=s(2330),n=s(8726);function i(e){let{children:t,className:s}=e;return(0,a.jsx)("span",{className:(0,n.cn)("mb-2 block text-label font-semibold uppercase tracking-wider text-text-3",s),children:t})}function l(e){let{label:t,children:s}=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:s})]})}},7526:(e,t,s)=>{s.d(t,{ProjectPane:()=>d});var a=s(2330),n=s(8726),i=s(6146),l=s(6909),r=s(1809),o=s(514);function c(e){let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)}function d(e){var t,s;let{proj:i,path:c,onPathChange:d,query:u,tree:g,isLoading:v,error:b,onClose:k}=e,N=u.trim().length>0,y=null!=(t=null==g?void 0:g.folders)?t:[],w=null!=(s=null==g?void 0:g.files)?s:[],Y=i.accessCounts;return(0,a.jsxs)(n.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:c,onPathChange:d})}),(0,a.jsx)(x,{...e}),k&&(0,a.jsx)(n.$n,{variant:"ghost",size:"icon","aria-label":"Back to harness",title:"Back to harness",onClick:k,children:(0,a.jsx)(o.m,{name:"x"})})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-start gap-2.5",children:[(0,a.jsx)(l.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,r._t)(i,"source")}),(0,a.jsx)("span",{className:"flex items-center gap-3 text-xs text-text-3",children:r.IF.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:(0,n.cn)("size-2 rounded-sm",r.Pe[e].bar)}),Y[e]," ",r.Pe[e].label]},e))})]})]})]}),!N&&e.blocked.length>0&&(0,a.jsx)(f,{...e}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pb-4 pt-2",children:v&&!g?(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",children:b}):N?w.length>0?(0,a.jsx)(j,{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)(o.m,{name:"search",className:"mx-auto mb-2 size-6"}),(0,a.jsxs)("div",{className:"text-sm",children:["No files match “",u,"”"]})]}):0===y.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)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{children:"Name"}),(0,a.jsx)(n.nd,{children:"Origin"}),(0,a.jsx)(n.nd,{children:"LLM access"}),(0,a.jsx)(n.nd,{className:"w-10"})]})}),(0,a.jsxs)(n.BF,{children:[y.map(e=>(0,a.jsx)(p,{folder:e,onOpen:()=>{d([...c,e.name])}},"d"+e.name)),w.map(t=>(0,a.jsx)(h,{file:t,...e},"f"+t.path))]})]})})]})}function x(e){let{proj:t,query:s,onQueryChange:n}=e;return(0,a.jsxs)("div",{className:"relative w-70 shrink-0",children:[(0,a.jsx)(o.m,{name:"search",className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-3"}),(0,a.jsx)("input",{value:s,onChange:e=>{n(e.target.value)},placeholder:"Search files in ".concat(t.name,"…"),className:"h-9 w-full rounded-lg border border-border bg-surface-2 pl-9 pr-8 text-sm text-text placeholder:text-text-3 focus:border-primary focus:outline-none"}),s&&(0,a.jsx)("button",{type:"button","aria-label":"Clear search",onClick:()=>{n("")},className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-text-3 hover:text-text",children:(0,a.jsx)(o.m,{name:"x",className:"size-3.5"})})]})}function m(e){let{proj:t,path:s,onPathChange:l}=e,r=[t.name,...s];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[s.length>0&&(0,a.jsx)(n.$n,{variant:"ghost",size:"icon",className:"size-7",title:"Up one level",onClick:()=>{l(s.slice(0,-1))},children:(0,a.jsx)(o.m,{name:"arrow-up"})}),r.map((e,t)=>{let c=t===r.length-1;return(0,a.jsxs)(i.Fragment,{children:[t>0&&(0,a.jsx)(o.m,{name:"chevron-right",className:"size-3 text-text-3"}),(0,a.jsx)("button",{type:"button",onClick:()=>{l(s.slice(0,t))},className:(0,n.cn)("rounded px-1 py-0.5 text-sm",0===t&&"font-mono",c?"cursor-default font-bold text-text":"font-semibold text-text-2 hover:text-text"),children:e})]},t)})]})}function p(e){let{folder:t,onOpen:s}=e,i=t.accessCounts;return(0,a.jsxs)(n.Hj,{className:"cursor-pointer hover:bg-surface-2",onClick:s,children:[(0,a.jsx)(n.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(o.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)(n.nA,{className:"text-xs text-text-3",children:"Folder"}),(0,a.jsx)(n.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(l.AJ,{counts:i}),i.blocked>0?(0,a.jsxs)("span",{className:"text-xs font-semibold text-sev-critical",children:[i.blocked," blocked"]}):(0,a.jsxs)("span",{className:"text-xs text-text-3",children:[i.total," allowed"]})]})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 text-text-3"})})})]})}function u(e){let{file:t,showPath:s}=e,n=c(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)(o.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:[s&&n.length>0&&(0,a.jsxs)("span",{className:"font-mono text-xs text-text-3",children:[n,"/"]}),(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",children:[(0,a.jsx)(o.m,{name:"slash-circle",className:"size-3"}),t.note]})]})]})}function h(e){let{file:t,onSetAccess:s,onOpenFile:i,drawerPath:r,showPath:c}=e;return(0,a.jsxs)(n.Hj,{className:(0,n.cn)("cursor-pointer hover:bg-surface-2",r===t.path&&"bg-surface-2"),onClick:()=>{i(t.path)},children:[(0,a.jsx)(n.nA,{children:(0,a.jsx)(u,{file:t,showPath:c})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)(l.TJ,{origin:t.origin})}),(0,a.jsx)(n.nA,{children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(l.kx,{value:t.access,onChange:e=>{s(t.path,e)}}),(0,a.jsx)(l.Vx,{value:t.access})]})}),(0,a.jsx)(n.nA,{children:(0,a.jsx)("div",{className:"grid size-7 place-items-center","aria-hidden":"true",children:(0,a.jsx)(o.m,{name:"chevron-right",className:"size-4 text-text-3"})})})]})}function j(e){let{caption:t,rows:s,showPath:i,...l}=e;return(0,a.jsxs)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{children:t}),(0,a.jsx)(n.nd,{children:"Origin"}),(0,a.jsx)(n.nd,{children:"LLM access"}),(0,a.jsx)(n.nd,{className:"w-10"})]})}),(0,a.jsx)(n.BF,{children:s.map(e=>(0,a.jsx)(h,{file:e,showPath:i,...l},e.path))})]})}function f(e){let{blocked:t,showBlocked:s,onToggleBlocked:i,onSetAccess:d,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",children:(0,a.jsx)(o.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 px-2 py-px text-xs font-bold text-white",children:t.length}),(0,a.jsx)("span",{className:"text-xs text-text-3",children:"Auto-blocked on detection — review to adjust"}),(0,a.jsx)(o.m,{name:"chevron-down",className:(0,n.cn)("ml-auto size-4.5 text-text-3 transition-transform",!s&&"-rotate-90")})]}),s&&(0,a.jsx)("div",{className:"flex flex-col gap-2 px-3.5 pb-3",children:t.map(e=>{let t=c(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,r.v7)(e.blockedAt)):""]})]}),(0,a.jsx)(l.kx,{value:e.access,onChange:t=>{d(e.path,t)}}),(0,a.jsx)(l.Vx,{value:e.access}),(0,a.jsx)(n.$n,{variant:"ghost",tone:"primary",size:"sm",onClick:()=>{x(e.path)},children:"Review"})]},e.path)})})]})}},7581:(e,t,s)=>{s.d(t,{BH:()=>Z,BZ:()=>j,C1:()=>V,CT:()=>A,D3:()=>z,DQ:()=>en,Ey:()=>D,JM:()=>U,K$:()=>H,Kp:()=>c,O4:()=>ea,OK:()=>h,Qf:()=>R,Qq:()=>X,RR:()=>v,RY:()=>f,SY:()=>J,Sr:()=>y,Uy:()=>m,WI:()=>I,XA:()=>$,YJ:()=>M,ZL:()=>x,Ze:()=>et,Zu:()=>p,_0:()=>k,_G:()=>o,aR:()=>O,ai:()=>E,bM:()=>w,bN:()=>b,c1:()=>F,cZ:()=>L,f6:()=>ec,fC:()=>T,fN:()=>eo,fl:()=>d,hF:()=>K,hp:()=>ee,iB:()=>Q,iF:()=>N,jZ:()=>r,k3:()=>es,kp:()=>B,lm:()=>Y,lo:()=>g,mL:()=>C,mo:()=>G,np:()=>W,ny:()=>u,oS:()=>el,pD:()=>l,qU:()=>ei,rX:()=>i,s3:()=>ed,sj:()=>er,ts:()=>q,uv:()=>_,vK:()=>S,wy:()=>P});var a=s(2330);let n={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",{...n,...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",{...n,...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",{...n,...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",{...n,...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",{...n,...e,children:(0,a.jsx)("path",{d:"M12 19V5M6 11l6-6 6 6"})}),d=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6"})}),x=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M12 5v14M6 13l6 6 6-6"})}),m=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M4 20V10M10 20V4M16 20v-7M22 20H2"})}),p=e=>(0,a.jsxs)("svg",{...n,...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"})]}),u=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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"})]}),j=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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"})]}),g=e=>(0,a.jsx)("svg",{...n,...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",{...n,...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",{...n,...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",{...n,...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"})]}),N=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M5 21V4M5 4h11l-2 3 2 3H5"})}),y=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"m5 12 4.5 4.5L19 7"})}),w=e=>(0,a.jsxs)("svg",{...n,...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"})]}),Y=e=>(0,a.jsx)("svg",{...n,...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"})}),C=e=>(0,a.jsxs)("svg",{...n,...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"})]}),I=e=>(0,a.jsxs)("svg",{...n,...e,children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{d:"m20 20-3.2-3.2"})]}),z=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"m6 9 6 6 6-6"})}),A=e=>(0,a.jsxs)("svg",{...n,...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"})]}),S=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"m9 6 6 6-6 6"})}),M=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"m15 6-6 6 6 6"})}),R=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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"})]}),L=e=>(0,a.jsx)("svg",{...n,...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"})}),D=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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"})]}),E=e=>(0,a.jsxs)("svg",{...n,...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"})]}),P=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...e,children:(0,a.jsx)("path",{d:"M12 5v14M5 12h14"})}),V=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...e,children:(0,a.jsx)("path",{d:"M6 6 18 18M18 6 6 18"})}),B=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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"})]}),U=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M12 20V9M7 13l5-5 5 5M5 4h14"})}),K=e=>(0,a.jsxs)("svg",{...n,...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"})]}),H=e=>(0,a.jsxs)("svg",{...n,...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"})]}),Z=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M3 12h3l2-5 4 14 3-9 2 2h4"})}),W=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M3 12h4l3 8 4-16 3 8h4"})}),G=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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",{...n,...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",{...n,...e,children:(0,a.jsx)("path",{d:"M7 17 17 7M8 7h9v9"})}),Q=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...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",{...n,...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"})]}),es=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...e,children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("path",{d:"M12 7.5V12l3 2"})]}),en=e=>(0,a.jsx)("svg",{...n,...e,children:(0,a.jsx)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8Z"})}),ei=e=>(0,a.jsxs)("svg",{...n,...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",{...n,...e,children:[(0,a.jsx)("path",{d:"M6 3h8l4 4v14H6z"}),(0,a.jsx)("path",{d:"M14 3v4h4"})]}),er=e=>(0,a.jsx)("svg",{...n,...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",{...n,...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",{...n,...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",{...n,...e,children:(0,a.jsx)("path",{d:"M12 4v11M7 11l5 5 5-5M5 20h14"})})},7735:(e,t,s)=>{s.d(t,{DataShareDetailView:()=>p});var a=s(2330),n=s(8726),i=s(8553),l=s(7524),r=s(7581),o=s(1660),c=s(1789);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)(n.Ex,{variant:"high",children:"Vendored"})}):t.dynamic&&(0,a.jsx)("span",{className:"ml-auto",children:(0,a.jsxs)(n.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})]}),(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,s,i;let{d,onPick:x}=e,m=c.pN[d.trust].icon,p=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,host:d.host,size:44}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:(0,n.cn)("text-lg font-semibold text-text","ip"===d.kind?"font-mono":"font-display"),children:d.name}),(0,a.jsxs)("div",{className:"mt-0.5 text-xs text-text-3",children:[d.category," \xb7 ",d.endpoints.length," endpoints \xb7 ",p," 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)(m,{"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==(s=d.network)?void 0:s.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 m(e){let{d:t,ep:s,onBack:c}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)(n.$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:s.method}),(0,a.jsx)(o.Wi,{kind:t.kind,trust:t.trust,name:t.name,host:t.host,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:s.url,big:!0})})]}),s.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:s.method}),(0,a.jsx)(l.p,{label:"Transport",children:(0,a.jsx)(o.eV,{transport:s.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:s.dataClass})})}),(0,a.jsx)(l.p,{label:"Last seen",children:(0,i.K)(s.lastSeen)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.e,{children:"Call sites"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s.sites.map(e=>(0,a.jsx)(d,{st:e},e.id))})]})]})}function p(e){let{destination:t,endpoint:s,onPick:i,onBack:l,onSetDecision:o,isSettingDecision:d}=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"}),s?"Endpoint":"Destination"]})}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4.5",children:s?(0,a.jsx)(m,{d:t,ep:s,onBack:l}):(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 gap-2",children:[(0,a.jsxs)(n.$n,{variant:"outline",className:"flex-1",children:[(0,a.jsx)(r.iB,{"aria-hidden":!0,focusable:!1}),"Add policy"]}),p?(0,a.jsxs)(n.$n,{variant:"outline",className:"flex-1 border-ok-fill text-ok 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)(n.$n,{variant:"solid",tone:"danger",className:"flex-1",disabled:d,onClick:()=>{o("block")},children:[(0,a.jsx)(r.pD,{"aria-hidden":!0,focusable:!1}),"Block egress"]})]}),t.isCustom&&(0,a.jsxs)(n.$n,{variant:"ghost",size:"sm",tone:"neutral",className:"self-center text-xs text-text-3",disabled:d,onClick:()=>{o(null)},children:["Reset to default (",c.pN[t.trust].label,")"]})]})]})}},7889:(e,t,s)=>{s.d(t,{TimeRangeSelect:()=>o});var a=s(2330),n=s(8726),i=s(1415);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:s}=e,o=(0,i.QT)(t);return(0,a.jsxs)(n.rI,{children:[(0,a.jsx)(n.ty,{asChild:!0,children:(0,a.jsxs)(n.$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)(n.SQ,{align:"end",className:"w-44",children:(0,a.jsx)(n.Hr,{value:t,onValueChange:e=>{s(e)},children:i.hn.map(e=>(0,a.jsx)(n.Ht,{value:e.value,children:e.label},e.value))})})]})}},7942:(e,t,s)=>{s.d(t,{dt:()=>A.AddExceptionForm,fu:()=>S.ApproveExceptionDialog,i5:()=>k.AssetDetail,JR:()=>D.AvailablePluginsCardView,VB:()=>M.BlockedLedgerView,Tc:()=>m.ColumnsMenu,sp:()=>n.sp,MX:()=>P.DataShareDetailView,Im:()=>F.DataSharesTableView,MF:()=>h.DetectionDetailView,A7:()=>j.DetectionsListView,pp:()=>N.EmptyState,Gj:()=>R.ExceptionDetailView,Eb:()=>O.ExceptionsTableView,_G:()=>u._G,nU:()=>p.nU,To:()=>y.FileDetailDrawer,Wj:()=>d.FindingDetailView,oH:()=>x.FindingsTableView,Dm:()=>m.FindingsToolbarView,y2:()=>w.HarnessOverview,mD:()=>Y.m,_c:()=>C.InventoryNav,mL:()=>u.mL,wO:()=>f.MatcherModal,t6:()=>V.NeedsReviewStripView,ec:()=>l,LK:()=>b.PolicyDetailView,m$:()=>b.PolicyListView,kL:()=>I.ProjectPane,sJ:()=>z.RecommendedActionsCardView,nZ:()=>L.RotateKeyDialog,WI:()=>u.WI,LO:()=>o.SessionDetailView,md:()=>c.SessionListView,Zu:()=>u.Zu,k3:()=>u.k3,$n:()=>r.TimeRangeSelect,b1:()=>v.UpdateModal,bn:()=>T.UpdateStatusCardView,A3:()=>E.WorkspaceSettingsFormView,uv:()=>u.uv,Xg:()=>g.Xg});var a=s(1252);s(8553);var n=s(1415);s(4127);var i=s(2330);function l(e){let{title:t,sub:s,actions:a}=e;return(0,i.jsxs)("div",{className:"flex items-start justify-between gap-4 pb-6",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"font-display text-2xl font-semibold text-text",children:t}),s&&(0,i.jsx)("p",{className:"mt-1 text-sm text-text-3",children:s})]}),a&&(0,i.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}s(5823),s(9602);var r=s(7889);s(1236),s(7524),s(8726),s(6146),s(9912),s(402),s(6615),s(7381),s(3868),s(6563);var o=s(6324),c=s(8283);s(8519);var d=s(4026),x=s(5392),m=s(801),p=s(8810);s(805);var u=s(7581);s(2769);var h=s(6418),j=s(1462),f=s(3760),g=s(4424);s(965),s(2011);var v=s(8885),b=s(5850),k=s(3492),N=s(6909);s(1809);var y=s(5875),w=s(5530),Y=s(514),C=s(974),I=s(7526);a.l.sevCritical,a.l.sevHigh,a.l.sevMedium,a.l.sevLow,u.pD,a.l.sevCritical,u.jZ,a.l.primary,u.rX,a.l.sevHigh,s(3439),a.l.sevCritical,a.l.sevHigh,a.l.sevMedium,s(9102);var z=s(4952),A=s(7461),S=s(4285);s(1247);var M=s(4453);s(3741);var R=s(666),O=s(1648);s(4574);var L=s(1447),D=s(209),T=s(1951),E=s(3365);s(1660);var P=s(7735),F=s(6053);s(1789);var V=s(5130)},8283:(e,t,s)=>{s.d(t,{SessionListView:()=>u});var a=s(2330),n=s(8726),i=s(8553),l=s(7581),r=s(5823),o=s(1236),c=s(402),d=s(7381),x=s(3868);function m(e){let{session:t,selected:s,onSelect:o}=e,x=t.findings>0;return(0,a.jsxs)("button",{type:"button",onClick:o,"aria-current":s?"true":void 0,className:(0,n.cn)("relative cursor-pointer block w-full 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:"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)(c.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-border-strong",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)}),(0,a.jsx)(c.JW,{icon:l.O4,children:(0,d.vV)(t.startedAt,t.endedAt,t.status)}),(0,a.jsxs)(c.JW,{icon:l.kp,children:[t.turns," turns"]}),x&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-xs font-semibold text-sev-critical",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)(n.EA,{className:"size-6.5 shrink-0 rounded-lg"}),(0,a.jsx)(n.EA,{className:"h-4 flex-1"})]}),(0,a.jsx)(n.EA,{className:"mb-2 h-3 w-2/3"}),(0,a.jsx)(n.EA,{className:"h-3 w-1/2"})]})}function u(e){let{sessions:t,selectedId:s,onSelect:i,query:r,onQuery:c,harness:u,harnessOptions:h,onHarness:j,isLoading:f,error:g,hasMore:v=!1,emptyCount:b=0,showEmpty:k=!1,onToggleEmpty:N}=e,y=(0,d.u3)(t),w=""!==r.trim()||u.length>0,Y=1===b?"background session":"background sessions",C=b>0&&N?(0,a.jsx)("div",{className:"px-2 py-2 text-center",children:(0,a.jsx)(n.$n,{variant:"link",tone:"primary",className:"text-label font-normal",onClick:N,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.jsxs)("div",{className:"mb-2 flex h-8.5 items-center gap-2 rounded-lg border border-border bg-surface-2 px-2.5",children:[(0,a.jsx)(l.WI,{"aria-hidden":!0,focusable:!1,className:"size-3.5 shrink-0 text-text-3"}),(0,a.jsx)("input",{value:r,onChange:e=>{c(e.target.value)},placeholder:"Search sessions & events…","aria-label":"Search sessions and events",className:"min-w-0 flex-1 bg-transparent text-sm text-text placeholder:text-text-3 focus:outline-none"})]}),(0,a.jsx)(x.HarnessSelect,{value:u,onChange:j,...h?{options:h}:{}})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-2","aria-busy":f,children:g?(0,a.jsx)("div",{className:"p-2",children:(0,a.jsx)(o.r,{message:g})}):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===y.length?(0,a.jsxs)("div",{className:"py-10 text-center text-sm text-text-3",children:[w?"No sessions match":b>0?"No active sessions in this range":"No sessions recorded yet",C]}):(0,a.jsxs)(a.Fragment,{children:[y.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-text/6"}),(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,selected:e.id===s,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."]})]})})]})}},8338:(e,t,s)=>{function a(e,t){return{input:e,output:t,cacheWrite5m:1.25*e,cacheWrite1h:2*e,cacheRead:.1*e,webSearch:.01}}s.d(t,{PWo:()=>Q,spO:()=>ta,V0H:()=>eE,xdw:()=>o,ap_:()=>l,UKt:()=>r});let n={"claude-fable-5":a(10,50),"claude-opus-4-8":a(5,25),"claude-opus-4-7":a(5,25),"claude-opus-4-6":a(5,25),"claude-opus-4-5":a(5,25),"claude-sonnet-5":a(3,15),"claude-sonnet-4-6":a(3,15),"claude-sonnet-4-5":a(3,15),"claude-haiku-4-5":a(1,5)};Object.fromEntries(Object.entries(n).map(e=>{let[t,s]=e;return["anthropic/".concat(t),s]})),Object.keys(n);let i=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function l(e){return i.format(e)}function r(e){return e>0&&e<.1?"$".concat(e.toFixed(4)):"$".concat(e.toFixed(2))}function o(e,t){return t?"≥ ".concat(r(e)):r(e)}var c=s(8322),d=s(5419),x=s(9619);let m=c.k5(["pii","financial","secret","phi","code_context","code_flaw","custom","config"]).meta({id:"DetectionCategory"}),p=c.k5(["critical","high","medium","low"]).meta({id:"Severity"}),u=c.k5(["warn","redact","block","allow","log"]).meta({id:"ActionTaken"});u.options;let h=c.Ik({start:c.ai().int().nonnegative(),end:c.ai().int().nonnegative()}).meta({id:"Span"}),j=c.Ik({id:c.Os(),eventId:c.Os(),ruleId:c.Yj(),category:m,severity:p,span:h,maskedMatch:c.Yj(),actionTaken:u,confidence:c.ai().min(0).max(1)}).meta({id:"Finding"});j.meta({id:"DetectedFinding"});let f=c.k5(["blocked","redacted","warned","allowed","quarantined","monitored"]).meta({id:"FindingAction"}),g=c.k5(["claudecode","claudedesktop","cursor","copilot","chatgpt","api"]).meta({id:"FindingProvider"}),v=c.k5(["secret","pii","source_code","external_share","mcp_server","customer_data","financial","phi","custom"]).meta({id:"FindingCategory"});c.k5(["in-flight","at-rest"]).meta({id:"FindingOrigin"});let b=c.k5(["open","handled","resolved","dismissed"]).meta({id:"FindingStatus"});c.k5(["enforced-in-flight","fixed-at-source","exception","acknowledged","false-positive","redetected"]).meta({id:"ResolutionMethod"});let k=c.Ik({maskedValue:c.Yj(),contextPrefix:c.Yj()}).meta({id:"FindingMatch"}),N=c.Ik({id:c.Yj(),name:c.Yj().nullable()}).meta({id:"FindingDetectionRef"}),y=c.Ik({id:c.Yj(),name:c.Yj()}).meta({id:"FindingPolicyRef"}),w=c.Ik({id:c.Yj(),provider:g,repo:c.Yj(),file:c.Yj(),toolName:c.Yj().optional(),action:f,detectedAt:d.w$(),confidence:c.ai().min(0).max(1),status:b.optional()}).meta({id:"FindingInstance"}),Y=c.Ik({id:c.Yj(),category:v,subtype:c.Yj(),severity:p,match:k,detection:N,policy:y,instanceCount:c.ai().int().nonnegative(),providers:c.YO(g),aggregateAction:f.nullable(),latestDetectedAt:d.w$(),instances:c.YO(w),status:b.optional()}).meta({id:"FindingGroup"});c.Ik({findings:c.ai().int().nonnegative(),groups:c.ai().int().nonnegative(),bySeverity:c.Ik({critical:c.ai().int().nonnegative(),high:c.ai().int().nonnegative(),medium:c.ai().int().nonnegative(),low:c.ai().int().nonnegative()})}).meta({id:"FindingStats"});let C=c.Ik({value:c.Yj(),count:c.ai().int().nonnegative()}).meta({id:"FindingFacetItem"}),I=c.Ik({severity:c.YO(C),subtype:c.YO(C),provider:c.YO(C),action:c.YO(C)}).meta({id:"FindingFacets"});c.Ik({severity:c.YO(p).optional(),subtype:c.YO(c.Yj()).optional(),provider:c.YO(g).optional(),action:c.YO(f).optional(),q:c.Yj().optional(),sessionId:c.Yj().optional(),groupBy:c.eu("type").optional(),limit:x.ai().int().min(1).max(100).optional(),cursor:c.Yj().optional()}),c.Ik({totals:c.Ik({findings:c.ai().int().nonnegative(),groups:c.ai().int().nonnegative()}),facets:I,items:c.YO(Y),nextCursor:c.Yj().nullable(),sessionFirings:c.g1(c.Yj(),c.ai().int().nonnegative()).optional()}).meta({id:"ListGroupedFindingsResponse"}),c.Ik({action:f.exclude(["quarantined"]),instanceId:c.Yj().optional()}).meta({id:"ApplyFindingActionRequest"}),Y.meta({id:"ApplyFindingActionResponse"}),c.Ik({severity:c.YO(p).optional(),subtype:c.YO(c.Yj()).optional(),provider:c.YO(g).optional(),action:c.YO(f).optional(),q:c.Yj().optional(),format:c.k5(["csv","json"]).optional()}),w.extend({groupId:c.Yj(),category:v,subtype:c.Yj(),severity:p,match:k,detection:N,policy:y}).meta({id:"FindingInstanceDetail"});let z=c.k5(["claudecode","cursor","copilot","codex","windsurf","claudedesktop","chatgpt","api"]).meta({id:"Harness"}),A=c.k5(["host","harness","user","skill","hook","mcp_server","config_file"]).meta({id:"InventoryObjectType"}),S=c.k5(["session","run","tool_call","llm_call","source_lookup","prompt","response","code_change","tool_use","config_scan"]).meta({id:"AuditEventType"}),M=c.g1(c.Yj(),c.L5());c.Ik({host_name:c.Yj().optional(),os:c.Yj().optional(),os_version:c.Yj().optional(),arch:c.Yj().optional()}).catchall(c.L5()),c.Ik({harness_version:c.Yj().optional(),interface:c.Yj().optional()}).catchall(c.L5()),c.Ik({display_name:c.Yj().optional(),email:c.Yj().optional()}).catchall(c.L5()),c.Ik({source:c.Yj().optional(),version:c.Yj().optional(),description:c.Yj().optional(),updated_at:c.Yj().optional(),scope:c.Yj().optional(),plugin_name:c.Yj().optional()}).catchall(c.L5()),c.Ik({event:c.Yj().optional(),matcher:c.Yj().optional(),command:c.Yj().optional(),scope:c.Yj().optional(),plugin_name:c.Yj().optional(),timeout:c.ai().optional()}).catchall(c.L5()),c.Ik({scope:c.Yj().optional(),transport:c.Yj().optional(),command:c.Yj().optional(),url:c.Yj().optional(),env_keys:c.YO(c.Yj()).optional(),plugin_name:c.Yj().optional(),marketplace:c.Yj().optional(),project:c.Yj().optional()}).catchall(c.L5()),c.Ik({kind:c.Yj().optional(),detail:c.Yj().optional(),scope:c.Yj().optional(),updated_at:c.Yj().optional(),entry_count:c.ai().optional()}).catchall(c.L5());let R=c.Ik({model:c.Yj().optional(),provider:c.Yj().optional(),input_tokens:c.ai().int().nonnegative().optional(),output_tokens:c.ai().int().nonnegative().optional(),cache_creation_input_tokens:c.ai().int().nonnegative().optional(),cache_read_input_tokens:c.ai().int().nonnegative().optional(),ephemeral_1h_input_tokens:c.ai().int().nonnegative().optional(),ephemeral_5m_input_tokens:c.ai().int().nonnegative().optional(),web_search_requests:c.ai().int().nonnegative().optional(),web_fetch_requests:c.ai().int().nonnegative().optional(),service_tier:c.Yj().optional(),stop_reason:c.Yj().optional(),message_id:c.Yj().optional(),uuid:c.Yj().optional(),parent_uuid:c.Yj().optional(),run_key:c.Yj().optional()}).catchall(c.L5());c.Ik({sessionId:c.Yj().min(1),messageId:c.Yj().min(1),parentId:c.Yj().min(1),rootSessionId:c.Yj().min(1),startedAt:d.w$(),attributes:R});let O=c.Ik({tool_name:c.Yj().optional(),tool_use_id:c.Yj().optional(),target:c.Yj().optional(),is_error:c.zM().optional(),input_size:c.ai().int().nonnegative().optional(),output_size:c.ai().int().nonnegative().optional(),uuid:c.Yj().optional(),parent_uuid:c.Yj().optional(),run_key:c.Yj().optional()}).catchall(c.L5()),L=c.Ik({ruleId:c.Yj().min(1),ruleName:c.Yj(),ruleVersion:c.Yj().min(1),category:m,severity:p,span:h,maskedMatch:c.Yj(),actionTaken:u,confidence:c.ai().min(0).max(1)});c.Ik({sessionId:c.Yj().min(1),toolUseId:c.Yj().min(1),parentId:c.Yj().min(1),rootSessionId:c.Yj().min(1),startedAt:d.w$(),attributes:O,inspections:c.YO(L).default([])});let D=c.Ik({objectType:A,identityKey:c.Yj().min(1),location:c.Yj().optional(),title:c.Yj().optional(),hostId:c.Yj().optional(),attributes:M.default({})}).meta({id:"InventoryInput"}),T=c.Ik({url:c.Yj().min(1),name:c.Yj().optional(),attributes:M.default({})}).meta({id:"SourceProjectInput"}),E=c.Ik({id:c.Yj().min(1),eventType:S,startedAt:d.w$(),endedAt:d.w$().optional(),parentId:c.Yj().optional(),rootSessionId:c.Yj().optional(),hostId:c.Yj().optional(),harnessId:c.Yj().optional(),sourceProjectId:c.Yj().optional(),severity:p.optional(),priority:c.Yj().optional(),content:c.Yj().optional(),contentHash:c.Yj().optional(),attributes:M.optional()}).meta({id:"AuditEventInput"});c.Ik({class:c.Yj().min(1),label:c.Yj().optional(),attributes:M.optional()});let P=c.Ik({ruleId:c.Yj().min(1),version:c.Yj().min(1),name:c.Yj(),category:m,severity:p,definition:c.Yj()});c.Ik({id:c.Yj().min(1),auditEventId:c.Yj().min(1),inspectionDefinitionId:c.Yj().min(1),classifiedDataId:c.Yj().optional(),span:h,maskedMatch:c.Yj(),actionTaken:u,confidence:c.ai().min(0).max(1)}),c.Ik({host:D.optional(),harness:D.optional(),project:T.optional()}).meta({id:"InventoryContext"}),c.Ik({hostId:c.Yj().optional(),harnessId:c.Yj().optional(),accountId:c.Yj().optional(),sourceProjectId:c.Yj().optional()}).meta({id:"ResolvedInventory"}),c.Ik({hosts:c.YO(c.Yj()),harnesses:c.YO(c.Yj()),osVersions:c.YO(c.Yj()),projects:c.YO(c.Yj())}).meta({id:"InventoryFacets"});let F=c.Ik({sessionId:c.Yj(),model:c.Yj(),provider:c.Yj(),inputTokens:c.ai().int().nonnegative(),outputTokens:c.ai().int().nonnegative(),cacheCreation:c.ai().int().nonnegative(),cacheRead:c.ai().int().nonnegative(),totalTokens:c.ai().int().nonnegative(),estimatedCostUsd:c.ai().nullable()}).meta({id:"TokenRollup"});c.Ik({sessionId:c.Yj(),rollups:c.YO(F),totalTokens:c.ai().int().nonnegative(),estimatedCostUsd:c.ai().nullable(),costIsPartial:c.zM()});let V=c.Ik({provider:c.Yj(),model:c.Yj(),inputTokens:c.ai().int().nonnegative(),outputTokens:c.ai().int().nonnegative(),cacheTokens:c.ai().int().nonnegative(),totalTokens:c.ai().int().nonnegative(),estimatedCostUsd:c.ai().nullable()});c.Ik({models:c.YO(V),sessionCount:c.ai().int().nonnegative(),totalTokens:c.ai().int().nonnegative(),estimatedCostUsd:c.ai(),costIsPartial:c.zM()});let _=c.k5(["active","completed","interrupted","error"]),B=c.k5(["session","prompt","response","tool","hook","detection","share","permission","commit","error","active"]),$=c.k5(["detections","shares","inventory"]),U=c.Ik({id:c.Yj(),occurredAt:d.w$(),kind:B,title:c.Yj(),detail:c.Yj(),tool:c.Yj().nullable(),severity:p.nullable(),link:$.nullable(),targetId:c.Yj().nullable(),internal:c.zM(),flagged:c.zM()}).meta({id:"ActivityAuditEvent"}),K=c.Ik({id:c.Yj(),harness:z,title:c.Yj(),project:c.Yj(),repo:c.Yj(),branches:c.YO(c.Yj()),startedAt:d.w$(),endedAt:d.w$().nullable(),status:_,turns:c.ai().int().nonnegative(),findings:c.ai().int().nonnegative(),shares:c.ai().int().nonnegative()}).meta({id:"ActivitySessionSummary"});K.extend({host:c.Yj(),cwd:c.Yj(),models:c.YO(c.Yj()),version:c.Yj(),tokens:F,tools:c.g1(c.Yj(),c.ai().int().nonnegative()),files:c.YO(c.Yj()),commits:c.ai().int().nonnegative(),events:c.YO(U)}).meta({id:"ActivitySession"}),c.Ik({tz:c.Yj().optional()});let H=c.Ik({sessionsToday:c.ai().int().nonnegative(),liveNow:c.ai().int().nonnegative(),toolCallsToday:c.ai().int().nonnegative(),findingsToday:c.ai().int().nonnegative(),egressToday:c.ai().int().nonnegative()}).meta({id:"GetActivityStatsResponse"});c.Ik({q:c.Yj().optional(),harness:c.YO(z).optional(),from:c.KC([d.p6(),d.w$()]).optional(),to:c.KC([d.p6(),d.w$()]).optional(),excludeEmpty:c.uE().optional(),limit:x.ai().int().min(1).max(100).default(50),cursor:c.Yj().optional()});let Z=c.Ik({items:c.YO(K),nextCursor:c.Yj().nullable(),emptyCount:c.ai().int().nonnegative()}).meta({id:"ListActivitySessionsResponse"});c.Ik({limit:x.ai().int().min(1).max(500).default(100),cursor:c.Yj().optional(),order:c.k5(["asc","desc"]).default("asc")}),c.Ik({items:c.YO(U),nextCursor:c.Yj().nullable()}).meta({id:"ListSessionEventsResponse"}),c.Ik({format:c.k5(["ndjson","json"]).default("ndjson")}),c.Ik({format:c.k5(["csv","json"]).default("csv"),q:c.Yj().optional(),harness:c.YO(z).optional(),from:c.KC([d.p6(),d.w$()]).optional(),to:c.KC([d.p6(),d.w$()]).optional()}),c.Ik({stats:H,sessions:Z}).meta({id:"ActivityOverviewResponse"});let W=c.k5(["prompt","response","code_change","tool_use"]).meta({id:"EventKind"}),G=c.k5(["claude-code","claude-desktop","cursor","chatgpt","github-copilot","cli","unknown"]).meta({id:"SourceTool"}),q=c.Ik({sessionId:c.Yj().optional(),repo:c.Yj().optional(),filePath:c.Yj().optional(),toolName:c.Yj().optional(),gitignored:c.zM().optional(),wholeFile:c.zM().optional(),model:c.Yj().optional(),turnIndex:c.ai().int().nonnegative().optional(),correlationId:c.uR().optional(),traceId:c.Yj().regex(/^[0-9a-f]{32}$/).optional(),exceptionIds:c.YO(c.Os()).optional()}).meta({id:"EventMetadata"}),J=c.Ik({id:c.Os(),sourceTool:G,kind:W,occurredAt:d.w$(),contentHash:c.Yj(),content:c.Yj(),metadata:q.optional()}).meta({id:"Event"}),X=J.meta({id:"IngestEvent"});c.Ik({events:c.YO(X).min(1).max(100),dedupe:c.eu("content-hash").optional()}).meta({id:"IngestBatch"});let Q=c.k5(["project","skill","mcp","hook","config"]).meta({id:"AssetType"}),ee=c.k5(["open","approved","blocked"]).meta({id:"AccessLevel"}),et=c.k5(["source","public-dep","vendored","config","data","docs","generated"]).meta({id:"Origin"}),es=c.k5(["known-good","risky","unapproved"]).meta({id:"TrustLevel"}),ea=c.k5(["update","stale","conflict","unknown","change","untracked","risk","findings"]).meta({id:"Flag"}),en=c.k5(["public","private"]).meta({id:"Visibility"}),ei=c.k5(["block","redact","warn"]).meta({id:"HarnessEventKind"}),el=c.k5(["claudecode","cursor","codex"]).meta({id:"HarnessId"}),er=c.Ik({open:c.ai().int().nonnegative(),approved:c.ai().int().nonnegative(),blocked:c.ai().int().nonnegative(),total:c.ai().int().nonnegative()}).meta({id:"AccessCounts"}),eo=c.Ik({id:c.Yj(),type:Q,name:c.Yj(),sub:c.Yj(),flags:c.YO(ea),trust:es.optional()}).meta({id:"AssetSummary"}),ec=c.Ik({id:c.Yj(),name:c.Yj(),repo:c.Yj(),visibility:en,language:c.Yj(),policyDefault:ee,updatedAt:d.w$(),accessCounts:er,findingsCount:c.ai().int().nonnegative()}).meta({id:"ProjectSummary"}),ed=c.Ik({type:Q,assets:c.YO(eo)}),ex=c.Ik({id:el,label:c.Yj(),kind:c.Yj(),version:c.Yj(),sessions:c.ai().int().nonnegative(),assetCount:c.ai().int().nonnegative(),flagCount:c.ai().int().nonnegative(),projects:c.YO(ec),categories:c.YO(ed)}).meta({id:"HarnessSummary"});c.Ik({items:c.YO(ex)}).meta({id:"ListHarnessesResponse"});let em=c.Ik({type:Q,total:c.ai().int().nonnegative(),trustRollup:c.Ik({"known-good":c.ai().int().nonnegative(),risky:c.ai().int().nonnegative(),unapproved:c.ai().int().nonnegative()}).partial().strict().optional(),flagRollup:c.Ik({update:c.ai().int().nonnegative(),stale:c.ai().int().nonnegative(),conflict:c.ai().int().nonnegative(),unknown:c.ai().int().nonnegative(),change:c.ai().int().nonnegative(),untracked:c.ai().int().nonnegative(),risk:c.ai().int().nonnegative(),findings:c.ai().int().nonnegative()}).partial().strict(),items:c.YO(eo)}).meta({id:"AssetGroup"});c.Ik({groups:c.YO(em)}).meta({id:"ListAssetsResponse"});let ep=c.Ik({name:c.Yj(),signature:c.Yj(),description:c.Yj(),write:c.zM(),risk:c.Yj().nullable()}).meta({id:"McpTool"}),eu=c.Ik({id:c.Yj(),title:c.Yj(),note:c.Yj()});eo.extend({description:c.Yj().nullable(),trust:es.nullable(),meta:c.g1(c.Yj(),c.L5()),finding:eu.nullable(),tools:c.YO(ep).optional()}).meta({id:"AssetDetail"}),c.Ik({items:c.YO(ec)}).meta({id:"ListProjectsResponse"}),c.Ik({attention:c.ai().int().nonnegative(),byType:c.Ik({project:c.ai().int().nonnegative(),skill:c.ai().int().nonnegative(),mcp:c.ai().int().nonnegative(),hook:c.ai().int().nonnegative(),config:c.ai().int().nonnegative()}),harnesses:c.ai().int().nonnegative(),mcpTrust:c.Ik({"known-good":c.ai().int().nonnegative(),risky:c.ai().int().nonnegative(),unapproved:c.ai().int().nonnegative()})}).meta({id:"InventoryStats"});let eh=c.Ik({path:c.Yj(),name:c.Yj(),origin:et,access:ee,isCustom:c.zM(),findings:c.ai().int().nonnegative(),blockedAt:d.w$().nullable().optional(),note:c.Yj().nullable().optional()}).meta({id:"FileSummary"}),ej=c.Ik({name:c.Yj(),path:c.Yj(),accessCounts:er}).meta({id:"FolderSummary"});c.Ik({project:c.Ik({id:c.Yj(),repo:c.Yj(),visibility:en}),path:c.Yj(),folders:c.YO(ej).optional(),files:c.YO(eh)}).meta({id:"ProjectTreeResponse"}),eh.extend({project:c.Ik({repo:c.Yj(),visibility:en,language:c.Yj(),policyDefault:ee,updatedAt:d.w$()}),findingsRefs:c.YO(c.Ik({id:c.Yj(),title:c.Yj()}))}).meta({id:"FileDetail"}),c.Ik({path:c.Yj(),access:ee}).meta({id:"SetFileAccessBody"}),c.Ik({file:eh,accessCounts:er}).meta({id:"SetFileAccessResponse"}),c.Ik({trust:es}).meta({id:"SetMcpTrustBody"});let ef=c.Ik({kind:ei,title:c.Yj(),detail:c.Yj(),occurredAt:d.w$(),findingId:c.Yj().nullable().optional()}).meta({id:"HarnessEventItem"});c.Ik({counts:c.Ik({block:c.ai().int().nonnegative(),redact:c.ai().int().nonnegative(),warn:c.ai().int().nonnegative()}),items:c.YO(ef)}).meta({id:"HarnessEventsResponse"}),c.Ik({jobId:c.Yj(),startedAt:d.w$()}).meta({id:"RescanResponse"}),c.Ik({repo:c.Yj()}).meta({id:"ConnectProjectBody"}),c.Ik({type:c.YO(Q).optional(),q:c.Yj().optional()}),c.Ik({path:c.Yj().optional(),q:c.Yj().optional(),filter:c.k5(["blocked"]).optional()}),c.Ik({path:c.Yj()}),c.Ik({limit:x.ai().int().min(1).max(50).default(7)});let eg=c.k5(["once","temporary","permanent"]),ev=c.Ik({repo:c.Yj().optional(),sourceTool:c.Yj().optional(),provider:c.Yj().optional()}).strict(),eb=c.Ik({id:c.Os(),ruleId:c.Yj(),category:m,valueFingerprint:c.Yj().regex(/^[0-9a-f]{64}$/),keyVersion:c.ai().int().positive(),maskedValue:c.Yj(),scope:eg,expiresAt:d.w$().nullable(),maxUses:c.ai().int().positive().nullable(),useCount:c.ai().int().nonnegative(),lastUsedAt:d.w$().nullable(),justification:c.Yj().min(1),conditions:ev.nullable(),createdBy:c.Yj(),createdVia:c.k5(["cli-approve","cli-add","web-approve","web-add","api","setup-triage"]),createdAt:d.w$(),updatedAt:d.w$(),revokedAt:d.w$().nullable(),revokedBy:c.Yj().nullable(),revokeReason:c.Yj().nullable()}).pick({id:!0,ruleId:!0,valueFingerprint:!0,keyVersion:!0,expiresAt:!0,maxUses:!0,useCount:!0,conditions:!0});c.k5(["keyword","regex","validator"]).meta({id:"MatcherType"});let ek=c.Ik({type:c.eu("keyword"),keywords:c.YO(c.Yj().min(1)).min(1),caseSensitive:c.zM().default(!1)}),eN=c.Ik({type:c.eu("regex"),pattern:c.Yj(),flags:c.Yj().default("gi"),captureGroup:c.ai().int().nonnegative().optional()}).refine(e=>(function(e,t){try{return new RegExp(e,t),!0}catch(e){return!1}})(e.pattern,e.flags),{message:"pattern/flags do not form a valid JavaScript regular expression",path:["pattern"]}).refine(e=>void 0!==e.captureGroup||!function(e,t){try{var s;return(null==(s=new RegExp(e,t.replace(/[gy]/g,"")).exec(""))?void 0:s[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"]}),ey=c.Ik({type:c.eu("validator"),name:c.k5(["luhn","entropy","ssn-checksum"]),config:c.g1(c.Yj(),c.L5()).optional()}),ew=c.gM("type",[ek,eN,ey]).meta({id:"Matcher"}),eY=c.Ik({extensions:c.YO(c.Yj().regex(/^\.[A-Za-z0-9]+$/)).min(1)}).meta({id:"AppliesTo"}),eC=c.KC([c.Yj(),c.Ik({name:c.Yj(),config:c.g1(c.Yj(),c.L5()).optional()})]).meta({id:"PostValidatorRef"}),eI=c.Ik({categories:c.YO(m).min(1).optional(),ruleIds:c.YO(c.Yj().min(1)).min(1).optional(),labels:c.YO(c.Yj().min(1)).min(1).optional(),windowChars:c.ai().int().positive().default(160),confidenceBoost:c.ai().min(0).max(.3).optional()}).refine(e=>{var t,s,a,n,i,l;return(null!=(n=null==(t=e.categories)?void 0:t.length)?n:0)+(null!=(i=null==(s=e.ruleIds)?void 0:s.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"}),ez=c.Ik({label:c.Yj(),text:c.Yj().max(5e4),shouldMatch:c.zM(),filePath:c.Yj().optional(),expectedSpans:c.YO(c.Ik({start:c.ai(),end:c.ai()})).optional()}).meta({id:"RuleFixture"}),eA=c.Ik({specVersion:c.eu(1),id:c.Yj().regex(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/),name:c.Yj(),category:m,severity:p,matcher:ew,appliesTo:eY.optional(),postValidators:c.YO(eC).optional(),requiresNearby:eI.optional(),examples:c.YO(c.Yj()).optional()}).meta({id:"Rule"}),eS=c.Ik({name:c.Yj(),email:c.Rp().optional(),url:c.OZ().optional()}).meta({id:"Author"});c.Ik({specVersion:c.eu(1),id:c.Yj(),name:c.Yj(),version:c.Yj(),rules:c.YO(c.Yj()),description:c.Yj().optional(),author:eS.optional(),license:c.Yj().optional(),sourceUrl:c.OZ().optional()}).meta({id:"PackManifest"});let eM=c.k5(["global","repo","user"]).meta({id:"PolicyScope"}),eR=c.KC([c.Ik({ruleId:c.Yj()}),c.Ik({category:m})]).meta({id:"PolicyTarget"}),eO=c.Ik({id:c.Os(),scope:eM,target:eR,action:u,enabled:c.zM().default(!0),customKeywords:c.YO(c.Yj()).optional(),name:c.Yj().optional()}).meta({id:"Policy"});c.Ik({version:c.Yj(),policies:c.YO(eO),rules:c.YO(eA).optional(),rulesComplete:c.zM().optional(),exceptions:c.YO(eb).optional(),customKeywords:c.YO(c.Yj()),fetchedAt:d.w$()}).meta({id:"PolicyBundle"});let eL=["config"];m.options.filter(e=>!eL.includes(e));let eD={secret:"critical",financial:"critical",code_flaw:"critical",pii:"high",phi:"high",custom:"high",code_context:"low",config:"low"},eT=c.k5(["builtin","custom"]).meta({id:"PolicyKind"}),eE=["monitor","warn","redact","block"],eP=c.k5(eE).meta({id:"BuiltinPolicyId"}),eF={monitor:{name:"Monitor",action:"log",description:"Log every match for audit. The request is allowed through untouched."},warn:{name:"Warn",action:"warn",description:"Allow the request, but warn the user inline before it is sent."},redact:{name:"Redact",action:"redact",description:"Automatically strip the matched value from the request, then continue."},block:{name:"Block",action:"block",description:"Refuse the request entirely whenever any rule in this detection matches."}};Object.fromEntries(m.options.map(e=>[e,eF[function(e){if(eL.includes(e))return"monitor";let t=eD[e];return"critical"===t||"high"===t?"warn":"monitor"}(e)].action])),Object.fromEntries(eE.map(e=>[e,{id:e,...eF[e]}]));let eV=c.Ik({id:c.Yj(),name:c.Yj(),ruleCount:c.ai().int().nonnegative(),enabled:c.zM()}).meta({id:"UsedByItem"}),e_=c.Ik({id:c.Yj(),kind:eT,name:c.Yj(),enabled:c.zM(),usedByCount:c.ai().int().nonnegative()}).meta({id:"PolicyListItem"});c.Ik({specVersion:c.eu(1),id:c.Yj(),kind:eT,name:c.Yj(),enabled:c.zM(),description:c.Yj(),usedBy:c.YO(eV)}).meta({id:"PolicyDetail"}),c.Ik({policies:c.ai().int().nonnegative(),builtin:c.ai().int().nonnegative(),custom:c.ai().int().nonnegative(),detectionsGoverned:c.ai().int().nonnegative()}).meta({id:"PolicyStatsResponse"}),c.Ik({cursor:c.Yj().optional(),limit:x.ai().int().min(1).max(200).default(50),sourceTool:c.Yj().optional(),kind:c.Yj().optional(),from:d.w$().optional(),to:d.w$().optional()}),c.Ik({items:c.YO(J),nextCursor:c.Yj().nullable()}).meta({id:"ListEventsResponse"}),c.Ik({accepted:c.ai().int().nonnegative(),duplicates:c.ai().int().nonnegative()}).meta({id:"IngestResponse"}),c.Ik({cursor:c.Yj().optional(),limit:x.ai().int().min(1).max(200).default(50),severity:c.Yj().optional(),category:c.Yj().optional(),eventId:c.Os().optional()}),c.Ik({items:c.YO(j),nextCursor:c.Yj().nullable()}).meta({id:"ListFindingsResponse"}),c.Ik({items:c.YO(e_)}).meta({id:"ListPoliciesResponse"}),eO.omit({id:!0}).meta({id:"CreatePolicyRequest"}),eO.partial().required({id:!0}).meta({id:"UpdatePolicyRequest"}),c.Ik({accepted:c.zM()}).meta({id:"RecordAuditEventResponse"}),c.Ik({error:c.Ik({code:c.Yj(),message:c.Yj(),details:c.L5().optional()})}).meta({id:"ErrorResponse"});let eB=c.k5(["user","project","local","plugin"]),e$=c.Ik({name:c.Yj().min(1),source:c.Yj().min(1),scope:eB,pluginName:c.Yj().optional(),version:c.Yj().optional(),description:c.Yj().optional(),updatedAt:d.w$().optional(),location:c.Yj().optional()}),eU=c.Ik({event:c.Yj().min(1),matcher:c.Yj().optional(),command:c.Yj().min(1),timeout:c.ai().optional(),scope:eB,pluginName:c.Yj().optional(),location:c.Yj().optional()}),eK=c.Ik({name:c.Yj().min(1),scope:eB,pluginName:c.Yj().optional(),marketplace:c.Yj().optional(),project:c.Yj().optional(),transport:c.Yj().min(1),command:c.Yj().optional(),url:c.Yj().optional(),envKeys:c.YO(c.Yj()).optional(),location:c.Yj().optional()}),eH=c.Ik({name:c.Yj().min(1),path:c.Yj().min(1),scope:eB,kind:c.Yj().min(1),detail:c.Yj().optional(),entryCount:c.ai().optional(),updatedAt:d.w$().optional()});c.Ik({scannedAt:d.w$(),skills:c.YO(e$),hooks:c.YO(eU),mcpServers:c.YO(eK),configFiles:c.YO(eH),errors:c.YO(c.Ik({source:c.Yj(),reason:c.Yj()}))});let eZ=c.Ik({ruleId:c.Yj().min(1),version:c.Yj().min(1),span:h,maskedMatch:c.Yj(),actionTaken:u,confidence:c.ai().min(0).max(1)});c.Ik({items:c.YO(D),scanEvent:E,definitions:c.YO(P).optional(),findings:c.YO(eZ).optional()});let eW=c.Yj().regex(/^[a-z][a-z0-9-]*$/),eG=c.Yj().regex(/^[a-z][a-z0-9-]*$/),eq=c.Yj().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?$/),eJ=c.k5(["labs","user","org"]),eX=c.k5(["library"]).meta({id:"OriginEnum"}),eQ=c.k5(["all","library","custom","customized","updates"]),e0=c.k5(["new","imported","update"]).meta({id:"LibraryStateEnum"}),e1=c.Ik({all:c.ai().int().nonnegative(),library:c.ai().int().nonnegative(),custom:c.ai().int().nonnegative(),customized:c.ai().int().nonnegative(),updates:c.ai().int().nonnegative()}).meta({id:"DetectionCounts"}),e2=c.Ik({id:c.Yj(),name:c.Yj(),version:eq,enabled:c.zM(),origin:eX,publisher:eW.optional(),publisherKind:eJ.optional(),ruleCount:c.ai().int().nonnegative(),namespace:eW,packId:eG,policyId:c.Yj().optional(),latestVersion:eq.optional()}).meta({id:"DetectionListItem"});c.Ik({counts:e1,items:c.YO(e2)}).meta({id:"ListDetectionsResponse"}),c.Ik({filter:eQ.optional().default("all"),q:c.Yj().optional()}),c.Ik({detections:c.ai().int().nonnegative(),rules:c.ai().int().nonnegative(),active:c.ai().int().nonnegative(),findingsLast30d:c.ai().int().nonnegative()}).meta({id:"DetectionStats"});let e5=c.Ik({id:c.Yj(),name:c.Yj(),category:m,severity:p,matcher:ew}).meta({id:"DetectionRule"}),e3=c.Ik({available:c.zM(),latestVersion:eq,latestRuleCount:c.ai().int().nonnegative().optional()}).nullable().meta({id:"DetectionUpdate"});c.Ik({id:c.Yj(),name:c.Yj(),version:eq,enabled:c.zM(),origin:eX,publisher:eW.optional(),publisherKind:eJ.optional(),ruleCount:c.ai().int().nonnegative(),namespace:eW,packId:eG,description:c.Yj().optional(),editedAt:d.w$(),findingsLast30d:c.ai().int().nonnegative(),latestVersion:eq.nullable().optional(),update:e3,rules:c.YO(e5),modified:c.zM(),policyId:c.Yj().optional()}).meta({id:"DetectionDetail"});let e4=c.Ik({id:c.Yj(),name:c.Yj(),publisher:eW,publisherKind:eJ.optional(),category:m.optional(),version:eq,ruleCount:c.ai().int().nonnegative(),description:c.Yj().optional(),updatedAt:d.w$(),state:e0,importedAs:c.Yj().nullable()}).meta({id:"LibraryItem"});c.Ik({categories:c.YO(m),items:c.YO(e4)}).meta({id:"ListLibraryResponse"}),c.Ik({libraryId:c.Yj().refine(e=>/^[^/]+\/[^/]+$/.test(e),{message:"libraryId must be in namespace/packId format"})}).meta({id:"ImportDetectionRequest"}),new WeakMap,new WeakMap;let e6=c.Ik({id:c.Os(),namespace:eW,packId:eG,version:eq,name:c.Yj(),enabled:c.zM().default(!0),policyId:c.Yj().optional()}).meta({id:"InstalledPack"});c.Ik({namespace:eW,packId:eG,version:eq}).meta({id:"InstallPackRequest"}),c.Ik({items:c.YO(e6)}).meta({id:"ListInstalledPacksResponse"}),c.Ik({enabled:c.zM().optional(),policyId:c.Yj().nullable().optional()}).refine(e=>Object.keys(e).some(t=>void 0!==e[t]),{message:"At least one field must be provided"}).meta({id:"PatchInstalledPackRequest"});let e8=c.k5(["standalone"]),e7=c.k5(["redact","warn"]),e9=c.k5(["full","session-only"]);c.Ik({specVersion:c.ai().int().positive().default(2),runMode:c.vk(e=>"attached"===e?"standalone":e,e8.default("standalone")),policy:e7.default("redact"),historicalAccess:e9.default("session-only"),onboardedAt:d.w$().optional()});let te=c.Ik({path:c.Yj().min(1),name:c.Yj().min(1),origin:et,defaultAccess:ee});c.Ik({files:c.YO(te),truncated:c.zM(),scannedAt:c.Yj()});let tt=["7d","30d","3m","6m"],ts=c.k5(tt).meta({id:"TimeRange"}),ta="7d";ts.catch(ta);let tn=c.k5(["still-valid","unknown","invalid"]),ti=c.Ik({filePath:c.Yj(),span:h.optional()}).strict(),tl=c.Ik({provider:c.Yj(),maskedToken:c.Yj(),where:ti,state:tn,observedAt:d.w$().optional()}).strict();c.Ik({provider:c.Yj(),maskedToken:c.Yj(),consolePath:c.Yj(),occurrenceSpread:c.ai().int().positive()}).strict();let tr=c.k5(["redact-rotation-checklist","redact-only","set-secret-redact","leave"]),to=c.k5(["first-run","pre-push","secret-scan"]);c.Ik({entrySource:to}).strict();let tc=c.Ik({id:tr,label:c.Yj()}),td=c.Ik({kind:c.eu("decision"),entrySource:to,secretCount:c.ai().int().positive(),prompt:c.Yj(),options:c.PV([tc.extend({id:c.eu("redact-rotation-checklist")}),tc.extend({id:c.eu("redact-only")}),tc.extend({id:c.eu("set-secret-redact")}),tc.extend({id:c.eu("leave")})])}),tx=c.Ik({kind:c.eu("no-decision")});c.gM("kind",[td,tx]),c.Ik({rules:c.YO(eA).min(1).max(100),text:c.Yj().max(5e4).optional(),fixtures:c.YO(ez).max(200).optional()}).refine(e=>{var t,s;return void 0!==e.text||(null!=(s=null==(t=e.fixtures)?void 0:t.length)?s:0)>0},{message:"Provide `text`, `fixtures`, or both — there must be something to test"}).meta({id:"TestRulesRequest"});let tm=c.Ik({ruleId:c.Yj(),category:m,severity:p,span:h,confidence:c.ai().min(0).max(1),match:c.Yj()}).meta({id:"RuleTestMatch"}),tp=c.Ik({label:c.Yj(),shouldMatch:c.zM(),didMatch:c.zM(),passed:c.zM(),matches:c.YO(tm)}).meta({id:"FixtureResult"});c.Ik({adhoc:c.Ik({matches:c.YO(tm)}).optional(),fixtures:c.YO(tp),summary:c.Ik({total:c.ai().int().nonnegative(),passed:c.ai().int().nonnegative(),failed:c.ai().int().nonnegative()}),unsupportedRuleIds:c.YO(c.Yj())}).meta({id:"TestRulesResponse"});let tu=c.Ik({severity:p,count:c.ai().int().nonnegative(),caught:c.ai().int().nonnegative().optional(),openAtRest:c.ai().int().nonnegative().optional()}).meta({id:"SeveritySummaryItem"});c.Ik({total:c.ai().int().nonnegative(),needsRemediation:c.ai().int().nonnegative().optional(),bySeverity:c.YO(tu)}).meta({id:"SeveritySummaryResponse"}),c.Ik({range:c.k5(tt).default(ta)});let th=c.k5(["blocked","redacted","warned"]).meta({id:"EnforcementActionKind"}),tj=c.Ik({kind:th,count:c.ai().int().nonnegative(),delta:c.ai().int()}).meta({id:"EnforcementAction"});c.Ik({range:ts,total:c.ai().int().nonnegative(),actions:c.YO(tj)}).meta({id:"EnforcementActionsResponse"});let tf=c.k5(["day","week"]).meta({id:"TimeseriesGranularity"}),tg=c.Ik({timestamp:d.p6(),critical:c.ai().int().nonnegative(),high:c.ai().int().nonnegative(),medium:c.ai().int().nonnegative()}).meta({id:"FindingsTimeseriesPoint"});c.Ik({range:ts,granularity:tf,points:c.YO(tg)}).meta({id:"FindingsTimeseriesResponse"});let tv=c.Ik({timestamp:d.p6(),bySeverity:c.Ik({critical:c.ai().nonnegative().nullable(),high:c.ai().nonnegative().nullable(),medium:c.ai().nonnegative().nullable(),low:c.ai().nonnegative().nullable()})}).meta({id:"MttrTrendPoint"});c.Ik({range:ts,granularity:tf,points:c.YO(tv)}).meta({id:"MttrTrendResponse"});let tb=c.Ik({findingKey:c.Yj(),ruleId:c.Yj(),severity:p,path:c.Yj(),resolvedAt:d.w$(),detectedAt:d.w$()}).meta({id:"ResolvedFeedItem"});c.Ik({items:c.YO(tb)}).meta({id:"RecentlyResolvedResponse"});let tk=["repo","user"],tN=c.k5(tk).meta({id:"SourceKind"}),ty=c.Ik({id:c.Yj(),name:c.Yj(),kind:tN,findingsCount:c.ai().int().nonnegative()}).meta({id:"TopSource"});c.Ik({range:ts,items:c.YO(ty)}).meta({id:"TopSourcesResponse"}),c.Ik({range:c.k5(tt).default(ta),limit:x.ai().int().min(1).max(50).default(5),kind:c.k5(tk).optional()});let tw=c.k5(["claudecode","cursor","codex","chatgpt","copilot","api"]).meta({id:"Provider"}),tY=c.Ik({provider:tw,coverage:c.ai().int().min(0).max(100),supported:c.zM()}).meta({id:"ScanCoverageProvider"});c.Ik({range:ts,providers:c.YO(tY)}).meta({id:"ScanCoverageResponse"});let tC=c.k5(["repo","user","team","policy","share","rule"]).meta({id:"SubjectType"}),tI=c.Ik({type:tC,id:c.Yj(),label:c.Yj()}).meta({id:"RecommendationSubject"}),tz=c.k5(["apply","navigate"]).meta({id:"RecommendationActionMode"}),tA=c.Ik({mode:tz,type:c.Yj(),label:c.Yj(),href:c.Yj().optional(),policyId:c.Yj().optional(),teamId:c.Yj().optional()}).meta({id:"RecommendationAction"}),tS=c.Ik({id:c.Yj(),category:c.Yj(),severity:p,title:c.Yj(),description:c.Yj(),subjects:c.YO(tI),action:tA}).meta({id:"RecommendedAction"});c.Ik({items:c.YO(tS)}).meta({id:"RecommendedActionsResponse"}),c.Ik({limit:x.ai().int().min(1).max(20).default(3)});let tM=c.Ik({type:c.Yj(),policyId:c.Yj().optional(),teamId:c.Yj().optional()}).meta({id:"AppliedAction"});c.Ik({id:c.Yj(),status:c.eu("applied"),appliedAction:tM}).meta({id:"ApplyRecommendedActionResponse"}),c.Ik({id:c.Yj(),status:c.eu("dismissed")}).meta({id:"DismissRecommendedActionResponse"}),c.Ik({id:c.Yj()}),c.Ik({ruleId:c.Yj(),category:m,severity:p,maskedMatch:c.Yj(),rawMatch:c.Yj(),context:c.Yj(),filePath:c.Yj().optional(),confidence:c.ai().min(0).max(1),id:c.Yj().optional(),valueFingerprint:c.Yj().optional(),keyVersion:c.ai().int().nonnegative().optional()});let tR=c.Ik({category:m,action:eP,reasoning:c.Yj(),genuineCount:c.ai().int().nonnegative(),fpCount:c.ai().int().nonnegative(),fpIds:c.YO(c.Yj())});c.Ik({perCategory:c.YO(tR),notes:c.Yj()});let tO=c.Ik({total:c.ai().int().nonnegative(),important:c.ai().int().nonnegative(),routine:c.ai().int().nonnegative()}).refine(e=>e.total===e.important+e.routine,{message:"total must equal important + routine",path:["total"]}),tL=c.Ik({ruleId:c.Yj(),category:m,valueFingerprint:c.Yj(),keyVersion:c.ai().int().nonnegative()}),tD=c.Ik({pattern:c.Yj(),count:c.ai().int().nonnegative(),values:c.YO(tL).min(1)}),tT=c.Ik({category:m,count:c.ai().int().nonnegative(),egress:c.zM()}),tE=c.Ik({counts:tO,routineCategories:c.YO(m),surfacedCategories:c.YO(m),findingKinds:c.YO(tT),posture:c.g1(m,eP),maskedFindings:c.YO(tl).optional(),falsePositivePatterns:c.YO(tD).optional()}),tP=tR.pick({category:!0,genuineCount:!0,fpCount:!0}).extend({egress:c.zM()});c.Ik({categories:c.YO(tP),posture:c.g1(m,eP)}),c.Ik({frame:tE,copy:c.Yj()}),c.k5(["scan","floor"]);let tF=c.Ik({id:c.k5(["enter-remediation","open-dashboard","not-now"]),label:c.Yj()}),tV=c.PV([tF.extend({id:c.eu("open-dashboard")}),tF.extend({id:c.eu("not-now")})]),t_=c.PV([tF.extend({id:c.eu("enter-remediation")}),tF.extend({id:c.eu("open-dashboard")}),tF.extend({id:c.eu("not-now")})]);c.Ik({worthALook:c.ai().int().nonnegative(),liveKeys:c.ai().int().nonnegative().optional(),options:c.KC([tV,t_])}).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 tB=c.k5(["provider","internal","ip"]).meta({id:"DestinationKind"}),t$=c.k5(["https","http","sftp","grpc","smtp"]).meta({id:"Transport"}),tU=c.k5(["secrets","pii","customer","source","telemetry","logs","metrics","none"]).meta({id:"DataClass"});tU.options;let tK=c.k5(["recognized","internal","unverified","ip"]).meta({id:"ShareTrustLevel"}),tH=c.k5(["allow","block"]).meta({id:"EgressDecision"}),tZ=c.k5(["allowed","blocked","review"]).meta({id:"EgressStatus"}),tW=c.k5(["raw_ip","unverified_domain","plaintext_transport"]).meta({id:"ReviewReason"}),tG=c.k5(["GET","POST","PUT","DELETE"]).meta({id:"HttpMethod"}),tq=c.Ik({needsReview:c.zM(),reasons:c.YO(tW)}).meta({id:"ReviewInfo"}),tJ=c.Ik({port:c.ai().int().nullable(),geo:c.Yj().nullable(),ptr:c.Yj().nullable()}).meta({id:"DestinationNetwork"}),tX=c.Ik({id:c.Yj(),method:tG,transport:t$,url:c.Yj(),template:c.zM(),dataClass:tU,lastSeen:d.w$(),callSiteCount:c.ai().int().nonnegative()}).meta({id:"EndpointSummary"}),tQ=c.Ik({id:c.Yj(),project:c.Yj(),file:c.Yj(),line:c.ai().int().nonnegative(),snippet:c.Yj(),dynamic:c.zM(),vendored:c.zM(),projectId:c.Yj().nullable()}).meta({id:"CallSite"}),t0=tX.extend({sites:c.YO(tQ)}).meta({id:"EndpointWithSites"}),t1=c.Ik({id:c.Yj(),kind:tB,name:c.Yj(),host:c.Yj(),category:c.Yj(),trust:tK,status:tZ,isCustom:c.zM(),lastSeen:d.w$(),endpointCount:c.ai().int().nonnegative(),callSiteCount:c.ai().int().nonnegative(),transports:c.YO(t$),dataClasses:c.YO(tU),review:tq,network:tJ.nullable(),endpoints:c.YO(tX)}).meta({id:"ShareDestinationSummary"});t1.omit({endpointCount:!0,callSiteCount:!0,endpoints:!0}).extend({note:c.Yj().nullable(),endpoints:c.YO(t0)}).meta({id:"ShareDestinationDetail"});let t2=c.Ik({id:c.Yj(),kind:tB,name:c.Yj(),host:c.Yj(),trust:tK,status:tZ,review:tq,topDataClass:tU,callSiteCount:c.ai().int().nonnegative(),lastSeen:d.w$()}).meta({id:"ReviewDestination"}),t5=c.Ik({kind:tB,total:c.ai().int().nonnegative(),items:c.YO(t1)}).meta({id:"ShareDestinationGroup"});c.Ik({groups:c.YO(t5)}).meta({id:"ListShareDestinationsResponse"}),c.Ik({items:c.YO(t2)}).meta({id:"NeedsReviewResponse"}),c.Ik({destinations:c.ai().int().nonnegative(),endpoints:c.ai().int().nonnegative(),callSites:c.ai().int().nonnegative(),needsReview:c.ai().int().nonnegative(),insecure:c.ai().int().nonnegative(),byKind:c.Ik({provider:c.ai().int().nonnegative(),internal:c.ai().int().nonnegative(),ip:c.ai().int().nonnegative()}),byTrust:c.Ik({recognized:c.ai().int().nonnegative(),internal:c.ai().int().nonnegative(),unverified:c.ai().int().nonnegative(),ip:c.ai().int().nonnegative()})}).meta({id:"SharesStats"}),c.Ik({decision:tH.nullable()}).meta({id:"SetEgressDecisionBody"}),c.Ik({destination:t1}).meta({id:"SetEgressDecisionResponse"}),c.Ik({q:c.Yj().optional(),kind:c.YO(tB).optional(),groupBy:c.k5(["destination"]).default("destination"),review:c.uE().default(!1)}),c.Ik({format:c.k5(["csv","json"]).default("csv"),q:c.Yj().optional(),kind:c.YO(tB).optional()})},8519:(e,t,s)=>{s.d(t,{T:()=>o,_:()=>c});var a=s(2330),n=s(8726),i=s(7581),l=s(8810);let r="rounded-full border-transparent px-2.5 text-xs [&_svg]:size-3.5";function o(e){let{action:t}=e,s=l.Lp[t],i=s.icon;return(0,a.jsx)(n.vw,{icon:(0,a.jsx)(i,{}),className:(0,n.cn)(r,s.className),children:s.label})}function c(e){let{aggregateAction:t}=e;return t?(0,a.jsx)(o,{action:t}):(0,a.jsx)(n.vw,{icon:(0,a.jsx)(i.mL,{}),className:(0,n.cn)(r,"bg-surface-3 text-text-2"),children:"Mixed"})}},8553:(e,t,s)=>{s.d(t,{K:()=>i});let a=new Intl.RelativeTimeFormat("en",{numeric:"auto"}),n=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]];function i(e){if(!e)return"";let t=Date.parse(e);if(Number.isNaN(t))return"";let s=(t-Date.now())/1e3,i=Math.abs(s);if(i<45)return"just now";for(let[e,t]of n)if(i>=t)return a.format(Math.round(s/t),e);return"just now"}},8726:(e,t,s)=>{s.d(t,{Ex:()=>c,$n:()=>u,Zp:()=>h,X9:()=>k,Wu:()=>N,BT:()=>b,aR:()=>j,Lc:()=>g,AG:()=>f,ZB:()=>v,lG:()=>w,R4:()=>I,Cf:()=>Y,rr:()=>A,Es:()=>S,c7:()=>C,L3:()=>z,rI:()=>O,hO:()=>F,SQ:()=>E,Hr:()=>D,Ht:()=>P,mB:()=>V,ty:()=>L,pd:()=>_,AM:()=>$,hl:()=>K,Wv:()=>U,Iz:()=>Z,tR:()=>W,l6:()=>q,gC:()=>et,eb:()=>es,bq:()=>ee,yv:()=>J,Pt:()=>x,cj:()=>ei,h:()=>el,Fm:()=>er,qp:()=>eo,EA:()=>ec,dO:()=>ex,XI:()=>em,BF:()=>eu,nA:()=>ef,nd:()=>ej,A0:()=>ep,Hj:()=>eh,vw:()=>eg,cn:()=>r});var a=s(2330),n=s(3939),i=s(7515);let l=(0,s(3567).zu)({extend:{classGroups:{"font-size":[{text:["ui","label"]}]}}});function r(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return l((0,i.$)(t))}let o=(0,n.F)("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{default:"bg-surface-3 text-text-2",outline:"border border-border text-text-2",critical:"bg-sev-critical-fill text-sev-critical",high:"bg-sev-high-fill text-sev-high",medium:"bg-sev-medium-fill text-sev-medium",low:"bg-sev-low-fill text-sev-low",success:"bg-ok-fill text-ok",teal:"bg-teal-fill text-teal",primary:"bg-primary-tint text-primary"}},defaultVariants:{variant:"default"}});function c(e){let{variant:t,className:s,children:n}=e;return(0,a.jsx)("span",{className:r(o({variant:t}),s),children:n})}let d={critical:"bg-sev-critical",high:"bg-sev-high",medium:"bg-sev-medium",low:"bg-sev-low"};function x(e){let{severity:t}=e;return(0,a.jsxs)(c,{variant:t,className:"h-6",children:[(0,a.jsx)("span",{className:r("size-1.5 rounded-full",d[t])}),(0,a.jsx)("span",{className:"capitalize",children:t})]})}var m=s(8702);let p=(0,n.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 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 text-text-inv 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 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 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 hover:underline"}],defaultVariants:{variant:"solid",tone:"neutral",size:"md"}});function u(e){let{className:t,variant:s,tone:n,size:i,asChild:l=!1,type:o,...c}=e,d=l?m.DX:"button";return(0,a.jsx)(d,{className:r(p({variant:s,tone:n,size:i}),t),...l?{}:{type:null!=o?o:"button"},...c})}function h(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card",className:r("rounded-xl border border-border bg-surface",t),...s})}function j(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-header",className:r("flex items-center gap-3 px-5 pt-5",t),...s})}function f(e){let{className:t,...s}=e;return(0,a.jsx)("span",{"data-slot":"card-icon",className:r("flex size-7.5 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-text-2",t),...s})}function g(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-heading",className:r("min-w-0",t),...s})}function v(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-title",className:r("text-sm font-semibold text-text",t),...s})}function b(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-description",className:r("text-xs text-text-3",t),...s})}function k(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-action",className:r("ml-auto flex items-center",t),...s})}function N(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"card-content",className:r("p-5",t),...s})}var y=s(523);let w=y.Root;function Y(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(y.Portal,{children:[(0,a.jsx)(y.Overlay,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-50 bg-ink/40"}),(0,a.jsx)(y.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),...n,children:s})]})}function C(e){let{className:t,...s}=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),...s})}function I(e){let{className:t,...s}=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),...s})}function z(e){let{className:t,...s}=e;return(0,a.jsx)(y.Title,{"data-slot":"dialog-title",className:r("font-display text-base font-semibold text-text",t),...s})}function A(e){let{className:t,...s}=e;return(0,a.jsx)(y.Description,{"data-slot":"dialog-description",className:r("text-xs text-text-3",t),...s})}function S(e){let{className:t,...s}=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),...s})}y.Trigger,y.Close;var M=s(3319);function R(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 O=M.Root,L=M.Trigger;M.Group;let D=M.RadioGroup,T="flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-1.5 text-sm text-text-2 outline-none focus:bg-surface-2 focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50";function E(e){let{className:t,sideOffset:s=6,...n}=e;return(0,a.jsx)(M.Portal,{children:(0,a.jsx)(M.Content,{sideOffset:s,className:r("z-50 min-w-32 overflow-hidden rounded-lg border border-border bg-surface p-1 shadow-lg",t),...n})})}function P(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(M.RadioItem,{className:r(T,"data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...n,children:[(0,a.jsx)("span",{className:"flex-1",children:s}),(0,a.jsx)(M.ItemIndicator,{children:(0,a.jsx)(R,{className:"size-4 text-primary"})})]})}function F(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(M.CheckboxItem,{className:r(T,"group data-[state=checked]:font-semibold data-[state=checked]:text-text",t),...n,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 group-data-[state=checked]:bg-primary",children:(0,a.jsx)(M.ItemIndicator,{children:(0,a.jsx)(R,{className:"size-3"})})}),(0,a.jsx)("span",{className:"flex-1",children:s})]})}function V(e){let{className:t,...s}=e;return(0,a.jsx)(M.Separator,{className:r("-mx-1 my-1 h-px bg-border",t),...s})}function _(e){let{className:t,type:s="text",...n}=e;return(0,a.jsx)("input",{type:s,"data-slot":"input",className:r("h-9 w-full rounded-lg border border-border bg-surface px-3 text-sm text-text","truncate placeholder:text-text-3 transition-colors","focus:border-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40","disabled:cursor-not-allowed disabled:opacity-50",t),...n})}var B=s(1328);let $=B.Root,U=B.Trigger;function K(e){let{className:t,align:s="start",sideOffset:n=6,collisionPadding:i=8,...l}=e;return(0,a.jsx)(B.Portal,{children:(0,a.jsx)(B.Content,{align:s,sideOffset:n,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})})}B.Close,B.Anchor;var H=s(6179);function Z(e){let{className:t,...s}=e;return(0,a.jsx)(H.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),...s})}function W(e){let{className:t,...s}=e;return(0,a.jsx)(H.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),...s})}var G=s(6388);let q=G.Root;G.Group;let J=G.Value;function X(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 Q(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 ee(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(G.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 bg-surface px-3 text-sm text-text","transition-colors focus:border-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40","data-[placeholder]:text-text-3 disabled:cursor-not-allowed disabled:opacity-50","[&>span]:truncate",t),...n,children:[s,(0,a.jsx)(G.Icon,{asChild:!0,children:(0,a.jsx)(X,{className:"size-4 shrink-0 text-text-3"})})]})}function et(e){let{className:t,children:s,position:n="popper",sideOffset:i=6,...l}=e;return(0,a.jsx)(G.Portal,{children:(0,a.jsxs)(G.Content,{"data-slot":"select-content",position:n,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"===n&&"w-(--radix-select-trigger-width)",t),...l,children:[(0,a.jsx)(ea,{}),(0,a.jsx)(G.Viewport,{className:"p-1",children:s}),(0,a.jsx)(en,{})]})})}function es(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(G.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),...n,children:[(0,a.jsx)(G.ItemText,{children:s}),(0,a.jsx)("span",{className:"absolute right-2.5 flex items-center",children:(0,a.jsx)(G.ItemIndicator,{children:(0,a.jsx)(Q,{className:"size-4 text-primary"})})})]})}function ea(e){let{className:t,...s}=e;return(0,a.jsx)(G.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:r("flex cursor-default items-center justify-center py-1 text-text-3",t),...s,children:(0,a.jsx)(X,{className:"size-4 rotate-180"})})}function en(e){let{className:t,...s}=e;return(0,a.jsx)(G.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:r("flex cursor-default items-center justify-center py-1 text-text-3",t),...s,children:(0,a.jsx)(X,{className:"size-4"})})}let ei=y.Root;function el(e){let{className:t,children:s,...n}=e;return(0,a.jsxs)(y.Portal,{children:[(0,a.jsx)(y.Overlay,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-40 bg-ink/40 backdrop-blur-[1px]"}),(0,a.jsxs)(y.Content,{"data-slot":"sheet-content",className:r("fixed inset-y-0 right-0 z-50 flex h-full w-full max-w-md flex-col gap-4 overflow-y-auto border-l border-border bg-surface p-6 shadow-lg outline-none",t),...n,children:[s,(0,a.jsxs)(y.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 er(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1 pr-8",t),...s})}function eo(e){let{className:t,...s}=e;return(0,a.jsx)(y.Title,{"data-slot":"sheet-title",className:r("font-display text-lg font-semibold text-text",t),...s})}function ec(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:r("animate-pulse rounded-md bg-surface-3",t),...s})}y.Trigger,y.Close;var ed=s(9822);function ex(e){let{className:t,...s}=e;return(0,a.jsx)(ed.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),...s,children:(0,a.jsx)(ed.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4.5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"})})}function em(e){let{className:t,...s}=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),...s})})}function ep(e){let{className:t,...s}=e;return(0,a.jsx)("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b [&_tr]:border-border",t),...s})}function eu(e){let{className:t,...s}=e;return(0,a.jsx)("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",t),...s})}function eh(e){let{className:t,...s}=e;return(0,a.jsx)("tr",{"data-slot":"table-row",className:r("border-b border-text/6 transition-colors",t),...s})}function ej(e){let{scope:t="col",className:s,...n}=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",s),...n})}function ef(e){let{className:t,...s}=e;return(0,a.jsx)("td",{"data-slot":"table-cell",className:r("px-3 py-2 align-middle",t),...s})}function eg(e){let{children:t,icon:s,dot:n,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:[n&&(0,a.jsx)("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:n}}),s,t]})}},8810:(e,t,s)=>{s.d(t,{B5:()=>p,EQ:()=>j,Lp:()=>d,ei:()=>h,gh:()=>i,i9:()=>c,nU:()=>m,oC:()=>n,xE:()=>x,y7:()=>o,zq:()=>u});var a=s(7581);let n=["critical","high","medium","low"],i={secret:"Secret",pii:"PII",source_code:"Source code",external_share:"External share",mcp_server:"MCP server",customer_data:"Customer data",financial:"Financial",phi:"PHI",custom:"Custom"},l={secret:a.RY,pii:a.ny,source_code:a.lo,external_share:a._G,mcp_server:a.RR,customer_data:a.bN,financial:a.bN,phi:a.ny,custom:a.RY},r={secret:"bg-sev-critical-fill text-sev-critical",pii:"bg-sev-low-fill text-sev-low",source_code:"bg-violet-fill text-violet",external_share:"bg-teal-fill text-teal",mcp_server:"bg-sev-high-fill text-sev-high",customer_data:"bg-sev-high-fill text-sev-high",financial:"bg-sev-high-fill text-sev-high",phi:"bg-sev-low-fill text-sev-low",custom:"bg-surface-2 text-text-2"},o=l,c=e=>{var t;return null!=(t=r[e])?t:"bg-surface-2 text-text-2"},d={blocked:{label:"Blocked",icon:a.pD,className:"bg-sev-critical-fill text-sev-critical"},redacted:{label:"Redacted",icon:a.jZ,className:"bg-primary-tint text-primary"},warned:{label:"Warned",icon:a._0,className:"bg-sev-high-fill text-sev-high"},allowed:{label:"Allowed",icon:a.Sr,className:"bg-ok-fill text-ok"},monitored:{label:"Monitored",icon:a.bM,className:"bg-surface-3 text-text-2"},quarantined:{label:"Quarantined",icon:a.lm,className:"bg-sev-critical-fill text-sev-critical"}};function x(e){return e.file?e.file:e.toolName?"via ".concat(e.toolName):"—"}let m=[{id:"severity",header:"Severity"},{id:"subtype",header:"Type"},{id:"sources",header:"Sources"},{id:"locations",header:"Locations"},{id:"action",header:"Action"},{id:"status",header:"Status"},{id:"latest",header:"Latest"}],p={open:{label:"Open",badge:"high"},handled:{label:"Handled",badge:"primary"},resolved:{label:"Resolved",badge:"success"},dismissed:{label:"Dismissed",badge:"default"}},u=[{value:"all",label:"All"},{value:"open",label:"Open"},{value:"handled",label:"Handled"},{value:"resolved",label:"Resolved"},{value:"dismissed",label:"Dismissed"}];function h(e,t){return t&&"all"!==t?e.filter(e=>e.status===t):e}function j(e,t){return t&&"all"!==t?e.filter(e=>e.status===t):e}},8885:(e,t,s)=>{s.d(t,{UpdateModal:()=>r});var a=s(2330),n=s(8726),i=s(7581),l=s(2769);function r(e){var t,s,r,o,c,d,x;let{det:m,isUpdating:p,onClose:u,onConfirm:h}=e,j=m?null!=(o=null!=(r=null==(t=m.update)?void 0:t.latestVersion)?r:m.latestVersion)?o:m.version:"",f=null==m||null==(s=m.update)?void 0:s.latestRuleCount,g=!!m&&j!==m.version;return(0,a.jsx)(n.lG,{open:!!m,onOpenChange:e=>{e||u()},children:(0,a.jsx)(n.Cf,{className:"w-155 max-w-[96vw]","aria-describedby":void 0,children:m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.L3,{className:"sr-only",children:["Update \xb7 ",m.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",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 “",m.name,"”"]}),(0,a.jsxs)("div",{className:"text-xs text-text-3",children:["From the detection library \xb7 ",null!=(c=m.publisher)?c:m.namespace]})]}),(0,a.jsx)(n.$n,{variant:"ghost",tone:"neutral",size:"icon",onClick:u,"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:g?"v".concat(m.version):"".concat(String(m.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",children:g?"v".concat(j):"".concat(String(null!=f?f:m.ruleCount)," rules")}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(l.Jk,{publisher:null!=(d=m.publisher)?d:m.namespace,kind:null!=(x=m.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"}),(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)(n.$n,{variant:"outline",tone:"neutral",onClick:u,children:"Cancel"}),(0,a.jsxs)(n.$n,{variant:"solid",tone:"primary",disabled:p,onClick:()=>{h(m.id)},children:[(0,a.jsx)(i.s3,{"aria-hidden":!0,focusable:!1,className:"size-4"}),p?"Updating…":g?"Update to v".concat(j):"Update rules"]})]})]})})})}},9102:(e,t,s)=>{s.d(t,{MttrTrendCardView:()=>x});var a=s(2330),n=s(8726),i=s(1252),l=s(4127),r=s(7581);function o(e){if(null===e||Number.isNaN(e))return"—";let t=Math.round(Math.max(0,e)/6e4),s=Math.floor(t/1440),a=Math.floor((t-=24*s*60)/60);return(t-=60*a,s>0)?a>0?"".concat(String(s),"d ").concat(String(a),"h"):"".concat(String(s),"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 c=s(3439);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){var t;let{points:s,isLoading:i,error:x}=e,m=s.every(e=>null===e.critical&&null===e.high&&null===e.medium&&null===e.low),p=s.map(e=>({label:e.label,critical:e.critical,high:e.high,medium:e.medium,low:e.low})),u=null!=(t=s.at(-1))?t:null;return(0,a.jsxs)(n.Zp,{className:"mt-4 shadow-sm xl:mt-5",children:[(0,a.jsxs)(n.aR,{children:[(0,a.jsx)(n.AG,{children:(0,a.jsx)(r.O4,{"aria-hidden":!0,focusable:!1,className:"size-4"})}),(0,a.jsxs)(n.Lc,{children:[(0,a.jsx)(n.ZB,{children:"Time to remediate"}),(0,a.jsx)(n.BT,{children:"Mean time from detection to resolution, by severity"})]}),(0,a.jsx)(n.X9,{className:"gap-3 text-xs text-text-2",children:d.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-xs",style:{background:e.color}}),e.label,u&&(0,a.jsx)("span",{className:"text-text-3",children:o(u[e.key])})]},e.key))})]}),(0,a.jsx)(n.Wu,{"aria-busy":i,className:"pb-2",children:x?(0,a.jsx)(c.rJ,{message:x}):i?(0,a.jsx)(n.EA,{className:"h-40 w-full"}):m?(0,a.jsx)(c.AW,{message:"No resolved findings in this range."}):(0,a.jsx)(l.AreaChart,{data:p,series:d,height:160,valueFormat:o})})]})}},9602:(e,t,s)=>{s.d(t,{T:()=>c});var a=s(2330),n=s(8726),i=s(1252),l=s(4127),r=s(7581);function o(e){let{label:t,tone:s="neutral",dir:i}=e,l="up"===i?r.Kp:"down"===i?r.ZL:null;return(0,a.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1 text-xs font-semibold","positive"===s?"text-ok":"negative"===s?"text-sev-critical":"text-text-3"),children:[l&&(0,a.jsx)(l,{"aria-hidden":!0,focusable:!1,className:"size-3"}),t]})}function c(e){let{icon:t,iconBg:s,iconColor:r,label:c,value:d,delta:x,spark:m,sparkColor:p,sparkLabels:u,sparkFormatValue:h,loading:j=!1}=e;return(0,a.jsxs)(n.Zp,{className:"flex flex-col gap-2.5 p-4.5 shadow-sm","aria-busy":j||void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"grid size-8.5 shrink-0 place-items-center rounded-lg",style:{background:s,color:r},children:(0,a.jsx)(t,{"aria-hidden":!0,focusable:!1,className:"size-4.5"})}),(0,a.jsx)("span",{className:"text-ui font-medium text-text-2",children:c})]}),j?(0,a.jsx)(n.EA,{className:"my-1 h-7 w-10"}):(0,a.jsxs)("div",{className:"flex items-end justify-between gap-2",children:[(0,a.jsx)("span",{className:"font-display text-3xl font-semibold leading-none tracking-[-0.03em] text-text",children:d}),x&&(0,a.jsx)(o,{...x})]}),m&&!j&&(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(l.Sparkline,{data:m,color:null!=p?p:i.l.primary,height:34,...u?{labels:u}:{},...h?{formatValue:h}:{}})})]})}},9912:(e,t,s)=>{s.d(t,{ActivityTokenUsageView:()=>x});var a=s(2330),n=s(8726),i=s(6146),l=s(7581),r=s(1236),o=s(7381);function c(){return(0,a.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-primary-tint text-primary",children:(0,a.jsx)(l.Uy,{"aria-hidden":!0,focusable:!1,className:"size-4"})})}function d(e){let{summary:t}=e;return(0,a.jsxs)(n.XI,{children:[(0,a.jsx)(n.A0,{children:(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nd,{children:"Provider"}),(0,a.jsx)(n.nd,{children:"Model"}),(0,a.jsx)(n.nd,{className:"text-right",children:"Input"}),(0,a.jsx)(n.nd,{className:"text-right",children:"Output"}),(0,a.jsx)(n.nd,{className:"text-right",children:"Cache"}),(0,a.jsx)(n.nd,{className:"text-right",children:"Total"}),(0,a.jsx)(n.nd,{className:"text-right",children:"Cost"})]})}),(0,a.jsx)(n.BF,{children:t.models.map(e=>(0,a.jsxs)(n.Hj,{children:[(0,a.jsx)(n.nA,{className:"text-text-2",children:e.provider}),(0,a.jsx)(n.nA,{className:"font-mono text-text",children:e.model}),(0,a.jsx)(n.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.inputTokens)}),(0,a.jsx)(n.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.outputTokens)}),(0,a.jsx)(n.nA,{className:"text-right tabular-nums text-text-2",children:(0,o.Sk)(e.cacheTokens)}),(0,a.jsx)(n.nA,{className:"text-right font-semibold tabular-nums text-text",children:(0,o.Sk)(e.totalTokens)}),(0,a.jsx)(n.nA,{className:"text-right tabular-nums text-text",children:null!==e.estimatedCostUsd?(0,o.UK)(e.estimatedCostUsd):"—"})]},"".concat(e.provider," ").concat(e.model)))})]})}function x(e){let{summary:t,isLoading:s,error:x,rangeLabel:m}=e,[p,u]=(0,i.useState)(!1);if(x)return(0,a.jsx)(n.Zp,{className:"mb-3.5 shrink-0 px-5 py-3.5 shadow-sm",children:(0,a.jsx)(r.r,{message:x})});if(s&&!t)return(0,a.jsxs)(n.Zp,{className:"mb-3.5 flex shrink-0 items-center gap-2.5 px-5 py-3.5 shadow-sm","aria-busy":!0,children:[(0,a.jsx)(n.EA,{className:"size-8 shrink-0 rounded-lg"}),(0,a.jsx)(n.EA,{className:"h-5 w-64"})]});if(!(null!==t&&t.models.length>0))return(0,a.jsxs)(n.Zp,{className:"mb-3.5 flex shrink-0 items-center gap-2.5 px-5 py-3.5 shadow-sm",children:[(0,a.jsx)(c,{}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-ui font-semibold text-text",children:"Token usage"}),(0,a.jsx)("div",{className:"text-xs text-text-3",children:"No token usage recorded yet — sessions are reconciled as you work."})]})]});let h="".concat(String(t.sessionCount)," session").concat(1===t.sessionCount?"":"s"),j=(0,o.xd)(t.estimatedCostUsd,t.costIsPartial);return(0,a.jsxs)(n.Zp,{className:"mb-3.5 shrink-0 overflow-hidden shadow-sm",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{u(e=>!e)},"aria-expanded":p,"aria-controls":"activity-token-usage-body",className:"flex w-full cursor-pointer items-center gap-2.5 px-5 py-3.5 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)(c,{}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,a.jsx)("span",{className:"text-ui font-semibold text-text",children:"Token usage"}),m&&(0,a.jsxs)("span",{className:"text-xs text-text-3",children:["\xb7 ",m]})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2.5 gap-y-0.5 text-xs text-text-3",children:[(0,a.jsx)("span",{children:h}),(0,a.jsx)("span",{className:"text-border-strong",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",{className:"text-border-strong",children:"\xb7"}),(0,a.jsx)("span",{className:"font-semibold tabular-nums text-text-2",children:j})]})]}),(0,a.jsx)(l.D3,{"aria-hidden":!0,focusable:!1,className:(0,n.cn)("size-4 shrink-0 text-text-3 transition-transform",p&&"rotate-180")})]}),p&&(0,a.jsxs)("div",{id:"activity-token-usage-body",className:"max-h-64 overflow-y-auto border-t border-border px-2 py-2",children:[(0,a.jsx)(d,{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."})]})]})}}}]);
|