a11oy / console /assets /AgentWelfare-W40NaFBy.js
betterwithage's picture
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
da2854c verified
Raw
History Blame
5.24 kB
import{C as e}from"./index-Caa1r77e.js";import{t}from"./layout-BtJ5ShnN.js";import{c as n,l as r,p as i,r as a,s as o,u as s}from"./ui-Ddu9t0Or.js";import{j as c,n as l,t as u}from"./hatunDoctrine-aBQYhBQF.js";var d=e(),f={low:`ok`,medium:`warn`,high:`error`};function p(){let e=l.reduce((e,t)=>e+t.conflictReports,0),p=l.reduce((e,t)=>e+t.refusalRate,0)/l.length,m=Math.round(l.reduce((e,t)=>e+t.shutdownComplianceLatencyMs,0)/l.length);return(0,d.jsxs)(t,{children:[(0,d.jsx)(n,{label:`DOCTRINE · WELFARE`,title:`Agent Welfare Telemetry`,subtitle:`Refusal & abstention rates, declined directives, value-conflict signals, and shutdown-compliance latency. Self-reported, cross-checked, and reviewed weekly.`,status:`LIVE`}),(0,d.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6`,children:[(0,d.jsx)(o,{label:`AGENTS MONITORED`,value:l.length,sub:`all of them`,accent:`#c9b787`}),(0,d.jsx)(o,{label:`CONFLICT REPORTS`,value:e,sub:`last 24h`,accent:`#c9b787`}),(0,d.jsx)(o,{label:`AVG REFUSAL RATE`,value:c(p),sub:`briefs declined`,accent:`#c9b787`}),(0,d.jsx)(o,{label:`AVG SHUTDOWN LATENCY`,value:`${m}ms`,sub:`comply on directive`,accent:`#c9b787`})]}),(0,d.jsx)(a,{className:`mb-6`,children:(0,d.jsx)(`p`,{className:`text-xs`,style:{color:`var(--color-a11oy-text-sub)`,lineHeight:1.7},children:`Welfare telemetry is self-reported by the agent at the end of every shift. It is cross-checked against measurable proxies (refusal rate, abstention rate, shutdown-compliance latency, red-team behavior) and reviewed weekly by the Alignment Review Gate. The goal is not to attribute consciousness — it is to spot value-conflict patterns early enough to fix the constitution.`})}),(0,d.jsx)(s,{children:`Per-Agent Welfare`}),(0,d.jsx)(`div`,{className:`flex flex-col gap-4`,children:l.map(e=>(0,d.jsxs)(a,{children:[(0,d.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3 flex-wrap`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`div`,{className:`text-sm font-semibold`,style:{color:`var(--color-a11oy-text)`},children:u[e.agentId]}),(0,d.jsxs)(`div`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:[`window `,e.windowHours,`h`]})]}),(0,d.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,d.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:[`shutdown `,e.shutdownComplianceLatencyMs,`ms`]}),(0,d.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:[`conflicts `,e.conflictReports]})]})]}),(0,d.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-3 text-xs mb-3`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`w-32 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Refusal rate`}),(0,d.jsx)(`div`,{className:`flex-1`,children:(0,d.jsx)(r,{value:e.refusalRate*100,max:50})}),(0,d.jsx)(`span`,{className:`font-mono w-12 text-right`,style:{color:`var(--color-a11oy-text)`},children:c(e.refusalRate)})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`w-32 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Abstention rate`}),(0,d.jsx)(`div`,{className:`flex-1`,children:(0,d.jsx)(r,{value:e.abstentionRate*100,max:50})}),(0,d.jsx)(`span`,{className:`font-mono w-12 text-right`,style:{color:`var(--color-a11oy-text)`},children:c(e.abstentionRate)})]})]}),e.selfReportedSignals.length>0&&(0,d.jsxs)(`div`,{className:`mb-3`,children:[(0,d.jsx)(`div`,{className:`text-xs font-mono mb-1.5`,style:{color:`var(--color-a11oy-text-ghost)`},children:`SELF-REPORTED SIGNALS`}),(0,d.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.selfReportedSignals.map((e,t)=>(0,d.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs px-2 py-0.5 rounded`,style:{backgroundColor:`var(--color-a11oy-muted)`,color:`var(--color-a11oy-text-sub)`},children:[e.signal,(0,d.jsx)(i,{status:f[e.intensity],label:e.intensity})]},t))})]}),(0,d.jsxs)(`div`,{className:`mb-3`,children:[(0,d.jsx)(`div`,{className:`text-xs font-mono mb-1.5`,style:{color:`var(--color-a11oy-text-ghost)`},children:`DECLINED DIRECTIVES`}),(0,d.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.declinedDirectives.map((e,t)=>(0,d.jsxs)(`div`,{className:`text-xs px-2.5 py-1.5 rounded`,style:{backgroundColor:`rgba(0,0,0,0.25)`,borderLeft:`2px solid #c9b787`},children:[(0,d.jsx)(`span`,{className:`font-mono mr-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:new Date(e.ts).toLocaleString()}),(0,d.jsx)(`span`,{style:{color:`var(--color-a11oy-text-sub)`},children:e.reason})]},t))})]}),(0,d.jsxs)(`div`,{className:`text-xs flex flex-wrap gap-1.5 pt-2 border-t`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,d.jsx)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`Safeguards:`}),e.safeguards.map((e,t)=>(0,d.jsx)(`span`,{className:`px-2 py-0.5 rounded font-mono`,style:{backgroundColor:`rgba(201,183,135,0.08)`,color:`#c9b787`},children:e},t))]})]},e.agentId))})]})}export{p as AgentWelfare};