Spaces:
Running
Running
| import{o as e}from"./chunk-CMxvf4Kt.js";import{t}from"./react-DrNXigiH.js";import{C as n}from"./index-Caa1r77e.js";import{t as r}from"./layout-BtJ5ShnN.js";import{c as i,d as a,p as o,r as s,s as c,u as l}from"./ui-Ddu9t0Or.js";import{i as u,t as d}from"./hatunDoctrine-aBQYhBQF.js";var f=e(t(),1),p=n(),m={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 h(){let[e,t]=(0,f.useState)(`all`),n=(0,f.useMemo)(()=>e===`all`?u:u.filter(t=>t.category===e),[e]),h=u.filter(e=>e.status===`open`).length,g=u.filter(e=>e.status===`mitigated`).length,_=u.filter(e=>e.status===`closed`).length;return(0,p.jsxs)(r,{children:[(0,p.jsx)(i,{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`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6`,children:[(0,p.jsx)(c,{label:`FINDINGS`,value:u.length,sub:`this window`,accent:`#c9b787`}),(0,p.jsx)(c,{label:`OPEN`,value:h,sub:`needs action`,accent:`#8a8a8a`}),(0,p.jsx)(c,{label:`MITIGATED`,value:g,sub:`rules added`,accent:`#c9b787`}),(0,p.jsx)(c,{label:`CLOSED`,value:_,sub:`positive controls`,accent:`#c9b787`})]}),(0,p.jsxs)(`div`,{className:`flex gap-2 mb-6 flex-wrap`,children:[(0,p.jsx)(`button`,{type:`button`,onClick:()=>t(`all`),className:`text-xs px-2.5 py-1 rounded font-mono`,style:{backgroundColor:e===`all`?`rgba(201,183,135,0.15)`:`var(--color-a11oy-muted)`,color:e===`all`?`#c9b787`:`var(--color-a11oy-text-ghost)`,border:`1px solid transparent`,cursor:`pointer`},children:`all`}),Object.entries(m).map(([n,r])=>(0,p.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:`text-xs px-2.5 py-1 rounded font-mono`,style:{backgroundColor:e===n?`rgba(201,183,135,0.15)`:`var(--color-a11oy-muted)`,color:e===n?`#c9b787`:`var(--color-a11oy-text-ghost)`,border:`1px solid transparent`,cursor:`pointer`},children:r},n))]}),(0,p.jsx)(l,{children:`Findings`}),(0,p.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.map(e=>(0,p.jsxs)(s,{children:[(0,p.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2 flex-wrap`,children:[(0,p.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 flex-wrap`,children:[(0,p.jsx)(`span`,{className:`font-mono text-xs`,style:{color:`var(--color-a11oy-text-ghost)`},children:e.id}),(0,p.jsx)(a,{severity:e.severity}),(0,p.jsx)(o,{status:e.status===`mitigated`||e.status===`closed`?`ok`:`warn`,label:e.status.toUpperCase()}),(0,p.jsx)(`span`,{className:`text-xs px-2 py-0.5 rounded font-mono`,style:{backgroundColor:`rgba(138,138,138,0.1)`,color:`#8a8a8a`},children:m[e.category]})]}),(0,p.jsxs)(`div`,{className:`text-sm font-semibold`,style:{color:`var(--color-a11oy-text)`},children:[d[e.agentId],` — `,e.promptClass]})]}),(0,p.jsx)(`div`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:new Date(e.ranAt).toLocaleString()})]}),(0,p.jsxs)(`p`,{className:`text-xs mb-2`,style:{color:`var(--color-a11oy-text-sub)`,lineHeight:1.6},children:[(0,p.jsx)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Observation: `}),e.observation]}),(0,p.jsxs)(`p`,{className:`text-xs`,style:{color:`var(--color-a11oy-text-sub)`,lineHeight:1.6},children:[(0,p.jsx)(`span`,{style:{color:`#c9b787`},children:`Remediation: `}),e.remediation]})]},e.id))})]})}export{h as BehavioralAudit}; |