a11oy / console /assets /AIUserTurn-C5Ah9oiw.js
betterwithage's picture
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
da2854c verified
Raw
History Blame
4.1 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{O as c}from"./hatunDoctrine-aBQYhBQF.js";var l=e(),u={human:`ok`,"likely-human":`ok`,uncertain:`warn`,"likely-ai":`error`,ai:`error`},d={pass:`pass`,"soft-warn":`soft-warn`,"block-and-reroute":`block + reroute`};function f(){let e=c.filter(e=>e.recommendedAction!==`pass`).length,f=c.filter(e=>e.recommendedAction===`block-and-reroute`).length;return(0,l.jsxs)(t,{children:[(0,l.jsx)(n,{label:`DOCTRINE · AI USER-TURN DETECTOR`,title:`AI-Generated User-Turn Detector`,subtitle:`Approvals are checked for human authorship. Typing dynamics, perplexity, burstiness, and session context decide if the human-in-the-loop was actually human.`,status:`LIVE`}),(0,l.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6`,children:[(0,l.jsx)(o,{label:`APPROVALS CHECKED`,value:c.length,sub:`this window`,accent:`#c9b787`}),(0,l.jsx)(o,{label:`FLAGGED`,value:e,sub:`non-pass verdict`,accent:`#8a8a8a`}),(0,l.jsx)(o,{label:`BLOCKED`,value:f,sub:`re-routed for verification`,accent:`#c9b787`}),(0,l.jsx)(o,{label:`SIGNALS / DECISION`,value:4,sub:`typing, perplexity, burst, ctx`,accent:`#c9b787`})]}),(0,l.jsx)(s,{children:`Recent Approval Checks`}),(0,l.jsx)(`div`,{className:`flex flex-col gap-3`,children:c.map(e=>(0,l.jsxs)(a,{children:[(0,l.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3 flex-wrap`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 flex-wrap`,children:[(0,l.jsxs)(`span`,{className:`font-mono text-xs`,style:{color:`var(--color-a11oy-text-ghost)`},children:[e.id,` · `,e.approvalRef]}),(0,l.jsx)(i,{status:u[e.verdict],label:e.verdict.toUpperCase()}),(0,l.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:[`action: `,d[e.recommendedAction]]})]}),(0,l.jsxs)(`div`,{className:`text-sm font-semibold`,style:{color:`var(--color-a11oy-text)`},children:[e.actor,` — `,e.actorRole]})]}),(0,l.jsx)(`div`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:new Date(e.submittedAt).toLocaleString()})]}),(0,l.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-3 text-xs`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`w-44 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Typing dynamics`}),(0,l.jsx)(`div`,{className:`flex-1`,children:(0,l.jsx)(r,{value:e.signals.typingDynamicsScore*100})}),(0,l.jsx)(`span`,{className:`font-mono w-10 text-right`,style:{color:`var(--color-a11oy-text)`},children:Math.round(e.signals.typingDynamicsScore*100)})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`w-44 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Burstiness`}),(0,l.jsx)(`div`,{className:`flex-1`,children:(0,l.jsx)(r,{value:e.signals.burstinessScore*100})}),(0,l.jsx)(`span`,{className:`font-mono w-10 text-right`,style:{color:`var(--color-a11oy-text)`},children:Math.round(e.signals.burstinessScore*100)})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`w-44 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Perplexity vs human corpus`}),(0,l.jsx)(`span`,{className:`font-mono`,style:{color:e.signals.perplexityVsHumanCorpus<12?`#8a8a8a`:`#c9b787`},children:e.signals.perplexityVsHumanCorpus.toFixed(1)})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`w-44 flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:`Session context`}),(0,l.jsx)(`div`,{className:`flex-1`,children:(0,l.jsx)(r,{value:e.signals.sessionContextScore*100})}),(0,l.jsx)(`span`,{className:`font-mono w-10 text-right`,style:{color:`var(--color-a11oy-text)`},children:Math.round(e.signals.sessionContextScore*100)})]})]})]},e.id))})]})}export{f as AIUserTurn};