PageSourceSearch

https://ucpplayground.com/build/assets/Conformance-CAbcGJUv.js

js ucpplayground.com collected 2026-09-24 14:19:59 UTC 12,531 bytes, 1 lines download raw bytes

1import{d as Z,r,q as ee,c as o,o as a,a as f,b as t,w as te,u as q,h as se,f as c,j as ae,v as ne,N as oe,n as z,t as i,F as h,i as k,k as b,x as A,g as P,I as le,B as ie,_ as ue}from"./app-C2kr94m-.js";import{H as re}from"./HelpChecks-Bac1H798.js";import{S as ce}from"./SiteHeader-Ze1Wz8ph.js";import{V as g}from"./Verdict-DXyABkBy.js";import{o as F,a as V}from"./outcomes-CZQVrV7d.js";import{g as B}from"./schemaQuality-BG4DwHdY.js";import"./MarketingUserDropdown-D75HZ6AA.js";import"./createLucideIcon-BqobmcYC.js";import"./users-DZwyA9a9.js";import"./clock-CEdMBVmc.js";import"./NavLinks-9v3_SVNY.js";const de={class:"ucp conformance-page"},ve={class:"content"},pe={class:"connect-row"},me=["disabled"],fe=["disabled"],he={key:0,class:"resolve-error"},ge={class:"facts-row"},ye={key:0,class:"mono-pill"},_e={key:1,class:"mono-pill"},ke={key:2,class:"mono-pill"},be={class:"summary-grid"},we={class:"group-card"},Ce={class:"group-head"},Se={key:0,class:"group-empty"},Ne={key:1,class:"group-empty"},$e={key:2,class:"group-empty"},Re={key:3,class:"tool-rows"},je=["open"],qe={class:"tool-summary"},Pe={class:"tool-name"},Te={key:0,class:"tool-issues"},xe={class:"group-card"},Ie={class:"group-head"},Ae={key:0,class:"group-empty"},Ee={key:1,class:"group-empty"},ze={key:2,class:"group-empty"},Fe={class:"group-note"},Ve={class:"group-card"},Be={class:"group-head"},Le={class:"group-desc"},Me=["href"],Oe={key:0,class:"group-empty"},Ue={key:1,class:"group-empty"},He=["href"],De={class:"funnel-tiles"},Ke={class:"funnel-tile"},We={class:"tile-value"},Je={class:"funnel-tile"},Xe={class:"tile-value"},Ge={class:"funnel-tile"},Qe={class:"tile-value"},Ye={class:"funnel-tile"},Ze={class:"tile-value"},et={class:"outcome-rows"},tt={class:"outcome-label"},st={class:"outcome-track"},at={class:"outcome-count"},nt={class:"recent-rows"},ot=["href"],lt={class:"recent-model"},it={class:"recent-meta"},ut={key:2,class:"hint-card"},rt=Z({__name:"Conformance",props:{domain:{}},setup(L){const M=L,O=ie(),T=b(()=>!!O.props.features?.tapSurfaces),p=r(M.domain??""),y=r(!1),E=r(!1),u=r(null),w=r(null),v=r(null),_=r(null),$=r(!1),d=r(null),m=r(null),R=r(!1),l=r(null),j=r(!1);function U(){return document.querySelector('meta[name="csrf-token"]')?.content??""}async function x(n,e){return fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-TOKEN":U()},body:JSON.stringify(e)})}async function I(){const n=p.value.trim();if(!(!n||y.value)){y.value=!0,E.value=!0,u.value=null,w.value=null,v.value=null,_.value=null,d.value=null,m.value=null,l.value=null,window.history.replaceState({},"",`/conformance?domain=${encodeURIComponent(n)}`);try{const e=await x("/conformance/resolve",{domain:n}),s=await e.json();if(!e.ok){w.value=s.message??"Could not resolve this domain.";return}u.value=s}catch{w.value="Network error — please try again.";return}finally{y.value=!1}H(),D(),K()}}async function H(){const n=u.value?.mcp_endpoint;if(n){$.value=!0;try{const e=await x("/conformance/schema",{endpoint:n}),s=await e.json();e.ok?v.value=s:_.value=s.message??"Tool listing failed."}catch{_.value="Network error while listing tools."}finally{$.value=!1}}}async function D(){if(!T.value)return;const n=u.value?.mcp_endpoint??u.value?.rest_endpoint;if(n){R.value=!0;try{const e=await x("/api/partner/probe",{scheme:"tap-browser-auth",depth:"full",url:n}),s=await e.json();e.ok?d.value=s:e.status===409?m.value=s.message??"Identity probing is not configured in this environment.":m.value=s.message??"Probe failed."}catch{m.value="Network error while probing."}finally{R.value=!1}}}async function K(){j.value=!0;try{const n=await fetch(`/conformance/funnel?domain=${encodeURIComponent(p.value.trim())}`,{headers:{Accept:"application/json"}});n.ok&&(l.value=await n.json())}finally{j.value=!1}}ee(()=>{p.value.trim()&&I()});const C=b(()=>{if(v.value){const n=v.value.schema_quality.overall;return{state:B(n.grade),value:`${n.grade} · ${n.score}`,detail:`${v.value.tool_count} tools · ${v.value.schema_quality.totalIssues} issues`}}return _.value?{state:"unknown",value:"Inconclusive",detail:"tool listing failed"}:u.value&&!u.value.mcp_endpoint?{state:"unknown",value:"No MCP surface",detail:"REST-only target"}
1:{state:"neutral",value:$.value?"Running…":"Not run",detail:"declared tool schemas"}}),W={enforced:"pass",partial:"partial",not_enforced:"fail",inconclusive:"unknown"},S=b(()=>d.value?{state:W[d.value.verdict]??"unknown",value:d.value.verdict_label,detail:"Trusted Agent Protocol probes"}:!T.value||m.value?{state:"neutral",value:"Not available",detail:m.value??"identity probes are not enabled here"}:{state:"neutral",value:R.value?"Probing…":"Not run",detail:"enforcement probes"}),N=b(()=>l.value?l.value.sessions===0?{state:"unknown",value:"No sessions",detail:"run one in the Agent first"}:l.value.checkouts>0?{state:"pass",value:`${l.value.checkout_rate}%`,detail:`checkout rate over ${l.value.sessions} sessions`}:{state:"partial",value:`${l.value.avg_completion}%`,detail:`avg completion, no checkouts in ${l.value.sessions} sessions`}:{state:"neutral",value:j.value?"Loading…":"Not run",detail:"your sessions against this target"}),J={presence:"unsigned request rejected",integrity:"tampered signature rejected",binding:"tampered context rejected",freshness:"expired signature rejected",replay:"replayed nonce rejected",key_resolution:"unknown key rejected"},X=b(()=>{if(!d.value)return[];const n=d.value.handshake,e=[{state:n.signature_attached?"pass":"fail",label:"signature attached (RFC 9421)",detail:'Trusted Agent Protocol · label "sig2"'},{state:n.key_recognised===null?"skip":n.key_recognised?"pass":"fail",label:"key resolved from directory",detail:n.key_source??(n.key_recognised===null?"not reached":void 0)},{state:n.accepted?"pass":"fail",label:"signed request accepted",detail:void 0}];for(const s of d.value.probes)e.push({state:s.enforced?"pass":"fail",label:J[s.dimension]??s.label,detail:`${s.note} · answered ${s.status}`});return e}),G=b(()=>{if(!l.value)return[];const n=l.value.sessions||1;return Object.entries(l.value.outcomes).map(([e,s])=>({outcome:e,label:F(e),state:V(e),count:s,pct:s/n*100}))});return(n,e)=>(a(),o(h,null,[f(q(se),{title:"Conformance"},{default:te(()=>[...e[1]||(e[1]=[t("meta",{name:"description",content:"Run the fixed conformance check groups against a UCP target: schema quality, identity enforcement, and funnel completion."},null,-1)])]),_:1}),t("div",de,[f(ce,{breadcrumbs:[{label:"Conformance"}]}),t("div",ve,[e[19]||(e[19]=t("header",{class:"page-head"},[t("span",{class:"ucp-label"},"Conformance"),t("h1",{class:"head-title"},"Does your target enforce what it declares?"),t("p",{class:"head-blurb"}," The fixed check groups, run against one target: schema quality, identity enforcement, and funnel completion. Checks render in full — a check that never ran shows a gray dot, and it is never a pass. ")],-1)),t("div",pe,[ae(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>p.value=s),type:"text",class:"domain-input",placeholder:"yourstore.com",disabled:y.value,onKeydown:oe(I,["enter"])},null,40,me),[[ne,p.value]]),t("button",{class:z(["run-btn",{"run-btn-dim":!p.value.trim()}]),disabled:y.value,onClick:I},i(y.value?"Resolving…":"Run checks"),11,fe)]),w.value?(a(),o("p",he,i(w.value),1)):c("",!0),u.value?(a(),o(h,{key:1},[t("div",ge,[u.value.mcp_endpoint?(a(),o("span",ye,[...e[2]||(e[2]=[t("span",{class:"fact-dot"},null,-1),k("MCP",-1)])])):c("",!0),u.value.rest_endpoint?(a(),o("span",_e,[...e[3]||(e[3]=[t("span",{class:"fact-dot"},null,-1),k("REST",-1)])])):c("",!0),u.value.capabilities.length?(a(),o("span",ke,i(u.value.capabilities.length)+" capabilities",1)):c("",!0),e[4]||(e[4]=t("span",{class:"facts-note"},"Facts, not grades — nothing about a pill says the target is good.",-1))]),t("div",be,[f(g,{label:"schema",state:C.value.state,value:C.value.value,detail:C.value.detail,size:"panel",mono:""},null,8,["state","value","detail"]),f(g,{label:"identity",state:S.value.state,value:S.value.value,detail:S.value.detail,size:"panel"},null,8,["state","value","detail"]),f(g,{label:"funnel",state:N.value.state,value:N.value.value,detail:N.value.detail,size:"panel",mono:""},null,8,["state","value","detail"])]),t("section",we,[t("div",Ce,[e[5]||(e[5]=t("span",{class:"group-title"},"Schema quality",-1)),v.value?(a(),A(g,{key:0,state:C.value.state,value:C.value.value,mono:"",dot:!1},null,8,["state","value"])):c("",!0)]),e[7]||(e[7]=t("p",{class:"group-desc"}
1,"Whether the declared tool schemas are unambiguous enough for an agent to act on without guessing.",-1)),$.value?(a(),o("div",Se,"Listing tools…")):_.value?(a(),o("div",Ne,i(_.value),1)):u.value&&!u.value.mcp_endpoint?(a(),o("div",$e," This target declares no MCP endpoint, so there is no tool surface to grade. That is an observation, not a failure. ")):v.value?(a(),o("div",Re,[(a(!0),o(h,null,P(v.value.schema_quality.tools,s=>(a(),o("details",{key:s.name,class:"tool-row",open:s.issues.length>0},[t("summary",qe,[t("span",Pe,i(s.name),1),e[6]||(e[6]=t("span",{class:"tool-spacer"},null,-1)),f(g,{state:q(B)(s.grade),value:`${s.grade} · ${s.score}`,size:"inline",mono:"",dot:!1},null,8,["state","value"])]),s.issues.length?(a(),o("ul",Te,[(a(!0),o(h,null,P(s.issues,(Q,Y)=>(a(),o("li",{key:Y},i(Q),1))),128))])):c("",!0)],8,je))),128))])):c("",!0)]),t("section",xe,[t("div",Ie,[e[8]||(e[8]=t("span",{class:"group-title"},"Identity enforcement",-1)),d.value?(a(),A(g,{key:0,state:S.value.state,value:S.value.value,dot:!1},null,8,["state","value"])):c("",!0)]),e[9]||(e[9]=t("p",{class:"group-desc"}," We send a valid signature, an unsigned request, and adversarial mutations — and record what the target did with each. Our checks describe our request; the verdict describes the target's answer. ",-1)),T.value?R.value?(a(),o("div",Ee,"Running probes…")):m.value?(a(),o("div",ze,i(m.value),1)):d.value?(a(),o(h,{key:3},[f(re,{items:X.value,class:"identity-checks"},null,8,["items"]),t("p",Fe,i(d.value.verdict_description),1)],64)):c("",!0):(a(),o("div",Ae,"Identity probes are not enabled in this environment."))]),t("section",Ve,[t("div",Be,[e[10]||(e[10]=t("span",{class:"group-title"},"Funnel completion",-1)),l.value&&l.value.sessions>0?(a(),A(g,{key:0,state:N.value.state,value:N.value.value,mono:"",dot:!1},null,8,["state","value"])):c("",!0)]),t("p",Le,[e[11]||(e[11]=k(" How far your own sessions against this target actually got. Read-only history — running a new session is the ",-1)),t("a",{class:"desc-link",href:`/agent?domain=${encodeURIComponent(p.value.trim())}`},"Agent's job",8,Me),e[12]||(e[12]=k(". ",-1))]),j.value?(a(),o("div",Oe,"Loading session history…")):l.value&&l.value.sessions===0?(a(),o("div",Ue,[e[13]||(e[13]=k(" No completed sessions against this target in your workspace yet. ",-1)),t("a",{class:"desc-link",href:`/agent?domain=${encodeURIComponent(p.value.trim())}`},"Run one in the Agent →",8,He)])):l.value?(a(),o(h,{key:2},[t("div",De,[t("div",Ke,[e[14]||(e[14]=t("span",{class:"ucp-label"},"Sessions",-1)),t("span",We,i(l.value.sessions),1)]),t("div",Je,[e[15]||(e[15]=t("span",{class:"ucp-label"},"Checkouts",-1)),t("span",Xe,i(l.value.checkouts),1)]),t("div",Ge,[e[16]||(e[16]=t("span",{class:"ucp-label"},"Checkout rate",-1)),t("span",Qe,i(l.value.checkout_rate)+"%",1)]),t("div",Ye,[e[17]||(e[17]=t("span",{class:"ucp-label"},"Avg completion",-1)),t("span",Ze,i(l.value.avg_completion)+"%",1)])]),t("div",et,[(a(!0),o(h,null,P(G.value,s=>(a(),o("div",{key:s.outcome,class:"outcome-row"},[t("span",tt,i(s.label),1),t("span",st,[t("span",{class:z(["outcome-fill",`outcome-fill--${s.state}`]),style:le({width:s.pct+"%"})},null,6)]),t("span",at,i(s.count),1)]))),128))]),t("div",nt,[(a(!0),o(h,null,P(l.value.recent,s=>(a(),o("a",{key:s.ulid,href:`/sessions/${s.ulid}`,class:"recent-row"},[t("span",lt,i(s.model),1),f(g,{state:q(V)(s.outcome),value:q(F)(s.outcome),size:"inline",dot:!1},null,8,["state","value"]),t("span",it,i(s.completion_rate)+"% · "+i(s.created_at),1)],8,ot))),128))])],64)):c("",!0)])],64)):c("",!0),E.value?c("",!0):(a(),o("div",ut,[...e[18]||(e[18]=[t("span",{class:"hint-title"},"Where do the verdicts come from?",-1),t("span",{class:"hint-body"},[k(" Every line is produced by a real request — a tool listing, a deliberately mutated signature, a session your workspace ran. Nothing is estimated. "),t("a",{class:"desc-link",href:"/docs"},"Read how each group is scored →")],-1)])]))])])],64))}}),bt=ue(rt,[["__scopeId","data-v-221e8f64"]]);export{bt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.