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,l as a,r as o,s,u as c}from"./ui-Ddu9t0Or.js";var l=e(t(),1),u=n(),d=`#c9b787`,f={sovereign:{color:`#22c55e`,label:`SOVEREIGN`,range:`900-1000`},trusted:{color:d,label:`TRUSTED`,range:`700-899`},provisional:{color:`#f97316`,label:`PROVISIONAL`,range:`500-699`},restricted:{color:`#ef4444`,label:`RESTRICTED`,range:`200-499`},untrusted:{color:`#7f1d1d`,label:`UNTRUSTED`,range:`0-199`}},p=[{id:`aid-cascade`,name:`Cascade Navigator`,spiffeUri:`spiffe://a11oy.szl/agents/cascade-navigator`,certFingerprint:`SHA256:9f:3a:b2:c1:d4:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6`,certIssued:`2026-03-01T00:00:00Z`,certExpires:`2027-03-01T00:00:00Z`,trustScore:970,trustTier:`sovereign`,behaviorBaseline:94.2,currentBehavior:96.8,driftPct:.4,driftStatus:`stable`,capabilities:[`eta-monitoring`,`port-cost-analysis`,`route-optimization`,`demurrage-calc`],permissions:[{action:`read:vessel-data`,scope:`all-vessels`,granted:!0},{action:`write:voyage-plan`,scope:`assigned-vessels`,granted:!0},{action:`execute:port-standby`,scope:`with-approval`,granted:!0},{action:`read:financial-data`,scope:`maritime-only`,granted:!0},{action:`execute:trade`,scope:`any`,granted:!1}],vertical:`vessels-maritime`,riskClassification:`High`,lastActivity:`2026-04-25T10:34:00Z`},{id:`aid-counsel`,name:`Counsel Sentinel`,spiffeUri:`spiffe://a11oy.szl/agents/counsel-sentinel`,certFingerprint:`SHA256:a1:b2:c3:d4:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6:d7`,certIssued:`2026-02-15T00:00:00Z`,certExpires:`2027-02-15T00:00:00Z`,trustScore:990,trustTier:`sovereign`,behaviorBaseline:97.4,currentBehavior:98.1,driftPct:.2,driftStatus:`stable`,capabilities:[`deadline-tracking`,`doc-review`,`matter-monitoring`,`risk-scoring`],permissions:[{action:`read:matter-records`,scope:`all-matters`,granted:!0},{action:`write:matter-status`,scope:`assigned-matters`,granted:!0},{action:`execute:escalation`,scope:`with-approval`,granted:!0},{action:`read:privileged-docs`,scope:`with-privilege-gate`,granted:!0},{action:`execute:filing`,scope:`any`,granted:!1}],vertical:`prism-counsel`,riskClassification:`Critical`,lastActivity:`2026-04-25T08:10:00Z`},{id:`aid-guardian`,name:`Guardian`,spiffeUri:`spiffe://a11oy.szl/agents/guardian`,certFingerprint:`SHA256:b2:c3:d4:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6:d7:e8`,certIssued:`2026-01-01T00:00:00Z`,certExpires:`2027-01-01T00:00:00Z`,trustScore:990,trustTier:`sovereign`,behaviorBaseline:98.1,currentBehavior:99,driftPct:.1,driftStatus:`stable`,capabilities:[`threat-intel`,`posture-assessment`,`incident-triage`,`perimeter-hardening`],permissions:[{action:`read:threat-feeds`,scope:`all-sources`,granted:!0},{action:`write:firewall-rules`,scope:`perimeter-only`,granted:!0},{action:`execute:auto-escalate`,scope:`up-to-HIGH`,granted:!0},{action:`execute:isolate-host`,scope:`with-ciso-approval`,granted:!0},{action:`read:classified`,scope:`any`,granted:!1}],vertical:`aegis-defense`,riskClassification:`Critical`,lastActivity:`2026-04-25T18:56:00Z`},{id:`aid-pipeline`,name:`Pipeline Oracle`,spiffeUri:`spiffe://a11oy.szl/agents/pipeline-oracle`,certFingerprint:`SHA256:c3:d4:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6:d7:e8:f9`,certIssued:`2026-03-15T00:00:00Z`,certExpires:`2027-03-15T00:00:00Z`,trustScore:910,trustTier:`sovereign`,behaviorBaseline:88.6,currentBehavior:91.2,driftPct:1.8,driftStatus:`watch`,capabilities:[`pipeline-analysis`,`deal-scoring`,`forecast-modeling`,`churn-prediction`],permissions:[{action:`read:crm-data`,scope:`all-accounts`,granted:!0},{action:`write:crm-activity`,scope:`assigned-accounts`,granted:!0},{action:`execute:outreach`,scope:`with-approval`,granted:!0},{action:`execute:deal-close`,scope:`any`,granted:!1},{action:`write:bulk-email`,scope:`any`,granted:!1}],vertical:`lyte-revenue`,riskClassification:`Medium`,lastActivity:`2026-04-25T09:25:00Z`},{id:`aid-terra`,name:`Terra Analyst`,spiffeUri:`spiffe://a11oy.szl/agents/terra-analyst`,certFingerprint:`SHA256:d4:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6:d7:e8:f9:a1`,certIssued:`2026-04-01T00:00:00Z`,certExpires:`2027-04-01T00:00:00Z`,trustScore:880,trustTier:`trusted`,behaviorBaseline:85,currentBehavior:88.4,driftPct:2.8,driftStatus:`watch`,capabilities:[`cap-rate-tracking`,`portfolio-analysis`,`valuation-modeling`,`comp-analysis`],permissions:[{action:`read:property-data`,scope:`portfolio-only`,granted:!0},{action:`write:valuation-model`,scope:`assigned-portfolios`,granted:!0},{action:`execute:loi-draft`,scope:`with-approval`,granted:!0},{action:`execute:acquisition`,scope:`any`,granted:!1}],vertical:`terra-real-estate`,riskClassification:`Medium`,lastActivity:`2026-04-25T16:45:00Z`},{id:`aid-watchdog`,name:`Fabric Watchdog`,spiffeUri:`spiffe://a11oy.szl/agents/fabric-watchdog`,certFingerprint:`SHA256:e5:f6:a7:b8:c9:d1:e2:f3:a4:b5:c6:d7:e8:f9:a1:b2`,certIssued:`2026-01-01T00:00:00Z`,certExpires:`2027-01-01T00:00:00Z`,trustScore:1e3,trustTier:`sovereign`,behaviorBaseline:100,currentBehavior:100,driftPct:0,driftStatus:`stable`,capabilities:[`health-probe`,`proof-verification`,`layer-monitoring`,`latency-tracking`],permissions:[{action:`read:all-metrics`,scope:`fabric-layers`,granted:!0},{action:`execute:health-check`,scope:`all-layers`,granted:!0},{action:`write:any`,scope:`any`,granted:!1}],vertical:`alloy-core`,riskClassification:`Low`,lastActivity:`2026-04-26T10:00:00Z`}],m={Critical:`#ef4444`,High:`#f97316`,Medium:d,Low:`#22c55e`},h={stable:`#22c55e`,watch:`#f97316`,drift:`#ef4444`},g=[{from:`aid-cascade`,to:`aid-guardian`,relation:`sanctions-verification`,strength:.95},{from:`aid-cascade`,to:`aid-counsel`,relation:`demurrage-clause-interp`,strength:.88},{from:`aid-counsel`,to:`aid-guardian`,relation:`privilege-gate-review`,strength:.82},{from:`aid-pipeline`,to:`aid-counsel`,relation:`contract-review`,strength:.78},{from:`aid-pipeline`,to:`aid-terra`,relation:`cross-vertical-pipeline`,strength:.72},{from:`aid-terra`,to:`aid-cascade`,relation:`port-adjacent-asset-impact`,strength:.65},{from:`aid-watchdog`,to:`aid-cascade`,relation:`health-monitoring`,strength:.99},{from:`aid-watchdog`,to:`aid-guardian`,relation:`health-monitoring`,strength:.99},{from:`aid-watchdog`,to:`aid-counsel`,relation:`health-monitoring`,strength:.99},{from:`aid-watchdog`,to:`aid-pipeline`,relation:`health-monitoring`,strength:.97},{from:`aid-watchdog`,to:`aid-terra`,relation:`health-monitoring`,strength:.97},{from:`aid-guardian`,to:`aid-cascade`,relation:`threat-intel-feed`,strength:.91}],_={"aid-watchdog":{x:340,y:40},"aid-cascade":{x:120,y:140},"aid-guardian":{x:540,y:140},"aid-counsel":{x:340,y:200},"aid-pipeline":{x:120,y:300},"aid-terra":{x:540,y:300}};function v(){let[e,t]=(0,l.useState)(null),[n,v]=(0,l.useState)(`registry`),y=p.find(t=>t.id===e);return(0,u.jsxs)(r,{children:[(0,u.jsx)(i,{label:`AGENT IDENTITY REGISTRY`,title:`Cryptographic Agent Identity`,subtitle:`Every A11oy agent has a cryptographic identity (SPIFFE URI + X.509 certificate), behavioral trust score, drift detection, and explicit authorization matrix.`,status:`LIVE`}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 mb-8`,children:[(0,u.jsx)(s,{label:`REGISTERED`,value:p.length,sub:`agents`,accent:d}),(0,u.jsx)(s,{label:`SOVEREIGN`,value:p.filter(e=>e.trustTier===`sovereign`).length,sub:`900+ trust`,accent:`#22c55e`}),(0,u.jsx)(s,{label:`AVG TRUST`,value:Math.round(p.reduce((e,t)=>e+t.trustScore,0)/p.length),sub:`out of 1000`,accent:d}),(0,u.jsx)(s,{label:`CERTS VALID`,value:`${p.length}/${p.length}`,sub:`all current`,accent:`#22c55e`}),(0,u.jsx)(s,{label:`DRIFT ALERTS`,value:p.filter(e=>e.driftStatus!==`stable`).length,sub:`watching`,accent:`#f97316`}),(0,u.jsx)(s,{label:`ZERO BYPASS`,value:`0`,sub:`no identity spoofing`,accent:d})]}),(0,u.jsx)(`div`,{className:`flex gap-1 mb-6`,children:[`registry`,`topology`].map(e=>(0,u.jsx)(`button`,{onClick:()=>v(e),className:`px-4 py-2 rounded-lg text-[10px] font-mono uppercase tracking-widest transition-all`,style:{backgroundColor:n===e?`${d}18`:`transparent`,color:n===e?d:`var(--color-a11oy-text-ghost)`,border:`1px solid ${n===e?`${d}30`:`transparent`}`},children:e===`registry`?`Identity Registry`:`Trust Topology`},e))}),n===`topology`&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c,{children:`Trust Topology Graph`}),(0,u.jsxs)(o,{className:`mb-6`,children:[(0,u.jsx)(`div`,{className:`text-[9px] font-mono uppercase tracking-widest mb-3`,style:{color:d},children:`AGENT TRUST RELATIONSHIPS`}),(0,u.jsxs)(`svg`,{viewBox:`0 0 680 360`,className:`w-full`,style:{maxHeight:400},children:[g.map((e,t)=>{let n=_[e.from],r=_[e.to];if(!n||!r)return null;let i=.15+e.strength*.45,a=e.relation===`health-monitoring`;return(0,u.jsx)(`line`,{x1:n.x,y1:n.y,x2:r.x,y2:r.y,stroke:a?`#22c55e`:d,strokeWidth:a?1:1.5,strokeOpacity:i,strokeDasharray:a?`4 4`:`none`},t)}),p.map(n=>{let r=_[n.id];if(!r)return null;let i=f[n.trustTier],a=e===n.id,o=n.trustTier===`sovereign`?22:18;return(0,u.jsxs)(`g`,{onClick:()=>t(a?null:n.id),style:{cursor:`pointer`},children:[(0,u.jsx)(`circle`,{cx:r.x,cy:r.y,r:o+4,fill:`${i.color}08`,stroke:`${i.color}20`,strokeWidth:a?2:0}),(0,u.jsx)(`circle`,{cx:r.x,cy:r.y,r:o,fill:`#0a0a0a`,stroke:i.color,strokeWidth:a?2.5:1.5}),(0,u.jsx)(`text`,{x:r.x,y:r.y-4,textAnchor:`middle`,fill:i.color,fontSize:8,fontFamily:`ui-monospace, monospace`,fontWeight:700,children:n.trustScore}),(0,u.jsx)(`text`,{x:r.x,y:r.y+7,textAnchor:`middle`,fill:`#8a8a8a`,fontSize:6,fontFamily:`ui-monospace, monospace`,children:i.label}),(0,u.jsx)(`text`,{x:r.x,y:r.y+o+14,textAnchor:`middle`,fill:`#f5f5f5`,fontSize:9,fontFamily:`ui-sans-serif, system-ui, sans-serif`,fontWeight:600,children:n.name}),(0,u.jsx)(`text`,{x:r.x,y:r.y+o+26,textAnchor:`middle`,fill:`#5e5e5e`,fontSize:7,fontFamily:`ui-monospace, monospace`,children:n.vertical})]},n.id)})]})]}),(0,u.jsxs)(c,{children:[`Trust Edges (`,g.length,`)`]}),(0,u.jsx)(`div`,{className:`grid sm:grid-cols-2 gap-3 mb-6`,children:g.filter(e=>e.relation!==`health-monitoring`).map((e,t)=>{let n=p.find(t=>t.id===e.from),r=p.find(t=>t.id===e.to);return(0,u.jsxs)(o,{children:[(0,u.jsxs)(`div`,{className:`flex items-center gap-2 text-xs mb-1`,children:[(0,u.jsx)(`span`,{className:`font-semibold`,style:{color:d},children:n?.name}),(0,u.jsx)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`→`}),(0,u.jsx)(`span`,{className:`font-semibold`,style:{color:d},children:r?.name})]}),(0,u.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,u.jsx)(`span`,{className:`font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:e.relation}),(0,u.jsxs)(`span`,{className:`font-mono`,style:{color:e.strength>=.85?`#22c55e`:e.strength>=.7?d:`#f97316`},children:[`strength: `,Math.round(e.strength*100),`%`]})]}),(0,u.jsx)(`div`,{className:`mt-1.5 h-1 rounded-full overflow-hidden`,style:{backgroundColor:`var(--color-a11oy-muted)`},children:(0,u.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${e.strength*100}%`,backgroundColor:e.strength>=.85?`#22c55e`:e.strength>=.7?d:`#f97316`}})})]},t)})})]}),n===`registry`&&(0,u.jsxs)(`div`,{className:`grid lg:grid-cols-3 gap-6`,children:[(0,u.jsxs)(`div`,{className:`lg:col-span-2`,children:[(0,u.jsxs)(c,{children:[`Identity Registry (`,p.length,`)`]}),(0,u.jsx)(`div`,{className:`grid sm:grid-cols-2 gap-3`,children:p.map(n=>{let r=f[n.trustTier],i=m[n.riskClassification],o=h[n.driftStatus],s=e===n.id;return(0,u.jsxs)(`div`,{className:`rounded-xl border p-4 cursor-pointer transition-all`,onClick:()=>t(s?null:n.id),style:{backgroundColor:s?`rgba(201,183,135,0.03)`:`var(--color-a11oy-card)`,borderColor:s?d:`var(--color-a11oy-border)`,borderLeft:`3px solid ${i}`},children:[(0,u.jsxs)(`div`,{className:`flex items-start justify-between gap-2 mb-2`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`text-sm font-semibold`,style:{color:`var(--color-a11oy-text)`},children:n.name}),(0,u.jsx)(`div`,{className:`text-[9px] font-mono truncate`,style:{color:`var(--color-a11oy-text-ghost)`,maxWidth:200},children:n.spiffeUri})]}),(0,u.jsx)(`span`,{className:`text-[9px] font-mono px-1.5 py-0.5 rounded flex-shrink-0`,style:{color:r.color,backgroundColor:`${r.color}15`},children:r.label})]}),(0,u.jsxs)(`div`,{className:`flex items-center justify-between mb-2 text-xs`,children:[(0,u.jsxs)(`span`,{className:`font-mono font-bold`,style:{color:r.color},children:[`Trust: `,n.trustScore]}),(0,u.jsxs)(`span`,{className:`font-mono`,style:{color:o},children:[`drift: `,n.driftPct,`%`]})]}),(0,u.jsx)(a,{value:n.trustScore,max:1e3,color:r.color}),(0,u.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:n.capabilities.slice(0,3).map(e=>(0,u.jsx)(`span`,{className:`text-[9px] px-1 py-0.5 rounded font-mono`,style:{backgroundColor:`var(--color-a11oy-muted)`,color:`var(--color-a11oy-text-ghost)`},children:e},e))})]},n.id)})})]}),(0,u.jsx)(`div`,{children:y?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(c,{children:[`Identity Detail — `,y.name]}),(0,u.jsx)(o,{children:(0,u.jsxs)(`div`,{className:`space-y-4 text-xs`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`SPIFFE URI`}),(0,u.jsx)(`div`,{className:`font-mono px-2 py-1.5 rounded`,style:{backgroundColor:`var(--color-a11oy-deep)`,border:`1px solid var(--color-a11oy-border)`,color:d,wordBreak:`break-all`},children:y.spiffeUri})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`CERT FINGERPRINT`}),(0,u.jsx)(`div`,{className:`font-mono px-2 py-1.5 rounded`,style:{backgroundColor:`var(--color-a11oy-deep)`,border:`1px solid var(--color-a11oy-border)`,color:`var(--color-a11oy-text-ghost)`,wordBreak:`break-all`,fontSize:10},children:y.certFingerprint})]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`ISSUED`}),(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-sub)`},children:new Date(y.certIssued).toLocaleDateString()})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`EXPIRES`}),(0,u.jsx)(`div`,{style:{color:`var(--color-a11oy-text-sub)`},children:new Date(y.certExpires).toLocaleDateString()})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`var(--color-a11oy-text-ghost)`},children:`BEHAVIORAL DRIFT`}),(0,u.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,u.jsxs)(`div`,{className:`flex-1`,children:[(0,u.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,u.jsxs)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:[`Baseline: `,y.behaviorBaseline,`%`]}),(0,u.jsxs)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:[`Current: `,y.currentBehavior,`%`]})]}),(0,u.jsx)(a,{value:y.currentBehavior,max:100,color:h[y.driftStatus]})]}),(0,u.jsx)(`span`,{className:`font-mono px-1.5 py-0.5 rounded`,style:{color:h[y.driftStatus],backgroundColor:`${h[y.driftStatus]}15`},children:y.driftStatus})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`font-mono mb-2`,style:{color:`var(--color-a11oy-text-ghost)`},children:`AUTHORIZATION MATRIX`}),(0,u.jsx)(`div`,{className:`space-y-1`,children:y.permissions.map((e,t)=>(0,u.jsxs)(`div`,{className:`flex items-center justify-between py-1 px-2 rounded`,style:{backgroundColor:`var(--color-a11oy-deep)`},children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{className:`font-mono`,style:{color:e.granted?`#22c55e`:`#ef4444`},children:e.granted?`✓`:`✗`}),(0,u.jsx)(`span`,{className:`ml-2`,style:{color:`var(--color-a11oy-text-sub)`},children:e.action})]}),(0,u.jsx)(`span`,{className:`font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:e.scope})]},t))})]})]})})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c,{children:`Trust Tier Definitions`}),(0,u.jsxs)(o,{children:[(0,u.jsx)(`div`,{className:`space-y-3 text-xs`,children:Object.entries(f).map(([e,t])=>(0,u.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,u.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,u.jsx)(`span`,{className:`w-2 h-2 rounded-full`,style:{backgroundColor:t.color}}),(0,u.jsx)(`span`,{className:`font-mono`,style:{color:t.color},children:t.label})]}),(0,u.jsx)(`span`,{className:`font-mono`,style:{color:`var(--color-a11oy-text-ghost)`},children:t.range})]},e))}),(0,u.jsx)(`div`,{className:`mt-4 p-2 rounded text-xs`,style:{backgroundColor:`rgba(201,183,135,0.06)`,border:`1px solid rgba(201,183,135,0.15)`,color:`var(--color-a11oy-text-ghost)`},children:`Trust scores are computed from behavioral consistency, proof completion rate, policy compliance, and drift metrics. Scores below 500 trigger automatic capability restriction.`})]})]})})]}),(0,u.jsxs)(`div`,{className:`mt-6 p-3 rounded-lg text-xs flex items-center gap-2`,style:{backgroundColor:`rgba(201,183,135,0.06)`,border:`1px solid rgba(201,183,135,0.15)`,color:`var(--color-a11oy-text-ghost)`},children:[(0,u.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-[var(--color-a11oy-blue)] flex-shrink-0`}),` Agent identities are SPIFFE-compliant (X.509 SVIDs) with mTLS enforcement. No agent operates without a valid, non-expired certificate.`]})]})}export{v as AgentIdentityRegistry}; |