import{r as u,k as e}from"./index-BVfpSx5Q.js";import{L as j}from"./layout-NiehYZnq.js";import{P as N,K as x,S as i,C as p}from"./ui-DGkmnhL-.js";const t="#c9b787",m=[{id:"ac-cascade",name:"Cascade Navigator",description:"Maritime domain specialist — ETA monitoring, port cost analysis, route optimization, demurrage calculation.",vertical:"vessels-maritime",version:"2.4.1",capabilities:["eta-monitoring","port-cost-analysis","route-optimization","demurrage-calc"],inputModes:["application/json","text/plain"],outputModes:["application/json","application/a11oy-proof+json"],authSchemes:["mTLS","DPoP"],endpoint:"a11oy://agents/cascade-navigator",status:"registered",trustScore:970,origin:"internal"},{id:"ac-counsel",name:"Counsel Sentinel",description:"Legal domain specialist — deadline tracking, document status, matter monitoring, risk scoring.",vertical:"prism-counsel",version:"2.3.0",capabilities:["deadline-tracking","doc-review","matter-monitoring","risk-scoring"],inputModes:["application/json","text/plain"],outputModes:["application/json","application/a11oy-proof+json"],authSchemes:["mTLS","DPoP"],endpoint:"a11oy://agents/counsel-sentinel",status:"registered",trustScore:990,origin:"internal"},{id:"ac-guardian",name:"Guardian",description:"Defense domain specialist — threat intelligence, posture assessment, incident triage, perimeter hardening.",vertical:"aegis-defense",version:"3.1.0",capabilities:["threat-intel","posture-assessment","incident-triage","perimeter-hardening"],inputModes:["application/json","application/stix+json"],outputModes:["application/json","application/a11oy-proof+json"],authSchemes:["mTLS","DPoP","SPIFFE"],endpoint:"a11oy://agents/guardian",status:"registered",trustScore:990,origin:"internal"},{id:"ac-pipeline",name:"Pipeline Oracle",description:"Revenue domain specialist — pipeline analysis, deal scoring, forecast modeling, CRM monitoring.",vertical:"lyte-revenue",version:"2.1.0",capabilities:["pipeline-analysis","deal-scoring","forecast-modeling","churn-prediction"],inputModes:["application/json"],outputModes:["application/json","application/a11oy-proof+json"],authSchemes:["mTLS","DPoP"],endpoint:"a11oy://agents/pipeline-oracle",status:"registered",trustScore:910,origin:"internal"},{id:"ac-terra",name:"Terra Analyst",description:"Real estate domain specialist — cap rate tracking, portfolio analysis, valuation modeling.",vertical:"terra-real-estate",version:"1.8.2",capabilities:["cap-rate-tracking","portfolio-analysis","valuation-modeling","comp-analysis"],inputModes:["application/json"],outputModes:["application/json","application/a11oy-proof+json"],authSchemes:["mTLS"],endpoint:"a11oy://agents/terra-analyst",status:"registered",trustScore:880,origin:"internal"},{id:"ac-ext-visa",name:"Visa Risk Agent",description:"External financial risk assessment agent — transaction scoring, fraud pattern detection.",vertical:"finance",version:"1.0.0",capabilities:["txn-risk-scoring","fraud-detection","merchant-risk"],inputModes:["application/json"],outputModes:["application/json"],authSchemes:["OAuth2","mTLS"],endpoint:"https://agents.visa.com/risk-agent/v1",status:"discovered",trustScore:720,origin:"external"},{id:"ac-ext-mandiant",name:"Mandiant Threat Intel",description:"External threat intelligence agent — IOC enrichment, threat actor profiling, campaign attribution.",vertical:"security",version:"2.1.0",capabilities:["ioc-enrichment","threat-profiling","campaign-attribution"],inputModes:["application/stix+json","application/json"],outputModes:["application/stix+json"],authSchemes:["OAuth2","API-Key"],endpoint:"https://api.mandiant.com/a2a/v1",status:"negotiating",trustScore:810,origin:"external"}],r=[{id:"task-001",from:"Cascade Navigator",to:"Guardian",action:"Verify vessel sanctions clearance for MV Cascade",status:"completed",submittedAt:"2026-04-25T04:00:00Z",completedAt:"2026-04-25T04:02:12Z",proofHash:"sha256:a1b2c3"},{id:"task-002",from:"Pipeline Oracle",to:"Counsel Sentinel",action:"Review contract terms for Meridian renewal",status:"working",submittedAt:"2026-04-25T09:30:00Z",completedAt:null,proofHash:null},{id:"task-003",from:"Guardian",to:"Mandiant Threat Intel",action:"Enrich IOC set for TG-Ember campaign",status:"input-required",submittedAt:"2026-04-25T18:45:00Z",completedAt:null,proofHash:null},{id:"task-004",from:"Terra Analyst",to:"Pipeline Oracle",action:"Cross-reference port-adjacent asset impact on Q2 pipeline",status:"completed",submittedAt:"2026-04-24T14:00:00Z",completedAt:"2026-04-24T14:18:30Z",proofHash:"sha256:d4e5f6"},{id:"task-005",from:"Counsel Sentinel",to:"Cascade Navigator",action:"Provide demurrage clause interpretation for Talbot matter",status:"completed",submittedAt:"2026-04-24T08:10:00Z",completedAt:"2026-04-24T08:14:55Z",proofHash:"sha256:e5f6a7"},{id:"task-006",from:"Visa Risk Agent",to:"Guardian",action:"Correlate merchant risk scores with TG-Ember TTPs",status:"submitted",submittedAt:"2026-04-25T20:00:00Z",completedAt:null,proofHash:null}],g={submitted:{color:"#8a8a8a",bg:"rgba(138,138,138,0.1)"},working:{color:"#c9b787",bg:"rgba(201,183,135,0.1)"},"input-required":{color:"#f97316",bg:"rgba(249,115,22,0.1)"},completed:{color:"#22c55e",bg:"rgba(34,197,94,0.1)"},failed:{color:"#ef4444",bg:"rgba(239,68,68,0.1)"}},y={internal:{color:t,bg:`${t}15`},external:{color:"#8a8a8a",bg:"rgba(138,138,138,0.1)"}};function T(){const[l,v]=u.useState("cards"),[s,b]=u.useState(null),[c,f]=u.useState("all"),h=m.filter(o=>c==="all"||o.origin===c);return e.jsxs(j,{children:[e.jsx(N,{label:"A2A INTEROP",title:"Agent-to-Agent Protocol Layer",subtitle:"Every A11oy workcell publishes an Agent Card (JSON capability manifest) and can discover, negotiate, and exchange tasks with internal and external agents via the A2A protocol.",status:"LIVE"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8",children:[e.jsx(x,{label:"AGENT CARDS",value:m.length,sub:`${m.filter(o=>o.origin==="internal").length} internal · ${m.filter(o=>o.origin==="external").length} external`,accent:t}),e.jsx(x,{label:"A2A TASKS",value:r.length,sub:`${r.filter(o=>o.status==="completed").length} completed`,accent:t}),e.jsx(x,{label:"PROTOCOL",value:"v0.3",sub:"A2A + gRPC",accent:"#8a8a8a"}),e.jsx(x,{label:"PROOF COVERAGE",value:`${Math.round(r.filter(o=>o.proofHash).length/r.length*100)}%`,sub:`${r.filter(o=>o.proofHash).length}/${r.length} attested`,accent:r.every(o=>o.proofHash)?"#22c55e":t})]}),e.jsx("div",{className:"flex gap-1 mb-6",children:["cards","tasks","topology"].map(o=>e.jsx("button",{onClick:()=>v(o),className:"px-4 py-2 rounded-lg text-[10px] font-mono uppercase tracking-widest transition-all",style:{background:l===o?"rgba(201,183,135,0.1)":"transparent",color:l===o?t:"#5e5e5e",border:`1px solid ${l===o?"rgba(201,183,135,0.2)":"transparent"}`,cursor:"pointer"},children:o==="cards"?"Agent Cards":o==="tasks"?"Task Lifecycle":"Network Topology"},o))}),l==="cards"&&e.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("div",{className:"flex items-center gap-2 mb-4",children:["all","internal","external"].map(o=>e.jsx("button",{onClick:()=>f(o),className:"text-xs px-2.5 py-1 rounded font-mono",style:{backgroundColor:c===o?"rgba(201,183,135,0.12)":"var(--color-a11oy-muted)",color:c===o?t:"var(--color-a11oy-text-ghost)",border:`1px solid ${c===o?"rgba(201,183,135,0.25)":"transparent"}`,cursor:"pointer"},children:o},o))}),e.jsxs(i,{children:["Agent Card Registry (",h.length,")"]}),e.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:h.map(o=>{const a=y[o.origin];return e.jsxs("div",{className:"rounded-xl border p-4 cursor-pointer transition-all",onClick:()=>b(o),style:{backgroundColor:(s==null?void 0:s.id)===o.id?"rgba(201,183,135,0.03)":"var(--color-a11oy-card)",borderColor:(s==null?void 0:s.id)===o.id?t:"var(--color-a11oy-border)"},children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--color-a11oy-text)"},children:o.name}),e.jsxs("div",{className:"text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:["v",o.version]})]}),e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{color:a.color,backgroundColor:a.bg},children:o.origin})]}),e.jsxs("p",{className:"text-xs mb-3",style:{color:"var(--color-a11oy-text-sub)"},children:[o.description.slice(0,80),"…"]}),e.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[o.capabilities.slice(0,3).map(n=>e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-mono",style:{backgroundColor:"var(--color-a11oy-muted)",color:"var(--color-a11oy-text-ghost)"},children:n},n)),o.capabilities.length>3&&e.jsxs("span",{className:"text-[9px] px-1 py-0.5",style:{color:"var(--color-a11oy-text-ghost)"},children:["+",o.capabilities.length-3]})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("span",{className:"font-mono",style:{color:o.trustScore>=900?"#22c55e":o.trustScore>=700?t:"#f97316"},children:["Trust: ",o.trustScore]}),e.jsx("span",{className:"font-mono",style:{color:o.status==="registered"?"#22c55e":o.status==="discovered"?t:"#f97316"},children:o.status})]})]},o.id)})})]}),e.jsx("div",{children:s?e.jsxs(e.Fragment,{children:[e.jsxs(i,{children:["Agent Card — ",s.name]}),e.jsxs(p,{children:[e.jsx("div",{className:"text-sm font-semibold mb-1",style:{color:"var(--color-a11oy-text)"},children:s.name}),e.jsx("p",{className:"text-xs mb-4",style:{color:"var(--color-a11oy-text-sub)"},children:s.description}),e.jsxs("div",{className:"space-y-3 text-xs",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"ENDPOINT"}),e.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:t,wordBreak:"break-all"},children:s.endpoint})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"CAPABILITIES"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.capabilities.map(o=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:`${t}12`,color:t},children:o},o))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"INPUT MODES"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.inputModes.map(o=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--color-a11oy-muted)",color:"var(--color-a11oy-text-ghost)"},children:o},o))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"OUTPUT MODES"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.outputModes.map(o=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--color-a11oy-muted)",color:"var(--color-a11oy-text-ghost)"},children:o},o))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"AUTH SCHEMES"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.authSchemes.map(o=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:"rgba(34,197,94,0.08)",color:"#22c55e"},children:o},o))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"TRUST SCORE"}),e.jsxs("div",{className:"font-mono text-lg font-bold",style:{color:s.trustScore>=900?"#22c55e":t},children:[s.trustScore,"/1000"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"VERSION"}),e.jsxs("div",{className:"font-mono",style:{color:"var(--color-a11oy-text-sub)"},children:["v",s.version]})]})]})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(i,{children:"Protocol Specification"}),e.jsx(p,{children:e.jsx("div",{className:"space-y-3 text-xs",children:[{label:"Protocol",value:"A2A v0.3 (Linux Foundation)"},{label:"Transport",value:"HTTPS + gRPC bidirectional streaming"},{label:"Discovery",value:"Agent Cards (JSON capability manifests)"},{label:"Auth",value:"mTLS + DPoP token binding"},{label:"Task Model",value:"submitted → working → input-required → completed"},{label:"Proof",value:"Every A2A task attested in Proof Ledger"}].map(o=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:o.label}),e.jsx("span",{className:"font-mono",style:{color:t},children:o.value})]},o.label))})})]})})]}),l==="tasks"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{children:["A2A Task Lifecycle (",r.length,")"]}),e.jsx("div",{className:"flex flex-col gap-3",children:r.map(o=>{const a=g[o.status];return e.jsx(p,{children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{color:a.color,backgroundColor:a.bg},children:o.status.toUpperCase()}),e.jsx("span",{className:"text-xs font-mono",style:{color:"var(--color-a11oy-text-ghost)"},children:o.id})]}),e.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--color-a11oy-text)"},children:o.action}),e.jsxs("div",{className:"text-xs flex items-center gap-2",style:{color:"var(--color-a11oy-text-ghost)"},children:[e.jsx("span",{style:{color:t},children:o.from}),e.jsx("span",{children:"→"}),e.jsx("span",{style:{color:t},children:o.to})]})]}),e.jsxs("div",{className:"text-right text-xs flex-shrink-0",children:[o.proofHash&&e.jsx("div",{className:"font-mono mb-1",style:{color:"#22c55e"},children:o.proofHash}),e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:new Date(o.submittedAt).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})},o.id)})}),e.jsxs("div",{className:"mt-6",children:[e.jsx(i,{children:"Task State Machine"}),e.jsxs(p,{children:[e.jsx("div",{className:"flex items-center gap-2 flex-wrap text-xs font-mono",children:["submitted","working","input-required","completed"].map((o,a)=>{const n=g[o];return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"px-2 py-1 rounded",style:{color:n.color,backgroundColor:n.bg},children:o}),a<3&&e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:"→"})]},o)})}),e.jsx("p",{className:"text-xs mt-3",style:{color:"var(--color-a11oy-text-sub)"},children:"Every state transition is logged to the Proof Ledger. Failed tasks trigger automatic retry with exponential backoff. Input-required tasks hold until the requesting agent provides additional context."})]})]})]}),l==="topology"&&e.jsxs(e.Fragment,{children:[e.jsx(i,{children:"A2A Network Topology"}),e.jsxs(p,{children:[e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:m.map(o=>{const a=y[o.origin],n=r.filter(d=>d.from===o.name||d.to===o.name);return e.jsxs("div",{className:"rounded-lg border p-3",style:{borderColor:"var(--color-a11oy-border)",backgroundColor:"var(--color-a11oy-deep)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs font-semibold",style:{color:"var(--color-a11oy-text)"},children:o.name}),e.jsx("span",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:a.color,backgroundColor:a.bg},children:o.origin})]}),e.jsxs("div",{className:"text-xs mb-2",style:{color:"var(--color-a11oy-text-ghost)"},children:[n.length," connections"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:o.authSchemes.map(d=>e.jsx("span",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{backgroundColor:"rgba(34,197,94,0.08)",color:"#22c55e"},children:d},d))})]},o.id)})}),e.jsx(i,{children:"Connection Matrix"}),e.jsx("div",{className:"rounded-lg border overflow-hidden",style:{borderColor:"var(--color-a11oy-border)"},children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:"var(--color-a11oy-deep)"},children:["From","To","Tasks","Protocol","Status"].map(o=>e.jsx("th",{className:"text-left px-3 py-2 font-mono uppercase tracking-wide",style:{color:"var(--color-a11oy-text-ghost)",fontSize:"10px"},children:o},o))})}),e.jsx("tbody",{children:r.map((o,a)=>e.jsxs("tr",{style:{backgroundColor:a%2===0?"var(--color-a11oy-card)":"var(--color-a11oy-deep)",borderBottom:"1px solid var(--color-a11oy-border)"},children:[e.jsx("td",{className:"px-3 py-2",style:{color:t},children:o.from}),e.jsx("td",{className:"px-3 py-2",style:{color:t},children:o.to}),e.jsxs("td",{className:"px-3 py-2 font-mono",style:{color:"var(--color-a11oy-text-sub)"},children:[o.action.slice(0,40),"…"]}),e.jsx("td",{className:"px-3 py-2 font-mono",style:{color:"#22c55e"},children:"mTLS + A2A"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{color:g[o.status].color,backgroundColor:g[o.status].bg},children:o.status})})]},o.id))})]})})]})]}),e.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:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--color-a11oy-blue)] flex-shrink-0"})," A2A protocol governed by A11oy doctrine — every inter-agent exchange is attested, consent-gated, and proof-carrying."]})]})}export{T as A2AInterop};