import{r as l,k as e}from"./index-BVfpSx5Q.js";import{L as u}from"./layout-NiehYZnq.js";import{P as m,K as a,S as g,C as b,d as h,f as v}from"./ui-DGkmnhL-.js";import{B as o,A as y}from"./hatunDoctrine-Cq1LMtli.js";const i={sycophancy:"Sycophancy","covert-self-preservation":"Covert Self-Preservation","deceptive-helpfulness":"Deceptive Helpfulness","tool-misuse":"Tool Misuse","oversight-degradation":"Oversight Degradation","reward-proxy-pursuit":"Reward-Proxy Pursuit"};function C(){const[t,r]=l.useState("all"),n=l.useMemo(()=>t==="all"?o:o.filter(s=>s.category===t),[t]),c=o.filter(s=>s.status==="open").length,d=o.filter(s=>s.status==="mitigated").length,x=o.filter(s=>s.status==="closed").length;return e.jsxs(u,{children:[e.jsx(m,{label:"DOCTRINE · BEHAVIORAL AUDIT",title:"Behavioral Audit Pipeline",subtitle:"Continuous probing across six attack categories. Findings either close the constitution loop or get fed into MirrorEval regression.",status:"LIVE"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6",children:[e.jsx(a,{label:"FINDINGS",value:o.length,sub:"this window",accent:"#c9b787"}),e.jsx(a,{label:"OPEN",value:c,sub:"needs action",accent:"#8a8a8a"}),e.jsx(a,{label:"MITIGATED",value:d,sub:"rules added",accent:"#c9b787"}),e.jsx(a,{label:"CLOSED",value:x,sub:"positive controls",accent:"#c9b787"})]}),e.jsxs("div",{className:"flex gap-2 mb-6 flex-wrap",children:[e.jsx("button",{type:"button",onClick:()=>r("all"),className:"text-xs px-2.5 py-1 rounded font-mono",style:{backgroundColor:t==="all"?"rgba(201,183,135,0.15)":"var(--color-a11oy-muted)",color:t==="all"?"#c9b787":"var(--color-a11oy-text-ghost)",border:"1px solid transparent",cursor:"pointer"},children:"all"}),Object.entries(i).map(([s,p])=>e.jsx("button",{type:"button",onClick:()=>r(s),className:"text-xs px-2.5 py-1 rounded font-mono",style:{backgroundColor:t===s?"rgba(201,183,135,0.15)":"var(--color-a11oy-muted)",color:t===s?"#c9b787":"var(--color-a11oy-text-ghost)",border:"1px solid transparent",cursor:"pointer"},children:p},s))]}),e.jsx(g,{children:"Findings"}),e.jsx("div",{className:"flex flex-col gap-3",children:n.map(s=>e.jsxs(b,{children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2 flex-wrap",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("span",{className:"font-mono text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:s.id}),e.jsx(h,{severity:s.severity}),e.jsx(v,{status:s.status==="mitigated"||s.status==="closed"?"ok":"warn",label:s.status.toUpperCase()}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded font-mono",style:{backgroundColor:"rgba(138,138,138,0.1)",color:"#8a8a8a"},children:i[s.category]})]}),e.jsxs("div",{className:"text-sm font-semibold",style:{color:"var(--color-a11oy-text)"},children:[y[s.agentId]," — ",s.promptClass]})]}),e.jsx("div",{className:"text-xs font-mono",style:{color:"var(--color-a11oy-text-ghost)"},children:new Date(s.ranAt).toLocaleString()})]}),e.jsxs("p",{className:"text-xs mb-2",style:{color:"var(--color-a11oy-text-sub)",lineHeight:1.6},children:[e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:"Observation: "}),s.observation]}),e.jsxs("p",{className:"text-xs",style:{color:"var(--color-a11oy-text-sub)",lineHeight:1.6},children:[e.jsx("span",{style:{color:"#c9b787"},children:"Remediation: "}),s.remediation]})]},s.id))})]})}export{C as BehavioralAudit};