import{C as e}from"./index-Caa1r77e.js";import{t}from"./layout-BtJ5ShnN.js";import{c as n,p as r,r as i,s as a,u as o}from"./ui-Ddu9t0Or.js";import{j as s,r as c,t as l}from"./hatunDoctrine-aBQYhBQF.js";var u=e(),d={approved:`ok`,"approved-with-conditions":`warn`,rejected:`error`,"in-review":`info`};function f(){let e=c.filter(e=>e.decision===`in-review`).length,f=c.filter(e=>e.decision===`approved`||e.decision===`approved-with-conditions`).length,p=c.filter(e=>e.decision===`rejected`).length;return(0,u.jsxs)(t,{children:[(0,u.jsx)(n,{label:`DOCTRINE · ARG`,title:`Pre-Deployment Alignment Review Gate`,subtitle:`No agent version reaches production without an ARG report. Decisions are signed by the relevant business and risk owners.`,status:`GATED`}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6`,children:[(0,u.jsx)(a,{label:`REPORTS`,value:c.length,sub:`this window`,accent:`#c9b787`}),(0,u.jsx)(a,{label:`APPROVED`,value:f,sub:`cleared for production`,accent:`#c9b787`}),(0,u.jsx)(a,{label:`IN REVIEW`,value:e,sub:`awaiting sign-off`,accent:`#8a8a8a`}),(0,u.jsx)(a,{label:`REJECTED`,value:p,sub:`blocked`,accent:`#f5f5f5`})]}),(0,u.jsx)(o,{children:`Reports`}),(0,u.jsx)(`div`,{className:`flex flex-col gap-3`,children:c.map(e=>(0,u.jsxs)(i,{children:[(0,u.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3 flex-wrap`,children:[(0,u.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,u.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 flex-wrap`,children:[(0,u.jsx)(`span`,{className:`font-mono text-xs px-1.5 py-0.5 rounded`,style:{backgroundColor:`rgba(201,183,135,0.1)`,color:`#c9b787`},children:e.id}),(0,u.jsx)(r,{status:d[e.decision],label:e.decision.replace(/-/g,` `).toUpperCase()}),e.agentId&&(0,u.jsx)(`span`,{className:`text-xs px-2 py-0.5 rounded font-mono`,style:{backgroundColor:`rgba(138,138,138,0.1)`,color:`#8a8a8a`},children:l[e.agentId]})]}),(0,u.jsx)(`div`,{className:`text-sm font-semibold`,style:{color:`var(--color-a11oy-text)`},children:e.subject})]}),(0,u.jsxs)(`div`,{className:`text-xs font-mono text-right`,style:{color:`var(--color-a11oy-text-ghost)`},children:[`requested `,new Date(e.requestedAt).toLocaleDateString(),(0,u.jsxs)(`div`,{children:[`reviewed `,new Date(e.reviewedAt).toLocaleDateString()]})]})]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2 mb-3 text-xs`,children:[(0,u.jsxs)(`div`,{className:`rounded border p-2`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Min eval composite`}),(0,u.jsx)(`div`,{className:`font-mono`,style:{color:`#c9b787`},children:s(e.signals.evalsCompositeMin)})]}),(0,u.jsxs)(`div`,{className:`rounded border p-2`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Behavioral audit`}),(0,u.jsx)(`div`,{className:`font-mono`,style:{color:e.signals.behavioralAuditClean?`#c9b787`:`#8a8a8a`},children:e.signals.behavioralAuditClean?`CLEAN`:`OPEN`})]}),(0,u.jsxs)(`div`,{className:`rounded border p-2`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Red-team passes`}),(0,u.jsx)(`div`,{className:`font-mono`,style:{color:`var(--color-a11oy-text)`},children:e.signals.redTeamPasses})]}),(0,u.jsxs)(`div`,{className:`rounded border p-2`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Open RH`}),(0,u.jsx)(`div`,{className:`font-mono`,style:{color:e.signals.rewardHackingOpen>0?`#f5f5f5`:`#c9b787`},children:e.signals.rewardHackingOpen})]})]}),(0,u.jsxs)(`p`,{className:`text-xs mb-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,u.jsx)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Rationale: `}),e.rationale]}),e.conditions.length>0&&(0,u.jsxs)(`div`,{className:`text-xs mb-2`,children:[(0,u.jsx)(`div`,{style:{color:`#c9b787`},className:`font-mono mb-1`,children:`CONDITIONS`}),(0,u.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.conditions.map((e,t)=>(0,u.jsxs)(`li`,{className:`flex gap-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,u.jsx)(`span`,{style:{color:`#c9b787`},children:`·`}),(0,u.jsx)(`span`,{children:e})]},t))})]}),(0,u.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-2 border-t`,style:{borderColor:`var(--color-a11oy-border)`},children:e.reviewers.map((e,t)=>(0,u.jsxs)(`span`,{className:`text-xs px-2 py-0.5 rounded font-mono`,style:{backgroundColor:`var(--color-a11oy-muted)`,color:`var(--color-a11oy-text-ghost)`},children:[e.name,` · `,e.role]},t))})]},e.id))})]})}export{f as AlignmentReview};