a11oy / console /assets /CommandSurface-DYjeF6KX.js
betterwithage's picture
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
da2854c verified
Raw
History Blame
22.2 kB
import{o as e}from"./chunk-CMxvf4Kt.js";import{t}from"./react-DrNXigiH.js";import{C as n,f as r,g as i,h as a,m as o}from"./index-Caa1r77e.js";import{t as s}from"./layout-BtJ5ShnN.js";import{_ as c,a as l,c as u,d,f,g as p,n as m,r as h,u as g}from"./ui-Ddu9t0Or.js";import{F as _,P as v}from"./generateCategoricalChart-bYKfCxJX.js";import{n as y,t as b}from"./LineChart-C9yFSJH7.js";import{n as x,o as S,s as C}from"./src-BZBLDGop.js";var w=e(t(),1),T=n(),E=`#c9b787`,D={"lyte-revenue":`#c9b787`,"vessels-maritime":`#8a8a8a`,"terra-real-estate":`#c9b787`,"aegis-defense":`#f5f5f5`,"prism-counsel":`#8a8a8a`,"carlota-jo":`#c9b787`,"alloy-core":`#5e5e5e`},O={"lyte-revenue":`Revenue`,"vessels-maritime":`Maritime`,"terra-real-estate":`Real Estate`,"aegis-defense":`Defense`,"prism-counsel":`Legal`,"carlota-jo":`Carlota Jo`,"alloy-core":`Core`},k={achieved:`#22c55e`,missed:`#ef4444`,blocked:`#f97316`,in_progress:E,at_risk:`#f97316`,running:E,paused:`#8a8a8a`,error:`#ef4444`,completed:`#22c55e`,waiting_approval:`#f97316`};function A(e){try{let t=new Date(e),n=Date.now()-t.getTime(),r=Math.round(n/6e4);if(r<60)return`${r}m ago`;let i=Math.round(n/36e5);return i<24?`${i}h ago`:`${Math.round(i/24)}d ago`}catch{return e}}var j=Array.from({length:24},(e,t)=>({h:t,actions:Math.floor(8+Math.sin(t*.5)*4+(t>8&&t<18?6:0))})),M=Array.from({length:24},(e,t)=>({h:t,pct:Math.round(88+Math.sin(t*.3)*4)})),N=[{id:`cascade`,name:`Cascade Navigator`,vertical:`vessels-maritime`,status:`pending_approval`,lastAction:`Port standby — awaiting VP`,trust:97},{id:`counsel`,name:`Counsel Sentinel`,vertical:`prism-counsel`,status:`active`,lastAction:`Talbot escalation complete`,trust:99},{id:`pipeline`,name:`Pipeline Oracle`,vertical:`lyte-revenue`,status:`active`,lastAction:`Q2 pipeline analysis running`,trust:91},{id:`guardian`,name:`Guardian`,vertical:`aegis-defense`,status:`active`,lastAction:`Perimeter hardening verified`,trust:99},{id:`domaine`,name:`Terra Analyst`,vertical:`terra-real-estate`,status:`active`,lastAction:`Cap rate model updated`,trust:88},{id:`watchdog`,name:`Fabric Watchdog`,vertical:`alloy-core`,status:`active`,lastAction:`Layer health: all nominal`,trust:100}];function P(){let[e,t]=(0,w.useState)(null),[n,P]=(0,w.useState)({}),[F,I]=(0,w.useState)(0),{data:L,fetching:R}=a({limit:100}),{data:z}=i({limit:50}),{data:B}=o(),{data:V}=r({status:`pending`,limit:5}),H=L.length>0;(0,w.useEffect)(()=>{let e=setInterval(()=>I(e=>e+1),4e3);return()=>clearInterval(e)},[]);let U=(0,w.useMemo)(()=>H?L.map(e=>({id:e.id,vertical:e.domain??``,severity:e.severity??`medium`,status:e.status??`active`,title:e.title??``,description:e.description??``,detectedAt:e.createdAt??``,owner:e.ownerUserId??``,businessImpact:``,evidenceRefs:[]})):C.map(e=>({id:e.id,vertical:e.vertical,severity:e.severity,status:e.status,title:e.title,description:e.description,detectedAt:e.detectedAt,owner:e.owner,businessImpact:e.businessImpact,evidenceRefs:e.evidenceRefs})),[H,L]),W=U.filter(e=>e.severity===`critical`||e.severity===`high`).slice(0,20),G=x.filter(e=>e.requiresApproval&&e.status===`running`).slice(0,4),K=S.slice(0,6),q=U.find(t=>t.id===e)??null,J=(0,w.useMemo)(()=>{if(!q)return null;if(H){let e=z.find(e=>e.triggerId===q.id);return e?{id:e.id,name:e.name,status:e.status,requiresApproval:e.requiresApproval,approvalState:e.approvalState,description:e.description??``,domain:e.domain??``,priority:e.priority??`medium`,isLive:!0,steps:e.steps.map(e=>({step:e.step,name:e.name,status:e.status}))}:null}let e=x.find(e=>e.signals.includes(q.id));return e?{id:e.id,name:e.name,status:e.status,requiresApproval:e.requiresApproval,approvalState:`none`,description:e.objective,domain:e.vertical,priority:e.actionBrief.priority,isLive:!1,steps:[],actionBrief:e.actionBrief,mirrorEval:{verdict:e.mirrorEvalResult.verdict,score:e.mirrorEvalResult.score,dimensions:e.mirrorEvalResult.dimensions},pceContractId:e.pceContractId,verificationStatus:e.verificationResult.status}:null},[q,H,z]),Y=[{label:`ACTIVE SIGNALS`,value:H?U.filter(e=>e.status===`active`).length:C.filter(e=>e.status===`active`||e.status===`escalated`).length,sub:`${U.filter(e=>e.severity===`critical`).length} critical`,color:`#ef4444`},{label:`RUNNING WORKCELLS`,value:H?B?.runningRuns??0:x.filter(e=>e.status===`running`).length,sub:`active now`,color:E},{label:`PENDING APPROVALS`,value:H?V.length:x.filter(e=>e.requiresApproval&&e.status===`running`).length,sub:`awaiting gate`,color:`#f97316`},{label:`VERIFIED ACTIONS`,value:H?B?.totalRuns??47:47,sub:`last 24h`,color:`#22c55e`},{label:`PROOF COVERAGE`,value:`91%`,sub:`1,204 of 1,324`,color:E},{label:`AGENT TRUST`,value:94,sub:`avg out of 100`,color:E},{label:`OUTCOMES AT RISK`,value:S.filter(e=>e.status===`blocked`||e.status===`missed`).length,sub:`blocked or missed`,color:`#f97316`},{label:`PCE HEALTH`,value:`96%`,sub:`19 of 20 valid`,color:`#22c55e`}];function X(e,t){P(n=>({...n,[e]:t}))}function Z(e){P(t=>{let n={...t};return delete n[e],n})}return(0,T.jsxs)(s,{children:[(0,T.jsx)(u,{label:`COMMAND SURFACE`,title:`Unified Operator Command`,subtitle:`Real-time signal feed · Active agents & workcells · Outcome scorecard · Approval queue — all in a single unified view.`,status:H?`LIVE`:R?`CONNECTING`:`LIVE`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-mono`,style:{color:E},children:[(0,T.jsx)(`span`,{className:`w-2 h-2 rounded-full animate-pulse`,style:{backgroundColor:E}}),H?`Connected to fabric`:`All fabric layers operational`]})}),(0,T.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-2 mb-6`,children:Y.map(e=>(0,T.jsxs)(`div`,{className:`rounded-lg border p-2.5`,style:{backgroundColor:`var(--color-a11oy-card)`,borderColor:`var(--color-a11oy-border)`,borderTop:`2px solid ${e.color}`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`,fontSize:9,letterSpacing:`0.06em`},children:e.label}),(0,T.jsx)(`div`,{className:`text-xl font-bold font-mono`,style:{color:e.color},children:e.value}),(0,T.jsx)(`div`,{className:`text-xs mt-0.5`,style:{color:`var(--color-a11oy-text-ghost)`,fontSize:10},children:e.sub})]},e.label))}),(0,T.jsxs)(`div`,{className:`grid xl:grid-cols-3 gap-4 mb-4`,children:[(0,T.jsxs)(`div`,{className:`xl:col-span-2 flex flex-col gap-4`,children:[(0,T.jsxs)(`div`,{className:`grid sm:grid-cols-2 gap-4`,children:[(0,T.jsxs)(h,{style:{padding:12},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`EXECUTION VELOCITY — 24h`}),(0,T.jsx)(v,{width:`100%`,height:80,children:(0,T.jsxs)(b,{data:j,margin:{top:2,right:2,bottom:2,left:-20},children:[(0,T.jsx)(y,{type:`monotone`,dataKey:`actions`,stroke:E,strokeWidth:1.5,dot:!1}),(0,T.jsx)(_,{contentStyle:{backgroundColor:`#0a0a0a`,border:`1px solid rgba(255,255,255,0.08)`,borderRadius:4,fontSize:10},formatter:e=>[`${e}`,`Actions/hr`]})]})}),(0,T.jsxs)(`div`,{className:`flex justify-between text-xs mt-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:[(0,T.jsx)(`span`,{children:`12h ago`}),(0,T.jsx)(`span`,{children:`12.4 avg/hr`}),(0,T.jsx)(`span`,{children:`now`})]})]}),(0,T.jsxs)(h,{style:{padding:12},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`PROOF COVERAGE — 24h`}),(0,T.jsx)(v,{width:`100%`,height:80,children:(0,T.jsxs)(b,{data:M,margin:{top:2,right:2,bottom:2,left:-20},children:[(0,T.jsx)(y,{type:`monotone`,dataKey:`pct`,stroke:`#22c55e`,strokeWidth:1.5,dot:!1}),(0,T.jsx)(_,{contentStyle:{backgroundColor:`#0a0a0a`,border:`1px solid rgba(255,255,255,0.08)`,borderRadius:4,fontSize:10},formatter:e=>[`${e}%`,`Coverage`]})]})}),(0,T.jsxs)(`div`,{className:`flex justify-between text-xs mt-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:[(0,T.jsx)(`span`,{children:`12h ago`}),(0,T.jsx)(`span`,{style:{color:`#22c55e`},children:`91% now`}),(0,T.jsx)(`span`,{children:`now`})]})]})]}),(0,T.jsxs)(`div`,{className:`flex gap-0 border rounded-lg overflow-hidden`,style:{borderColor:`var(--color-a11oy-border)`,minHeight:420},children:[(0,T.jsxs)(`div`,{className:`flex-1 overflow-y-auto border-r`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsxs)(`div`,{className:`p-3 border-b sticky top-0 z-10 flex items-center justify-between`,style:{backgroundColor:`rgba(10,10,10,0.92)`,backdropFilter:`blur(8px)`,borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:`SIGNAL FEED`}),H&&(0,T.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full animate-pulse`,style:{backgroundColor:`#c9b787`}})]}),(0,T.jsxs)(`span`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:[W.length,` events`]})]}),(0,T.jsx)(`div`,{className:`flex flex-col divide-y`,style:{borderColor:`rgba(255,255,255,0.04)`},children:R&&W.length===0?(0,T.jsxs)(`div`,{className:`p-8 text-center text-xs`,style:{color:`var(--color-a11oy-text-ghost)`},children:[(0,T.jsx)(`span`,{className:`w-2 h-2 rounded-full animate-pulse inline-block mr-2`,style:{backgroundColor:`#5e5e5e`}}),`Connecting to fabric...`]}):W.map((n,r)=>{let i=D[n.vertical]??`#5e5e5e`,a=n.id===e,o=F%5==0&&r===0;return(0,T.jsxs)(`div`,{className:`p-3 cursor-pointer transition-all`,onClick:()=>t(a?null:n.id),style:{backgroundColor:a?`rgba(201,183,135,0.05)`:o?`rgba(201,183,135,0.03)`:`var(--color-a11oy-card)`,borderLeft:a?`2px solid ${E}`:`2px solid transparent`},children:[(0,T.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,T.jsx)(f,{severity:n.severity}),(0,T.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5 flex-wrap`,children:[(0,T.jsx)(d,{severity:n.severity}),(0,T.jsx)(c,{vertical:O[n.vertical]??n.vertical,color:i})]}),(0,T.jsx)(`div`,{className:`text-xs font-medium truncate`,style:{color:`var(--color-a11oy-text)`},children:n.title}),a&&(0,T.jsx)(`div`,{className:`text-xs mt-1`,style:{color:`var(--color-a11oy-text-sub)`},children:n.description})]}),(0,T.jsx)(`div`,{className:`text-xs font-mono flex-shrink-0`,style:{color:`var(--color-a11oy-text-ghost)`},children:A(n.detectedAt)})]}),a&&J&&(0,T.jsxs)(`div`,{className:`mt-2 px-2 py-1.5 rounded text-xs`,style:{backgroundColor:`rgba(201,183,135,0.06)`,border:`1px solid rgba(201,183,135,0.15)`},children:[(0,T.jsxs)(`span`,{style:{color:`#c9b787`},children:[`↗ Linked `,J.isLive?`workflow`:`workcell`,`: `]}),(0,T.jsx)(`span`,{style:{color:`var(--color-a11oy-text-sub)`},children:J.name})]})]},n.id)})})]}),(0,T.jsx)(`div`,{className:`w-72 flex-shrink-0 overflow-y-auto`,style:{backgroundColor:`var(--color-a11oy-deep)`},children:q?(0,T.jsxs)(`div`,{className:`p-4`,children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-3`,style:{color:`var(--color-a11oy-text-ghost)`},children:`SIGNAL DETAIL`}),(0,T.jsx)(`div`,{className:`text-sm font-semibold mb-1`,style:{color:`var(--color-a11oy-text)`},children:q.title}),(0,T.jsx)(l,{id:q.id}),(0,T.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 mb-2 mt-2`,children:[(0,T.jsx)(d,{severity:q.severity}),(0,T.jsx)(c,{vertical:O[q.vertical]??q.vertical,color:D[q.vertical]??`#5e5e5e`})]}),(0,T.jsx)(`p`,{className:`text-xs mb-3`,style:{color:`var(--color-a11oy-text-sub)`},children:q.description}),q.businessImpact&&(0,T.jsx)(`div`,{className:`text-xs p-2 rounded mb-3`,style:{backgroundColor:`rgba(201,183,135,0.08)`,color:E,border:`1px solid rgba(201,183,135,0.2)`},children:q.businessImpact}),J&&J.actionBrief&&(0,T.jsxs)(`div`,{className:`border-t pt-3 mb-3`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`ACTION BRIEF`}),(0,T.jsx)(`div`,{className:`text-xs font-medium mb-1`,style:{color:`var(--color-a11oy-text)`},children:J.actionBrief.title}),(0,T.jsx)(`div`,{className:`text-xs mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:J.actionBrief.description}),(0,T.jsx)(`div`,{className:`text-xs font-mono mb-2`,style:{color:E},children:J.actionBrief.estimatedImpact})]}),J&&J.isLive&&(0,T.jsxs)(`div`,{className:`border-t pt-3 mb-3`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`LINKED WORKFLOW`}),(0,T.jsx)(`div`,{className:`text-xs font-medium mb-1`,style:{color:`var(--color-a11oy-text)`},children:J.name}),(0,T.jsx)(`div`,{className:`text-xs mb-2`,style:{color:`var(--color-a11oy-text-sub)`},children:J.description}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-xs flex-wrap`,children:[(0,T.jsx)(`span`,{className:`font-mono px-1.5 py-0.5 rounded`,style:{backgroundColor:`rgba(201,183,135,0.12)`,color:`#c9b787`},children:J.status}),J.requiresApproval&&(0,T.jsxs)(`span`,{className:`font-mono px-1.5 py-0.5 rounded`,style:{backgroundColor:`rgba(245,245,245,0.08)`,color:`#f5f5f5`},children:[`approval: `,J.approvalState]})]}),J.steps.length>0&&(0,T.jsxs)(`div`,{className:`mt-2`,children:[(0,T.jsx)(`div`,{className:`text-xs font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`STEPS`}),J.steps.map(e=>(0,T.jsxs)(`div`,{className:`text-xs flex items-center gap-2 mb-0.5`,children:[(0,T.jsx)(`span`,{className:`font-mono`,style:{color:e.status===`completed`?`#c9b787`:e.status===`running`?`#f5f5f5`:`var(--color-a11oy-text-ghost)`},children:e.status===`completed`?`✓`:e.status===`running`?`▸`:`·`}),(0,T.jsx)(`span`,{style:{color:`var(--color-a11oy-text-sub)`},children:e.name})]},e.step))]})]}),J&&J.mirrorEval&&(0,T.jsxs)(`div`,{className:`border-t pt-3 mb-3`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`MIRROREVAL`}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,T.jsx)(p,{verdict:J.mirrorEval.verdict}),(0,T.jsxs)(`span`,{className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:[Math.round(J.mirrorEval.score*100),`% confidence`]})]})]}),J&&J.requiresApproval&&!n[J.id]&&(0,T.jsxs)(`div`,{className:`border-t pt-3`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`APPROVAL CONTROL`}),(0,T.jsx)(m,{label:`Approval ${J.isLive?`state: ${J.approvalState}`:`tier: ${J.actionBrief?.approvalTier??`—`}`}`}),(0,T.jsxs)(`div`,{className:`flex gap-1.5 mt-2 flex-wrap`,children:[(0,T.jsx)(`button`,{onClick:()=>X(J.id,`approved`),className:`text-xs px-3 py-1.5 rounded`,style:{backgroundColor:`rgba(34,197,94,0.12)`,color:`#22c55e`,border:`1px solid rgba(34,197,94,0.3)`,cursor:`pointer`},children:`✓ Approve`}),(0,T.jsx)(`button`,{onClick:()=>X(J.id,`deferred`),className:`text-xs px-3 py-1.5 rounded`,style:{backgroundColor:`rgba(201,183,135,0.08)`,color:`#c9b787`,border:`1px solid rgba(201,183,135,0.2)`,cursor:`pointer`},children:`⏸ Defer`}),(0,T.jsx)(`button`,{onClick:()=>X(J.id,`rejected`),className:`text-xs px-3 py-1.5 rounded`,style:{backgroundColor:`rgba(239,68,68,0.08)`,color:`#ef4444`,border:`1px solid rgba(239,68,68,0.2)`,cursor:`pointer`},children:`✕ Reject`})]})]}),J&&n[J.id]===`approved`&&(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`div`,{className:`text-xs font-mono px-2 py-1 rounded`,style:{backgroundColor:`rgba(34,197,94,0.1)`,color:`#22c55e`,border:`1px solid rgba(34,197,94,0.2)`},children:`✓ Approved`}),(0,T.jsx)(`button`,{onClick:()=>Z(J.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}),J&&n[J.id]===`deferred`&&(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`div`,{className:`text-xs font-mono px-2 py-1 rounded`,style:{backgroundColor:`rgba(201,183,135,0.1)`,color:`#c9b787`,border:`1px solid rgba(201,183,135,0.2)`},children:`⏸ Deferred`}),(0,T.jsx)(`button`,{onClick:()=>Z(J.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}),J&&n[J.id]===`rejected`&&(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`div`,{className:`text-xs font-mono px-2 py-1 rounded`,style:{backgroundColor:`rgba(239,68,68,0.08)`,color:`#ef4444`,border:`1px solid rgba(239,68,68,0.2)`},children:`✕ Rejected`}),(0,T.jsx)(`button`,{onClick:()=>Z(J.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}),q.evidenceRefs.length>0&&(0,T.jsxs)(`div`,{className:`mt-3 border-t pt-3`,style:{borderColor:`var(--color-a11oy-border)`},children:[(0,T.jsx)(`div`,{className:`text-xs font-mono uppercase tracking-widest mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`EVIDENCE REFS`}),(0,T.jsx)(`div`,{className:`flex flex-col gap-1`,children:q.evidenceRefs.map(e=>(0,T.jsx)(`div`,{className:`text-xs font-mono px-2 py-1 rounded`,style:{backgroundColor:`var(--color-a11oy-muted)`,color:`var(--color-a11oy-text-ghost)`},children:e},e))})]})]}):(0,T.jsxs)(`div`,{className:`p-6 text-center text-xs`,style:{color:`var(--color-a11oy-text-ghost)`},children:[(0,T.jsx)(`div`,{className:`text-3xl mb-2`,style:{color:`var(--color-a11oy-border)`},children:`▸`}),`Select a signal to view details and action controls.`]})})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(g,{children:[`Active Agents (`,N.length,`)`]}),(0,T.jsx)(`div`,{className:`flex flex-col gap-2`,children:N.map(e=>{let t=D[e.vertical]??`#5e5e5e`,n=e.status===`pending_approval`;return(0,T.jsxs)(`div`,{className:`rounded-lg border p-3`,style:{backgroundColor:`var(--color-a11oy-card)`,borderColor:`var(--color-a11oy-border)`,borderLeft:`2px solid ${n?`#f97316`:t}`},children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,T.jsx)(`span`,{className:`text-xs font-medium`,style:{color:`var(--color-a11oy-text)`},children:e.name}),(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:E},children:e.trust})]}),(0,T.jsx)(`div`,{className:`text-xs mb-1 truncate`,style:{color:`var(--color-a11oy-text-ghost)`},children:e.lastAction}),(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(c,{vertical:O[e.vertical]??e.vertical,color:t}),n&&(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`#f97316`},children:`⚬ approval`})]})]},e.id)})})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(g,{children:[`Pending Approvals (`,G.length,`)`]}),(0,T.jsx)(`div`,{className:`flex flex-col gap-2`,children:G.map(e=>(0,T.jsxs)(h,{children:[(0,T.jsx)(`div`,{className:`text-xs font-medium mb-1 truncate`,style:{color:`var(--color-a11oy-text)`},children:e.actionBrief.title}),(0,T.jsxs)(`div`,{className:`text-xs mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:[`Tier: `,e.actionBrief.approvalTier,` · `,e.actionBrief.priority,` priority`]}),n[e.id]?n[e.id]===`approved`?(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`#22c55e`},children:`✓ Approved`}),(0,T.jsx)(`button`,{onClick:()=>Z(e.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}):n[e.id]===`deferred`?(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`#c9b787`},children:`⏸ Deferred`}),(0,T.jsx)(`button`,{onClick:()=>Z(e.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}):(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono`,style:{color:`#ef4444`},children:`✕ Rejected`}),(0,T.jsx)(`button`,{onClick:()=>Z(e.id),className:`text-xs font-mono`,style:{color:`var(--color-a11oy-text-ghost)`,background:`none`,border:`none`,cursor:`pointer`},children:`undo`})]}):(0,T.jsxs)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[(0,T.jsx)(`button`,{onClick:()=>X(e.id,`approved`),className:`text-xs px-2.5 py-1 rounded`,style:{backgroundColor:`rgba(34,197,94,0.12)`,color:`#22c55e`,border:`1px solid rgba(34,197,94,0.25)`,cursor:`pointer`},children:`✓ Approve`}),(0,T.jsx)(`button`,{onClick:()=>X(e.id,`deferred`),className:`text-xs px-2.5 py-1 rounded`,style:{backgroundColor:`rgba(201,183,135,0.08)`,color:`#c9b787`,border:`1px solid rgba(201,183,135,0.2)`,cursor:`pointer`},children:`⏸ Defer`}),(0,T.jsx)(`button`,{onClick:()=>X(e.id,`rejected`),className:`text-xs px-2.5 py-1 rounded`,style:{backgroundColor:`rgba(239,68,68,0.08)`,color:`#ef4444`,border:`1px solid rgba(239,68,68,0.2)`,cursor:`pointer`},children:`✕ Reject`})]})]},e.id))})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(g,{children:`Outcome Scorecard`}),(0,T.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:K.map(e=>{let t=k[e.status]??E;return(0,T.jsxs)(`div`,{className:`flex items-center justify-between text-xs px-3 py-2 rounded-lg`,style:{backgroundColor:`var(--color-a11oy-card)`,border:`1px solid var(--color-a11oy-border)`},children:[(0,T.jsx)(`span`,{className:`truncate flex-1`,style:{color:`var(--color-a11oy-text-sub)`},children:e.title.slice(0,32)}),(0,T.jsx)(`span`,{className:`font-mono ml-2 flex-shrink-0`,style:{color:t},children:e.status.replace(/_/g,` `)})]},e.id)})})]})]})]}),(0,T.jsx)(`div`,{className:`mt-2 text-xs text-center`,style:{color:`var(--color-a11oy-text-ghost)`},children:H?`Live mode — connected to execution fabric.`:`Governed execution fabric — all approval decisions are cryptographically signed and logged to the Proof Ledger.`})]})}export{P as CommandSurface};