qyl-mcp-server 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,70 +6,56 @@
6
6
  <meta name="color-scheme" content="dark">
7
7
  <link rel="icon" href="data:,">
8
8
  <title>qyl · observe graph</title>
9
- <script type="module" crossorigin>var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=Object.defineProperty,r=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),i=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t&&n(r,Symbol.toStringTag,{value:`Module`}),r},a=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]);function o(e){return typeof e==`string`&&a.has(e.replace(/#$/,``))}var s,c=Object.freeze({status:`aborted`});function l(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var u=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},d=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(s=globalThis).__zod_globalConfig??(s.__zod_globalConfig={});var f=globalThis.__zod_globalConfig;function p(e){return e&&Object.assign(f,e),f}function m(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function h(e,t){return typeof t==`bigint`?t.toString():t}function ee(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function g(e){return e==null}function te(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ne(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var re=Symbol(`evaluating`);function _(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==re)return r===void 0&&(r=re,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ie(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ae(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function oe(e){return JSON.stringify(e)}function se(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ce=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function le(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ue=ee(()=>{if(f.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function de(e){if(le(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(le(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function fe(e){return de(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var pe=new Set([`string`,`number`,`symbol`]),me=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function he(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ge(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function v(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _e(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ve={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ye={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function be(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return ge(e,ae(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return ie(this,`shape`,e),e},checks:[]}))}function xe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return ge(e,ae(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return ie(this,`shape`,r),r},checks:[]}))}function Se(e,t){if(!de(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ge(e,ae(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ie(this,`shape`,n),n}}))}function Ce(e,t){if(!de(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ge(e,ae(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ie(this,`shape`,n),n}}))}function we(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return ge(e,ae(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ie(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Te(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ge(t,ae(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return ie(this,`shape`,i),i},checks:[]}))}function Ee(e,t,n){return ge(t,ae(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return ie(this,`shape`,i),i}}))}function De(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Oe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ke(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ae(e){return typeof e==`string`?e:e?.message}function y(e,t,n){let r=e.message?e.message:Ae(e.inst?._zod.def?.error?.(e))??Ae(t?.error?.(e))??Ae(n.customError?.(e))??Ae(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function je(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Me(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ne(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Pe=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,h,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=l(`$ZodError`,Pe),Ie=l(`$ZodError`,Pe,{Parent:Error});function Le(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Re(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var ze=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new u;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>y(e,a,p())));throw ce(t,i?.callee),t}return o.value},Be=ze(Ie),Ve=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>y(e,a,p())));throw ce(t,i?.callee),t}return o.value},He=Ve(Ie),Ue=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new u;return a.issues.length?{success:!1,error:new(e??Fe)(a.issues.map(e=>y(e,i,p())))}:{success:!0,data:a.value}},We=Ue(Ie),Ge=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>y(e,i,p())))}:{success:!0,data:a.value}},Ke=Ge(Ie),qe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ze(e)(t,n,i)},Je=e=>(t,n,r)=>ze(e)(t,n,r),Ye=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ve(e)(t,n,i)},Xe=e=>async(t,n,r)=>Ve(e)(t,n,r),Ze=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ue(e)(t,n,i)},Qe=e=>(t,n,r)=>Ue(e)(t,n,r),$e=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ge(e)(t,n,i)},et=e=>async(t,n,r)=>Ge(e)(t,n,r),tt=t({base64:()=>Dt,base64url:()=>Ot,bigint:()=>zt,boolean:()=>Ht,browserEmail:()=>yt,cidrv4:()=>Tt,cidrv6:()=>Et,cuid:()=>nt,cuid2:()=>rt,date:()=>Pt,datetime:()=>Lt,domain:()=>At,duration:()=>b,e164:()=>Mt,email:()=>mt,emoji:()=>xt,extendedDuration:()=>ct,guid:()=>lt,hex:()=>qt,hostname:()=>kt,html5Email:()=>ht,httpProtocol:()=>jt,idnEmail:()=>vt,integer:()=>Bt,ipv4:()=>St,ipv6:()=>Ct,ksuid:()=>ot,lowercase:()=>Gt,mac:()=>wt,md5_base64:()=>Zt,md5_base64url:()=>Qt,md5_hex:()=>Xt,nanoid:()=>st,null:()=>Ut,number:()=>Vt,rfc5322Email:()=>gt,sha1_base64:()=>en,sha1_base64url:()=>tn,sha1_hex:()=>$t,sha256_base64:()=>rn,sha256_base64url:()=>an,sha256_hex:()=>nn,sha384_base64:()=>sn,sha384_base64url:()=>cn,sha384_hex:()=>on,sha512_base64:()=>un,sha512_base64url:()=>dn,sha512_hex:()=>ln,string:()=>Rt,time:()=>It,ulid:()=>it,undefined:()=>Wt,unicodeEmail:()=>_t,uppercase:()=>Kt,uuid:()=>ut,uuid4:()=>dt,uuid6:()=>ft,uuid7:()=>pt,xid:()=>at}),nt=/^[cC][0-9a-z]{6,}$/,rt=/^[0-9a-z]+$/,it=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,at=/^[0-9a-vA-V]{20}$/,ot=/^[A-Za-z0-9]{27}$/,st=/^[a-zA-Z0-9_-]{21}$/,b=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ct=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,lt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ut=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dt=ut(4),ft=ut(6),pt=ut(7),mt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ht=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,gt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,_t=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,vt=_t,yt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function xt(){return new RegExp(bt,`u`)}var St=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wt=e=>{let t=he(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Tt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Et=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ot=/^[A-Za-z0-9_-]*$/,kt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,At=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,jt=/^https?$/,Mt=/^\+[1-9]\d{6,14}$/,Nt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Pt=RegExp(`^${Nt}$`);function Ft(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function It(e){return RegExp(`^${Ft(e)}$`)}function Lt(e){let t=Ft({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Nt}T(?:${r})$`)}var Rt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},zt=/^-?\d+n?$/,Bt=/^-?\d+$/,Vt=/^-?\d+(?:\.\d+)?$/,Ht=/^(?:true|false)$/i,Ut=/^null$/i,Wt=/^undefined$/i,Gt=/^[^A-Z]*$/,Kt=/^[^a-z]*$/,qt=/^[0-9a-fA-F]*$/;function Jt(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Yt(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Xt=/^[0-9a-fA-F]{32}$/,Zt=Jt(22,`==`),Qt=Yt(22),$t=/^[0-9a-fA-F]{40}$/,en=Jt(27,`=`),tn=Yt(27),nn=/^[0-9a-fA-F]{64}$/,rn=Jt(43,`=`),an=Yt(43),on=/^[0-9a-fA-F]{96}$/,sn=Jt(64,``),cn=Yt(64),ln=/^[0-9a-fA-F]{128}$/,un=Jt(86,`==`),dn=Yt(86),x=l(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fn={number:`number`,bigint:`bigint`,object:`date`},pn=l(`$ZodCheckLessThan`,(e,t)=>{x.init(e,t);let n=fn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mn=l(`$ZodCheckGreaterThan`,(e,t)=>{x.init(e,t);let n=fn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hn=l(`$ZodCheckMultipleOf`,(e,t)=>{x.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ne(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),gn=l(`$ZodCheckNumberFormat`,(e,t)=>{x.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ve[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Bt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),_n=l(`$ZodCheckBigIntFormat`,(e,t)=>{x.init(e,t);let[n,r]=ye[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),vn=l(`$ZodCheckMaxSize`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:je(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yn=l(`$ZodCheckMinSize`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:je(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bn=l(`$ZodCheckSizeEquals`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:je(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xn=l(`$ZodCheckMaxLength`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Me(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sn=l(`$ZodCheckMinLength`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Me(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=l(`$ZodCheckLengthEquals`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Me(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wn=l(`$ZodCheckStringFormat`,(e,t)=>{var n,r;x.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tn=l(`$ZodCheckRegex`,(e,t)=>{wn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),En=l(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Gt,wn.init(e,t)}),Dn=l(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Kt,wn.init(e,t)}),On=l(`$ZodCheckIncludes`,(e,t)=>{x.init(e,t);let n=he(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kn=l(`$ZodCheckStartsWith`,(e,t)=>{x.init(e,t);let n=RegExp(`^${he(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),An=l(`$ZodCheckEndsWith`,(e,t)=>{x.init(e,t);let n=RegExp(`.*${he(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function jn(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues))}var Mn=l(`$ZodCheckProperty`,(e,t)=>{x.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>jn(n,e,t.property));jn(n,e,t.property)}}),Nn=l(`$ZodCheckMimeType`,(e,t)=>{x.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Pn=l(`$ZodCheckOverwrite`,(e,t)=>{x.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Fn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
10
- `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
11
- `))}},In={major:4,minor:4,patch:3},S=l(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=In;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=De(e),i;for(let a of t){if(a._zod.def.when){if(Oe(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new u;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=De(e,t))});else{if(e.issues.length===t)continue;r||=De(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(De(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new u;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new u;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_(e,`~standard`,()=>({validate:t=>{try{let n=We(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ke(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ln=l(`$ZodString`,(e,t)=>{S.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),C=l(`$ZodStringFormat`,(e,t)=>{wn.init(e,t),Ln.init(e,t)}),Rn=l(`$ZodGUID`,(e,t)=>{t.pattern??=lt,C.init(e,t)}),zn=l(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ut(e)}else t.pattern??=ut();C.init(e,t)}),Bn=l(`$ZodEmail`,(e,t)=>{t.pattern??=mt,C.init(e,t)}),Vn=l(`$ZodURL`,(e,t)=>{C.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===jt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Hn=l(`$ZodEmoji`,(e,t)=>{t.pattern??=xt(),C.init(e,t)}),Un=l(`$ZodNanoID`,(e,t)=>{t.pattern??=st,C.init(e,t)}),Wn=l(`$ZodCUID`,(e,t)=>{t.pattern??=nt,C.init(e,t)}),Gn=l(`$ZodCUID2`,(e,t)=>{t.pattern??=rt,C.init(e,t)}),Kn=l(`$ZodULID`,(e,t)=>{t.pattern??=it,C.init(e,t)}),qn=l(`$ZodXID`,(e,t)=>{t.pattern??=at,C.init(e,t)}),Jn=l(`$ZodKSUID`,(e,t)=>{t.pattern??=ot,C.init(e,t)}),Yn=l(`$ZodISODateTime`,(e,t)=>{t.pattern??=Lt(t),C.init(e,t)}),Xn=l(`$ZodISODate`,(e,t)=>{t.pattern??=Pt,C.init(e,t)}),Zn=l(`$ZodISOTime`,(e,t)=>{t.pattern??=It(t),C.init(e,t)}),Qn=l(`$ZodISODuration`,(e,t)=>{t.pattern??=b,C.init(e,t)}),$n=l(`$ZodIPv4`,(e,t)=>{t.pattern??=St,C.init(e,t),e._zod.bag.format=`ipv4`}),er=l(`$ZodIPv6`,(e,t)=>{t.pattern??=Ct,C.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),tr=l(`$ZodMAC`,(e,t)=>{t.pattern??=wt(t.delimiter),C.init(e,t),e._zod.bag.format=`mac`}),nr=l(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Tt,C.init(e,t)}),rr=l(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Et,C.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function ir(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var ar=l(`$ZodBase64`,(e,t)=>{t.pattern??=Dt,C.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function or(e){if(!Ot.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return ir(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var sr=l(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ot,C.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{or(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),cr=l(`$ZodE164`,(e,t)=>{t.pattern??=Mt,C.init(e,t)});function lr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ur=l(`$ZodJWT`,(e,t)=>{C.init(e,t),e._zod.check=n=>{lr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),dr=l(`$ZodCustomStringFormat`,(e,t)=>{C.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),fr=l(`$ZodNumber`,(e,t)=>{S.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),pr=l(`$ZodNumberFormat`,(e,t)=>{gn.init(e,t),fr.init(e,t)}),mr=l(`$ZodBoolean`,(e,t)=>{S.init(e,t),e._zod.pattern=Ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),hr=l(`$ZodBigInt`,(e,t)=>{S.init(e,t),e._zod.pattern=zt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),gr=l(`$ZodBigIntFormat`,(e,t)=>{_n.init(e,t),hr.init(e,t)}),_r=l(`$ZodSymbol`,(e,t)=>{S.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),vr=l(`$ZodUndefined`,(e,t)=>{S.init(e,t),e._zod.pattern=Wt,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),yr=l(`$ZodNull`,(e,t)=>{S.init(e,t),e._zod.pattern=Ut,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),br=l(`$ZodAny`,(e,t)=>{S.init(e,t),e._zod.parse=e=>e}),xr=l(`$ZodUnknown`,(e,t)=>{S.init(e,t),e._zod.parse=e=>e}),Sr=l(`$ZodNever`,(e,t)=>{S.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Cr=l(`$ZodVoid`,(e,t)=>{S.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),wr=l(`$ZodDate`,(e,t)=>{S.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function Tr(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues)),t.value[n]=e.value}var Er=l(`$ZodArray`,(e,t)=>{S.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Tr(t,n,e))):Tr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Dr(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...ke(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Or(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=_e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function kr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Dr(e,n,i,t,u,d))):Dr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Ar=l(`$ZodObject`,(e,t)=>{if(S.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=ee(()=>Or(t));_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=le,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Dr(n,t,e,s,r,i))):Dr(a,t,e,s,r,i)}return i?kr(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),jr=l(`$ZodObjectJIT`,(e,t)=>{Ar.init(e,t);let n=e._zod.parse,r=ee(()=>Or(t)),i=e=>{let t=new Fn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=oe(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=oe(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
12
- if (${n}.issues.length) {
13
- if (${o} in input) {
14
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
15
- ...iss,
16
- path: iss.path ? [${o}, ...iss.path] : [${o}]
17
- })));
9
+ <script type="module" crossorigin>var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=Object.defineProperty,r=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),i=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t&&n(r,Symbol.toStringTag,{value:`Module`}),r},a=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]);function o(e){return typeof e==`string`&&a.has(e.replace(/#$/,``))}function s(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function c(e,t=`|`){return e.map(e=>fe(e)).join(t)}function l(e,t){return typeof t==`bigint`?t.toString():t}function u(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function d(e){return e==null}function f(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function p(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var m=Symbol(`evaluating`);function ee(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==m)return r===void 0&&(r=m,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function g(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ae=u(()=>{if(x.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function oe(e){if(ie(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ie(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function se(e){return oe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ce=new Set([`string`,`number`,`symbol`]),le=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function de(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function _(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function fe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function pe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var me={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},he={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function ge(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return de(e,g(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&h(e,r,n.shape[r])}return h(this,`shape`,e),e},checks:[]}))}function _e(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return de(e,g(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return h(this,`shape`,r),r},checks:[]}))}function ve(e,t){if(!oe(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return de(e,g(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return h(this,`shape`,n),n}}))}function ye(e,t){if(!oe(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return de(e,g(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return h(this,`shape`,n),n}}))}function be(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return de(e,g(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return h(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function xe(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return de(t,g(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return h(this,`shape`,i),i},checks:[]}))}function Se(e,t,n){return de(t,g(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return h(this,`shape`,i),i}}))}function Ce(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function we(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function v(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Te(e){return typeof e==`string`?e:e?.message}function Ee(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function De(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Te(e.inst?._zod.def?.error?.(e))??Te(a?.(e))??Te(t?.error?.(e))??Te(n.customError?.(e))??Te(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}function Oe(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var ke=/[\uD800-\uDBFF]/;function Ae(e){let t=e.length;if(!ke.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function je(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Me(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ne(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Pe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Le(e,n,r.value)}}function Fe(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ie(e,t,n){return Fe(e,t,n,!1)}function Le(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return Fe(this,t,n.bind(this))},set(e){Fe(this,t,e)}})}function Re(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ze,Be=!1,Ve={configurable:!0,get(){Be=!0}};function y(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&ze!==e._zod){ze=void 0;return}ze=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ve);let e=Be;Be=!1;try{let r=n(this);return Be?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Be||=e,r}catch(n){throw delete this[t],Be||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function He(e,t,n,r){let i=Re(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ue=`~constantCatch`;function We(e){let t=()=>e;return t[Ue]=!0,t}var Ge,Ke=Object.freeze({status:`aborted`}),qe={value:void 0,enumerable:!1},Je=`captureStackTrace`in Error?Error:null;function Ye(e){let t=Je;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Je=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){qe.value=new a(r);try{Object.defineProperty(n,"_zod",qe)}finally{qe.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Pe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ye(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Xe=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ze=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ge=globalThis).__zod_globalConfig??(Ge.__zod_globalConfig={});var x=globalThis.__zod_globalConfig;function S(e){return e&&Object.assign(x,e),x}function Qe(){let e=this._zod;return e.message??=JSON.stringify(e.def,l,2),e.message}function $e(e){this._zod.message=e}var et={get:Qe,set:$e,enumerable:!0,configurable:!0},tt={value:void 0,enumerable:!1},nt={value:void 0,enumerable:!1},rt=new WeakSet([Object.prototype,Error.prototype]),it=(e,t)=>{e.name=`$ZodError`,tt.value=e._zod,Object.defineProperty(e,"_zod",tt),nt.value=t,Object.defineProperty(e,"issues",nt),tt.value=void 0,nt.value=void 0,Object.defineProperty(e,"message",et);let n=Object.getPrototypeOf(e);rt.has(n)||(rt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},C=b(`$ZodError`,it),at=b(`$ZodError`,it,void 0,{Parent:Error});function ot(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function st(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ot(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ct(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var ut=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Xe;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>De(e,o,S())));throw re(n,a?.callee??t),n}return s.value};return t},dt=ut(at),ft=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>De(e,o,S())));throw re(n,a?.callee??t),n}return s.value};return t},pt=ft(at),mt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Xe;return a.issues.length?{success:!1,error:new(e??C)(a.issues.map(e=>De(e,i,S())))}:{success:!0,data:a.value}},ht=mt(at),gt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>De(e,i,S())))}:{success:!0,data:a.value}},_t=gt(at),vt=e=>{let t=ut(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,lt(n,a))};return n},yt=e=>{let t=ut(e),n=(e,r,i,a)=>t(e,r,i,lt(n,a));return n},bt=e=>{let t=ft(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,lt(n,a))};return n},xt=e=>{let t=ft(e),n=async(e,r,i,a)=>await t(e,r,i,lt(n,a));return n},St=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mt(e)(t,n,i)},Ct=e=>(t,n,r)=>mt(e)(t,n,r),wt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gt(e)(t,n,i)},Tt=e=>async(t,n,r)=>gt(e)(t,n,r),Et=t({base64:()=>en,base64url:()=>tn,bigint:()=>hn,boolean:()=>vn,browserEmail:()=>Kt,cidrv4:()=>Qt,cidrv6:()=>$t,creditCard:()=>sn,cuid:()=>Dt,cuid2:()=>Ot,date:()=>un,datetime:()=>pn,domain:()=>rn,duration:()=>Pt,e164:()=>on,email:()=>Vt,emoji:()=>Jt,extendedDuration:()=>Ft,guid:()=>It,hex:()=>Cn,hostname:()=>nn,html5Email:()=>Ht,httpProtocol:()=>an,idnEmail:()=>Gt,integer:()=>gn,ipv4:()=>Yt,ipv6:()=>Xt,ksuid:()=>jt,lowercase:()=>xn,mac:()=>Zt,md5_base64:()=>Dn,md5_base64url:()=>On,md5_hex:()=>En,nanoid:()=>Mt,nanoidOfLength:()=>Nt,null:()=>yn,number:()=>_n,rfc5322Email:()=>Ut,sha1_base64:()=>An,sha1_base64url:()=>jn,sha1_hex:()=>kn,sha256_base64:()=>Nn,sha256_base64url:()=>Pn,sha256_hex:()=>Mn,sha384_base64:()=>In,sha384_base64url:()=>Ln,sha384_hex:()=>Fn,sha512_base64:()=>zn,sha512_base64url:()=>Bn,sha512_hex:()=>Rn,string:()=>mn,time:()=>fn,ulid:()=>kt,undefined:()=>bn,unicodeEmail:()=>Wt,uppercase:()=>Sn,uuid:()=>Lt,uuid4:()=>Rt,uuid6:()=>zt,uuid7:()=>Bt,xid:()=>At}),Dt=/^[cC][0-9a-z]{6,}$/,Ot=/^[0-9a-z]+$/,kt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,At=/^[0-9a-vA-V]{20}$/,jt=/^[A-Za-z0-9]{27}$/,Mt=/^[a-zA-Z0-9_-]{21}$/;function Nt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Pt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ft=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,It=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Lt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Rt=Lt(4),zt=Lt(6),Bt=Lt(7),Vt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ht=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ut=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Wt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Gt=Wt,Kt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Jt(){return new RegExp(qt,`u`)}var Yt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Zt=e=>{let t=ue(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Qt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$t=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,en=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tn=/^[A-Za-z0-9_-]*$/,nn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,rn=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,an=/^https?$/,on=/^\+[1-9]\d{6,14}$/,sn=/^\d(?:[ -]?\d){11,18}$/,cn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function ln(e){return RegExp(`^${e}$`)}var un=ln(cn);function dn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function fn(e){return RegExp(`^${dn(e)}$`)}function pn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${dn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${dn({precision:e.precision})}`:n;return RegExp(`^${cn}T(?:${r})$`)}var mn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},hn=/^-?\d+n?$/,gn=/^-?\d+$/,_n=/^-?\d+(?:\.\d+)?$/,vn=/^(?:true|false)$/i,yn=/^null$/i,bn=/^undefined$/i,xn=/^[^A-Z]*$/,Sn=/^[^a-z]*$/,Cn=/^[0-9a-fA-F]*$/;function wn(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Tn(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var En=/^[0-9a-fA-F]{32}$/,Dn=wn(22,`==`),On=Tn(22),kn=/^[0-9a-fA-F]{40}$/,An=wn(27,`=`),jn=Tn(27),Mn=/^[0-9a-fA-F]{64}$/,Nn=wn(43,`=`),Pn=Tn(43),Fn=/^[0-9a-fA-F]{96}$/,In=wn(64,``),Ln=Tn(64),Rn=/^[0-9a-fA-F]{128}$/,zn=wn(86,`==`),Bn=Tn(86),w=b(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vn=e=>{let t=e.value;return!d(t)&&t.size!==void 0},Hn=e=>{let t=e.value;return!d(t)&&t.length!==void 0},Un={number:`number`,bigint:`bigint`,object:`date`},Wn=b(`$ZodCheckLessThan`,(e,t)=>{w.init(e,t);let n=Un[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Un[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gn=b(`$ZodCheckGreaterThan`,(e,t)=>{w.init(e,t);let n=Un[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Un[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kn=b(`$ZodCheckMultipleOf`,(e,t)=>{w.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):p(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),qn=b(`$ZodCheckNumberFormat`,(e,t)=>{w.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=me[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=gn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Jn=b(`$ZodCheckBigIntFormat`,(e,t)=>{w.init(e,t);let[n,r]=he[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Yn=b(`$ZodCheckMaxSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Vn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Oe(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xn=b(`$ZodCheckMinSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Vn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Oe(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zn=b(`$ZodCheckSizeEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Vn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Oe(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qn=b(`$ZodCheckMaxLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Hn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ae(r):i)<=t.maximum)return;let a=je(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=b(`$ZodCheckMinLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Hn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ae(r):i)>=t.minimum)return;let a=je(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),er=b(`$ZodCheckLengthEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=Hn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ae(r):i;if(a===t.length)return;let o=je(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tr=b(`$ZodCheckStringFormat`,(e,t)=>{var n,r;w.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nr=b(`$ZodCheckRegex`,(e,t)=>{tr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rr=b(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=xn,tr.init(e,t)}),ir=b(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Sn,tr.init(e,t)}),ar=b(`$ZodCheckIncludes`,(e,t)=>{w.init(e,t);let n=ue(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),or=b(`$ZodCheckStartsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`^${ue(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),sr=b(`$ZodCheckEndsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`.*${ue(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function cr(e,t,n){e.issues.length&&t.issues.push(...v(n,e.issues))}var lr=b(`$ZodCheckProperty`,(e,t)=>{w.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>cr(n,e,t.property));cr(n,e,t.property)}}),ur=b(`$ZodCheckMimeType`,(e,t)=>{w.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),dr=b(`$ZodCheckOverwrite`,(e,t)=>{w.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
10
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
11
+ `)}\n};`)(...Object.values(this.closed))}},pr={major:4,minor:5,patch:1},T=b(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pr;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Ce(t),a;for(let o of n){if(o._zod.def.when){if(we(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Xe;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ee(t.issues,n,e),i||=Ce(t,n))});else{if(t.issues.length===n)continue;Ee(t.issues,n,e),i||=Ce(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Ce(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Xe;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Xe;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ie(this,`~standard`,hr(this))},set"~standard"(e){Fe(this,`~standard`,e)}}),mr=e=>e.success?{value:e.data}:{issues:e.error?.issues};function hr(e){return{validate:t=>{try{return mr(ht(e,t))}catch{return _t(e,t).then(mr)}},vendor:`zod`,version:1}}var gr=b(`$ZodString`,(e,t)=>{T.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),E=b(`$ZodStringFormat`,(e,t)=>{tr.init(e,t),gr.init(e,t)}),_r=b(`$ZodGUID`,(e,t)=>{t.pattern??=It,E.init(e,t)}),vr=b(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Lt(e)}else t.pattern??=Lt();E.init(e,t)}),yr=b(`$ZodEmail`,(e,t)=>{t.pattern??=Vt,E.init(e,t)});function br(e,t){if(!t.normalize&&t.protocol?.source===an.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var xr=/[\t\n\r]/g;function Sr(e){return e.replace(xr,``)}function Cr(e,t){return t.lastIndex=0,t.test(e.hostname)}function wr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Tr=b(`$ZodURL`,(e,t)=>{E.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=br(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Cr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!wr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Sr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Er=b(`$ZodEmoji`,(e,t)=>{t.pattern??=Jt(),E.init(e,t)}),Dr=b(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Mt:Nt(t.length),E.init(e,t)}),Or=b(`$ZodCUID`,(e,t)=>{t.pattern??=Dt,E.init(e,t)}),kr=b(`$ZodCUID2`,(e,t)=>{t.pattern??=Ot,E.init(e,t)}),Ar=b(`$ZodULID`,(e,t)=>{t.pattern??=kt,E.init(e,t)}),jr=b(`$ZodXID`,(e,t)=>{t.pattern??=At,E.init(e,t)}),Mr=b(`$ZodKSUID`,(e,t)=>{t.pattern??=jt,E.init(e,t)}),Nr=b(`$ZodISODateTime`,(e,t)=>{t.pattern??=pn(t),E.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Pr=b(`$ZodISODate`,(e,t)=>{t.pattern??=un,E.init(e,t)}),Fr=b(`$ZodISOTime`,(e,t)=>{t.pattern??=fn(t),E.init(e,t)}),Ir=b(`$ZodISODuration`,(e,t)=>{t.pattern??=Pt,E.init(e,t)}),Lr=b(`$ZodIPv4`,(e,t)=>{t.pattern??=Yt,E.init(e,t),e._zod.bag.format=`ipv4`}),Rr=/^[0-9a-fA-F:.]+$/;function zr(e){if(!Rr.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var Br=b(`$ZodIPv6`,(e,t)=>{t.pattern??=Xt,E.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{zr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Vr=b(`$ZodMAC`,(e,t)=>{t.pattern??=Zt(t.delimiter),E.init(e,t),e._zod.bag.format=`mac`}),Hr=b(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qt,E.init(e,t)});function Ur(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:zr(n)}var Wr=b(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$t,E.init(e,t),e._zod.check=n=>{Ur(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Gr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Kr=b(`$ZodBase64`,(e,t)=>{t.pattern??=en,E.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Gr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function qr(e){if(!tn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Gr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Jr=b(`$ZodBase64URL`,(e,t)=>{t.pattern??=tn,E.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{qr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Yr=b(`$ZodE164`,(e,t)=>{t.pattern??=on,E.init(e,t)}),Xr=/[- ]/g;function Zr(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Qr(e){return sn.test(e)?Zr(e.replace(Xr,``)):!1}var $r=b(`$ZodCreditCard`,(e,t)=>{t.pattern??=sn,E.init(e,t),e._zod.check=n=>{Qr(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}});function ei(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ti=b(`$ZodJWT`,(e,t)=>{E.init(e,t),e._zod.check=n=>{ei(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ni=b(`$ZodCustomStringFormat`,(e,t)=>{E.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),ri=b(`$ZodNumber`,(e,t)=>{T.init(e,t),e._zod.pattern=e._zod.bag.pattern??_n,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ii=b(`$ZodNumberFormat`,(e,t)=>{qn.init(e,t),ri.init(e,t)}),ai=b(`$ZodBoolean`,(e,t)=>{T.init(e,t),e._zod.pattern=vn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),oi=b(`$ZodBigInt`,(e,t)=>{T.init(e,t),e._zod.pattern=hn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),si=b(`$ZodBigIntFormat`,(e,t)=>{Jn.init(e,t),oi.init(e,t)}),ci=b(`$ZodSymbol`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),li=b(`$ZodUndefined`,(e,t)=>{T.init(e,t),e._zod.pattern=bn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),ui=b(`$ZodNull`,(e,t)=>{T.init(e,t),e._zod.pattern=yn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),di=b(`$ZodAny`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),fi=b(`$ZodUnknown`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),pi=b(`$ZodNever`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),mi=b(`$ZodVoid`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),hi=b(`$ZodDate`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function gi(e,t,n){e.issues.length&&t.issues.push(...v(n,e.issues)),t.value[n]=e.value}var _i=b(`$ZodArray`,(e,t)=>{T.init(e,t);let n=x.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;e<a.length;e++){let n=a[e],s=t.element._zod.run({value:n,issues:[]},i);s instanceof Promise?o.push(s.then(t=>gi(t,r,e))):gi(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function vi(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...v(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var yi=[];function bi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:yi,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=pe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function xi(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>vi(e,n,i,t,u,d))):vi(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Si=new WeakMap,Ci=b(`$ZodObject`,(e,t)=>{if(T.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Si.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Si.set(t,n),n}})}let n=u(()=>bi(t));y(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||h(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=ie,i=t.catchall,a,o=x.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>vi(n,t,e,c,r,i))):vi(a,t,e,c,r,i)}return i?xi(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),wi=b(`$ZodObjectJIT`,(e,t)=>{Ci.init(e,t);let n=e._zod.parse,r=u(()=>bi(t)),i=x.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new fr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
12
+ for (let i = 0; i < ${e}.issues.length; i++) {
13
+ const iss = ${e}.issues[i];
14
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
15
+ payload.issues.push(iss);
16
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:te(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
17
+ const ${n}_present = ${i};
18
+ if (!${n}.issues.length || ${n}_present) {
19
+ if (${n}.issues.length) {${c(n,r)}
18
20
  }
19
- }
20
-
21
- if (${n}.value === undefined) {
22
- if (${o} in input) {
23
- newResult[${o}] = undefined;
21
+
22
+ if (${e}) {
23
+ newResult[${r}] = ${n}.value;
24
24
  }
25
- } else {
26
- newResult[${o}] = ${n}.value;
27
25
  }
28
-
29
- `):c?t.write(`
30
- if (${n}.issues.length) {
31
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
32
- ...iss,
33
- path: iss.path ? [${o}, ...iss.path] : [${o}]
34
- })));
26
+
27
+ `)}else f?o.write(`
28
+ if (${n}.issues.length) {${c(n,r)}
35
29
  }
36
30
 
37
31
  if (${n}.value === undefined) {
38
- if (${o} in input) {
39
- newResult[${o}] = undefined;
32
+ if (${i}) {
33
+ newResult[${r}] = undefined;
40
34
  }
41
35
  } else {
42
- newResult[${o}] = ${n}.value;
36
+ newResult[${r}] = ${n}.value;
43
37
  }
44
-
45
- `):t.write(`
46
- const ${n}_present = ${o} in input;
47
- if (${n}.issues.length) {
48
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
49
- ...iss,
50
- path: iss.path ? [${o}, ...iss.path] : [${o}]
51
- })));
38
+
39
+ `):o.write(`
40
+ const ${n}_present = ${i};
41
+ if (${n}.issues.length) {${c(n,r)}
52
42
  }
53
43
  if (!${n}_present && !${n}.issues.length) {
54
44
  payload.issues.push({
55
45
  code: "invalid_type",
56
46
  expected: "nonoptional",
57
47
  input: undefined,
58
- path: [${o}]
48
+ path: [${r}]
59
49
  });
60
50
  }
61
51
 
62
52
  if (${n}_present) {
63
- if (${n}.value === undefined) {
64
- newResult[${o}] = undefined;
65
- } else {
66
- newResult[${o}] = ${n}.value;
67
- }
53
+ newResult[${r}] = ${n}.value;
68
54
  }
69
55
 
70
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=le,s=!f.jitless,c=s&&ue.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?kr([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Mr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!De(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>y(e,r,p())))}),t)}var Nr=l(`$ZodUnion`,(e,t)=>{S.init(e,t),_(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),_(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),_(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),_(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>te(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Mr(t,r,e,i)):Mr(o,r,e,i)}});function Pr(e,t,n,r){let i=e.filter(e=>e.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>y(e,r,p())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Fr=l(`$ZodXor`,(e,t)=>{Nr.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Pr(t,r,e,i)):Pr(o,r,e,i)}}),Ir=l(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Nr.init(e,t);let n=e._zod.parse;_(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=ee(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!le(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Lr=l(`$ZodIntersection`,(e,t)=>{S.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>zr(e,t,n)):zr(e,i,a)}});function Rr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(de(e)&&de(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Rr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Rr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),De(e))return e;let o=Rr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Br=l(`$ZodTuple`,(e,t)=>{S.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=Vr(n,`optin`),c=Vr(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>Hr(t,r,e))):Hr(a,r,e)}}return o.length?Promise.all(o).then(()=>Ur(l,r,n,a,c)):Ur(l,r,n,a,c)}});function Vr(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function Hr(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues)),t.value[n]=e.value}function Ur(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...ke(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Wr=l(`$ZodRecord`,(e,t)=>{S.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!de(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>y(e,r,p())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...ke(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...ke(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Vt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>y(e,r,p())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...ke(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...ke(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Gr=l(`$ZodMap`,(e,t)=>{S.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{Kr(t,a,n,o,i,e,r)})):Kr(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function Kr(e,t,n,r,i,a,o){e.issues.length&&(pe.has(typeof r)?n.issues.push(...ke(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>y(e,o,p()))})),t.issues.length&&(pe.has(typeof r)?n.issues.push(...ke(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>y(e,o,p()))})),n.value.set(e.value,t.value)}var qr=l(`$ZodSet`,(e,t)=>{S.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>Jr(e,n))):Jr(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function Jr(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Yr=l(`$ZodEnum`,(e,t)=>{S.init(e,t);let n=m(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>pe.has(typeof e)).map(e=>typeof e==`string`?he(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Xr=l(`$ZodLiteral`,(e,t)=>{if(S.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?he(e):e?he(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Zr=l(`$ZodFile`,(e,t)=>{S.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),Qr=l(`$ZodTransform`,(e,t)=>{S.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new d(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new u;return n.value=i,n.fallback=!0,n}});function $r(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ei=l(`$ZodOptional`,(e,t)=>{S.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${te(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>$r(e,r)):$r(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ti=l(`$ZodExactOptional`,(e,t)=>{ei.init(e,t),_(e._zod,`values`,()=>t.innerType._zod.values),_(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ni=l(`$ZodNullable`,(e,t)=>{S.init(e,t),_(e._zod,`optin`,()=>t.innerType._zod.optin),_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${te(e.source)}|null)$`):void 0}),_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ri=l(`$ZodDefault`,(e,t)=>{S.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ii(e,t)):ii(r,t)}});function ii(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ai=l(`$ZodPrefault`,(e,t)=>{S.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),oi=l(`$ZodNonOptional`,(e,t)=>{S.init(e,t),_(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>si(t,e)):si(i,e)}});function si(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ci=l(`$ZodSuccess`,(e,t)=>{S.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new d(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),li=l(`$ZodCatch`,(e,t)=>{S.init(e,t),e._zod.optin=`optional`,_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>y(e,n,p()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>y(e,n,p()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),ui=l(`$ZodNaN`,(e,t)=>{S.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),di=l(`$ZodPipe`,(e,t)=>{S.init(e,t),_(e._zod,`values`,()=>t.in._zod.values),_(e._zod,`optin`,()=>t.in._zod.optin),_(e._zod,`optout`,()=>t.out._zod.optout),_(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>fi(e,t.in,n)):fi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>fi(e,t.out,n)):fi(r,t.out,n)}});function fi(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var pi=l(`$ZodCodec`,(e,t)=>{S.init(e,t),_(e._zod,`values`,()=>t.in._zod.values),_(e._zod,`optin`,()=>t.in._zod.optin),_(e._zod,`optout`,()=>t.out._zod.optout),_(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>mi(e,t,n)):mi(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>mi(e,t,n)):mi(r,t,n)}}});function mi(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>hi(e,r,t.out,n)):hi(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>hi(e,r,t.in,n)):hi(e,r,t.in,n)}}function hi(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var gi=l(`$ZodPreprocess`,(e,t)=>{di.init(e,t)}),_i=l(`$ZodReadonly`,(e,t)=>{S.init(e,t),_(e._zod,`propValues`,()=>t.innerType._zod.propValues),_(e._zod,`values`,()=>t.innerType._zod.values),_(e._zod,`optin`,()=>t.innerType?._zod?.optin),_(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(vi):vi(r)}});function vi(e){return e.value=Object.freeze(e.value),e}var yi=l(`$ZodTemplateLiteral`,(e,t)=>{S.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||me.has(typeof e))n.push(he(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),bi=l(`$ZodFunction`,(e,t)=>(S.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?Be(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Be(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await He(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await He(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(e._def.output&&e._def.output._zod.def.type===`promise`?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new Br({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),xi=l(`$ZodPromise`,(e,t)=>{S.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Si=l(`$ZodLazy`,(e,t)=>{S.init(e,t),_(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),_(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),_(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),_(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),_(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ci=l(`$ZodCustom`,(e,t)=>{x.init(e,t),S.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>wi(t,n,r,e));wi(i,n,r,e)}});function wi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ne(e))}}var Ti,Ei=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Di(){return new Ei}(Ti=globalThis).__zod_globalRegistry??(Ti.__zod_globalRegistry=Di());var Oi=globalThis.__zod_globalRegistry;function ki(e,t){return new e({type:`string`,...v(t)})}function Ai(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...v(t)})}function ji(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...v(t)})}function Mi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...v(t)})}function Ni(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...v(t)})}function Pi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...v(t)})}function Fi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...v(t)})}function Ii(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...v(t)})}function Li(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...v(t)})}function Ri(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...v(t)})}function zi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...v(t)})}function Bi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...v(t)})}function Vi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...v(t)})}function Hi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...v(t)})}function Ui(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...v(t)})}function Wi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...v(t)})}function Gi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...v(t)})}function Ki(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...v(t)})}function qi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...v(t)})}function Ji(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...v(t)})}function Yi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...v(t)})}function Xi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...v(t)})}function Zi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...v(t)})}function Qi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...v(t)})}function $i(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...v(t)})}function ea(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...v(t)})}function ta(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...v(t)})}function na(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...v(t)})}function ra(e,t){return new e({type:`number`,checks:[],...v(t)})}function ia(e,t){return new e({type:`number`,coerce:!0,checks:[],...v(t)})}function aa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...v(t)})}function oa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...v(t)})}function sa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...v(t)})}function ca(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...v(t)})}function la(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...v(t)})}function ua(e,t){return new e({type:`boolean`,...v(t)})}function da(e,t){return new e({type:`bigint`,...v(t)})}function fa(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...v(t)})}function pa(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...v(t)})}function ma(e,t){return new e({type:`symbol`,...v(t)})}function ha(e,t){return new e({type:`undefined`,...v(t)})}function ga(e,t){return new e({type:`null`,...v(t)})}function _a(e){return new e({type:`any`})}function va(e){return new e({type:`unknown`})}function ya(e,t){return new e({type:`never`,...v(t)})}function ba(e,t){return new e({type:`void`,...v(t)})}function xa(e,t){return new e({type:`date`,...v(t)})}function Sa(e,t){return new e({type:`nan`,...v(t)})}function Ca(e,t){return new pn({check:`less_than`,...v(t),value:e,inclusive:!1})}function wa(e,t){return new pn({check:`less_than`,...v(t),value:e,inclusive:!0})}function Ta(e,t){return new mn({check:`greater_than`,...v(t),value:e,inclusive:!1})}function Ea(e,t){return new mn({check:`greater_than`,...v(t),value:e,inclusive:!0})}function Da(e){return Ta(0,e)}function Oa(e){return Ca(0,e)}function ka(e){return wa(0,e)}function Aa(e){return Ea(0,e)}function ja(e,t){return new hn({check:`multiple_of`,...v(t),value:e})}function Ma(e,t){return new vn({check:`max_size`,...v(t),maximum:e})}function Na(e,t){return new yn({check:`min_size`,...v(t),minimum:e})}function Pa(e,t){return new bn({check:`size_equals`,...v(t),size:e})}function Fa(e,t){return new xn({check:`max_length`,...v(t),maximum:e})}function Ia(e,t){return new Sn({check:`min_length`,...v(t),minimum:e})}function La(e,t){return new Cn({check:`length_equals`,...v(t),length:e})}function Ra(e,t){return new Tn({check:`string_format`,format:`regex`,...v(t),pattern:e})}function za(e){return new En({check:`string_format`,format:`lowercase`,...v(e)})}function Ba(e){return new Dn({check:`string_format`,format:`uppercase`,...v(e)})}function Va(e,t){return new On({check:`string_format`,format:`includes`,...v(t),includes:e})}function Ha(e,t){return new kn({check:`string_format`,format:`starts_with`,...v(t),prefix:e})}function Ua(e,t){return new An({check:`string_format`,format:`ends_with`,...v(t),suffix:e})}function Wa(e,t,n){return new Mn({check:`property`,property:e,schema:t,...v(n)})}function Ga(e,t){return new Nn({check:`mime_type`,mime:e,...v(t)})}function Ka(e){return new Pn({check:`overwrite`,tx:e})}function qa(e){return Ka(t=>t.normalize(e))}function Ja(){return Ka(e=>e.trim())}function Ya(){return Ka(e=>e.toLowerCase())}function Xa(){return Ka(e=>e.toUpperCase())}function Za(){return Ka(e=>se(e))}function Qa(e,t,n){return new e({type:`array`,element:t,...v(n)})}function $a(e,t){return new e({type:`file`,...v(t)})}function eo(e,t,n){let r=v(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function to(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...v(n)})}function no(e,t){let n=ro(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ne(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ne(r))}},e(t.value,t)),t);return n}function ro(e,t){let n=new x({check:`custom`,...v(t)});return n._zod.check=e,n}function io(e){let t=new x({check:`describe`});return t._zod.onattach=[t=>{let n=Oi.get(t)??{};Oi.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function ao(e){let t=new x({check:`meta`});return t._zod.onattach=[t=>{let n=Oi.get(t)??{};Oi.add(t,{...n,...e})}],t._zod.check=()=>{},t}function oo(e,t){let n=v(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??pi,c=e.Boolean??mr,l=new s({type:`pipe`,in:new(e.String??Ln)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function so(e,t,n,r={}){let i=v(r),a={...v(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}function co(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Oi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function w(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,w(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&fo(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function lo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
56
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=ie,c=!x.jitless,l=c&&ae.value,d=t.catchall,f;e._zod.parse=(i,u)=>{f??=r.value;let p=i.value;return s(p)?c&&l&&u?.async===!1&&u.jitless!==!0?(o||=a(t.shape),i=o(i,u),d?xi([],p,i,u,f,e):i):n(i,u):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Ti(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ce(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>De(e,r,S())))}),t)}var Ei=b(`$ZodUnion`,(e,t)=>{T.init(e,t),y(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),y(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),y(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),y(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>f(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Ti(t,r,e,i)):Ti(o,r,e,i)}});function Di(e,t,n,r){let i=[];for(let t=0;t<e.length;t++)e[t].issues.length===0&&i.push(t);return i.length===1?(t.value=e[i[0]].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>De(e,r,S())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}var Oi=b(`$ZodXor`,(e,t)=>{Ei.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Di(t,r,e,i)):Di(o,r,e,i)}}),ki=b(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ei.init(e,t);let n=e._zod.parse;y(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||h(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=Si.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=u(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!ie(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Ai=b(`$ZodIntersection`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Mi(e,t,n)):Mi(e,i,a)}});function ji(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(oe(e)&&oe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ji(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ji(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Mi(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ji(t.value,n.value);if(!c.valid){if(Ce(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Ni=b(`$ZodTuple`,(e,t)=>{T.init(e,t);let n=t.items,r=x.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Pi(n,`optin`),l=Pi(n,`optout`);if(!t.rest){if(o.length<c)return i.issues.push({code:`too_small`,minimum:c,inclusive:!0,input:o,inst:e,origin:`array`}),i;o.length>n.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:o[e],issues:[]},a);t instanceof Promise?s.push(t.then(t=>{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Fi(t,i,e))):Fi(r,i,e)}}return s.length?Promise.all(s).then(()=>Ii(u,i,n,o,l)):Ii(u,i,n,o,l)}});function Pi(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Fi(e,t,n){e.issues.length&&t.issues.push(...v(n,e.issues)),t.value[n]=e.value}function Ii(e,t,n,r,i){for(let a=0;a<n.length;a++){let o=e[a],s=a<r.length;if(!s&&a>=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...v(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Li=b(`$ZodRecord`,(e,t)=>{T.init(e,t);let n=x.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!oe(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>De(e,i,S())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...v(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...v(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&_n.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>De(e,i,S())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...v(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...v(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Ri=b(`$ZodMap`,(e,t)=>{T.init(e,t);let n=x.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{zi(t,o,r,n,a,e,i)})):zi(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function zi(e,t,n,r,i,a,o){e.issues.length&&(ce.has(typeof r)?n.issues.push(...v(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>De(e,o,S()))})),t.issues.length&&(ce.has(typeof r)?n.issues.push(...v(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>De(e,o,S()))})),n.value.set(e.value,t.value)}var Bi=b(`$ZodSet`,(e,t)=>{T.init(e,t);let n=x.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>Vi(e,r))):Vi(n,r)}return o.length?Promise.all(o).then(()=>r):r}});function Vi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Hi=b(`$ZodEnum`,(e,t)=>{T.init(e,t);let n=s(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>ce.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>ue(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ui=b(`$ZodLiteral`,(e,t)=>{T.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?ue(e):e?ue(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Wi=b(`$ZodFile`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),Gi=b(`$ZodTransform`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,x.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ze(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Xe;return n.value=i,n}});function Ki(e,t){return e.value=t.issues.length?void 0:t.value,e}var qi=b(`$ZodOptional`,(e,t)=>{T.init(e,t),y(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,y(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),y(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ki(e,t)):Ki(e,r)}return t.innerType._zod.run(e,n)}}),Ji=b(`$ZodExactOptional`,(e,t)=>{qi.init(e,t),y(e,`values`,e=>e.def.innerType._zod.values),y(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Yi=b(`$ZodNullable`,(e,t)=>{T.init(e,t),y(e,`optin`,e=>e.def.innerType._zod.optin),y(e,`optout`,e=>e.def.innerType._zod.optout),y(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)}|null)$`):void 0}),y(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Xi=b(`$ZodDefault`,(e,t)=>{T.init(e,t),e._zod.optin=`defaulted`,y(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Zi(e,t)):Zi(r,t)}});function Zi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Qi=b(`$ZodPrefault`,(e,t)=>{T.init(e,t),e._zod.optin=`defaulted`,y(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),$i=b(`$ZodNonOptional`,(e,t)=>{T.init(e,t),y(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ea(t,e)):ea(i,e)}});function ea(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ta=b(`$ZodSuccess`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Ze(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}});function na(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>De(e,r,S()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ra=b(`$ZodCatch`,(e,t)=>{T.init(e,t),y(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),y(e,`optout`,e=>e.def.innerType._zod.optout),y(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>na(e,r,t,n)):na(e,r,t,n)}}),ia=b(`$ZodNaN`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),aa=b(`$ZodPipe`,(e,t)=>{T.init(e,t),y(e,`values`,e=>e.def.in._zod.values),y(e,`optin`,e=>e.def.in._zod.optin),y(e,`optout`,e=>e.def.out._zod.optout),y(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>oa(e,t.in,n)):oa(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>oa(e,t.out,n)):oa(r,t.out,n)}});function oa(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var sa=b(`$ZodCodec`,(e,t)=>{T.init(e,t),y(e,`values`,e=>e.def.in._zod.values),y(e,`optin`,e=>e.def.in._zod.optin),y(e,`optout`,e=>e.def.out._zod.optout),y(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ca(e,t,n)):ca(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ca(e,t,n)):ca(r,t,n)}}});function ca(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>la(e,r,t.out,n)):la(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>la(e,r,t.in,n)):la(e,r,t.in,n)}}function la(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var ua=b(`$ZodPreprocess`,(e,t)=>{aa.init(e,t)}),da=b(`$ZodReadonly`,(e,t)=>{T.init(e,t),y(e,`propValues`,e=>e.def.innerType._zod.propValues),y(e,`values`,e=>e.def.innerType._zod.values),y(e,`optin`,e=>e.def.innerType?._zod?.optin),y(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fa):fa(r)}});function fa(e){return e.memo||(e.value=Object.freeze(e.value)),e}var pa=b(`$ZodTemplateLiteral`,(e,t)=>{T.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||le.has(typeof e))n.push(ue(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),ma=b(`$ZodFunction`,(e,t)=>(T.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?dt(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?dt(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await pt(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await pt(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new Ni({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),ha=b(`$ZodPromise`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),ga=b(`$ZodLazy`,(e,t)=>{T.init(e,t),ee(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),y(e,`pattern`,e=>e.innerType?._zod?.pattern),y(e,`propValues`,e=>e.innerType?._zod?.propValues),y(e,`optin`,e=>e.innerType?._zod?.optin??void 0),y(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),_a=b(`$ZodCustom`,(e,t)=>{w.init(e,t),T.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>va(t,n,r,e));va(i,n,r,e)}});function va(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ne(e))}}var ya=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},ba=`~memo`,xa=[];function Sa(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ca=new WeakMap;function wa(e,t){let n=Ca.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&wa(e,t)&&(r=!0)},a=e._zod.def;if(a.type===`lazy`)i(e._zod.innerType);else{let e=a.shape;if(e)for(let t of Reflect.ownKeys(e))i(e[t]);for(let e in a){let t=a[e];if(!(!t||typeof t!=`object`)){if(t._zod)i(t);else if(Array.isArray(t))for(let e of t)i(e)}}}return t.delete(e),Ca.set(e,r),r}function Ta(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}var Ea,Da=[],Oa={alloc(e,t,n){let r=Ea;if(!r)return n;Ea=void 0;let i={value:n,issues:null};return r.set(t.value,i),Da.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Aa(n,e.value))throw new ya;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=wa(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[ba];l||(l={buckets:new Map,backEdges:void 0},s[ba]=l);let u;r===s?u=i:(u=Ta(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...Sa(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;Ea=u;let f=Da.length,p=t(o,s);Ea=void 0;let m=Da.length>f?Da.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?Sa(e.issues):xa),e)):(m&&(m.issues=p.issues.length?Sa(p.issues):xa),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}};function ka(){return Oa}function Aa(e,t){let n=e[ba]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var ja=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Me(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${fe(e.values[0])}`:`Invalid option: expected one of ${c(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${c(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ma(){return{localeError:ja()}}var Na,Pa=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Fa(){return new Pa}(Na=globalThis).__zod_globalRegistry??(Na.__zod_globalRegistry=Fa());var Ia=globalThis.__zod_globalRegistry;function La(e,t){return new e({type:`string`,..._(t)})}function Ra(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,..._(t)})}function za(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,..._(t)})}function Ba(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,..._(t)})}function Va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,..._(t)})}function Ha(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,..._(t)})}function Ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,..._(t)})}function Wa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,..._(t)})}function Ga(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,..._(t)})}function Ka(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,..._(t)})}function qa(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,..._(t)})}function Ja(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,..._(t)})}function Ya(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,..._(t)})}function Xa(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,..._(t)})}function Za(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,..._(t)})}function Qa(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,..._(t)})}function $a(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,..._(t)})}function eo(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,..._(t)})}function to(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,..._(t)})}function no(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,..._(t)})}function ro(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,..._(t)})}function io(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,..._(t)})}function ao(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,..._(t)})}function oo(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,..._(t)})}function so(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,..._(t)})}function co(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,..._(t)})}function lo(e,t){return new e({type:`string`,format:`date`,check:`string_format`,..._(t)})}function uo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,..._(t)})}function fo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,..._(t)})}function po(e,t){return new e({type:`number`,checks:[],..._(t)})}function mo(e,t){return new e({type:`number`,coerce:!0,checks:[],..._(t)})}function ho(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,..._(t)})}function go(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,..._(t)})}function _o(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,..._(t)})}function vo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,..._(t)})}function yo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,..._(t)})}function bo(e,t){return new e({type:`boolean`,..._(t)})}function xo(e,t){return new e({type:`bigint`,..._(t)})}function So(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,..._(t)})}function Co(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,..._(t)})}function wo(e,t){return new e({type:`symbol`,..._(t)})}function To(e,t){return new e({type:`undefined`,..._(t)})}function Eo(e,t){return new e({type:`null`,..._(t)})}function Do(e){return new e({type:`any`})}function Oo(e){return new e({type:`unknown`})}function ko(e,t){return new e({type:`never`,..._(t)})}function Ao(e,t){return new e({type:`void`,..._(t)})}function jo(e,t){return new e({type:`date`,..._(t)})}function Mo(e,t){return new e({type:`nan`,..._(t)})}function No(e,t){return new Wn({check:`less_than`,..._(t),value:e,inclusive:!1})}function Po(e,t){return new Wn({check:`less_than`,..._(t),value:e,inclusive:!0})}function Fo(e,t){return new Gn({check:`greater_than`,..._(t),value:e,inclusive:!1})}function Io(e,t){return new Gn({check:`greater_than`,..._(t),value:e,inclusive:!0})}function Lo(e){return Fo(0,e)}function Ro(e){return No(0,e)}function zo(e){return Po(0,e)}function Bo(e){return Io(0,e)}function Vo(e,t){return new Kn({check:`multiple_of`,..._(t),value:e})}function Ho(e,t){return new Yn({check:`max_size`,..._(t),maximum:e})}function Uo(e,t){return new Xn({check:`min_size`,..._(t),minimum:e})}function Wo(e,t){return new Zn({check:`size_equals`,..._(t),size:e})}function Go(e,t){return new Qn({check:`max_length`,..._(t),maximum:e})}function Ko(e,t){return new $n({check:`min_length`,..._(t),minimum:e})}function qo(e,t){return new er({check:`length_equals`,..._(t),length:e})}function Jo(e,t){return new nr({check:`string_format`,format:`regex`,..._(t),pattern:e})}function Yo(e){return new rr({check:`string_format`,format:`lowercase`,..._(e)})}function Xo(e){return new ir({check:`string_format`,format:`uppercase`,..._(e)})}function Zo(e,t){return new ar({check:`string_format`,format:`includes`,..._(t),includes:e})}function Qo(e,t){return new or({check:`string_format`,format:`starts_with`,..._(t),prefix:e})}function $o(e,t){return new sr({check:`string_format`,format:`ends_with`,..._(t),suffix:e})}function es(e,t,n){return new lr({check:`property`,property:e,schema:t,..._(n)})}function ts(e){return Object.entries(e).map(([e,t])=>new lr({check:`property`,property:e,schema:t}))}function ns(e,t){return new ur({check:`mime_type`,mime:e,..._(t)})}function rs(e){return new dr({check:`overwrite`,tx:e})}function is(e){return rs(t=>t.normalize(e))}function as(){return rs(e=>e.trim())}function os(){return rs(e=>e.toLowerCase())}function ss(){return rs(e=>e.toUpperCase())}function cs(){return rs(e=>ne(e))}function ls(e,t,n){return new e({type:`array`,element:t,..._(n)})}function us(e,t){return new e({type:`file`,..._(t)})}function ds(e,t,n){let r=_(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function fs(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,..._(n)})}function ps(e,t){let n=ms(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ne(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ne(r))}},e(t.value,t)),t);return n}function ms(e,t){let n=new w({check:`custom`,..._(t)});return n._zod.check=e,n}function hs(e){let t=new w({check:`describe`});return t._zod.onattach=[t=>{let n=Ia.get(t)??{};Ia.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function gs(e){let t=new w({check:`meta`});return t._zod.onattach=[t=>{let n=Ia.get(t)??{};Ia.add(t,{...n,...e})}],t._zod.check=()=>{},t}function _s(e,t){let n=_(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??sa,c=e.Boolean??ai,l=new s({type:`pipe`,in:new(e.String??gr)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function vs(e,t,n,r={}){let i=_(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}function ys(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&h(e,t,n[t]);return e}function bs(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ia,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],external:e?.external??void 0}}function D(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function O(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,O(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&ys(o.schema,c),t.io===`input`&&As(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function xs(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ss(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${xs(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+xs(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
71
57
 
72
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function uo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:mo(t,`input`,e.processors),output:mo(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function fo(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return fo(r.element,n);if(r.type===`set`)return fo(r.valueType,n);if(r.type===`lazy`)return fo(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return fo(r.innerType,n);if(r.type===`intersection`)return fo(r.left,n)||fo(r.right,n);if(r.type===`record`||r.type===`map`)return fo(r.keyType,n)||fo(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:fo(r.in,n)||fo(r.out,n);if(r.type===`object`){for(let e in r.shape)if(fo(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(fo(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(fo(e,n))return!0;return!!(r.rest&&fo(r.rest,n))}return!1}var po=(e,t={})=>n=>{let r=co({...n,processors:t});return w(e,r),lo(r,e),uo(r,e)},mo=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=co({...i??{},target:a,io:t,processors:n});return w(e,o),lo(o,e),uo(o,e)},ho={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},go=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ho[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},_o=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},vo=(e,t,n,r)=>{n.type=`boolean`},yo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},bo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},xo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},So=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Co=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},wo=(e,t,n,r)=>{n.not={}},To=(e,t,n,r)=>{},Eo=(e,t,n,r)=>{},Do=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Oo=(e,t,n,r)=>{let i=e._zod.def,a=m(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ko=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ao=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},jo=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Mo=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},No=(e,t,n,r)=>{n.type=`boolean`},Po=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Fo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Io=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Lo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Ro=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},zo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=w(a.element,t,{...r,path:[...r.path,`items`]})},Bo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=w(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=w(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Vo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>w(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ho=(e,t,n,r)=>{let i=e._zod.def,a=w(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=w(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Uo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>w(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?w(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Wo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=w(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=w(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=w(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Go=(e,t,n,r)=>{let i=e._zod.def,a=w(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ko=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qo=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Jo=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Yo=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Xo=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;w(o,t,r);let s=t.seen.get(e);s.ref=o},Zo=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Qo=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$o=(e,t,n,r)=>{let i=e._zod.def;w(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},es=(e,t,n,r)=>{let i=e._zod.innerType;w(i,t,r);let a=t.seen.get(e);a.ref=i},ts={string:go,number:_o,boolean:vo,bigint:yo,symbol:bo,null:xo,undefined:So,void:Co,never:wo,any:To,unknown:Eo,date:Do,enum:Oo,literal:ko,nan:Ao,template_literal:jo,file:Mo,success:No,custom:Po,function:Fo,transform:Io,map:Lo,set:Ro,array:zo,object:Bo,union:Vo,intersection:Ho,tuple:Uo,record:Wo,nullable:Go,nonoptional:Ko,default:qo,prefault:Jo,catch:Yo,pipe:Xo,readonly:Zo,promise:Qo,optional:$o,lazy:es};function ns(e,t){if(`_idmap`in e){let n=e,r=co({...t,processors:ts}),i={};for(let e of n._idmap.entries()){let[t,n]=e;w(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;lo(r,n),a[t]=uo(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=co({...t,processors:ts});return w(e,n),lo(n,e),uo(n,e)}var rs=t({endsWith:()=>Ua,gt:()=>Ta,gte:()=>Ea,includes:()=>Va,length:()=>La,lowercase:()=>za,lt:()=>Ca,lte:()=>wa,maxLength:()=>Fa,maxSize:()=>Ma,mime:()=>Ga,minLength:()=>Ia,minSize:()=>Na,multipleOf:()=>ja,negative:()=>Oa,nonnegative:()=>Aa,nonpositive:()=>ka,normalize:()=>qa,overwrite:()=>Ka,positive:()=>Da,property:()=>Wa,regex:()=>Ra,size:()=>Pa,slugify:()=>Za,startsWith:()=>Ha,toLowerCase:()=>Ya,toUpperCase:()=>Xa,trim:()=>Ja,uppercase:()=>Ba}),is=t({ZodISODate:()=>ss,ZodISODateTime:()=>as,ZodISODuration:()=>ds,ZodISOTime:()=>ls,date:()=>cs,datetime:()=>os,duration:()=>fs,time:()=>us}),as=l(`ZodISODateTime`,(e,t)=>{Yn.init(e,t),D.init(e,t)});function os(e){return $i(as,e)}var ss=l(`ZodISODate`,(e,t)=>{Xn.init(e,t),D.init(e,t)});function cs(e){return ea(ss,e)}var ls=l(`ZodISOTime`,(e,t)=>{Zn.init(e,t),D.init(e,t)});function us(e){return ta(ls,e)}var ds=l(`ZodISODuration`,(e,t)=>{Qn.init(e,t),D.init(e,t)});function fs(e){return na(ds,e)}var ps=l(`ZodError`,(e,t)=>{Fe.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Re(e,t)},flatten:{value:t=>Le(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,h,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,h,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),ms=ze(ps),hs=Ve(ps),gs=Ue(ps),_s=Ge(ps),vs=qe(ps),ys=Je(ps),bs=Ye(ps),xs=Xe(ps),Ss=Ze(ps),Cs=Qe(ps),ws=$e(ps),Ts=et(ps),Es=t({ZodAny:()=>Gc,ZodArray:()=>el,ZodBase64:()=>pc,ZodBase64URL:()=>hc,ZodBigInt:()=>Pc,ZodBigIntFormat:()=>Ic,ZodBoolean:()=>Nc,ZodCIDRv4:()=>lc,ZodCIDRv6:()=>dc,ZodCUID:()=>qs,ZodCUID2:()=>Ys,ZodCatch:()=>Vl,ZodCodec:()=>ql,ZodCustom:()=>su,ZodCustomStringFormat:()=>xc,ZodDate:()=>Qc,ZodDefault:()=>Nl,ZodDiscriminatedUnion:()=>sl,ZodE164:()=>_c,ZodEmail:()=>js,ZodEmoji:()=>Us,ZodEnum:()=>bl,ZodExactOptional:()=>Ol,ZodFile:()=>Cl,ZodFunction:()=>au,ZodGUID:()=>Ns,ZodIPv4:()=>rc,ZodIPv6:()=>sc,ZodIntersection:()=>ll,ZodJWT:()=>yc,ZodKSUID:()=>tc,ZodLazy:()=>tu,ZodLiteral:()=>Sl,ZodMAC:()=>ac,ZodMap:()=>gl,ZodNaN:()=>Ul,ZodNanoID:()=>Gs,ZodNever:()=>Jc,ZodNonOptional:()=>Ll,ZodNull:()=>Uc,ZodNullable:()=>Al,ZodNumber:()=>Ec,ZodNumberFormat:()=>Dc,ZodObject:()=>nl,ZodOptional:()=>Dl,ZodPipe:()=>Gl,ZodPrefault:()=>Fl,ZodPreprocess:()=>Xl,ZodPromise:()=>ru,ZodReadonly:()=>Zl,ZodRecord:()=>pl,ZodSet:()=>vl,ZodString:()=>As,ZodStringFormat:()=>D,ZodSuccess:()=>zl,ZodSymbol:()=>zc,ZodTemplateLiteral:()=>$l,ZodTransform:()=>Tl,ZodTuple:()=>dl,ZodType:()=>T,ZodULID:()=>Zs,ZodURL:()=>Bs,ZodUUID:()=>Fs,ZodUndefined:()=>Vc,ZodUnion:()=>il,ZodUnknown:()=>qc,ZodVoid:()=>Xc,ZodXID:()=>$s,ZodXor:()=>al,_ZodString:()=>ks,_default:()=>Pl,_function:()=>ou,any:()=>Kc,array:()=>j,base64:()=>mc,base64url:()=>gc,bigint:()=>Fc,boolean:()=>k,catch:()=>Hl,check:()=>cu,cidrv4:()=>uc,cidrv6:()=>fc,codec:()=>Jl,cuid:()=>Js,cuid2:()=>Xs,custom:()=>lu,date:()=>$c,describe:()=>fu,discriminatedUnion:()=>cl,e164:()=>vc,email:()=>Ms,emoji:()=>Ws,enum:()=>I,exactOptional:()=>kl,file:()=>wl,float32:()=>kc,float64:()=>Ac,function:()=>ou,guid:()=>Ps,hash:()=>Tc,hex:()=>wc,hostname:()=>Cc,httpUrl:()=>Hs,instanceof:()=>mu,int:()=>Oc,int32:()=>jc,int64:()=>Lc,intersection:()=>ul,invertCodec:()=>Yl,ipv4:()=>ic,ipv6:()=>cc,json:()=>gu,jwt:()=>bc,keyof:()=>tl,ksuid:()=>nc,lazy:()=>nu,literal:()=>L,looseObject:()=>N,looseRecord:()=>hl,mac:()=>oc,map:()=>_l,meta:()=>pu,nan:()=>Wl,nanoid:()=>Ks,nativeEnum:()=>xl,never:()=>Yc,nonoptional:()=>Rl,null:()=>Wc,nullable:()=>jl,nullish:()=>Ml,number:()=>O,object:()=>M,optional:()=>R,partialRecord:()=>ml,pipe:()=>Kl,prefault:()=>Il,preprocess:()=>_u,promise:()=>iu,readonly:()=>Ql,record:()=>F,refine:()=>uu,set:()=>yl,strictObject:()=>rl,string:()=>E,stringFormat:()=>Sc,stringbool:()=>hu,success:()=>Bl,superRefine:()=>du,symbol:()=>Bc,templateLiteral:()=>eu,transform:()=>El,tuple:()=>fl,uint32:()=>Mc,uint64:()=>Rc,ulid:()=>Qs,undefined:()=>Hc,union:()=>P,unknown:()=>A,url:()=>Vs,uuid:()=>Is,uuidv4:()=>Ls,uuidv6:()=>Rs,uuidv7:()=>zs,void:()=>Zc,xid:()=>ec,xor:()=>ol}),Ds=new WeakMap;function Os(e,t,n){let r=Object.getPrototypeOf(e),i=Ds.get(r);if(i||(i=new Set,Ds.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var T=l(`ZodType`,(e,t)=>(S.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:mo(e,`input`),output:mo(e,`output`)}}),e.toJSONSchema=po(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>ms(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>gs(e,t,n),e.parseAsync=async(t,n)=>hs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>_s(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>vs(e,t,n),e.decode=(t,n)=>ys(e,t,n),e.encodeAsync=async(t,n)=>bs(e,t,n),e.decodeAsync=async(t,n)=>xs(e,t,n),e.safeEncode=(t,n)=>Ss(e,t,n),e.safeDecode=(t,n)=>Cs(e,t,n),e.safeEncodeAsync=async(t,n)=>ws(e,t,n),e.safeDecodeAsync=async(t,n)=>Ts(e,t,n),Os(e,`ZodType`,{check(...e){let t=this.def;return this.clone(ae(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ge(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(uu(e,t))},superRefine(e,t){return this.check(du(e,t))},overwrite(e){return this.check(Ka(e))},optional(){return R(this)},exactOptional(){return kl(this)},nullable(){return jl(this)},nullish(){return R(jl(this))},nonoptional(e){return Rl(this,e)},array(){return j(this)},or(e){return P([this,e])},and(e){return ul(this,e)},transform(e){return Kl(this,El(e))},default(e){return Pl(this,e)},prefault(e){return Il(this,e)},catch(e){return Hl(this,e)},pipe(e){return Kl(this,e)},readonly(){return Ql(this)},describe(e){let t=this.clone();return Oi.add(t,{description:e}),t},meta(...e){if(e.length===0)return Oi.get(this);let t=this.clone();return Oi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Oi.get(e)?.description},configurable:!0}),e)),ks=l(`_ZodString`,(e,t)=>{Ln.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Os(e,`_ZodString`,{regex(...e){return this.check(Ra(...e))},includes(...e){return this.check(Va(...e))},startsWith(...e){return this.check(Ha(...e))},endsWith(...e){return this.check(Ua(...e))},min(...e){return this.check(Ia(...e))},max(...e){return this.check(Fa(...e))},length(...e){return this.check(La(...e))},nonempty(...e){return this.check(Ia(1,...e))},lowercase(e){return this.check(za(e))},uppercase(e){return this.check(Ba(e))},trim(){return this.check(Ja())},normalize(...e){return this.check(qa(...e))},toLowerCase(){return this.check(Ya())},toUpperCase(){return this.check(Xa())},slugify(){return this.check(Za())}})}),As=l(`ZodString`,(e,t)=>{Ln.init(e,t),ks.init(e,t),e.email=t=>e.check(Ai(js,t)),e.url=t=>e.check(Ii(Bs,t)),e.jwt=t=>e.check(Qi(yc,t)),e.emoji=t=>e.check(Li(Us,t)),e.guid=t=>e.check(ji(Ns,t)),e.uuid=t=>e.check(Mi(Fs,t)),e.uuidv4=t=>e.check(Ni(Fs,t)),e.uuidv6=t=>e.check(Pi(Fs,t)),e.uuidv7=t=>e.check(Fi(Fs,t)),e.nanoid=t=>e.check(Ri(Gs,t)),e.guid=t=>e.check(ji(Ns,t)),e.cuid=t=>e.check(zi(qs,t)),e.cuid2=t=>e.check(Bi(Ys,t)),e.ulid=t=>e.check(Vi(Zs,t)),e.base64=t=>e.check(Yi(pc,t)),e.base64url=t=>e.check(Xi(hc,t)),e.xid=t=>e.check(Hi($s,t)),e.ksuid=t=>e.check(Ui(tc,t)),e.ipv4=t=>e.check(Wi(rc,t)),e.ipv6=t=>e.check(Gi(sc,t)),e.cidrv4=t=>e.check(qi(lc,t)),e.cidrv6=t=>e.check(Ji(dc,t)),e.e164=t=>e.check(Zi(_c,t)),e.datetime=t=>e.check(os(t)),e.date=t=>e.check(cs(t)),e.time=t=>e.check(us(t)),e.duration=t=>e.check(fs(t))});function E(e){return ki(As,e)}var D=l(`ZodStringFormat`,(e,t)=>{C.init(e,t),ks.init(e,t)}),js=l(`ZodEmail`,(e,t)=>{Bn.init(e,t),D.init(e,t)});function Ms(e){return Ai(js,e)}var Ns=l(`ZodGUID`,(e,t)=>{Rn.init(e,t),D.init(e,t)});function Ps(e){return ji(Ns,e)}var Fs=l(`ZodUUID`,(e,t)=>{zn.init(e,t),D.init(e,t)});function Is(e){return Mi(Fs,e)}function Ls(e){return Ni(Fs,e)}function Rs(e){return Pi(Fs,e)}function zs(e){return Fi(Fs,e)}var Bs=l(`ZodURL`,(e,t)=>{Vn.init(e,t),D.init(e,t)});function Vs(e){return Ii(Bs,e)}function Hs(e){return Ii(Bs,{protocol:jt,hostname:At,...v(e)})}var Us=l(`ZodEmoji`,(e,t)=>{Hn.init(e,t),D.init(e,t)});function Ws(e){return Li(Us,e)}var Gs=l(`ZodNanoID`,(e,t)=>{Un.init(e,t),D.init(e,t)});function Ks(e){return Ri(Gs,e)}var qs=l(`ZodCUID`,(e,t)=>{Wn.init(e,t),D.init(e,t)});function Js(e){return zi(qs,e)}var Ys=l(`ZodCUID2`,(e,t)=>{Gn.init(e,t),D.init(e,t)});function Xs(e){return Bi(Ys,e)}var Zs=l(`ZodULID`,(e,t)=>{Kn.init(e,t),D.init(e,t)});function Qs(e){return Vi(Zs,e)}var $s=l(`ZodXID`,(e,t)=>{qn.init(e,t),D.init(e,t)});function ec(e){return Hi($s,e)}var tc=l(`ZodKSUID`,(e,t)=>{Jn.init(e,t),D.init(e,t)});function nc(e){return Ui(tc,e)}var rc=l(`ZodIPv4`,(e,t)=>{$n.init(e,t),D.init(e,t)});function ic(e){return Wi(rc,e)}var ac=l(`ZodMAC`,(e,t)=>{tr.init(e,t),D.init(e,t)});function oc(e){return Ki(ac,e)}var sc=l(`ZodIPv6`,(e,t)=>{er.init(e,t),D.init(e,t)});function cc(e){return Gi(sc,e)}var lc=l(`ZodCIDRv4`,(e,t)=>{nr.init(e,t),D.init(e,t)});function uc(e){return qi(lc,e)}var dc=l(`ZodCIDRv6`,(e,t)=>{rr.init(e,t),D.init(e,t)});function fc(e){return Ji(dc,e)}var pc=l(`ZodBase64`,(e,t)=>{ar.init(e,t),D.init(e,t)});function mc(e){return Yi(pc,e)}var hc=l(`ZodBase64URL`,(e,t)=>{sr.init(e,t),D.init(e,t)});function gc(e){return Xi(hc,e)}var _c=l(`ZodE164`,(e,t)=>{cr.init(e,t),D.init(e,t)});function vc(e){return Zi(_c,e)}var yc=l(`ZodJWT`,(e,t)=>{ur.init(e,t),D.init(e,t)});function bc(e){return Qi(yc,e)}var xc=l(`ZodCustomStringFormat`,(e,t)=>{dr.init(e,t),D.init(e,t)});function Sc(e,t,n={}){return so(xc,e,t,n)}function Cc(e){return so(xc,`hostname`,kt,e)}function wc(e){return so(xc,`hex`,qt,e)}function Tc(e,t){let n=`${e}_${t?.enc??`hex`}`,r=tt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return so(xc,n,r,t)}var Ec=l(`ZodNumber`,(e,t)=>{fr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r),Os(e,`ZodNumber`,{gt(e,t){return this.check(Ta(e,t))},gte(e,t){return this.check(Ea(e,t))},min(e,t){return this.check(Ea(e,t))},lt(e,t){return this.check(Ca(e,t))},lte(e,t){return this.check(wa(e,t))},max(e,t){return this.check(wa(e,t))},int(e){return this.check(Oc(e))},safe(e){return this.check(Oc(e))},positive(e){return this.check(Ta(0,e))},nonnegative(e){return this.check(Ea(0,e))},negative(e){return this.check(Ca(0,e))},nonpositive(e){return this.check(wa(0,e))},multipleOf(e,t){return this.check(ja(e,t))},step(e,t){return this.check(ja(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function O(e){return ra(Ec,e)}var Dc=l(`ZodNumberFormat`,(e,t)=>{pr.init(e,t),Ec.init(e,t)});function Oc(e){return aa(Dc,e)}function kc(e){return oa(Dc,e)}function Ac(e){return sa(Dc,e)}function jc(e){return ca(Dc,e)}function Mc(e){return la(Dc,e)}var Nc=l(`ZodBoolean`,(e,t)=>{mr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r)});function k(e){return ua(Nc,e)}var Pc=l(`ZodBigInt`,(e,t)=>{hr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r),e.gte=(t,n)=>e.check(Ea(t,n)),e.min=(t,n)=>e.check(Ea(t,n)),e.gt=(t,n)=>e.check(Ta(t,n)),e.gte=(t,n)=>e.check(Ea(t,n)),e.min=(t,n)=>e.check(Ea(t,n)),e.lt=(t,n)=>e.check(Ca(t,n)),e.lte=(t,n)=>e.check(wa(t,n)),e.max=(t,n)=>e.check(wa(t,n)),e.positive=t=>e.check(Ta(BigInt(0),t)),e.negative=t=>e.check(Ca(BigInt(0),t)),e.nonpositive=t=>e.check(wa(BigInt(0),t)),e.nonnegative=t=>e.check(Ea(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ja(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Fc(e){return da(Pc,e)}var Ic=l(`ZodBigIntFormat`,(e,t)=>{gr.init(e,t),Pc.init(e,t)});function Lc(e){return fa(Ic,e)}function Rc(e){return pa(Ic,e)}var zc=l(`ZodSymbol`,(e,t)=>{_r.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r)});function Bc(e){return ma(zc,e)}var Vc=l(`ZodUndefined`,(e,t)=>{vr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>So(e,t,n,r)});function Hc(e){return ha(Vc,e)}var Uc=l(`ZodNull`,(e,t)=>{yr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r)});function Wc(e){return ga(Uc,e)}var Gc=l(`ZodAny`,(e,t)=>{br.init(e,t),T.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Kc(){return _a(Gc)}var qc=l(`ZodUnknown`,(e,t)=>{xr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function A(){return va(qc)}var Jc=l(`ZodNever`,(e,t)=>{Sr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r)});function Yc(e){return ya(Jc,e)}var Xc=l(`ZodVoid`,(e,t)=>{Cr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Co(e,t,n,r)});function Zc(e){return ba(Xc,e)}var Qc=l(`ZodDate`,(e,t)=>{wr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Do(e,t,n,r),e.min=(t,n)=>e.check(Ea(t,n)),e.max=(t,n)=>e.check(wa(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function $c(e){return xa(Qc,e)}var el=l(`ZodArray`,(e,t)=>{Er.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r),e.element=t.element,Os(e,`ZodArray`,{min(e,t){return this.check(Ia(e,t))},nonempty(e){return this.check(Ia(1,e))},max(e,t){return this.check(Fa(e,t))},length(e,t){return this.check(La(e,t))},unwrap(){return this.element}})});function j(e,t){return Qa(el,e,t)}function tl(e){let t=e._zod.def.shape;return I(Object.keys(t))}var nl=l(`ZodObject`,(e,t)=>{jr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bo(e,t,n,r),_(e,`shape`,()=>t.shape),Os(e,`ZodObject`,{keyof(){return I(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:A()})},loose(){return this.clone({...this._zod.def,catchall:A()})},strict(){return this.clone({...this._zod.def,catchall:Yc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Se(this,e)},safeExtend(e){return Ce(this,e)},merge(e){return we(this,e)},pick(e){return be(this,e)},omit(e){return xe(this,e)},partial(...e){return Te(Dl,this,e[0])},required(...e){return Ee(Ll,this,e[0])}})});function M(e,t){return new nl({type:`object`,shape:e??{},...v(t)})}function rl(e,t){return new nl({type:`object`,shape:e,catchall:Yc(),...v(t)})}function N(e,t){return new nl({type:`object`,shape:e,catchall:A(),...v(t)})}var il=l(`ZodUnion`,(e,t)=>{Nr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vo(e,t,n,r),e.options=t.options});function P(e,t){return new il({type:`union`,options:e,...v(t)})}var al=l(`ZodXor`,(e,t)=>{il.init(e,t),Fr.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vo(e,t,n,r),e.options=t.options});function ol(e,t){return new al({type:`union`,options:e,inclusive:!1,...v(t)})}var sl=l(`ZodDiscriminatedUnion`,(e,t)=>{il.init(e,t),Ir.init(e,t)});function cl(e,t,n){return new sl({type:`union`,options:t,discriminator:e,...v(n)})}var ll=l(`ZodIntersection`,(e,t)=>{Lr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)});function ul(e,t){return new ll({type:`intersection`,left:e,right:t})}var dl=l(`ZodTuple`,(e,t)=>{Br.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function fl(e,t,n){let r=t instanceof S;return new dl({type:`tuple`,items:e,rest:r?t:null,...v(r?n:t)})}var pl=l(`ZodRecord`,(e,t)=>{Wr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function F(e,t,n){return!t||!t._zod?new pl({type:`record`,keyType:E(),valueType:e,...v(t)}):new pl({type:`record`,keyType:e,valueType:t,...v(n)})}function ml(e,t,n){let r=ge(e);return r._zod.values=void 0,new pl({type:`record`,keyType:r,valueType:t,...v(n)})}function hl(e,t,n){return new pl({type:`record`,keyType:e,valueType:t,mode:`loose`,...v(n)})}var gl=l(`ZodMap`,(e,t)=>{Gr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(Na(...t)),e.nonempty=t=>e.check(Na(1,t)),e.max=(...t)=>e.check(Ma(...t)),e.size=(...t)=>e.check(Pa(...t))});function _l(e,t,n){return new gl({type:`map`,keyType:e,valueType:t,...v(n)})}var vl=l(`ZodSet`,(e,t)=>{qr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ro(e,t,n,r),e.min=(...t)=>e.check(Na(...t)),e.nonempty=t=>e.check(Na(1,t)),e.max=(...t)=>e.check(Ma(...t)),e.size=(...t)=>e.check(Pa(...t))});function yl(e,t){return new vl({type:`set`,valueType:e,...v(t)})}var bl=l(`ZodEnum`,(e,t)=>{Yr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oo(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new bl({...t,checks:[],...v(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new bl({...t,checks:[],...v(r),entries:i})}});function I(e,t){return new bl({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...v(t)})}function xl(e,t){return new bl({type:`enum`,entries:e,...v(t)})}var Sl=l(`ZodLiteral`,(e,t)=>{Xr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function L(e,t){return new Sl({type:`literal`,values:Array.isArray(e)?e:[e],...v(t)})}var Cl=l(`ZodFile`,(e,t)=>{Zr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mo(e,t,n,r),e.min=(t,n)=>e.check(Na(t,n)),e.max=(t,n)=>e.check(Ma(t,n)),e.mime=(t,n)=>e.check(Ga(Array.isArray(t)?t:[t],n))});function wl(e){return $a(Cl,e)}var Tl=l(`ZodTransform`,(e,t)=>{Qr.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new d(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ne(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ne(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function El(e){return new Tl({type:`transform`,transform:e})}var Dl=l(`ZodOptional`,(e,t)=>{ei.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function R(e){return new Dl({type:`optional`,innerType:e})}var Ol=l(`ZodExactOptional`,(e,t)=>{ti.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kl(e){return new Ol({type:`optional`,innerType:e})}var Al=l(`ZodNullable`,(e,t)=>{ni.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jl(e){return new Al({type:`nullable`,innerType:e})}function Ml(e){return R(jl(e))}var Nl=l(`ZodDefault`,(e,t)=>{ri.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Pl(e,t){return new Nl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():fe(t)}})}var Fl=l(`ZodPrefault`,(e,t)=>{ai.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Il(e,t){return new Fl({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():fe(t)}})}var Ll=l(`ZodNonOptional`,(e,t)=>{oi.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rl(e,t){return new Ll({type:`nonoptional`,innerType:e,...v(t)})}var zl=l(`ZodSuccess`,(e,t)=>{ci.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>No(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bl(e){return new zl({type:`success`,innerType:e})}var Vl=l(`ZodCatch`,(e,t)=>{li.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hl(e,t){return new Vl({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Ul=l(`ZodNaN`,(e,t)=>{ui.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r)});function Wl(e){return Sa(Ul,e)}var Gl=l(`ZodPipe`,(e,t)=>{di.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.in=t.in,e.out=t.out});function Kl(e,t){return new Gl({type:`pipe`,in:e,out:t})}var ql=l(`ZodCodec`,(e,t)=>{Gl.init(e,t),pi.init(e,t)});function Jl(e,t,n){return new ql({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Yl(e){let t=e._zod.def;return new ql({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Xl=l(`ZodPreprocess`,(e,t)=>{Gl.init(e,t),gi.init(e,t)}),Zl=l(`ZodReadonly`,(e,t)=>{_i.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ql(e){return new Zl({type:`readonly`,innerType:e})}var $l=l(`ZodTemplateLiteral`,(e,t)=>{yi.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r)});function eu(e,t){return new $l({type:`template_literal`,parts:e,...v(t)})}var tu=l(`ZodLazy`,(e,t)=>{Si.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function nu(e){return new tu({type:`lazy`,getter:e})}var ru=l(`ZodPromise`,(e,t)=>{xi.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iu(e){return new ru({type:`promise`,innerType:e})}var au=l(`ZodFunction`,(e,t)=>{bi.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fo(e,t,n,r)});function ou(e){return new au({type:`function`,input:Array.isArray(e?.input)?fl(e?.input):e?.input??j(A()),output:e?.output??A()})}var su=l(`ZodCustom`,(e,t)=>{Ci.init(e,t),T.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r)});function cu(e){let t=new x({check:`custom`});return t._zod.check=e,t}function lu(e,t){return eo(su,e??(()=>!0),t)}function uu(e,t={}){return to(su,e,t)}function du(e,t){return no(e,t)}var fu=io,pu=ao;function mu(e,t={}){let n=new su({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...v(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var hu=(...e)=>oo({Codec:ql,Boolean:Nc,String:As},...e);function gu(e){let t=nu(()=>P([E(e),O(),k(),Wc(),j(t),F(E(),t)]));return t}function _u(e,t){return new Xl({type:`pipe`,in:El(e),out:t})}var vu={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},yu;yu||={};var z={...Es,...rs,iso:is},bu=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function xu(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Su(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Cu(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return z.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return z.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=B(Su(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return z.null();if(n.length===0)return z.never();if(n.length===1)return z.literal(n[0]);if(n.every(e=>typeof e==`string`))return z.enum(n);let r=n.map(e=>z.literal(e));return r.length<2?r[0]:z.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Cu({...e,type:n},t));return r.length===0?z.never():r.length===1?r[0]:z.union(r)}if(!n)return z.any();let r;switch(n){case`string`:{let t=z.string();if(e.format){let n=e.format;n===`email`?t=t.check(z.email()):n===`uri`||n===`uri-reference`?t=t.check(z.url()):n===`uuid`||n===`guid`?t=t.check(z.uuid()):n===`date-time`?t=t.check(z.iso.datetime()):n===`date`?t=t.check(z.iso.date()):n===`time`?t=t.check(z.iso.time()):n===`duration`?t=t.check(z.iso.duration()):n===`ipv4`?t=t.check(z.ipv4()):n===`ipv6`?t=t.check(z.ipv6()):n===`mac`?t=t.check(z.mac()):n===`cidr`?t=t.check(z.cidrv4()):n===`cidr-v6`?t=t.check(z.cidrv6()):n===`base64`?t=t.check(z.base64()):n===`base64url`?t=t.check(z.base64url()):n===`e164`?t=t.check(z.e164()):n===`jwt`?t=t.check(z.jwt()):n===`emoji`?t=t.check(z.emoji()):n===`nanoid`?t=t.check(z.nanoid()):n===`cuid`?t=t.check(z.cuid()):n===`cuid2`?t=t.check(z.cuid2()):n===`ulid`?t=t.check(z.ulid()):n===`xid`?t=t.check(z.xid()):n===`ksuid`&&(t=t.check(z.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?z.number().int():z.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=z.boolean();break;case`null`:r=z.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=B(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=B(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?B(e.additionalProperties,t):z.any();if(Object.keys(n).length===0){r=z.record(i,a);break}let o=z.object(n).passthrough(),s=z.looseRecord(i,a);r=z.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=B(i[e],t),r=z.string().regex(new RegExp(e));o.push(z.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(z.object(n).passthrough()),s.push(...o),s.length===0)r=z.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=z.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=z.intersection(e,s[t]);r=e}break}let o=z.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(B(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>B(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?B(i,t):void 0;r=o?z.tuple(a).rest(o):z.tuple(a),typeof e.minItems==`number`&&(r=r.check(z.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>B(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?B(e.additionalItems,t):void 0;r=a?z.tuple(n).rest(a):z.tuple(n),typeof e.minItems==`number`&&(r=r.check(z.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(z.maxLength(e.maxItems)))}else if(i!==void 0){let n=B(i,t),a=z.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=z.array(z.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function B(e,t){if(typeof e==`boolean`)return e?z.any():z.never();let n=Cu(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>B(e,t)),a=z.union(i);n=r?z.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>B(e,t)),a=z.xor(i);n=r?z.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:z.any();else{let i=r?n:B(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=z.intersection(i,B(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=z.nullable(n)),e.readOnly===!0&&(n=z.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))bu.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function wu(e,t){if(typeof e==`boolean`)return e?z.any():z.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:xu(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Oi};return B(n,r)}function Tu(e){return ia(Ec,e)}var Eu=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Du=`io.modelcontextprotocol/related-task`,Ou=`io.modelcontextprotocol/protocolVersion`,ku=`io.modelcontextprotocol/clientInfo`,Au=`io.modelcontextprotocol/serverInfo`,ju=`io.modelcontextprotocol/clientCapabilities`,Mu=`io.modelcontextprotocol/subscriptionId`,Nu=`io.modelcontextprotocol/logLevel`,Pu=nu(()=>P([E(),O(),k(),Wc(),F(E(),Pu),j(Pu)])),V=F(E(),Pu),Fu=j(Pu),Iu=P([E(),O().int()]),Lu=E(),Ru=M({ttl:O().optional()}),zu=M({taskId:E()}),Bu=N({progressToken:Iu.optional(),[Du]:zu.optional()}),H=M({_meta:Bu.optional()}),Vu=H.extend({task:Ru.optional()}),U=M({method:E(),params:H.loose().optional()}),Hu=M({_meta:Bu.optional()}),Uu=M({method:E(),params:Hu.loose().optional()}),Wu=N({get[Au](){return id.optional().catch(void 0)}}),W=N({_meta:Wu.optional()}),Gu=P([E(),O().int()]),Ku=M({jsonrpc:L(`2.0`),id:Gu,...U.shape}).strict(),qu=M({jsonrpc:L(`2.0`),...Uu.shape}).strict(),Ju=M({jsonrpc:L(`2.0`),id:Gu,result:W}).strict(),Yu=M({jsonrpc:L(`2.0`),id:Gu.optional(),error:M({code:O().int(),message:E(),data:A().optional()})}).strict(),Xu=P([Ku,qu,Ju,Yu]),Zu=P([Ju,Yu]),Qu=W.strict(),$u=Hu.extend({requestId:Gu.optional(),reason:E().optional()}),ed=Uu.extend({method:L(`notifications/cancelled`),params:$u}),td=M({src:E(),mimeType:E().optional(),sizes:j(E()).optional(),theme:I([`light`,`dark`]).optional()}),nd=M({icons:j(td).optional()}),rd=M({name:E(),title:E().optional()}),id=rd.extend({...rd.shape,...nd.shape,version:E(),websiteUrl:E().optional(),description:E().optional()}),ad=_u(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ul(M({form:ul(M({applyDefaults:k().optional()}),V).optional(),url:V.optional()}),V.optional())),od=N({list:V.optional(),cancel:V.optional(),requests:N({sampling:N({createMessage:V.optional()}).optional(),elicitation:N({create:V.optional()}).optional()}).optional()}),sd=N({list:V.optional(),cancel:V.optional(),requests:N({tools:N({call:V.optional()}).optional()}).optional()}),cd=M({experimental:F(E(),V).optional(),sampling:M({context:V.optional(),tools:V.optional()}).optional(),elicitation:ad.optional(),roots:M({listChanged:k().optional()}).optional(),tasks:od.optional(),extensions:F(E(),V).optional()}),ld=H.extend({protocolVersion:E(),capabilities:cd,clientInfo:id}),ud=U.extend({method:L(`initialize`),params:ld}),dd=M({experimental:F(E(),V).optional(),logging:V.optional(),completions:V.optional(),prompts:M({listChanged:k().optional()}).optional(),resources:M({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:M({listChanged:k().optional()}).optional(),tasks:sd.optional(),extensions:F(E(),V).optional()}),fd=W.extend({protocolVersion:E(),capabilities:dd,serverInfo:id,instructions:E().optional()}),pd=Uu.extend({method:L(`notifications/initialized`),params:Hu.optional()}),md=U.extend({method:L(`server/discover`),params:H.optional()}),hd=W.extend({supportedVersions:j(E()),capabilities:dd,instructions:E().optional()}),gd=U.extend({method:L(`ping`),params:H.optional()}),_d=M({progress:O(),total:R(O()),message:R(E())}),vd=M({...Hu.shape,..._d.shape,progressToken:Iu}),yd=Uu.extend({method:L(`notifications/progress`),params:vd}),bd=H.extend({cursor:Lu.optional()}),xd=U.extend({params:bd.optional()}),Sd=W.extend({nextCursor:Lu.optional()}),Cd=M({uri:E(),mimeType:R(E()),_meta:F(E(),A()).optional()}),wd=Cd.extend({text:E()}),Td=E().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Ed=Cd.extend({blob:Td}),Dd=I([`user`,`assistant`]),Od=M({audience:j(Dd).optional(),priority:O().min(0).max(1).optional(),lastModified:os({offset:!0}).optional()}),kd=M({...rd.shape,...nd.shape,uri:E(),description:R(E()),mimeType:R(E()),size:R(O()),annotations:Od.optional(),_meta:R(N({}))}),Ad=M({...rd.shape,...nd.shape,uriTemplate:E(),description:R(E()),mimeType:R(E()),annotations:Od.optional(),_meta:R(N({}))}),jd=xd.extend({method:L(`resources/list`)}),Md=Sd.extend({resources:j(kd)}),Nd=xd.extend({method:L(`resources/templates/list`)}),Pd=Sd.extend({resourceTemplates:j(Ad)}),Fd=H.extend({uri:E()}),Id=Fd,Ld=U.extend({method:L(`resources/read`),params:Id}),Rd=W.extend({contents:j(P([wd,Ed]))}),zd=Uu.extend({method:L(`notifications/resources/list_changed`),params:Hu.optional()}),Bd=Fd,Vd=U.extend({method:L(`resources/subscribe`),params:Bd}),Hd=Fd,Ud=U.extend({method:L(`resources/unsubscribe`),params:Hd}),Wd=M({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:j(E()).optional()}),Gd=H.extend({notifications:Wd}),Kd=U.extend({method:L(`subscriptions/listen`),params:Gd}),qd=Hu.extend({notifications:Wd}),Jd=Uu.extend({method:L(`notifications/subscriptions/acknowledged`),params:qd}),Yd=Wu.extend({[Mu]:Gu}),Xd=W.extend({_meta:Yd}),Zd=Hu.extend({uri:E()}),Qd=Uu.extend({method:L(`notifications/resources/updated`),params:Zd}),$d=M({name:E(),description:R(E()),required:R(k())}),ef=M({...rd.shape,...nd.shape,description:R(E()),arguments:R(j($d)),_meta:R(N({}))}),tf=xd.extend({method:L(`prompts/list`)}),nf=Sd.extend({prompts:j(ef)}),rf=H.extend({name:E(),arguments:F(E(),E()).optional()}),af=U.extend({method:L(`prompts/get`),params:rf}),of=M({type:L(`text`),text:E(),annotations:Od.optional(),_meta:F(E(),A()).optional()}),sf=M({type:L(`image`),data:Td,mimeType:E(),annotations:Od.optional(),_meta:F(E(),A()).optional()}),cf=M({type:L(`audio`),data:Td,mimeType:E(),annotations:Od.optional(),_meta:F(E(),A()).optional()}),lf=M({type:L(`tool_use`),name:E(),id:E(),input:F(E(),A()),_meta:F(E(),A()).optional()}),uf=M({type:L(`resource`),resource:P([wd,Ed]),annotations:Od.optional(),_meta:F(E(),A()).optional()}),df=kd.extend({type:L(`resource_link`)}),ff=P([of,sf,cf,df,uf]),pf=M({role:Dd,content:ff}),mf=W.extend({description:E().optional(),messages:j(pf)}),hf=Uu.extend({method:L(`notifications/prompts/list_changed`),params:Hu.optional()}),gf=M({title:E().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),_f=M({taskSupport:I([`required`,`optional`,`forbidden`]).optional()}),vf=M({...rd.shape,...nd.shape,description:E().optional(),inputSchema:M({type:L(`object`),properties:F(E(),Pu).optional(),required:j(E()).optional()}).catchall(A()),outputSchema:N({$schema:E().optional()}).optional(),annotations:gf.optional(),execution:_f.optional(),_meta:F(E(),A()).optional()}),yf=xd.extend({method:L(`tools/list`)}),bf=Sd.extend({tools:j(vf)}),xf=W.extend({content:j(ff).default([]),structuredContent:A().optional(),isError:k().optional()}),Sf=xf.or(W.extend({toolResult:A()})),Cf=Vu.extend({name:E(),arguments:F(E(),A()).optional()}),wf=U.extend({method:L(`tools/call`),params:Cf}),Tf=Uu.extend({method:L(`notifications/tools/list_changed`),params:Hu.optional()}),Ef=M({autoRefresh:k().default(!0),debounceMs:O().int().nonnegative().default(300)}),Df=I([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Of=H.extend({level:Df}),kf=U.extend({method:L(`logging/setLevel`),params:Of}),Af=Hu.extend({level:Df,logger:E().optional(),data:A()}),jf=Uu.extend({method:L(`notifications/message`),params:Af}),Mf=M({name:E().optional()}),Nf=M({hints:j(Mf).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Pf=M({mode:I([`auto`,`required`,`none`]).optional()}),Ff=M({type:L(`tool_result`),toolUseId:E().describe(`The unique identifier for the corresponding tool call.`),content:j(ff),structuredContent:A().optional(),isError:k().optional(),_meta:F(E(),A()).optional()}),If=cl(`type`,[of,sf,cf]),Lf=cl(`type`,[of,sf,cf,lf,Ff]),Rf=M({role:Dd,content:P([Lf,j(Lf)]),_meta:F(E(),A()).optional()}),zf=Vu.extend({messages:j(Rf),modelPreferences:Nf.optional(),systemPrompt:E().optional(),includeContext:I([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:j(E()).optional(),metadata:V.optional(),tools:j(vf).optional(),toolChoice:Pf.optional()}),Bf=U.extend({method:L(`sampling/createMessage`),params:zf}),Vf=W.extend({model:E(),stopReason:R(I([`endTurn`,`stopSequence`,`maxTokens`]).or(E())),role:Dd,content:If}),Hf=W.extend({model:E(),stopReason:R(I([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(E())),role:Dd,content:P([Lf,j(Lf)])}),Uf=M({type:L(`boolean`),title:E().optional(),description:E().optional(),default:k().optional()}),Wf=M({type:L(`string`),title:E().optional(),description:E().optional(),minLength:O().optional(),maxLength:O().optional(),format:I([`email`,`uri`,`date`,`date-time`]).optional(),default:E().optional()}),Gf=M({type:I([`number`,`integer`]),title:E().optional(),description:E().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),Kf=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),default:E().optional()}),qf=M({type:L(`string`),title:E().optional(),description:E().optional(),oneOf:j(M({const:E(),title:E()})),default:E().optional()}),Jf=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),enumNames:j(E()).optional(),default:E().optional()}),Yf=P([Kf,qf]),Xf=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({type:L(`string`),enum:j(E())}),default:j(E()).optional()}),Zf=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({anyOf:j(M({const:E(),title:E()}))}),default:j(E()).optional()}),Qf=P([Xf,Zf]),$f=P([Jf,Yf,Qf]),ep=P([$f,Uf,Wf,Gf]),tp=Vu.extend({mode:L(`form`).optional(),message:E(),requestedSchema:M({type:L(`object`),properties:F(E(),ep),required:j(E()).optional()}).catchall(A())}),np=Vu.extend({mode:L(`url`),message:E(),elicitationId:E(),url:E().url()}),rp=P([tp,np]),ip=U.extend({method:L(`elicitation/create`),params:rp}),ap=Hu.extend({elicitationId:E()}),op=Uu.extend({method:L(`notifications/elicitation/complete`),params:ap}),sp=W.extend({action:I([`accept`,`decline`,`cancel`]),content:_u(e=>e===null?void 0:e,F(E(),P([E(),O(),k(),j(E())])).optional())}),cp=M({type:L(`ref/resource`),uri:E()}),lp=M({type:L(`ref/prompt`),name:E()}),up=H.extend({ref:P([lp,cp]),argument:M({name:E(),value:E()}),context:M({arguments:F(E(),E()).optional()}).optional()}),dp=U.extend({method:L(`completion/complete`),params:up}),fp=W.extend({completion:N({values:j(E()).max(100),total:R(O().int()),hasMore:R(k())})}),pp=M({uri:E().startsWith(`file://`),name:E().optional(),_meta:F(E(),A()).optional()}),mp=U.extend({method:L(`roots/list`),params:H.optional()}),hp=W.extend({roots:j(pp)}),gp=Uu.extend({method:L(`notifications/roots/list_changed`),params:Hu.optional()}),_p=N({ttl:O().optional(),pollInterval:O().optional()}),vp=I([`working`,`input_required`,`completed`,`failed`,`cancelled`]),yp=M({taskId:E(),status:vp,ttl:P([O(),Wc()]),createdAt:E(),lastUpdatedAt:E(),pollInterval:R(O()),statusMessage:R(E())}),bp=W.extend({task:yp}),xp=Hu.merge(yp),Sp=Uu.extend({method:L(`notifications/tasks/status`),params:xp}),Cp=U.extend({method:L(`tasks/get`),params:H.extend({taskId:E()})}),wp=W.merge(yp),Tp=U.extend({method:L(`tasks/result`),params:H.extend({taskId:E()})}),Ep=W.loose(),Dp=xd.extend({method:L(`tasks/list`)}),Op=Sd.extend({tasks:j(yp)}),kp=U.extend({method:L(`tasks/cancel`),params:H.extend({taskId:E()})}),Ap=W.merge(yp),jp=P([gd,ud,md,dp,kf,af,tf,jd,Nd,Ld,Vd,Ud,Kd,wf,yf]),Mp=P([ed,yd,pd,gp]),Np=P([Qu,Vf,Hf,sp,hp]),Pp=P([gd,Bf,ip,mp]),Fp=P([ed,yd,jf,Qd,zd,Tf,hf,Jd,op]),Ip=P([Qu,fd,hd,fp,mf,nf,Md,Pd,Rd,xf,bf,Xd]),G=Vs().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:vu.custom,message:`URL must be parseable`,fatal:!0}),c}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Lp=N({resource:E().url(),authorization_servers:j(G).optional(),jwks_uri:E().url().optional(),scopes_supported:j(E()).optional(),bearer_methods_supported:j(E()).optional(),resource_signing_alg_values_supported:j(E()).optional(),resource_name:E().optional(),resource_documentation:E().optional(),resource_policy_uri:E().url().optional(),resource_tos_uri:E().url().optional(),tls_client_certificate_bound_access_tokens:k().optional(),authorization_details_types_supported:j(E()).optional(),dpop_signing_alg_values_supported:j(E()).optional(),dpop_bound_access_tokens_required:k().optional()}),Rp=N({issuer:E(),authorization_endpoint:G,token_endpoint:G,registration_endpoint:G.optional(),scopes_supported:j(E()).optional(),response_types_supported:j(E()),response_modes_supported:j(E()).optional(),grant_types_supported:j(E()).optional(),token_endpoint_auth_methods_supported:j(E()).optional(),token_endpoint_auth_signing_alg_values_supported:j(E()).optional(),service_documentation:G.optional(),revocation_endpoint:G.optional(),revocation_endpoint_auth_methods_supported:j(E()).optional(),revocation_endpoint_auth_signing_alg_values_supported:j(E()).optional(),introspection_endpoint:E().optional(),introspection_endpoint_auth_methods_supported:j(E()).optional(),introspection_endpoint_auth_signing_alg_values_supported:j(E()).optional(),code_challenge_methods_supported:j(E()).optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0)}),zp=N({issuer:E(),authorization_endpoint:G,token_endpoint:G,userinfo_endpoint:G.optional(),jwks_uri:G,registration_endpoint:G.optional(),scopes_supported:j(E()).optional(),response_types_supported:j(E()),response_modes_supported:j(E()).optional(),grant_types_supported:j(E()).optional(),acr_values_supported:j(E()).optional(),subject_types_supported:j(E()),id_token_signing_alg_values_supported:j(E()),id_token_encryption_alg_values_supported:j(E()).optional(),id_token_encryption_enc_values_supported:j(E()).optional(),userinfo_signing_alg_values_supported:j(E()).optional(),userinfo_encryption_alg_values_supported:j(E()).optional(),userinfo_encryption_enc_values_supported:j(E()).optional(),request_object_signing_alg_values_supported:j(E()).optional(),request_object_encryption_alg_values_supported:j(E()).optional(),request_object_encryption_enc_values_supported:j(E()).optional(),token_endpoint_auth_methods_supported:j(E()).optional(),token_endpoint_auth_signing_alg_values_supported:j(E()).optional(),display_values_supported:j(E()).optional(),claim_types_supported:j(E()).optional(),claims_supported:j(E()).optional(),service_documentation:E().optional(),claims_locales_supported:j(E()).optional(),ui_locales_supported:j(E()).optional(),claims_parameter_supported:k().optional(),request_parameter_supported:k().optional(),request_uri_parameter_supported:k().optional(),require_request_uri_registration:k().optional(),op_policy_uri:G.optional(),op_tos_uri:G.optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0)}),Bp=M({...zp.shape,...Rp.pick({code_challenge_methods_supported:!0}).shape}),Vp=M({access_token:E(),id_token:E().optional(),token_type:E(),expires_in:Tu().optional(),scope:E().optional(),refresh_token:E().optional()}).strip(),Hp=M({issued_token_type:L(`urn:ietf:params:oauth:token-type:id-jag`),access_token:E(),token_type:E().optional(),expires_in:O().optional(),scope:E().optional()}).strip(),Up=M({error:E(),error_description:E().optional(),error_uri:E().optional()}),Wp=G.optional().or(L(``).transform(()=>void 0)),Gp=M({redirect_uris:j(G),token_endpoint_auth_method:E().optional(),grant_types:j(E()).optional(),response_types:j(E()).optional(),application_type:E().optional(),client_name:E().optional(),client_uri:G.optional(),logo_uri:Wp,scope:E().optional(),contacts:j(E()).optional(),tos_uri:Wp,policy_uri:E().optional(),jwks_uri:G.optional(),jwks:Kc().optional(),software_id:E().optional(),software_version:E().optional(),software_statement:E().optional()}).strip(),Kp=M({client_id:E(),client_secret:E().optional(),client_id_issued_at:O().optional(),client_secret_expires_at:O().optional()}).strip(),qp=Gp.merge(Kp),Jp=M({error:E(),error_description:E().optional()}).strip(),Yp=M({token:E(),token_type_hint:E().optional()}).strip(),Xp=Symbol.for(`mcp.sdk.errorBrands`);function Zp(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Xp,{value:n,enumerable:!1,configurable:!0})}function Qp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Xp)){let n=t[Xp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Zp(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var K=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),q=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,Zp(this,new.target)}};(class extends q{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n){super(e,t,n),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}});var $p=`2026-07-28`;function em(e){return e>=$p}function tm(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var nm=[`task`,`inputRequests`,`requestState`];function rm(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||nm.some(t=>t in e)?e:{...e,content:[]}}function im(){let e=nu(()=>P([E(),O(),k(),Wc(),F(E(),e),j(e)])),t=F(E(),e),n=P([E(),O().int()]),r=E(),i=M({ttl:O().optional()}),a=M({taskId:E()}),o=N({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=M({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=M({method:E(),params:s.loose().optional()}),u=M({_meta:o.optional()}),d=M({method:E(),params:u.loose().optional()}),f=N({_meta:o.optional()}),p=P([E(),O().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:E().optional()}),ee=d.extend({method:L(`notifications/cancelled`),params:h}),g=M({src:E(),mimeType:E().optional(),sizes:j(E()).optional(),theme:I([`light`,`dark`]).optional()}),te=M({icons:j(g).optional()}),ne=M({name:E(),title:E().optional()}),re=ne.extend({...ne.shape,...te.shape,version:E(),websiteUrl:E().optional(),description:E().optional()}),_=_u(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ul(M({form:ul(M({applyDefaults:k().optional()}),t).optional(),url:t.optional()}),t.optional())),ie=N({list:t.optional(),cancel:t.optional(),requests:N({sampling:N({createMessage:t.optional()}).optional(),elicitation:N({create:t.optional()}).optional()}).optional()}),ae=N({list:t.optional(),cancel:t.optional(),requests:N({tools:N({call:t.optional()}).optional()}).optional()}),oe=M({experimental:F(E(),t).optional(),sampling:M({context:t.optional(),tools:t.optional()}).optional(),elicitation:_.optional(),roots:M({listChanged:k().optional()}).optional(),tasks:ie.optional(),extensions:F(E(),t).optional()}),se=s.extend({protocolVersion:E(),capabilities:oe,clientInfo:re}),ce=l.extend({method:L(`initialize`),params:se}),le=M({experimental:F(E(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:M({listChanged:k().optional()}).optional(),resources:M({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:M({listChanged:k().optional()}).optional(),tasks:ae.optional(),extensions:F(E(),t).optional()}),ue=f.extend({protocolVersion:E(),capabilities:le,serverInfo:re,instructions:E().optional()}),de=d.extend({method:L(`notifications/initialized`),params:u.optional()}),fe=l.extend({method:L(`ping`),params:s.optional()}),pe=M({progress:O(),total:R(O()),message:R(E())}),me=M({...u.shape,...pe.shape,progressToken:n}),he=d.extend({method:L(`notifications/progress`),params:me}),ge=s.extend({cursor:r.optional()}),v=l.extend({params:ge.optional()}),_e=f.extend({nextCursor:r.optional()}),ve=M({uri:E(),mimeType:R(E()),_meta:F(E(),A()).optional()}),ye=ve.extend({text:E()}),be=E().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),xe=ve.extend({blob:be}),Se=I([`user`,`assistant`]),Ce=M({audience:j(Se).optional(),priority:O().min(0).max(1).optional(),lastModified:os({offset:!0}).optional()}),we=M({...ne.shape,...te.shape,uri:E(),description:R(E()),mimeType:R(E()),size:R(O()),annotations:Ce.optional(),_meta:R(N({}))}),Te=M({...ne.shape,...te.shape,uriTemplate:E(),description:R(E()),mimeType:R(E()),annotations:Ce.optional(),_meta:R(N({}))}),Ee=v.extend({method:L(`resources/list`)}),De=_e.extend({resources:j(we)}),Oe=v.extend({method:L(`resources/templates/list`)}),ke=_e.extend({resourceTemplates:j(Te)}),Ae=s.extend({uri:E()}),y=Ae,je=l.extend({method:L(`resources/read`),params:y}),Me=f.extend({contents:j(P([ye,xe]))}),Ne=d.extend({method:L(`notifications/resources/list_changed`),params:u.optional()}),Pe=Ae,Fe=l.extend({method:L(`resources/subscribe`),params:Pe}),Ie=Ae,Le=l.extend({method:L(`resources/unsubscribe`),params:Ie}),Re=u.extend({uri:E()}),ze=d.extend({method:L(`notifications/resources/updated`),params:Re}),Be=M({name:E(),description:R(E()),required:R(k())}),Ve=M({...ne.shape,...te.shape,description:R(E()),arguments:R(j(Be)),_meta:R(N({}))}),He=v.extend({method:L(`prompts/list`)}),Ue=_e.extend({prompts:j(Ve)}),We=s.extend({name:E(),arguments:F(E(),E()).optional()}),Ge=l.extend({method:L(`prompts/get`),params:We}),Ke=M({type:L(`text`),text:E(),annotations:Ce.optional(),_meta:F(E(),A()).optional()}),qe=M({type:L(`image`),data:be,mimeType:E(),annotations:Ce.optional(),_meta:F(E(),A()).optional()}),Je=M({type:L(`audio`),data:be,mimeType:E(),annotations:Ce.optional(),_meta:F(E(),A()).optional()}),Ye=M({type:L(`tool_use`),name:E(),id:E(),input:F(E(),A()),_meta:F(E(),A()).optional()}),Xe=M({type:L(`resource`),resource:P([ye,xe]),annotations:Ce.optional(),_meta:F(E(),A()).optional()}),Ze=we.extend({type:L(`resource_link`)}),Qe=P([Ke,qe,Je,Ze,Xe]),$e=M({role:Se,content:Qe}),et=f.extend({description:E().optional(),messages:j($e)}),tt=d.extend({method:L(`notifications/prompts/list_changed`),params:u.optional()}),nt=M({title:E().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),rt=M({taskSupport:I([`required`,`optional`,`forbidden`]).optional()}),it=M({...ne.shape,...te.shape,description:E().optional(),inputSchema:M({type:L(`object`),properties:F(E(),e).optional(),required:j(E()).optional()}).catchall(A()),outputSchema:M({type:L(`object`),properties:F(E(),e).optional(),required:j(E()).optional()}).catchall(A()).optional(),annotations:nt.optional(),execution:rt.optional(),_meta:F(E(),A()).optional()}),at=v.extend({method:L(`tools/list`)}),ot=_e.extend({tools:j(it)}),st=f.extend({content:j(Qe),structuredContent:F(E(),A()).optional(),isError:k().optional()}),b=c.extend({name:E(),arguments:F(E(),A()).optional()}),ct=l.extend({method:L(`tools/call`),params:b}),lt=d.extend({method:L(`notifications/tools/list_changed`),params:u.optional()}),ut=I([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),dt=s.extend({level:ut}),ft=l.extend({method:L(`logging/setLevel`),params:dt}),pt=u.extend({level:ut,logger:E().optional(),data:A()}),mt=d.extend({method:L(`notifications/message`),params:pt}),ht=M({name:E().optional()}),gt=M({hints:j(ht).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),_t=M({mode:I([`auto`,`required`,`none`]).optional()}),vt=M({type:L(`tool_result`),toolUseId:E().describe(`The unique identifier for the corresponding tool call.`),content:j(Qe),structuredContent:M({}).loose().optional(),isError:k().optional(),_meta:F(E(),A()).optional()}),yt=cl(`type`,[Ke,qe,Je]),bt=cl(`type`,[Ke,qe,Je,Ye,vt]),xt=M({role:Se,content:P([bt,j(bt)]),_meta:F(E(),A()).optional()}),St=c.extend({messages:j(xt),modelPreferences:gt.optional(),systemPrompt:E().optional(),includeContext:I([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:j(E()).optional(),metadata:t.optional(),tools:j(it).optional(),toolChoice:_t.optional()}),Ct=l.extend({method:L(`sampling/createMessage`),params:St}),wt=f.extend({model:E(),stopReason:R(I([`endTurn`,`stopSequence`,`maxTokens`]).or(E())),role:Se,content:yt}),Tt=f.extend({model:E(),stopReason:R(I([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(E())),role:Se,content:P([bt,j(bt)])}),Et=M({type:L(`boolean`),title:E().optional(),description:E().optional(),default:k().optional()}),Dt=M({type:L(`string`),title:E().optional(),description:E().optional(),minLength:O().optional(),maxLength:O().optional(),format:I([`email`,`uri`,`date`,`date-time`]).optional(),default:E().optional()}),Ot=M({type:I([`number`,`integer`]),title:E().optional(),description:E().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),kt=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),default:E().optional()}),At=M({type:L(`string`),title:E().optional(),description:E().optional(),oneOf:j(M({const:E(),title:E()})),default:E().optional()}),jt=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),enumNames:j(E()).optional(),default:E().optional()}),Mt=P([kt,At]),Nt=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({type:L(`string`),enum:j(E())}),default:j(E()).optional()}),Pt=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({anyOf:j(M({const:E(),title:E()}))}),default:j(E()).optional()}),Ft=P([Nt,Pt]),It=P([jt,Mt,Ft]),Lt=P([It,Et,Dt,Ot]),Rt=c.extend({mode:L(`form`).optional(),message:E(),requestedSchema:M({type:L(`object`),properties:F(E(),Lt),required:j(E()).optional()}).catchall(A())}),zt=c.extend({mode:L(`url`),message:E(),elicitationId:E(),url:E().url()}),Bt=P([Rt,zt]),Vt=l.extend({method:L(`elicitation/create`),params:Bt}),Ht=u.extend({elicitationId:E()}),Ut=d.extend({method:L(`notifications/elicitation/complete`),params:Ht}),Wt=f.extend({action:I([`accept`,`decline`,`cancel`]),content:_u(e=>e===null?void 0:e,F(E(),P([E(),O(),k(),j(E())])).optional())}),Gt=M({type:L(`ref/resource`),uri:E()}),Kt=M({type:L(`ref/prompt`),name:E()}),qt=s.extend({ref:P([Kt,Gt]),argument:M({name:E(),value:E()}),context:M({arguments:F(E(),E()).optional()}).optional()}),Jt=l.extend({method:L(`completion/complete`),params:qt}),Yt=f.extend({completion:N({values:j(E()).max(100),total:R(O().int()),hasMore:R(k())})}),Xt=M({uri:E().startsWith(`file://`),name:E().optional(),_meta:F(E(),A()).optional()}),Zt=l.extend({method:L(`roots/list`),params:s.optional()}),Qt=f.extend({roots:j(Xt)}),$t=d.extend({method:L(`notifications/roots/list_changed`),params:u.optional()}),en=N({ttl:O().optional(),pollInterval:O().optional()}),tn=I([`working`,`input_required`,`completed`,`failed`,`cancelled`]),nn=M({taskId:E(),status:tn,ttl:P([O(),Wc()]),createdAt:E(),lastUpdatedAt:E(),pollInterval:R(O()),statusMessage:R(E())}),rn=f.extend({task:nn}),an=u.merge(nn),on=d.extend({method:L(`notifications/tasks/status`),params:an}),sn=l.extend({method:L(`tasks/get`),params:s.extend({taskId:E()})}),cn=f.merge(nn),ln=l.extend({method:L(`tasks/result`),params:s.extend({taskId:E()})}),un=f.loose(),dn=v.extend({method:L(`tasks/list`)}),x=_e.extend({tasks:j(nn)}),fn=l.extend({method:L(`tasks/cancel`),params:s.extend({taskId:E()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:ee,IconSchema:g,IconsSchema:te,BaseMetadataSchema:ne,ImplementationSchema:re,ClientTasksCapabilitySchema:ie,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:se,InitializeRequestSchema:ce,ServerCapabilitiesSchema:le,InitializeResultSchema:ue,InitializedNotificationSchema:de,PingRequestSchema:fe,ProgressSchema:pe,ProgressNotificationParamsSchema:me,ProgressNotificationSchema:he,PaginatedRequestParamsSchema:ge,PaginatedRequestSchema:v,PaginatedResultSchema:_e,ResourceContentsSchema:ve,TextResourceContentsSchema:ye,BlobResourceContentsSchema:xe,RoleSchema:Se,AnnotationsSchema:Ce,ResourceSchema:we,ResourceTemplateSchema:Te,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:De,ListResourceTemplatesRequestSchema:Oe,ListResourceTemplatesResultSchema:ke,ResourceRequestParamsSchema:Ae,ReadResourceRequestParamsSchema:y,ReadResourceRequestSchema:je,ReadResourceResultSchema:Me,ResourceListChangedNotificationSchema:Ne,SubscribeRequestParamsSchema:Pe,SubscribeRequestSchema:Fe,UnsubscribeRequestParamsSchema:Ie,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:Re,ResourceUpdatedNotificationSchema:ze,PromptArgumentSchema:Be,PromptSchema:Ve,ListPromptsRequestSchema:He,ListPromptsResultSchema:Ue,GetPromptRequestParamsSchema:We,GetPromptRequestSchema:Ge,TextContentSchema:Ke,ImageContentSchema:qe,AudioContentSchema:Je,ToolUseContentSchema:Ye,EmbeddedResourceSchema:Xe,ResourceLinkSchema:Ze,ContentBlockSchema:Qe,PromptMessageSchema:$e,GetPromptResultSchema:et,PromptListChangedNotificationSchema:tt,ToolAnnotationsSchema:nt,ToolExecutionSchema:rt,ToolSchema:it,ListToolsRequestSchema:at,ListToolsResultSchema:ot,CallToolResultSchema:st,CallToolRequestParamsSchema:b,CallToolRequestSchema:ct,ToolListChangedNotificationSchema:lt,LoggingLevelSchema:ut,SetLevelRequestParamsSchema:dt,SetLevelRequestSchema:ft,LoggingMessageNotificationParamsSchema:pt,LoggingMessageNotificationSchema:mt,ModelHintSchema:ht,ModelPreferencesSchema:gt,ToolChoiceSchema:_t,ToolResultContentSchema:vt,SamplingContentSchema:yt,SamplingMessageContentBlockSchema:bt,SamplingMessageSchema:xt,CreateMessageRequestParamsSchema:St,CreateMessageRequestSchema:Ct,CreateMessageResultSchema:wt,CreateMessageResultWithToolsSchema:Tt,BooleanSchemaSchema:Et,StringSchemaSchema:Dt,NumberSchemaSchema:Ot,UntitledSingleSelectEnumSchemaSchema:kt,TitledSingleSelectEnumSchemaSchema:At,LegacyTitledEnumSchemaSchema:jt,SingleSelectEnumSchemaSchema:Mt,UntitledMultiSelectEnumSchemaSchema:Nt,TitledMultiSelectEnumSchemaSchema:Pt,MultiSelectEnumSchemaSchema:Ft,EnumSchemaSchema:It,PrimitiveSchemaDefinitionSchema:Lt,ElicitRequestFormParamsSchema:Rt,ElicitRequestURLParamsSchema:zt,ElicitRequestParamsSchema:Bt,ElicitRequestSchema:Vt,ElicitationCompleteNotificationParamsSchema:Ht,ElicitationCompleteNotificationSchema:Ut,ElicitResultSchema:Wt,ResourceTemplateReferenceSchema:Gt,PromptReferenceSchema:Kt,CompleteRequestParamsSchema:qt,CompleteRequestSchema:Jt,CompleteResultSchema:Yt,RootSchema:Xt,ListRootsRequestSchema:Zt,ListRootsResultSchema:Qt,RootsListChangedNotificationSchema:$t,TaskCreationParamsSchema:en,TaskStatusSchema:tn,TaskSchema:nn,CreateTaskResultSchema:rn,TaskStatusNotificationParamsSchema:an,TaskStatusNotificationSchema:on,GetTaskRequestSchema:sn,GetTaskResultSchema:cn,GetTaskPayloadRequestSchema:ln,GetTaskPayloadResultSchema:un,ListTasksRequestSchema:dn,ListTasksResultSchema:x,CancelTaskRequestSchema:fn,CancelTaskResultSchema:f.merge(nn),ClientRequestSchema:P([fe,ce,Jt,ft,Ge,He,Ee,Oe,je,Fe,Le,ct,at,sn,ln,dn,fn]),ClientNotificationSchema:P([ee,he,de,$t,on]),ClientResultSchema:P([m,wt,Tt,Wt,Qt,cn,x,rn]),ServerRequestSchema:P([fe,Ct,Vt,Zt,sn,ln,dn,fn]),ServerNotificationSchema:P([ee,he,mt,ze,Ne,lt,tt,on,Ut]),ServerResultSchema:P([m,ue,Yt,et,Ue,De,ke,Me,st,ot,cn,x,rn]),CallToolResultWireSchema:A().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of nm)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(rm).pipe(st)}}var am;function om(){return am??=im()}function sm(e){return e.type!==`object`}var cm=new Set([`const`,`enum`,`default`,`examples`]),lm=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function um(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function dm(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(um(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=o(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&um(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:cm.has(o)?i[o]=s:lm.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var fm={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},pm={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},mm={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},hm;function gm(){if(hm)return hm;let e=om();return hm={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},hm}function _m(e){return Object.prototype.hasOwnProperty.call(fm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(pm,e)}function ym(e){return Object.prototype.hasOwnProperty.call(mm,e)}function bm(e){return ym(e)?gm().resultSchemas[e]:void 0}function xm(e){return _m(e)?gm().requestSchemas[e]:void 0}function Sm(e){return vm(e)?gm().notificationSchemas[e]:void 0}Object.keys(fm),Object.keys(pm);function Cm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wm(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Tm={ok:!1,reason:`not-in-era`};function Em(e){return Cm(e)&&Cm(e.outputSchema)&&sm(e.outputSchema)}function Dm(e){return e}var Om={era:`2025-11-25`,hasRequestMethod:_m,hasNotificationMethod:vm,validateRequest:(e,t)=>wm(xm(e),t),validateResult:(e,t)=>wm(bm(e),t),validateNotification:(e,t)=>wm(Sm(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Tm,validateInputResponse:()=>Tm,samplingResultVariant:((e,t)=>{let n=om();return wm(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=tm(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&sm(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Cm(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Dm(e)}}return{kind:`complete`,result:Dm(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Em(e))?t:{...t,tools:n.map(e=>Em(e)?{...e,outputSchema:dm(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function km(){let e=nu(()=>P([E(),O(),k(),Wc(),F(E(),e),j(e)])),t=F(E(),e),n=P([E(),O().int()]),r=E(),i=P([E(),O().int()]),a=I([`user`,`assistant`]),o=I([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=E().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=M({ttl:O().optional()}),l=M({taskId:E()}),u=N({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=M({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=M({_meta:u.optional()}),m=M({method:E(),params:p.loose().optional()}),h=M({src:E(),mimeType:E().optional(),sizes:j(E()).optional(),theme:I([`light`,`dark`]).optional()}),ee=M({icons:j(h).optional()}),g=M({name:E(),title:E().optional()}),te=g.extend({...g.shape,...ee.shape,version:E(),websiteUrl:E().optional(),description:E().optional()}),ne=_u(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ul(M({form:ul(M({applyDefaults:k().optional()}),t).optional(),url:t.optional()}),t.optional())),re=N({list:t.optional(),cancel:t.optional(),requests:N({sampling:N({createMessage:t.optional()}).optional(),elicitation:N({create:t.optional()}).optional()}).optional()}),_=N({list:t.optional(),cancel:t.optional(),requests:N({tools:N({call:t.optional()}).optional()}).optional()}),ie=M({experimental:F(E(),t).optional(),sampling:M({context:t.optional(),tools:t.optional()}).optional(),elicitation:ne.optional(),roots:M({listChanged:k().optional()}).optional(),tasks:re.optional(),extensions:F(E(),t).optional()}),ae=M({experimental:F(E(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:M({listChanged:k().optional()}).optional(),resources:M({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:M({listChanged:k().optional()}).optional(),tasks:_.optional(),extensions:F(E(),t).optional()}),oe=M({progress:O(),total:R(O()),message:R(E())}),se=M({...p.shape,...oe.shape,progressToken:n}),ce=m.extend({method:L(`notifications/progress`),params:se}),le=p.extend({level:o,logger:E().optional(),data:A()}),ue=m.extend({method:L(`notifications/message`),params:le}),de=M({uri:E(),mimeType:R(E()),_meta:F(E(),A()).optional()}),fe=de.extend({text:E()}),pe=de.extend({blob:s}),me=M({audience:j(a).optional(),priority:O().min(0).max(1).optional(),lastModified:os({offset:!0}).optional()}),he=M({...g.shape,...ee.shape,uri:E(),description:R(E()),mimeType:R(E()),size:R(O()),annotations:me.optional(),_meta:R(N({}))}),ge=M({...g.shape,...ee.shape,uriTemplate:E(),description:R(E()),mimeType:R(E()),annotations:me.optional(),_meta:R(N({}))}),v=m.extend({method:L(`notifications/resources/list_changed`),params:p.optional()}),_e=p.extend({uri:E()}),ve=m.extend({method:L(`notifications/resources/updated`),params:_e}),ye=M({name:E(),description:R(E()),required:R(k())}),be=M({...g.shape,...ee.shape,description:R(E()),arguments:R(j(ye)),_meta:R(N({}))}),xe=m.extend({method:L(`notifications/prompts/list_changed`),params:p.optional()}),Se=M({type:L(`text`),text:E(),annotations:me.optional(),_meta:F(E(),A()).optional()}),Ce=M({type:L(`image`),data:s,mimeType:E(),annotations:me.optional(),_meta:F(E(),A()).optional()}),we=M({type:L(`audio`),data:s,mimeType:E(),annotations:me.optional(),_meta:F(E(),A()).optional()}),Te=M({type:L(`tool_use`),name:E(),id:E(),input:F(E(),A()),_meta:F(E(),A()).optional()}),Ee=M({type:L(`resource`),resource:P([fe,pe]),annotations:me.optional(),_meta:F(E(),A()).optional()}),De=he.extend({type:L(`resource_link`)}),Oe=P([Se,Ce,we,De,Ee]),ke=M({role:a,content:Oe}),Ae=M({title:E().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),y=m.extend({method:L(`notifications/tools/list_changed`),params:p.optional()}),je=M({name:E().optional()}),Me=M({hints:j(je).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Ne=M({mode:I([`auto`,`required`,`none`]).optional()}),Pe=M({type:L(`boolean`),title:E().optional(),description:E().optional(),default:k().optional()}),Fe=M({type:L(`string`),title:E().optional(),description:E().optional(),minLength:O().optional(),maxLength:O().optional(),format:I([`email`,`uri`,`date`,`date-time`]).optional(),default:E().optional()}),Ie=M({type:I([`number`,`integer`]),title:E().optional(),description:E().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),Le=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),default:E().optional()}),Re=M({type:L(`string`),title:E().optional(),description:E().optional(),oneOf:j(M({const:E(),title:E()})),default:E().optional()}),ze=M({type:L(`string`),title:E().optional(),description:E().optional(),enum:j(E()),enumNames:j(E()).optional(),default:E().optional()}),Be=P([Le,Re]),Ve=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({type:L(`string`),enum:j(E())}),default:j(E()).optional()}),He=M({type:L(`array`),title:E().optional(),description:E().optional(),minItems:O().optional(),maxItems:O().optional(),items:M({anyOf:j(M({const:E(),title:E()}))}),default:j(E()).optional()}),Ue=P([Ve,He]),We=P([ze,Be,Ue]),Ge=P([We,Pe,Fe,Ie]),Ke=f.extend({mode:L(`form`).optional(),message:E(),requestedSchema:M({type:L(`object`),properties:F(E(),Ge),required:j(E()).optional()}).catchall(A())}),qe=M({type:L(`ref/resource`),uri:E()}),Je=M({type:L(`ref/prompt`),name:E()}),Ye=M({uri:E().startsWith(`file://`),name:E().optional(),_meta:F(E(),A()).optional()}),Xe=ie.shape,Ze=M({experimental:Xe.experimental,sampling:Xe.sampling,elicitation:Xe.elicitation,roots:Xe.roots,extensions:Xe.extensions}),Qe=ae.shape,$e=M({experimental:Qe.experimental,logging:Qe.logging,completions:Qe.completions,prompts:Qe.prompts,resources:Qe.resources,tools:Qe.tools,extensions:Qe.extensions}),et=N({progressToken:n.optional(),[Ou]:E(),[ku]:te.optional(),[ju]:Ze,[Nu]:o.optional()}),tt=M({...g.shape,...ee.shape,description:E().optional(),inputSchema:N({$schema:E().optional(),type:L(`object`)}),outputSchema:N({$schema:E().optional()}).optional(),annotations:Ae.optional(),_meta:F(E(),A()).optional()}),nt=M({type:L(`tool_result`),toolUseId:E(),content:j(Oe),structuredContent:A().optional(),isError:k().optional(),_meta:F(E(),A()).optional()}),rt=P([Se,Ce,we,Te,nt]),it=M({role:a,content:P([rt,j(rt)]),_meta:F(E(),A()).optional()}),at=E(),ot=N({[Au]:te.optional().catch(void 0)}),st=ot.optional();function b(e){return N({_meta:st,resultType:at.default(`complete`),...e})}let ct=b({}),lt=b({nextCursor:r.optional()}),ut=b({content:j(Oe),structuredContent:A().optional(),isError:k().optional()}),dt=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),tools:j(tt),nextCursor:r.optional()}),ft=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),prompts:j(be),nextCursor:r.optional()}),pt=b({description:E().optional(),messages:j(ke)}),mt=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),resources:j(he),nextCursor:r.optional()}),ht=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),resourceTemplates:j(ge),nextCursor:r.optional()}),gt=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),contents:j(P([fe,pe]))}),_t=b({completion:M({values:j(E()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),vt=b({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`])}),yt=b({ttlMs:O().int().min(0).catch(0),cacheScope:I([`public`,`private`]).catch(`private`),supportedVersions:j(E()),capabilities:$e,instructions:E().optional()}),bt=M({messages:j(it),modelPreferences:Me.optional(),systemPrompt:E().optional(),includeContext:I([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:j(E()).optional(),metadata:t.optional(),tools:j(tt).optional(),toolChoice:Ne.optional()}),xt=M({method:L(`sampling/createMessage`),params:bt}),St=M({method:L(`roots/list`),params:M({_meta:F(E(),A()).optional()}).optional()}),Ct=M({...it.shape,model:E(),stopReason:E().optional()}),wt=M({roots:j(Ye)}),Tt=M({action:I([`accept`,`decline`,`cancel`]),content:F(E(),P([E(),O(),k(),j(E())])).optional()}),Et=M({mode:L(`url`),message:E(),url:E().url()}),Dt=P([Ke,Et]),Ot=M({method:L(`elicitation/create`),params:Dt}),kt=P([xt,St,Ot]),At=P([Ct,wt,Tt]),jt=F(E(),kt),Mt=F(E(),At),Nt=b({inputRequests:jt.optional(),requestState:E().optional()}),Pt={inputResponses:Mt.optional(),requestState:E().optional()},Ft=M({_meta:et,...Pt}),It=N({progressToken:n.optional()});function Lt(e,t){return M({method:L(e),params:M({_meta:et,...t})})}function Rt(e,t){return M({method:L(e),params:M({_meta:It.optional(),...t}).optional()})}let zt={name:E(),arguments:F(E(),A()).optional(),...Pt},Bt={cursor:r.optional()},Vt=Lt(`tools/call`,zt),Ht=Lt(`tools/list`,Bt),Ut=Lt(`prompts/list`,Bt),Wt=Lt(`prompts/get`,{name:E(),arguments:F(E(),E()).optional(),...Pt}),Gt=Lt(`resources/list`,Bt),Kt=Lt(`resources/templates/list`,Bt),qt=Lt(`resources/read`,{uri:E(),...Pt}),Jt={ref:P([Je,qe]),argument:M({name:E(),value:E()}),context:M({arguments:F(E(),E()).optional()}).optional()},Yt=Lt(`completion/complete`,Jt),Xt=Lt(`server/discover`,{}),Zt=M({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:j(E()).optional()}),Qt={notifications:Zt},$t=Lt(`subscriptions/listen`,Qt),en=ot.extend({"io.modelcontextprotocol/subscriptionId":i}),tn=N({_meta:en,resultType:at.default(`complete`)}),nn={"tools/call":Rt(`tools/call`,zt),"tools/list":Rt(`tools/list`,Bt),"prompts/get":Rt(`prompts/get`,{name:E(),arguments:F(E(),E()).optional()}),"prompts/list":Rt(`prompts/list`,Bt),"resources/list":Rt(`resources/list`,Bt),"resources/templates/list":Rt(`resources/templates/list`,Bt),"resources/read":Rt(`resources/read`,{uri:E()}),"completion/complete":Rt(`completion/complete`,Jt),"server/discover":Rt(`server/discover`,{}),"subscriptions/listen":Rt(`subscriptions/listen`,Qt)};function rn(e){return N({_meta:st,...e})}let an={"tools/call":rn({content:j(Oe),structuredContent:A().optional(),isError:k().optional()}),"tools/list":rn({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),tools:j(tt),nextCursor:r.optional()}),"prompts/get":rn({description:E().optional(),messages:j(ke)}),"prompts/list":rn({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),prompts:j(be),nextCursor:r.optional()}),"resources/list":rn({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),resources:j(he),nextCursor:r.optional()}),"resources/templates/list":rn({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),resourceTemplates:j(ge),nextCursor:r.optional()}),"resources/read":rn({ttlMs:O().int().min(0),cacheScope:I([`public`,`private`]),contents:j(P([fe,pe]))}),"completion/complete":rn({completion:M({values:j(E()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),"server/discover":rn({ttlMs:O().int().min(0).catch(0),cacheScope:I([`public`,`private`]).catch(`private`),supportedVersions:j(E()),capabilities:$e,instructions:E().optional()}),"subscriptions/listen":rn({})},on=N({"io.modelcontextprotocol/subscriptionId":i.optional()}),sn=M({method:L(`notifications/subscriptions/acknowledged`),params:M({_meta:on.optional(),notifications:Zt})}),cn=M({_meta:on.optional(),requestId:i,reason:E().optional()}),ln=M({method:L(`notifications/cancelled`),params:cn}),un={"notifications/cancelled":ln,"notifications/progress":ce,"notifications/message":ue,"notifications/resources/updated":ve,"notifications/resources/list_changed":v,"notifications/tools/list_changed":y,"notifications/prompts/list_changed":xe,"notifications/subscriptions/acknowledged":sn},dn=e=>M({jsonrpc:L(`2.0`),id:P([E(),O().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:ee,BaseMetadataSchema:g,ImplementationSchema:te,ClientTasksCapabilitySchema:re,ServerTasksCapabilitySchema:_,ClientCapabilitiesSchema:ie,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:ce,LoggingMessageNotificationParamsSchema:le,LoggingMessageNotificationSchema:ue,ResourceContentsSchema:de,TextResourceContentsSchema:fe,BlobResourceContentsSchema:pe,AnnotationsSchema:me,ResourceSchema:he,ResourceTemplateSchema:ge,ResourceListChangedNotificationSchema:v,ResourceUpdatedNotificationParamsSchema:_e,ResourceUpdatedNotificationSchema:ve,PromptArgumentSchema:ye,PromptSchema:be,PromptListChangedNotificationSchema:xe,TextContentSchema:Se,ImageContentSchema:Ce,AudioContentSchema:we,ToolUseContentSchema:Te,EmbeddedResourceSchema:Ee,ResourceLinkSchema:De,ContentBlockSchema:Oe,PromptMessageSchema:ke,ToolAnnotationsSchema:Ae,ToolListChangedNotificationSchema:y,ModelHintSchema:je,ModelPreferencesSchema:Me,ToolChoiceSchema:Ne,BooleanSchemaSchema:Pe,StringSchemaSchema:Fe,NumberSchemaSchema:Ie,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:Re,LegacyTitledEnumSchemaSchema:ze,SingleSelectEnumSchemaSchema:Be,UntitledMultiSelectEnumSchemaSchema:Ve,TitledMultiSelectEnumSchemaSchema:He,MultiSelectEnumSchemaSchema:Ue,EnumSchemaSchema:We,PrimitiveSchemaDefinitionSchema:Ge,ElicitRequestFormParamsSchema:Ke,ResourceTemplateReferenceSchema:qe,PromptReferenceSchema:Je,RootSchema:Ye,ClientCapabilities2026Schema:Ze,ServerCapabilities2026Schema:$e,RequestMetaEnvelopeSchema:et,ToolSchema:tt,ToolResultContentSchema:nt,SamplingMessageContentBlockSchema:rt,SamplingMessageSchema:it,ResultTypeSchema:at,ResultMetaSchema:ot,ResultSchema:ct,PaginatedResultSchema:lt,CallToolResultSchema:ut,ListToolsResultSchema:dt,ListPromptsResultSchema:ft,GetPromptResultSchema:pt,ListResourcesResultSchema:mt,ListResourceTemplatesResultSchema:ht,ReadResourceResultSchema:gt,CompleteResultSchema:_t,CacheableResultSchema:vt,DiscoverResultSchema:yt,CreateMessageRequestParamsSchema:bt,CreateMessageRequestSchema:xt,ListRootsRequestSchema:St,CreateMessageResultSchema:Ct,ListRootsResultSchema:wt,ElicitResultSchema:Tt,ElicitRequestURLParamsSchema:Et,ElicitRequestParamsSchema:Dt,ElicitRequestSchema:Ot,InputRequestSchema:kt,InputResponseSchema:At,InputRequestsSchema:jt,InputResponsesSchema:Mt,InputRequiredResultSchema:Nt,InputResponseRequestParamsSchema:Ft,CallToolRequestSchema:Vt,ListToolsRequestSchema:Ht,ListPromptsRequestSchema:Ut,GetPromptRequestSchema:Wt,ListResourcesRequestSchema:Gt,ListResourceTemplatesRequestSchema:Kt,ReadResourceRequestSchema:qt,CompleteRequestSchema:Yt,DiscoverRequestSchema:Xt,SubscriptionFilterSchema:Zt,SubscriptionsListenRequestSchema:$t,SubscriptionsListenResultMetaSchema:en,SubscriptionsListenResultSchema:tn,dispatchRequestSchemas:nn,dispatchResultSchemas:an,NotificationMetaSchema:on,SubscriptionsAcknowledgedNotificationSchema:sn,CancelledNotificationParamsSchema:cn,CancelledNotificationSchema:ln,notificationSchemas2026:un,JSONRPCResultResponseSchema:dn(ct),CallToolResultResponseSchema:dn(P([ut,Nt])),ListToolsResultResponseSchema:dn(dt),ListPromptsResultResponseSchema:dn(ft),GetPromptResultResponseSchema:dn(P([pt,Nt])),ListResourcesResultResponseSchema:dn(mt),ListResourceTemplatesResultResponseSchema:dn(ht),ReadResourceResultResponseSchema:dn(P([gt,Nt])),CompleteResultResponseSchema:dn(_t),DiscoverResultResponseSchema:dn(yt)}}var Am;function jm(){return Am??=km()}var Mm=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Nm(e){return Mm.includes(e)}var Pm=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Fm(e){return e[Pm]}function Im(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Lm(e){return e===`public`||e===`private`}var J=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Rm=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Zp(this,new.target)}static fromError(t,n,r){if(t===J.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Bm(e.elicitations,n)}if(t===J.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Vm({supported:e.supported,requested:e.requested},n)}if(t===J.InvalidParams||t===J.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===J.ResourceNotFound||Object.keys(e).length===1))return new zm(e.uri,n)}if(t===J.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Hm({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},zm=class extends Rm{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(J.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Bm=class extends Rm{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(J.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Vm=class extends Rm{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(J.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Hm=class extends Rm{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(J.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Um=0,Wm=`private`,Gm=[`tools/call`,`prompts/get`,`resources/read`];function Km(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||Gm.includes(e))return t;throw new Rm(J.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function qm(e,t){let n=Fm(t);if(t.resultType!==`complete`||!Nm(e))return n===void 0?t:Qm(t);let r=t,i=Im(r.ttlMs)?r.ttlMs:Xm(n),a=Lm(r.cacheScope)?r.cacheScope:Zm(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Pm],o}function Jm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ym(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Au]:t}}:!Jm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Au]:t}}}function Xm(e){return e!==void 0&&Im(e.ttlMs)?e.ttlMs:Um}function Zm(e){return e!==void 0&&Lm(e.cacheScope)?e.cacheScope:Wm}function Qm(e){let t={...e};return delete t[Pm],t}var $m=[`elicitation/create`,`sampling/createMessage`,`roots/list`],eh;function th(){if(eh)return eh;let e=jm();return eh={request:{"elicitation/create":M({method:L(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":M({method:L(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":M({method:L(`roots/list`),params:N({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},eh}function nh(e){return $m.includes(e)}function rh(e){return nh(e)?th().request[e]:void 0}function ih(e){return nh(e)?th().response[e]:void 0}var ah={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},oh={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function sh(e){return Object.prototype.hasOwnProperty.call(ah,e)}function ch(e){return Object.prototype.hasOwnProperty.call(oh,e)}function lh(e){return Object.prototype.hasOwnProperty.call(ah,e)}function uh(e){return sh(e)?jm().dispatchRequestSchemas[e]:void 0}function dh(e){return lh(e)?jm().dispatchResultSchemas[e]:void 0}function fh(e){return ch(e)?jm().notificationSchemas2026[e]:void 0}Object.keys(ah),Object.keys(oh);function ph(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mh(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var hh={ok:!1,reason:`not-in-era`},gh=[Ou,ju];function _h(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>ph(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!ph(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(ph(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var vh={era:`2026-07-28`,hasRequestMethod:sh,hasNotificationMethod:ch,hasInputRequestMethod:e=>rh(e)!==void 0,validateRequest:(e,t)=>mh(uh(e),t),validateResult:(e,t)=>mh(dh(e),t),validateNotification:(e,t)=>mh(fh(e),t),validateInputRequest:(e,t)=>mh(rh(e),t),validateInputResponse:(e,t)=>mh(ih(e),t),samplingResultVariant:()=>hh,outboundEnvelope(e){return{[Ou]:e.protocolVersion,[ku]:e.clientInfo,[ju]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of gh)n in e||t.push({key:n,problem:`missing`});let n=jm().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>tm(e),inputRequestSchema:rh,decodeResult(e,t){if(!ph(t))return{kind:`invalid`,error:new q(K.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new q(K.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new q(K.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=ph(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new q(K.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i}}}if(n!==`complete`)return{kind:`invalid`,error:new q(K.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=bh(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new q(K.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Ym(qm(e,Km(e,_h(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=jm().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},yh;function bh(){if(yh)return yh;let e=jm();return yh={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},yh}var xh=`2026-07-28`;function Sh(e){return e!==void 0&&em(e)?vh:Om}function Ch(e){return e.revision===void 0?e.era===`modern`?vh.era:Om.era:Sh(e.revision).era}function wh(e){return Eh.some(t=>t.hasRequestMethod(e))}function Th(e){return Eh.some(t=>t.hasNotificationMethod(e))}var Eh=[Om,vh],Dh=i({AnnotationsSchema:()=>Od,AudioContentSchema:()=>cf,BaseMetadataSchema:()=>rd,BaseRequestParamsSchema:()=>H,BlobResourceContentsSchema:()=>Ed,BooleanSchemaSchema:()=>Uf,CallToolRequestParamsSchema:()=>Cf,CallToolRequestSchema:()=>wf,CallToolResultSchema:()=>xf,CancelTaskRequestSchema:()=>kp,CancelTaskResultSchema:()=>Ap,CancelledNotificationParamsSchema:()=>$u,CancelledNotificationSchema:()=>ed,ClientCapabilitiesSchema:()=>cd,ClientNotificationSchema:()=>Mp,ClientRequestSchema:()=>jp,ClientResultSchema:()=>Np,ClientTasksCapabilitySchema:()=>od,CompatibilityCallToolResultSchema:()=>Sf,CompleteRequestParamsSchema:()=>up,CompleteRequestSchema:()=>dp,CompleteResultSchema:()=>fp,ContentBlockSchema:()=>ff,CreateMessageRequestParamsSchema:()=>zf,CreateMessageRequestSchema:()=>Bf,CreateMessageResultSchema:()=>Vf,CreateMessageResultWithToolsSchema:()=>Hf,CreateTaskResultSchema:()=>bp,CursorSchema:()=>Lu,DiscoverRequestSchema:()=>md,DiscoverResultSchema:()=>hd,ElicitRequestFormParamsSchema:()=>tp,ElicitRequestParamsSchema:()=>rp,ElicitRequestSchema:()=>ip,ElicitRequestURLParamsSchema:()=>np,ElicitResultSchema:()=>sp,ElicitationCompleteNotificationParamsSchema:()=>ap,ElicitationCompleteNotificationSchema:()=>op,EmbeddedResourceSchema:()=>uf,EmptyResultSchema:()=>Qu,EnumSchemaSchema:()=>$f,GetPromptRequestParamsSchema:()=>rf,GetPromptRequestSchema:()=>af,GetPromptResultSchema:()=>mf,GetTaskPayloadRequestSchema:()=>Tp,GetTaskPayloadResultSchema:()=>Ep,GetTaskRequestSchema:()=>Cp,GetTaskResultSchema:()=>wp,IconSchema:()=>td,IconsSchema:()=>nd,ImageContentSchema:()=>sf,ImplementationSchema:()=>id,InitializeRequestParamsSchema:()=>ld,InitializeRequestSchema:()=>ud,InitializeResultSchema:()=>fd,InitializedNotificationSchema:()=>pd,JSONArraySchema:()=>Fu,JSONObjectSchema:()=>V,JSONRPCErrorResponseSchema:()=>Yu,JSONRPCMessageSchema:()=>Xu,JSONRPCNotificationSchema:()=>qu,JSONRPCRequestSchema:()=>Ku,JSONRPCResponseSchema:()=>Zu,JSONRPCResultResponseSchema:()=>Ju,JSONValueSchema:()=>Pu,LegacyTitledEnumSchemaSchema:()=>Jf,ListChangedOptionsBaseSchema:()=>Ef,ListPromptsRequestSchema:()=>tf,ListPromptsResultSchema:()=>nf,ListResourceTemplatesRequestSchema:()=>Nd,ListResourceTemplatesResultSchema:()=>Pd,ListResourcesRequestSchema:()=>jd,ListResourcesResultSchema:()=>Md,ListRootsRequestSchema:()=>mp,ListRootsResultSchema:()=>hp,ListTasksRequestSchema:()=>Dp,ListTasksResultSchema:()=>Op,ListToolsRequestSchema:()=>yf,ListToolsResultSchema:()=>bf,LoggingLevelSchema:()=>Df,LoggingMessageNotificationParamsSchema:()=>Af,LoggingMessageNotificationSchema:()=>jf,ModelHintSchema:()=>Mf,ModelPreferencesSchema:()=>Nf,MultiSelectEnumSchemaSchema:()=>Qf,NotificationSchema:()=>Uu,NotificationsParamsSchema:()=>Hu,NumberSchemaSchema:()=>Gf,PaginatedRequestParamsSchema:()=>bd,PaginatedRequestSchema:()=>xd,PaginatedResultSchema:()=>Sd,PingRequestSchema:()=>gd,PrimitiveSchemaDefinitionSchema:()=>ep,ProgressNotificationParamsSchema:()=>vd,ProgressNotificationSchema:()=>yd,ProgressSchema:()=>_d,ProgressTokenSchema:()=>Iu,PromptArgumentSchema:()=>$d,PromptListChangedNotificationSchema:()=>hf,PromptMessageSchema:()=>pf,PromptReferenceSchema:()=>lp,PromptSchema:()=>ef,ReadResourceRequestParamsSchema:()=>Id,ReadResourceRequestSchema:()=>Ld,ReadResourceResultSchema:()=>Rd,RelatedTaskMetadataSchema:()=>zu,RequestIdSchema:()=>Gu,RequestMetaSchema:()=>Bu,RequestSchema:()=>U,ResourceContentsSchema:()=>Cd,ResourceLinkSchema:()=>df,ResourceListChangedNotificationSchema:()=>zd,ResourceRequestParamsSchema:()=>Fd,ResourceSchema:()=>kd,ResourceTemplateReferenceSchema:()=>cp,ResourceTemplateSchema:()=>Ad,ResourceUpdatedNotificationParamsSchema:()=>Zd,ResourceUpdatedNotificationSchema:()=>Qd,ResultMetaObjectSchema:()=>Wu,ResultSchema:()=>W,RoleSchema:()=>Dd,RootSchema:()=>pp,RootsListChangedNotificationSchema:()=>gp,SamplingContentSchema:()=>If,SamplingMessageContentBlockSchema:()=>Lf,SamplingMessageSchema:()=>Rf,ServerCapabilitiesSchema:()=>dd,ServerNotificationSchema:()=>Fp,ServerRequestSchema:()=>Pp,ServerResultSchema:()=>Ip,ServerTasksCapabilitySchema:()=>sd,SetLevelRequestParamsSchema:()=>Of,SetLevelRequestSchema:()=>kf,SingleSelectEnumSchemaSchema:()=>Yf,StringSchemaSchema:()=>Wf,SubscribeRequestParamsSchema:()=>Bd,SubscribeRequestSchema:()=>Vd,SubscriptionFilterSchema:()=>Wd,SubscriptionsAcknowledgedNotificationParamsSchema:()=>qd,SubscriptionsAcknowledgedNotificationSchema:()=>Jd,SubscriptionsListenRequestParamsSchema:()=>Gd,SubscriptionsListenRequestSchema:()=>Kd,SubscriptionsListenResultMetaSchema:()=>Yd,SubscriptionsListenResultSchema:()=>Xd,TaskAugmentedRequestParamsSchema:()=>Vu,TaskCreationParamsSchema:()=>_p,TaskMetadataSchema:()=>Ru,TaskSchema:()=>yp,TaskStatusNotificationParamsSchema:()=>xp,TaskStatusNotificationSchema:()=>Sp,TaskStatusSchema:()=>vp,TextContentSchema:()=>of,TextResourceContentsSchema:()=>wd,TitledMultiSelectEnumSchemaSchema:()=>Zf,TitledSingleSelectEnumSchemaSchema:()=>qf,ToolAnnotationsSchema:()=>gf,ToolChoiceSchema:()=>Pf,ToolExecutionSchema:()=>_f,ToolListChangedNotificationSchema:()=>Tf,ToolResultContentSchema:()=>Ff,ToolSchema:()=>vf,ToolUseContentSchema:()=>lf,UnsubscribeRequestParamsSchema:()=>Hd,UnsubscribeRequestSchema:()=>Ud,UntitledMultiSelectEnumSchemaSchema:()=>Xf,UntitledSingleSelectEnumSchemaSchema:()=>Kf}),Oh=e=>Ku.safeParse(e).success,kh=e=>qu.safeParse(e).success,Ah=e=>Ju.safeParse(e).success,jh=e=>Yu.safeParse(e).success;J.InvalidRequest,J.UnsupportedProtocolVersion,J.InvalidParams,J.MethodNotFound,J.InvalidParams,J.MissingRequiredClientCapability,J.ParseError,J.InvalidRequest,J.MethodNotFound,J.UnsupportedProtocolVersion,J.MissingRequiredClientCapability;function Mh(e,t){return gs(e,t)}function Nh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Ph(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var Fh=!1,Ih=`draft-2020-12`;function Lh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Ih});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);Fh||(Fh=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ns(e,{target:Ih,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&Rh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function Rh(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Rh(e)))}return!1}function zh(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function Bh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>zh(e)).join(`, `)}:{success:!0,data:n.value}}function Vh(e){let t=ns(e,{target:Ih,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var Hh=/\\\.\\d\{(\d+)\}/;function Uh(e){let t=Hh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>os({local:e,offset:t,precision:n}))))}function Wh(e,t){let n;switch(e){case`email`:n=[Ms()];break;case`uri`:n=[Vs()];break;case`date`:n=[cs()];break;case`date-time`:n=Uh(t);break}return new Set(n.map(e=>Vh(e)).filter(e=>e!==void 0))}function Gh(e,t,n){return n!==`zod`||Wh(e,t).has(t)}function Kh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qh(e){try{return Lh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Rm(J.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Jh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Yh(e){return Jh.has(e)||e.startsWith(`x-`)}var Xh=new Set([`$schema`,...Object.keys(tp.shape.requestedSchema.shape)]),Zh={string:Nh([Wf,Kf,qf,Jf]),number:Nh([Gf]),integer:Nh([Gf]),boolean:Nh([Uf]),array:Nh([Xf,Zf])},Qh=new Set(Wf.shape.format.unwrap().options);function $h(e,t,n,r){if(!Kh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Zh,e.type)?Zh[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Yh(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Qh.has(e.format)?(typeof s!=`string`||!Gh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function eg(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Kh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,$h(n,`properties.${e}`,t,r)])):Xh.has(i)?n[i]=a:Yh(i)||r.push(i);if(r.length>0)throw new Rm(J.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function tg(e,t){if(!Kh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Mh(ep,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function ng(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>ng(e,t[r],`${n}[${r}]`)):!Kh(e)||!Kh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?ng(r,t[e],i):Yh(e)?[]:[i]})}function rg(e){if(!Ph(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=eg(qh(e.requestedSchema),t),r=Mh(tp.shape.requestedSchema,n);if(!r.success)throw new Rm(J.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${tg(n,r.error.message)}`);let i=ng(n,r.data);if(i.length>0)throw new Rm(J.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Rm(J.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function ig(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(ig,{elicit(e){try{return{method:`elicitation/create`,params:rg(e)}}catch(e){throw e instanceof Rm?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var ag=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),og={IdJagTokenExchangeResponseSchema:Hp,OAuthClientInformationFullSchema:qp,OAuthClientInformationSchema:Kp,OAuthClientMetadataSchema:Gp,OAuthClientRegistrationErrorSchema:Jp,OAuthErrorResponseSchema:Up,OAuthMetadataSchema:Rp,OAuthProtectedResourceMetadataSchema:Lp,OAuthTokenRevocationRequestSchema:Yp,OAuthTokensSchema:Vp,OpenIdProviderDiscoveryMetadataSchema:Bp,OpenIdProviderMetadataSchema:zp},sg={},cg={};function lg(e,t){let n=e.slice(0,-6);sg[n]=t,cg[n]=e=>t.safeParse(e).success}for(let e of ag)lg(e,Dh[e]);for(let[e,t]of Object.entries(og))lg(e,t);Object.freeze(sg),Object.freeze(cg);function ug(e){switch(e){case`initialize`:case`notifications/initialized`:return Sh(void 0);case`server/discover`:return Sh(xh);default:return}}var dg=[Ou,ku,ju,Nu],fg=[`inputResponses`,`requestState`];function pg(e,t){let n=e.params;if(!vg(n))return{message:e,lifted:{}};let r=n._meta,i=vg(r)?dg.filter(e=>e in r):[],a=t===`request`?fg.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&vg(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function mg(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function hg(e){return()=>e}var gg=hg(void 0),_g=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Eu,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new q(K.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new q(K.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Ah(e)||jh(e)?this._onresponse(e):Oh(e)?this._onrequest(e,t):kh(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new q(K.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=pg(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Ch(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Th(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=pg(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Ch(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(J.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(wh(n.method)&&!i.hasRequestMethod(n.method)){o(J.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(J.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(J.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:bg(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?gg:hg(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Ph(t))return u(e,t,n);let i=mg(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(J.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:J.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ah(e)?n(e):n(Rm.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Ph(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=mg(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return Sh(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=ug(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(wh(t)&&!e.hasRequestMethod(t))throw new q(K.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof q?e:new q(K.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let ee={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),ee.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(ee),te=!1,ne=e=>{te||(this._progressHandlers.delete(h),m===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof q?e:new q(K.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(te=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(xg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;Bh(n,o).then(e=>{e.success?d(e.data):f(new q(K.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>ne(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let re=r?.timeout??6e4;this._setupTimeout(h,re,r?.maxTotalTimeout,()=>ne(new q(K.RequestTimeout,`Request timed out`,{timeout:re})),r?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new q(K.NotConnected,`Not connected`);if(Th(t.method)&&!e.hasNotificationMethod(t.method))throw new q(K.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!wh(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Rm(J.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await Bh(t.params,{...r.params});if(!a.success)throw new Rm(J.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Th(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Rm(J.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await Bh(t.params,{...r.params});if(!i.success)throw new Rm(J.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function vg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bg(e){let t={},n=[];if(!yg(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!yg(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function xg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}r((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);var Sg=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Cg=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,wg=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Tg=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Eg=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,jg=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Mg=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function Ng(e){return e.test.bind(e)}Pg.bind(void 0,!1),Ng(wg),Ng(Tg),Ng(Eg),Ng(Cg),Ng(jg),Ng(Mg),Ng(Dg),Ng(Og),Ng(kg),Ng(Ag);function Pg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}globalThis.crypto;var Fg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e){super(e),this.name=new.target.name,Zp(this,new.target)}};(class extends Fg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Fg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Fg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Fg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Fg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Zp(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Qp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Zp(this,new.target)}};var Ig=`2026-01-26`,Lg=M({}).passthrough(),Rg=M({arguments:F(E(),A()).optional()}).passthrough(),zg=M({reason:E().optional()}).passthrough(),Bg=M({theme:I([`light`,`dark`]).optional(),displayMode:I([`inline`,`fullscreen`,`pip`]).optional(),availableDisplayModes:j(I([`inline`,`fullscreen`,`pip`])).optional(),styles:M({variables:F(E(),P([E(),Hc()])).optional(),css:M({fonts:E().optional()}).passthrough().optional()}).passthrough().optional(),safeAreaInsets:M({top:O(),right:O(),bottom:O(),left:O()}).optional()}).passthrough(),Vg=M({protocolVersion:E(),hostInfo:M({name:E(),version:E()}).passthrough(),hostCapabilities:F(E(),A()),hostContext:Bg}).passthrough(),Hg=M({mode:I([`inline`,`fullscreen`,`pip`])}).passthrough(),Ug=M({}).passthrough(),Wg=class{eventTarget;eventSource;onclose;onerror;onmessage;sessionId;setProtocolVersion;setSupportedProtocolVersions;started=!1;messageListener=e=>{if(e.source!==this.eventSource)return;let t=Xu.safeParse(e.data);if(t.success){this.onmessage?.(t.data);return}e.data?.jsonrpc===`2.0`&&this.onerror?.(Error(`Invalid JSON-RPC message received from the MCP App host.`))};constructor(e=window.parent,t=window.parent){this.eventTarget=e,this.eventSource=t}async start(){if(this.started)throw Error(`PostMessageTransport is already started.`);this.started=!0,window.addEventListener(`message`,this.messageListener)}async send(e,t){this.eventTarget.postMessage(e,`*`)}async close(){this.started&&(this.started=!1,window.removeEventListener(`message`,this.messageListener),this.onclose?.())}},Gg=class extends _g{appInfo;capabilities;ontoolinput;ontoolresult;ontoolcancelled;onhostcontextchanged;onteardown;hostContext;hostCapabilities;resizeObserver;resizeFrame;lastWidth=0;lastHeight=0;constructor(e,t={}){super(),this.appInfo=e,this.capabilities=t,this.setRequestHandler(`ping`,{params:Lg,result:Ug},()=>({})),this.setNotificationHandler(`ui/notifications/tool-input`,{params:Rg},e=>this.ontoolinput?.(e)),this.setNotificationHandler(`ui/notifications/tool-result`,{params:xf},e=>this.ontoolresult?.(e)),this.setNotificationHandler(`ui/notifications/tool-cancelled`,{params:zg},e=>this.ontoolcancelled?.(e)),this.setNotificationHandler(`ui/notifications/host-context-changed`,{params:Bg},e=>{this.hostContext={...this.hostContext,...e},this.onhostcontextchanged?.(e)}),this.setRequestHandler(`ui/resource-teardown`,{params:Lg,result:Ug},(e,t)=>this.onteardown?.(e,t)??{})}buildContext(e){return e}assertCapabilityForMethod(e){}assertNotificationCapability(e){}assertRequestHandlerCapability(e){}getHostContext(){return this.hostContext}getHostCapabilities(){return this.hostCapabilities}async callServerTool(e,t){return this.request({method:`tools/call`,params:e},xf,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async requestDisplayMode(e,t){return this.request({method:`ui/request-display-mode`,params:e},Hg,t)}async connect(e=new Wg,t){await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this.capabilities,appInfo:this.appInfo,protocolVersion:Ig}},Vg,t);this.hostCapabilities=e.hostCapabilities,this.hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this.startAutoResize()}catch(e){try{await this.close()}catch(t){throw AggregateError([e,t],`MCP App initialization and cleanup failed.`)}throw e}}async close(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.resizeFrame!==void 0&&cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.lastWidth=0,this.lastHeight=0,await super.close()}startAutoResize(){if(typeof ResizeObserver>`u`)return;let e=()=>{this.resizeFrame===void 0&&(this.resizeFrame=requestAnimationFrame(()=>{this.resizeFrame=void 0;let e=document.documentElement,t=e.style.height;e.style.height=`max-content`;let n=Math.ceil(window.innerWidth),r=Math.ceil(e.getBoundingClientRect().height);e.style.height=t,!(n===this.lastWidth&&r===this.lastHeight)&&(this.lastWidth=n,this.lastHeight=r,this.notification({method:`ui/notifications/size-changed`,params:{width:n,height:r}}).catch(e=>{this.onerror?.(e instanceof Error?e:Error(String(e)))}))}))};this.resizeObserver=new ResizeObserver(e),this.resizeObserver.observe(document.documentElement),this.resizeObserver.observe(document.body),e()}};function Kg(e){document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e}function qg(e,t=document.documentElement){for(let[n,r]of Object.entries(e))n.startsWith(`--`)&&r!==void 0&&t.style.setProperty(n,r)}function Jg(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var Yg={name:`qyl-mcp-server`,version:`1.1.2`,type:`module`,description:`qyl telemetry MCP Apps server: trace explorer and MCP dashboard for a live collector or explicit demo mode`,repository:{type:`git`,url:`https://github.com/ANcpLua/qyl.mcp`,directory:`server`},license:`MIT`,main:`dist/server.js`,types:`dist/server.d.ts`,exports:{".":{types:`./dist/server.d.ts`,default:`./dist/server.js`},"./contract-validation":{types:`./dist/contract-validation.d.ts`,default:`./dist/contract-validation.js`},"./secret-redactor":{types:`./dist/secret-redactor.d.ts`,default:`./dist/secret-redactor.js`},"./atomic-json-store":{types:`./dist/atomic-json-store.d.ts`,default:`./dist/atomic-json-store.js`},"./execution-evidence":{types:`./dist/execution-evidence.d.ts`,default:`./dist/execution-evidence.js`},"./execution-result":{types:`./dist/execution-result.d.ts`,default:`./dist/execution-result.js`},"./mcp-semconv":{types:`./dist/mcp-semconv.d.ts`,default:`./dist/mcp-semconv.js`},"./observability-suppression":{types:`./dist/observability-suppression.d.ts`,default:`./dist/observability-suppression.js`},"./telemetry":{types:`./dist/telemetry.d.ts`,default:`./dist/telemetry.js`}},bin:{"qyl-mcp-server":`dist/main.js`},files:[`dist`],scripts:{clean:`node -e "require('node:fs').rmSync('dist', { recursive: true, force: true }); require('node:fs').rmSync('dist-test', { recursive: true, force: true })"`,build:`npm run clean && tsc --noEmit && vite build --mode mcp-home && vite build --mode mcp-app && vite build --mode mcp-dashboard && vite build --mode observe-graph && tsc -p tsconfig.server.json && node -e "require('node:fs').chmodSync('dist/main.js', 0o755)"`,"verify:shapes":`node verify-generated-shapes.mjs`,"verify:readme":`node verify-package-readme.mjs`,"snapshot:tools":`npm run build && tsc -p tsconfig.test.json && node update-tool-manifest-snapshot.mjs`,test:`npm run verify:shapes && npm run verify:readme && npm run build && tsc -p tsconfig.test.json && node -e "const fs=require('node:fs'); for (const name of ['mcp-app.html','mcp-dashboard.html','observe-graph.html']) fs.copyFileSync('dist/'+name,'dist-test/'+name)" && node --test dist-test/*.test.js`,smoke:`node smoke-test.mjs`,prepack:`npm run build`},dependencies:{"@ancplua/qyl-api-schema":`5.1.0`,"@modelcontextprotocol/core":`2.0.0`,"@modelcontextprotocol/express":`2.0.0`,"@modelcontextprotocol/node":`2.0.0`,"@modelcontextprotocol/server":`2.0.0`,"@opentelemetry/api":`^1.9.1`,"@opentelemetry/api-logs":`^0.221.0`,"@opentelemetry/core":`^2.10.0`,"@opentelemetry/exporter-logs-otlp-proto":`^0.221.0`,"@opentelemetry/exporter-metrics-otlp-proto":`^0.221.0`,"@opentelemetry/exporter-trace-otlp-proto":`^0.221.0`,"@opentelemetry/resources":`^2.10.0`,"@opentelemetry/sdk-logs":`^0.221.0`,"@opentelemetry/sdk-metrics":`^2.10.0`,"@opentelemetry/sdk-trace-base":`^2.10.0`,"@opentelemetry/sdk-trace-node":`^2.10.0`,"@opentelemetry/semantic-conventions":`^1.43.0`,express:`^5.2.1`,jose:`^6.2.3`,zod:`^4.4.3`},devDependencies:{"@modelcontextprotocol/client":`2.0.0`,"@types/express":`5.0.6`,"@types/node":`26.1.1`,typescript:`7.0.2`,vite:`8.1.5`,"vite-plugin-singlefile":`2.3.3`},engines:{node:`24.x`}},Xg={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://qyl.dev/schema/qyl-api-schema.json`,$defs:JSON.parse(`{"Common.Attribute":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","minLength":1,"maxLength":256,"description":"Attribute key (dot-separated namespace)"},"value":{"$ref":"#/$defs/Common.AttributeValue","description":"Attribute value"}},"unevaluatedProperties":{"not":{}},"description":"Key-value attribute pair following OTel conventions"},"Common.AttributeBytesValue":{"type":"object","required":["type","base64"],"properties":{"type":{"type":"string","enum":["bytes"]},"base64":{"type":"string","contentEncoding":"base64"}},"unevaluatedProperties":{"not":{}},"description":"Base64 bytes projected by qyl without colliding with an ordinary string attribute."},"Common.AttributeDouble":{"anyOf":[{"type":"number","format":"double"},{"type":"string","enum":["NaN","Infinity","-Infinity"]}],"description":"An OTLP attribute double encoded as a JSON number when finite or a canonical named string when non-finite."},"Common.AttributeDoubleValue":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["double"]},"value":{"$ref":"#/$defs/Common.AttributeDouble"}},"unevaluatedProperties":{"not":{}},"description":"Tagged OTLP double attribute."},"Common.AttributeInt64":{"type":"string","format":"int64","description":"An OTLP signed 64-bit attribute integer encoded without JavaScript precision loss.","x-csharp-type":"long","pattern":"^(0|-?[1-9][0-9]*)$","maxLength":20},"Common.AttributeIntValue":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["int"]},"value":{"$ref":"#/$defs/Common.AttributeInt64"}},"unevaluatedProperties":{"not":{}},"description":"Tagged OTLP signed 64-bit integer attribute."},"Common.AttributeKeyValueListValue":{"type":"object","required":["type","values"],"properties":{"type":{"type":"string","enum":["kvlist"]},"values":{"type":"object","unevaluatedProperties":{"$ref":"#/$defs/Common.AttributeValue"}}},"unevaluatedProperties":{"not":{}},"description":"Tagged recursive OTLP key-value-list, distinct from other object-shaped attribute variants."},"Common.AttributeValue":{"anyOf":[{"type":"null"},{"type":"string"},{"type":"boolean"},{"$ref":"#/$defs/Common.AttributeIntValue"},{"$ref":"#/$defs/Common.AttributeDoubleValue"},{"$ref":"#/$defs/Common.AttributeBytesValue"},{"type":"array","items":{"$ref":"#/$defs/Common.AttributeValue"}},{"$ref":"#/$defs/Common.AttributeKeyValueListValue"}],"description":"Lossless JSON projection of an OpenTelemetry AnyValue attribute."},"Common.Attributes":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"List of key-value attributes"}},"unevaluatedProperties":{"not":{}},"description":"Collection of attributes"},"Common.ByteSize":{"type":"integer","format":"int64","minimum":0,"description":"Size in bytes","x-csharp-type":"long"},"Common.ContentType":{"type":"string","description":"MIME content type","examples":["application/json"]},"Common.ContractRevision":{"type":"string","minLength":23,"maxLength":23,"pattern":"^sha256:[a-f0-9]{16}$","description":"Deterministic revision of the generated API contract: 'sha256:' followed by the first 16 hex characters of its canonical semantic digest.","examples":["sha256:0f1e2d3c4b5a6978"]},"Common.CostUsd":{"type":"number","format":"double","minimum":0,"description":"Cost in USD (floating point)","x-csharp-type":"double"},"Common.Count":{"type":"integer","format":"int64","minimum":0,"description":"Generic non-negative counter","x-csharp-type":"long"},"Common.DurationMs":{"type":"number","format":"double","minimum":0,"description":"Duration in milliseconds","x-csharp-type":"double"},"Common.DurationNs":{"type":"string","format":"uint64","description":"Duration in nanoseconds, encoded as a decimal string","x-csharp-type":"ulong","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Common.DurationS":{"type":"number","format":"double","minimum":0,"description":"Duration in seconds"},"Common.EntityAttributeKey":{"type":"string","minLength":1,"description":"A non-empty Resource attribute key referenced by an OpenTelemetry entity."},"Common.EntityRef":{"type":"object","required":["type","id_keys"],"properties":{"schema_url":{"type":"string","description":"Schema URL applying to the entity and its referenced Resource attributes, when known."},"type":{"type":"string","minLength":1,"description":"Stable non-empty entity type, such as service or host."},"id_keys":{"type":"array","items":{"$ref":"#/$defs/Common.EntityAttributeKey"},"minItems":1,"description":"Non-empty set of Resource attribute keys that identify the entity."},"description_keys":{"type":"array","items":{"$ref":"#/$defs/Common.EntityAttributeKey"},"description":"Resource attribute keys that describe but do not identify the entity."}},"unevaluatedProperties":{"not":{}},"description":"A reference to an OpenTelemetry entity described by attributes on the containing Resource."},"Common.Errors.ApiError":{"anyOf":[{"$ref":"#/$defs/Common.Errors.NotFoundError"},{"$ref":"#/$defs/Common.Errors.ValidationError"},{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},{"$ref":"#/$defs/Common.Errors.ForbiddenError"},{"$ref":"#/$defs/Common.Errors.ConflictError"},{"$ref":"#/$defs/Common.Errors.RateLimitError"},{"$ref":"#/$defs/Common.Errors.InternalServerError"},{"$ref":"#/$defs/Common.Errors.BadGatewayError"},{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"}],"description":"Standard error response types"},"Common.Errors.BadGatewayError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Bad Gateway"]},"dependency":{"type":"string","description":"Stable dependency category; never contains raw exception text"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Upstream dependency failed while fulfilling the request (502)"},"Common.Errors.ConflictError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Conflict"]},"conflicting_resource":{"type":"string","description":"The conflicting resource ID"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Conflict - resource state conflict (409)"},"Common.Errors.ForbiddenError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Forbidden"]},"required_permission":{"type":"string","description":"Required permission that is missing"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Forbidden - insufficient permissions (403)"},"Common.Errors.InternalServerError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Internal Server Error"]},"error_code":{"type":"string","description":"Error code for support reference"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Internal server error (500)"},"Common.Errors.NotFoundError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Not Found"]},"resource_type":{"type":"string","description":"The type of resource that was not found"},"resource_id":{"type":"string","description":"The identifier that was not found"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Resource not found (404)"},"Common.Errors.ProblemDetails":{"type":"object","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference identifying the problem type","default":"about:blank"},"title":{"type":"string","description":"A short, human-readable summary of the problem type"},"status":{"type":"integer","format":"int32","description":"The HTTP status code (informational only, actual code set by subtype)"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence"},"instance":{"type":"string","format":"uri","description":"A URI reference identifying the specific occurrence"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the error"}},"description":"RFC 7807 Problem Details for HTTP APIs"},"Common.Errors.RateLimitError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Too Many Requests"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Rate limited - too many requests (429)"},"Common.Errors.ServiceUnavailableError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Service Unavailable"]},"reason":{"type":"string","enum":["maintenance","overloaded","dependency_failure"],"description":"Reason for unavailability"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Service unavailable (503)"},"Common.Errors.UnauthorizedError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Unauthorized"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Unauthorized - authentication required (401)"},"Common.Errors.ValidationError":{"type":"object","required":["title","errors"],"properties":{"title":{"type":"string","enum":["Validation Failed"]},"errors":{"type":"array","items":{"$ref":"#/$defs/Common.Errors.ValidationErrorDetail"},"description":"List of validation errors"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Bad request - validation failed (400)"},"Common.Errors.ValidationErrorDetail":{"type":"object","required":["field","message","code"],"properties":{"field":{"type":"string","description":"The field/property that failed validation"},"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The validation rule that failed"},"rejected_value":{"type":"string","description":"The rejected value (if safe to include)"}},"unevaluatedProperties":{"not":{}},"description":"Individual validation error detail"},"Common.HttpMethod":{"type":"string","description":"HTTP method name (uppercase)","examples":["GET"]},"Common.IPv4Address":{"type":"string","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$","description":"IPv4 address in dotted-decimal notation","examples":["192.168.1.1"]},"Common.IPv6Address":{"type":"string","description":"IPv6 address in standard notation","examples":["2001:0db8:85a3:0000:0000:8a2e:0370:7334"]},"Common.InstrumentationScope":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the instrumentation scope (library name)"},"version":{"$ref":"#/$defs/Common.SemVer","description":"Version of the instrumentation scope"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Additional attributes for the scope"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"}},"unevaluatedProperties":{"not":{}},"description":"Instrumentation scope identifying the library/component emitting telemetry"},"Common.IpAddress":{"type":"string","description":"IP address (IPv4 or IPv6)"},"Common.IsoDuration":{"type":"string","format":"duration","description":"ISO 8601 duration format (e.g., PT1H30M)"},"Common.LanguageCode":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","description":"Language/locale code (BCP 47)","examples":["en-US"]},"Common.MacAddress":{"type":"string","pattern":"^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$","description":"MAC address in colon-separated hex notation","examples":["00:1A:2B:3C:4D:5E"]},"Common.Pagination.AggregationParams":{"type":"object","properties":{"bucket":{"$ref":"#/$defs/Common.Pagination.TimeBucket","description":"Time bucket size","default":"auto"},"group_by":{"type":"array","items":{"type":"string"},"description":"Group by these dimensions"},"filter":{"type":"string","description":"Filter expression"}},"unevaluatedProperties":{"not":{}},"description":"Aggregation query parameters"},"Common.Pagination.CursorPaginationParams":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor for fetching the next page"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Maximum number of items to return (1-1000)","default":100},"order":{"$ref":"#/$defs/Common.Pagination.SortOrder","description":"Sort direction","default":"desc"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based pagination parameters"},"Common.Pagination.OffsetPaginationParams":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":1,"description":"Page number (1-indexed)","default":1},"page_size":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Items per page (1-1000)","default":100}},"unevaluatedProperties":{"not":{}},"description":"Offset-based pagination parameters"},"Common.Pagination.SortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order"},"Common.Pagination.StreamParams":{"type":"object","properties":{"since":{"type":"string","format":"date-time","description":"Include historical data from this timestamp"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Filter by trace ID"},"service_name":{"type":"string","description":"Filter by service name"},"max_events_per_second":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Maximum events per second (rate limiting)","default":100}},"unevaluatedProperties":{"not":{}},"description":"Streaming parameters for SSE endpoints"},"Common.Pagination.TimeBucket":{"type":"string","enum":["1m","5m","15m","1h","1d","1w","auto"],"description":"Time bucket size for aggregations"},"Common.Pagination.TimeRangeParams":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","description":"Start of time range (inclusive)"},"end_time":{"type":"string","format":"date-time","description":"End of time range (exclusive)"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":10000,"description":"Maximum number of items to return","default":1000}},"unevaluatedProperties":{"not":{}},"description":"Time-range based query parameters"},"Common.Percentage":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Percentage value (0.0 to 100.0)","x-csharp-type":"double"},"Common.Port":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"description":"Network port number (1-65535)","x-csharp-type":"int"},"Common.Ratio":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Ratio value (0.0 to 1.0)","x-csharp-type":"double"},"Common.SemVer":{"type":"string","pattern":"^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\\\+([0-9a-zA-Z-]+(?:\\\\.[0-9a-zA-Z-]+)*))?$","description":"Semantic version string (e.g., 1.2.3)","examples":["2.1.0"]},"Common.SessionId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique session identifier","x-csharp-type":"SessionId","x-csharp-struct":true},"Common.Sha256Hash":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash in lowercase hex"},"Common.SpanId":{"type":"string","minLength":16,"maxLength":16,"pattern":"^[a-f0-9]{16}$","description":"Unique span identifier (16 lowercase hex characters)","examples":["b7ad6b7169203331"],"x-csharp-type":"SpanId","x-csharp-struct":true},"Common.Temperature":{"type":"number","format":"double","minimum":0,"maximum":2,"description":"Temperature setting for LLM requests (0.0-2.0)","x-csharp-type":"double"},"Common.Timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp with nanosecond precision (RFC 3339)"},"Common.TokenCount":{"type":"integer","format":"int64","minimum":0,"description":"Token count (for LLM operations)","x-csharp-type":"long"},"Common.TraceId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","description":"Unique trace identifier (32 lowercase hex characters)","examples":["0af7651916cd43dd8448eb211c80319c"],"x-csharp-type":"TraceId","x-csharp-struct":true},"Common.TraceParent":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","description":"W3C Trace Context traceparent header format","examples":["00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"]},"Common.TraceState":{"type":"string","description":"W3C Trace Context tracestate header (vendor-specific key-value pairs)","examples":["rojo=00f067aa0ba902b7,congo=t61rcWkgMzE"]},"Common.UnixNanos":{"type":"string","format":"uint64","description":"Unsigned Unix timestamp in nanoseconds since epoch, encoded as a decimal string","x-csharp-type":"ulong","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Common.UrlPath":{"type":"string","description":"URL path component","examples":["/api/v1/users"]},"Common.UrlQuery":{"type":"string","description":"URL query string (without leading ?)","examples":["page=1&limit=100"]},"Common.UrlString":{"type":"string","format":"uri","description":"URL string (absolute)"},"Common.UserAgent":{"type":"string","description":"User agent string","examples":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"]},"Common.UserId":{"type":"string","minLength":1,"maxLength":256,"description":"User identifier (pseudonymized for privacy)"},"Domains.Observe.Session.DeviceType":{"type":"string","enum":["desktop","mobile","tablet","tv","console","wearable","iot","bot","unknown"],"description":"Device types"},"Domains.Observe.Session.SessionAttributes":{"type":"object","required":["session_id"],"properties":{"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"previous_session_id":{"$ref":"#/$defs/Common.SessionId","description":"Previous session ID (for session continuity)"}},"unevaluatedProperties":{"not":{}},"description":"Session span/event attributes"},"Domains.Observe.Session.SessionClientInfo":{"type":"object","properties":{"ip":{"$ref":"#/$defs/Common.IpAddress","description":"Client IP address"},"user_agent":{"$ref":"#/$defs/Common.UserAgent","description":"User agent string"},"device_type":{"$ref":"#/$defs/Domains.Observe.Session.DeviceType","description":"Device type"},"os":{"type":"string","description":"Operating system"},"browser":{"type":"string","description":"Browser name"},"browser_version":{"type":"string","description":"Browser version"}},"unevaluatedProperties":{"not":{}},"description":"Session client information"},"Domains.Observe.Session.SessionEntity":{"type":"object","required":["session_id","start_time","trace_count","span_count","error_count","services","state"],"properties":{"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"user_id":{"$ref":"#/$defs/Common.UserId","description":"User ID (if authenticated)"},"start_time":{"type":"string","format":"date-time","description":"Session start time"},"end_time":{"type":"string","format":"date-time","description":"Session end time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs","description":"Session duration in milliseconds"},"trace_count":{"type":"integer","format":"int32","minimum":0,"description":"Total trace count in session"},"span_count":{"type":"integer","format":"int32","minimum":0,"description":"Total span count in session"},"error_count":{"type":"integer","format":"int32","minimum":0,"description":"Total error count in session"},"services":{"type":"array","items":{"type":"string"},"description":"Service names observed in this session"},"state":{"$ref":"#/$defs/Domains.Observe.Session.SessionState","description":"Session state"},"client":{"$ref":"#/$defs/Domains.Observe.Session.SessionClientInfo","description":"Client information"},"geo":{"$ref":"#/$defs/Domains.Observe.Session.SessionGeoInfo","description":"Location information"},"genai_usage":{"$ref":"#/$defs/Domains.Observe.Session.SessionGenAiUsage","description":"GenAI usage summary"}},"unevaluatedProperties":{"not":{}},"description":"Complete session entity with aggregated data","x-csharp-type":"SessionEntity"},"Domains.Observe.Session.SessionEvent":{"type":"object","required":["event_name","session_id","timestamp","event_domain"],"properties":{"event_name":{"$ref":"#/$defs/Domains.Observe.Session.SessionEventName","description":"Event name"},"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"timestamp":{"type":"string","format":"date-time","description":"Event timestamp"},"event_domain":{"type":"string","enum":["session"],"description":"Event domain"}},"unevaluatedProperties":{"not":{}},"description":"Session lifecycle event"},"Domains.Observe.Session.SessionEventName":{"type":"string","enum":["session.start","session.end"],"description":"Session event names"},"Domains.Observe.Session.SessionGenAiUsage":{"type":"object","required":["request_count","total_input_tokens","total_output_tokens","models_used","providers_used"],"properties":{"request_count":{"type":"integer","format":"int32","minimum":0,"description":"Total GenAI requests in session"},"total_input_tokens":{"$ref":"#/$defs/Common.TokenCount","description":"Total input tokens consumed"},"total_output_tokens":{"$ref":"#/$defs/Common.TokenCount","description":"Total output tokens generated"},"models_used":{"type":"array","items":{"type":"string"},"description":"Models used in session"},"providers_used":{"type":"array","items":{"type":"string"},"description":"Providers used in session"}},"unevaluatedProperties":{"not":{}},"description":"Session GenAI usage summary"},"Domains.Observe.Session.SessionGeoInfo":{"type":"object","properties":{"country_code":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)"},"country_name":{"type":"string","description":"Country name"},"region":{"type":"string","description":"Region/state"},"city":{"type":"string","description":"City"},"postal_code":{"type":"string","description":"Postal code"},"timezone":{"type":"string","description":"Timezone"}},"unevaluatedProperties":{"not":{}},"description":"Session geographic information"},"Domains.Observe.Session.SessionState":{"type":"string","enum":["active","idle","ended","timed_out","invalidated"],"description":"Session states"},"Domains.Observe.Session.SessionStats":{"type":"object","required":["active_sessions","total_sessions","avg_duration_ms","sessions_with_errors","sessions_with_genai","bounce_rate"],"properties":{"active_sessions":{"$ref":"#/$defs/Common.Count","description":"Active sessions count"},"total_sessions":{"$ref":"#/$defs/Common.Count","description":"Total sessions in time range"},"avg_duration_ms":{"type":"number","format":"double","description":"Average session duration in milliseconds"},"sessions_with_errors":{"$ref":"#/$defs/Common.Count","description":"Sessions with errors"},"sessions_with_genai":{"$ref":"#/$defs/Common.Count","description":"Sessions with GenAI usage"},"bounce_rate":{"$ref":"#/$defs/Common.Ratio","description":"Bounce rate (single-page sessions)"}},"unevaluatedProperties":{"not":{}},"description":"Aggregated session statistics"},"Health.HealthCheckEntry":{"type":"object","required":["status","duration_ms"],"properties":{"status":{"$ref":"#/$defs/Health.HealthStatus"},"description":{"type":"string"},"duration_ms":{"type":"number","format":"double"}},"unevaluatedProperties":{"not":{}},"description":"One named health-check result."},"Health.HealthReport":{"type":"object","required":["status","total_duration_ms","entries","contract_revision"],"properties":{"status":{"$ref":"#/$defs/Health.HealthStatus"},"total_duration_ms":{"type":"number","format":"double"},"entries":{"type":"object","unevaluatedProperties":{"$ref":"#/$defs/Health.HealthCheckEntry"}},"contract_revision":{"$ref":"#/$defs/Common.ContractRevision","description":"Revision of the API contract this process serves, for the client-side startup handshake."}},"unevaluatedProperties":{"not":{}},"description":"Readiness or liveness report returned by /health and /alive."},"Health.HealthStatus":{"type":"string","enum":["healthy","degraded","unhealthy"],"description":"Health state reported by a qyl-managed process."},"Mcp.Tools.CiLogInput":{"type":"object","properties":{"run_id":{"$ref":"#/$defs/Common.SessionId","description":"Session id of one CI run for a per-leg phase breakdown; omit to list recent runs."},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":50,"description":"Maximum CI runs to list.","default":10}},"unevaluatedProperties":{"not":{}},"description":"Input for ci_log."},"Mcp.Tools.CiLogOutput":{"type":"object","required":["mode"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.CiRunSummary"}},"run_id":{"$ref":"#/$defs/Common.SessionId"},"phases":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.CiPhase"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for ci_log: recent runs, or one run's phases."},"Mcp.Tools.CiPhase":{"type":"object","required":["leg","phase","status","duration_ms"],"properties":{"leg":{"type":"string","description":"Value of the span's ci.leg attribute, falling back to its service name."},"phase":{"type":"string","description":"Span name, which the CI emitter convention sets to the phase name."},"status":{"$ref":"#/$defs/Mcp.Tools.CiPhaseStatus"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"message":{"type":"string","description":"Span status message, present on a failed phase."}},"unevaluatedProperties":{"not":{}},"description":"One phase span of a CI run, attributed to the leg that executed it."},"Mcp.Tools.CiPhaseStatus":{"type":"string","enum":["ok","error","unset"],"description":"Outcome of one CI phase span, projected from its OpenTelemetry span status."},"Mcp.Tools.CiRunSummary":{"type":"object","required":["run_id","state","start_time","error_count","services"],"properties":{"run_id":{"$ref":"#/$defs/Common.SessionId"},"state":{"$ref":"#/$defs/Domains.Observe.Session.SessionState"},"start_time":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"error_count":{"type":"integer","format":"int32","minimum":0,"description":"Spans in the run that ended with an error status."},"services":{"type":"array","items":{"type":"string"},"description":"Service names observed in the run, at least one of which is CI-emitted."}},"unevaluatedProperties":{"not":{}},"description":"One CI run, summarized from the session its telemetry is grouped under."},"Mcp.Tools.ControlWorkflowRunInput":{"type":"object","required":["run_id","action","idempotency_key"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"idempotency_key":{"type":"string","minLength":1,"maxLength":160},"input":{"type":"string","maxLength":32768}},"unevaluatedProperties":{"not":{}},"description":"Input for control_workflow_run."},"Mcp.Tools.ControlWorkflowRunOutput":{"type":"object","required":["command"],"properties":{"command":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for control_workflow_run."},"Mcp.Tools.DisplayMcpDashboardInput":{"type":"object","properties":{"hours":{"type":"number","format":"double","minimum":1,"maximum":168,"default":24}},"unevaluatedProperties":{"not":{}},"description":"Input for display_mcp_dashboard."},"Mcp.Tools.DisplayMcpDashboardOutput":{"type":"object","required":["stats"],"properties":{"stats":{"$ref":"#/$defs/Mcp.Tools.McpDashboardStats"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_mcp_dashboard."},"Mcp.Tools.DisplayTracesInput":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"},"session_id":{"$ref":"#/$defs/Common.SessionId"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for display_traces."},"Mcp.Tools.DisplayTracesOutput":{"type":"object","required":["traces","mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"selected_trace_id":{"$ref":"#/$defs/Common.TraceId"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_traces."},"Mcp.Tools.DisplayWorkflowGraphInput":{"type":"object","properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"node_cursor":{"type":"string"},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"type":"string"},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500}},"unevaluatedProperties":{"not":{}},"description":"Input for display_workflow_graph. Omit run_id to select the most recent run."},"Mcp.Tools.DisplayWorkflowGraphOutput":{"type":"object","required":["graph","live_controls_available","mode"],"properties":{"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"live_controls_available":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_workflow_graph."},"Mcp.Tools.FetchTelemetryInput":{"type":"object","required":["view"],"properties":{"view":{"$ref":"#/$defs/Mcp.Tools.FetchTelemetryView"},"trace_id":{"$ref":"#/$defs/Common.TraceId"},"service_name":{"type":"string"},"severity_min":{"type":"integer","format":"int32","minimum":1,"maximum":24},"query":{"type":"string"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":200},"hours":{"type":"number","format":"double","minimum":1,"maximum":168}},"unevaluatedProperties":{"not":{}},"description":"Input for the app-only fetch_telemetry tool."},"Mcp.Tools.FetchTelemetryOutput":{"type":"object","required":["mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"trace":{"$ref":"#/$defs/OTel.Traces.Trace"},"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"stats":{"$ref":"#/$defs/Mcp.Tools.McpDashboardStats"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for the app-only fetch_telemetry tool."},"Mcp.Tools.FetchTelemetryView":{"type":"string","enum":["traces","trace","logs","mcp_stats"],"description":"Data projection requested by the app-only fetch_telemetry tool."},"Mcp.Tools.FetchWorkflowGraphUpdatesInput":{"type":"object","required":["run_id","after_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"after_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"wait_ms":{"type":"integer","format":"int32","minimum":0,"maximum":30000,"default":20000},"node_cursor":{"type":"string"},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"type":"string"},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500},"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef","description":"Optional captured payload to retrieve lazily for the selected run."}},"unevaluatedProperties":{"not":{}},"description":"Input for the app-only fetch_workflow_graph_updates tool."},"Mcp.Tools.FetchWorkflowGraphUpdatesOutput":{"type":"object","required":["page","mode"],"properties":{"page":{"$ref":"#/$defs/Workflow.WorkflowEventPage"},"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"content":{"$ref":"#/$defs/Workflow.WorkflowContent"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for the app-only fetch_workflow_graph_updates tool."},"Mcp.Tools.GetTraceInput":{"type":"object","required":["trace_id"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"}},"unevaluatedProperties":{"not":{}},"description":"Input for get_trace."},"Mcp.Tools.GetTraceOutput":{"type":"object","required":["trace","mode"],"properties":{"trace":{"$ref":"#/$defs/OTel.Traces.Trace"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for get_trace."},"Mcp.Tools.GetWorkflowGraphInput":{"type":"object","required":["run_id"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"node_cursor":{"type":"string"},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"type":"string"},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500}},"unevaluatedProperties":{"not":{}},"description":"Input for get_workflow_graph."},"Mcp.Tools.GetWorkflowGraphOutput":{"type":"object","required":["graph","mode"],"properties":{"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for get_workflow_graph."},"Mcp.Tools.ListSessionsInput":{"type":"object","properties":{"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20},"active_only":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Input for list_sessions."},"Mcp.Tools.ListSessionsOutput":{"type":"object","required":["sessions","mode"],"properties":{"sessions":{"type":"array","items":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_sessions."},"Mcp.Tools.ListTracesInput":{"type":"object","properties":{"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for list_traces."},"Mcp.Tools.ListTracesOutput":{"type":"object","required":["traces","mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.TraceSummary"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_traces."},"Mcp.Tools.ListWorkflowRunsInput":{"type":"object","properties":{"status":{"$ref":"#/$defs/Workflow.WorkflowRunStatus"},"cursor":{"type":"string"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for list_workflow_runs."},"Mcp.Tools.ListWorkflowRunsOutput":{"type":"object","required":["runs","has_more","mode"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowRun"}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_workflow_runs."},"Mcp.Tools.McpDashboardBucket":{"type":"object","required":["start","requests","errors"],"properties":{"start":{"type":"string","format":"date-time"},"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDashboardStats":{"type":"object","required":["window","buckets","totals","by_server","by_transport","by_method","tools","span_count_analyzed","truncated","mode"],"properties":{"window":{"$ref":"#/$defs/Mcp.Tools.McpDashboardWindow"},"buckets":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpDashboardBucket"}},"totals":{"$ref":"#/$defs/Mcp.Tools.McpDashboardTotals"},"by_server":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"by_transport":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"by_method":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"tools":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpToolStats"}},"span_count_analyzed":{"type":"integer","format":"int32","minimum":0},"truncated":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate MCP traffic statistics shown by qyl.mcp."},"Mcp.Tools.McpDashboardTotals":{"type":"object","required":["requests","errors","error_rate"],"properties":{"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"error_rate":{"type":"number","format":"double","minimum":0,"maximum":1}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDashboardWindow":{"type":"object","required":["start","end","bucket_ms"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"bucket_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDataMode":{"type":"string","enum":["live","demo"],"description":"Whether a qyl MCP tool read live collector data or the explicit demo dataset."},"Mcp.Tools.McpNameRequestCount":{"type":"object","required":["name","requests"],"properties":{"name":{"type":"string"},"requests":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpToolStats":{"type":"object","required":["name","requests","errors","error_rate","avg_ms","p95_ms"],"properties":{"name":{"type":"string"},"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"error_rate":{"type":"number","format":"double","minimum":0,"maximum":1},"avg_ms":{"type":"number","format":"double","minimum":0},"p95_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.SearchLogsInput":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"},"service_name":{"type":"string"},"severity_min":{"type":"integer","format":"int32","minimum":1,"maximum":24},"query":{"type":"string"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":200,"default":50}},"unevaluatedProperties":{"not":{}},"description":"Input for search_logs."},"Mcp.Tools.SearchLogsOutput":{"type":"object","required":["logs","mode"],"properties":{"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for search_logs."},"OTel.Enums.ErrorType":{"type":"string","enum":["_OTHER","TIMEOUT","CONNECTION_REFUSED","DNS_ERROR","TLS_ERROR","AUTH_ERROR","PERMISSION_DENIED","NOT_FOUND","RESOURCE_EXHAUSTED","INVALID_ARGUMENT","CANCELLED"],"description":"Standardized error types"},"OTel.Enums.EventDomain":{"type":"string","enum":["browser","device","k8s","session","gen_ai","exception","log"],"description":"Event domain (namespace for event types)"},"OTel.Enums.SeverityNumber":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"description":"Log severity number following OTel specification (1-24)"},"OTel.Enums.SeverityText":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"description":"Log severity text (human-readable)"},"OTel.Enums.SpanFlags":{"type":"number","enum":[0,1,2],"description":"Span flags as defined in W3C Trace Context"},"OTel.Enums.SpanKind":{"type":"number","enum":[0,1,2,3,4,5],"description":"Span kind describing the relationship between spans"},"OTel.Enums.SpanStatusCode":{"type":"number","enum":[0,1,2],"description":"Span status code"},"OTel.Enums.TelemetrySdkLanguage":{"type":"string","enum":["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","rust","swift","webjs"],"description":"Telemetry SDK language"},"OTel.Logs.LogBody":{"type":"object","oneOf":[{"$ref":"#/$defs/OTel.Logs.LogBodyString"},{"$ref":"#/$defs/OTel.Logs.LogBodyKvList"},{"$ref":"#/$defs/OTel.Logs.LogBodyArray"},{"$ref":"#/$defs/OTel.Logs.LogBodyBytes"}],"discriminator":{"propertyName":"kind","mapping":{"stringBody":"#/components/schemas/OTel.Logs.LogBodyString","kvListBody":"#/components/schemas/OTel.Logs.LogBodyKvList","arrayBody":"#/components/schemas/OTel.Logs.LogBodyArray","bytesBody":"#/components/schemas/OTel.Logs.LogBodyBytes"}},"description":"Log body content - can be string, structured, or bytes"},"OTel.Logs.LogBodyArray":{"type":"object","required":["array_value"],"properties":{"array_value":{"type":"array","items":{"$ref":"#/$defs/Common.AttributeValue"},"description":"Array of values"}},"unevaluatedProperties":{"not":{}},"description":"Array log body"},"OTel.Logs.LogBodyBytes":{"type":"object","required":["bytes_value"],"properties":{"bytes_value":{"type":"string","contentEncoding":"base64","description":"Binary value (base64 encoded)"}},"unevaluatedProperties":{"not":{}},"description":"Binary log body"},"OTel.Logs.LogBodyKvList":{"type":"object","required":["kv_list_value"],"properties":{"kv_list_value":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Key-value pairs"}},"unevaluatedProperties":{"not":{}},"description":"Structured key-value log body"},"OTel.Logs.LogBodyString":{"type":"object","required":["string_value"],"properties":{"string_value":{"type":"string","description":"String value"}},"unevaluatedProperties":{"not":{}},"description":"String log body"},"OTel.Logs.LogRecord":{"type":"object","required":["time_unix_nano","observed_time_unix_nano","severity_number","body","resource"],"properties":{"time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Timestamp when the event occurred (nanoseconds since epoch)"},"observed_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Timestamp when the log was observed/collected (nanoseconds since epoch)"},"severity_number":{"$ref":"#/$defs/OTel.Enums.SeverityNumber","description":"Severity number (1-24)"},"severity_text":{"$ref":"#/$defs/OTel.Enums.SeverityText","description":"Severity text (DEBUG, INFO, WARN, ERROR, etc.)"},"body":{"$ref":"#/$defs/OTel.Logs.LogBody","description":"Log body - the main content"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Log attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"flags":{"type":"integer","format":"int32","description":"Flags (trace flags)"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Associated trace ID"},"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Associated span ID"},"event_name":{"type":"string","description":"Optional event category whose presence identifies this log record as an event; records with the same name are expected to share one body and attribute schema."},"resource":{"$ref":"#/$defs/OTel.Resource.Resource","description":"Resource describing the entity that produced this log"},"instrumentation_scope":{"$ref":"#/$defs/Common.InstrumentationScope","description":"Instrumentation scope"}},"unevaluatedProperties":{"not":{}},"description":"OpenTelemetry Log Record"},"OTel.Logs.LogTemplate":{"type":"object","required":["template","parameters"],"properties":{"template":{"type":"string","description":"Template string with {placeholder} syntax"},"parameters":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Template parameters"},"rendered_message":{"type":"string","description":"Rendered message"}},"unevaluatedProperties":{"not":{}},"description":"Log message template with placeholders"},"OTel.Resource.CloudProvider":{"type":"string","enum":["alibaba_cloud","aws","azure","gcp","heroku","ibm_cloud","tencent_cloud"],"description":"Cloud provider types"},"OTel.Resource.HostArch":{"type":"string","enum":["amd64","arm32","arm64","ia64","ppc32","ppc64","s390x","x86"],"description":"Host architecture types"},"OTel.Resource.OsType":{"type":"string","enum":["windows","linux","darwin","freebsd","netbsd","openbsd","dragonflybsd","hpux","aix","solaris","z_os"],"description":"Operating system types"},"OTel.Resource.Resource":{"type":"object","required":["service_name"],"properties":{"service_name":{"type":"string","description":"Service name (required)"},"service_namespace":{"type":"string","description":"Service namespace for grouping"},"service_instance_id":{"type":"string","description":"Service instance ID (unique per instance)"},"service_version":{"$ref":"#/$defs/Common.SemVer","description":"Service version"},"telemetry_sdk_name":{"type":"string","description":"Telemetry SDK name"},"telemetry_sdk_language":{"$ref":"#/$defs/OTel.Enums.TelemetrySdkLanguage","description":"Telemetry SDK language"},"telemetry_sdk_version":{"$ref":"#/$defs/Common.SemVer","description":"Telemetry SDK version"},"telemetry_distro_version":{"$ref":"#/$defs/Common.SemVer","description":"Telemetry distribution version"},"deployment_environment":{"type":"string","description":"Deployment environment (e.g., production, staging)"},"cloud_provider":{"$ref":"#/$defs/OTel.Resource.CloudProvider","description":"Cloud provider"},"cloud_region":{"type":"string","description":"Cloud region"},"cloud_availability_zone":{"type":"string","description":"Cloud availability zone"},"cloud_account_id":{"type":"string","description":"Cloud account ID"},"cloud_platform":{"type":"string","description":"Cloud platform (e.g., aws_ecs, gcp_cloud_run)"},"host_name":{"type":"string","description":"Host name"},"host_id":{"type":"string","description":"Host ID"},"host_type":{"type":"string","description":"Host type (e.g., n1-standard-1)"},"host_arch":{"$ref":"#/$defs/OTel.Resource.HostArch","description":"Host architecture (e.g., amd64, arm64)"},"os_type":{"$ref":"#/$defs/OTel.Resource.OsType","description":"Operating system type"},"os_description":{"type":"string","description":"Operating system description"},"os_version":{"type":"string","description":"Operating system version"},"process_pid":{"type":"integer","format":"int64","description":"Process ID"},"process_executable_name":{"type":"string","description":"Process executable name"},"process_command_line":{"type":"string","description":"Process command line"},"process_runtime_name":{"type":"string","description":"Process runtime name"},"process_runtime_version":{"type":"string","description":"Process runtime version"},"container_id":{"type":"string","description":"Container ID"},"container_name":{"type":"string","description":"Container name"},"container_image_name":{"type":"string","description":"Container image name"},"container_image_tags":{"type":"array","items":{"type":"string"},"description":"Container image tags"},"k8s_cluster_name":{"type":"string","description":"Kubernetes cluster name"},"k8s_namespace_name":{"type":"string","description":"Kubernetes namespace"},"k8s_pod_name":{"type":"string","description":"Kubernetes pod name"},"k8s_pod_uid":{"type":"string","description":"Kubernetes pod UID"},"k8s_deployment_name":{"type":"string","description":"Kubernetes deployment name"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Additional resource attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"entity_refs":{"type":"array","items":{"$ref":"#/$defs/Common.EntityRef"},"description":"Entities participating in this Resource, keyed by attributes on the Resource."}},"unevaluatedProperties":{"not":{}},"description":"Resource describes the entity producing telemetry"},"OTel.Traces.Span":{"type":"object","required":["span_id","trace_id","name","kind","start_time_unix_nano","end_time_unix_nano","status","resource"],"properties":{"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Unique span identifier (16 hex chars)"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Trace identifier (32 hex chars)"},"parent_span_id":{"$ref":"#/$defs/Common.SpanId","description":"Parent span identifier (null for root spans)"},"trace_state":{"$ref":"#/$defs/Common.TraceState","description":"W3C trace state"},"name":{"type":"string","minLength":1,"description":"Human-readable span name"},"kind":{"$ref":"#/$defs/OTel.Enums.SpanKind","description":"Span kind"},"start_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Start timestamp in nanoseconds since epoch"},"end_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"End timestamp in nanoseconds since epoch"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Span attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"events":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanEvent"},"description":"Span events (logs attached to span)"},"dropped_events_count":{"$ref":"#/$defs/Common.Count","description":"Dropped events count"},"links":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanLink"},"description":"Links to other spans"},"dropped_links_count":{"$ref":"#/$defs/Common.Count","description":"Dropped links count"},"status":{"$ref":"#/$defs/OTel.Traces.SpanStatus","description":"Span status"},"flags":{"type":"integer","format":"int32","description":"Span flags"},"resource":{"$ref":"#/$defs/OTel.Resource.Resource","description":"Resource describing the entity that produced this span"},"instrumentation_scope":{"$ref":"#/$defs/Common.InstrumentationScope","description":"Instrumentation scope"}},"unevaluatedProperties":{"not":{}},"description":"OpenTelemetry Span representing a single operation in a distributed trace"},"OTel.Traces.SpanEvent":{"type":"object","required":["name","time_unix_nano"],"properties":{"name":{"type":"string","minLength":1,"description":"Event name"},"time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Event timestamp in nanoseconds since epoch"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Event attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"}},"unevaluatedProperties":{"not":{}},"description":"Event occurring during a span's lifetime"},"OTel.Traces.SpanLink":{"type":"object","required":["trace_id","span_id"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Linked trace ID"},"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Linked span ID"},"trace_state":{"$ref":"#/$defs/Common.TraceState","description":"Trace state of the linked span"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Link attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"flags":{"type":"integer","format":"int32","description":"Link flags"}},"unevaluatedProperties":{"not":{}},"description":"Link to another span (e.g., batch processing)"},"OTel.Traces.SpanQueryFilters":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Filter by trace ID"},"parent_span_id":{"$ref":"#/$defs/Common.SpanId","description":"Filter by parent span ID"},"name":{"type":"string","description":"Filter by span name (supports wildcards)"},"kind":{"$ref":"#/$defs/OTel.Enums.SpanKind","description":"Filter by span kind"},"service_name":{"type":"string","description":"Filter by service name"},"status_code":{"$ref":"#/$defs/OTel.Enums.SpanStatusCode","description":"Filter by status code"},"min_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Minimum duration in nanoseconds"},"max_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Maximum duration in nanoseconds"},"attribute":{"type":"string","description":"Filter by attribute key-value pair"}},"unevaluatedProperties":{"not":{}},"description":"Filter parameters for querying spans"},"OTel.Traces.SpanStats":{"type":"object","required":["total_count","error_count","error_rate","avg_duration_ns","p50_duration_ns","p90_duration_ns","p99_duration_ns","min_duration_ns","max_duration_ns","throughput_per_second"],"properties":{"total_count":{"$ref":"#/$defs/Common.Count","description":"Total span count"},"error_count":{"$ref":"#/$defs/Common.Count","description":"Error count"},"error_rate":{"$ref":"#/$defs/Common.Ratio","description":"Error rate (0.0 - 1.0)"},"avg_duration_ns":{"type":"number","format":"double","description":"Average duration in nanoseconds"},"p50_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P50 duration in nanoseconds"},"p90_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P90 duration in nanoseconds"},"p99_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P99 duration in nanoseconds"},"min_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Minimum duration in nanoseconds"},"max_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Maximum duration in nanoseconds"},"throughput_per_second":{"type":"number","format":"double","description":"Throughput (spans per second)"},"by_service":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanStatsByDimension"},"description":"Stats grouped by service"},"by_operation":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanStatsByDimension"},"description":"Stats grouped by operation name"}},"unevaluatedProperties":{"not":{}},"description":"Aggregated span statistics"},"OTel.Traces.SpanStatsByDimension":{"type":"object","required":["dimension","count","avg_duration_ns","error_rate"],"properties":{"dimension":{"type":"string","description":"Dimension value (e.g., service name)"},"count":{"$ref":"#/$defs/Common.Count","description":"Span count for this dimension"},"avg_duration_ns":{"type":"number","format":"double","description":"Average duration in nanoseconds"},"error_rate":{"$ref":"#/$defs/Common.Ratio","description":"Error rate for this dimension"}},"unevaluatedProperties":{"not":{}},"description":"Span statistics for a specific dimension value"},"OTel.Traces.SpanStatus":{"type":"object","required":["code"],"properties":{"code":{"$ref":"#/$defs/OTel.Enums.SpanStatusCode","description":"Status code"},"message":{"type":"string","description":"Status message (only for ERROR status)"}},"unevaluatedProperties":{"not":{}},"description":"Span status"},"OTel.Traces.Trace":{"type":"object","required":["spans"],"properties":{"spans":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Span"},"description":"All spans in this trace"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/OTel.Traces.TraceSummary"}],"description":"Complete trace containing all related spans"},"OTel.Traces.TraceSummary":{"type":"object","required":["trace_id","span_count","duration_ns","start_time","end_time","services","has_error"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Trace identifier"},"root_span":{"$ref":"#/$defs/OTel.Traces.Span","description":"Root span of the trace"},"span_count":{"type":"integer","format":"int32","description":"Total span count"},"duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Trace duration in nanoseconds"},"start_time":{"type":"string","format":"date-time","description":"Trace start time"},"end_time":{"type":"string","format":"date-time","description":"Trace end time"},"services":{"type":"array","items":{"type":"string"},"description":"Services involved in this trace"},"has_error":{"type":"boolean","description":"Whether trace contains errors"}},"description":"Trace summary without the full span collection"},"Runner.RunnerLogEvents":{"$ref":"#/$defs/Runner.RunnerLogLine"},"Runner.RunnerLogLine":{"type":"object","required":["resource","stream","line"],"properties":{"resource":{"type":"string"},"stream":{"$ref":"#/$defs/Runner.RunnerLogStream"},"line":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"One bounded child-process log line exposed by the runner."},"Runner.RunnerLogStream":{"type":"string","enum":["out","err"],"description":"Origin stream for one captured child-process log line."},"Runner.RunnerResourceEvents":{"$ref":"#/$defs/Runner.RunnerResourceState"},"Runner.RunnerResourceKind":{"type":"string","enum":["collector","project","command","stdio","http","inproc"],"description":"Kind of process or connection supervised by the local qyl runner."},"Runner.RunnerResourceLifecycle":{"type":"string","enum":["pending","starting","ready","stopping","stopped","failed"],"description":"Lifecycle state of a resource supervised by the local qyl runner."},"Runner.RunnerResourceState":{"type":"object","required":["name","lifecycle","timestamp"],"properties":{"name":{"type":"string"},"lifecycle":{"$ref":"#/$defs/Runner.RunnerResourceLifecycle"},"timestamp":{"type":"string","format":"date-time"},"kind":{"$ref":"#/$defs/Runner.RunnerResourceKind"},"allocated_port":{"type":"integer","format":"int32","minimum":1,"maximum":65535},"endpoint":{"type":"string","format":"uri"},"last_error":{"type":"string"},"server_identity":{"description":"Opaque SDK server-info entity when this resource is an initialized MCP connection."},"tool_count":{"type":"integer","format":"int32","minimum":0},"restarts":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Current client-visible state of one runner resource."},"Streaming.HeartbeatEvent":{"type":"object","required":["type","timestamp"],"properties":{"type":{"type":"string","enum":["heartbeat"]},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Keep-alive event emitted while no new log is available."},"Streaming.LogEvents":{"anyOf":[{"$ref":"#/$defs/Streaming.LogStreamEvent"},{"$ref":"#/$defs/Streaming.HeartbeatEvent"}]},"Streaming.LogStreamEvent":{"type":"object","required":["type","data","timestamp"],"properties":{"type":{"type":"string","enum":["log"]},"data":{"$ref":"#/$defs/OTel.Logs.LogRecord"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One log delivered by the collector's live stream."},"Workbench.WorkbenchAssertionResult":{"type":"object","required":["assertion_id","kind","status"],"properties":{"assertion_id":{"type":"string"},"kind":{"type":"string"},"status":{"$ref":"#/$defs/Workbench.WorkbenchAssertionStatus"},"message":{"type":"string"},"actual":{}},"unevaluatedProperties":{"not":{}},"description":"Outcome of one assertion with sanitized actual evidence when useful."},"Workbench.WorkbenchAssertionStatus":{"type":"string","enum":["passed","failed","error","skipped"],"description":"Assertion outcome reported by an evaluation."},"Workbench.WorkbenchBuiltinServerConfiguration":{"type":"object","required":["transport","name"],"properties":{"transport":{"type":"string","enum":["builtin"]},"name":{"type":"string","minLength":1}},"unevaluatedProperties":{"not":{}},"description":"Sanitized built-in MCP server configuration."},"Workbench.WorkbenchConnectionSnapshot":{"type":"object","required":["status","changed_at"],"properties":{"status":{"$ref":"#/$defs/Workbench.WorkbenchConnectionStatus"},"changed_at":{"type":"string","format":"date-time"},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"type":"string","format":"date-time"},"initialization":{"$ref":"#/$defs/Workbench.WorkbenchInitializationSnapshot"},"recent_error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Current connection state and most recent initialization evidence for one MCP server."},"Workbench.WorkbenchConnectionStatus":{"type":"string","enum":["disconnected","connecting","connected","disconnecting","reconnecting","failed"],"description":"Connection lifecycle for one configured MCP server."},"Workbench.WorkbenchDiscoveryCollection":{"type":"object","required":["items","count","complete","discovered_at"],"properties":{"items":{"type":"array","items":{}},"count":{"type":"integer","format":"int32","minimum":0},"complete":{"type":"boolean"},"cursor":{"type":"string"},"next_cursor":{"type":"string"},"discovered_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One discovered MCP entity collection. Every item remains the SDK-validated opaque entity."},"Workbench.WorkbenchDiscoverySnapshot":{"type":"object","required":["server_id","started_at","completed_at","tools","resources","resource_templates","prompts"],"properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"tools":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"resources":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"resource_templates":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"prompts":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"}},"unevaluatedProperties":{"not":{}},"description":"Complete MCP capability discovery evidence for one server."},"Workbench.WorkbenchEnvironmentSecretReference":{"type":"object","required":["name","secret"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"secret":{"$ref":"#/$defs/Workbench.WorkbenchSecretReference"}},"unevaluatedProperties":{"not":{}},"description":"Environment variable whose value is resolved from a secret reference at connection time."},"Workbench.WorkbenchError":{"type":"object","required":["category","code","message","occurred_at","retryable"],"properties":{"category":{"$ref":"#/$defs/Workbench.WorkbenchErrorCategory"},"code":{"type":"string"},"message":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"retryable":{"type":"boolean"},"details":{"description":"Sanitized implementation details with credentials and secret values removed."}},"unevaluatedProperties":{"not":{}},"description":"Typed, sanitized failure captured by the MCP workbench."},"Workbench.WorkbenchErrorCategory":{"type":"string","enum":["authentication","transport","protocol","serialization","schema_validation","tool_error","timeout","cancelled","internal"],"description":"Stable category for a workbench, transport, protocol, or tool execution error."},"Workbench.WorkbenchEvaluationComparisonRequest":{"type":"object","required":["baseline_run_id","candidate_run_id"],"properties":{"baseline_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"candidate_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"}},"unevaluatedProperties":{"not":{}},"description":"Request to compare a baseline MCP evaluation run with a candidate run."},"Workbench.WorkbenchEvaluationExport":{"type":"object","required":["id","run_id","format","status","requested_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportId"},"run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"format":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportFormat"},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportStatus"},"requested_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"media_type":{"type":"string"},"file_name":{"type":"string"},"byte_size":{"$ref":"#/$defs/Common.ByteSize"},"sha256":{"$ref":"#/$defs/Common.Sha256Hash"},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Metadata for one generated evaluation JSON or readable report artifact."},"Workbench.WorkbenchEvaluationExportAccepted":{"type":"object","required":["export"],"properties":{"export":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"}},"unevaluatedProperties":{"not":{}},"description":"An evaluation export was accepted and continues asynchronously."},"Workbench.WorkbenchEvaluationExportArtifact":{"type":"object","required":["export","payload"],"properties":{"export":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"},"payload":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportPayload"}},"unevaluatedProperties":{"not":{}},"description":"Ready evaluation export metadata and its TypeSpec-owned content."},"Workbench.WorkbenchEvaluationExportFormat":{"type":"string","enum":["json","report"],"description":"Supported evaluation export representation."},"Workbench.WorkbenchEvaluationExportId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one generated evaluation export."},"Workbench.WorkbenchEvaluationExportPayload":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationJsonExportPayload"},{"$ref":"#/$defs/Workbench.WorkbenchEvaluationReportExportPayload"}],"description":"Exactly one generated evaluation export representation."},"Workbench.WorkbenchEvaluationExportRequest":{"type":"object","required":["format","idempotency_key"],"properties":{"format":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportFormat"},"include_protocol_events":{"type":"boolean","default":true},"include_telemetry":{"type":"boolean","default":true},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to generate a machine-readable or readable evaluation export."},"Workbench.WorkbenchEvaluationExportStatus":{"type":"string","enum":["pending","ready","failed"],"description":"Lifecycle for generation of an evaluation export artifact."},"Workbench.WorkbenchEvaluationJsonExportPayload":{"type":"object","required":["format","run","protocol_events","telemetry","exported_at"],"properties":{"format":{"type":"string","enum":["json"]},"run":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"},"protocol_events":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"}},"telemetry":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTelemetryResponse"}},"exported_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Machine-readable evaluation export with retained execution, protocol, and optional telemetry evidence."},"Workbench.WorkbenchEvaluationReportExportPayload":{"type":"object","required":["format","markdown","exported_at"],"properties":{"format":{"type":"string","enum":["report"]},"markdown":{"type":"string"},"exported_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Human-readable Markdown evaluation report."},"Workbench.WorkbenchEvaluationResultStatus":{"type":"string","enum":["passed","failed","error","skipped"],"description":"Outcome for one test case within an evaluation run."},"Workbench.WorkbenchEvaluationRun":{"type":"object","required":["id","workspace_id","test_cases","status","created_at","results"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"suite":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSuiteSnapshot"},"test_cases":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestCaseSnapshot"}},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunStatus"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestResult"}},"summary":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationEvidence"},"telemetry":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Asynchronous MCP evaluation run with retained per-test evidence."},"Workbench.WorkbenchEvaluationRunAccepted":{"type":"object","required":["run"],"properties":{"run":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"}},"unevaluatedProperties":{"not":{}},"description":"An MCP evaluation run was accepted and continues asynchronously."},"Workbench.WorkbenchEvaluationRunComparison":{"type":"object","required":["baseline_run_id","candidate_run_id","baseline","candidate","success_rate_delta","reliability_delta","tests","compared_at"],"properties":{"baseline_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"candidate_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"baseline":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"candidate":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"success_rate_delta":{"type":"number","format":"double"},"reliability_delta":{"type":"number","format":"double"},"p95_duration_delta_ms":{"type":"number","format":"double"},"token_delta":{"type":"integer","format":"int64"},"cost_delta_usd":{"type":"number","format":"double"},"tests":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestComparison"}},"compared_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate comparison of two completed MCP evaluation runs."},"Workbench.WorkbenchEvaluationRunId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one MCP evaluation run."},"Workbench.WorkbenchEvaluationRunPage":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of MCP evaluation runs."},"Workbench.WorkbenchEvaluationRunRequest":{"type":"object","required":["idempotency_key"],"properties":{"idempotency_key":{"type":"string","minLength":8,"maxLength":256},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationRequest"},"concurrency":{"type":"integer","format":"int32","minimum":1,"maximum":50,"default":1},"fail_fast":{"type":"boolean","default":false}},"description":"Request to execute one test case or suite asynchronously."},"Workbench.WorkbenchEvaluationRunStatus":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"description":"Lifecycle for an MCP evaluation run."},"Workbench.WorkbenchEvaluationSuiteSnapshot":{"type":"object","required":["id","name","test_case_ids","tags"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSuiteId"},"name":{"type":"string"},"description":{"type":"string"},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"}},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Immutable suite definition captured when an evaluation run starts."},"Workbench.WorkbenchEvaluationSummary":{"type":"object","required":["total","passed","failed","errors","skipped","success_rate","reliability"],"properties":{"total":{"type":"integer","format":"int32","minimum":0},"passed":{"type":"integer","format":"int32","minimum":0},"failed":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"skipped":{"type":"integer","format":"int32","minimum":0},"success_rate":{"$ref":"#/$defs/Common.Ratio"},"reliability":{"$ref":"#/$defs/Common.Ratio"},"mean_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p50_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p95_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p99_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"token_usage":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTokenUsage"},"cost":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCost"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate correctness, reliability, latency, usage, and cost for an MCP evaluation run."},"Workbench.WorkbenchEvaluationTestCaseSnapshot":{"type":"object","required":["id","server_id","name","tool_name","timeout_ms","assertions","tags"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string"},"description":{"type":"string"},"tool_name":{"type":"string"},"arguments":{},"timeout_ms":{"type":"integer","format":"int32"},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"}},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Immutable reusable-test definition captured when an evaluation run starts."},"Workbench.WorkbenchEvaluationTestComparison":{"type":"object","required":["test_case_id","status"],"properties":{"test_case_id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"status":{"$ref":"#/$defs/Workbench.WorkbenchRegressionStatus"},"baseline_status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"candidate_status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"duration_delta_ms":{"type":"number","format":"double"}},"unevaluatedProperties":{"not":{}},"description":"Per-test comparison across a baseline and candidate MCP evaluation run."},"Workbench.WorkbenchEvaluationTestResult":{"type":"object","required":["test_case","status","assertions"],"properties":{"test_case":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestCaseSnapshot"},"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchAssertionResult"}},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"One test-case result retained by an MCP evaluation run."},"Workbench.WorkbenchExactAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["exact"]},"path":{"type":"string"},"expected":{}},"unevaluatedProperties":{"not":{}},"description":"Exact JSON value assertion at an optional JSON Pointer path."},"Workbench.WorkbenchExecutionAccepted":{"type":"object","required":["execution"],"properties":{"execution":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"}},"unevaluatedProperties":{"not":{}},"description":"An MCP execution was accepted and continues asynchronously."},"Workbench.WorkbenchExecutionCancelRequest":{"type":"object","required":["idempotency_key"],"properties":{"reason":{"type":"string","maxLength":1000},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to cancel an asynchronous MCP execution where the transport permits cancellation."},"Workbench.WorkbenchExecutionConfirmationEvidence":{"type":"object","required":["acknowledged","acknowledgement","confirmed_at"],"properties":{"acknowledged":{"type":"boolean","enum":[true]},"acknowledgement":{"type":"string"},"confirmed_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Server-timestamped confirmation evidence persisted for a consequential MCP tool invocation."},"Workbench.WorkbenchExecutionConfirmationRequest":{"type":"object","required":["acknowledged","acknowledgement"],"properties":{"acknowledged":{"type":"boolean","enum":[true]},"acknowledgement":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Client acknowledgement supplied when requesting a consequential MCP tool invocation."},"Workbench.WorkbenchExecutionCost":{"type":"object","required":["amount_usd","estimated"],"properties":{"amount_usd":{"$ref":"#/$defs/Common.CostUsd"},"estimated":{"type":"boolean"},"source":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"USD cost reported or estimated for one MCP execution when available."},"Workbench.WorkbenchExecutionEffect":{"type":"string","enum":["read_only","consequential","unknown"],"description":"How consequential the workbench considers an MCP tool invocation."},"Workbench.WorkbenchExecutionId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one asynchronous MCP tool execution."},"Workbench.WorkbenchExecutionPage":{"type":"object","required":["executions"],"properties":{"executions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of MCP execution records."},"Workbench.WorkbenchExecutionRecord":{"type":"object","required":["id","workspace_id","server_id","request","effect","status","created_at","attempt_count","retry_count"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRequest"},"effect":{"$ref":"#/$defs/Workbench.WorkbenchExecutionEffect","description":"Server-derived effect from the SDK-validated discovered Tool and its annotations."},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationEvidence"},"status":{"$ref":"#/$defs/Workbench.WorkbenchExecutionStatus"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"attempt_count":{"type":"integer","format":"int32","minimum":0},"retry_count":{"type":"integer","format":"int32","minimum":0},"cancel_requested_at":{"type":"string","format":"date-time"},"cancelled_at":{"type":"string","format":"date-time"},"result":{"description":"Complete opaque SDK tool-call result after output sanitization."},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"},"token_usage":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTokenUsage"},"cost":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCost"},"telemetry":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"}},"unevaluatedProperties":{"not":{}},"description":"Persisted asynchronous execution evidence. SDK tool results remain opaque."},"Workbench.WorkbenchExecutionRequest":{"type":"object","required":["tool_name","timeout_ms","idempotency_key"],"properties":{"tool_name":{"type":"string","minLength":1},"arguments":{"description":"Opaque tool arguments validated against the SDK tool schema before execution."},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000,"default":30000},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationRequest"},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to asynchronously invoke one discovered MCP tool."},"Workbench.WorkbenchExecutionStatus":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled","timed_out"],"description":"Asynchronous MCP execution lifecycle."},"Workbench.WorkbenchExecutionTelemetryResponse":{"type":"object","required":["signals","correlation","traces","logs","queried_at","self_export_suppressed"],"properties":{"signals":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalSummary"},"correlation":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"},"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"queried_at":{"type":"string","format":"date-time"},"self_export_suppressed":{"type":"boolean","enum":[true],"description":"Confirms that workbench telemetry querying is excluded from workbench export instrumentation."}},"unevaluatedProperties":{"not":{}},"description":"Correlated Qyl observability evidence for one MCP execution. Signals unsupported by the connected Qyl read API are explicitly unavailable."},"Workbench.WorkbenchExecutionTokenUsage":{"type":"object","required":["estimated"],"properties":{"input_tokens":{"$ref":"#/$defs/Common.TokenCount"},"output_tokens":{"$ref":"#/$defs/Common.TokenCount"},"total_tokens":{"$ref":"#/$defs/Common.TokenCount"},"estimated":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Token usage reported or derived for one MCP execution when available."},"Workbench.WorkbenchExecutionUpdateEvents":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"},"Workbench.WorkbenchHeaderSecretReference":{"type":"object","required":["name","secret"],"properties":{"name":{"type":"string","minLength":1},"secret":{"$ref":"#/$defs/Workbench.WorkbenchSecretReference"},"scheme":{"$ref":"#/$defs/Workbench.WorkbenchHeaderSecretScheme","description":"Optional HTTP authentication scheme applied to the resolved secret. Omit for a raw header value."}},"unevaluatedProperties":{"not":{}},"description":"HTTP header whose value is resolved from a secret reference at connection time."},"Workbench.WorkbenchHeaderSecretScheme":{"type":"string","enum":["bearer","basic"],"description":"HTTP authentication scheme applied to an environment-resolved header secret."},"Workbench.WorkbenchInitializationSnapshot":{"type":"object","required":["initialized_at","protocol_version","server_identity","capabilities","result"],"properties":{"initialized_at":{"type":"string","format":"date-time"},"protocol_version":{"type":"string"},"server_identity":{"description":"Opaque SDK server-info entity."},"capabilities":{"description":"Opaque SDK server-capabilities entity."},"instructions":{"type":"string"},"session_info":{"description":"Opaque SDK session information when the transport exposes it."},"result":{"description":"Complete opaque SDK initialize result."}},"unevaluatedProperties":{"not":{}},"description":"SDK-validated MCP initialize result projected through a Qyl-owned connection snapshot."},"Workbench.WorkbenchLatencyAssertion":{"type":"object","required":["id","kind","max_duration_ms"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["latency"]},"max_duration_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Maximum execution latency assertion."},"Workbench.WorkbenchPartialAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["partial"]},"path":{"type":"string"},"expected":{}},"unevaluatedProperties":{"not":{}},"description":"Partial JSON object or array containment assertion at an optional JSON Pointer path."},"Workbench.WorkbenchPatternAssertion":{"type":"object","required":["id","kind","pattern"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["pattern"]},"path":{"type":"string"},"pattern":{"type":"string"},"flags":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Regular-expression assertion at an optional JSON Pointer path."},"Workbench.WorkbenchPrincipalIdentity":{"type":"object","required":["id","local"],"properties":{"id":{"type":"string"},"display_name":{"type":"string"},"local":{"type":"boolean","enum":[true]}},"unevaluatedProperties":{"not":{}},"description":"Authenticated local principal metadata. No credential or session token is represented here."},"Workbench.WorkbenchProtocolDirection":{"type":"string","enum":["client_to_server","server_to_client","local"],"description":"Direction of a captured MCP protocol or transport event."},"Workbench.WorkbenchProtocolEvent":{"type":"object","required":["id","server_id","direction","kind","timestamp","redaction_applied"],"properties":{"id":{"type":"string"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"direction":{"$ref":"#/$defs/Workbench.WorkbenchProtocolDirection"},"kind":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEventKind"},"method":{"type":"string"},"request_id":{"description":"Opaque JSON-RPC request identifier, which may be a string or number."},"timestamp":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"payload":{"description":"Opaque SDK message or transport payload after credential and secret redaction."},"redaction_applied":{"type":"boolean","enum":[true]},"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"trace_id":{"$ref":"#/$defs/Common.TraceId"}},"unevaluatedProperties":{"not":{}},"description":"Chronological diagnostic event carrying only a redacted opaque SDK message or local transport payload."},"Workbench.WorkbenchProtocolEventKind":{"type":"string","enum":["request","response","notification","error","transport"],"description":"Kind of captured MCP protocol or transport event."},"Workbench.WorkbenchProtocolEventPage":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of chronological MCP protocol diagnostic events."},"Workbench.WorkbenchProtocolEvents":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"},"Workbench.WorkbenchRegressionStatus":{"type":"string","enum":["improved","regressed","unchanged","added","removed"],"description":"Regression classification for one test case across two evaluation runs."},"Workbench.WorkbenchSchemaAssertion":{"type":"object","required":["id","kind","schema"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["schema"]},"path":{"type":"string"},"schema":{}},"unevaluatedProperties":{"not":{}},"description":"JSON Schema assertion at an optional JSON Pointer path."},"Workbench.WorkbenchSecretReference":{"type":"object","required":["source","environment_variable"],"properties":{"source":{"type":"string","enum":["environment"]},"environment_variable":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"unevaluatedProperties":{"not":{}},"description":"Reference to a secret resolved from the workbench environment. The environment value is never part of this contract."},"Workbench.WorkbenchServer":{"type":"object","required":["id","workspace_id","name","configuration","connection","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"},"connection":{"$ref":"#/$defs/Workbench.WorkbenchConnectionSnapshot"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Persisted sanitized MCP server configuration and current runtime connection state."},"Workbench.WorkbenchServerActionAccepted":{"type":"object","required":["server"],"properties":{"server":{"$ref":"#/$defs/Workbench.WorkbenchServer"}},"unevaluatedProperties":{"not":{}},"description":"An MCP server connection action was accepted and continues asynchronously."},"Workbench.WorkbenchServerConfiguration":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchStdioServerConfiguration"},{"$ref":"#/$defs/Workbench.WorkbenchStreamableHttpServerConfiguration"},{"$ref":"#/$defs/Workbench.WorkbenchBuiltinServerConfiguration"}],"description":"Exactly one sanitized MCP server transport configuration."},"Workbench.WorkbenchServerCreateRequest":{"type":"object","required":["name","configuration"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"},"auto_connect":{"type":"boolean","default":false}},"unevaluatedProperties":{"not":{}},"description":"Request to add an MCP server configuration to a workspace."},"Workbench.WorkbenchServerId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one configured MCP server."},"Workbench.WorkbenchServerListResponse":{"type":"object","required":["servers"],"properties":{"servers":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchServer"}}},"unevaluatedProperties":{"not":{}},"description":"Configured MCP servers in one authenticated workspace."},"Workbench.WorkbenchServerUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"}},"unevaluatedProperties":{"not":{}},"description":"Request to replace mutable MCP server metadata or its complete sanitized transport configuration."},"Workbench.WorkbenchSession":{"type":"object","required":["id","principal","workspace_ids","created_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSessionId"},"principal":{"$ref":"#/$defs/Workbench.WorkbenchPrincipalIdentity"},"workspace_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"}},"active_workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"description":"Metadata for the authenticated local workbench session. The HttpOnly session cookie is never returned in this model."},"Workbench.WorkbenchSessionBootstrapResponse":{"type":"object","unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchSession"}],"description":"Loopback session bootstrap response. The cookie value is carried only in Set-Cookie and never in the JSON body."},"Workbench.WorkbenchSessionId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one authenticated local workbench session.\\n\\nDeliberately not Qyl.Api.Contracts.Common.SessionId, and not joinable with it.\\nA workbench session is a loopback browser session owned by the local runner: it\\nbegins at cookie bootstrap, ends at logout or expiry, and never leaves the\\nmachine. A Common.SessionId is an OTel telemetry session observed in ingested\\nspans, owned by the instrumented application, with its own lifetime and its own\\ncontinuity chain. The two have no common issuer, so equal values would be\\ncoincidence. Correlate a workbench execution to telemetry through\\nWorkbenchTelemetryCorrelation.traceIds, never by comparing session identifiers."},"Workbench.WorkbenchStatusAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["status"]},"expected":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionStatus"},"minItems":1}},"unevaluatedProperties":{"not":{}},"description":"Execution-status assertion for an MCP test case."},"Workbench.WorkbenchStdioServerConfiguration":{"type":"object","required":["transport","command"],"properties":{"transport":{"type":"string","enum":["stdio"]},"command":{"type":"string","minLength":1},"arguments":{"type":"array","items":{"type":"string"}},"working_directory":{"type":"string"},"environment":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEnvironmentSecretReference"}}},"unevaluatedProperties":{"not":{}},"description":"Sanitized local stdio transport configuration. Arguments must not contain secrets."},"Workbench.WorkbenchStreamableHttpServerConfiguration":{"type":"object","required":["transport","endpoint"],"properties":{"transport":{"type":"string","enum":["streamable_http"]},"endpoint":{"type":"string","format":"uri"},"headers":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchHeaderSecretReference"}}},"unevaluatedProperties":{"not":{}},"description":"Sanitized MCP Streamable HTTP transport configuration."},"Workbench.WorkbenchSuiteId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one reusable MCP test suite."},"Workbench.WorkbenchSuiteRunRequest":{"type":"object","properties":{"selected_test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunRequest"}],"description":"Request to run a complete suite or an explicit subset of its persisted test cases asynchronously."},"Workbench.WorkbenchTelemetryAvailability":{"type":"string","enum":["available","partial","unavailable"],"description":"Whether correlated Qyl observability evidence was available."},"Workbench.WorkbenchTelemetryCorrelation":{"type":"object","required":["trace_ids","span_ids"],"properties":{"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"evaluation_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"test_case_id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"trace_ids":{"type":"array","items":{"$ref":"#/$defs/Common.TraceId"}},"span_ids":{"type":"array","items":{"$ref":"#/$defs/Common.SpanId"}}},"unevaluatedProperties":{"not":{}},"description":"Qyl observability identifiers correlating workbench, MCP, and downstream activity."},"Workbench.WorkbenchTelemetrySignalAvailability":{"type":"object","required":["status","item_count"],"properties":{"status":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryAvailability"},"unavailable_reason":{"type":"string"},"item_count":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Availability and retained item count for one correlated Qyl telemetry signal."},"Workbench.WorkbenchTelemetrySignalSummary":{"type":"object","required":["traces","logs","exceptions","tool_call_events"],"properties":{"traces":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"logs":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"exceptions":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"tool_call_events":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"}},"unevaluatedProperties":{"not":{}},"description":"Per-signal availability for correlated workbench observability evidence."},"Workbench.WorkbenchTestAssertion":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchStatusAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchExactAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchPartialAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchSchemaAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchPatternAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchLatencyAssertion"}],"description":"Exactly one supported MCP evaluation assertion."},"Workbench.WorkbenchTestCase":{"type":"object","required":["id","workspace_id","server_id","name","tool_name","timeout_ms","assertions","tags","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string"},"description":{"type":"string"},"tool_name":{"type":"string"},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"}},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Reusable tool invocation and assertions persisted in one workspace."},"Workbench.WorkbenchTestCaseCreateRequest":{"type":"object","required":["server_id","name","tool_name","timeout_ms","assertions"],"properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"tool_name":{"type":"string","minLength":1},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000,"default":30000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to create a reusable MCP test case."},"Workbench.WorkbenchTestCaseId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one reusable MCP test case."},"Workbench.WorkbenchTestCasePage":{"type":"object","required":["test_cases"],"properties":{"test_cases":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of reusable MCP test cases."},"Workbench.WorkbenchTestCaseRunRequest":{"type":"object","unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunRequest"}],"description":"Request to run one persisted MCP test case asynchronously."},"Workbench.WorkbenchTestCaseUpdateRequest":{"type":"object","properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"tool_name":{"type":"string","minLength":1},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP test-case fields."},"Workbench.WorkbenchTestSuite":{"type":"object","required":["id","workspace_id","name","test_case_ids","tags","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSuiteId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"name":{"type":"string"},"description":{"type":"string"},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Reusable ordered group of MCP test cases."},"Workbench.WorkbenchTestSuiteCreateRequest":{"type":"object","required":["name","test_case_ids"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to create a reusable MCP test suite."},"Workbench.WorkbenchTestSuitePage":{"type":"object","required":["suites"],"properties":{"suites":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of reusable MCP test suites."},"Workbench.WorkbenchTestSuiteUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP test-suite fields."},"Workbench.WorkbenchToolInputMode":{"type":"string","enum":["form","json"],"description":"Preferred tool-argument editor for one authenticated workspace."},"Workbench.WorkbenchTransportKind":{"type":"string","enum":["stdio","streamable_http","builtin"],"description":"Supported MCP server transport owned by the local workbench."},"Workbench.WorkbenchWorkspace":{"type":"object","required":["id","owner_id","name","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"owner_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One isolated MCP workbench workspace owned by the authenticated local principal."},"Workbench.WorkbenchWorkspaceCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000}},"unevaluatedProperties":{"not":{}},"description":"Request to create an isolated MCP workbench workspace."},"Workbench.WorkbenchWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one MCP workbench workspace."},"Workbench.WorkbenchWorkspaceListResponse":{"type":"object","required":["workspaces"],"properties":{"workspaces":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"}}},"unevaluatedProperties":{"not":{}},"description":"Workspaces visible to the authenticated local session."},"Workbench.WorkbenchWorkspacePreferences":{"type":"object","required":["workspace_id","input_mode","compact_mode","updated_at"],"properties":{"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"selected_server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"selected_tool_name":{"type":"string","maxLength":1024},"input_mode":{"$ref":"#/$defs/Workbench.WorkbenchToolInputMode"},"active_panel":{"type":"string","maxLength":128},"compact_mode":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Saved presentation preferences isolated to one authenticated MCP workspace."},"Workbench.WorkbenchWorkspacePreferencesUpdateRequest":{"type":"object","properties":{"selected_server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"selected_tool_name":{"type":"string","maxLength":1024},"input_mode":{"$ref":"#/$defs/Workbench.WorkbenchToolInputMode"},"active_panel":{"type":"string","maxLength":128},"compact_mode":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Request to replace saved presentation preferences for one authenticated MCP workspace."},"Workbench.WorkbenchWorkspaceUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP workbench workspace metadata."},"Workflow.DerivedWorkflowEdgeProvenance":{"type":"object","required":["type","event_ids","evidence","confidence"],"properties":{"type":{"type":"string","enum":["derived"]},"event_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"minItems":1},"evidence":{"type":"string"},"confidence":{"$ref":"#/$defs/Common.Ratio"}},"unevaluatedProperties":{"not":{}},"description":"Derived edge provenance with explicit evidence and confidence."},"Workflow.RecordedWorkflowEdgeProvenance":{"type":"object","required":["type","event_ids"],"properties":{"type":{"type":"string","enum":["recorded"]},"event_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"minItems":1}},"unevaluatedProperties":{"not":{}},"description":"Recorded edge provenance directly observed from Codex."},"Workflow.WorkflowAgentId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one agent within a workflow run."},"Workflow.WorkflowAgentStatus":{"type":"string","enum":["pending","running","waiting","succeeded","failed","interrupted"],"description":"Current lifecycle of an observed workflow agent."},"Workflow.WorkflowAttemptId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one workflow attempt."},"Workflow.WorkflowAttemptStatus":{"type":"string","enum":["pending","running","succeeded","failed","interrupted"],"description":"Current lifecycle of one workflow attempt."},"Workflow.WorkflowCommandId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one run-level control command."},"Workflow.WorkflowContent":{"type":"object","required":["content_ref","content_type","encoding","content","size_bytes"],"properties":{"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"content_type":{"$ref":"#/$defs/Common.ContentType"},"encoding":{"$ref":"#/$defs/Workflow.WorkflowContentEncoding"},"content":{"type":"string"},"size_bytes":{"$ref":"#/$defs/Common.ByteSize"}},"unevaluatedProperties":{"not":{}},"description":"Lazily retrieved captured workflow content."},"Workflow.WorkflowContentChunk":{"type":"object","required":["content_ref","content_type","encoding","content"],"properties":{"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"content_type":{"$ref":"#/$defs/Common.ContentType"},"encoding":{"$ref":"#/$defs/Workflow.WorkflowContentEncoding"},"content":{"type":"string","maxLength":1398104,"description":"UTF-8 text or base64 bytes, according to encoding."}},"unevaluatedProperties":{"not":{}},"description":"One captured payload supplied with an append batch."},"Workflow.WorkflowContentEncoding":{"type":"string","enum":["utf8","base64"],"description":"Encoding used when lazily returning captured workflow content."},"Workflow.WorkflowContentRef":{"type":"string","minLength":71,"maxLength":71,"pattern":"^sha256:[a-f0-9]{64}$","description":"Content-addressed reference to a captured workflow payload."},"Workflow.WorkflowControlAction":{"type":"string","enum":["steer","interrupt","resume"],"description":"Control operation supported by the Codex app-server boundary."},"Workflow.WorkflowControlCommand":{"type":"object","required":["command_id","run_id","action","status","idempotency_key","requested_at","updated_at","command_sequence"],"properties":{"command_id":{"$ref":"#/$defs/Workflow.WorkflowCommandId"},"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"status":{"$ref":"#/$defs/Workflow.WorkflowControlStatus"},"idempotency_key":{"type":"string"},"input":{"type":"string"},"requested_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"command_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"error":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Durable run-level control command."},"Workflow.WorkflowControlCommandPage":{"type":"object","required":["commands","next_sequence"],"properties":{"commands":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"}},"next_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"}},"unevaluatedProperties":{"not":{}},"description":"Page of control commands polled by the launcher-owned outbound adapter."},"Workflow.WorkflowControlRequest":{"type":"object","required":["action","idempotency_key"],"properties":{"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"idempotency_key":{"type":"string","minLength":1,"maxLength":160},"input":{"type":"string","maxLength":32768,"description":"Text appended by steer or resume. Omit for interrupt."}},"unevaluatedProperties":{"not":{}},"description":"Request to enqueue one idempotent run-level control command."},"Workflow.WorkflowControlStatus":{"type":"string","enum":["requested","accepted","applied","rejected","failed"],"description":"Durable lifecycle of a workflow control command."},"Workflow.WorkflowControlStatusUpdateRequest":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/$defs/Workflow.WorkflowControlStatus"},"error":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","description":"When the reported transition actually occurred at the adapter that executed\\nit. The journal event minted for this transition carries this clock — the\\noriginating agent's — so control events order and measure consistently with\\nthe agent-clocked events around them; omitted, the collector's receipt time\\nis the fallback."}},"unevaluatedProperties":{"not":{}},"description":"Adapter acknowledgement or terminal result for one control command."},"Workflow.WorkflowCursorGapEvent":{"type":"object","required":["type","oldest_available_sequence","high_water_mark","timestamp"],"properties":{"type":{"type":"string","enum":["cursor_gap"]},"oldest_available_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Signals that the requested cursor predates retained workflow history."},"Workflow.WorkflowEdgeKind":{"type":"string","enum":["data","control","conflict","resource","gate","temporal"],"description":"Semantic relationship represented by a workflow graph edge."},"Workflow.WorkflowEdgeProvenance":{"anyOf":[{"$ref":"#/$defs/Workflow.RecordedWorkflowEdgeProvenance"},{"$ref":"#/$defs/Workflow.DerivedWorkflowEdgeProvenance"}],"description":"Provenance for one workflow graph edge."},"Workflow.WorkflowEventAppend":{"type":"object","required":["event_id","source_sequence","timestamp","kind"],"properties":{"event_id":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"source_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"timestamp":{"type":"string","format":"date-time"},"kind":{"$ref":"#/$defs/Workflow.WorkflowJournalEventKind"},"thread_id":{"type":"string"},"turn_id":{"type":"string"},"attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"parent_agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"receiver_agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"tool_call_id":{"$ref":"#/$defs/Workflow.WorkflowToolCallId"},"content_refs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"maxItems":64},"data":{"type":"object","unevaluatedProperties":{}}},"description":"One source-ordered immutable journal event awaiting collector sequence assignment."},"Workflow.WorkflowEventBatchAppendRequest":{"type":"object","required":["client_id","events"],"properties":{"client_id":{"type":"string","minLength":1,"maxLength":128},"events":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventAppend"},"minItems":1,"maxItems":500},"content":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentChunk"},"maxItems":500}},"unevaluatedProperties":{"not":{}},"description":"Idempotent append batch from one observer client."},"Workflow.WorkflowEventBatchAppendResponse":{"type":"object","required":["accepted_count","duplicate_count","acknowledged_source_sequence"],"properties":{"accepted_count":{"type":"integer","format":"int32","minimum":0},"duplicate_count":{"type":"integer","format":"int32","minimum":0},"acknowledged_source_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"first_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"last_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"}},"unevaluatedProperties":{"not":{}},"description":"Collector acknowledgement for an idempotent workflow-event append."},"Workflow.WorkflowEventId":{"type":"string","minLength":1,"maxLength":160,"description":"Stable identifier of one immutable journal event."},"Workflow.WorkflowEventPage":{"type":"object","required":["events","next_sequence","high_water_mark","cursor_gap"],"properties":{"events":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowJournalEvent"}},"next_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"cursor_gap":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"A bounded page of workflow journal events."},"Workflow.WorkflowGraphEdge":{"type":"object","required":["edge_id","source_node_id","target_node_id","kind","provenance"],"properties":{"edge_id":{"type":"string"},"source_node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"target_node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"kind":{"$ref":"#/$defs/Workflow.WorkflowEdgeKind"},"provenance":{"$ref":"#/$defs/Workflow.WorkflowEdgeProvenance"}},"unevaluatedProperties":{"not":{}},"description":"One typed edge in the deterministic workflow graph projection."},"Workflow.WorkflowGraphNode":{"type":"object","required":["node_id","kind","label","status"],"properties":{"node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"kind":{"$ref":"#/$defs/Workflow.WorkflowNodeKind"},"label":{"type":"string"},"status":{"type":"string"},"attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"parent_node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"content_refs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentRef"}},"attributes":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"One node in the deterministic workflow graph projection."},"Workflow.WorkflowGraphSnapshot":{"type":"object","required":["run","nodes","edges","statistics","journal_sequence","has_more_nodes","has_more_edges","total_node_count","total_edge_count"],"properties":{"run":{"$ref":"#/$defs/Workflow.WorkflowRun"},"nodes":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowGraphNode"}},"edges":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowGraphEdge"}},"statistics":{"$ref":"#/$defs/Workflow.WorkflowGraphStatistics"},"journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"next_node_cursor":{"type":"string"},"next_edge_cursor":{"type":"string"},"has_more_nodes":{"type":"boolean"},"has_more_edges":{"type":"boolean"},"total_node_count":{"type":"integer","format":"int32","minimum":0},"total_edge_count":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Deterministic graph projection at one journal cursor."},"Workflow.WorkflowGraphStatistics":{"type":"object","required":["t1_ms","t_infinity_ms","wall_time_ms","peak_concurrency","worker_count","parallel_lower_bound_ms","critical_path_node_ids"],"properties":{"t1_ms":{"$ref":"#/$defs/Common.DurationMs"},"t_infinity_ms":{"$ref":"#/$defs/Common.DurationMs"},"wall_time_ms":{"$ref":"#/$defs/Common.DurationMs"},"peak_concurrency":{"type":"integer","format":"int32","minimum":0},"worker_count":{"type":"integer","format":"int32","minimum":1},"parallel_lower_bound_ms":{"$ref":"#/$defs/Common.DurationMs"},"critical_path_node_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowNodeId"}}},"unevaluatedProperties":{"not":{}},"description":"Work and critical-path statistics for a workflow graph."},"Workflow.WorkflowHeartbeatEvent":{"type":"object","required":["type","high_water_mark","timestamp"],"properties":{"type":{"type":"string","enum":["heartbeat"]},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Keep-alive emitted while a workflow event stream has no new event."},"Workflow.WorkflowJournalEvent":{"type":"object","required":["run_id","client_id","journal_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"client_id":{"type":"string"},"journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workflow.WorkflowEventAppend"}],"description":"One immutable event after collector journal sequence assignment."},"Workflow.WorkflowJournalEventKind":{"type":"string","enum":["run_created","run_completed","thread_started","thread_resumed","turn_started","turn_completed","turn_interrupted","attempt_started","attempt_completed","agent_spawned","agent_started","agent_completed","message_sent","message_received","wait_started","wait_completed","joined","item_started","item_completed","tool_started","tool_completed","approval_requested","approval_resolved","content_captured","file_written","control_requested","control_accepted","control_applied","control_rejected","control_failed"],"description":"Immutable journal event kinds accepted from a Codex observer."},"Workflow.WorkflowNodeId":{"type":"string","minLength":1,"maxLength":192,"description":"Stable identifier of one graph node."},"Workflow.WorkflowNodeKind":{"type":"string","enum":["run","attempt","turn","agent","tool_call","message","wait","gate","resource"],"description":"Kinds of execution node in the deterministic workflow graph."},"Workflow.WorkflowRun":{"type":"object","required":["run_id","status","started_at","latest_journal_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"thread_id":{"type":"string"},"title":{"type":"string"},"status":{"$ref":"#/$defs/Workflow.WorkflowRunStatus"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"latest_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"active_attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"metadata":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"One immutable workflow run."},"Workflow.WorkflowRunCreateRequest":{"type":"object","required":["run_id","started_at"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"thread_id":{"type":"string"},"title":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"metadata":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"Request to create an observed workflow run before appending journal events."},"Workflow.WorkflowRunId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one observed Codex workflow run."},"Workflow.WorkflowRunPage":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowRun"}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of workflow runs."},"Workflow.WorkflowRunStatus":{"type":"string","enum":["active","completed","failed","interrupted"],"description":"Current lifecycle of a workflow run."},"Workflow.WorkflowSequence":{"type":"string","format":"uint64","description":"Unsigned source or collector journal sequence encoded without JavaScript precision loss.","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Workflow.WorkflowStreamEvents":{"anyOf":[{"$ref":"#/$defs/Workflow.WorkflowJournalEvent"},{"$ref":"#/$defs/Workflow.WorkflowHeartbeatEvent"},{"$ref":"#/$defs/Workflow.WorkflowCursorGapEvent"}]},"Workflow.WorkflowToolCallId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one tool call within a workflow run."},"Workflow.WorkflowToolCallStatus":{"type":"string","enum":["requested","running","succeeded","failed","rejected"],"description":"Current lifecycle of an observed tool call."},"Operations.LogsApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.LogsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.LogsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.LogsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_logs.Response.200":{"type":"array","items":{"$ref":"#/$defs/Runner.RunnerLogLine"}},"Operations.RunnerResourcesApi_logs.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_logs.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_logs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_logs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_restart.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_restart.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_restart.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.RunnerResourcesApi_restart.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_restart.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_snapshot.Response.200":{"type":"array","items":{"$ref":"#/$defs/Runner.RunnerResourceState"}},"Operations.RunnerResourcesApi_snapshot.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_snapshot.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_snapshot.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_stop.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_stop.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_stop.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.RunnerResourcesApi_stop.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_stop.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_stream.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_stream.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_stream.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_streamLogs.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_streamLogs.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_streamLogs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_streamLogs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.SessionsApi_get.Response.200":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"},"Operations.SessionsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.SessionsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_getStats.Response.200":{"$ref":"#/$defs/Domains.Observe.Session.SessionStats"},"Operations.SessionsApi_getStats.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.SessionsApi_getStats.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_getStats.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_getTraces.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.SessionsApi_getTraces.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_getTraces.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.SessionsApi_getTraces.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.SessionsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.SessionsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.StreamingApi_streamLogs.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.StreamingApi_streamLogs.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.StreamingApi_streamLogs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.StreamingApi_streamLogs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.TracesApi_get.Response.200":{"$ref":"#/$defs/OTel.Traces.Trace"},"Operations.TracesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.TracesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.TracesApi_getSpans.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Span"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.TracesApi_getSpans.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_getSpans.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.TracesApi_getSpans.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.TracesApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.TracesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.TracesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_compare.Request":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationComparisonRequest"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunComparison"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_export.Request":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportRequest"},"Operations.WorkbenchEvaluationRunsApi_export.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportAccepted"},"Operations.WorkbenchEvaluationRunsApi_export.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"},"Operations.WorkbenchEvaluationRunsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportArtifact"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunPage"},"Operations.WorkbenchEvaluationRunsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_cancel.Request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCancelRequest"},"Operations.WorkbenchExecutionsApi_cancel.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchExecutionAccepted"},"Operations.WorkbenchExecutionsApi_cancel.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_cancel.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_cancel.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_cancel.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_cancel.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchExecutionsApi_cancel.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_cancel.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"},"Operations.WorkbenchExecutionsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionPage"},"Operations.WorkbenchExecutionsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_start.Request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRequest"},"Operations.WorkbenchExecutionsApi_start.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchExecutionAccepted"},"Operations.WorkbenchExecutionsApi_start.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_start.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_start.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_start.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_start.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchExecutionsApi_start.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_start.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchExecutionsApi_start.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTelemetryResponse"},"Operations.WorkbenchExecutionsApi_telemetry.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_connect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_connect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_connect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_connect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_connect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_connect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_connect.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_connect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchServerCreateRequest"},"Operations.WorkbenchServersApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_disconnect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_disconnect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_disconnect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_disconnect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_disconnect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_disconnect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_disconnect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_discovery.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchDiscoverySnapshot"},"Operations.WorkbenchServersApi_discovery.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_discovery.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_discovery.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_discovery.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_discovery.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_discovery.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_discovery.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServerListResponse"},"Operations.WorkbenchServersApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_protocolEvents.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEventPage"},"Operations.WorkbenchServersApi_protocolEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_protocolEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_protocolEvents.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_protocolEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_protocolEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_protocolEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_reconnect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_reconnect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_reconnect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_reconnect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_reconnect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_reconnect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_reconnect.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_reconnect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchDiscoverySnapshot"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchServerUpdateRequest"},"Operations.WorkbenchServersApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSessionApi_bootstrap.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchSessionBootstrapResponse"},"Operations.WorkbenchSessionApi_bootstrap.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSessionApi_bootstrap.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSessionApi_bootstrap.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSessionApi_bootstrap.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSessionApi_bootstrap.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSessionApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchSession"},"Operations.WorkbenchSessionApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSessionApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSessionApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSessionApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestSuiteCreateRequest"},"Operations.WorkbenchSuitesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuitePage"},"Operations.WorkbenchSuitesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_run.Request":{"$ref":"#/$defs/Workbench.WorkbenchSuiteRunRequest"},"Operations.WorkbenchSuitesApi_run.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunAccepted"},"Operations.WorkbenchSuitesApi_run.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_run.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_run.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_run.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_run.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_run.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_run.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestSuiteUpdateRequest"},"Operations.WorkbenchSuitesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseCreateRequest"},"Operations.WorkbenchTestCasesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCasePage"},"Operations.WorkbenchTestCasesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_run.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseRunRequest"},"Operations.WorkbenchTestCasesApi_run.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunAccepted"},"Operations.WorkbenchTestCasesApi_run.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_run.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_run.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_run.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_run.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_run.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_run.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseUpdateRequest"},"Operations.WorkbenchTestCasesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceCreateRequest"},"Operations.WorkbenchWorkspacesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferences"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceListResponse"},"Operations.WorkbenchWorkspacesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceUpdateRequest"},"Operations.WorkbenchWorkspacesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferencesUpdateRequest"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferences"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_appendEvents.Request":{"$ref":"#/$defs/Workflow.WorkflowEventBatchAppendRequest"},"Operations.WorkflowRunsApi_appendEvents.Response.200":{"$ref":"#/$defs/Workflow.WorkflowEventBatchAppendResponse"},"Operations.WorkflowRunsApi_appendEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_appendEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_appendEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_appendEvents.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_appendEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_appendEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_create.Request":{"$ref":"#/$defs/Workflow.WorkflowRunCreateRequest"},"Operations.WorkflowRunsApi_create.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRun"},"Operations.WorkflowRunsApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_get.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRun"},"Operations.WorkflowRunsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_getContent.Response.200":{"$ref":"#/$defs/Workflow.WorkflowContent"},"Operations.WorkflowRunsApi_getContent.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_getContent.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_getContent.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_getContent.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_getGraph.Response.200":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"Operations.WorkflowRunsApi_getGraph.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_getGraph.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_getGraph.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_getGraph.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_getGraph.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_list.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRunPage"},"Operations.WorkflowRunsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_pollControls.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommandPage"},"Operations.WorkflowRunsApi_pollControls.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_pollControls.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_pollControls.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_pollControls.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_pollControls.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_readEvents.Response.200":{"$ref":"#/$defs/Workflow.WorkflowEventPage"},"Operations.WorkflowRunsApi_readEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_readEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_readEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_readEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_readEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_stream.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_stream.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_stream.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_stream.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_stream.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_submitControl.Request":{"$ref":"#/$defs/Workflow.WorkflowControlRequest"},"Operations.WorkflowRunsApi_submitControl.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"},"Operations.WorkflowRunsApi_submitControl.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_submitControl.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_submitControl.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_submitControl.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_submitControl.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_submitControl.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_updateControl.Request":{"$ref":"#/$defs/Workflow.WorkflowControlStatusUpdateRequest"},"Operations.WorkflowRunsApi_updateControl.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"},"Operations.WorkflowRunsApi_updateControl.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_updateControl.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_updateControl.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_updateControl.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_updateControl.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_updateControl.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.health_alive.Response.200":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_alive.Response.503":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_ready.Response.200":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_ready.Response.503":{"$ref":"#/$defs/Health.HealthReport"}}`)},Zg=(()=>{let e=os({offset:!0}).def.pattern;if(!(e instanceof RegExp))throw Error(`Zod offset-aware date-time validator did not expose a pattern`);return e.source})();function Qg(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema root must be an object`);let t=e,n=t_(t.$defs,`$defs`),r=new Map,i=new Set,a=e=>{let t=r.get(e);if(t)return t;if(i.has(e))throw Error(`Published Qyl JSON Schema has an inheritance cycle at '${e}'`);let a=n[e];if(a===void 0)throw Error(`Published Qyl JSON Schema is missing definition '${e}'`);i.add(e);let s=o(a);return i.delete(e),r.set(e,s),s},o=e=>{if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Expected a JSON Schema object node`);let t=e,n=$g(t,a),r={};if(n.length>0){let e;for(let t of n){let n=n_(r.properties),i=n_(t.properties),a=r_(r.required),o=r_(t.required);Object.assign(r,t),r.properties={...n,...i},r.required=[...new Set([...a,...o])],e=t.additionalProperties}delete r.description,delete r.additionalProperties;for(let[e,n]of Object.entries(t))e===`allOf`||e===`properties`||e===`required`||e===`unevaluatedProperties`||(r[e]=s(n));r.properties={...n_(r.properties),...c(t.properties)};let i=[...new Set([...r_(r.required),...r_(t.required)])];i.length>0?r.required=i:delete r.required,`unevaluatedProperties`in t?r.additionalProperties=l(t.unevaluatedProperties):e!==void 0&&(r.additionalProperties=e)}else{for(let[e,n]of Object.entries(t))e!==`unevaluatedProperties`&&(r[e]=s(n));`unevaluatedProperties`in t&&(r.additionalProperties=l(t.unevaluatedProperties))}return t.type===`integer`&&(t.format===`int64`||t.format===`uint64`)&&(r.type=`number`,r.multipleOf=1,delete r.format),t.type===`string`&&t.format===`date-time`&&(r.pattern=Zg,delete r.format),r},s=e=>Array.isArray(e)?e.map(s):typeof e==`object`&&e?o(e):e,c=e=>{let t=n_(e);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,s(t)]))},l=e=>!i_(e)&&s(e),u={...t};delete u.$defs;let d=o(u);return d.$defs=Object.fromEntries(Object.keys(n).map(e=>[e,a(e)])),d}function $g(e,t){if(e.type!==`object`||!Array.isArray(e.allOf))return[];let n=e.allOf.map(e=>e_(e));if(n.some(e=>e===void 0))return[];let r=n.map(e=>t(e));return r.every(e=>e.type===`object`)?r:[]}function e_(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e;if(!(Object.keys(t).length!==1||typeof t.$ref!=`string`))return t.$ref.startsWith(`#/$defs/`)?t.$ref.slice(8):void 0}function t_(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema ${t} must be an object`);return e}function n_(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function r_(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:[]}function i_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e,n=t.not;return Object.keys(t).length===1&&typeof n==`object`&&!!n&&!Array.isArray(n)&&Object.keys(n).length===0}var a_=Qg(Xg),o_=new Map;function Y(e){let t=o_.get(e);if(t)return t;if(!(e in a_.$defs))throw Error(`Published Qyl JSON Schema has no '${e}' definition`);let n=wu({$schema:a_.$schema,$defs:a_.$defs,$ref:`#/$defs/${e}`});return o_.set(e,n),n}function X(e){return Y(`Workbench.${e}`)}Y(`OTel.Traces.Span`),Y(`OTel.Traces.TraceSummary`),Y(`OTel.Traces.Trace`),Y(`OTel.Logs.LogRecord`),Y(`Domains.Observe.Session.SessionEntity`),Y(`Operations.TracesApi_list.Response.200`),Y(`Operations.TracesApi_getSpans.Response.200`),Y(`Operations.SessionsApi_getTraces.Response.200`),Y(`Operations.LogsApi_list.Response.200`),Y(`Operations.SessionsApi_list.Response.200`),Y(`Common.Errors.ProblemDetails`),Y(`Mcp.Tools.McpDataMode`),Y(`Mcp.Tools.McpDashboardStats`),Y(`Mcp.Tools.DisplayTracesInput`),Y(`Mcp.Tools.DisplayTracesOutput`),Y(`Mcp.Tools.DisplayMcpDashboardInput`),Y(`Mcp.Tools.DisplayMcpDashboardOutput`),Y(`Mcp.Tools.ListTracesInput`),Y(`Mcp.Tools.ListTracesOutput`),Y(`Mcp.Tools.GetTraceInput`),Y(`Mcp.Tools.GetTraceOutput`),Y(`Mcp.Tools.ListSessionsInput`),Y(`Mcp.Tools.ListSessionsOutput`),Y(`Mcp.Tools.SearchLogsInput`),Y(`Mcp.Tools.SearchLogsOutput`),Y(`Mcp.Tools.FetchTelemetryInput`),Y(`Mcp.Tools.FetchTelemetryOutput`),Y(`Mcp.Tools.CiLogInput`),Y(`Mcp.Tools.CiRunSummary`),Y(`Mcp.Tools.CiPhase`),Y(`Mcp.Tools.CiLogOutput`),Y(`Workflow.WorkflowRun`),Y(`Operations.WorkflowRunsApi_list.Response.200`),Y(`Operations.WorkflowRunsApi_readEvents.Response.200`),Y(`Operations.WorkflowRunsApi_getGraph.Response.200`),Y(`Operations.WorkflowRunsApi_getContent.Response.200`),Y(`Operations.WorkflowRunsApi_submitControl.Response.200`),Y(`Mcp.Tools.ListWorkflowRunsInput`),Y(`Mcp.Tools.ListWorkflowRunsOutput`),Y(`Mcp.Tools.GetWorkflowGraphInput`),Y(`Mcp.Tools.GetWorkflowGraphOutput`),Y(`Mcp.Tools.DisplayWorkflowGraphInput`);var s_=Y(`Mcp.Tools.DisplayWorkflowGraphOutput`);Y(`Mcp.Tools.FetchWorkflowGraphUpdatesInput`);var c_=Y(`Mcp.Tools.FetchWorkflowGraphUpdatesOutput`);Y(`Mcp.Tools.ControlWorkflowRunInput`);var l_=Y(`Mcp.Tools.ControlWorkflowRunOutput`);Y(`Runner.RunnerResourceState`),Y(`Runner.RunnerLogLine`),X(`WorkbenchSessionId`),X(`WorkbenchWorkspaceId`),X(`WorkbenchServerId`),X(`WorkbenchExecutionId`),X(`WorkbenchEvaluationRunId`),X(`WorkbenchTestCaseId`),X(`WorkbenchSuiteId`),X(`WorkbenchEvaluationExportId`),X(`WorkbenchPrincipalIdentity`),X(`WorkbenchSession`),X(`WorkbenchSessionBootstrapResponse`),X(`WorkbenchWorkspace`),X(`WorkbenchWorkspaceCreateRequest`),X(`WorkbenchWorkspaceUpdateRequest`),X(`WorkbenchWorkspaceListResponse`),X(`WorkbenchToolInputMode`),X(`WorkbenchWorkspacePreferences`),X(`WorkbenchWorkspacePreferencesUpdateRequest`),X(`WorkbenchTransportKind`),X(`WorkbenchHeaderSecretScheme`),X(`WorkbenchSecretReference`),X(`WorkbenchEnvironmentSecretReference`),X(`WorkbenchHeaderSecretReference`),X(`WorkbenchStdioServerConfiguration`),X(`WorkbenchStreamableHttpServerConfiguration`),X(`WorkbenchBuiltinServerConfiguration`),X(`WorkbenchServerConfiguration`),X(`WorkbenchErrorCategory`),X(`WorkbenchError`),X(`WorkbenchInitializationSnapshot`),X(`WorkbenchConnectionStatus`),X(`WorkbenchConnectionSnapshot`),X(`WorkbenchServer`),X(`WorkbenchServerCreateRequest`),X(`WorkbenchServerUpdateRequest`),X(`WorkbenchServerListResponse`),X(`WorkbenchServerActionAccepted`),X(`WorkbenchDiscoveryCollection`),X(`WorkbenchDiscoverySnapshot`),X(`WorkbenchProtocolDirection`),X(`WorkbenchProtocolEventKind`),X(`WorkbenchProtocolEvent`),X(`WorkbenchProtocolEventPage`),X(`WorkbenchProtocolEvents`),X(`WorkbenchExecutionEffect`),X(`WorkbenchExecutionStatus`),X(`WorkbenchExecutionConfirmationRequest`),X(`WorkbenchExecutionConfirmationEvidence`),X(`WorkbenchExecutionRequest`),X(`WorkbenchExecutionTokenUsage`),X(`WorkbenchExecutionCost`),X(`WorkbenchTelemetryCorrelation`),X(`WorkbenchExecutionUpdateEvents`),X(`WorkbenchExecutionRecord`),X(`WorkbenchExecutionAccepted`),X(`WorkbenchExecutionCancelRequest`),X(`WorkbenchExecutionPage`),X(`WorkbenchTelemetryAvailability`),X(`WorkbenchTelemetrySignalAvailability`),X(`WorkbenchTelemetrySignalSummary`),X(`WorkbenchExecutionTelemetryResponse`),X(`WorkbenchAssertionStatus`),X(`WorkbenchStatusAssertion`),X(`WorkbenchExactAssertion`),X(`WorkbenchPartialAssertion`),X(`WorkbenchSchemaAssertion`),X(`WorkbenchPatternAssertion`),X(`WorkbenchLatencyAssertion`),X(`WorkbenchTestAssertion`),X(`WorkbenchTestCase`),X(`WorkbenchTestCaseCreateRequest`),X(`WorkbenchTestCaseUpdateRequest`),X(`WorkbenchTestCasePage`),X(`WorkbenchTestSuite`),X(`WorkbenchTestSuiteCreateRequest`),X(`WorkbenchTestSuiteUpdateRequest`),X(`WorkbenchTestSuitePage`),X(`WorkbenchEvaluationResultStatus`),X(`WorkbenchEvaluationRunStatus`),X(`WorkbenchRegressionStatus`),X(`WorkbenchEvaluationRunRequest`),X(`WorkbenchTestCaseRunRequest`),X(`WorkbenchSuiteRunRequest`),X(`WorkbenchAssertionResult`),X(`WorkbenchEvaluationTestCaseSnapshot`),X(`WorkbenchEvaluationSuiteSnapshot`),X(`WorkbenchEvaluationTestResult`),X(`WorkbenchEvaluationSummary`),X(`WorkbenchEvaluationRun`),X(`WorkbenchEvaluationRunAccepted`),X(`WorkbenchEvaluationRunPage`),X(`WorkbenchEvaluationComparisonRequest`),X(`WorkbenchEvaluationTestComparison`),X(`WorkbenchEvaluationRunComparison`),X(`WorkbenchEvaluationExportFormat`),X(`WorkbenchEvaluationExportStatus`),X(`WorkbenchEvaluationExportRequest`),X(`WorkbenchEvaluationExport`),X(`WorkbenchEvaluationJsonExportPayload`),X(`WorkbenchEvaluationReportExportPayload`),X(`WorkbenchEvaluationExportPayload`),X(`WorkbenchEvaluationExportArtifact`),X(`WorkbenchEvaluationExportAccepted`),Y(`Common.Errors.UnauthorizedError`),Y(`Common.Errors.ForbiddenError`),Y(`Common.Errors.NotFoundError`),Y(`Common.Errors.ValidationError`),Y(`Common.Errors.ConflictError`),Y(`Common.Errors.BadGatewayError`),Y(`Common.Errors.ServiceUnavailableError`),Y(`Common.Errors.InternalServerError`);function u_(){return{graph:void 0,events:[],journalCursor:`0`,selectedNodeId:void 0,selectedEdgeId:void 0,content:{},liveControlsAvailable:!1,connection:`connecting`,reconnectAttempt:0,cursorGapCount:0}}function d_(e,t){if(t.type===`bootstrap`)return{...u_(),graph:t.payload.graph,journalCursor:`0`,liveControlsAvailable:t.payload.live_controls_available,connection:`live`};if(t.type===`connection`)return{...e,connection:t.connection,reconnectAttempt:t.reconnectAttempt??e.reconnectAttempt};if(t.type===`select-node`)return{...e,selectedNodeId:t.nodeId,selectedEdgeId:void 0};if(t.type===`select-edge`)return{...e,selectedNodeId:void 0,selectedEdgeId:t.edgeId};let n=t.payload.graph,r=n!==void 0&&e.graph!==void 0&&n.run.run_id!==e.graph.run.run_id,i=n===void 0?e.graph:r||e.graph===void 0?n:f_(e.graph,n),a=t.payload.page,o=a.cursor_gap||r?m_(a.events).slice(-1e3):m_([...e.events,...a.events]).slice(-1e3),s=t.payload.content===void 0?e.content:{...e.content,[t.payload.content.content_ref]:t.payload.content};return{...e,graph:i,events:o,journalCursor:a.next_sequence,content:s,liveControlsAvailable:i?.run.status===`active`&&e.liveControlsAvailable,connection:`live`,reconnectAttempt:0,cursorGapCount:e.cursorGapCount+ +!!a.cursor_gap,...r?{selectedNodeId:void 0,selectedEdgeId:void 0}:{}}}function f_(e,t){return{...t,nodes:p_(e.nodes,t.nodes,e=>e.node_id),edges:p_(e.edges,t.edges,e=>e.edge_id)}}function p_(e,t,n){let r=new Map(e.map(e=>[n(e),e]));for(let e of t)r.set(n(e),e);return[...r.values()].sort((e,t)=>n(e).localeCompare(n(t)))}function m_(e){return[...new Map(e.map(e=>[e.event_id,e])).values()].sort((e,t)=>(BigInt(e.journal_sequence)<BigInt(t.journal_sequence)?-1:+(BigInt(e.journal_sequence)>BigInt(t.journal_sequence)))||e.event_id.localeCompare(t.event_id))}function h_(e){return e.graph?.nodes.find(t=>t.node_id===e.selectedNodeId)}function g_(e){return e.graph?.edges.find(t=>t.edge_id===e.selectedEdgeId)}function __(e){return Math.min(15e3,500*2**Math.max(0,e))}var v_=184,y_=62;function b_(e,t){return(t===`radial`&&x_(e)?`radial`:`layered`)==`radial`?w_(e.nodes):C_(e.nodes,e.edges)}function x_(e){if(e.nodes.length<4||e.nodes.length>24)return!1;let t=T_(e.nodes),n=T_(e.nodes);for(let r of e.edges)t.set(r.target_node_id,(t.get(r.target_node_id)??0)+1),n.set(r.source_node_id,(n.get(r.source_node_id)??0)+1);let r=e.nodes.filter(e=>(t.get(e.node_id)??0)===0),i=e.nodes.filter(e=>(n.get(e.node_id)??0)===0);return r.length===1&&i.length===1&&e.nodes.some(e=>(n.get(e.node_id)??0)>=2)&&e.nodes.some(e=>(t.get(e.node_id)??0)>=2)}function S_(e,t,n,r,i=160){let a=new Set;for(let[o,s]of e.positions){let e=s.x*t.scale+t.x,c=s.y*t.scale+t.y,l=e+s.width*t.scale,u=c+s.height*t.scale;l>=-i&&u>=-i&&e<=n+i&&c<=r+i&&a.add(o)}return a}function C_(e,t){let n=new Map(e.map(e=>[e.node_id,e])),r=T_(e),i=new Map;for(let e of t){if(!n.has(e.source_node_id)||!n.has(e.target_node_id))continue;r.set(e.target_node_id,(r.get(e.target_node_id)??0)+1);let t=i.get(e.source_node_id)??[];t.push(e.target_node_id),i.set(e.source_node_id,t)}let a=new Map,o=e.filter(e=>(r.get(e.node_id)??0)===0).sort(E_).map(e=>e.node_id),s=new Set;for(;o.length>0;){let e=o.shift();if(s.has(e))continue;s.add(e);let t=a.get(e)??0;for(let n of[...i.get(e)??[]].sort()){a.set(n,Math.max(a.get(n)??0,t+1));let e=(r.get(n)??1)-1;r.set(n,e),e===0&&o.push(n)}o.sort()}let c=Math.max(0,...a.values());for(let t of[...e].sort(E_))s.has(t.node_id)||a.set(t.node_id,c++);let l=new Map;for(let t of e){let e=a.get(t.node_id)??0,n=l.get(e)??[];n.push(t),l.set(e,n)}for(let e of l.values())e.sort(E_);let u=new Map,d=1;for(let[e,t]of[...l].sort(([e],[t])=>e-t))d=Math.max(d,t.length),t.forEach((t,n)=>{u.set(t.node_id,{node:t,x:54+e*288,y:54+n*90,width:v_,height:y_,rank:e})});let f=Math.max(0,...a.values());return{mode:`layered`,width:108+(f+1)*v_+f*104,height:108+d*y_+(d-1)*28,positions:u}}function w_(e){let t=[...e].sort(E_),n=920/2-v_/2,r=680/2-y_/2,i=new Map,a=t[0],o=t.at(-1);a&&i.set(a.node_id,{node:a,x:n,y:44,width:v_,height:y_,rank:0});let s=t.slice(1,-1);return s.forEach((e,t)=>{let a=t/Math.max(1,s.length)*Math.PI*2-Math.PI/2;i.set(e.node_id,{node:e,x:n+Math.cos(a)*300,y:r+Math.sin(a)*220,width:v_,height:y_,rank:1})}),o&&o!==a&&i.set(o.node_id,{node:o,x:n,y:680-y_-44,width:v_,height:y_,rank:2}),{mode:`radial`,width:920,height:680,positions:i}}function T_(e){return new Map(e.map(e=>[e.node_id,0]))}function E_(e,t){return(e.started_at??``).localeCompare(t.started_at??``)||e.node_id.localeCompare(t.node_id)}var D_=`sha256:${`c`.repeat(64)}`,O_={display:{graph:{run:{run_id:`run_fanout_resume_01`,thread_id:`thread_9f31`,title:`collector release gate`,status:`active`,started_at:`2026-07-28T12:00:00Z`,latest_journal_sequence:`14`,active_attempt_id:`attempt-2`},nodes:[{node_id:`run`,kind:`run`,label:`collector release gate`,status:`active`,started_at:`2026-07-28T12:00:00Z`,duration_ms:18420},{node_id:`attempt:1`,kind:`attempt`,label:`attempt 1`,status:`failed`,attempt_id:`attempt-1`,started_at:`2026-07-28T12:00:00Z`,ended_at:`2026-07-28T12:00:11Z`,duration_ms:11e3},{node_id:`agent:contracts:1`,kind:`agent`,label:`contracts`,status:`succeeded`,attempt_id:`attempt-1`,agent_id:`agent-contracts`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:06Z`,duration_ms:5100},{node_id:`agent:collector:1`,kind:`agent`,label:`collector journal`,status:`failed`,attempt_id:`attempt-1`,agent_id:`agent-collector`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:09Z`,duration_ms:7900,content_refs:[D_]},{node_id:`agent:mcp:1`,kind:`agent`,label:`mcp projection`,status:`succeeded`,attempt_id:`attempt-1`,agent_id:`agent-mcp`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:07Z`,duration_ms:6200},{node_id:`gate:join:1`,kind:`gate`,label:`join / spec review`,status:`failed`,attempt_id:`attempt-1`,started_at:`2026-07-28T12:00:09Z`,ended_at:`2026-07-28T12:00:11Z`,duration_ms:1800},{node_id:`attempt:2`,kind:`attempt`,label:`attempt 2 · resume`,status:`running`,attempt_id:`attempt-2`,started_at:`2026-07-28T12:00:12Z`,duration_ms:6420},{node_id:`agent:collector:2`,kind:`agent`,label:`collector journal`,status:`succeeded`,attempt_id:`attempt-2`,agent_id:`agent-collector`,started_at:`2026-07-28T12:00:12Z`,ended_at:`2026-07-28T12:00:17Z`,duration_ms:4980},{node_id:`tool:test`,kind:`tool_call`,label:`dotnet test · workflow`,status:`succeeded`,attempt_id:`attempt-2`,agent_id:`agent-collector`,parent_node_id:`agent:collector:2`,started_at:`2026-07-28T12:00:17Z`,ended_at:`2026-07-28T12:00:18Z`,duration_ms:1120},{node_id:`gate:release`,kind:`gate`,label:`release evidence`,status:`running`,attempt_id:`attempt-2`,started_at:`2026-07-28T12:00:18Z`,duration_ms:320}],edges:[{edge_id:`run-attempt-1`,source_node_id:`run`,target_node_id:`attempt:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-01`]}},{edge_id:`attempt-contracts`,source_node_id:`attempt:1`,target_node_id:`agent:contracts:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-02`]}},{edge_id:`attempt-collector`,source_node_id:`attempt:1`,target_node_id:`agent:collector:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-03`]}},{edge_id:`attempt-mcp`,source_node_id:`attempt:1`,target_node_id:`agent:mcp:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-04`]}},{edge_id:`contracts-join`,source_node_id:`agent:contracts:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-06`]}},{edge_id:`collector-join`,source_node_id:`agent:collector:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-08`]}},{edge_id:`mcp-join`,source_node_id:`agent:mcp:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-07`]}},{edge_id:`write-conflict`,source_node_id:`agent:collector:1`,target_node_id:`agent:mcp:1`,kind:`conflict`,provenance:{type:`derived`,event_ids:[`evt-write-a`,`evt-write-b`],evidence:`overlapping writes to server/src/contract-validation.ts`,confidence:.94}},{edge_id:`interrupt-resume`,source_node_id:`gate:join:1`,target_node_id:`attempt:2`,kind:`temporal`,provenance:{type:`recorded`,event_ids:[`evt-10`,`evt-11`]}},{edge_id:`resume-collector`,source_node_id:`attempt:2`,target_node_id:`agent:collector:2`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-12`]}},{edge_id:`collector-test`,source_node_id:`agent:collector:2`,target_node_id:`tool:test`,kind:`resource`,provenance:{type:`recorded`,event_ids:[`evt-13`]}},{edge_id:`test-release`,source_node_id:`tool:test`,target_node_id:`gate:release`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-14`]}}],statistics:{t1_ms:34840,t_infinity_ms:18420,wall_time_ms:18420,peak_concurrency:3,worker_count:3,parallel_lower_bound_ms:18420,critical_path_node_ids:[`run`,`attempt:1`,`agent:collector:1`,`gate:join:1`,`attempt:2`,`agent:collector:2`,`tool:test`,`gate:release`]},journal_sequence:`14`,has_more_nodes:!1,has_more_edges:!1,total_node_count:10,total_edge_count:12},live_controls_available:!0,mode:`live`},updates:{page:{events:[k_(`evt-01`,`1`,`attempt_started`,{attempt_id:`attempt-1`}),k_(`evt-02`,`2`,`agent_spawned`,{agent_id:`agent-contracts`}),k_(`evt-03`,`3`,`agent_spawned`,{agent_id:`agent-collector`}),k_(`evt-04`,`4`,`agent_spawned`,{agent_id:`agent-mcp`}),k_(`evt-06`,`6`,`agent_completed`,{agent_id:`agent-contracts`}),k_(`evt-07`,`7`,`agent_completed`,{agent_id:`agent-mcp`}),k_(`evt-08`,`8`,`agent_completed`,{agent_id:`agent-collector`}),k_(`evt-09`,`9`,`attempt_completed`,{attempt_id:`attempt-1`}),k_(`evt-10`,`10`,`control_applied`,{}),k_(`evt-11`,`11`,`thread_resumed`,{attempt_id:`attempt-2`}),k_(`evt-12`,`12`,`agent_started`,{agent_id:`agent-collector`,attempt_id:`attempt-2`}),k_(`evt-13`,`13`,`tool_completed`,{agent_id:`agent-collector`,attempt_id:`attempt-2`,tool_call_id:`tool-test`}),k_(`evt-14`,`14`,`wait_started`,{attempt_id:`attempt-2`})],next_sequence:`14`,high_water_mark:`14`,cursor_gap:!1},content:{content_ref:D_,content_type:`text/plain`,encoding:`utf8`,content:`Investigate the projection mismatch. Preserve attempt one as failed, resume the same thread, and prove the rebuilt graph converges.`,size_bytes:128},mode:`live`}};function k_(e,t,n,r){return{event_id:e,source_sequence:t,timestamp:`2026-07-28T12:00:${t.padStart(2,`0`)}Z`,kind:n,run_id:`run_fanout_resume_01`,client_id:`qyl-codex`,journal_sequence:t,...r}}var A_=`http://www.w3.org/2000/svg`,j_=43,M_=12,N_=new URLSearchParams(window.location.search).get(`fixture`)===`fanout`;function Z(e){let t=document.getElementById(e);if(!t)throw Error(`observe graph is missing #${e}`);return t}var P_=Z(`workflow-app`),F_=Z(`loading-state`),I_=Z(`error-state`),L_=Z(`error-message`),R_=Z(`debugger`),z_=Z(`run-status-mark`),B_=Z(`run-title`),V_=Z(`run-id`),H_=Z(`connection-state`),U_=Z(`fullscreen-button`),W_=Z(`fit-graph`),G_=Z(`metric-t1`),K_=Z(`metric-tinf`),q_=Z(`metric-wall`),J_=Z(`metric-peak`),Y_=Z(`metric-workers`),X_=Z(`metric-bound`),Z_=Z(`run-card`),Q_=Z(`agent-count`),$_=Z(`agent-list`),ev=Z(`load-more-graph`),tv=Z(`layout-layered`),nv=Z(`layout-radial`),rv=Z(`viewport-count`),Q=Z(`graph-viewport`),iv=Z(`graph-world`),av=Z(`edge-layer`),ov=Z(`node-layer`),sv=Z(`heatmap`),cv=Z(`heatmap-range`),lv=Z(`journal-cursor`),uv=Z(`event-list`),dv=Z(`event-list-inner`),fv=Z(`event-window-label`),pv=Z(`follow-events`),mv=Z(`detail-drawer`),hv=Z(`detail-title`),gv=Z(`detail-subtitle`),_v=Z(`detail-close`),vv=Z(`detail-facts`),yv=Z(`attempt-history`),bv=Z(`content-list`),xv=Z(`content-viewer`),Sv=Z(`historical-control-note`),Cv=Z(`control-form`),wv=Z(`control-action`),Tv=Z(`control-input-label`),Ev=Z(`control-input`),Dv=Z(`control-submit`),Ov=Z(`control-result`),kv=Z(`live-announcer`),$=u_(),Av=`layered`,jv,Mv={x:24,y:24,scale:1},Nv=``,Pv=!0,Fv=0,Iv=0,Lv=!1,Rv=!1,zv=!1,Bv,Vv={clientX:0,clientY:0,x:0,y:0},Hv=new Gg({name:`qyl Observe Graph`,version:Yg.version});function Uv(e){$=d_($,e),Kv()}function Wv(e){if($.graph){kv.textContent=e,H_.textContent=`degraded`,H_.dataset.state=`retrying`;return}F_.hidden=!0,R_.hidden=!0,L_.textContent=e,I_.hidden=!1}function Gv(e){return e.content?.map(e=>`text`in e?e.text:``).filter(Boolean).join(` `)||void 0}function Kv(){let e=$.graph;F_.hidden=e!==void 0,I_.hidden=!0,R_.hidden=e===void 0,qv(),e&&(B_.textContent=e.run.title??`untitled workflow`,V_.textContent=e.run.run_id,z_.dataset.status=e.run.status,Jv(),Yv(),Qv(),ay(),oy(),ly())}function qv(){H_.textContent=$.connection===`retrying`?`retry ${$.reconnectAttempt}`:$.connection===`stopped`?`replay complete`:$.connection,H_.dataset.state=$.connection}function Jv(){let e=$.graph?.statistics;G_.textContent=e?jy(e.t1_ms):`—`,K_.textContent=e?jy(e.t_infinity_ms):`—`,q_.textContent=e?jy(e.wall_time_ms):`—`,J_.textContent=e?`${e.peak_concurrency}×`:`—`,Y_.textContent=e?String(e.worker_count):`—`,X_.textContent=e?jy(e.parallel_lower_bound_ms):`—`}function Yv(){let e=$.graph;if(!e)return;let t=new Set(e.nodes.flatMap(e=>e.attempt_id?[e.attempt_id]:[])),n=e.nodes.filter(e=>e.kind===`agent`).sort(Py);Q_.textContent=`${n.length} agent${n.length===1?``:`s`}`;let r=document.createElement(`div`);r.className=`run-card-title`;let i=document.createElement(`i`);i.className=`status-mark`,i.dataset.status=e.run.status,r.appendChild(i);let a=document.createElement(`strong`);a.textContent=e.run.title??e.run.run_id,r.appendChild(a);let o=document.createElement(`div`);o.className=`run-card-facts`,o.appendChild(Xv(`status`,e.run.status)),o.appendChild(Xv(`attempts`,String(t.size))),o.appendChild(Xv(`journal`,e.journal_sequence)),o.appendChild(Xv(`window`,`${e.nodes.length}/${e.total_node_count}`)),Z_.replaceChildren(r,o);let s=document.createDocumentFragment();for(let e of n.slice(0,250)){let t=document.createElement(`button`);t.type=`button`,t.className=`agent-row`,t.setAttribute(`role`,`option`),t.setAttribute(`aria-selected`,String($.selectedNodeId===e.node_id)),t.addEventListener(`click`,()=>_y(e.node_id));let n=document.createElement(`span`);n.className=`status-dot`,n.dataset.status=e.status,n.setAttribute(`aria-label`,e.status),t.appendChild(n);let r=document.createElement(`span`);r.className=`agent-copy`;let i=document.createElement(`strong`);i.textContent=e.label,r.appendChild(i);let a=document.createElement(`small`);a.textContent=`${e.attempt_id??`no attempt`} · ${e.status}`,r.appendChild(a),t.appendChild(r);let o=document.createElement(`span`);o.className=`agent-duration`,o.textContent=jy(e.duration_ms),t.appendChild(o),t.appendChild(Zv(e)),s.appendChild(t)}$_.replaceChildren(s),ev.hidden=!(e.has_more_nodes||e.has_more_edges),ev.textContent=`Load next graph window · ${e.nodes.length}/${e.total_node_count} nodes`}function Xv(e,t){let n=document.createElement(`span`);n.textContent=e;let r=document.createElement(`b`);return r.textContent=t,n.appendChild(r),n}function Zv(e){let t=document.createElement(`span`);t.className=`activity-strip`;let n=$.graph;if(!n)return t;let r=n.nodes.filter(t=>t.agent_id!==void 0&&t.agent_id===e.agent_id),i=r.filter(e=>e.status===`succeeded`||e.status===`completed`).length,a=r.some(e=>e.status===`failed`||e.status===`interrupted`),o=Math.max(1,Math.round(i/Math.max(1,r.length)*10));for(let e=0;e<10;e+=1){let n=document.createElement(`i`);e<o&&(n.className=a&&e===o-1?`error`:`on`),t.appendChild(n)}return t}function Qv(){let e=$.graph;if(!e)return;jv=b_(e,Av),Av=jv.mode,tv.setAttribute(`aria-pressed`,String(Av===`layered`)),nv.setAttribute(`aria-pressed`,String(Av===`radial`));let t=x_(e);nv.disabled=!t,nv.title=t?`Show the small fan-out/fan-in run as a radial fleet`:`Radial view is available only for small fan-out/fan-in runs`;let n=`${e.run.run_id}:${Av}`;if(Nv!==n){Nv=n,iy();return}iv.setAttribute(`transform`,`translate(${Mv.x} ${Mv.y}) scale(${Mv.scale})`);let r=S_(jv,Mv,Q.clientWidth,Q.clientHeight);rv.textContent=`${r.size}/${e.nodes.length} rendered · ${e.total_node_count} total`,$v(e.edges,r),ty(r)}function $v(e,t){let n=$.graph,r=jv;if(!n||!r)return;let i=new Set(n.statistics.critical_path_node_ids),a=document.createDocumentFragment();for(let n of e){if(!t.has(n.source_node_id)&&!t.has(n.target_node_id))continue;let e=r.positions.get(n.source_node_id),o=r.positions.get(n.target_node_id);if(!e||!o)continue;let s=document.createElementNS(A_,`path`);s.setAttribute(`d`,ey(e,o,r.mode)),s.setAttribute(`class`,[`workflow-edge`,i.has(n.source_node_id)&&i.has(n.target_node_id)?`is-critical`:``,$.selectedEdgeId===n.edge_id?`is-selected`:``].filter(Boolean).join(` `)),s.dataset.provenance=n.provenance.type,s.dataset.kind=n.kind,s.setAttribute(`tabindex`,`0`),s.setAttribute(`role`,`button`),s.setAttribute(`aria-label`,`${n.kind} edge from ${e.node.label} to ${o.node.label}, ${n.provenance.type}`),s.addEventListener(`click`,e=>{e.stopPropagation(),vy(n.edge_id)}),s.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),vy(n.edge_id))}),a.appendChild(s)}av.replaceChildren(a)}function ey(e,t,n){if(n===`radial`)return`M${e.x+e.width/2},${e.y+e.height/2} L${t.x+t.width/2},${t.y+t.height/2}`;let r=e.x+e.width,i=e.y+e.height/2,a=t.x,o=t.y+t.height/2,s=Math.max(30,Math.abs(a-r)*.45);return`M${r},${i} C${r+s},${i} ${a-s},${o} ${a},${o}`}function ty(e){let t=$.graph,n=jv;if(!t||!n)return;let r=new Set(t.statistics.critical_path_node_ids),i=document.createDocumentFragment();for(let a of t.nodes){if(!e.has(a.node_id))continue;let t=n.positions.get(a.node_id);if(!t)continue;let o=document.createElementNS(A_,`g`);o.setAttribute(`transform`,`translate(${t.x} ${t.y})`),o.setAttribute(`class`,[`workflow-node`,$.selectedNodeId===a.node_id?`is-selected`:``,r.has(a.node_id)?`is-critical`:``].filter(Boolean).join(` `)),o.dataset.status=a.status,o.setAttribute(`tabindex`,`0`),o.setAttribute(`role`,`treeitem`),o.setAttribute(`aria-label`,`${a.kind} ${a.label}, ${a.status}, ${jy(a.duration_ms)}`),o.addEventListener(`click`,e=>{e.stopPropagation(),_y(a.node_id)}),o.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_y(a.node_id))});let s=document.createElementNS(A_,`rect`);s.setAttribute(`class`,`node-shell`),s.setAttribute(`width`,String(t.width)),s.setAttribute(`height`,String(t.height)),o.appendChild(s);let c=document.createElementNS(A_,`rect`);c.setAttribute(`class`,`node-status-band`),c.setAttribute(`width`,`3`),c.setAttribute(`height`,String(t.height)),o.appendChild(c),o.appendChild(ny(`node-kind`,12,14,a.kind.replace(`_`,` `))),o.appendChild(ny(`node-label`,12,33,Ny(a.label,25))),o.appendChild(ny(`node-meta`,12,50,`${a.status} · ${jy(a.duration_ms)} · ${a.attempt_id??`run`}`)),i.appendChild(o)}ov.replaceChildren(i)}function ny(e,t,n,r){let i=document.createElementNS(A_,`text`);return i.setAttribute(`class`,e),i.setAttribute(`x`,String(t)),i.setAttribute(`y`,String(n)),i.textContent=r,i}function ry(e=!0){let t=jv;if(!t)return;let n=Math.max(1,Q.clientWidth-48),r=Math.max(1,Q.clientHeight-48),i=Math.min(1.15,Math.max(e?.15:.82,Math.min(n/t.width,r/t.height))),a=t.width*i;Mv={x:a<=Q.clientWidth?(Q.clientWidth-a)/2:22,y:(Q.clientHeight-t.height*i)/2,scale:i},Qv()}function iy(){ry(!1)}function ay(){let e=$.graph;if(!e)return;let t=e.nodes.filter(e=>e.kind===`agent`&&e.agent_id).slice(0,8),n=new Date(e.run.started_at).getTime(),r=e.run.ended_at?new Date(e.run.ended_at).getTime():n+Math.max(1,e.statistics.wall_time_ms),i=Math.max(1,r-n);cv.textContent=`${jy(i)} window`;let a=document.createDocumentFragment();for(let r of t){let t=document.createElement(`span`);t.className=`heatmap-label`,t.textContent=Ny(r.label,13),t.title=r.label,a.appendChild(t);let o=e.nodes.filter(e=>e.agent_id===r.agent_id);for(let e=0;e<M_;e+=1){let t=n+i*e/M_,s=n+i*(e+1)/M_,c=o.filter(e=>{let r=e.started_at?new Date(e.started_at).getTime():n,i=e.ended_at?new Date(e.ended_at).getTime():r+(e.duration_ms??0);return r<s&&i>=t}).length,l=document.createElement(`span`);l.className=`heatmap-cell`,l.dataset.level=String(Math.min(3,c)),l.setAttribute(`aria-label`,`${r.label}, phase ${e+1}: ${c} active record${c===1?``:`s`}`),l.title=l.getAttribute(`aria-label`)??``,a.appendChild(l)}}sv.replaceChildren(a)}function oy(){let e=$.events;lv.textContent=`seq ${$.journalCursor}`,fv.textContent=`${e.length} buffered${$.cursorGapCount?` · ${$.cursorGapCount} gap recoveries`:``}`,dv.style.height=`${e.length*j_}px`;let t=Math.ceil(uv.clientHeight/j_),n=Math.max(0,Math.floor(uv.scrollTop/j_)-5),r=Math.min(e.length,n+t+10),i=document.createDocumentFragment();for(let t=n;t<r;t+=1){let n=e[t],r=document.createElement(`div`);r.className=`event-row`,r.style.top=`${t*j_}px`,r.dataset.tone=sy(n),r.tabIndex=0,r.addEventListener(`click`,()=>cy(n)),r.addEventListener(`keydown`,e=>{e.key===`Enter`&&cy(n)});let a=document.createElement(`code`);a.className=`event-seq`,a.textContent=n.journal_sequence,r.appendChild(a);let o=document.createElement(`span`);o.className=`event-copy`;let s=document.createElement(`strong`);s.textContent=n.kind.replaceAll(`_`,` `),o.appendChild(s);let c=document.createElement(`small`);c.textContent=n.agent_id??n.tool_call_id??n.turn_id??n.attempt_id??n.event_id,o.appendChild(c),r.appendChild(o);let l=document.createElement(`time`);l.className=`event-time`,l.dateTime=n.timestamp,l.textContent=My(n.timestamp),r.appendChild(l),i.appendChild(r)}dv.replaceChildren(i),Pv&&e.length>0&&requestAnimationFrame(()=>{uv.scrollTop=uv.scrollHeight})}function sy(e){return e.kind.includes(`failed`)||e.kind.includes(`interrupted`)||e.kind===`approval_resolved`?`failure`:e.kind.startsWith(`control_`)?`control`:e.kind.startsWith(`agent_`)||e.kind.startsWith(`message_`)||e.kind.startsWith(`wait_`)||e.kind===`joined`?`collaboration`:`neutral`}function cy(e){let t=$.graph;if(!t)return;let n=t.nodes.find(t=>e.tool_call_id!==void 0&&t.attributes?.tool_call_id===e.tool_call_id||e.agent_id!==void 0&&t.agent_id===e.agent_id||e.attempt_id!==void 0&&t.attempt_id===e.attempt_id);n&&_y(n.node_id)}function ly(){let e=h_($),t=g_($);if(mv.hidden=e===void 0&&t===void 0,!e&&!t)return;e?uy(e):t&&dy(t);let n=$.graph,r=$.liveControlsAvailable&&n?.run.status===`active`;Cv.hidden=!r,Sv.hidden=r}function uy(e){hv.textContent=e.label,gv.textContent=`${e.kind} · ${e.status} · ${e.node_id}`;let t=[[`node`,e.node_id],[`kind`,e.kind],[`status`,e.status],[`attempt`,e.attempt_id??`—`],[`agent`,e.agent_id??`—`],[`parent`,e.parent_node_id??`—`],[`started`,e.started_at??`—`],[`ended`,e.ended_at??`—`],[`duration`,jy(e.duration_ms)]];e.attributes&&t.push([`attributes`,JSON.stringify(e.attributes)]),fy(t);let n=$.graph?.nodes.filter(t=>t.node_id===e.node_id||e.agent_id!==void 0&&t.agent_id===e.agent_id&&t.attempt_id!==e.attempt_id).sort(Py)??[];yv.replaceChildren(...n.map(e=>{let t=document.createElement(`div`);t.className=`attempt-record`;let n=document.createElement(`strong`);n.textContent=e.attempt_id??`run`,t.appendChild(n);let r=document.createElement(`span`);r.textContent=e.status,t.appendChild(r);let i=document.createElement(`span`);i.textContent=e.kind,t.appendChild(i);let a=document.createElement(`span`);return a.textContent=jy(e.duration_ms),t.appendChild(a),t})),py(e.content_refs??[])}function dy(e){hv.textContent=`${e.kind} edge`,gv.textContent=`${e.source_node_id} → ${e.target_node_id}`;let t=[[`edge`,e.edge_id],[`kind`,e.kind],[`source`,e.source_node_id],[`target`,e.target_node_id],[`provenance`,e.provenance.type],[`events`,e.provenance.event_ids.join(`, `)]];e.provenance.type===`derived`&&(t.push([`evidence`,e.provenance.evidence]),t.push([`confidence`,`${Math.round(e.provenance.confidence*100)}%`])),fy(t),yv.replaceChildren(my(`Edges do not own attempt history.`)),py([])}function fy(e){let t=document.createDocumentFragment();for(let[n,r]of e){let e=document.createElement(`dt`);e.textContent=n,t.appendChild(e);let i=document.createElement(`dd`);i.textContent=r,t.appendChild(i)}vv.replaceChildren(t)}function py(e){if(e.length===0){bv.replaceChildren(my(`No captured content is attached to this record.`)),xv.textContent=`Captured payloads are fetched only when opened.`;return}bv.replaceChildren(...e.map(e=>{let t=document.createElement(`button`);t.type=`button`,t.className=`content-ref`;let n=document.createElement(`strong`);n.textContent=e.slice(0,20),t.appendChild(n);let r=document.createElement(`span`);return r.textContent=$.content[e]?`cached`:`fetch`,t.appendChild(r),t.addEventListener(`click`,()=>void hy(e)),t}))}function my(e){let t=document.createElement(`span`);return t.className=`historical-note`,t.textContent=e,t}async function hy(e){let t=$.content[e];if(t){xv.textContent=gy(t.encoding,t.content);return}let n=$.graph?.run.run_id;if(n){xv.textContent=`Decrypting captured content…`;try{let t=await Hv.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:n,after_sequence:$.journalCursor,wait_ms:0,content_ref:e}});if(t.isError)throw Error(Gv(t)??`content retrieval failed`);let r=Sy(t);if(!r?.content)throw Error(`content response was missing`);Uv({type:`updates`,payload:r}),xv.textContent=gy(r.content.encoding,r.content.content)}catch(e){xv.textContent=`Content unavailable: ${e instanceof Error?e.message:String(e)}`}}}function gy(e,t){if(e===`utf8`)return t;try{let e=Uint8Array.from(atob(t),e=>e.charCodeAt(0));return new TextDecoder().decode(e)}catch{return`[invalid base64 content]`}}function _y(e){let t=yy();Iv=Math.max(0,t.findIndex(t=>t.node_id===e)),Uv({type:`select-node`,nodeId:e})}function vy(e){Uv({type:`select-edge`,edgeId:e})}function yy(){let e=jv;return e?[...e.positions.values()].sort((e,t)=>e.x-t.x||e.y-t.y).map(e=>e.node):[]}function by(e){let t=yy();t.length!==0&&(Iv=(Iv+e+t.length)%t.length,_y(t[Iv].node_id))}function xy(e){let t=s_.safeParse(e.structuredContent);return t.success?t.data:void 0}function Sy(e){let t=c_.safeParse(e.structuredContent);return t.success?t.data:void 0}function Cy(e){let t=l_.safeParse(e.structuredContent);return t.success?t.data:void 0}function wy(){Ty(++Fv)}async function Ty(e){let t=0;for(;e===Fv&&$.graph;){let n=$.graph.run.run_id;try{let r=await Hv.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:n,after_sequence:$.journalCursor,limit:250,wait_ms:$.graph.run.status===`active`?2e4:0}});if(e!==Fv)return;if(r.isError)throw Error(Gv(r)??`journal update failed`);let i=Sy(r);if(!i)throw Error(`journal update did not match the published contract`);if(Uv({type:`updates`,payload:i}),t=0,$.graph?.run.status!==`active`&&i.page.next_sequence===i.page.high_water_mark){Uv({type:`connection`,connection:`stopped`});return}}catch{if(e!==Fv)return;t+=1,Uv({type:`connection`,connection:`retrying`,reconnectAttempt:t}),kv.textContent=`Workflow journal disconnected. Retry ${t}.`,await Fy(__(t-1))}}}async function Ey(){let e=$.graph;if(!(!e||Rv)){Rv=!0,ev.disabled=!0;try{let t=await Hv.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:e.run.run_id,after_sequence:$.journalCursor,wait_ms:0,...e.has_more_nodes&&e.next_node_cursor?{node_cursor:e.next_node_cursor}:{},...e.has_more_edges&&e.next_edge_cursor?{edge_cursor:e.next_edge_cursor}:{}}});if(t.isError)throw Error(Gv(t)??`graph page failed`);let n=Sy(t);if(!n?.graph)throw Error(`graph page was missing`);Uv({type:`updates`,payload:n})}catch(e){kv.textContent=`Graph page failed: ${e instanceof Error?e.message:String(e)}`}finally{Rv=!1,ev.disabled=!1}}}function Dy(e){e.theme&&Kg(e.theme),e.styles?.variables&&qg(e.styles.variables),e.styles?.css?.fonts&&Jg(e.styles.css.fonts),U_.hidden=e.availableDisplayModes?.includes(`fullscreen`)!==!0||e.displayMode===`fullscreen`,e.safeAreaInsets&&(P_.style.paddingTop=`${e.safeAreaInsets.top}px`,P_.style.paddingRight=`${e.safeAreaInsets.right}px`,P_.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,P_.style.paddingLeft=`${e.safeAreaInsets.left}px`)}Hv.ontoolinput=()=>{F_.hidden=!1,I_.hidden=!0},Hv.ontoolresult=e=>{let t=xy(e);if(!t){Wv(Gv(e)??`Display result failed contract validation.`);return}Uv({type:`bootstrap`,payload:t}),wy()},Hv.ontoolcancelled=()=>{$.graph||Wv(`Workflow display was cancelled.`)},Hv.onhostcontextchanged=Dy,Hv.onerror=e=>{console.error(e)},Hv.onteardown=async()=>(Fv+=1,Uv({type:`connection`,connection:`stopped`}),{}),W_.addEventListener(`click`,()=>ry(!0)),tv.addEventListener(`click`,()=>{Av=`layered`,Nv=``,Qv()}),nv.addEventListener(`click`,()=>{!$.graph||!x_($.graph)||(Av=`radial`,Nv=``,Qv())}),ev.addEventListener(`click`,()=>void Ey()),_v.addEventListener(`click`,()=>{Uv({type:`select-node`,nodeId:void 0})}),pv.addEventListener(`click`,()=>{Pv=!Pv,pv.setAttribute(`aria-pressed`,String(Pv)),Pv&&(uv.scrollTop=uv.scrollHeight,oy())}),uv.addEventListener(`scroll`,()=>{uv.scrollHeight-uv.clientHeight-uv.scrollTop>j_*2&&Pv&&(Pv=!1,pv.setAttribute(`aria-pressed`,`false`)),oy()}),wv.addEventListener(`change`,()=>{let e=wv.value!==`interrupt`;Tv.hidden=!e,Ev.required=e}),Cv.addEventListener(`submit`,e=>{e.preventDefault(),Oy()});async function Oy(){let e=$.graph;if(!e||Lv)return;let t=wv.value,n=Ev.value.trim();if(t!==`interrupt`&&!n){Ov.textContent=`${t} requires input.`;return}Lv=!0,Dv.disabled=!0,Ov.textContent=`Waiting for host approval…`;try{let r=await Hv.callServerTool({name:`control_workflow_run`,arguments:{run_id:e.run.run_id,action:t,idempotency_key:crypto.randomUUID(),...t===`interrupt`?{}:{input:n}}});if(r.isError)throw Error(Gv(r)??`control failed`);let i=Cy(r);if(!i)throw Error(`control result failed contract validation`);Ov.textContent=`${i.command.action} ${i.command.status} · ${i.command.command_id}`,t!==`interrupt`&&(Ev.value=``)}catch(e){Ov.textContent=`Control rejected: ${e instanceof Error?e.message:String(e)}`}finally{Lv=!1,Dv.disabled=!1}}U_.addEventListener(`click`,()=>{Hv.requestDisplayMode({mode:`fullscreen`}).catch(e=>{kv.textContent=`Fullscreen unavailable: ${e instanceof Error?e.message:String(e)}`})}),Q.addEventListener(`pointerdown`,e=>{e.button===0&&(zv=!0,Bv=e.pointerId,Vv={clientX:e.clientX,clientY:e.clientY,x:Mv.x,y:Mv.y},Q.setPointerCapture(e.pointerId),Q.classList.add(`is-panning`))}),Q.addEventListener(`pointermove`,e=>{!zv||e.pointerId!==Bv||(Mv={...Mv,x:Vv.x+e.clientX-Vv.clientX,y:Vv.y+e.clientY-Vv.clientY},Qv())}),Q.addEventListener(`pointerup`,ky),Q.addEventListener(`pointercancel`,ky),Q.addEventListener(`wheel`,e=>{e.preventDefault();let t=Q.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=Math.min(2.2,Math.max(.15,Mv.scale*Math.exp(-e.deltaY*.0015))),a=(n-Mv.x)/Mv.scale,o=(r-Mv.y)/Mv.scale;Mv={scale:i,x:n-a*i,y:r-o*i},Qv()},{passive:!1});function ky(e){e.pointerId===Bv&&(zv=!1,Bv=void 0,Q.classList.remove(`is-panning`))}window.addEventListener(`keydown`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)){if(e.key===`Escape`){Uv({type:`select-node`,nodeId:void 0});return}e.key===`ArrowRight`||e.key===`ArrowDown`?(e.preventDefault(),by(1)):(e.key===`ArrowLeft`||e.key===`ArrowUp`)&&(e.preventDefault(),by(-1))}});var Ay=new ResizeObserver(()=>{Qv(),oy()});if(Ay.observe(Q),Ay.observe(uv),N_){let e=s_.parse(O_.display),t=c_.parse(O_.updates);Uv({type:`bootstrap`,payload:e}),Uv({type:`updates`,payload:t}),U_.hidden=!0}else Hv.connect().then(async()=>{let e=Hv.getHostContext();if(e&&(Dy(e),e.displayMode!==`fullscreen`&&e.availableDisplayModes?.includes(`fullscreen`)))try{await Hv.requestDisplayMode({mode:`fullscreen`})}catch(e){kv.textContent=`Fullscreen unavailable: ${e instanceof Error?e.message:String(e)}`}}).catch(e=>{Wv(e instanceof Error?e.message:String(e))});function jy(e){return e===void 0||!Number.isFinite(e)||e<0?`—`:e<1?`${e.toFixed(2)} ms`:e<1e3?`${e.toFixed(+(e<10))} ms`:e<6e4?`${(e/1e3).toFixed(e<1e4?2:1)} s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function My(e){let t=new Date(e);return Number.isNaN(t.getTime())?`—`:`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`}function Ny(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}function Py(e,t){return(e.started_at??``).localeCompare(t.started_at??``)||e.node_id.localeCompare(t.node_id)}function Fy(e){return new Promise(t=>setTimeout(t,e))}</script>
58
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Cs(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Cs(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var ws=new Set([`type`,`properties`,`required`,`additionalProperties`]),Ts=[`oneOf`,`anyOf`];function Es(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ds(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!ws.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Es(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}h(n,r,e.length===1?e[0]:Ds(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Es(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Os(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of ws)if(t in e)return;let n=t.filter(e=>Ts.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ds(t);else{let e=n[0],i=Ts.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ds([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,ys(e,r))}function ks(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):ys(i,s),ys(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Cs(t[1].def??t[1].schema);if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Os(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ys(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,h(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ms(t,`input`,e.processors),output:Ms(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function As(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return As(r.element,n);if(r.type===`set`)return As(r.valueType,n);if(r.type===`lazy`)return As(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return As(r.innerType,n);if(r.type===`intersection`)return As(r.left,n)||As(r.right,n);if(r.type===`record`||r.type===`map`)return As(r.keyType,n)||As(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:As(r.in,n)||As(r.out,n);if(r.type===`object`){for(let e in r.shape)if(As(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(As(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(As(e,n))return!0;return!!(r.rest&&As(r.rest,n))}return!1}var js=(e,t={})=>n=>{let r=bs({...n,processors:t});return O(e,r),Ss(r,e),ks(r,e)},Ms=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=bs({...i??{},target:a,io:t,processors:n});return O(e,o),Ss(o,e),ks(o,e)},Ns={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ps=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ns[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Fs=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):D(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},Is=(e,t,n,r)=>{n.type=`boolean`},Ls=(e,t,n,r)=>{D(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Rs=(e,t,n,r)=>{D(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},zs=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Bs=(e,t,n,r)=>{D(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Vs=(e,t,n,r)=>{D(e,t,n,r,`Void cannot be represented in JSON Schema`)},Hs=(e,t,n,r)=>{n.not={}},Us=(e,t,n,r)=>{},Ws=(e,t,n,r)=>{},Gs=(e,t,n,r)=>{D(e,t,n,r,`Date cannot be represented in JSON Schema`)},Ks=(e,t,n,r)=>{let i=e._zod.def,a=s(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},qs=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(D(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(D(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Js=(e,t,n,r)=>{D(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Ys=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Xs=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Zs=(e,t,n,r)=>{n.type=`boolean`},Qs=(e,t,n,r)=>{D(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},$s=(e,t,n,r)=>{D(e,t,n,r,`Function types cannot be represented in JSON Schema`)},ec=(e,t,n,r)=>{D(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},tc=(e,t,n,r)=>{D(e,t,n,r,`Map cannot be represented in JSON Schema`)},nc=(e,t,n,r)=>{D(e,t,n,r,`Set cannot be represented in JSON Schema`)},rc=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=O(a.element,t,{...r,path:[...r.path,`items`]})};function ic(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?ic(t.out):t.type===`catch`?ic(t.innerType):e._zod.optin}var ac=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&D(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)h(i.properties,e,O(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?ic(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=O(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},oc=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>O(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},sc=(e,t,n,r)=>{let i=e._zod.def,a=O(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=O(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},cc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>O(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?O(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?ic(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},lc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=O(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)h(i.patternProperties,t.source,e)}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=O(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=O(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values,l=t.io===`input`&&ic(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},uc=(e,t,n,r)=>{let i=e._zod.def,a=O(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},dc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fc=Symbol();function pc(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(D(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),fc):JSON.parse(o)}var mc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=pc(i.defaultValue,e,t,n,r);o!==fc&&(n.default=o)},hc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=pc(i.defaultValue,e,t,n,r);o!==fc&&(n._prefault=o)},gc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{D(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},_c=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;O(o,t,r);let s=t.seen.get(e);s.ref=o},vc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},yc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bc=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},xc=(e,t,n,r)=>{let i=e._zod.innerType;O(i,t,r);let a=t.seen.get(e);a.ref=i},Sc={string:Ps,number:Fs,boolean:Is,bigint:Ls,symbol:Rs,null:zs,undefined:Bs,void:Vs,never:Hs,any:Us,unknown:Ws,date:Gs,enum:Ks,literal:qs,nan:Js,template_literal:Ys,file:Xs,success:Zs,custom:Qs,function:$s,transform:ec,map:tc,set:nc,array:rc,object:ac,union:oc,intersection:sc,tuple:cc,record:lc,nullable:uc,nonoptional:dc,default:mc,prefault:hc,catch:gc,pipe:_c,readonly:vc,promise:yc,optional:bc,lazy:xc};function Cc(e,t){if(`_idmap`in e){let n=e,r=bs({...t,processors:Sc}),i={};for(let e of n._idmap.entries()){let[t,n]=e;O(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Ss(r,n),h(a,t,ks(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=bs({...t,processors:Sc});return O(e,n),Ss(n,e),ks(n,e)}var wc=t({endsWith:()=>$o,gt:()=>Fo,gte:()=>Io,includes:()=>Zo,length:()=>qo,lowercase:()=>Yo,lt:()=>No,lte:()=>Po,maxLength:()=>Go,maxSize:()=>Ho,mime:()=>ns,minLength:()=>Ko,minSize:()=>Uo,multipleOf:()=>Vo,negative:()=>Ro,nonnegative:()=>Bo,nonpositive:()=>zo,normalize:()=>is,overwrite:()=>rs,positive:()=>Lo,properties:()=>ts,property:()=>es,regex:()=>Jo,size:()=>Wo,slugify:()=>cs,startsWith:()=>Qo,toLowerCase:()=>os,toUpperCase:()=>ss,trim:()=>as,uppercase:()=>Xo}),Tc=new WeakSet([Object.prototype,Error.prototype]);function Ec(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Dc=b(`ZodError`,(e,t)=>{C.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Tc.has(n)||(Tc.add(n),Ec(n,`format`,e=>t=>ct(e,t)),Ec(n,`flatten`,e=>t=>st(e,t)),Ec(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,l,2)}),Ec(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,l,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Oc=ut(Dc),kc=ft(Dc),Ac=mt(Dc),jc=gt(Dc),Mc=vt(Dc),Nc=yt(Dc),Pc=bt(Dc),Fc=xt(Dc),Ic=St(Dc),Lc=Ct(Dc),Rc=wt(Dc),zc=Tt(Dc),Bc=t({ZodAny:()=>du,ZodArray:()=>bu,ZodBase64:()=>jl,ZodBase64URL:()=>Nl,ZodBigInt:()=>eu,ZodBigIntFormat:()=>nu,ZodBoolean:()=>$l,ZodCIDRv4:()=>Dl,ZodCIDRv6:()=>kl,ZodCUID:()=>dl,ZodCUID2:()=>pl,ZodCatch:()=>sd,ZodCodec:()=>pd,ZodCreditCard:()=>Ll,ZodCustom:()=>Dd,ZodCustomStringFormat:()=>Vl,ZodDate:()=>vu,ZodDefault:()=>$u,ZodDiscriminatedUnion:()=>Du,ZodE164:()=>Fl,ZodEmail:()=>Yc,ZodEmoji:()=>sl,ZodEnum:()=>Bu,ZodExactOptional:()=>Ju,ZodFile:()=>Uu,ZodFunction:()=>Td,ZodGUID:()=>Zc,ZodIPv4:()=>xl,ZodIPv6:()=>Tl,ZodISODate:()=>Kc,ZodISODateTime:()=>Gc,ZodISODuration:()=>Jc,ZodISOTime:()=>qc,ZodIntersection:()=>ku,ZodJWT:()=>zl,ZodKSUID:()=>yl,ZodLazy:()=>xd,ZodLiteral:()=>Hu,ZodMAC:()=>Cl,ZodMap:()=>Iu,ZodNaN:()=>ld,ZodNanoID:()=>ll,ZodNever:()=>mu,ZodNonOptional:()=>rd,ZodNull:()=>lu,ZodNullable:()=>Xu,ZodNumber:()=>Kl,ZodNumberFormat:()=>ql,ZodObject:()=>Su,ZodOptional:()=>qu,ZodPipe:()=>dd,ZodPrefault:()=>td,ZodPreprocess:()=>gd,ZodPromise:()=>Cd,ZodReadonly:()=>_d,ZodRecord:()=>Nu,ZodSet:()=>Ru,ZodString:()=>Wc,ZodStringFormat:()=>j,ZodSuccess:()=>ad,ZodSymbol:()=>au,ZodTemplateLiteral:()=>yd,ZodTransform:()=>Gu,ZodTuple:()=>ju,ZodType:()=>k,ZodULID:()=>hl,ZodURL:()=>il,ZodUUID:()=>$c,ZodUndefined:()=>su,ZodUnion:()=>wu,ZodUnknown:()=>pu,ZodVoid:()=>gu,ZodXID:()=>_l,ZodXor:()=>Tu,_ZodString:()=>Uc,_default:()=>ed,_function:()=>Ed,any:()=>fu,array:()=>F,base64:()=>Ml,base64url:()=>Pl,bigint:()=>tu,boolean:()=>N,catch:()=>cd,check:()=>Od,cidrv4:()=>Ol,cidrv6:()=>Al,codec:()=>md,creditCard:()=>Rl,cuid:()=>fl,cuid2:()=>ml,custom:()=>kd,date:()=>yu,describe:()=>Md,discriminatedUnion:()=>Ou,e164:()=>Il,email:()=>Xc,emoji:()=>cl,enum:()=>B,exactOptional:()=>Yu,file:()=>Wu,float32:()=>Yl,float64:()=>Xl,function:()=>Ed,guid:()=>Qc,hash:()=>Gl,hex:()=>Wl,hostname:()=>Ul,httpUrl:()=>ol,instanceof:()=>Pd,int:()=>Jl,int32:()=>Zl,int64:()=>ru,intersection:()=>Au,invertCodec:()=>hd,ipv4:()=>Sl,ipv6:()=>El,json:()=>Id,jwt:()=>Bl,keyof:()=>xu,ksuid:()=>bl,lazy:()=>Sd,literal:()=>V,looseObject:()=>L,looseRecord:()=>Fu,mac:()=>wl,map:()=>Lu,meta:()=>Nd,nan:()=>ud,nanoid:()=>ul,nativeEnum:()=>Vu,never:()=>hu,nonoptional:()=>id,null:()=>uu,nullable:()=>Zu,nullish:()=>Qu,number:()=>M,object:()=>I,optional:()=>H,partialRecord:()=>Pu,pipe:()=>fd,prefault:()=>nd,preprocess:()=>Ld,promise:()=>wd,readonly:()=>vd,record:()=>z,refine:()=>Ad,set:()=>zu,strictObject:()=>Cu,string:()=>A,stringFormat:()=>Hl,stringbool:()=>Fd,success:()=>od,superRefine:()=>jd,symbol:()=>ou,templateLiteral:()=>bd,transform:()=>Ku,tuple:()=>Mu,uint32:()=>Ql,uint64:()=>iu,ulid:()=>gl,undefined:()=>cu,union:()=>R,unknown:()=>P,url:()=>al,uuid:()=>el,uuidv4:()=>tl,uuidv6:()=>nl,uuidv7:()=>rl,void:()=>_u,xid:()=>vl,xor:()=>Eu});function Vc(){x.localeError||S(Ma())}function Hc(){x.memoizer||S({memoizer:ka()})}var k=b(`ZodType`,(e,t)=>(Vc(),T.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(g(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return de(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ad(e,t))},superRefine(e,t){return this.check(jd(e,t))},overwrite(e){return this.check(rs(e))},optional(){return H(this)},exactOptional(){return Yu(this)},nullable(){return Zu(this)},nullish(){return H(Zu(this))},nonoptional(e){return id(this,e)},array(){return F(this)},or(e){return R([this,e])},and(e){return Au(this,e)},transform(e){return fd(this,Ku(e))},default(e){return ed(this,e)},prefault(e){return nd(this,e)},catch(e){return cd(this,e)},pipe(e){return fd(this,e)},readonly(){return vd(this)},describe(e){let t=this.clone();return Ia.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ia.get(this);let t=this.clone();return Ia.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ie(this,`~standard`,{...hr(this),jsonSchema:{input:Ms(this,`input`),output:Ms(this,`output`)}})},set"~standard"(e){Fe(this,`~standard`,e)},parse:function e(t,n){return Oc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await kc(this,t,n,{callee:e})},safeParse(e,t){return Ac(this,e,t)},async safeParseAsync(e,t){return jc(this,e,t)},get spa(){return this.safeParseAsync},set spa(e){Fe(this,`spa`,e)},encode:function e(t,n){return Mc(this,t,n,{callee:e})},decode:function e(t,n){return Nc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Pc(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Fc(this,t,n,{callee:e})},safeEncode(e,t){return Ic(this,e,t)},safeDecode(e,t){return Lc(this,e,t)},async safeEncodeAsync(e,t){return Rc(this,e,t)},async safeDecodeAsync(e,t){return zc(this,e,t)},get toJSONSchema(){return Fe(this,`toJSONSchema`,js(this,{}))},set toJSONSchema(e){Fe(this,`toJSONSchema`,e)},get description(){return Ia.get(this)?.description},get _def(){return this._zod.def}}),Uc=b(`_ZodString`,(e,t)=>{gr.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ps(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(Jo(...e))},includes(...e){return this.check(Zo(...e))},startsWith(...e){return this.check(Qo(...e))},endsWith(...e){return this.check($o(...e))},min(...e){return this.check(Ko(...e))},max(...e){return this.check(Go(...e))},length(...e){return this.check(qo(...e))},nonempty(...e){return this.check(Ko(1,...e))},lowercase(e){return this.check(Yo(e))},uppercase(e){return this.check(Xo(e))},trim(){return this.check(as())},normalize(...e){return this.check(is(...e))},toLowerCase(){return this.check(os())},toUpperCase(){return this.check(ss())},slugify(){return this.check(cs())}}),Wc=b(`ZodString`,(e,t)=>{gr.init(e,t),Uc.init(e,t)},{email(e){return this.check(Ra(Yc,e))},url(e){return this.check(Wa(il,e))},jwt(e){return this.check(so(zl,e))},emoji(e){return this.check(Ga(sl,e))},guid(e){return this.check(za(Zc,e))},uuid(e){return this.check(Ba($c,e))},uuidv4(e){return this.check(Va($c,e))},uuidv6(e){return this.check(Ha($c,e))},uuidv7(e){return this.check(Ua($c,e))},nanoid(e){return this.check(Ka(ll,e))},cuid(e){return this.check(qa(dl,e))},cuid2(e){return this.check(Ja(pl,e))},ulid(e){return this.check(Ya(hl,e))},base64(e){return this.check(ro(jl,e))},base64url(e){return this.check(io(Nl,e))},xid(e){return this.check(Xa(_l,e))},ksuid(e){return this.check(Za(yl,e))},ipv4(e){return this.check(Qa(xl,e))},ipv6(e){return this.check($a(Tl,e))},cidrv4(e){return this.check(to(Dl,e))},cidrv6(e){return this.check(no(kl,e))},e164(e){return this.check(ao(Fl,e))},datetime(e){return this.check(co(Gc,e))},date(e){return this.check(lo(Kc,e))},time(e){return this.check(uo(qc,e))},duration(e){return this.check(fo(Jc,e))}});function A(e){return La(Wc,e)}var j=b(`ZodStringFormat`,(e,t)=>{E.init(e,t),Uc.init(e,t)}),Gc=b(`ZodISODateTime`,(e,t)=>{Nr.init(e,t),j.init(e,t)}),Kc=b(`ZodISODate`,(e,t)=>{Pr.init(e,t),j.init(e,t)}),qc=b(`ZodISOTime`,(e,t)=>{Fr.init(e,t),j.init(e,t)}),Jc=b(`ZodISODuration`,(e,t)=>{Ir.init(e,t),j.init(e,t)}),Yc=b(`ZodEmail`,(e,t)=>{yr.init(e,t),j.init(e,t)});function Xc(e){return Ra(Yc,e)}var Zc=b(`ZodGUID`,(e,t)=>{_r.init(e,t),j.init(e,t)});function Qc(e){return za(Zc,e)}var $c=b(`ZodUUID`,(e,t)=>{vr.init(e,t),j.init(e,t)});function el(e){return Ba($c,e)}function tl(e){return Va($c,e)}function nl(e){return Ha($c,e)}function rl(e){return Ua($c,e)}var il=b(`ZodURL`,(e,t)=>{Tr.init(e,t),j.init(e,t)});function al(e){return Wa(il,e)}function ol(e){return Wa(il,{protocol:an,hostname:rn,..._(e)})}var sl=b(`ZodEmoji`,(e,t)=>{Er.init(e,t),j.init(e,t)});function cl(e){return Ga(sl,e)}var ll=b(`ZodNanoID`,(e,t)=>{Dr.init(e,t),j.init(e,t)});function ul(e){return Ka(ll,e)}var dl=b(`ZodCUID`,(e,t)=>{Or.init(e,t),j.init(e,t)});function fl(e){return qa(dl,e)}var pl=b(`ZodCUID2`,(e,t)=>{kr.init(e,t),j.init(e,t)});function ml(e){return Ja(pl,e)}var hl=b(`ZodULID`,(e,t)=>{Ar.init(e,t),j.init(e,t)});function gl(e){return Ya(hl,e)}var _l=b(`ZodXID`,(e,t)=>{jr.init(e,t),j.init(e,t)});function vl(e){return Xa(_l,e)}var yl=b(`ZodKSUID`,(e,t)=>{Mr.init(e,t),j.init(e,t)});function bl(e){return Za(yl,e)}var xl=b(`ZodIPv4`,(e,t)=>{Lr.init(e,t),j.init(e,t)});function Sl(e){return Qa(xl,e)}var Cl=b(`ZodMAC`,(e,t)=>{Vr.init(e,t),j.init(e,t)});function wl(e){return eo(Cl,e)}var Tl=b(`ZodIPv6`,(e,t)=>{Br.init(e,t),j.init(e,t)});function El(e){return $a(Tl,e)}var Dl=b(`ZodCIDRv4`,(e,t)=>{Hr.init(e,t),j.init(e,t)});function Ol(e){return to(Dl,e)}var kl=b(`ZodCIDRv6`,(e,t)=>{Wr.init(e,t),j.init(e,t)});function Al(e){return no(kl,e)}var jl=b(`ZodBase64`,(e,t)=>{Kr.init(e,t),j.init(e,t)});function Ml(e){return ro(jl,e)}var Nl=b(`ZodBase64URL`,(e,t)=>{Jr.init(e,t),j.init(e,t)});function Pl(e){return io(Nl,e)}var Fl=b(`ZodE164`,(e,t)=>{Yr.init(e,t),j.init(e,t)});function Il(e){return ao(Fl,e)}var Ll=b(`ZodCreditCard`,(e,t)=>{$r.init(e,t),j.init(e,t)});function Rl(e){return oo(Ll,e)}var zl=b(`ZodJWT`,(e,t)=>{ti.init(e,t),j.init(e,t)});function Bl(e){return so(zl,e)}var Vl=b(`ZodCustomStringFormat`,(e,t)=>{ni.init(e,t),j.init(e,t)});function Hl(e,t,n={}){return vs(Vl,e,t,n)}function Ul(e){return vs(Vl,`hostname`,nn,e)}function Wl(e){return vs(Vl,`hex`,Cn,e)}function Gl(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Et[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return vs(Vl,n,r,t)}var Kl=b(`ZodNumber`,(e,t)=>{ri.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fs(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(Fo(e,t))},gte(e,t){return this.check(Io(e,t))},min(e,t){return this.check(Io(e,t))},lt(e,t){return this.check(No(e,t))},lte(e,t){return this.check(Po(e,t))},max(e,t){return this.check(Po(e,t))},int(e){return this.check(Jl(e))},safe(e){return this.check(Jl(e))},positive(e){return this.check(Fo(0,e))},nonnegative(e){return this.check(Io(0,e))},negative(e){return this.check(No(0,e))},nonpositive(e){return this.check(Po(0,e))},multipleOf(e,t){return this.check(Vo(e,t))},step(e,t){return this.check(Vo(e,t))},finite(){return this}});function M(e){return po(Kl,e)}var ql=b(`ZodNumberFormat`,(e,t)=>{ii.init(e,t),Kl.init(e,t)});function Jl(e){return ho(ql,e)}function Yl(e){return go(ql,e)}function Xl(e){return _o(ql,e)}function Zl(e){return vo(ql,e)}function Ql(e){return yo(ql,e)}var $l=b(`ZodBoolean`,(e,t)=>{ai.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Is(e,t,n,r)});function N(e){return bo($l,e)}var eu=b(`ZodBigInt`,(e,t)=>{oi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ls(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(Io(e,t))},min(e,t){return this.check(Io(e,t))},gt(e,t){return this.check(Fo(e,t))},lt(e,t){return this.check(No(e,t))},lte(e,t){return this.check(Po(e,t))},max(e,t){return this.check(Po(e,t))},positive(e){return this.check(Fo(BigInt(0),e))},negative(e){return this.check(No(BigInt(0),e))},nonpositive(e){return this.check(Po(BigInt(0),e))},nonnegative(e){return this.check(Io(BigInt(0),e))},multipleOf(e,t){return this.check(Vo(e,t))}});function tu(e){return xo(eu,e)}var nu=b(`ZodBigIntFormat`,(e,t)=>{si.init(e,t),eu.init(e,t)});function ru(e){return So(nu,e)}function iu(e){return Co(nu,e)}var au=b(`ZodSymbol`,(e,t)=>{ci.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rs(e,t,n,r)});function ou(e){return wo(au,e)}var su=b(`ZodUndefined`,(e,t)=>{li.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bs(e,t,n,r)});function cu(e){return To(su,e)}var lu=b(`ZodNull`,(e,t)=>{ui.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zs(e,t,n,r)});function uu(e){return Eo(lu,e)}var du=b(`ZodAny`,(e,t)=>{di.init(e,t),k.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function fu(){return Do(du)}var pu=b(`ZodUnknown`,(e,t)=>{fi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function P(){return Oo(pu)}var mu=b(`ZodNever`,(e,t)=>{pi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hs(e,t,n,r)});function hu(e){return ko(mu,e)}var gu=b(`ZodVoid`,(e,t)=>{mi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vs(e,t,n,r)});function _u(e){return Ao(gu,e)}var vu=b(`ZodDate`,(e,t)=>{hi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gs(e,t,n,r),e.min=(t,n)=>e.check(Io(t,n)),e.max=(t,n)=>e.check(Po(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function yu(e){return jo(vu,e)}var bu=b(`ZodArray`,(e,t)=>{Hc(),_i.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rc(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Ko(e,t))},nonempty(e){return this.check(Ko(1,e))},max(e,t){return this.check(Go(e,t))},length(e,t){return this.check(qo(e,t))},unwrap(){return this.element}});function F(e,t){return ls(bu,e,t)}function xu(e){let t=e._zod.def.shape;return B(Object.keys(t))}var Su=b(`ZodObject`,(e,t)=>{Hc(),wi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ac(e,t,n,r),He(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return B(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:P()})},loose(){return this.clone({...this._zod.def,catchall:P()})},strict(){return this.clone({...this._zod.def,catchall:hu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return ve(this,e)},safeExtend(e){return ye(this,e)},merge(e){return be(this,e)},pick(e){return ge(this,e)},omit(e){return _e(this,e)},partial(...e){return xe(qu,this,e[0])},exactPartial(...e){return xe(Ju,this,e[0],`exactPartial`)},required(...e){return Se(rd,this,e[0])}});function I(e,t){return new Su({type:`object`,shape:e??{},..._(t)})}function Cu(e,t){return new Su({type:`object`,shape:e,catchall:hu(),..._(t)})}function L(e,t){return new Su({type:`object`,shape:e,catchall:P(),..._(t)})}var wu=b(`ZodUnion`,(e,t)=>{Ei.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oc(e,t,n,r),e.options=t.options});function R(e,t){return new wu({type:`union`,options:e,..._(t)})}var Tu=b(`ZodXor`,(e,t)=>{wu.init(e,t),Oi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oc(e,t,n,r),e.options=t.options});function Eu(e,t){return new Tu({type:`union`,options:e,inclusive:!1,..._(t)})}var Du=b(`ZodDiscriminatedUnion`,(e,t)=>{wu.init(e,t),ki.init(e,t)});function Ou(e,t,n){return new Du({type:`union`,options:t,discriminator:e,..._(n)})}var ku=b(`ZodIntersection`,(e,t)=>{Ai.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sc(e,t,n,r)});function Au(e,t){return new ku({type:`intersection`,left:e,right:t})}var ju=b(`ZodTuple`,(e,t)=>{Hc(),Ni.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cc(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new qu({type:`optional`,innerType:e}))})}});function Mu(e,t,n){let r=t instanceof T;return new ju({type:`tuple`,items:e,rest:r?t:null,..._(r?n:t)})}var Nu=b(`ZodRecord`,(e,t)=>{Hc(),Li.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function z(e,t,n){return!t||!t._zod?new Nu({type:`record`,keyType:A(),valueType:e,..._(t)}):new Nu({type:`record`,keyType:e,valueType:t,..._(n)})}function Pu(e,t,n){return new Nu({type:`record`,keyType:e,valueType:t,..._(n),partial:!0})}function Fu(e,t,n){return new Nu({type:`record`,keyType:e,valueType:t,mode:`loose`,..._(n)})}var Iu=b(`ZodMap`,(e,t)=>{Hc(),Ri.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(Uo(...t)),e.nonempty=t=>e.check(Uo(1,t)),e.max=(...t)=>e.check(Ho(...t)),e.size=(...t)=>e.check(Wo(...t))});function Lu(e,t,n){return new Iu({type:`map`,keyType:e,valueType:t,..._(n)})}var Ru=b(`ZodSet`,(e,t)=>{Hc(),Bi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nc(e,t,n,r),e.min=(...t)=>e.check(Uo(...t)),e.nonempty=t=>e.check(Uo(1,t)),e.max=(...t)=>e.check(Ho(...t)),e.size=(...t)=>e.check(Wo(...t))});function zu(e,t){return new Ru({type:`set`,valueType:e,..._(t)})}var Bu=b(`ZodEnum`,(e,t)=>{Hi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ks(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Bu({...t,checks:[],..._(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Bu({...t,checks:[],..._(r),entries:i})}});function B(e,t){return new Bu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,..._(t)})}function Vu(e,t){return new Bu({type:`enum`,entries:e,..._(t)})}var Hu=b(`ZodLiteral`,(e,t)=>{Ui.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qs(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function V(e,t){return new Hu({type:`literal`,values:Array.isArray(e)?e:[e],..._(t)})}var Uu=b(`ZodFile`,(e,t)=>{Wi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xs(e,t,n,r),e.min=(t,n)=>e.check(Uo(t,n)),e.max=(t,n)=>e.check(Ho(t,n)),e.mime=(t,n)=>e.check(ns(Array.isArray(t)?t:[t],n))});function Wu(e){return us(Uu,e)}var Gu=b(`ZodTransform`,(e,t)=>{Hc(),Gi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ec(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ze(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ne(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ne(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ku(e){return new Gu({type:`transform`,transform:e})}var qu=b(`ZodOptional`,(e,t)=>{qi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function H(e){return new qu({type:`optional`,innerType:e})}var Ju=b(`ZodExactOptional`,(e,t)=>{Ji.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Ju({type:`optional`,innerType:e})}var Xu=b(`ZodNullable`,(e,t)=>{Yi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Xu({type:`nullable`,innerType:e})}function Qu(e){return H(Zu(e))}var $u=b(`ZodDefault`,(e,t)=>{Xi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ed(e,t){return new $u({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var td=b(`ZodPrefault`,(e,t)=>{Qi.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nd(e,t){return new td({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var rd=b(`ZodNonOptional`,(e,t)=>{$i.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function id(e,t){return new rd({type:`nonoptional`,innerType:e,..._(t)})}var ad=b(`ZodSuccess`,(e,t)=>{ta.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function od(e){return new ad({type:`success`,innerType:e})}var sd=b(`ZodCatch`,(e,t)=>{ra.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function cd(e,t){return new sd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:We(t)})}var ld=b(`ZodNaN`,(e,t)=>{ia.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Js(e,t,n,r)});function ud(e){return Mo(ld,e)}var dd=b(`ZodPipe`,(e,t)=>{aa.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r),e.in=t.in,e.out=t.out});function fd(e,t){return new dd({type:`pipe`,in:e,out:t})}var pd=b(`ZodCodec`,(e,t)=>{dd.init(e,t),sa.init(e,t)});function md(e,t,n){return new pd({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function hd(e){let t=e._zod.def;return new pd({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var gd=b(`ZodPreprocess`,(e,t)=>{dd.init(e,t),ua.init(e,t)}),_d=b(`ZodReadonly`,(e,t)=>{da.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vd(e){return new _d({type:`readonly`,innerType:e})}var yd=b(`ZodTemplateLiteral`,(e,t)=>{pa.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ys(e,t,n,r)});function bd(e,t){return new yd({type:`template_literal`,parts:e,..._(t)})}var xd=b(`ZodLazy`,(e,t)=>{ga.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Sd(e){return new xd({type:`lazy`,getter:e})}var Cd=b(`ZodPromise`,(e,t)=>{ha.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wd(e){return new Cd({type:`promise`,innerType:e})}var Td=b(`ZodFunction`,(e,t)=>{ma.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$s(e,t,n,r)});function Ed(e){return new Td({type:`function`,input:Array.isArray(e?.input)?Mu(e?.input):e?.input??F(P()),output:e?.output??P()})}var Dd=b(`ZodCustom`,(e,t)=>{_a.init(e,t),k.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qs(e,t,n,r)});function Od(e){let t=new w({check:`custom`});return t._zod.check=e,t}function kd(e,t){return ds(Dd,e??(()=>!0),t)}function Ad(e,t={}){return fs(Dd,e,t)}function jd(e,t){return ps(e,t)}var Md=hs,Nd=gs;function Pd(e,t={}){let n=new Dd({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,..._(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Fd=(...e)=>_s({Codec:pd,Boolean:$l,String:Wc},...e);function Id(e){let t=Sd(()=>R([A(e),M(),N(),uu(),F(t),z(A(),t)]));return t}function Ld(e,t){return new gd({type:`pipe`,in:Ku(e),out:t})}var Rd={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},zd;zd||={};var Bd=t({ZodISODate:()=>Kc,ZodISODateTime:()=>Gc,ZodISODuration:()=>Jc,ZodISOTime:()=>qc,date:()=>Hd,datetime:()=>Vd,duration:()=>Wd,time:()=>Ud});function Vd(e){return co(Gc,e)}function Hd(e){return lo(Kc,e)}function Ud(e){return uo(qc,e)}function Wd(e){return fo(Jc,e)}var U={...Bc,...wc,iso:Bd},Gd=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Kd(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function qd(e,t){return e.map((e,n)=>n<t?e:e.optional())}function Jd(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Yd(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1]===void 0?void 0:Jd(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Xd(e,t){return U.transform(e=>e).check(e=>{let n=e.value;if(!(typeof n!=`object`||!n||Array.isArray(n)))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function Zd(e,t){if(e!==!1)return e===void 0||e===!0?U.any():ef(e,t)}var Qd=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function $d(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return U.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return U.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=ef(Yd(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return U.null();if(n.length===0)return U.never();if(n.length===1)return U.literal(n[0]);if(n.every(e=>typeof e==`string`))return U.enum(n);let r=n.map(e=>U.literal(e));return r.length<2?r[0]:U.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return U.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>$d({...e,type:n},t));return r.length===0?U.never():r.length===1?r[0]:U.union(r)}if(!n)return U.any();let r;switch(n){case`string`:{let t=U.string();if(e.format){let n=e.format;n===`email`?t=t.check(U.email()):n===`uri`||n===`uri-reference`?t=t.check(U.url()):n===`uuid`||n===`guid`?t=t.check(U.uuid()):n===`date-time`?t=t.check(U.iso.datetime({offset:!0})):n===`date`?t=t.check(U.iso.date()):n===`time`?t=t.check(U.regex(Qd)):n===`duration`?t=t.check(U.iso.duration()):n===`hostname`?t=t.check(U.hostname()):n===`ipv4`?t=t.check(U.ipv4()):n===`ipv6`?t=t.check(U.ipv6()):n===`mac`?t=t.check(U.mac()):n===`cidr`?t=t.check(U.cidrv4()):n===`cidr-v6`?t=t.check(U.cidrv6()):n===`base64`?t=t.check(U.base64()):n===`base64url`?t=t.check(U.base64url()):n===`e164`?t=t.check(U.e164()):n===`credit_card`?t=t.check(U.creditCard()):n===`jwt`?t=t.check(U.jwt()):n===`emoji`?t=t.check(U.emoji()):n===`nanoid`?t=t.check(U.nanoid()):n===`cuid`?t=t.check(U.cuid()):n===`cuid2`?t=t.check(U.cuid2()):n===`ulid`?t=t.check(U.ulid()):n===`xid`?t=t.check(U.xid()):n===`ksuid`&&(t=t.check(U.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?U.number().int():U.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=U.boolean();break;case`null`:r=U.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?ef(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=ef(r,t);h(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=ef(i[e],t),r=U.string().regex(new RegExp(e));o.push(U.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(U.object(n).passthrough()),s.push(...o),s.length===0)r=U.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=U.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=U.intersection(e,s[t]);r=e}if(e.additionalProperties===!1){let e=Object.keys(n),t=a.map(e=>new RegExp(e)),i=r;r=r.check(n=>{if(!oe(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=U.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=Xd(r,ef(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=qd(n.map(e=>ef(e,t)),a),s=Array.isArray(i)?void 0:Zd(i,t),c=U.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(U.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(U.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=qd(i.map(e=>ef(e,t)),n),o=Zd(e.additionalItems,t),s=U.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(U.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(U.maxLength(e.maxItems)))}else if(i!==void 0){let n=ef(i,t),a=U.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=U.array(U.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function ef(e,t){if(typeof e==`boolean`)return e?U.any():U.never();let n=$d(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>ef(e,t)),a=U.union(i);n=r?U.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>ef(e,t)),a=U.xor(i);n=r?U.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:U.any();else{let i=r?n:ef(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=U.intersection(i,ef(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=U.nullable(n)),e.readOnly===!0&&(n=U.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);e.propertyNames!==void 0&&e.type===`object`&&e.$ref===void 0&&(i.propertyNames=e.propertyNames);for(let t of Object.keys(e))Gd.has(t)||h(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function tf(e,t){if(typeof e==`boolean`)return e?U.any():U.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Kd(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ia};return ef(n,r)}function nf(e){return mo(Kl,e)}var rf=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],af=`io.modelcontextprotocol/related-task`,of=`io.modelcontextprotocol/protocolVersion`,sf=`io.modelcontextprotocol/clientInfo`,cf=`io.modelcontextprotocol/serverInfo`,lf=`io.modelcontextprotocol/clientCapabilities`,uf=`io.modelcontextprotocol/subscriptionId`,df=`io.modelcontextprotocol/logLevel`,ff=Sd(()=>R([A(),M(),N(),uu(),z(A(),ff),F(ff)])),W=z(A(),ff),pf=F(ff),mf=R([A(),M().int()]),hf=A(),gf=I({ttl:M().optional()}),_f=I({taskId:A()}),vf=L({progressToken:mf.optional(),[af]:_f.optional()}),yf=I({_meta:vf.optional()}),bf=yf.extend({task:gf.optional()}),G=I({method:A(),params:yf.loose().optional()}),xf=I({_meta:vf.optional()}),Sf=I({method:A(),params:xf.loose().optional()}),Cf=L({get[cf](){return Lf.optional().catch(void 0)}}),K=L({_meta:Cf.optional()}),wf=R([A(),M().int()]),Tf=I({jsonrpc:V(`2.0`),id:wf,...G.shape}).strict(),Ef=I({jsonrpc:V(`2.0`),...Sf.shape}).strict(),Df=I({jsonrpc:V(`2.0`),id:wf,result:K}).strict(),Of=I({jsonrpc:V(`2.0`),id:wf.optional(),error:I({code:M().int(),message:A(),data:P().optional()})}).strict(),kf=R([Tf,Ef,Df,Of]),Af=R([Df,Of]),jf=K.strict(),Mf=xf.extend({requestId:wf.optional(),reason:A().optional()}),Nf=Sf.extend({method:V(`notifications/cancelled`),params:Mf}),Pf=I({src:A(),mimeType:A().optional(),sizes:F(A()).optional(),theme:B([`light`,`dark`]).optional()}),Ff=I({icons:F(Pf).optional()}),If=I({name:A(),title:A().optional()}),Lf=If.extend({...If.shape,...Ff.shape,version:A(),websiteUrl:A().optional(),description:A().optional()}),Rf=Ld(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Au(I({form:Au(I({applyDefaults:N().optional()}),W).optional(),url:W.optional()}),W.optional())),zf=L({list:W.optional(),cancel:W.optional(),requests:L({sampling:L({createMessage:W.optional()}).optional(),elicitation:L({create:W.optional()}).optional()}).optional()}),Bf=L({list:W.optional(),cancel:W.optional(),requests:L({tools:L({call:W.optional()}).optional()}).optional()}),Vf=I({experimental:z(A(),W).optional(),sampling:I({context:W.optional(),tools:W.optional()}).optional(),elicitation:Rf.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:zf.optional(),extensions:z(A(),W).optional()}),Hf=yf.extend({protocolVersion:A(),capabilities:Vf,clientInfo:Lf}),Uf=G.extend({method:V(`initialize`),params:Hf}),Wf=I({experimental:z(A(),W).optional(),logging:W.optional(),completions:W.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:Bf.optional(),extensions:z(A(),W).optional()}),Gf=K.extend({protocolVersion:A(),capabilities:Wf,serverInfo:Lf,instructions:A().optional()}),Kf=Sf.extend({method:V(`notifications/initialized`),params:xf.optional()}),qf=G.extend({method:V(`server/discover`),params:yf.optional()}),Jf=K.extend({supportedVersions:F(A()),capabilities:Wf,instructions:A().optional()}),Yf=G.extend({method:V(`ping`),params:yf.optional()}),Xf=I({progress:M(),total:H(M()),message:H(A())}),Zf=I({...xf.shape,...Xf.shape,progressToken:mf}),Qf=Sf.extend({method:V(`notifications/progress`),params:Zf}),$f=yf.extend({cursor:hf.optional()}),ep=G.extend({params:$f.optional()}),tp=K.extend({nextCursor:hf.optional()}),np=I({uri:A(),mimeType:H(A()),_meta:z(A(),P()).optional()}),rp=np.extend({text:A()}),ip=A().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ap=np.extend({blob:ip}),op=B([`user`,`assistant`]),sp=I({audience:F(op).optional(),priority:M().min(0).max(1).optional(),lastModified:Vd({offset:!0}).optional()}),cp=I({...If.shape,...Ff.shape,uri:A(),description:H(A()),mimeType:H(A()),size:H(M()),annotations:sp.optional(),_meta:H(L({}))}),lp=I({...If.shape,...Ff.shape,uriTemplate:A(),description:H(A()),mimeType:H(A()),annotations:sp.optional(),_meta:H(L({}))}),up=ep.extend({method:V(`resources/list`)}),dp=tp.extend({resources:F(cp)}),fp=ep.extend({method:V(`resources/templates/list`)}),pp=tp.extend({resourceTemplates:F(lp)}),mp=yf.extend({uri:A()}),hp=mp,gp=G.extend({method:V(`resources/read`),params:hp}),_p=K.extend({contents:F(R([rp,ap]))}),vp=Sf.extend({method:V(`notifications/resources/list_changed`),params:xf.optional()}),yp=mp,bp=G.extend({method:V(`resources/subscribe`),params:yp}),xp=mp,Sp=G.extend({method:V(`resources/unsubscribe`),params:xp}),Cp=I({toolsListChanged:N().optional(),promptsListChanged:N().optional(),resourcesListChanged:N().optional(),resourceSubscriptions:F(A()).optional()}),wp=yf.extend({notifications:Cp}),Tp=G.extend({method:V(`subscriptions/listen`),params:wp}),Ep=xf.extend({notifications:Cp}),Dp=Sf.extend({method:V(`notifications/subscriptions/acknowledged`),params:Ep}),Op=Cf.extend({[uf]:wf}),kp=K.extend({_meta:Op}),Ap=xf.extend({uri:A()}),jp=Sf.extend({method:V(`notifications/resources/updated`),params:Ap}),Mp=I({name:A(),description:H(A()),required:H(N())}),Np=I({...If.shape,...Ff.shape,description:H(A()),arguments:H(F(Mp)),_meta:H(L({}))}),Pp=ep.extend({method:V(`prompts/list`)}),Fp=tp.extend({prompts:F(Np)}),Ip=yf.extend({name:A(),arguments:z(A(),A()).optional()}),Lp=G.extend({method:V(`prompts/get`),params:Ip}),Rp=I({type:V(`text`),text:A(),annotations:sp.optional(),_meta:z(A(),P()).optional()}),zp=I({type:V(`image`),data:ip,mimeType:A(),annotations:sp.optional(),_meta:z(A(),P()).optional()}),Bp=I({type:V(`audio`),data:ip,mimeType:A(),annotations:sp.optional(),_meta:z(A(),P()).optional()}),Vp=I({type:V(`tool_use`),name:A(),id:A(),input:z(A(),P()),_meta:z(A(),P()).optional()}),Hp=I({type:V(`resource`),resource:R([rp,ap]),annotations:sp.optional(),_meta:z(A(),P()).optional()}),Up=cp.extend({type:V(`resource_link`)}),Wp=R([Rp,zp,Bp,Up,Hp]),Gp=I({role:op,content:Wp}),Kp=K.extend({description:A().optional(),messages:F(Gp)}),qp=Sf.extend({method:V(`notifications/prompts/list_changed`),params:xf.optional()}),Jp=I({title:A().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),Yp=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),Xp=I({...If.shape,...Ff.shape,description:A().optional(),inputSchema:I({type:V(`object`),properties:z(A(),ff).optional(),required:F(A()).optional()}).catchall(P()),outputSchema:L({$schema:A().optional()}).optional(),annotations:Jp.optional(),execution:Yp.optional(),_meta:z(A(),P()).optional()}),Zp=ep.extend({method:V(`tools/list`)}),Qp=tp.extend({tools:F(Xp)}),$p=K.extend({content:F(Wp).default([]),structuredContent:P().optional(),isError:N().optional()}),em=$p.or(K.extend({toolResult:P()})),tm=bf.extend({name:A(),arguments:z(A(),P()).optional()}),nm=G.extend({method:V(`tools/call`),params:tm}),rm=Sf.extend({method:V(`notifications/tools/list_changed`),params:xf.optional()}),im=I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)}),am=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),om=yf.extend({level:am}),sm=G.extend({method:V(`logging/setLevel`),params:om}),cm=xf.extend({level:am,logger:A().optional(),data:P()}),lm=Sf.extend({method:V(`notifications/message`),params:cm}),um=I({name:A().optional()}),dm=I({hints:F(um).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),fm=I({mode:B([`auto`,`required`,`none`]).optional()}),pm=I({type:V(`tool_result`),toolUseId:A().describe(`The unique identifier for the corresponding tool call.`),content:F(Wp),structuredContent:P().optional(),isError:N().optional(),_meta:z(A(),P()).optional()}),mm=Ou(`type`,[Rp,zp,Bp]),hm=Ou(`type`,[Rp,zp,Bp,Vp,pm]),gm=I({role:op,content:R([hm,F(hm)]),_meta:z(A(),P()).optional()}),_m=bf.extend({messages:F(gm),modelPreferences:dm.optional(),systemPrompt:A().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(A()).optional(),metadata:W.optional(),tools:F(Xp).optional(),toolChoice:fm.optional()}),vm=G.extend({method:V(`sampling/createMessage`),params:_m}),ym=K.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(A())),role:op,content:mm}),bm=K.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(A())),role:op,content:R([hm,F(hm)])}),xm=I({type:V(`boolean`),title:A().optional(),description:A().optional(),default:N().optional()}),Sm=I({type:V(`string`),title:A().optional(),description:A().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:A().optional()}),Cm=I({type:B([`number`,`integer`]),title:A().optional(),description:A().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),wm=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),default:A().optional()}),Tm=I({type:V(`string`),title:A().optional(),description:A().optional(),oneOf:F(I({const:A(),title:A()})),default:A().optional()}),Em=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),enumNames:F(A()).optional(),default:A().optional()}),Dm=R([wm,Tm]),Om=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(A())}),default:F(A()).optional()}),km=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:A(),title:A()}))}),default:F(A()).optional()}),Am=R([Om,km]),jm=R([Em,Dm,Am]),Mm=R([jm,xm,Sm,Cm]),Nm=bf.extend({mode:V(`form`).optional(),message:A(),requestedSchema:I({type:V(`object`),properties:z(A(),Mm),required:F(A()).optional()}).catchall(P())}),Pm=bf.extend({mode:V(`url`),message:A(),elicitationId:A(),url:A().url()}),Fm=R([Nm,Pm]),Im=G.extend({method:V(`elicitation/create`),params:Fm}),Lm=xf.extend({elicitationId:A()}),Rm=Sf.extend({method:V(`notifications/elicitation/complete`),params:Lm}),zm=K.extend({action:B([`accept`,`decline`,`cancel`]),content:Ld(e=>e===null?void 0:e,z(A(),R([A(),M(),N(),F(A())])).optional())}),Bm=I({type:V(`ref/resource`),uri:A()}),Vm=I({type:V(`ref/prompt`),name:A()}),Hm=yf.extend({ref:R([Vm,Bm]),argument:I({name:A(),value:A()}),context:I({arguments:z(A(),A()).optional()}).optional()}),Um=G.extend({method:V(`completion/complete`),params:Hm}),Wm=K.extend({completion:L({values:F(A()).max(100),total:H(M().int()),hasMore:H(N())})}),Gm=I({uri:A().startsWith(`file://`),name:A().optional(),_meta:z(A(),P()).optional()}),Km=G.extend({method:V(`roots/list`),params:yf.optional()}),qm=K.extend({roots:F(Gm)}),Jm=Sf.extend({method:V(`notifications/roots/list_changed`),params:xf.optional()}),Ym=L({ttl:M().optional(),pollInterval:M().optional()}),Xm=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Zm=I({taskId:A(),status:Xm,ttl:R([M(),uu()]),createdAt:A(),lastUpdatedAt:A(),pollInterval:H(M()),statusMessage:H(A())}),Qm=K.extend({task:Zm}),$m=xf.merge(Zm),eh=Sf.extend({method:V(`notifications/tasks/status`),params:$m}),th=G.extend({method:V(`tasks/get`),params:yf.extend({taskId:A()})}),nh=K.merge(Zm),rh=G.extend({method:V(`tasks/result`),params:yf.extend({taskId:A()})}),ih=K.loose(),ah=ep.extend({method:V(`tasks/list`)}),oh=tp.extend({tasks:F(Zm)}),sh=G.extend({method:V(`tasks/cancel`),params:yf.extend({taskId:A()})}),ch=K.merge(Zm),lh=R([Yf,Uf,qf,Um,sm,Lp,Pp,up,fp,gp,bp,Sp,Tp,nm,Zp]),uh=R([Nf,Qf,Kf,Jm]),dh=R([jf,ym,bm,zm,qm]),fh=R([Yf,vm,Im,Km]),ph=R([Nf,Qf,lm,jp,vp,rm,qp,Dp,Rm]),mh=R([jf,Gf,Jf,Wm,Kp,Fp,dp,pp,_p,$p,Qp,kp]),q=al().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Rd.custom,message:`URL must be parseable`,fatal:!0}),Ke}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),hh=L({resource:A().url(),authorization_servers:F(q).optional(),jwks_uri:A().url().optional(),scopes_supported:F(A()).optional(),bearer_methods_supported:F(A()).optional(),resource_signing_alg_values_supported:F(A()).optional(),resource_name:A().optional(),resource_documentation:A().optional(),resource_policy_uri:A().url().optional(),resource_tos_uri:A().url().optional(),tls_client_certificate_bound_access_tokens:N().optional(),authorization_details_types_supported:F(A()).optional(),dpop_signing_alg_values_supported:F(A()).optional(),dpop_bound_access_tokens_required:N().optional()}),gh=L({issuer:A(),authorization_endpoint:q,token_endpoint:q,registration_endpoint:q.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),service_documentation:q.optional(),revocation_endpoint:q.optional(),revocation_endpoint_auth_methods_supported:F(A()).optional(),revocation_endpoint_auth_signing_alg_values_supported:F(A()).optional(),introspection_endpoint:A().optional(),introspection_endpoint_auth_methods_supported:F(A()).optional(),introspection_endpoint_auth_signing_alg_values_supported:F(A()).optional(),code_challenge_methods_supported:F(A()).optional(),client_id_metadata_document_supported:N().optional(),authorization_response_iss_parameter_supported:N().optional().catch(void 0)}),_h=L({issuer:A(),authorization_endpoint:q,token_endpoint:q,userinfo_endpoint:q.optional(),jwks_uri:q,registration_endpoint:q.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),acr_values_supported:F(A()).optional(),subject_types_supported:F(A()),id_token_signing_alg_values_supported:F(A()),id_token_encryption_alg_values_supported:F(A()).optional(),id_token_encryption_enc_values_supported:F(A()).optional(),userinfo_signing_alg_values_supported:F(A()).optional(),userinfo_encryption_alg_values_supported:F(A()).optional(),userinfo_encryption_enc_values_supported:F(A()).optional(),request_object_signing_alg_values_supported:F(A()).optional(),request_object_encryption_alg_values_supported:F(A()).optional(),request_object_encryption_enc_values_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),display_values_supported:F(A()).optional(),claim_types_supported:F(A()).optional(),claims_supported:F(A()).optional(),service_documentation:A().optional(),claims_locales_supported:F(A()).optional(),ui_locales_supported:F(A()).optional(),claims_parameter_supported:N().optional(),request_parameter_supported:N().optional(),request_uri_parameter_supported:N().optional(),require_request_uri_registration:N().optional(),op_policy_uri:q.optional(),op_tos_uri:q.optional(),client_id_metadata_document_supported:N().optional(),authorization_response_iss_parameter_supported:N().optional().catch(void 0)}),vh=I({..._h.shape,...gh.pick({code_challenge_methods_supported:!0}).shape}),yh=I({access_token:A(),id_token:A().optional(),token_type:A(),expires_in:nf().optional(),scope:A().optional(),refresh_token:A().optional()}).strip(),bh=I({issued_token_type:V(`urn:ietf:params:oauth:token-type:id-jag`),access_token:A(),token_type:A().optional(),expires_in:M().optional(),scope:A().optional()}).strip(),xh=I({error:A(),error_description:A().optional(),error_uri:A().optional()}),Sh=q.optional().or(V(``).transform(()=>void 0)),Ch=I({redirect_uris:F(q),token_endpoint_auth_method:A().optional(),grant_types:F(A()).optional(),response_types:F(A()).optional(),application_type:A().optional(),client_name:A().optional(),client_uri:q.optional(),logo_uri:Sh,scope:A().optional(),contacts:F(A()).optional(),tos_uri:Sh,policy_uri:A().optional(),jwks_uri:q.optional(),jwks:fu().optional(),software_id:A().optional(),software_version:A().optional(),software_statement:A().optional()}).strip(),wh=I({client_id:A(),client_secret:A().optional(),client_id_issued_at:M().optional(),client_secret_expires_at:M().optional()}).strip(),Th=Ch.merge(wh),Eh=I({error:A(),error_description:A().optional()}).strip(),Dh=I({token:A(),token_type_hint:A().optional()}).strip(),Oh=Symbol.for(`mcp.sdk.errorBrands`);function kh(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Oh,{value:n,enumerable:!1,configurable:!0})}function Ah(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Oh)){let n=t[Oh];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,kh(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var jh=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),J=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,kh(this,new.target)}};(class extends J{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n){super(e,t,n),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}});var Mh=`2026-07-28`;function Nh(e){return e>=Mh}function Ph(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Fh=[`task`,`inputRequests`,`requestState`];function Ih(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Fh.some(t=>t in e)?e:{...e,content:[]}}function Lh(){let e=Sd(()=>R([A(),M(),N(),uu(),z(A(),e),F(e)])),t=z(A(),e),n=R([A(),M().int()]),r=A(),i=I({ttl:M().optional()}),a=I({taskId:A()}),o=L({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=I({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=I({method:A(),params:s.loose().optional()}),u=I({_meta:o.optional()}),d=I({method:A(),params:u.loose().optional()}),f=L({_meta:o.optional()}),p=R([A(),M().int()]),m=f.strict(),ee=u.extend({requestId:p.optional(),reason:A().optional()}),h=d.extend({method:V(`notifications/cancelled`),params:ee}),g=I({src:A(),mimeType:A().optional(),sizes:F(A()).optional(),theme:B([`light`,`dark`]).optional()}),te=I({icons:F(g).optional()}),ne=I({name:A(),title:A().optional()}),re=ne.extend({...ne.shape,...te.shape,version:A(),websiteUrl:A().optional(),description:A().optional()}),ie=Ld(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Au(I({form:Au(I({applyDefaults:N().optional()}),t).optional(),url:t.optional()}),t.optional())),ae=L({list:t.optional(),cancel:t.optional(),requests:L({sampling:L({createMessage:t.optional()}).optional(),elicitation:L({create:t.optional()}).optional()}).optional()}),oe=L({list:t.optional(),cancel:t.optional(),requests:L({tools:L({call:t.optional()}).optional()}).optional()}),se=I({experimental:z(A(),t).optional(),sampling:I({context:t.optional(),tools:t.optional()}).optional(),elicitation:ie.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:ae.optional(),extensions:z(A(),t).optional()}),ce=s.extend({protocolVersion:A(),capabilities:se,clientInfo:re}),le=l.extend({method:V(`initialize`),params:ce}),ue=I({experimental:z(A(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:oe.optional(),extensions:z(A(),t).optional()}),de=f.extend({protocolVersion:A(),capabilities:ue,serverInfo:re,instructions:A().optional()}),_=d.extend({method:V(`notifications/initialized`),params:u.optional()}),fe=l.extend({method:V(`ping`),params:s.optional()}),pe=I({progress:M(),total:H(M()),message:H(A())}),me=I({...u.shape,...pe.shape,progressToken:n}),he=d.extend({method:V(`notifications/progress`),params:me}),ge=s.extend({cursor:r.optional()}),_e=l.extend({params:ge.optional()}),ve=f.extend({nextCursor:r.optional()}),ye=I({uri:A(),mimeType:H(A()),_meta:z(A(),P()).optional()}),be=ye.extend({text:A()}),xe=A().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Se=ye.extend({blob:xe}),Ce=B([`user`,`assistant`]),we=I({audience:F(Ce).optional(),priority:M().min(0).max(1).optional(),lastModified:Vd({offset:!0}).optional()}),v=I({...ne.shape,...te.shape,uri:A(),description:H(A()),mimeType:H(A()),size:H(M()),annotations:we.optional(),_meta:H(L({}))}),Te=I({...ne.shape,...te.shape,uriTemplate:A(),description:H(A()),mimeType:H(A()),annotations:we.optional(),_meta:H(L({}))}),Ee=_e.extend({method:V(`resources/list`)}),De=ve.extend({resources:F(v)}),Oe=_e.extend({method:V(`resources/templates/list`)}),ke=ve.extend({resourceTemplates:F(Te)}),Ae=s.extend({uri:A()}),je=Ae,Me=l.extend({method:V(`resources/read`),params:je}),Ne=f.extend({contents:F(R([be,Se]))}),Pe=d.extend({method:V(`notifications/resources/list_changed`),params:u.optional()}),Fe=Ae,Ie=l.extend({method:V(`resources/subscribe`),params:Fe}),Le=Ae,Re=l.extend({method:V(`resources/unsubscribe`),params:Le}),ze=u.extend({uri:A()}),Be=d.extend({method:V(`notifications/resources/updated`),params:ze}),Ve=I({name:A(),description:H(A()),required:H(N())}),y=I({...ne.shape,...te.shape,description:H(A()),arguments:H(F(Ve)),_meta:H(L({}))}),He=_e.extend({method:V(`prompts/list`)}),Ue=ve.extend({prompts:F(y)}),We=s.extend({name:A(),arguments:z(A(),A()).optional()}),Ge=l.extend({method:V(`prompts/get`),params:We}),Ke=I({type:V(`text`),text:A(),annotations:we.optional(),_meta:z(A(),P()).optional()}),qe=I({type:V(`image`),data:xe,mimeType:A(),annotations:we.optional(),_meta:z(A(),P()).optional()}),Je=I({type:V(`audio`),data:xe,mimeType:A(),annotations:we.optional(),_meta:z(A(),P()).optional()}),Ye=I({type:V(`tool_use`),name:A(),id:A(),input:z(A(),P()),_meta:z(A(),P()).optional()}),b=I({type:V(`resource`),resource:R([be,Se]),annotations:we.optional(),_meta:z(A(),P()).optional()}),Xe=v.extend({type:V(`resource_link`)}),Ze=R([Ke,qe,Je,Xe,b]),x=I({role:Ce,content:Ze}),S=f.extend({description:A().optional(),messages:F(x)}),Qe=d.extend({method:V(`notifications/prompts/list_changed`),params:u.optional()}),$e=I({title:A().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),et=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),tt=I({...ne.shape,...te.shape,description:A().optional(),inputSchema:I({type:V(`object`),properties:z(A(),e).optional(),required:F(A()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(A(),e).optional(),required:F(A()).optional()}).catchall(P()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:z(A(),P()).optional()}),nt=_e.extend({method:V(`tools/list`)}),rt=ve.extend({tools:F(tt)}),it=f.extend({content:F(Ze),structuredContent:z(A(),P()).optional(),isError:N().optional()}),C=c.extend({name:A(),arguments:z(A(),P()).optional()}),at=l.extend({method:V(`tools/call`),params:C}),ot=d.extend({method:V(`notifications/tools/list_changed`),params:u.optional()}),st=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),ct=s.extend({level:st}),lt=l.extend({method:V(`logging/setLevel`),params:ct}),ut=u.extend({level:st,logger:A().optional(),data:P()}),dt=d.extend({method:V(`notifications/message`),params:ut}),ft=I({name:A().optional()}),pt=I({hints:F(ft).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),mt=I({mode:B([`auto`,`required`,`none`]).optional()}),ht=I({type:V(`tool_result`),toolUseId:A().describe(`The unique identifier for the corresponding tool call.`),content:F(Ze),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(A(),P()).optional()}),gt=Ou(`type`,[Ke,qe,Je]),_t=Ou(`type`,[Ke,qe,Je,Ye,ht]),vt=I({role:Ce,content:R([_t,F(_t)]),_meta:z(A(),P()).optional()}),yt=c.extend({messages:F(vt),modelPreferences:pt.optional(),systemPrompt:A().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(A()).optional(),metadata:t.optional(),tools:F(tt).optional(),toolChoice:mt.optional()}),bt=l.extend({method:V(`sampling/createMessage`),params:yt}),xt=f.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(A())),role:Ce,content:gt}),St=f.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(A())),role:Ce,content:R([_t,F(_t)])}),Ct=I({type:V(`boolean`),title:A().optional(),description:A().optional(),default:N().optional()}),wt=I({type:V(`string`),title:A().optional(),description:A().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:A().optional()}),Tt=I({type:B([`number`,`integer`]),title:A().optional(),description:A().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),Et=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),default:A().optional()}),Dt=I({type:V(`string`),title:A().optional(),description:A().optional(),oneOf:F(I({const:A(),title:A()})),default:A().optional()}),Ot=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),enumNames:F(A()).optional(),default:A().optional()}),kt=R([Et,Dt]),At=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(A())}),default:F(A()).optional()}),jt=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:A(),title:A()}))}),default:F(A()).optional()}),Mt=R([At,jt]),Nt=R([Ot,kt,Mt]),Pt=R([Nt,Ct,wt,Tt]),Ft=c.extend({mode:V(`form`).optional(),message:A(),requestedSchema:I({type:V(`object`),properties:z(A(),Pt),required:F(A()).optional()}).catchall(P())}),It=c.extend({mode:V(`url`),message:A(),elicitationId:A(),url:A().url()}),Lt=R([Ft,It]),Rt=l.extend({method:V(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:A()}),Bt=d.extend({method:V(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:B([`accept`,`decline`,`cancel`]),content:Ld(e=>e===null?void 0:e,z(A(),R([A(),M(),N(),F(A())])).optional())}),Ht=I({type:V(`ref/resource`),uri:A()}),Ut=I({type:V(`ref/prompt`),name:A()}),Wt=s.extend({ref:R([Ut,Ht]),argument:I({name:A(),value:A()}),context:I({arguments:z(A(),A()).optional()}).optional()}),Gt=l.extend({method:V(`completion/complete`),params:Wt}),Kt=f.extend({completion:L({values:F(A()).max(100),total:H(M().int()),hasMore:H(N())})}),qt=I({uri:A().startsWith(`file://`),name:A().optional(),_meta:z(A(),P()).optional()}),Jt=l.extend({method:V(`roots/list`),params:s.optional()}),Yt=f.extend({roots:F(qt)}),Xt=d.extend({method:V(`notifications/roots/list_changed`),params:u.optional()}),Zt=L({ttl:M().optional(),pollInterval:M().optional()}),Qt=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=I({taskId:A(),status:Qt,ttl:R([M(),uu()]),createdAt:A(),lastUpdatedAt:A(),pollInterval:H(M()),statusMessage:H(A())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:V(`notifications/tasks/status`),params:tn}),rn=l.extend({method:V(`tasks/get`),params:s.extend({taskId:A()})}),an=f.merge($t),on=l.extend({method:V(`tasks/result`),params:s.extend({taskId:A()})}),sn=f.loose(),cn=_e.extend({method:V(`tasks/list`)}),ln=ve.extend({tasks:F($t)}),un=l.extend({method:V(`tasks/cancel`),params:s.extend({taskId:A()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:ee,CancelledNotificationSchema:h,IconSchema:g,IconsSchema:te,BaseMetadataSchema:ne,ImplementationSchema:re,ClientTasksCapabilitySchema:ae,ServerTasksCapabilitySchema:oe,ClientCapabilitiesSchema:se,InitializeRequestParamsSchema:ce,InitializeRequestSchema:le,ServerCapabilitiesSchema:ue,InitializeResultSchema:de,InitializedNotificationSchema:_,PingRequestSchema:fe,ProgressSchema:pe,ProgressNotificationParamsSchema:me,ProgressNotificationSchema:he,PaginatedRequestParamsSchema:ge,PaginatedRequestSchema:_e,PaginatedResultSchema:ve,ResourceContentsSchema:ye,TextResourceContentsSchema:be,BlobResourceContentsSchema:Se,RoleSchema:Ce,AnnotationsSchema:we,ResourceSchema:v,ResourceTemplateSchema:Te,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:De,ListResourceTemplatesRequestSchema:Oe,ListResourceTemplatesResultSchema:ke,ResourceRequestParamsSchema:Ae,ReadResourceRequestParamsSchema:je,ReadResourceRequestSchema:Me,ReadResourceResultSchema:Ne,ResourceListChangedNotificationSchema:Pe,SubscribeRequestParamsSchema:Fe,SubscribeRequestSchema:Ie,UnsubscribeRequestParamsSchema:Le,UnsubscribeRequestSchema:Re,ResourceUpdatedNotificationParamsSchema:ze,ResourceUpdatedNotificationSchema:Be,PromptArgumentSchema:Ve,PromptSchema:y,ListPromptsRequestSchema:He,ListPromptsResultSchema:Ue,GetPromptRequestParamsSchema:We,GetPromptRequestSchema:Ge,TextContentSchema:Ke,ImageContentSchema:qe,AudioContentSchema:Je,ToolUseContentSchema:Ye,EmbeddedResourceSchema:b,ResourceLinkSchema:Xe,ContentBlockSchema:Ze,PromptMessageSchema:x,GetPromptResultSchema:S,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:C,CallToolRequestSchema:at,ToolListChangedNotificationSchema:ot,LoggingLevelSchema:st,SetLevelRequestParamsSchema:ct,SetLevelRequestSchema:lt,LoggingMessageNotificationParamsSchema:ut,LoggingMessageNotificationSchema:dt,ModelHintSchema:ft,ModelPreferencesSchema:pt,ToolChoiceSchema:mt,ToolResultContentSchema:ht,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:R([fe,le,Gt,lt,Ge,He,Ee,Oe,Me,Ie,Re,at,nt,rn,on,cn,un]),ClientNotificationSchema:R([h,he,_,Xt,nn]),ClientResultSchema:R([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:R([fe,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:R([h,he,dt,Be,Pe,ot,Qe,nn,Bt]),ServerResultSchema:R([m,de,Kt,S,Ue,De,ke,Ne,it,rt,an,ln,en]),CallToolResultWireSchema:P().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Fh)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(Ih).pipe(it)}}var Rh;function zh(){return Rh??=Lh()}function Bh(e){return e.type!==`object`}var Vh=new Set([`const`,`enum`,`default`,`examples`]),Hh=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Uh(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Wh(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Uh(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=o(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&Uh(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=Vh.has(o)?s:Hh.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var Gh={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Kh={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},qh={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Jh;function Yh(){if(Jh)return Jh;let e=zh();return Jh={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Jh}function Xh(e){return Object.prototype.hasOwnProperty.call(Gh,e)}function Zh(e){return Object.prototype.hasOwnProperty.call(Kh,e)}function Qh(e){return Object.prototype.hasOwnProperty.call(qh,e)}function $h(e){return Qh(e)?Yh().resultSchemas[e]:void 0}function eg(e){return Xh(e)?Yh().requestSchemas[e]:void 0}function tg(e){return Zh(e)?Yh().notificationSchemas[e]:void 0}Object.keys(Gh),Object.keys(Kh);function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var ig={ok:!1,reason:`not-in-era`};function ag(e){return ng(e)&&ng(e.outputSchema)&&Bh(e.outputSchema)}function og(e){return e}var sg={era:`2025-11-25`,hasRequestMethod:Xh,hasNotificationMethod:Zh,validateRequest:(e,t)=>rg(eg(e),t),validateResult:(e,t)=>rg($h(e),t),validateNotification:(e,t)=>rg(tg(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>ig,validateInputResponse:()=>ig,samplingResultVariant:((e,t)=>{let n=zh();return rg(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Ph(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Bh(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(ng(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:og(e)}}return{kind:`complete`,result:og(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>ag(e))?t:{...t,tools:n.map(e=>ag(e)?{...e,outputSchema:Wh(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function cg(){let e=Sd(()=>R([A(),M(),N(),uu(),z(A(),e),F(e)])),t=z(A(),e),n=R([A(),M().int()]),r=A(),i=R([A(),M().int()]),a=B([`user`,`assistant`]),o=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=A().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=I({ttl:M().optional()}),l=I({taskId:A()}),u=L({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=I({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=I({_meta:u.optional()}),m=I({method:A(),params:p.loose().optional()}),ee=I({src:A(),mimeType:A().optional(),sizes:F(A()).optional(),theme:B([`light`,`dark`]).optional()}),h=I({icons:F(ee).optional()}),g=I({name:A(),title:A().optional()}),te=g.extend({...g.shape,...h.shape,version:A(),websiteUrl:A().optional(),description:A().optional()}),ne=Ld(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Au(I({form:Au(I({applyDefaults:N().optional()}),t).optional(),url:t.optional()}),t.optional())),re=L({list:t.optional(),cancel:t.optional(),requests:L({sampling:L({createMessage:t.optional()}).optional(),elicitation:L({create:t.optional()}).optional()}).optional()}),ie=L({list:t.optional(),cancel:t.optional(),requests:L({tools:L({call:t.optional()}).optional()}).optional()}),ae=I({experimental:z(A(),t).optional(),sampling:I({context:t.optional(),tools:t.optional()}).optional(),elicitation:ne.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:re.optional(),extensions:z(A(),t).optional()}),oe=I({experimental:z(A(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:ie.optional(),extensions:z(A(),t).optional()}),se=I({progress:M(),total:H(M()),message:H(A())}),ce=I({...p.shape,...se.shape,progressToken:n}),le=m.extend({method:V(`notifications/progress`),params:ce}),ue=p.extend({level:o,logger:A().optional(),data:P()}),de=m.extend({method:V(`notifications/message`),params:ue}),_=I({uri:A(),mimeType:H(A()),_meta:z(A(),P()).optional()}),fe=_.extend({text:A()}),pe=_.extend({blob:s}),me=I({audience:F(a).optional(),priority:M().min(0).max(1).optional(),lastModified:Vd({offset:!0}).optional()}),he=I({...g.shape,...h.shape,uri:A(),description:H(A()),mimeType:H(A()),size:H(M()),annotations:me.optional(),_meta:H(L({}))}),ge=I({...g.shape,...h.shape,uriTemplate:A(),description:H(A()),mimeType:H(A()),annotations:me.optional(),_meta:H(L({}))}),_e=m.extend({method:V(`notifications/resources/list_changed`),params:p.optional()}),ve=p.extend({uri:A()}),ye=m.extend({method:V(`notifications/resources/updated`),params:ve}),be=I({name:A(),description:H(A()),required:H(N())}),xe=I({...g.shape,...h.shape,description:H(A()),arguments:H(F(be)),_meta:H(L({}))}),Se=m.extend({method:V(`notifications/prompts/list_changed`),params:p.optional()}),Ce=I({type:V(`text`),text:A(),annotations:me.optional(),_meta:z(A(),P()).optional()}),we=I({type:V(`image`),data:s,mimeType:A(),annotations:me.optional(),_meta:z(A(),P()).optional()}),v=I({type:V(`audio`),data:s,mimeType:A(),annotations:me.optional(),_meta:z(A(),P()).optional()}),Te=I({type:V(`tool_use`),name:A(),id:A(),input:z(A(),P()),_meta:z(A(),P()).optional()}),Ee=I({type:V(`resource`),resource:R([fe,pe]),annotations:me.optional(),_meta:z(A(),P()).optional()}),De=he.extend({type:V(`resource_link`)}),Oe=R([Ce,we,v,De,Ee]),ke=I({role:a,content:Oe}),Ae=I({title:A().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),je=m.extend({method:V(`notifications/tools/list_changed`),params:p.optional()}),Me=I({name:A().optional()}),Ne=I({hints:F(Me).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),Pe=I({mode:B([`auto`,`required`,`none`]).optional()}),Fe=I({type:V(`boolean`),title:A().optional(),description:A().optional(),default:N().optional()}),Ie=I({type:V(`string`),title:A().optional(),description:A().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:A().optional()}),Le=I({type:B([`number`,`integer`]),title:A().optional(),description:A().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),Re=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),default:A().optional()}),ze=I({type:V(`string`),title:A().optional(),description:A().optional(),oneOf:F(I({const:A(),title:A()})),default:A().optional()}),Be=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),enumNames:F(A()).optional(),default:A().optional()}),Ve=R([Re,ze]),y=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(A())}),default:F(A()).optional()}),He=I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:A(),title:A()}))}),default:F(A()).optional()}),Ue=R([y,He]),We=R([Be,Ve,Ue]),Ge=R([We,Fe,Ie,Le]),Ke=f.extend({mode:V(`form`).optional(),message:A(),requestedSchema:I({type:V(`object`),properties:z(A(),Ge),required:F(A()).optional()}).catchall(P())}),qe=I({type:V(`ref/resource`),uri:A()}),Je=I({type:V(`ref/prompt`),name:A()}),Ye=I({uri:A().startsWith(`file://`),name:A().optional(),_meta:z(A(),P()).optional()}),b=ae.shape,Xe=I({experimental:b.experimental,sampling:b.sampling,elicitation:b.elicitation,roots:b.roots,extensions:b.extensions}),Ze=oe.shape,x=I({experimental:Ze.experimental,logging:Ze.logging,completions:Ze.completions,prompts:Ze.prompts,resources:Ze.resources,tools:Ze.tools,extensions:Ze.extensions}),S=L({progressToken:n.optional(),[of]:A(),[sf]:te.optional(),[lf]:Xe,[df]:o.optional()}),Qe=I({...g.shape,...h.shape,description:A().optional(),inputSchema:L({$schema:A().optional(),type:V(`object`)}),outputSchema:L({$schema:A().optional()}).optional(),annotations:Ae.optional(),_meta:z(A(),P()).optional()}),$e=I({type:V(`tool_result`),toolUseId:A(),content:F(Oe),structuredContent:P().optional(),isError:N().optional(),_meta:z(A(),P()).optional()}),et=R([Ce,we,v,Te,$e]),tt=I({role:a,content:R([et,F(et)]),_meta:z(A(),P()).optional()}),nt=A(),rt=L({[cf]:te.optional().catch(void 0)}),it=rt.optional();function C(e){return L({_meta:it,resultType:nt.default(`complete`),...e})}let at=C({}),ot=C({nextCursor:r.optional()}),st=C({content:F(Oe),structuredContent:P().optional(),isError:N().optional()}),ct=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),tools:F(Qe),nextCursor:r.optional()}),lt=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),prompts:F(xe),nextCursor:r.optional()}),ut=C({description:A().optional(),messages:F(ke)}),dt=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),resources:F(he),nextCursor:r.optional()}),ft=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),resourceTemplates:F(ge),nextCursor:r.optional()}),pt=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),contents:F(R([fe,pe]))}),mt=C({completion:I({values:F(A()).max(100),total:M().int().optional(),hasMore:N().optional()}).loose()}),ht=C({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`])}),gt=C({ttlMs:M().int().min(0).catch(0),cacheScope:B([`public`,`private`]).catch(`private`),supportedVersions:F(A()),capabilities:x,instructions:A().optional()}),_t=I({messages:F(tt),modelPreferences:Ne.optional(),systemPrompt:A().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(A()).optional(),metadata:t.optional(),tools:F(Qe).optional(),toolChoice:Pe.optional()}),vt=I({method:V(`sampling/createMessage`),params:_t}),yt=I({method:V(`roots/list`),params:I({_meta:z(A(),P()).optional()}).optional()}),bt=I({...tt.shape,model:A(),stopReason:A().optional()}),xt=I({roots:F(Ye)}),St=I({action:B([`accept`,`decline`,`cancel`]),content:z(A(),R([A(),M(),N(),F(A())])).optional()}),Ct=I({mode:V(`url`),message:A(),url:A().url()}),wt=R([Ke,Ct]),Tt=I({method:V(`elicitation/create`),params:wt}),Et=R([vt,yt,Tt]),Dt=R([bt,xt,St]),Ot=z(A(),Et),kt=z(A(),Dt),At=C({inputRequests:Ot.optional(),requestState:A().optional()}),jt={inputResponses:kt.optional(),requestState:A().optional()},Mt=I({_meta:S,...jt}),Nt=L({progressToken:n.optional()});function Pt(e,t){return I({method:V(e),params:I({_meta:S,...t})})}function Ft(e,t){return I({method:V(e),params:I({_meta:Nt.optional(),...t}).optional()})}let It={name:A(),arguments:z(A(),P()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:A(),arguments:z(A(),A()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:A(),...jt}),Gt={ref:R([Je,qe]),argument:I({name:A(),value:A()}),context:I({arguments:z(A(),A()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=I({toolsListChanged:N().optional(),promptsListChanged:N().optional(),resourcesListChanged:N().optional(),resourceSubscriptions:F(A()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=L({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:A(),arguments:z(A(),A()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:A()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return L({_meta:it,...e})}let tn={"tools/call":en({content:F(Oe),structuredContent:P().optional(),isError:N().optional()}),"tools/list":en({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),tools:F(Qe),nextCursor:r.optional()}),"prompts/get":en({description:A().optional(),messages:F(ke)}),"prompts/list":en({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),prompts:F(xe),nextCursor:r.optional()}),"resources/list":en({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),resources:F(he),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),resourceTemplates:F(ge),nextCursor:r.optional()}),"resources/read":en({ttlMs:M().int().min(0),cacheScope:B([`public`,`private`]),contents:F(R([fe,pe]))}),"completion/complete":en({completion:I({values:F(A()).max(100),total:M().int().optional(),hasMore:N().optional()}).loose()}),"server/discover":en({ttlMs:M().int().min(0).catch(0),cacheScope:B([`public`,`private`]).catch(`private`),supportedVersions:F(A()),capabilities:x,instructions:A().optional()}),"subscriptions/listen":en({})},nn=L({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=I({method:V(`notifications/subscriptions/acknowledged`),params:I({_meta:nn.optional(),notifications:Jt})}),an=I({_meta:nn.optional(),requestId:i,reason:A().optional()}),on=I({method:V(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":le,"notifications/message":de,"notifications/resources/updated":ye,"notifications/resources/list_changed":_e,"notifications/tools/list_changed":je,"notifications/prompts/list_changed":Se,"notifications/subscriptions/acknowledged":rn},cn=e=>I({jsonrpc:V(`2.0`),id:R([A(),M().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:ee,IconsSchema:h,BaseMetadataSchema:g,ImplementationSchema:te,ClientTasksCapabilitySchema:re,ServerTasksCapabilitySchema:ie,ClientCapabilitiesSchema:ae,ServerCapabilitiesSchema:oe,ProgressSchema:se,ProgressNotificationParamsSchema:ce,ProgressNotificationSchema:le,LoggingMessageNotificationParamsSchema:ue,LoggingMessageNotificationSchema:de,ResourceContentsSchema:_,TextResourceContentsSchema:fe,BlobResourceContentsSchema:pe,AnnotationsSchema:me,ResourceSchema:he,ResourceTemplateSchema:ge,ResourceListChangedNotificationSchema:_e,ResourceUpdatedNotificationParamsSchema:ve,ResourceUpdatedNotificationSchema:ye,PromptArgumentSchema:be,PromptSchema:xe,PromptListChangedNotificationSchema:Se,TextContentSchema:Ce,ImageContentSchema:we,AudioContentSchema:v,ToolUseContentSchema:Te,EmbeddedResourceSchema:Ee,ResourceLinkSchema:De,ContentBlockSchema:Oe,PromptMessageSchema:ke,ToolAnnotationsSchema:Ae,ToolListChangedNotificationSchema:je,ModelHintSchema:Me,ModelPreferencesSchema:Ne,ToolChoiceSchema:Pe,BooleanSchemaSchema:Fe,StringSchemaSchema:Ie,NumberSchemaSchema:Le,UntitledSingleSelectEnumSchemaSchema:Re,TitledSingleSelectEnumSchemaSchema:ze,LegacyTitledEnumSchemaSchema:Be,SingleSelectEnumSchemaSchema:Ve,UntitledMultiSelectEnumSchemaSchema:y,TitledMultiSelectEnumSchemaSchema:He,MultiSelectEnumSchemaSchema:Ue,EnumSchemaSchema:We,PrimitiveSchemaDefinitionSchema:Ge,ElicitRequestFormParamsSchema:Ke,ResourceTemplateReferenceSchema:qe,PromptReferenceSchema:Je,RootSchema:Ye,ClientCapabilities2026Schema:Xe,ServerCapabilities2026Schema:x,RequestMetaEnvelopeSchema:S,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:at,PaginatedResultSchema:ot,CallToolResultSchema:st,ListToolsResultSchema:ct,ListPromptsResultSchema:lt,GetPromptResultSchema:ut,ListResourcesResultSchema:dt,ListResourceTemplatesResultSchema:ft,ReadResourceResultSchema:pt,CompleteResultSchema:mt,CacheableResultSchema:ht,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(at),CallToolResultResponseSchema:cn(R([st,At])),ListToolsResultResponseSchema:cn(ct),ListPromptsResultResponseSchema:cn(lt),GetPromptResultResponseSchema:cn(R([ut,At])),ListResourcesResultResponseSchema:cn(dt),ListResourceTemplatesResultResponseSchema:cn(ft),ReadResourceResultResponseSchema:cn(R([pt,At])),CompleteResultResponseSchema:cn(mt),DiscoverResultResponseSchema:cn(gt)}}var lg;function ug(){return lg??=cg()}var dg=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function fg(e){return dg.includes(e)}var pg=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function mg(e){return e[pg]}function hg(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function gg(e){return e===`public`||e===`private`}var Y=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),_g=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,kh(this,new.target)}static fromError(t,n,r){if(t===Y.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new yg(e.elicitations,n)}if(t===Y.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new bg({supported:e.supported,requested:e.requested},n)}if(t===Y.InvalidParams||t===Y.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===Y.ResourceNotFound||Object.keys(e).length===1))return new vg(e.uri,n)}if(t===Y.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new xg({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},vg=class extends _g{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(Y.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},yg=class extends _g{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},bg=class extends _g{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Y.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},xg=class extends _g{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(Y.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Sg=0,Cg=`private`,wg=[`tools/call`,`prompts/get`,`resources/read`];function Tg(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||wg.includes(e))return t;throw new _g(Y.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Eg(e,t){let n=mg(t);if(t.resultType!==`complete`||!fg(e))return n===void 0?t:jg(t);let r=t,i=hg(r.ttlMs)?r.ttlMs:kg(n),a=gg(r.cacheScope)?r.cacheScope:Ag(n),o={...r,ttlMs:i,cacheScope:a};return delete o[pg],o}function Dg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Og(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[cf]:t}}:!Dg(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[cf]:t}}}function kg(e){return e!==void 0&&hg(e.ttlMs)?e.ttlMs:Sg}function Ag(e){return e!==void 0&&gg(e.cacheScope)?e.cacheScope:Cg}function jg(e){let t={...e};return delete t[pg],t}var Mg=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Ng;function Pg(){if(Ng)return Ng;let e=ug();return Ng={request:{"elicitation/create":I({method:V(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":I({method:V(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":I({method:V(`roots/list`),params:L({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Ng}function Fg(e){return Mg.includes(e)}function Ig(e){return Fg(e)?Pg().request[e]:void 0}function Lg(e){return Fg(e)?Pg().response[e]:void 0}var Rg={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},zg={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Bg(e){return Object.prototype.hasOwnProperty.call(Rg,e)}function Vg(e){return Object.prototype.hasOwnProperty.call(zg,e)}function Hg(e){return Object.prototype.hasOwnProperty.call(Rg,e)}function Ug(e){return Bg(e)?ug().dispatchRequestSchemas[e]:void 0}function Wg(e){return Hg(e)?ug().dispatchResultSchemas[e]:void 0}function Gg(e){return Vg(e)?ug().notificationSchemas2026[e]:void 0}Object.keys(Rg),Object.keys(zg);function Kg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qg(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Jg={ok:!1,reason:`not-in-era`},Yg=[of,lf];function Xg(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Kg(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Kg(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Kg(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Zg={era:`2026-07-28`,hasRequestMethod:Bg,hasNotificationMethod:Vg,hasInputRequestMethod:e=>Ig(e)!==void 0,validateRequest:(e,t)=>qg(Ug(e),t),validateResult:(e,t)=>qg(Wg(e),t),validateNotification:(e,t)=>qg(Gg(e),t),validateInputRequest:(e,t)=>qg(Ig(e),t),validateInputResponse:(e,t)=>qg(Lg(e),t),samplingResultVariant:()=>Jg,outboundEnvelope(e){return{[of]:e.protocolVersion,[sf]:e.clientInfo,[lf]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Yg)n in e||t.push({key:n,problem:`missing`});let n=ug().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Ph(e),inputRequestSchema:Ig,decodeResult(e,t){if(!Kg(t))return{kind:`invalid`,error:new J(jh.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new J(jh.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new J(jh.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Kg(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new J(jh.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i}}}if(n!==`complete`)return{kind:`invalid`,error:new J(jh.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=$g(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new J(jh.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Og(Eg(e,Tg(e,Xg(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=ug().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Qg;function $g(){if(Qg)return Qg;let e=ug();return Qg={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Qg}var e_=`2026-07-28`;function t_(e){return e!==void 0&&Nh(e)?Zg:sg}function n_(e){return e.revision===void 0?e.era===`modern`?Zg.era:sg.era:t_(e.revision).era}function r_(e){return a_.some(t=>t.hasRequestMethod(e))}function i_(e){return a_.some(t=>t.hasNotificationMethod(e))}var a_=[sg,Zg],o_=i({AnnotationsSchema:()=>sp,AudioContentSchema:()=>Bp,BaseMetadataSchema:()=>If,BaseRequestParamsSchema:()=>yf,BlobResourceContentsSchema:()=>ap,BooleanSchemaSchema:()=>xm,CallToolRequestParamsSchema:()=>tm,CallToolRequestSchema:()=>nm,CallToolResultSchema:()=>$p,CancelTaskRequestSchema:()=>sh,CancelTaskResultSchema:()=>ch,CancelledNotificationParamsSchema:()=>Mf,CancelledNotificationSchema:()=>Nf,ClientCapabilitiesSchema:()=>Vf,ClientNotificationSchema:()=>uh,ClientRequestSchema:()=>lh,ClientResultSchema:()=>dh,ClientTasksCapabilitySchema:()=>zf,CompatibilityCallToolResultSchema:()=>em,CompleteRequestParamsSchema:()=>Hm,CompleteRequestSchema:()=>Um,CompleteResultSchema:()=>Wm,ContentBlockSchema:()=>Wp,CreateMessageRequestParamsSchema:()=>_m,CreateMessageRequestSchema:()=>vm,CreateMessageResultSchema:()=>ym,CreateMessageResultWithToolsSchema:()=>bm,CreateTaskResultSchema:()=>Qm,CursorSchema:()=>hf,DiscoverRequestSchema:()=>qf,DiscoverResultSchema:()=>Jf,ElicitRequestFormParamsSchema:()=>Nm,ElicitRequestParamsSchema:()=>Fm,ElicitRequestSchema:()=>Im,ElicitRequestURLParamsSchema:()=>Pm,ElicitResultSchema:()=>zm,ElicitationCompleteNotificationParamsSchema:()=>Lm,ElicitationCompleteNotificationSchema:()=>Rm,EmbeddedResourceSchema:()=>Hp,EmptyResultSchema:()=>jf,EnumSchemaSchema:()=>jm,GetPromptRequestParamsSchema:()=>Ip,GetPromptRequestSchema:()=>Lp,GetPromptResultSchema:()=>Kp,GetTaskPayloadRequestSchema:()=>rh,GetTaskPayloadResultSchema:()=>ih,GetTaskRequestSchema:()=>th,GetTaskResultSchema:()=>nh,IconSchema:()=>Pf,IconsSchema:()=>Ff,ImageContentSchema:()=>zp,ImplementationSchema:()=>Lf,InitializeRequestParamsSchema:()=>Hf,InitializeRequestSchema:()=>Uf,InitializeResultSchema:()=>Gf,InitializedNotificationSchema:()=>Kf,JSONArraySchema:()=>pf,JSONObjectSchema:()=>W,JSONRPCErrorResponseSchema:()=>Of,JSONRPCMessageSchema:()=>kf,JSONRPCNotificationSchema:()=>Ef,JSONRPCRequestSchema:()=>Tf,JSONRPCResponseSchema:()=>Af,JSONRPCResultResponseSchema:()=>Df,JSONValueSchema:()=>ff,LegacyTitledEnumSchemaSchema:()=>Em,ListChangedOptionsBaseSchema:()=>im,ListPromptsRequestSchema:()=>Pp,ListPromptsResultSchema:()=>Fp,ListResourceTemplatesRequestSchema:()=>fp,ListResourceTemplatesResultSchema:()=>pp,ListResourcesRequestSchema:()=>up,ListResourcesResultSchema:()=>dp,ListRootsRequestSchema:()=>Km,ListRootsResultSchema:()=>qm,ListTasksRequestSchema:()=>ah,ListTasksResultSchema:()=>oh,ListToolsRequestSchema:()=>Zp,ListToolsResultSchema:()=>Qp,LoggingLevelSchema:()=>am,LoggingMessageNotificationParamsSchema:()=>cm,LoggingMessageNotificationSchema:()=>lm,ModelHintSchema:()=>um,ModelPreferencesSchema:()=>dm,MultiSelectEnumSchemaSchema:()=>Am,NotificationSchema:()=>Sf,NotificationsParamsSchema:()=>xf,NumberSchemaSchema:()=>Cm,PaginatedRequestParamsSchema:()=>$f,PaginatedRequestSchema:()=>ep,PaginatedResultSchema:()=>tp,PingRequestSchema:()=>Yf,PrimitiveSchemaDefinitionSchema:()=>Mm,ProgressNotificationParamsSchema:()=>Zf,ProgressNotificationSchema:()=>Qf,ProgressSchema:()=>Xf,ProgressTokenSchema:()=>mf,PromptArgumentSchema:()=>Mp,PromptListChangedNotificationSchema:()=>qp,PromptMessageSchema:()=>Gp,PromptReferenceSchema:()=>Vm,PromptSchema:()=>Np,ReadResourceRequestParamsSchema:()=>hp,ReadResourceRequestSchema:()=>gp,ReadResourceResultSchema:()=>_p,RelatedTaskMetadataSchema:()=>_f,RequestIdSchema:()=>wf,RequestMetaSchema:()=>vf,RequestSchema:()=>G,ResourceContentsSchema:()=>np,ResourceLinkSchema:()=>Up,ResourceListChangedNotificationSchema:()=>vp,ResourceRequestParamsSchema:()=>mp,ResourceSchema:()=>cp,ResourceTemplateReferenceSchema:()=>Bm,ResourceTemplateSchema:()=>lp,ResourceUpdatedNotificationParamsSchema:()=>Ap,ResourceUpdatedNotificationSchema:()=>jp,ResultMetaObjectSchema:()=>Cf,ResultSchema:()=>K,RoleSchema:()=>op,RootSchema:()=>Gm,RootsListChangedNotificationSchema:()=>Jm,SamplingContentSchema:()=>mm,SamplingMessageContentBlockSchema:()=>hm,SamplingMessageSchema:()=>gm,ServerCapabilitiesSchema:()=>Wf,ServerNotificationSchema:()=>ph,ServerRequestSchema:()=>fh,ServerResultSchema:()=>mh,ServerTasksCapabilitySchema:()=>Bf,SetLevelRequestParamsSchema:()=>om,SetLevelRequestSchema:()=>sm,SingleSelectEnumSchemaSchema:()=>Dm,StringSchemaSchema:()=>Sm,SubscribeRequestParamsSchema:()=>yp,SubscribeRequestSchema:()=>bp,SubscriptionFilterSchema:()=>Cp,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Ep,SubscriptionsAcknowledgedNotificationSchema:()=>Dp,SubscriptionsListenRequestParamsSchema:()=>wp,SubscriptionsListenRequestSchema:()=>Tp,SubscriptionsListenResultMetaSchema:()=>Op,SubscriptionsListenResultSchema:()=>kp,TaskAugmentedRequestParamsSchema:()=>bf,TaskCreationParamsSchema:()=>Ym,TaskMetadataSchema:()=>gf,TaskSchema:()=>Zm,TaskStatusNotificationParamsSchema:()=>$m,TaskStatusNotificationSchema:()=>eh,TaskStatusSchema:()=>Xm,TextContentSchema:()=>Rp,TextResourceContentsSchema:()=>rp,TitledMultiSelectEnumSchemaSchema:()=>km,TitledSingleSelectEnumSchemaSchema:()=>Tm,ToolAnnotationsSchema:()=>Jp,ToolChoiceSchema:()=>fm,ToolExecutionSchema:()=>Yp,ToolListChangedNotificationSchema:()=>rm,ToolResultContentSchema:()=>pm,ToolSchema:()=>Xp,ToolUseContentSchema:()=>Vp,UnsubscribeRequestParamsSchema:()=>xp,UnsubscribeRequestSchema:()=>Sp,UntitledMultiSelectEnumSchemaSchema:()=>Om,UntitledSingleSelectEnumSchemaSchema:()=>wm}),s_=e=>Tf.safeParse(e).success,c_=e=>Ef.safeParse(e).success,l_=e=>Df.safeParse(e).success,u_=e=>Of.safeParse(e).success;Y.InvalidRequest,Y.UnsupportedProtocolVersion,Y.InvalidParams,Y.MethodNotFound,Y.InvalidParams,Y.MissingRequiredClientCapability,Y.ParseError,Y.InvalidRequest,Y.MethodNotFound,Y.UnsupportedProtocolVersion,Y.MissingRequiredClientCapability;function d_(e,t){return Ac(e,t)}function f_(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function p_(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var m_=!1,h_=`draft-2020-12`;function g_(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:h_});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);m_||(m_=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Cc(e,{target:h_,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&__(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function __(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||__(e)))}return!1}function v_(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function y_(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>v_(e)).join(`, `)}:{success:!0,data:n.value}}function b_(e){let t=Cc(e,{target:h_,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var x_=/\\\.\\d\{(\d+)\}/;function S_(e){let t=x_.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>Vd({local:e,offset:t,precision:n}))))}function C_(e,t){let n;switch(e){case`email`:n=[Xc()];break;case`uri`:n=[al()];break;case`date`:n=[Hd()];break;case`date-time`:n=S_(t)}return new Set(n.map(e=>b_(e)).filter(e=>e!==void 0))}function w_(e,t,n){return n!==`zod`||C_(e,t).has(t)}function T_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function E_(e){try{return g_(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new _g(Y.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var D_=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function O_(e){return D_.has(e)||e.startsWith(`x-`)}var k_=new Set([`$schema`,...Object.keys(Nm.shape.requestedSchema.shape)]),A_={string:f_([Sm,wm,Tm,Em]),number:f_([Cm]),integer:f_([Cm]),boolean:f_([xm]),array:f_([Om,km])},j_=new Set(Sm.shape.format.unwrap().options);function M_(e,t,n,r){if(!T_(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(A_,e.type)?A_[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||O_(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?j_.has(e.format)?(typeof s!=`string`||!w_(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function N_(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&T_(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,M_(n,`properties.${e}`,t,r)])):k_.has(i)?n[i]=a:O_(i)||r.push(i);if(r.length>0)throw new _g(Y.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function P_(e,t){if(!T_(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!d_(Mm,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function F_(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>F_(e,t[r],`${n}[${r}]`)):!T_(e)||!T_(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?F_(r,t[e],i):O_(e)?[]:[i]})}function I_(e){if(!p_(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=N_(E_(e.requestedSchema),t),r=d_(Nm.shape.requestedSchema,n);if(!r.success)throw new _g(Y.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${P_(n,r.error.message)}`);let i=F_(n,r.data);if(i.length>0)throw new _g(Y.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new _g(Y.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function L_(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(L_,{elicit(e){try{return{method:`elicitation/create`,params:I_(e)}}catch(e){throw e instanceof _g?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var R_=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),z_={IdJagTokenExchangeResponseSchema:bh,OAuthClientInformationFullSchema:Th,OAuthClientInformationSchema:wh,OAuthClientMetadataSchema:Ch,OAuthClientRegistrationErrorSchema:Eh,OAuthErrorResponseSchema:xh,OAuthMetadataSchema:gh,OAuthProtectedResourceMetadataSchema:hh,OAuthTokenRevocationRequestSchema:Dh,OAuthTokensSchema:yh,OpenIdProviderDiscoveryMetadataSchema:vh,OpenIdProviderMetadataSchema:_h},B_={},V_={};function H_(e,t){let n=e.slice(0,-6);B_[n]=t,V_[n]=e=>t.safeParse(e).success}for(let e of R_)H_(e,o_[e]);for(let[e,t]of Object.entries(z_))H_(e,t);Object.freeze(B_),Object.freeze(V_);function U_(e){switch(e){case`initialize`:case`notifications/initialized`:return t_(void 0);case`server/discover`:return t_(e_);default:return}}var W_=[of,sf,lf,df],G_=[`inputResponses`,`requestState`];function K_(e,t){let n=e.params;if(!Z_(n))return{message:e,lifted:{}};let r=n._meta,i=Z_(r)?W_.filter(e=>e in r):[],a=t===`request`?G_.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&Z_(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function q_(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function J_(e){return()=>e}var Y_=J_(void 0),X_=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??rf,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new J(jh.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new J(jh.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),l_(e)||u_(e)?this._onresponse(e):s_(e)?this._onrequest(e,t):c_(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new J(jh.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=K_(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=n_(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(i_(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=K_(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=n_(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(Y.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(r_(n.method)&&!i.hasRequestMethod(n.method)){o(Y.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(Y.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(Y.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:$_(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?Y_:J_(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),p_(t))return u(e,t,n);let i=q_(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(Y.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:Y.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),l_(e)?n(e):n(_g.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),p_(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=q_(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return t_(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=U_(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(r_(t)&&!e.hasRequestMethod(t))throw new J(jh.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof J?e:new J(jh.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,ee=this._requestMessageId++;u=ee;let h={...t,jsonrpc:`2.0`,id:ee};r?.onprogress&&(this._progressHandlers.set(ee,r.onprogress),h.params={...t.params,_meta:{...t.params?._meta,progressToken:ee}});let g=this._envelopeOutbound(h),te=!1,ne=e=>{te||(this._progressHandlers.delete(ee),m===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:ee,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof J?e:new J(jh.RequestTimeout,String(e))))};this._responseHandlers.set(ee,i=>{if(r?.signal?.aborted)return;if(te=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(ev(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;y_(n,o).then(e=>{e.success?d(e.data):f(new J(jh.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>ne(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let re=r?.timeout??6e4;this._setupTimeout(ee,re,r?.maxTotalTimeout,()=>ne(new J(jh.RequestTimeout,`Request timed out`,{timeout:re})),r?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(ee),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new J(jh.NotConnected,`Not connected`);if(i_(t.method)&&!e.hasNotificationMethod(t.method))throw new J(jh.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!r_(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new _g(Y.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await y_(t.params,{...r.params});if(!a.success)throw new _g(Y.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!i_(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new _g(Y.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await y_(t.params,{...r.params});if(!i.success)throw new _g(Y.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Z_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Q_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $_(e){let t={},n=[];if(!Q_(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Q_(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function ev(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}r((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);var tv=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,nv=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,rv=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,iv=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,av=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,ov=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,sv=/^(?:\/(?:[^~/]|~0|~1)*)*$/,cv=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,lv=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,uv=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,dv=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function fv(e){return e.test.bind(e)}pv.bind(void 0,!1),fv(rv),fv(iv),fv(av),fv(nv),fv(uv),fv(dv),fv(ov),fv(sv),fv(cv),fv(lv);function pv(e,t){let n=t.match(tv);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}globalThis.crypto;var mv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e){super(e),this.name=new.target.name,kh(this,new.target)}};(class extends mv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends mv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends mv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends mv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`),this.recordedIssuer=e,this.currentIssuer=t}},class extends mv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,kh(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Ah(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ah(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,kh(this,new.target)}};var hv=`2026-01-26`,gv=I({}).passthrough(),_v=I({arguments:z(A(),P()).optional()}).passthrough(),vv=I({reason:A().optional()}).passthrough(),yv=I({theme:B([`light`,`dark`]).optional(),displayMode:B([`inline`,`fullscreen`,`pip`]).optional(),availableDisplayModes:F(B([`inline`,`fullscreen`,`pip`])).optional(),styles:I({variables:z(A(),R([A(),cu()])).optional(),css:I({fonts:A().optional()}).passthrough().optional()}).passthrough().optional(),safeAreaInsets:I({top:M(),right:M(),bottom:M(),left:M()}).optional()}).passthrough(),bv=I({protocolVersion:A(),hostInfo:I({name:A(),version:A()}).passthrough(),hostCapabilities:z(A(),P()),hostContext:yv}).passthrough(),xv=I({mode:B([`inline`,`fullscreen`,`pip`])}).passthrough(),Sv=I({}).passthrough(),Cv=class{eventTarget;eventSource;onclose;onerror;onmessage;sessionId;setProtocolVersion;setSupportedProtocolVersions;started=!1;messageListener=e=>{if(e.source!==this.eventSource)return;let t=kf.safeParse(e.data);if(t.success){this.onmessage?.(t.data);return}e.data?.jsonrpc===`2.0`&&this.onerror?.(Error(`Invalid JSON-RPC message received from the MCP App host.`))};constructor(e=window.parent,t=window.parent){this.eventTarget=e,this.eventSource=t}async start(){if(this.started)throw Error(`PostMessageTransport is already started.`);this.started=!0,window.addEventListener(`message`,this.messageListener)}async send(e,t){this.eventTarget.postMessage(e,`*`)}async close(){this.started&&(this.started=!1,window.removeEventListener(`message`,this.messageListener),this.onclose?.())}},wv=class extends X_{appInfo;capabilities;ontoolinput;ontoolresult;ontoolcancelled;onhostcontextchanged;onteardown;hostContext;hostCapabilities;resizeObserver;resizeFrame;lastWidth=0;lastHeight=0;constructor(e,t={}){super(),this.appInfo=e,this.capabilities=t,this.setRequestHandler(`ping`,{params:gv,result:Sv},()=>({})),this.setNotificationHandler(`ui/notifications/tool-input`,{params:_v},e=>this.ontoolinput?.(e)),this.setNotificationHandler(`ui/notifications/tool-result`,{params:$p},e=>this.ontoolresult?.(e)),this.setNotificationHandler(`ui/notifications/tool-cancelled`,{params:vv},e=>this.ontoolcancelled?.(e)),this.setNotificationHandler(`ui/notifications/host-context-changed`,{params:yv},e=>{this.hostContext={...this.hostContext,...e},this.onhostcontextchanged?.(e)}),this.setRequestHandler(`ui/resource-teardown`,{params:gv,result:Sv},(e,t)=>this.onteardown?.(e,t)??{})}buildContext(e){return e}assertCapabilityForMethod(e){}assertNotificationCapability(e){}assertRequestHandlerCapability(e){}getHostContext(){return this.hostContext}getHostCapabilities(){return this.hostCapabilities}async callServerTool(e,t){return this.request({method:`tools/call`,params:e},$p,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async requestDisplayMode(e,t){return this.request({method:`ui/request-display-mode`,params:e},xv,t)}async connect(e=new Cv,t){await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this.capabilities,appInfo:this.appInfo,protocolVersion:hv}},bv,t);this.hostCapabilities=e.hostCapabilities,this.hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this.startAutoResize()}catch(e){try{await this.close()}catch(t){throw AggregateError([e,t],`MCP App initialization and cleanup failed.`)}throw e}}async close(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.resizeFrame!==void 0&&cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.lastWidth=0,this.lastHeight=0,await super.close()}startAutoResize(){if(typeof ResizeObserver>`u`)return;let e=()=>{this.resizeFrame===void 0&&(this.resizeFrame=requestAnimationFrame(()=>{this.resizeFrame=void 0;let e=document.documentElement,t=e.style.height;e.style.height=`max-content`;let n=Math.ceil(window.innerWidth),r=Math.ceil(e.getBoundingClientRect().height);e.style.height=t,(n!==this.lastWidth||r!==this.lastHeight)&&(this.lastWidth=n,this.lastHeight=r,this.notification({method:`ui/notifications/size-changed`,params:{width:n,height:r}}).catch(e=>{this.onerror?.(e instanceof Error?e:Error(String(e)))}))}))};this.resizeObserver=new ResizeObserver(e),this.resizeObserver.observe(document.documentElement),this.resizeObserver.observe(document.body),e()}};function Tv(e){document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e}function Ev(e,t=document.documentElement){for(let[n,r]of Object.entries(e))n.startsWith(`--`)&&r!==void 0&&t.style.setProperty(n,r)}function Dv(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var Ov={name:`qyl-mcp-server`,version:`2.0.0`,type:`module`,description:`qyl telemetry MCP Apps server: trace explorer and MCP dashboard for a live collector or explicit demo mode`,repository:{type:`git`,url:`https://github.com/ANcpLua/qyl.mcp`,directory:`server`},license:`MIT`,main:`dist/server.js`,types:`dist/server.d.ts`,exports:{".":{types:`./dist/server.d.ts`,default:`./dist/server.js`},"./contract-validation":{types:`./dist/contract-validation.d.ts`,default:`./dist/contract-validation.js`},"./secret-redactor":{types:`./dist/secret-redactor.d.ts`,default:`./dist/secret-redactor.js`},"./atomic-json-store":{types:`./dist/atomic-json-store.d.ts`,default:`./dist/atomic-json-store.js`},"./execution-evidence":{types:`./dist/execution-evidence.d.ts`,default:`./dist/execution-evidence.js`},"./execution-result":{types:`./dist/execution-result.d.ts`,default:`./dist/execution-result.js`},"./mcp-semconv":{types:`./dist/mcp-semconv.d.ts`,default:`./dist/mcp-semconv.js`},"./observability-suppression":{types:`./dist/observability-suppression.d.ts`,default:`./dist/observability-suppression.js`},"./telemetry":{types:`./dist/telemetry.d.ts`,default:`./dist/telemetry.js`}},bin:{"qyl-mcp-server":`dist/main.js`},files:[`dist`],scripts:{clean:`node -e "require('node:fs').rmSync('dist', { recursive: true, force: true }); require('node:fs').rmSync('dist-test', { recursive: true, force: true })"`,build:`bun run clean && tsc --noEmit && vite build --mode mcp-home && vite build --mode mcp-app && vite build --mode mcp-dashboard && vite build --mode observe-graph && tsc -p tsconfig.server.json && node -e "require('node:fs').chmodSync('dist/main.js', 0o755)"`,postbuild:`bun run verify:deployment-guidance`,"verify:deployment-guidance":`node verify-deployment-guidance.mjs`,"verify:shapes":`node verify-generated-shapes.mjs`,"verify:readme":`node verify-package-readme.mjs`,"snapshot:tools":`bun run build && tsc -p tsconfig.test.json && node update-tool-manifest-snapshot.mjs`,test:`bun run verify:shapes && bun run verify:readme && bun run build && tsc -p tsconfig.test.json && node -e "const fs=require('node:fs'); for (const name of ['mcp-app.html','mcp-dashboard.html','observe-graph.html']) fs.copyFileSync('dist/'+name,'dist-test/'+name)" && node --test dist-test/*.test.js`,smoke:`node smoke-test.mjs`,prepack:`bun run build`},dependencies:{"@ancplua/qyl-api-schema":`7.3.0`,"@modelcontextprotocol/core":`2.0.0`,"@modelcontextprotocol/server":`2.0.0`,"@opentelemetry/api":`^1.9.1`,"@opentelemetry/api-logs":`^0.221.0`,"@opentelemetry/core":`^2.10.0`,"@opentelemetry/exporter-logs-otlp-proto":`^0.221.0`,"@opentelemetry/exporter-metrics-otlp-proto":`^0.221.0`,"@opentelemetry/exporter-trace-otlp-proto":`^0.221.0`,"@opentelemetry/resources":`^2.10.0`,"@opentelemetry/sdk-logs":`^0.221.0`,"@opentelemetry/sdk-metrics":`^2.10.0`,"@opentelemetry/sdk-trace-base":`^2.10.0`,"@opentelemetry/sdk-trace-node":`^2.10.0`,"@opentelemetry/semantic-conventions":`^1.43.0`,jose:`^6.2.3`,zod:`^4.4.3`},devDependencies:{"@modelcontextprotocol/client":`2.0.0`,"@types/node":`26.4.0`,typescript:`7.0.2`,vite:`8.2.2`,"vite-plugin-singlefile":`2.3.3`},engines:{node:`24.x`}},kv={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://qyl.dev/schema/qyl-api-schema.json`,$defs:JSON.parse(`{"Common.Attribute":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","minLength":1,"maxLength":256,"description":"Attribute key (dot-separated namespace)"},"value":{"$ref":"#/$defs/Common.AttributeValue","description":"Attribute value"}},"unevaluatedProperties":{"not":{}},"description":"Key-value attribute pair following OTel conventions"},"Common.AttributeBytesValue":{"type":"object","required":["type","base64"],"properties":{"type":{"type":"string","enum":["bytes"]},"base64":{"type":"string","contentEncoding":"base64"}},"unevaluatedProperties":{"not":{}},"description":"Base64 bytes projected by qyl without colliding with an ordinary string attribute."},"Common.AttributeDouble":{"anyOf":[{"type":"number","format":"double"},{"type":"string","enum":["NaN","Infinity","-Infinity"]}],"description":"An OTLP attribute double encoded as a JSON number when finite or a canonical named string when non-finite."},"Common.AttributeDoubleValue":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["double"]},"value":{"$ref":"#/$defs/Common.AttributeDouble"}},"unevaluatedProperties":{"not":{}},"description":"Tagged OTLP double attribute."},"Common.AttributeInt64":{"type":"string","format":"int64","description":"An OTLP signed 64-bit attribute integer encoded without JavaScript precision loss.","x-csharp-type":"long","pattern":"^(0|-?[1-9][0-9]*)$","maxLength":20},"Common.AttributeIntValue":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["int"]},"value":{"$ref":"#/$defs/Common.AttributeInt64"}},"unevaluatedProperties":{"not":{}},"description":"Tagged OTLP signed 64-bit integer attribute."},"Common.AttributeKeyValueListValue":{"type":"object","required":["type","values"],"properties":{"type":{"type":"string","enum":["kvlist"]},"values":{"type":"object","unevaluatedProperties":{"$ref":"#/$defs/Common.AttributeValue"}}},"unevaluatedProperties":{"not":{}},"description":"Tagged recursive OTLP key-value-list, distinct from other object-shaped attribute variants."},"Common.AttributeValue":{"anyOf":[{"type":"null"},{"type":"string"},{"type":"boolean"},{"$ref":"#/$defs/Common.AttributeIntValue"},{"$ref":"#/$defs/Common.AttributeDoubleValue"},{"$ref":"#/$defs/Common.AttributeBytesValue"},{"type":"array","items":{"$ref":"#/$defs/Common.AttributeValue"}},{"$ref":"#/$defs/Common.AttributeKeyValueListValue"}],"description":"Lossless JSON projection of an OpenTelemetry AnyValue attribute."},"Common.Attributes":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"List of key-value attributes"}},"unevaluatedProperties":{"not":{}},"description":"Collection of attributes"},"Common.ByteSize":{"type":"integer","format":"int64","minimum":0,"description":"Size in bytes","x-csharp-type":"long"},"Common.ContentType":{"type":"string","description":"MIME content type","examples":["application/json"]},"Common.ContractRevision":{"type":"string","minLength":23,"maxLength":23,"pattern":"^sha256:[a-f0-9]{16}$","description":"Deterministic revision of the generated API contract: 'sha256:' followed by the first 16 hex characters of its canonical semantic digest.","examples":["sha256:0f1e2d3c4b5a6978"]},"Common.CostUsd":{"type":"number","format":"double","minimum":0,"description":"Cost in USD (floating point)","x-csharp-type":"double"},"Common.Count":{"type":"integer","format":"int64","minimum":0,"description":"Generic non-negative counter","x-csharp-type":"long"},"Common.DurationMs":{"type":"number","format":"double","minimum":0,"description":"Duration in milliseconds","x-csharp-type":"double"},"Common.DurationNs":{"type":"string","format":"uint64","description":"Duration in nanoseconds, encoded as a decimal string","x-csharp-type":"ulong","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Common.DurationS":{"type":"number","format":"double","minimum":0,"description":"Duration in seconds"},"Common.EntityAttributeKey":{"type":"string","minLength":1,"description":"A non-empty Resource attribute key referenced by an OpenTelemetry entity."},"Common.EntityRef":{"type":"object","required":["type","id_keys"],"properties":{"schema_url":{"type":"string","description":"Schema URL applying to the entity and its referenced Resource attributes, when known."},"type":{"type":"string","minLength":1,"description":"Stable non-empty entity type, such as service or host."},"id_keys":{"type":"array","items":{"$ref":"#/$defs/Common.EntityAttributeKey"},"minItems":1,"description":"Non-empty set of Resource attribute keys that identify the entity."},"description_keys":{"type":"array","items":{"$ref":"#/$defs/Common.EntityAttributeKey"},"description":"Resource attribute keys that describe but do not identify the entity."}},"unevaluatedProperties":{"not":{}},"description":"A reference to an OpenTelemetry entity described by attributes on the containing Resource."},"Common.Errors.ApiError":{"anyOf":[{"$ref":"#/$defs/Common.Errors.NotFoundError"},{"$ref":"#/$defs/Common.Errors.ValidationError"},{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},{"$ref":"#/$defs/Common.Errors.ForbiddenError"},{"$ref":"#/$defs/Common.Errors.ConflictError"},{"$ref":"#/$defs/Common.Errors.RateLimitError"},{"$ref":"#/$defs/Common.Errors.InternalServerError"},{"$ref":"#/$defs/Common.Errors.BadGatewayError"},{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"}],"description":"Standard error response types"},"Common.Errors.BadGatewayError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Bad Gateway"]},"dependency":{"type":"string","description":"Stable dependency category; never contains raw exception text"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Upstream dependency failed while fulfilling the request (502)"},"Common.Errors.ConflictError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Conflict"]},"conflicting_resource":{"type":"string","description":"The conflicting resource ID"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Conflict - resource state conflict (409)"},"Common.Errors.ForbiddenError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Forbidden"]},"required_permission":{"type":"string","description":"Required permission that is missing"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Forbidden - insufficient permissions (403)"},"Common.Errors.InternalServerError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Internal Server Error"]},"error_code":{"type":"string","description":"Error code for support reference"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Internal server error (500)"},"Common.Errors.NotFoundError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Not Found"]},"resource_type":{"type":"string","description":"The type of resource that was not found"},"resource_id":{"type":"string","description":"The identifier that was not found"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Resource not found (404)"},"Common.Errors.ProblemDetails":{"type":"object","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference identifying the problem type","default":"about:blank"},"title":{"type":"string","description":"A short, human-readable summary of the problem type"},"status":{"type":"integer","format":"int32","description":"The HTTP status code (informational only, actual code set by subtype)"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence"},"instance":{"type":"string","format":"uri","description":"A URI reference identifying the specific occurrence"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the error"}},"description":"RFC 7807 Problem Details for HTTP APIs"},"Common.Errors.RateLimitError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Too Many Requests"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Rate limited - too many requests (429)"},"Common.Errors.ServiceUnavailableError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Service Unavailable"]},"reason":{"type":"string","enum":["maintenance","overloaded","dependency_failure"],"description":"Reason for unavailability"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Service unavailable (503)"},"Common.Errors.UnauthorizedError":{"type":"object","required":["title"],"properties":{"title":{"type":"string","enum":["Unauthorized"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Unauthorized - authentication required (401)"},"Common.Errors.ValidationError":{"type":"object","required":["title","errors"],"properties":{"title":{"type":"string","enum":["Validation Failed"]},"errors":{"type":"array","items":{"$ref":"#/$defs/Common.Errors.ValidationErrorDetail"},"description":"List of validation errors"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Bad request - validation failed (400)"},"Common.Errors.ValidationErrorDetail":{"type":"object","required":["field","message","code"],"properties":{"field":{"type":"string","description":"The field/property that failed validation"},"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The validation rule that failed"},"rejected_value":{"type":"string","description":"The rejected value (if safe to include)"}},"unevaluatedProperties":{"not":{}},"description":"Individual validation error detail"},"Common.HttpMethod":{"type":"string","description":"HTTP method name (uppercase)","examples":["GET"]},"Common.IPv4Address":{"type":"string","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$","description":"IPv4 address in dotted-decimal notation","examples":["192.168.1.1"]},"Common.IPv6Address":{"type":"string","description":"IPv6 address in standard notation","examples":["2001:0db8:85a3:0000:0000:8a2e:0370:7334"]},"Common.InstrumentationScope":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the instrumentation scope (library name)"},"version":{"$ref":"#/$defs/Common.SemVer","description":"Version of the instrumentation scope"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Additional attributes for the scope"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"}},"unevaluatedProperties":{"not":{}},"description":"Instrumentation scope identifying the library/component emitting telemetry"},"Common.IpAddress":{"type":"string","description":"IP address (IPv4 or IPv6)"},"Common.IsoDuration":{"type":"string","format":"duration","description":"ISO 8601 duration format (e.g., PT1H30M)"},"Common.LanguageCode":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","description":"Language/locale code (BCP 47)","examples":["en-US"]},"Common.MacAddress":{"type":"string","pattern":"^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$","description":"MAC address in colon-separated hex notation","examples":["00:1A:2B:3C:4D:5E"]},"Common.Pagination.AggregationParams":{"type":"object","properties":{"bucket":{"$ref":"#/$defs/Common.Pagination.TimeBucket","description":"Time bucket size","default":"auto"},"group_by":{"type":"array","items":{"type":"string"},"description":"Group by these dimensions"},"filter":{"type":"string","description":"Filter expression"}},"unevaluatedProperties":{"not":{}},"description":"Aggregation query parameters"},"Common.Pagination.CursorPaginationParams":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor for fetching the next page"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Maximum number of items to return (1-1000)","default":100},"order":{"$ref":"#/$defs/Common.Pagination.SortOrder","description":"Sort direction","default":"desc"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based pagination parameters"},"Common.Pagination.OffsetPaginationParams":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":1,"description":"Page number (1-indexed)","default":1},"page_size":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Items per page (1-1000)","default":100}},"unevaluatedProperties":{"not":{}},"description":"Offset-based pagination parameters"},"Common.Pagination.SortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order"},"Common.Pagination.StreamParams":{"type":"object","properties":{"since":{"type":"string","format":"date-time","description":"Include historical data from this timestamp"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Filter by trace ID"},"service_name":{"type":"string","description":"Filter by service name"},"max_events_per_second":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"description":"Maximum events per second (rate limiting)","default":100}},"unevaluatedProperties":{"not":{}},"description":"Streaming parameters for SSE endpoints"},"Common.Pagination.TimeBucket":{"type":"string","enum":["1m","5m","15m","1h","1d","1w","auto"],"description":"Time bucket size for aggregations"},"Common.Pagination.TimeRangeParams":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","description":"Start of time range (inclusive)"},"end_time":{"type":"string","format":"date-time","description":"End of time range (exclusive)"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":10000,"description":"Maximum number of items to return","default":1000}},"unevaluatedProperties":{"not":{}},"description":"Time-range based query parameters"},"Common.Percentage":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Percentage value (0.0 to 100.0)","x-csharp-type":"double"},"Common.Port":{"type":"integer","format":"int32","minimum":1,"maximum":65535,"description":"Network port number (1-65535)","x-csharp-type":"int"},"Common.Ratio":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Ratio value (0.0 to 1.0)","x-csharp-type":"double"},"Common.SemVer":{"type":"string","pattern":"^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\\\+([0-9a-zA-Z-]+(?:\\\\.[0-9a-zA-Z-]+)*))?$","description":"Semantic version string (e.g., 1.2.3)","examples":["2.1.0"]},"Common.SessionId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique session identifier","x-csharp-type":"SessionId","x-csharp-struct":true},"Common.Sha256Hash":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash in lowercase hex"},"Common.SpanId":{"type":"string","minLength":16,"maxLength":16,"pattern":"^[a-f0-9]{16}$","description":"Unique span identifier (16 lowercase hex characters)","examples":["b7ad6b7169203331"],"x-csharp-type":"SpanId","x-csharp-struct":true},"Common.Temperature":{"type":"number","format":"double","minimum":0,"maximum":2,"description":"Temperature setting for LLM requests (0.0-2.0)","x-csharp-type":"double"},"Common.Timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp with nanosecond precision (RFC 3339)"},"Common.TokenCount":{"type":"integer","format":"int64","minimum":0,"description":"Token count (for LLM operations)","x-csharp-type":"long"},"Common.TraceId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[a-f0-9]{32}$","description":"Unique trace identifier (32 lowercase hex characters)","examples":["0af7651916cd43dd8448eb211c80319c"],"x-csharp-type":"TraceId","x-csharp-struct":true},"Common.TraceParent":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","description":"W3C Trace Context traceparent header format","examples":["00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"]},"Common.TraceState":{"type":"string","description":"W3C Trace Context tracestate header (vendor-specific key-value pairs)","examples":["rojo=00f067aa0ba902b7,congo=t61rcWkgMzE"]},"Common.UnixNanos":{"type":"string","format":"uint64","description":"Unsigned Unix timestamp in nanoseconds since epoch, encoded as a decimal string","x-csharp-type":"ulong","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Common.UrlPath":{"type":"string","description":"URL path component","examples":["/api/v1/users"]},"Common.UrlQuery":{"type":"string","description":"URL query string (without leading ?)","examples":["page=1&limit=100"]},"Common.UrlString":{"type":"string","format":"uri","description":"URL string (absolute)"},"Common.UserAgent":{"type":"string","description":"User agent string","examples":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"]},"Common.UserId":{"type":"string","minLength":1,"maxLength":256,"description":"User identifier (pseudonymized for privacy)"},"Diagnostics.AgentDiagnosticCheckId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_][A-Za-z0-9._:/\\\\[\\\\]-]{0,127}$","description":"Stable machine identifier of one diagnostic check. This identifier is a value and must never be promoted to a telemetry key."},"Diagnostics.AgentDiagnosticCheckOutcome":{"type":"string","enum":["pass","fail","unknown"],"description":"Machine-computed result of one diagnostic check. For exists, an absent or null actual variable produces fail. For every other operator, missing required operands produce unknown; incompatible operand types also produce unknown. not_evaluated is deliberately not a check outcome."},"Diagnostics.AgentDiagnosticCheckResult":{"type":"object","required":["check_id","operator","actual","outcome"],"properties":{"check_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticCheckId"},"operator":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticOperator"},"actual":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"expected":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"expected_type":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticValueType"},"outcome":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticCheckOutcome"}},"unevaluatedProperties":{"not":{}},"description":"One structural, machine-computed check result. actual and expected reference variable names only. For equal, not_equal, contains, less_than, and greater_than, expected is required and expected_type is omitted. For exists, both are omitted and an absent or null actual variable produces fail. For type_is, expected is omitted and expected_type is required. For operators other than exists, missing required operands produce unknown; incompatible operand types also produce unknown. not_evaluated is reserved for the snapshot aggregate when checks is empty and is not emitted for an individual check."},"Diagnostics.AgentDiagnosticClassification":{"type":"string","enum":["public","internal","sensitive","secret"],"description":"Data-handling classification assigned before a diagnostic variable is captured."},"Diagnostics.AgentDiagnosticExtensionId":{"type":"string","enum":["qyl.agent.diagnostic.snapshot"],"description":"The versioned extension discriminator for a protected agent diagnostic snapshot."},"Diagnostics.AgentDiagnosticFormatVersion":{"type":"integer","format":"int32","minimum":1,"maximum":1,"description":"Wire-format version of an agent diagnostic snapshot. Version 1 is the only accepted format."},"Diagnostics.AgentDiagnosticOperator":{"type":"string","enum":["equal","not_equal","exists","type_is","contains","less_than","greater_than"],"description":"Closed operation evaluated by a diagnostic check. Checks are structural and never carry expression strings."},"Diagnostics.AgentDiagnosticOutcome":{"type":"string","enum":["pass","fail","unknown","not_evaluated"],"description":"Machine-computed aggregate result of a diagnostic snapshot. unknown reports one or more unknown check outcomes. not_evaluated is reserved for a snapshot whose checks array is empty."},"Diagnostics.AgentDiagnosticPhase":{"type":"string","enum":["input","output","error","checkpoint"],"description":"Execution boundary at which the state frame was captured."},"Diagnostics.AgentDiagnosticProbeId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_][A-Za-z0-9._:/\\\\[\\\\]-]{0,127}$","description":"Stable machine identifier of the probe that captured a diagnostic snapshot. This identifier is a value and must never be promoted to a telemetry key."},"Diagnostics.AgentDiagnosticSnapshot":{"type":"object","required":["extension_id","format_version","snapshot_id","capture_nonce","probe_id","phase","variables","checks","outcome"],"properties":{"extension_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticExtensionId"},"format_version":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticFormatVersion"},"snapshot_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticSnapshotId"},"capture_nonce":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[0-9a-f]{32}$","description":"Fresh 128-bit random nonce encoded as exactly 32 lowercase hexadecimal characters. It prevents equality inference across otherwise identical protected captures and must not be used as an identity key."},"probe_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticProbeId"},"phase":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticPhase"},"variables":{"type":"array","items":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariable"},"maxItems":64},"checks":{"type":"array","items":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticCheckResult"},"maxItems":64},"outcome":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticOutcome"}},"unevaluatedProperties":{"not":{}},"description":"Version 1 protected JSON state frame captured for an artificial-intelligence agent. extension_id and format_version are its schema identity. capture_nonce is fresh entropy and is not a stable identifier. Variables and checks are bounded, dynamic names remain values, and no human-oriented message or expression text is part of the contract. Overall outcome is not_evaluated only when checks is empty. For a non-empty checks array it is fail if any check fails, otherwise unknown if any check is unknown, otherwise pass."},"Diagnostics.AgentDiagnosticSnapshotId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_][A-Za-z0-9._:/\\\\[\\\\]-]{0,127}$","description":"Stable machine identifier of one diagnostic snapshot. This identifier is a value and must never be promoted to a telemetry key."},"Diagnostics.AgentDiagnosticSnapshotSummary":{"type":"object","required":["extension_id","format_version","snapshot_id","probe_id","phase","outcome","variable_count","check_count","failed_check_count","content_ref"],"properties":{"extension_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticExtensionId"},"format_version":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticFormatVersion"},"snapshot_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticSnapshotId"},"probe_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticProbeId"},"phase":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticPhase"},"outcome":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticOutcome"},"variable_count":{"type":"integer","format":"int32","minimum":0,"maximum":64},"check_count":{"type":"integer","format":"int32","minimum":0,"maximum":64},"failed_check_count":{"type":"integer","format":"int32","minimum":0,"maximum":64},"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef"}},"unevaluatedProperties":{"not":{}},"description":"Value-free event-data projection for a protected agent diagnostic snapshot. Encode this shape in WorkflowEventAppend.data on the existing content_captured event kind. content_ref must also occur in that event's content_refs and identifies UTF-8 JSON conforming to AgentDiagnosticSnapshot. Counts are computed from the referenced snapshot; failed_check_count counts checks whose outcome is fail. No variable names, values, human messages, expressions, nonce, or classifications may appear in this summary."},"Diagnostics.AgentDiagnosticValueType":{"type":"string","enum":["null","boolean","integer","number","string","json"],"description":"Declared JSON-level type of a diagnostic variable."},"Diagnostics.AgentDiagnosticVariable":{"anyOf":[{"$ref":"#/$defs/Diagnostics.CapturedAgentDiagnosticVariable"},{"$ref":"#/$defs/Diagnostics.RedactedAgentDiagnosticVariable"},{"$ref":"#/$defs/Diagnostics.OmittedAgentDiagnosticVariable"}],"description":"One dynamically named variable in a protected diagnostic snapshot. Capture is the discriminator and makes value presence unambiguous."},"Diagnostics.AgentDiagnosticVariableBase":{"type":"object","required":["name","type","classification"],"properties":{"name":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"type":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticValueType"},"classification":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticClassification"}},"description":"Common identity and policy fields for one dynamic diagnostic variable."},"Diagnostics.AgentDiagnosticVariableName":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_][A-Za-z0-9._:/\\\\[\\\\]-]{0,127}$","description":"Stable machine name of one dynamically captured variable. Names are data values, never telemetry attribute keys, event names, or span names."},"Diagnostics.CapturedAgentDiagnosticVariable":{"type":"object","required":["capture","value"],"properties":{"capture":{"type":"string","enum":["value"]},"value":{"anyOf":[{},{"type":"null"}]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableBase"}],"description":"A variable whose typed JSON value is present in protected snapshot content. The value is required and must match type: null is JSON null; boolean is a JSON boolean; integer is a signed 64-bit JSON integer; number is a finite JSON number; string is a JSON string; json is a JSON object or array. The protected content boundary, not this model, controls access to all captured values."},"Diagnostics.OmittedAgentDiagnosticVariable":{"type":"object","required":["capture"],"properties":{"capture":{"type":"string","enum":["omitted"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableBase"}],"description":"A variable whose value was unavailable or deliberately not captured. A value field is forbidden."},"Diagnostics.RedactedAgentDiagnosticVariable":{"type":"object","required":["capture"],"properties":{"capture":{"type":"string","enum":["redacted"]}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableBase"}],"description":"A variable observed by the probe whose value was replaced by policy. A value field is forbidden."},"Domains.Observe.Session.DeviceType":{"type":"string","enum":["desktop","mobile","tablet","tv","console","wearable","iot","bot","unknown"],"description":"Device types"},"Domains.Observe.Session.SessionAttributes":{"type":"object","required":["session_id"],"properties":{"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"previous_session_id":{"$ref":"#/$defs/Common.SessionId","description":"Previous session ID (for session continuity)"}},"unevaluatedProperties":{"not":{}},"description":"Session span/event attributes"},"Domains.Observe.Session.SessionClientInfo":{"type":"object","properties":{"ip":{"$ref":"#/$defs/Common.IpAddress","description":"Client IP address"},"user_agent":{"$ref":"#/$defs/Common.UserAgent","description":"User agent string"},"device_type":{"$ref":"#/$defs/Domains.Observe.Session.DeviceType","description":"Device type"},"os":{"type":"string","description":"Operating system"},"browser":{"type":"string","description":"Browser name"},"browser_version":{"type":"string","description":"Browser version"}},"unevaluatedProperties":{"not":{}},"description":"Session client information"},"Domains.Observe.Session.SessionEntity":{"type":"object","required":["session_id","start_time","trace_count","span_count","error_count","services","state"],"properties":{"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"user_id":{"$ref":"#/$defs/Common.UserId","description":"User ID (if authenticated)"},"start_time":{"type":"string","format":"date-time","description":"Session start time"},"end_time":{"type":"string","format":"date-time","description":"Session end time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs","description":"Session duration in milliseconds"},"trace_count":{"type":"integer","format":"int32","minimum":0,"description":"Total trace count in session"},"span_count":{"type":"integer","format":"int32","minimum":0,"description":"Total span count in session"},"error_count":{"type":"integer","format":"int32","minimum":0,"description":"Total error count in session"},"services":{"type":"array","items":{"type":"string"},"description":"Service names observed in this session"},"state":{"$ref":"#/$defs/Domains.Observe.Session.SessionState","description":"Session state"},"client":{"$ref":"#/$defs/Domains.Observe.Session.SessionClientInfo","description":"Client information"},"geo":{"$ref":"#/$defs/Domains.Observe.Session.SessionGeoInfo","description":"Location information"},"genai_usage":{"$ref":"#/$defs/Domains.Observe.Session.SessionGenAiUsage","description":"GenAI usage summary"}},"unevaluatedProperties":{"not":{}},"description":"Complete session entity with aggregated data","x-csharp-type":"SessionEntity"},"Domains.Observe.Session.SessionEvent":{"type":"object","required":["event_name","session_id","timestamp","event_domain"],"properties":{"event_name":{"$ref":"#/$defs/Domains.Observe.Session.SessionEventName","description":"Event name"},"session_id":{"$ref":"#/$defs/Common.SessionId","description":"Session ID"},"timestamp":{"type":"string","format":"date-time","description":"Event timestamp"},"event_domain":{"type":"string","enum":["session"],"description":"Event domain"}},"unevaluatedProperties":{"not":{}},"description":"Session lifecycle event"},"Domains.Observe.Session.SessionEventName":{"type":"string","enum":["session.start","session.end"],"description":"Session event names"},"Domains.Observe.Session.SessionGenAiUsage":{"type":"object","required":["request_count","total_input_tokens","total_output_tokens","models_used","providers_used"],"properties":{"request_count":{"type":"integer","format":"int32","minimum":0,"description":"Total GenAI requests in session"},"total_input_tokens":{"$ref":"#/$defs/Common.TokenCount","description":"Total input tokens consumed"},"total_output_tokens":{"$ref":"#/$defs/Common.TokenCount","description":"Total output tokens generated"},"models_used":{"type":"array","items":{"type":"string"},"description":"Models used in session"},"providers_used":{"type":"array","items":{"type":"string"},"description":"Providers used in session"}},"unevaluatedProperties":{"not":{}},"description":"Session GenAI usage summary"},"Domains.Observe.Session.SessionGeoInfo":{"type":"object","properties":{"country_code":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)"},"country_name":{"type":"string","description":"Country name"},"region":{"type":"string","description":"Region/state"},"city":{"type":"string","description":"City"},"postal_code":{"type":"string","description":"Postal code"},"timezone":{"type":"string","description":"Timezone"}},"unevaluatedProperties":{"not":{}},"description":"Session geographic information"},"Domains.Observe.Session.SessionState":{"type":"string","enum":["active","idle","ended","timed_out","invalidated"],"description":"Session states"},"Domains.Observe.Session.SessionStats":{"type":"object","required":["active_sessions","total_sessions","avg_duration_ms","sessions_with_errors","sessions_with_genai","bounce_rate"],"properties":{"active_sessions":{"$ref":"#/$defs/Common.Count","description":"Active sessions count"},"total_sessions":{"$ref":"#/$defs/Common.Count","description":"Total sessions in time range"},"avg_duration_ms":{"type":"number","format":"double","description":"Average session duration in milliseconds"},"sessions_with_errors":{"$ref":"#/$defs/Common.Count","description":"Sessions with errors"},"sessions_with_genai":{"$ref":"#/$defs/Common.Count","description":"Sessions with GenAI usage"},"bounce_rate":{"$ref":"#/$defs/Common.Ratio","description":"Bounce rate (single-page sessions)"}},"unevaluatedProperties":{"not":{}},"description":"Aggregated session statistics"},"Health.HealthCheckEntry":{"type":"object","required":["status","duration_ms"],"properties":{"status":{"$ref":"#/$defs/Health.HealthStatus"},"description":{"type":"string"},"duration_ms":{"type":"number","format":"double"}},"unevaluatedProperties":{"not":{}},"description":"One named health-check result."},"Health.HealthReport":{"type":"object","required":["status","total_duration_ms","entries","contract_revision"],"properties":{"status":{"$ref":"#/$defs/Health.HealthStatus"},"total_duration_ms":{"type":"number","format":"double"},"entries":{"type":"object","unevaluatedProperties":{"$ref":"#/$defs/Health.HealthCheckEntry"}},"contract_revision":{"$ref":"#/$defs/Common.ContractRevision","description":"Revision of the API contract this process serves, for the client-side startup handshake."}},"unevaluatedProperties":{"not":{}},"description":"Readiness or liveness report returned by /health and /alive."},"Health.HealthStatus":{"type":"string","enum":["healthy","degraded","unhealthy"],"description":"Health state reported by a qyl-managed process."},"Mcp.Tools.CiLogInput":{"type":"object","properties":{"run_id":{"$ref":"#/$defs/Common.SessionId","description":"Session id of one CI run for a per-leg phase breakdown; omit to list recent runs."},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":50,"description":"Maximum CI runs to list.","default":10}},"unevaluatedProperties":{"not":{}},"description":"Input for ci_log."},"Mcp.Tools.CiLogOutput":{"type":"object","required":["mode"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.CiRunSummary"}},"run_id":{"$ref":"#/$defs/Common.SessionId"},"phases":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.CiPhase"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for ci_log: recent runs, or one run's phases."},"Mcp.Tools.CiPhase":{"type":"object","required":["leg","phase","status","duration_ms"],"properties":{"leg":{"type":"string","description":"Value of the span's ci.leg attribute, falling back to its service name."},"phase":{"type":"string","description":"Span name, which the CI emitter convention sets to the phase name."},"status":{"$ref":"#/$defs/Mcp.Tools.CiPhaseStatus"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"message":{"type":"string","description":"Span status message, present on a failed phase."}},"unevaluatedProperties":{"not":{}},"description":"One phase span of a CI run, attributed to the leg that executed it."},"Mcp.Tools.CiPhaseStatus":{"type":"string","enum":["ok","error","unset"],"description":"Outcome of one CI phase span, projected from its OpenTelemetry span status."},"Mcp.Tools.CiRunSummary":{"type":"object","required":["run_id","state","start_time","error_count","services"],"properties":{"run_id":{"$ref":"#/$defs/Common.SessionId"},"state":{"$ref":"#/$defs/Domains.Observe.Session.SessionState"},"start_time":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"error_count":{"type":"integer","format":"int32","minimum":0,"description":"Spans in the run that ended with an error status."},"services":{"type":"array","items":{"type":"string"},"description":"Service names observed in the run, at least one of which is CI-emitted."}},"unevaluatedProperties":{"not":{}},"description":"One CI run, summarized from the session its telemetry is grouped under."},"Mcp.Tools.ControlWorkflowRunInput":{"type":"object","required":["run_id","action","idempotency_key"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"idempotency_key":{"type":"string","minLength":1,"maxLength":160},"input":{"type":"string","maxLength":32768}},"unevaluatedProperties":{"not":{}},"description":"Input for control_workflow_run."},"Mcp.Tools.ControlWorkflowRunOutput":{"type":"object","required":["command"],"properties":{"command":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for control_workflow_run."},"Mcp.Tools.DisplayMcpDashboardInput":{"type":"object","properties":{"hours":{"type":"number","format":"double","minimum":1,"maximum":168,"default":24}},"unevaluatedProperties":{"not":{}},"description":"Input for display_mcp_dashboard."},"Mcp.Tools.DisplayMcpDashboardOutput":{"type":"object","required":["stats"],"properties":{"stats":{"$ref":"#/$defs/Mcp.Tools.McpDashboardStats"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_mcp_dashboard."},"Mcp.Tools.DisplayTracesInput":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"},"session_id":{"$ref":"#/$defs/Common.SessionId"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for display_traces."},"Mcp.Tools.DisplayTracesOutput":{"type":"object","required":["traces","mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"selected_trace_id":{"$ref":"#/$defs/Common.TraceId"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_traces."},"Mcp.Tools.DisplayWorkflowGraphInput":{"type":"object","properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"node_cursor":{"$ref":"#/$defs/Workflow.WorkflowNodeCursor","description":"Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it."},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"$ref":"#/$defs/Workflow.WorkflowEdgeCursor","description":"Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it."},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500}},"unevaluatedProperties":{"not":{}},"description":"Input for display_workflow_graph. Omit run_id to select the most recent run."},"Mcp.Tools.DisplayWorkflowGraphOutput":{"type":"object","required":["graph","live_controls_available","mode"],"properties":{"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"live_controls_available":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for display_workflow_graph."},"Mcp.Tools.FetchTelemetryInput":{"type":"object","required":["view"],"properties":{"view":{"$ref":"#/$defs/Mcp.Tools.FetchTelemetryView"},"trace_id":{"$ref":"#/$defs/Common.TraceId"},"service_name":{"type":"string"},"severity_min":{"type":"integer","format":"int32","minimum":1,"maximum":24},"query":{"type":"string"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":200},"hours":{"type":"number","format":"double","minimum":1,"maximum":168}},"unevaluatedProperties":{"not":{}},"description":"Input for the app-only fetch_telemetry tool."},"Mcp.Tools.FetchTelemetryOutput":{"type":"object","required":["mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"trace":{"$ref":"#/$defs/OTel.Traces.Trace"},"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"stats":{"$ref":"#/$defs/Mcp.Tools.McpDashboardStats"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for the app-only fetch_telemetry tool."},"Mcp.Tools.FetchTelemetryView":{"type":"string","enum":["traces","trace","logs","mcp_stats"],"description":"Data projection requested by the app-only fetch_telemetry tool."},"Mcp.Tools.FetchWorkflowGraphUpdatesInput":{"type":"object","required":["run_id","after_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"after_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"wait_ms":{"type":"integer","format":"int32","minimum":0,"maximum":30000,"default":20000},"node_cursor":{"$ref":"#/$defs/Workflow.WorkflowNodeCursor","description":"Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it."},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"$ref":"#/$defs/Workflow.WorkflowEdgeCursor","description":"Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it."},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500},"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef","description":"Optional captured payload to retrieve lazily for the selected run."}},"unevaluatedProperties":{"not":{}},"description":"Input for the app-only fetch_workflow_graph_updates tool."},"Mcp.Tools.FetchWorkflowGraphUpdatesOutput":{"type":"object","required":["page","mode"],"properties":{"page":{"$ref":"#/$defs/Workflow.WorkflowEventPage"},"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"content":{"$ref":"#/$defs/Workflow.WorkflowContent"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for the app-only fetch_workflow_graph_updates tool."},"Mcp.Tools.GetActiveWorkflowRunInput":{"type":"object","unevaluatedProperties":{"not":{}},"description":"Input for get_active_workflow_run."},"Mcp.Tools.GetActiveWorkflowRunOutput":{"type":"object","required":["active","live_controls_available"],"properties":{"active":{"type":"boolean"},"live_controls_available":{"type":"boolean"},"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"thread_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for get_active_workflow_run."},"Mcp.Tools.GetTraceInput":{"type":"object","required":["trace_id"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"}},"unevaluatedProperties":{"not":{}},"description":"Input for get_trace."},"Mcp.Tools.GetTraceOutput":{"type":"object","required":["trace","mode"],"properties":{"trace":{"$ref":"#/$defs/OTel.Traces.Trace"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for get_trace."},"Mcp.Tools.GetWorkflowGraphInput":{"type":"object","required":["run_id"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"node_cursor":{"$ref":"#/$defs/Workflow.WorkflowNodeCursor","description":"Opaque node continuation. Reuse it unchanged from the preceding snapshot's next_node_cursor; do not parse, construct, or modify it."},"node_limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"edge_cursor":{"$ref":"#/$defs/Workflow.WorkflowEdgeCursor","description":"Opaque edge continuation. Reuse it unchanged from the preceding snapshot's next_edge_cursor; do not parse, construct, or modify it."},"edge_limit":{"type":"integer","format":"int32","minimum":1,"maximum":2000,"default":500}},"unevaluatedProperties":{"not":{}},"description":"Input for get_workflow_graph."},"Mcp.Tools.GetWorkflowGraphOutput":{"type":"object","required":["graph","mode"],"properties":{"graph":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for get_workflow_graph."},"Mcp.Tools.InspectWorkflowEventsInput":{"type":"object","required":["run_id","after_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"after_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":1000,"default":250},"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef","description":"Optional captured payload to retrieve lazily for the selected run."}},"unevaluatedProperties":{"not":{}},"description":"Input for inspect_workflow_events."},"Mcp.Tools.InspectWorkflowEventsOutput":{"type":"object","required":["page","mode"],"properties":{"page":{"$ref":"#/$defs/Workflow.WorkflowEventPage"},"content":{"$ref":"#/$defs/Workflow.WorkflowContent"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for inspect_workflow_events."},"Mcp.Tools.ListSessionsInput":{"type":"object","properties":{"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20},"active_only":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Input for list_sessions."},"Mcp.Tools.ListSessionsOutput":{"type":"object","required":["sessions","mode"],"properties":{"sessions":{"type":"array","items":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_sessions."},"Mcp.Tools.ListTracesInput":{"type":"object","properties":{"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for list_traces."},"Mcp.Tools.ListTracesOutput":{"type":"object","required":["traces","mode"],"properties":{"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.TraceSummary"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_traces."},"Mcp.Tools.ListWorkflowRunsInput":{"type":"object","properties":{"status":{"$ref":"#/$defs/Workflow.WorkflowRunStatus"},"cursor":{"$ref":"#/$defs/Workflow.WorkflowRunCursor"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20}},"unevaluatedProperties":{"not":{}},"description":"Input for list_workflow_runs."},"Mcp.Tools.ListWorkflowRunsOutput":{"type":"object","required":["runs","has_more","mode"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowRun"}},"next_cursor":{"$ref":"#/$defs/Workflow.WorkflowRunCursor"},"has_more":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for list_workflow_runs."},"Mcp.Tools.McpDashboardBucket":{"type":"object","required":["start","requests","errors"],"properties":{"start":{"type":"string","format":"date-time"},"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDashboardStats":{"type":"object","required":["window","buckets","totals","by_server","by_transport","by_method","tools","span_count_analyzed","truncated","mode"],"properties":{"window":{"$ref":"#/$defs/Mcp.Tools.McpDashboardWindow"},"buckets":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpDashboardBucket"}},"totals":{"$ref":"#/$defs/Mcp.Tools.McpDashboardTotals"},"by_server":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"by_transport":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"by_method":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpNameRequestCount"}},"tools":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.McpToolStats"}},"span_count_analyzed":{"type":"integer","format":"int32","minimum":0},"truncated":{"type":"boolean"},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate MCP traffic statistics shown by qyl.mcp."},"Mcp.Tools.McpDashboardTotals":{"type":"object","required":["requests","errors","error_rate"],"properties":{"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"error_rate":{"type":"number","format":"double","minimum":0,"maximum":1}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDashboardWindow":{"type":"object","required":["start","end","bucket_ms"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"bucket_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpDataMode":{"type":"string","enum":["live","demo"],"description":"Whether a qyl MCP tool read live collector data or the explicit demo dataset."},"Mcp.Tools.McpNameRequestCount":{"type":"object","required":["name","requests"],"properties":{"name":{"type":"string"},"requests":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.McpToolStats":{"type":"object","required":["name","requests","errors","error_rate","avg_ms","p95_ms"],"properties":{"name":{"type":"string"},"requests":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"error_rate":{"type":"number","format":"double","minimum":0,"maximum":1},"avg_ms":{"type":"number","format":"double","minimum":0},"p95_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}}},"Mcp.Tools.RecordDiagnosticSnapshotCheckInput":{"type":"object","required":["check_id","operator","actual"],"properties":{"check_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticCheckId"},"operator":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticOperator"},"actual":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"expected":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"expected_type":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticValueType"}},"unevaluatedProperties":{"not":{}},"description":"One structural diagnostic check submitted for evaluation. equal, not_equal, contains, less_than, and greater_than require expected and forbid expected_type; type_is requires expected_type and forbids expected; exists forbids both."},"Mcp.Tools.RecordDiagnosticSnapshotInput":{"type":"object","required":["snapshot_id","probe_id","phase","variables"],"properties":{"snapshot_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticSnapshotId"},"probe_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticProbeId"},"phase":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticPhase"},"variables":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.RecordDiagnosticSnapshotVariableInput"},"maxItems":64},"checks":{"type":"array","items":{"$ref":"#/$defs/Mcp.Tools.RecordDiagnosticSnapshotCheckInput"},"maxItems":64,"default":[]}},"unevaluatedProperties":{"not":{}},"description":"Input for record_diagnostic_snapshot. Reuse the same snapshot_id and semantic payload when retrying; changing the payload under an existing snapshot_id is a conflict."},"Mcp.Tools.RecordDiagnosticSnapshotOutput":{"type":"object","required":["recorded","code","snapshot_id"],"properties":{"recorded":{"type":"boolean"},"code":{"type":"string"},"snapshot_id":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticSnapshotId"},"event_id":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"field":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for record_diagnostic_snapshot."},"Mcp.Tools.RecordDiagnosticSnapshotVariableInput":{"type":"object","required":["name","classification","value"],"properties":{"name":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticVariableName"},"classification":{"$ref":"#/$defs/Diagnostics.AgentDiagnosticClassification"},"value":{"anyOf":[{},{"type":"null"}]}},"unevaluatedProperties":{"not":{}},"description":"One dynamically named JSON value submitted for protected diagnostic capture. Classification is applied before the frame leaves the observer bridge."},"Mcp.Tools.SearchLogsInput":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId"},"service_name":{"type":"string"},"severity_min":{"type":"integer","format":"int32","minimum":1,"maximum":24},"query":{"type":"string"},"limit":{"type":"integer","format":"int32","minimum":1,"maximum":200,"default":50}},"unevaluatedProperties":{"not":{}},"description":"Input for search_logs."},"Mcp.Tools.SearchLogsOutput":{"type":"object","required":["logs","mode"],"properties":{"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"mode":{"$ref":"#/$defs/Mcp.Tools.McpDataMode"}},"unevaluatedProperties":{"not":{}},"description":"Structured output for search_logs."},"OTel.Enums.ErrorType":{"type":"string","enum":["_OTHER","TIMEOUT","CONNECTION_REFUSED","DNS_ERROR","TLS_ERROR","AUTH_ERROR","PERMISSION_DENIED","NOT_FOUND","RESOURCE_EXHAUSTED","INVALID_ARGUMENT","CANCELLED"],"description":"Standardized error types"},"OTel.Enums.EventDomain":{"type":"string","enum":["browser","device","k8s","session","gen_ai","exception","log"],"description":"Event domain (namespace for event types)"},"OTel.Enums.SeverityNumber":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"description":"Log severity number following OTel specification (1-24)"},"OTel.Enums.SeverityText":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"description":"Log severity text (human-readable)"},"OTel.Enums.SpanFlags":{"type":"number","enum":[0,1,2],"description":"Span flags as defined in W3C Trace Context"},"OTel.Enums.SpanKind":{"type":"number","enum":[0,1,2,3,4,5],"description":"Span kind describing the relationship between spans"},"OTel.Enums.SpanStatusCode":{"type":"number","enum":[0,1,2],"description":"Span status code"},"OTel.Enums.TelemetrySdkLanguage":{"type":"string","enum":["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","rust","swift","webjs"],"description":"Telemetry SDK language"},"OTel.Logs.LogBody":{"type":"object","oneOf":[{"$ref":"#/$defs/OTel.Logs.LogBodyString"},{"$ref":"#/$defs/OTel.Logs.LogBodyKvList"},{"$ref":"#/$defs/OTel.Logs.LogBodyArray"},{"$ref":"#/$defs/OTel.Logs.LogBodyBytes"}],"discriminator":{"propertyName":"kind","mapping":{"stringBody":"#/components/schemas/OTel.Logs.LogBodyString","kvListBody":"#/components/schemas/OTel.Logs.LogBodyKvList","arrayBody":"#/components/schemas/OTel.Logs.LogBodyArray","bytesBody":"#/components/schemas/OTel.Logs.LogBodyBytes"}},"description":"Log body content - can be string, structured, or bytes"},"OTel.Logs.LogBodyArray":{"type":"object","required":["array_value"],"properties":{"array_value":{"type":"array","items":{"$ref":"#/$defs/Common.AttributeValue"},"description":"Array of values"}},"unevaluatedProperties":{"not":{}},"description":"Array log body"},"OTel.Logs.LogBodyBytes":{"type":"object","required":["bytes_value"],"properties":{"bytes_value":{"type":"string","contentEncoding":"base64","description":"Binary value (base64 encoded)"}},"unevaluatedProperties":{"not":{}},"description":"Binary log body"},"OTel.Logs.LogBodyKvList":{"type":"object","required":["kv_list_value"],"properties":{"kv_list_value":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Key-value pairs"}},"unevaluatedProperties":{"not":{}},"description":"Structured key-value log body"},"OTel.Logs.LogBodyString":{"type":"object","required":["string_value"],"properties":{"string_value":{"type":"string","description":"String value"}},"unevaluatedProperties":{"not":{}},"description":"String log body"},"OTel.Logs.LogRecord":{"type":"object","required":["time_unix_nano","observed_time_unix_nano","severity_number","body","resource"],"properties":{"time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Timestamp when the event occurred (nanoseconds since epoch)"},"observed_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Timestamp when the log was observed/collected (nanoseconds since epoch)"},"severity_number":{"$ref":"#/$defs/OTel.Enums.SeverityNumber","description":"Severity number (1-24)"},"severity_text":{"$ref":"#/$defs/OTel.Enums.SeverityText","description":"Severity text (DEBUG, INFO, WARN, ERROR, etc.)"},"body":{"$ref":"#/$defs/OTel.Logs.LogBody","description":"Log body - the main content"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Log attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"flags":{"type":"integer","format":"int32","description":"Flags (trace flags)"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Associated trace ID"},"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Associated span ID"},"event_name":{"type":"string","description":"Optional event category whose presence identifies this log record as an event; records with the same name are expected to share one body and attribute schema."},"resource":{"$ref":"#/$defs/OTel.Resource.Resource","description":"Resource describing the entity that produced this log"},"instrumentation_scope":{"$ref":"#/$defs/Common.InstrumentationScope","description":"Instrumentation scope"}},"unevaluatedProperties":{"not":{}},"description":"OpenTelemetry Log Record"},"OTel.Logs.LogTemplate":{"type":"object","required":["template","parameters"],"properties":{"template":{"type":"string","description":"Template string with {placeholder} syntax"},"parameters":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Template parameters"},"rendered_message":{"type":"string","description":"Rendered message"}},"unevaluatedProperties":{"not":{}},"description":"Log message template with placeholders"},"OTel.Resource.CloudProvider":{"type":"string","enum":["alibaba_cloud","aws","azure","gcp","heroku","ibm_cloud","tencent_cloud"],"description":"Cloud provider types"},"OTel.Resource.HostArch":{"type":"string","enum":["amd64","arm32","arm64","ia64","ppc32","ppc64","s390x","x86"],"description":"Host architecture types"},"OTel.Resource.OsType":{"type":"string","enum":["windows","linux","darwin","freebsd","netbsd","openbsd","dragonflybsd","hpux","aix","solaris","z_os"],"description":"Operating system types"},"OTel.Resource.Resource":{"type":"object","required":["service_name"],"properties":{"service_name":{"type":"string","description":"Service name (required)"},"service_namespace":{"type":"string","description":"Service namespace for grouping"},"service_instance_id":{"type":"string","description":"Service instance ID (unique per instance)"},"service_version":{"$ref":"#/$defs/Common.SemVer","description":"Service version"},"telemetry_sdk_name":{"type":"string","description":"Telemetry SDK name"},"telemetry_sdk_language":{"$ref":"#/$defs/OTel.Enums.TelemetrySdkLanguage","description":"Telemetry SDK language"},"telemetry_sdk_version":{"$ref":"#/$defs/Common.SemVer","description":"Telemetry SDK version"},"telemetry_distro_version":{"$ref":"#/$defs/Common.SemVer","description":"Telemetry distribution version"},"deployment_environment":{"type":"string","description":"Deployment environment (e.g., production, staging)"},"cloud_provider":{"$ref":"#/$defs/OTel.Resource.CloudProvider","description":"Cloud provider"},"cloud_region":{"type":"string","description":"Cloud region"},"cloud_availability_zone":{"type":"string","description":"Cloud availability zone"},"cloud_account_id":{"type":"string","description":"Cloud account ID"},"cloud_platform":{"type":"string","description":"Cloud platform (e.g., aws_ecs, gcp_cloud_run)"},"host_name":{"type":"string","description":"Host name"},"host_id":{"type":"string","description":"Host ID"},"host_type":{"type":"string","description":"Host type (e.g., n1-standard-1)"},"host_arch":{"$ref":"#/$defs/OTel.Resource.HostArch","description":"Host architecture (e.g., amd64, arm64)"},"os_type":{"$ref":"#/$defs/OTel.Resource.OsType","description":"Operating system type"},"os_description":{"type":"string","description":"Operating system description"},"os_version":{"type":"string","description":"Operating system version"},"process_pid":{"type":"integer","format":"int64","description":"Process ID"},"process_executable_name":{"type":"string","description":"Process executable name"},"process_command_line":{"type":"string","description":"Process command line"},"process_runtime_name":{"type":"string","description":"Process runtime name"},"process_runtime_version":{"type":"string","description":"Process runtime version"},"container_id":{"type":"string","description":"Container ID"},"container_name":{"type":"string","description":"Container name"},"container_image_name":{"type":"string","description":"Container image name"},"container_image_tags":{"type":"array","items":{"type":"string"},"description":"Container image tags"},"k8s_cluster_name":{"type":"string","description":"Kubernetes cluster name"},"k8s_namespace_name":{"type":"string","description":"Kubernetes namespace"},"k8s_pod_name":{"type":"string","description":"Kubernetes pod name"},"k8s_pod_uid":{"type":"string","description":"Kubernetes pod UID"},"k8s_deployment_name":{"type":"string","description":"Kubernetes deployment name"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Additional resource attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"entity_refs":{"type":"array","items":{"$ref":"#/$defs/Common.EntityRef"},"description":"Entities participating in this Resource, keyed by attributes on the Resource."}},"unevaluatedProperties":{"not":{}},"description":"Resource describes the entity producing telemetry"},"OTel.Traces.Span":{"type":"object","required":["span_id","trace_id","name","kind","start_time_unix_nano","end_time_unix_nano","status","resource"],"properties":{"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Unique span identifier (16 hex chars)"},"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Trace identifier (32 hex chars)"},"parent_span_id":{"$ref":"#/$defs/Common.SpanId","description":"Parent span identifier (null for root spans)"},"trace_state":{"$ref":"#/$defs/Common.TraceState","description":"W3C trace state"},"name":{"type":"string","minLength":1,"description":"Human-readable span name"},"kind":{"$ref":"#/$defs/OTel.Enums.SpanKind","description":"Span kind"},"start_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Start timestamp in nanoseconds since epoch"},"end_time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"End timestamp in nanoseconds since epoch"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Span attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"events":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanEvent"},"description":"Span events (logs attached to span)"},"dropped_events_count":{"$ref":"#/$defs/Common.Count","description":"Dropped events count"},"links":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanLink"},"description":"Links to other spans"},"dropped_links_count":{"$ref":"#/$defs/Common.Count","description":"Dropped links count"},"status":{"$ref":"#/$defs/OTel.Traces.SpanStatus","description":"Span status"},"flags":{"type":"integer","format":"int32","description":"Span flags"},"resource":{"$ref":"#/$defs/OTel.Resource.Resource","description":"Resource describing the entity that produced this span"},"instrumentation_scope":{"$ref":"#/$defs/Common.InstrumentationScope","description":"Instrumentation scope"}},"unevaluatedProperties":{"not":{}},"description":"OpenTelemetry Span representing a single operation in a distributed trace"},"OTel.Traces.SpanEvent":{"type":"object","required":["name","time_unix_nano"],"properties":{"name":{"type":"string","minLength":1,"description":"Event name"},"time_unix_nano":{"$ref":"#/$defs/Common.UnixNanos","description":"Event timestamp in nanoseconds since epoch"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Event attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"}},"unevaluatedProperties":{"not":{}},"description":"Event occurring during a span's lifetime"},"OTel.Traces.SpanLink":{"type":"object","required":["trace_id","span_id"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Linked trace ID"},"span_id":{"$ref":"#/$defs/Common.SpanId","description":"Linked span ID"},"trace_state":{"$ref":"#/$defs/Common.TraceState","description":"Trace state of the linked span"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"Link attributes"},"dropped_attributes_count":{"$ref":"#/$defs/Common.Count","description":"Dropped attributes count"},"flags":{"type":"integer","format":"int32","description":"Link flags"}},"unevaluatedProperties":{"not":{}},"description":"Link to another span (e.g., batch processing)"},"OTel.Traces.SpanQueryFilters":{"type":"object","properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Filter by trace ID"},"parent_span_id":{"$ref":"#/$defs/Common.SpanId","description":"Filter by parent span ID"},"name":{"type":"string","description":"Filter by span name (supports wildcards)"},"kind":{"$ref":"#/$defs/OTel.Enums.SpanKind","description":"Filter by span kind"},"service_name":{"type":"string","description":"Filter by service name"},"status_code":{"$ref":"#/$defs/OTel.Enums.SpanStatusCode","description":"Filter by status code"},"min_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Minimum duration in nanoseconds"},"max_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Maximum duration in nanoseconds"},"attribute":{"type":"string","description":"Filter by attribute key-value pair"}},"unevaluatedProperties":{"not":{}},"description":"Filter parameters for querying spans"},"OTel.Traces.SpanStats":{"type":"object","required":["total_count","error_count","error_rate","avg_duration_ns","p50_duration_ns","p90_duration_ns","p99_duration_ns","min_duration_ns","max_duration_ns","throughput_per_second"],"properties":{"total_count":{"$ref":"#/$defs/Common.Count","description":"Total span count"},"error_count":{"$ref":"#/$defs/Common.Count","description":"Error count"},"error_rate":{"$ref":"#/$defs/Common.Ratio","description":"Error rate (0.0 - 1.0)"},"avg_duration_ns":{"type":"number","format":"double","description":"Average duration in nanoseconds"},"p50_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P50 duration in nanoseconds"},"p90_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P90 duration in nanoseconds"},"p99_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"P99 duration in nanoseconds"},"min_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Minimum duration in nanoseconds"},"max_duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Maximum duration in nanoseconds"},"throughput_per_second":{"type":"number","format":"double","description":"Throughput (spans per second)"},"by_service":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanStatsByDimension"},"description":"Stats grouped by service"},"by_operation":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.SpanStatsByDimension"},"description":"Stats grouped by operation name"}},"unevaluatedProperties":{"not":{}},"description":"Aggregated span statistics"},"OTel.Traces.SpanStatsByDimension":{"type":"object","required":["dimension","count","avg_duration_ns","error_rate"],"properties":{"dimension":{"type":"string","description":"Dimension value (e.g., service name)"},"count":{"$ref":"#/$defs/Common.Count","description":"Span count for this dimension"},"avg_duration_ns":{"type":"number","format":"double","description":"Average duration in nanoseconds"},"error_rate":{"$ref":"#/$defs/Common.Ratio","description":"Error rate for this dimension"}},"unevaluatedProperties":{"not":{}},"description":"Span statistics for a specific dimension value"},"OTel.Traces.SpanStatus":{"type":"object","required":["code"],"properties":{"code":{"$ref":"#/$defs/OTel.Enums.SpanStatusCode","description":"Status code"},"message":{"type":"string","description":"Status message (only for ERROR status)"}},"unevaluatedProperties":{"not":{}},"description":"Span status"},"OTel.Traces.Trace":{"type":"object","required":["spans"],"properties":{"spans":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Span"},"description":"All spans in this trace"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/OTel.Traces.TraceSummary"}],"description":"Complete trace containing all related spans"},"OTel.Traces.TraceSummary":{"type":"object","required":["trace_id","span_count","duration_ns","start_time","end_time","services","has_error"],"properties":{"trace_id":{"$ref":"#/$defs/Common.TraceId","description":"Trace identifier"},"root_span":{"$ref":"#/$defs/OTel.Traces.Span","description":"Root span of the trace"},"span_count":{"type":"integer","format":"int32","description":"Total span count"},"duration_ns":{"$ref":"#/$defs/Common.DurationNs","description":"Trace duration in nanoseconds"},"start_time":{"type":"string","format":"date-time","description":"Trace start time"},"end_time":{"type":"string","format":"date-time","description":"Trace end time"},"services":{"type":"array","items":{"type":"string"},"description":"Services involved in this trace"},"has_error":{"type":"boolean","description":"Whether trace contains errors"}},"description":"Trace summary without the full span collection"},"Runner.RunnerLogEvents":{"$ref":"#/$defs/Runner.RunnerLogLine"},"Runner.RunnerLogLine":{"type":"object","required":["resource","stream","line"],"properties":{"resource":{"type":"string"},"stream":{"$ref":"#/$defs/Runner.RunnerLogStream"},"line":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"One bounded child-process log line exposed by the runner."},"Runner.RunnerLogStream":{"type":"string","enum":["out","err"],"description":"Origin stream for one captured child-process log line."},"Runner.RunnerResourceEvents":{"$ref":"#/$defs/Runner.RunnerResourceState"},"Runner.RunnerResourceKind":{"type":"string","enum":["collector","project","command","stdio","http","inproc"],"description":"Kind of process or connection supervised by the local qyl runner."},"Runner.RunnerResourceLifecycle":{"type":"string","enum":["pending","starting","ready","stopping","stopped","failed"],"description":"Lifecycle state of a resource supervised by the local qyl runner."},"Runner.RunnerResourceState":{"type":"object","required":["name","lifecycle","timestamp"],"properties":{"name":{"type":"string"},"lifecycle":{"$ref":"#/$defs/Runner.RunnerResourceLifecycle"},"timestamp":{"type":"string","format":"date-time"},"kind":{"$ref":"#/$defs/Runner.RunnerResourceKind"},"allocated_port":{"type":"integer","format":"int32","minimum":1,"maximum":65535},"endpoint":{"type":"string","format":"uri"},"last_error":{"type":"string"},"server_identity":{"description":"Opaque SDK server-info entity when this resource is an initialized MCP connection."},"tool_count":{"type":"integer","format":"int32","minimum":0},"restarts":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Current client-visible state of one runner resource."},"Streaming.HeartbeatEvent":{"type":"object","required":["type","timestamp"],"properties":{"type":{"type":"string","enum":["heartbeat"]},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Keep-alive event emitted while no new log is available."},"Streaming.LogEvents":{"anyOf":[{"$ref":"#/$defs/Streaming.LogStreamEvent"},{"$ref":"#/$defs/Streaming.HeartbeatEvent"}]},"Streaming.LogStreamEvent":{"type":"object","required":["type","data","timestamp"],"properties":{"type":{"type":"string","enum":["log"]},"data":{"$ref":"#/$defs/OTel.Logs.LogRecord"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One log delivered by the collector's live stream."},"Workbench.WorkbenchAssertionResult":{"type":"object","required":["assertion_id","kind","status"],"properties":{"assertion_id":{"type":"string"},"kind":{"type":"string"},"status":{"$ref":"#/$defs/Workbench.WorkbenchAssertionStatus"},"message":{"type":"string"},"actual":{}},"unevaluatedProperties":{"not":{}},"description":"Outcome of one assertion with sanitized actual evidence when useful."},"Workbench.WorkbenchAssertionStatus":{"type":"string","enum":["passed","failed","error","skipped"],"description":"Assertion outcome reported by an evaluation."},"Workbench.WorkbenchBuiltinServerConfiguration":{"type":"object","required":["transport","name"],"properties":{"transport":{"type":"string","enum":["builtin"]},"name":{"type":"string","minLength":1}},"unevaluatedProperties":{"not":{}},"description":"Sanitized built-in MCP server configuration."},"Workbench.WorkbenchConnectionSnapshot":{"type":"object","required":["status","changed_at"],"properties":{"status":{"$ref":"#/$defs/Workbench.WorkbenchConnectionStatus"},"changed_at":{"type":"string","format":"date-time"},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"type":"string","format":"date-time"},"initialization":{"$ref":"#/$defs/Workbench.WorkbenchInitializationSnapshot"},"recent_error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Current connection state and most recent initialization evidence for one MCP server."},"Workbench.WorkbenchConnectionStatus":{"type":"string","enum":["disconnected","connecting","connected","disconnecting","reconnecting","failed"],"description":"Connection lifecycle for one configured MCP server."},"Workbench.WorkbenchDiscoveryCollection":{"type":"object","required":["items","count","complete","discovered_at"],"properties":{"items":{"type":"array","items":{}},"count":{"type":"integer","format":"int32","minimum":0},"complete":{"type":"boolean"},"cursor":{"type":"string"},"next_cursor":{"type":"string"},"discovered_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One discovered MCP entity collection. Every item remains the SDK-validated opaque entity."},"Workbench.WorkbenchDiscoverySnapshot":{"type":"object","required":["server_id","started_at","completed_at","tools","resources","resource_templates","prompts"],"properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"tools":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"resources":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"resource_templates":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"},"prompts":{"$ref":"#/$defs/Workbench.WorkbenchDiscoveryCollection"}},"unevaluatedProperties":{"not":{}},"description":"Complete MCP capability discovery evidence for one server."},"Workbench.WorkbenchEnvironmentSecretReference":{"type":"object","required":["name","secret"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"secret":{"$ref":"#/$defs/Workbench.WorkbenchSecretReference"}},"unevaluatedProperties":{"not":{}},"description":"Environment variable whose value is resolved from a secret reference at connection time."},"Workbench.WorkbenchError":{"type":"object","required":["category","code","message","occurred_at","retryable"],"properties":{"category":{"$ref":"#/$defs/Workbench.WorkbenchErrorCategory"},"code":{"type":"string"},"message":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"retryable":{"type":"boolean"},"details":{"description":"Sanitized implementation details with credentials and secret values removed."}},"unevaluatedProperties":{"not":{}},"description":"Typed, sanitized failure captured by the MCP workbench."},"Workbench.WorkbenchErrorCategory":{"type":"string","enum":["authentication","transport","protocol","serialization","schema_validation","tool_error","timeout","cancelled","internal"],"description":"Stable category for a workbench, transport, protocol, or tool execution error."},"Workbench.WorkbenchEvaluationComparisonRequest":{"type":"object","required":["baseline_run_id","candidate_run_id"],"properties":{"baseline_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"candidate_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"}},"unevaluatedProperties":{"not":{}},"description":"Request to compare a baseline MCP evaluation run with a candidate run."},"Workbench.WorkbenchEvaluationExport":{"type":"object","required":["id","run_id","format","status","requested_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportId"},"run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"format":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportFormat"},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportStatus"},"requested_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"media_type":{"type":"string"},"file_name":{"type":"string"},"byte_size":{"$ref":"#/$defs/Common.ByteSize"},"sha256":{"$ref":"#/$defs/Common.Sha256Hash"},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Metadata for one generated evaluation JSON or readable report artifact."},"Workbench.WorkbenchEvaluationExportAccepted":{"type":"object","required":["export"],"properties":{"export":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"}},"unevaluatedProperties":{"not":{}},"description":"An evaluation export was accepted and continues asynchronously."},"Workbench.WorkbenchEvaluationExportArtifact":{"type":"object","required":["export","payload"],"properties":{"export":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"},"payload":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportPayload"}},"unevaluatedProperties":{"not":{}},"description":"Ready evaluation export metadata and its TypeSpec-owned content."},"Workbench.WorkbenchEvaluationExportFormat":{"type":"string","enum":["json","report"],"description":"Supported evaluation export representation."},"Workbench.WorkbenchEvaluationExportId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one generated evaluation export."},"Workbench.WorkbenchEvaluationExportPayload":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationJsonExportPayload"},{"$ref":"#/$defs/Workbench.WorkbenchEvaluationReportExportPayload"}],"description":"Exactly one generated evaluation export representation."},"Workbench.WorkbenchEvaluationExportRequest":{"type":"object","required":["format","idempotency_key"],"properties":{"format":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportFormat"},"include_protocol_events":{"type":"boolean","default":true},"include_telemetry":{"type":"boolean","default":true},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to generate a machine-readable or readable evaluation export."},"Workbench.WorkbenchEvaluationExportStatus":{"type":"string","enum":["pending","ready","failed"],"description":"Lifecycle for generation of an evaluation export artifact."},"Workbench.WorkbenchEvaluationJsonExportPayload":{"type":"object","required":["format","run","protocol_events","telemetry","exported_at"],"properties":{"format":{"type":"string","enum":["json"]},"run":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"},"protocol_events":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"}},"telemetry":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTelemetryResponse"}},"exported_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Machine-readable evaluation export with retained execution, protocol, and optional telemetry evidence."},"Workbench.WorkbenchEvaluationReportExportPayload":{"type":"object","required":["format","markdown","exported_at"],"properties":{"format":{"type":"string","enum":["report"]},"markdown":{"type":"string"},"exported_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Human-readable Markdown evaluation report."},"Workbench.WorkbenchEvaluationResultStatus":{"type":"string","enum":["passed","failed","error","skipped"],"description":"Outcome for one test case within an evaluation run."},"Workbench.WorkbenchEvaluationRun":{"type":"object","required":["id","workspace_id","test_cases","status","created_at","results"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"suite":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSuiteSnapshot"},"test_cases":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestCaseSnapshot"}},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunStatus"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestResult"}},"summary":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationEvidence"},"telemetry":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"Asynchronous MCP evaluation run with retained per-test evidence."},"Workbench.WorkbenchEvaluationRunAccepted":{"type":"object","required":["run"],"properties":{"run":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"}},"unevaluatedProperties":{"not":{}},"description":"An MCP evaluation run was accepted and continues asynchronously."},"Workbench.WorkbenchEvaluationRunComparison":{"type":"object","required":["baseline_run_id","candidate_run_id","baseline","candidate","success_rate_delta","reliability_delta","tests","compared_at"],"properties":{"baseline_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"candidate_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"baseline":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"candidate":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationSummary"},"success_rate_delta":{"type":"number","format":"double"},"reliability_delta":{"type":"number","format":"double"},"p95_duration_delta_ms":{"type":"number","format":"double"},"token_delta":{"type":"integer","format":"int64"},"cost_delta_usd":{"type":"number","format":"double"},"tests":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestComparison"}},"compared_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate comparison of two completed MCP evaluation runs."},"Workbench.WorkbenchEvaluationRunId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one MCP evaluation run."},"Workbench.WorkbenchEvaluationRunPage":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of MCP evaluation runs."},"Workbench.WorkbenchEvaluationRunRequest":{"type":"object","required":["idempotency_key"],"properties":{"idempotency_key":{"type":"string","minLength":8,"maxLength":256},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationRequest"},"concurrency":{"type":"integer","format":"int32","minimum":1,"maximum":50,"default":1},"fail_fast":{"type":"boolean","default":false}},"description":"Request to execute one test case or suite asynchronously."},"Workbench.WorkbenchEvaluationRunStatus":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"description":"Lifecycle for an MCP evaluation run."},"Workbench.WorkbenchEvaluationSuiteSnapshot":{"type":"object","required":["id","name","test_case_ids","tags"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSuiteId"},"name":{"type":"string"},"description":{"type":"string"},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"}},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Immutable suite definition captured when an evaluation run starts."},"Workbench.WorkbenchEvaluationSummary":{"type":"object","required":["total","passed","failed","errors","skipped","success_rate","reliability"],"properties":{"total":{"type":"integer","format":"int32","minimum":0},"passed":{"type":"integer","format":"int32","minimum":0},"failed":{"type":"integer","format":"int32","minimum":0},"errors":{"type":"integer","format":"int32","minimum":0},"skipped":{"type":"integer","format":"int32","minimum":0},"success_rate":{"$ref":"#/$defs/Common.Ratio"},"reliability":{"$ref":"#/$defs/Common.Ratio"},"mean_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p50_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p95_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"p99_duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"token_usage":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTokenUsage"},"cost":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCost"}},"unevaluatedProperties":{"not":{}},"description":"Aggregate correctness, reliability, latency, usage, and cost for an MCP evaluation run."},"Workbench.WorkbenchEvaluationTestCaseSnapshot":{"type":"object","required":["id","server_id","name","tool_name","timeout_ms","assertions","tags"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string"},"description":{"type":"string"},"tool_name":{"type":"string"},"arguments":{},"timeout_ms":{"type":"integer","format":"int32"},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"}},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Immutable reusable-test definition captured when an evaluation run starts."},"Workbench.WorkbenchEvaluationTestComparison":{"type":"object","required":["test_case_id","status"],"properties":{"test_case_id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"status":{"$ref":"#/$defs/Workbench.WorkbenchRegressionStatus"},"baseline_status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"candidate_status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"duration_delta_ms":{"type":"number","format":"double"}},"unevaluatedProperties":{"not":{}},"description":"Per-test comparison across a baseline and candidate MCP evaluation run."},"Workbench.WorkbenchEvaluationTestResult":{"type":"object","required":["test_case","status","assertions"],"properties":{"test_case":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationTestCaseSnapshot"},"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"status":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationResultStatus"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchAssertionResult"}},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"}},"unevaluatedProperties":{"not":{}},"description":"One test-case result retained by an MCP evaluation run."},"Workbench.WorkbenchExactAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["exact"]},"path":{"type":"string"},"expected":{}},"unevaluatedProperties":{"not":{}},"description":"Exact JSON value assertion at an optional JSON Pointer path."},"Workbench.WorkbenchExecutionAccepted":{"type":"object","required":["execution"],"properties":{"execution":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"}},"unevaluatedProperties":{"not":{}},"description":"An MCP execution was accepted and continues asynchronously."},"Workbench.WorkbenchExecutionCancelRequest":{"type":"object","required":["idempotency_key"],"properties":{"reason":{"type":"string","maxLength":1000},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to cancel an asynchronous MCP execution where the transport permits cancellation."},"Workbench.WorkbenchExecutionConfirmationEvidence":{"type":"object","required":["acknowledged","acknowledgement","confirmed_at"],"properties":{"acknowledged":{"type":"boolean","enum":[true]},"acknowledgement":{"type":"string"},"confirmed_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Server-timestamped confirmation evidence persisted for a consequential MCP tool invocation."},"Workbench.WorkbenchExecutionConfirmationRequest":{"type":"object","required":["acknowledged","acknowledgement"],"properties":{"acknowledged":{"type":"boolean","enum":[true]},"acknowledgement":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Client acknowledgement supplied when requesting a consequential MCP tool invocation."},"Workbench.WorkbenchExecutionCost":{"type":"object","required":["amount_usd","estimated"],"properties":{"amount_usd":{"$ref":"#/$defs/Common.CostUsd"},"estimated":{"type":"boolean"},"source":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"USD cost reported or estimated for one MCP execution when available."},"Workbench.WorkbenchExecutionEffect":{"type":"string","enum":["read_only","consequential","unknown"],"description":"How consequential the workbench considers an MCP tool invocation."},"Workbench.WorkbenchExecutionId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one asynchronous MCP tool execution."},"Workbench.WorkbenchExecutionPage":{"type":"object","required":["executions"],"properties":{"executions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of MCP execution records."},"Workbench.WorkbenchExecutionRecord":{"type":"object","required":["id","workspace_id","server_id","request","effect","status","created_at","attempt_count","retry_count"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRequest"},"effect":{"$ref":"#/$defs/Workbench.WorkbenchExecutionEffect","description":"Server-derived effect from the SDK-validated discovered Tool and its annotations."},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationEvidence"},"status":{"$ref":"#/$defs/Workbench.WorkbenchExecutionStatus"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"attempt_count":{"type":"integer","format":"int32","minimum":0},"retry_count":{"type":"integer","format":"int32","minimum":0},"cancel_requested_at":{"type":"string","format":"date-time"},"cancelled_at":{"type":"string","format":"date-time"},"result":{"description":"Complete opaque SDK tool-call result after output sanitization."},"error":{"$ref":"#/$defs/Workbench.WorkbenchError"},"token_usage":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTokenUsage"},"cost":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCost"},"telemetry":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"}},"unevaluatedProperties":{"not":{}},"description":"Persisted asynchronous execution evidence. SDK tool results remain opaque."},"Workbench.WorkbenchExecutionRequest":{"type":"object","required":["tool_name","timeout_ms","idempotency_key"],"properties":{"tool_name":{"type":"string","minLength":1},"arguments":{"description":"Opaque tool arguments validated against the SDK tool schema before execution."},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000,"default":30000},"confirmation":{"$ref":"#/$defs/Workbench.WorkbenchExecutionConfirmationRequest"},"idempotency_key":{"type":"string","minLength":8,"maxLength":256}},"unevaluatedProperties":{"not":{}},"description":"Request to asynchronously invoke one discovered MCP tool."},"Workbench.WorkbenchExecutionStatus":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled","timed_out"],"description":"Asynchronous MCP execution lifecycle."},"Workbench.WorkbenchExecutionTelemetryResponse":{"type":"object","required":["signals","correlation","traces","logs","queried_at","self_export_suppressed"],"properties":{"signals":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalSummary"},"correlation":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryCorrelation"},"traces":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"}},"logs":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"}},"queried_at":{"type":"string","format":"date-time"},"self_export_suppressed":{"type":"boolean","enum":[true],"description":"Confirms that workbench telemetry querying is excluded from workbench export instrumentation."}},"unevaluatedProperties":{"not":{}},"description":"Correlated Qyl observability evidence for one MCP execution. Signals unsupported by the connected Qyl read API are explicitly unavailable."},"Workbench.WorkbenchExecutionTokenUsage":{"type":"object","required":["estimated"],"properties":{"input_tokens":{"$ref":"#/$defs/Common.TokenCount"},"output_tokens":{"$ref":"#/$defs/Common.TokenCount"},"total_tokens":{"$ref":"#/$defs/Common.TokenCount"},"estimated":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Token usage reported or derived for one MCP execution when available."},"Workbench.WorkbenchExecutionUpdateEvents":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"},"Workbench.WorkbenchHeaderSecretReference":{"type":"object","required":["name","secret"],"properties":{"name":{"type":"string","minLength":1},"secret":{"$ref":"#/$defs/Workbench.WorkbenchSecretReference"},"scheme":{"$ref":"#/$defs/Workbench.WorkbenchHeaderSecretScheme","description":"Optional HTTP authentication scheme applied to the resolved secret. Omit for a raw header value."}},"unevaluatedProperties":{"not":{}},"description":"HTTP header whose value is resolved from a secret reference at connection time."},"Workbench.WorkbenchHeaderSecretScheme":{"type":"string","enum":["bearer","basic"],"description":"HTTP authentication scheme applied to an environment-resolved header secret."},"Workbench.WorkbenchInitializationSnapshot":{"type":"object","required":["initialized_at","protocol_version","server_identity","capabilities","result"],"properties":{"initialized_at":{"type":"string","format":"date-time"},"protocol_version":{"type":"string"},"server_identity":{"description":"Opaque SDK server-info entity."},"capabilities":{"description":"Opaque SDK server-capabilities entity."},"instructions":{"type":"string"},"session_info":{"description":"Opaque SDK session information when the transport exposes it."},"result":{"description":"Complete opaque SDK initialize result."}},"unevaluatedProperties":{"not":{}},"description":"SDK-validated MCP initialize result projected through a Qyl-owned connection snapshot."},"Workbench.WorkbenchLatencyAssertion":{"type":"object","required":["id","kind","max_duration_ms"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["latency"]},"max_duration_ms":{"type":"number","format":"double","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Maximum execution latency assertion."},"Workbench.WorkbenchPartialAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["partial"]},"path":{"type":"string"},"expected":{}},"unevaluatedProperties":{"not":{}},"description":"Partial JSON object or array containment assertion at an optional JSON Pointer path."},"Workbench.WorkbenchPatternAssertion":{"type":"object","required":["id","kind","pattern"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["pattern"]},"path":{"type":"string"},"pattern":{"type":"string"},"flags":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Regular-expression assertion at an optional JSON Pointer path."},"Workbench.WorkbenchPrincipalIdentity":{"type":"object","required":["id","local"],"properties":{"id":{"type":"string"},"display_name":{"type":"string"},"local":{"type":"boolean","enum":[true]}},"unevaluatedProperties":{"not":{}},"description":"Authenticated local principal metadata. No credential or session token is represented here."},"Workbench.WorkbenchProtocolDirection":{"type":"string","enum":["client_to_server","server_to_client","local"],"description":"Direction of a captured MCP protocol or transport event."},"Workbench.WorkbenchProtocolEvent":{"type":"object","required":["id","server_id","direction","kind","timestamp","redaction_applied"],"properties":{"id":{"type":"string"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"direction":{"$ref":"#/$defs/Workbench.WorkbenchProtocolDirection"},"kind":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEventKind"},"method":{"type":"string"},"request_id":{"description":"Opaque JSON-RPC request identifier, which may be a string or number."},"timestamp":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"payload":{"description":"Opaque SDK message or transport payload after credential and secret redaction."},"redaction_applied":{"type":"boolean","enum":[true]},"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"trace_id":{"$ref":"#/$defs/Common.TraceId"}},"unevaluatedProperties":{"not":{}},"description":"Chronological diagnostic event carrying only a redacted opaque SDK message or local transport payload."},"Workbench.WorkbenchProtocolEventKind":{"type":"string","enum":["request","response","notification","error","transport"],"description":"Kind of captured MCP protocol or transport event."},"Workbench.WorkbenchProtocolEventPage":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of chronological MCP protocol diagnostic events."},"Workbench.WorkbenchProtocolEvents":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEvent"},"Workbench.WorkbenchRegressionStatus":{"type":"string","enum":["improved","regressed","unchanged","added","removed"],"description":"Regression classification for one test case across two evaluation runs."},"Workbench.WorkbenchSchemaAssertion":{"type":"object","required":["id","kind","schema"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["schema"]},"path":{"type":"string"},"schema":{}},"unevaluatedProperties":{"not":{}},"description":"JSON Schema assertion at an optional JSON Pointer path."},"Workbench.WorkbenchSecretReference":{"type":"object","required":["source","environment_variable"],"properties":{"source":{"type":"string","enum":["environment"]},"environment_variable":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"unevaluatedProperties":{"not":{}},"description":"Reference to a secret resolved from the workbench environment. The environment value is never part of this contract."},"Workbench.WorkbenchServer":{"type":"object","required":["id","workspace_id","name","configuration","connection","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"name":{"type":"string"},"description":{"type":"string"},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"},"connection":{"$ref":"#/$defs/Workbench.WorkbenchConnectionSnapshot"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Persisted sanitized MCP server configuration and current runtime connection state."},"Workbench.WorkbenchServerActionAccepted":{"type":"object","required":["server"],"properties":{"server":{"$ref":"#/$defs/Workbench.WorkbenchServer"}},"unevaluatedProperties":{"not":{}},"description":"An MCP server connection action was accepted and continues asynchronously."},"Workbench.WorkbenchServerConfiguration":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchStdioServerConfiguration"},{"$ref":"#/$defs/Workbench.WorkbenchStreamableHttpServerConfiguration"},{"$ref":"#/$defs/Workbench.WorkbenchBuiltinServerConfiguration"}],"description":"Exactly one sanitized MCP server transport configuration."},"Workbench.WorkbenchServerCreateRequest":{"type":"object","required":["name","configuration"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"},"auto_connect":{"type":"boolean","default":false}},"unevaluatedProperties":{"not":{}},"description":"Request to add an MCP server configuration to a workspace."},"Workbench.WorkbenchServerId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one configured MCP server."},"Workbench.WorkbenchServerListResponse":{"type":"object","required":["servers"],"properties":{"servers":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchServer"}}},"unevaluatedProperties":{"not":{}},"description":"Configured MCP servers in one authenticated workspace."},"Workbench.WorkbenchServerUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"configuration":{"$ref":"#/$defs/Workbench.WorkbenchServerConfiguration"}},"unevaluatedProperties":{"not":{}},"description":"Request to replace mutable MCP server metadata or its complete sanitized transport configuration."},"Workbench.WorkbenchSession":{"type":"object","required":["id","principal","workspace_ids","created_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSessionId"},"principal":{"$ref":"#/$defs/Workbench.WorkbenchPrincipalIdentity"},"workspace_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"}},"active_workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"description":"Metadata for the authenticated local workbench session. The HttpOnly session cookie is never returned in this model."},"Workbench.WorkbenchSessionBootstrapResponse":{"type":"object","unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchSession"}],"description":"Loopback session bootstrap response. The cookie value is carried only in Set-Cookie and never in the JSON body."},"Workbench.WorkbenchSessionId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one authenticated local workbench session.\\n\\nDeliberately not Qyl.Api.Contracts.Common.SessionId, and not joinable with it.\\nA workbench session is a loopback browser session owned by the local runner: it\\nbegins at cookie bootstrap, ends at logout or expiry, and never leaves the\\nmachine. A Common.SessionId is an OTel telemetry session observed in ingested\\nspans, owned by the instrumented application, with its own lifetime and its own\\ncontinuity chain. The two have no common issuer, so equal values would be\\ncoincidence. Correlate a workbench execution to telemetry through\\nWorkbenchTelemetryCorrelation.traceIds, never by comparing session identifiers."},"Workbench.WorkbenchStatusAssertion":{"type":"object","required":["id","kind","expected"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["status"]},"expected":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchExecutionStatus"},"minItems":1}},"unevaluatedProperties":{"not":{}},"description":"Execution-status assertion for an MCP test case."},"Workbench.WorkbenchStdioServerConfiguration":{"type":"object","required":["transport","command"],"properties":{"transport":{"type":"string","enum":["stdio"]},"command":{"type":"string","minLength":1},"arguments":{"type":"array","items":{"type":"string"}},"working_directory":{"type":"string"},"environment":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchEnvironmentSecretReference"}}},"unevaluatedProperties":{"not":{}},"description":"Sanitized local stdio transport configuration. Arguments must not contain secrets."},"Workbench.WorkbenchStreamableHttpServerConfiguration":{"type":"object","required":["transport","endpoint"],"properties":{"transport":{"type":"string","enum":["streamable_http"]},"endpoint":{"type":"string","format":"uri"},"headers":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchHeaderSecretReference"}}},"unevaluatedProperties":{"not":{}},"description":"Sanitized MCP Streamable HTTP transport configuration."},"Workbench.WorkbenchSuiteId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one reusable MCP test suite."},"Workbench.WorkbenchSuiteRunRequest":{"type":"object","properties":{"selected_test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunRequest"}],"description":"Request to run a complete suite or an explicit subset of its persisted test cases asynchronously."},"Workbench.WorkbenchTelemetryAvailability":{"type":"string","enum":["available","partial","unavailable"],"description":"Whether correlated Qyl observability evidence was available."},"Workbench.WorkbenchTelemetryCorrelation":{"type":"object","required":["trace_ids","span_ids"],"properties":{"execution_id":{"$ref":"#/$defs/Workbench.WorkbenchExecutionId"},"evaluation_run_id":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunId"},"test_case_id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"trace_ids":{"type":"array","items":{"$ref":"#/$defs/Common.TraceId"}},"span_ids":{"type":"array","items":{"$ref":"#/$defs/Common.SpanId"}}},"unevaluatedProperties":{"not":{}},"description":"Qyl observability identifiers correlating workbench, MCP, and downstream activity."},"Workbench.WorkbenchTelemetrySignalAvailability":{"type":"object","required":["status","item_count"],"properties":{"status":{"$ref":"#/$defs/Workbench.WorkbenchTelemetryAvailability"},"unavailable_reason":{"type":"string"},"item_count":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Availability and retained item count for one correlated Qyl telemetry signal."},"Workbench.WorkbenchTelemetrySignalSummary":{"type":"object","required":["traces","logs","exceptions","tool_call_events"],"properties":{"traces":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"logs":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"exceptions":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"},"tool_call_events":{"$ref":"#/$defs/Workbench.WorkbenchTelemetrySignalAvailability"}},"unevaluatedProperties":{"not":{}},"description":"Per-signal availability for correlated workbench observability evidence."},"Workbench.WorkbenchTestAssertion":{"oneOf":[{"$ref":"#/$defs/Workbench.WorkbenchStatusAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchExactAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchPartialAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchSchemaAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchPatternAssertion"},{"$ref":"#/$defs/Workbench.WorkbenchLatencyAssertion"}],"description":"Exactly one supported MCP evaluation assertion."},"Workbench.WorkbenchTestCase":{"type":"object","required":["id","workspace_id","server_id","name","tool_name","timeout_ms","assertions","tags","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string"},"description":{"type":"string"},"tool_name":{"type":"string"},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"}},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Reusable tool invocation and assertions persisted in one workspace."},"Workbench.WorkbenchTestCaseCreateRequest":{"type":"object","required":["server_id","name","tool_name","timeout_ms","assertions"],"properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"tool_name":{"type":"string","minLength":1},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000,"default":30000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to create a reusable MCP test case."},"Workbench.WorkbenchTestCaseId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one reusable MCP test case."},"Workbench.WorkbenchTestCasePage":{"type":"object","required":["test_cases"],"properties":{"test_cases":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of reusable MCP test cases."},"Workbench.WorkbenchTestCaseRunRequest":{"type":"object","unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunRequest"}],"description":"Request to run one persisted MCP test case asynchronously."},"Workbench.WorkbenchTestCaseUpdateRequest":{"type":"object","properties":{"server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"tool_name":{"type":"string","minLength":1},"arguments":{},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"maximum":3600000},"assertions":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestAssertion"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP test-case fields."},"Workbench.WorkbenchTestSuite":{"type":"object","required":["id","workspace_id","name","test_case_ids","tags","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchSuiteId"},"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"name":{"type":"string"},"description":{"type":"string"},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Reusable ordered group of MCP test cases."},"Workbench.WorkbenchTestSuiteCreateRequest":{"type":"object","required":["name","test_case_ids"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to create a reusable MCP test suite."},"Workbench.WorkbenchTestSuitePage":{"type":"object","required":["suites"],"properties":{"suites":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"}},"next_cursor":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of reusable MCP test suites."},"Workbench.WorkbenchTestSuiteUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"test_case_ids":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseId"},"minItems":1},"tags":{"type":"array","items":{"type":"string"}}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP test-suite fields."},"Workbench.WorkbenchToolInputMode":{"type":"string","enum":["form","json"],"description":"Preferred tool-argument editor for one authenticated workspace."},"Workbench.WorkbenchTransportKind":{"type":"string","enum":["stdio","streamable_http","builtin"],"description":"Supported MCP server transport owned by the local workbench."},"Workbench.WorkbenchWorkspace":{"type":"object","required":["id","owner_id","name","created_at","updated_at"],"properties":{"id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"owner_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One isolated MCP workbench workspace owned by the authenticated local principal."},"Workbench.WorkbenchWorkspaceCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000}},"unevaluatedProperties":{"not":{}},"description":"Request to create an isolated MCP workbench workspace."},"Workbench.WorkbenchWorkspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque identifier for one MCP workbench workspace."},"Workbench.WorkbenchWorkspaceListResponse":{"type":"object","required":["workspaces"],"properties":{"workspaces":{"type":"array","items":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"}}},"unevaluatedProperties":{"not":{}},"description":"Workspaces visible to the authenticated local session."},"Workbench.WorkbenchWorkspacePreferences":{"type":"object","required":["workspace_id","input_mode","compact_mode","updated_at"],"properties":{"workspace_id":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceId"},"selected_server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"selected_tool_name":{"type":"string","maxLength":1024},"input_mode":{"$ref":"#/$defs/Workbench.WorkbenchToolInputMode"},"active_panel":{"type":"string","maxLength":128},"compact_mode":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Saved presentation preferences isolated to one authenticated MCP workspace."},"Workbench.WorkbenchWorkspacePreferencesUpdateRequest":{"type":"object","properties":{"selected_server_id":{"$ref":"#/$defs/Workbench.WorkbenchServerId"},"selected_tool_name":{"type":"string","maxLength":1024},"input_mode":{"$ref":"#/$defs/Workbench.WorkbenchToolInputMode"},"active_panel":{"type":"string","maxLength":128},"compact_mode":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Request to replace saved presentation preferences for one authenticated MCP workspace."},"Workbench.WorkbenchWorkspaceUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000}},"unevaluatedProperties":{"not":{}},"description":"Request to update mutable MCP workbench workspace metadata."},"Workflow.CommittedWorkflowProjectionStatus":{"type":"object","required":["state","generation","journal_position"],"properties":{"state":{"type":"string","enum":["committed"]},"generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"},"journal_position":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"}},"unevaluatedProperties":{"not":{}},"description":"A valid committed projection that can be served to readers."},"Workflow.CorruptWorkflowProjectionStatus":{"type":"object","required":["state","reason"],"properties":{"state":{"type":"string","enum":["corrupt"]},"generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"},"reason":{"type":"string","enum":["corrupt_derived_state","incompatible_derived_state"]}},"unevaluatedProperties":{"not":{}},"description":"Derived projection state is corrupt or incompatible and cannot currently be served."},"Workflow.DerivedWorkflowEdgeProvenance":{"type":"object","required":["type","event_ids","evidence","confidence"],"properties":{"type":{"type":"string","enum":["derived"]},"event_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"minItems":1},"evidence":{"type":"string"},"confidence":{"$ref":"#/$defs/Common.Ratio"}},"unevaluatedProperties":{"not":{}},"description":"Derived edge provenance with explicit evidence and confidence."},"Workflow.RebuildingWorkflowProjectionStatus":{"type":"object","required":["state","generation","target_journal_position","retry_after_ms"],"properties":{"state":{"type":"string","enum":["rebuilding"]},"generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"},"target_journal_position":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"retry_after_ms":{"type":"integer","format":"int32","minimum":1}},"unevaluatedProperties":{"not":{}},"description":"The requested generation is being reconstructed from its authoritative journal."},"Workflow.RecordedWorkflowEdgeProvenance":{"type":"object","required":["type","event_ids"],"properties":{"type":{"type":"string","enum":["recorded"]},"event_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"minItems":1}},"unevaluatedProperties":{"not":{}},"description":"Recorded edge provenance directly observed from Codex."},"Workflow.UnavailableWorkflowProjectionStatus":{"type":"object","required":["state","retry_after_ms"],"properties":{"state":{"type":"string","enum":["unavailable"]},"generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"},"retry_after_ms":{"type":"integer","format":"int32","minimum":1}},"unevaluatedProperties":{"not":{}},"description":"Projection work is temporarily unavailable after a retryable storage failure."},"Workflow.WorkflowAgentId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one agent within a workflow run."},"Workflow.WorkflowAgentStatus":{"type":"string","enum":["pending","running","waiting","succeeded","failed","interrupted"],"description":"Current lifecycle of an observed workflow agent."},"Workflow.WorkflowAttemptId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one workflow attempt."},"Workflow.WorkflowAttemptStatus":{"type":"string","enum":["pending","running","succeeded","failed","interrupted"],"description":"Current lifecycle of one workflow attempt."},"Workflow.WorkflowCommandId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one run-level control command."},"Workflow.WorkflowContent":{"type":"object","required":["content_ref","content_type","encoding","content","size_bytes"],"properties":{"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"content_type":{"$ref":"#/$defs/Common.ContentType"},"encoding":{"$ref":"#/$defs/Workflow.WorkflowContentEncoding"},"content":{"type":"string"},"size_bytes":{"$ref":"#/$defs/Common.ByteSize"}},"unevaluatedProperties":{"not":{}},"description":"Lazily retrieved captured workflow content."},"Workflow.WorkflowContentChunk":{"type":"object","required":["content_ref","content_type","encoding","content"],"properties":{"content_ref":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"content_type":{"$ref":"#/$defs/Common.ContentType"},"encoding":{"$ref":"#/$defs/Workflow.WorkflowContentEncoding"},"content":{"type":"string","maxLength":1398104,"description":"UTF-8 text or base64 bytes, according to encoding."}},"unevaluatedProperties":{"not":{}},"description":"One captured payload supplied with an append batch."},"Workflow.WorkflowContentEncoding":{"type":"string","enum":["utf8","base64"],"description":"Encoding used when lazily returning captured workflow content."},"Workflow.WorkflowContentRef":{"type":"string","minLength":71,"maxLength":71,"pattern":"^sha256:[a-f0-9]{64}$","description":"Content-addressed reference to a captured workflow payload."},"Workflow.WorkflowControlAction":{"type":"string","enum":["steer","interrupt","resume"],"description":"Control operation supported by the Codex app-server boundary."},"Workflow.WorkflowControlCommand":{"type":"object","required":["command_id","run_id","action","status","idempotency_key","requested_at","updated_at","command_sequence"],"properties":{"command_id":{"$ref":"#/$defs/Workflow.WorkflowCommandId"},"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"status":{"$ref":"#/$defs/Workflow.WorkflowControlStatus"},"idempotency_key":{"type":"string"},"input":{"type":"string"},"requested_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"command_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"error":{"type":"string"}},"unevaluatedProperties":{"not":{}},"description":"Durable run-level control command."},"Workflow.WorkflowControlCommandPage":{"type":"object","required":["commands","next_sequence"],"properties":{"commands":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"}},"next_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"}},"unevaluatedProperties":{"not":{}},"description":"Page of control commands polled by the launcher-owned outbound adapter."},"Workflow.WorkflowControlRequest":{"type":"object","required":["action","idempotency_key"],"properties":{"action":{"$ref":"#/$defs/Workflow.WorkflowControlAction"},"idempotency_key":{"type":"string","minLength":1,"maxLength":160},"input":{"type":"string","maxLength":32768,"description":"Text appended by steer or resume. Omit for interrupt."}},"unevaluatedProperties":{"not":{}},"description":"Request to enqueue one idempotent run-level control command."},"Workflow.WorkflowControlStatus":{"type":"string","enum":["requested","accepted","applied","rejected","failed"],"description":"Durable lifecycle of a workflow control command."},"Workflow.WorkflowControlStatusUpdateRequest":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/$defs/Workflow.WorkflowControlStatus"},"error":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","description":"When the reported transition actually occurred at the adapter that executed\\nit. The journal event minted for this transition carries this clock — the\\noriginating agent's — so control events order and measure consistently with\\nthe agent-clocked events around them; omitted, the collector's receipt time\\nis the fallback."}},"unevaluatedProperties":{"not":{}},"description":"Adapter acknowledgement or terminal result for one control command."},"Workflow.WorkflowCursorError":{"type":"object","required":["title","cursor_kind","reason"],"properties":{"title":{"type":"string","enum":["Invalid Workflow Cursor"]},"cursor_kind":{"$ref":"#/$defs/Workflow.WorkflowCursorKind"},"reason":{"$ref":"#/$defs/Workflow.WorkflowCursorFailureReason"},"current_generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Opaque graph cursor is malformed, belongs to another run, or targets a stale generation."},"Workflow.WorkflowCursorFailureReason":{"type":"string","enum":["invalid","wrong_run","wrong_generation","stale"],"description":"Why an opaque graph cursor cannot be reused for this request."},"Workflow.WorkflowCursorGapEvent":{"type":"object","required":["type","oldest_available_sequence","high_water_mark","timestamp"],"properties":{"type":{"type":"string","enum":["cursor_gap"]},"oldest_available_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Signals that the requested cursor predates retained workflow history."},"Workflow.WorkflowCursorKind":{"type":"string","enum":["node","edge"],"description":"Which opaque graph cursor was rejected."},"Workflow.WorkflowEdgeCursor":{"type":"string","minLength":1,"maxLength":1536,"description":"Opaque edge-page continuation scoped to one workflow run and generation. Reuse it unchanged; clients must not parse or construct it."},"Workflow.WorkflowEdgeId":{"type":"string","minLength":1,"maxLength":192,"description":"Stable identifier of one graph edge. Endpoint tuples preserve the nodes' structural run-versus-attempt scope and ordinal component boundaries, escape colon as \\\\c and backslash as \\\\\\\\, and never infer scope from a literal component value. A canonical identifier over 192 Unicode scalar values is replaced by its edge kind, a tilde, and the full lowercase 64-hex SHA-256 of the length-prefixed canonical tuple."},"Workflow.WorkflowEdgeKind":{"type":"string","enum":["data","control","conflict","resource","gate","temporal"],"description":"Semantic relationship represented by a workflow graph edge."},"Workflow.WorkflowEdgeProvenance":{"anyOf":[{"$ref":"#/$defs/Workflow.RecordedWorkflowEdgeProvenance"},{"$ref":"#/$defs/Workflow.DerivedWorkflowEdgeProvenance"}],"description":"Provenance for one workflow graph edge."},"Workflow.WorkflowEventAppend":{"type":"object","required":["event_id","source_sequence","timestamp","kind"],"properties":{"event_id":{"$ref":"#/$defs/Workflow.WorkflowEventId"},"source_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"timestamp":{"type":"string","format":"date-time"},"kind":{"$ref":"#/$defs/Workflow.WorkflowJournalEventKind"},"thread_id":{"type":"string"},"turn_id":{"type":"string"},"attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"parent_agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"receiver_agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"tool_call_id":{"$ref":"#/$defs/Workflow.WorkflowToolCallId"},"content_refs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentRef"},"maxItems":64},"data":{"type":"object","unevaluatedProperties":{}}},"description":"One source-ordered immutable journal event awaiting collector sequence assignment."},"Workflow.WorkflowEventBatchAppendRequest":{"type":"object","required":["client_id","events"],"properties":{"client_id":{"type":"string","minLength":1,"maxLength":128},"events":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowEventAppend"},"minItems":1,"maxItems":500},"content":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentChunk"},"maxItems":500}},"unevaluatedProperties":{"not":{}},"description":"Idempotent append batch from one observer client."},"Workflow.WorkflowEventBatchAppendResponse":{"type":"object","required":["accepted_count","duplicate_count","acknowledged_source_sequence"],"properties":{"accepted_count":{"type":"integer","format":"int32","minimum":0},"duplicate_count":{"type":"integer","format":"int32","minimum":0},"acknowledged_source_sequence":{"$ref":"#/$defs/Workflow.WorkflowSequence"},"first_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"last_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"}},"unevaluatedProperties":{"not":{}},"description":"Collector acknowledgement for an idempotent workflow-event append."},"Workflow.WorkflowEventId":{"type":"string","minLength":1,"maxLength":160,"description":"Stable identifier of one immutable journal event."},"Workflow.WorkflowEventPage":{"type":"object","required":["events","next_sequence","high_water_mark","cursor_gap"],"properties":{"events":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowJournalEvent"}},"next_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"cursor_gap":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"A bounded page of workflow journal events."},"Workflow.WorkflowGeneration":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$","description":"Opaque incarnation identifier for one workflow run's projected state."},"Workflow.WorkflowGraphEdge":{"type":"object","required":["edge_id","source_node_id","target_node_id","kind","provenance"],"properties":{"edge_id":{"$ref":"#/$defs/Workflow.WorkflowEdgeId"},"source_node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"target_node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"kind":{"$ref":"#/$defs/Workflow.WorkflowEdgeKind"},"provenance":{"$ref":"#/$defs/Workflow.WorkflowEdgeProvenance"}},"unevaluatedProperties":{"not":{}},"description":"One typed edge in the deterministic workflow graph projection. Data, Control, and Gate edges are causal dependencies. Temporal edges describe observed order, Resource edges describe resource use, and Conflict edges describe contention; Temporal, Resource, and Conflict edges are excluded from critical-path causality."},"Workflow.WorkflowGraphNode":{"type":"object","required":["node_id","kind","label","status"],"properties":{"node_id":{"$ref":"#/$defs/Workflow.WorkflowNodeId"},"kind":{"$ref":"#/$defs/Workflow.WorkflowNodeKind"},"label":{"type":"string"},"status":{"type":"string"},"attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"agent_id":{"$ref":"#/$defs/Workflow.WorkflowAgentId"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"duration_ms":{"$ref":"#/$defs/Common.DurationMs"},"content_refs":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowContentRef"}},"attributes":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"One node in the deterministic workflow graph projection."},"Workflow.WorkflowGraphSnapshot":{"type":"object","required":["run","projection_status","nodes","edges","statistics","journal_sequence","has_more_nodes","has_more_edges","total_node_count","total_edge_count"],"properties":{"run":{"$ref":"#/$defs/Workflow.WorkflowRun"},"projection_status":{"$ref":"#/$defs/Workflow.WorkflowProjectionStatus"},"nodes":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowGraphNode"}},"edges":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowGraphEdge"}},"statistics":{"$ref":"#/$defs/Workflow.WorkflowGraphStatistics"},"journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"next_node_cursor":{"$ref":"#/$defs/Workflow.WorkflowNodeCursor","description":"Opaque node continuation for the next page. Reuse it unchanged as node_cursor on the next graph request; do not parse, construct, or modify it."},"next_edge_cursor":{"$ref":"#/$defs/Workflow.WorkflowEdgeCursor","description":"Opaque edge continuation for the next page. Reuse it unchanged as edge_cursor on the next graph request; do not parse, construct, or modify it."},"has_more_nodes":{"type":"boolean"},"has_more_edges":{"type":"boolean"},"total_node_count":{"type":"integer","format":"int32","minimum":0},"total_edge_count":{"type":"integer","format":"int32","minimum":0}},"unevaluatedProperties":{"not":{}},"description":"Deterministic graph projection at one journal cursor."},"Workflow.WorkflowGraphStatistics":{"type":"object","required":["t1_ms","t_infinity_ms","wall_time_ms","peak_concurrency","worker_count","parallel_lower_bound_ms","critical_path_node_ids"],"properties":{"t1_ms":{"$ref":"#/$defs/Common.DurationMs"},"t_infinity_ms":{"$ref":"#/$defs/Common.DurationMs"},"wall_time_ms":{"$ref":"#/$defs/Common.DurationMs"},"peak_concurrency":{"type":"integer","format":"int32","minimum":0},"worker_count":{"type":"integer","format":"int32","minimum":1},"parallel_lower_bound_ms":{"$ref":"#/$defs/Common.DurationMs"},"critical_path_node_ids":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowNodeId"}}},"unevaluatedProperties":{"not":{}},"description":"Work and critical-path statistics for a workflow graph. Every ToolCall, Wait, Gate, and duration-bearing Message or Item contributes an independently weighted interval even when it has no Agent owner. An Agent contributes its own-work fragments: its interval minus the union of precisely owned child intervals clipped to the Agent interval. Precisely owned children are Control-linked Agent and ToolCall nodes, Temporal-linked Wait nodes, Gate-linked Gate nodes, and Data-linked duration-bearing Message or Item nodes. Peak concurrency sweeps every positive independently weighted or Agent own-work fragment. Critical-path analysis uses only Data, Control, and Gate edges, condenses each causal strongly connected component, charges every component member exactly once, and expands selected component members in ordinal node-id order."},"Workflow.WorkflowHeartbeatEvent":{"type":"object","required":["type","high_water_mark","timestamp"],"properties":{"type":{"type":"string","enum":["heartbeat"]},"high_water_mark":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"timestamp":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"Keep-alive emitted while a workflow event stream has no new event."},"Workflow.WorkflowJournalEvent":{"type":"object","required":["run_id","client_id","journal_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"client_id":{"type":"string"},"journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Workflow.WorkflowEventAppend"}],"description":"One immutable event after collector journal sequence assignment."},"Workflow.WorkflowJournalEventKind":{"type":"string","enum":["run_created","run_completed","thread_started","thread_resumed","turn_started","turn_completed","turn_interrupted","attempt_started","attempt_completed","agent_spawned","agent_started","agent_completed","message_sent","message_received","wait_started","wait_completed","joined","item_started","item_completed","tool_started","tool_completed","approval_requested","approval_resolved","content_captured","file_written","control_requested","control_accepted","control_applied","control_rejected","control_failed"],"description":"Immutable journal event kinds accepted from a Codex observer."},"Workflow.WorkflowJournalPosition":{"type":"string","format":"uint64","description":"Collector-assigned position in the authoritative workflow journal, encoded without JavaScript precision loss.","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Workflow.WorkflowNodeCursor":{"type":"string","minLength":1,"maxLength":1536,"description":"Opaque node-page continuation scoped to one workflow run and generation. Reuse it unchanged; clients must not parse or construct it."},"Workflow.WorkflowNodeId":{"type":"string","minLength":1,"maxLength":192,"description":"Stable identifier of one graph node. Canonical tuples structurally distinguish run scope from attempt scope, escape colon as \\\\c and backslash as \\\\\\\\, and never infer scope from a literal component value. A canonical identifier over 192 Unicode scalar values is replaced by its kind, a tilde, and the full lowercase 64-hex SHA-256 of the length-prefixed canonical tuple."},"Workflow.WorkflowNodeKind":{"type":"string","enum":["run","attempt","turn","agent","tool_call","message","wait","gate","resource"],"description":"Kinds of execution node in the deterministic workflow graph."},"Workflow.WorkflowProjectionCorruptError":{"type":"object","required":["title","projection_status"],"properties":{"title":{"type":"string","enum":["Workflow Projection Corrupt"]},"projection_status":{"$ref":"#/$defs/Workflow.WorkflowProjectionStatus"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Workflow projection is non-retryably corrupt or incompatible. Internal storage details are intentionally omitted."},"Workflow.WorkflowProjectionStatus":{"anyOf":[{"$ref":"#/$defs/Workflow.CommittedWorkflowProjectionStatus"},{"$ref":"#/$defs/Workflow.RebuildingWorkflowProjectionStatus"},{"$ref":"#/$defs/Workflow.UnavailableWorkflowProjectionStatus"},{"$ref":"#/$defs/Workflow.CorruptWorkflowProjectionStatus"}],"description":"Closed public availability state for one workflow projection. Storage paths, hashes, fingerprints, and database errors remain private."},"Workflow.WorkflowProjectionUnavailableError":{"type":"object","required":["title","projection_status"],"properties":{"title":{"type":"string","enum":["Workflow Projection Unavailable"]},"projection_status":{"$ref":"#/$defs/Workflow.WorkflowProjectionStatus"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Workflow projection is rebuilding or temporarily unavailable after a retryable storage failure."},"Workflow.WorkflowRun":{"type":"object","required":["run_id","generation","status","started_at","latest_journal_sequence"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"generation":{"$ref":"#/$defs/Workflow.WorkflowGeneration"},"thread_id":{"type":"string"},"title":{"type":"string"},"status":{"$ref":"#/$defs/Workflow.WorkflowRunStatus"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"latest_journal_sequence":{"$ref":"#/$defs/Workflow.WorkflowJournalPosition"},"active_attempt_id":{"$ref":"#/$defs/Workflow.WorkflowAttemptId"},"metadata":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"One immutable workflow run."},"Workflow.WorkflowRunCreateRequest":{"type":"object","required":["run_id","started_at"],"properties":{"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"},"thread_id":{"type":"string"},"title":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"metadata":{"type":"object","unevaluatedProperties":{}}},"unevaluatedProperties":{"not":{}},"description":"Request to create an observed workflow run before appending journal events."},"Workflow.WorkflowRunCursor":{"type":"string","minLength":1,"maxLength":512,"description":"Opaque workflow-run list continuation scoped to the project and status filter. Reuse it unchanged; clients must not parse or construct it."},"Workflow.WorkflowRunDeletedError":{"type":"object","required":["title","run_id"],"properties":{"title":{"type":"string","enum":["Workflow Run Deleted"]},"run_id":{"$ref":"#/$defs/Workflow.WorkflowRunId"}},"unevaluatedProperties":{"not":{}},"allOf":[{"$ref":"#/$defs/Common.Errors.ProblemDetails"}],"description":"Workflow run was durably deleted and can no longer accept events or publish projections."},"Workflow.WorkflowRunId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one observed Codex workflow run."},"Workflow.WorkflowRunPage":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Workflow.WorkflowRun"}},"next_cursor":{"$ref":"#/$defs/Workflow.WorkflowRunCursor"},"has_more":{"type":"boolean"}},"unevaluatedProperties":{"not":{}},"description":"Cursor page of workflow runs."},"Workflow.WorkflowRunStatus":{"type":"string","enum":["active","completed","failed","interrupted"],"description":"Current lifecycle of a workflow run."},"Workflow.WorkflowSequence":{"type":"string","format":"uint64","description":"Unsigned source or collector journal sequence encoded without JavaScript precision loss.","pattern":"^(0|[1-9][0-9]*)$","maxLength":20},"Workflow.WorkflowStreamEvents":{"anyOf":[{"$ref":"#/$defs/Workflow.WorkflowJournalEvent"},{"$ref":"#/$defs/Workflow.WorkflowHeartbeatEvent"},{"$ref":"#/$defs/Workflow.WorkflowCursorGapEvent"}]},"Workflow.WorkflowToolCallId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable identifier of one tool call within a workflow run."},"Workflow.WorkflowToolCallStatus":{"type":"string","enum":["requested","running","succeeded","failed","rejected"],"description":"Current lifecycle of an observed tool call."},"Operations.LogsApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Logs.LogRecord"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.LogsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.LogsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.LogsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_logs.Response.200":{"type":"array","items":{"$ref":"#/$defs/Runner.RunnerLogLine"}},"Operations.RunnerResourcesApi_logs.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_logs.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_logs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_logs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_restart.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_restart.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_restart.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.RunnerResourcesApi_restart.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_restart.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_snapshot.Response.200":{"type":"array","items":{"$ref":"#/$defs/Runner.RunnerResourceState"}},"Operations.RunnerResourcesApi_snapshot.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_snapshot.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_snapshot.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_stop.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_stop.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_stop.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.RunnerResourcesApi_stop.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_stop.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_stream.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_stream.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_stream.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.RunnerResourcesApi_streamLogs.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.RunnerResourcesApi_streamLogs.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.RunnerResourcesApi_streamLogs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.RunnerResourcesApi_streamLogs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.SessionsApi_get.Response.200":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"},"Operations.SessionsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.SessionsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_getStats.Response.200":{"$ref":"#/$defs/Domains.Observe.Session.SessionStats"},"Operations.SessionsApi_getStats.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.SessionsApi_getStats.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_getStats.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_getTraces.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.SessionsApi_getTraces.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_getTraces.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.SessionsApi_getTraces.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.SessionsApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/Domains.Observe.Session.SessionEntity"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.SessionsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.SessionsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.SessionsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.StreamingApi_streamLogs.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.StreamingApi_streamLogs.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.StreamingApi_streamLogs.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.StreamingApi_streamLogs.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.TracesApi_get.Response.200":{"$ref":"#/$defs/OTel.Traces.Trace"},"Operations.TracesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.TracesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.TracesApi_getSpans.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Span"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.TracesApi_getSpans.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_getSpans.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.TracesApi_getSpans.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.TracesApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Traces.Trace"},"description":"List of items in this page"},"next_cursor":{"type":"string","description":"Cursor for the next page (null if no more pages)"},"prev_cursor":{"type":"string","description":"Cursor for the previous page (null if first page)"},"has_more":{"type":"boolean","description":"Whether there are more items available"}},"unevaluatedProperties":{"not":{}},"description":"Cursor-based paginated response wrapper"},"Operations.TracesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.TracesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.TracesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_compare.Request":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationComparisonRequest"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunComparison"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_compare.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_export.Request":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportRequest"},"Operations.WorkbenchEvaluationRunsApi_export.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportAccepted"},"Operations.WorkbenchEvaluationRunsApi_export.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_export.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRun"},"Operations.WorkbenchEvaluationRunsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExport"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_getExport.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationExportArtifact"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_getExportContent.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunPage"},"Operations.WorkbenchEvaluationRunsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchEvaluationRunsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_cancel.Request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionCancelRequest"},"Operations.WorkbenchExecutionsApi_cancel.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchExecutionAccepted"},"Operations.WorkbenchExecutionsApi_cancel.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_cancel.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_cancel.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_cancel.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_cancel.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchExecutionsApi_cancel.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_cancel.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRecord"},"Operations.WorkbenchExecutionsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionPage"},"Operations.WorkbenchExecutionsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_start.Request":{"$ref":"#/$defs/Workbench.WorkbenchExecutionRequest"},"Operations.WorkbenchExecutionsApi_start.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchExecutionAccepted"},"Operations.WorkbenchExecutionsApi_start.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchExecutionsApi_start.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_start.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_start.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_start.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchExecutionsApi_start.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_start.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchExecutionsApi_start.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_streamUpdates.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchExecutionTelemetryResponse"},"Operations.WorkbenchExecutionsApi_telemetry.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchExecutionsApi_telemetry.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_connect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_connect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_connect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_connect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_connect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_connect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_connect.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_connect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchServerCreateRequest"},"Operations.WorkbenchServersApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_disconnect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_disconnect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_disconnect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_disconnect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_disconnect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_disconnect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_disconnect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_discovery.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchDiscoverySnapshot"},"Operations.WorkbenchServersApi_discovery.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_discovery.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_discovery.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_discovery.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_discovery.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_discovery.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_discovery.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServerListResponse"},"Operations.WorkbenchServersApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_protocolEvents.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchProtocolEventPage"},"Operations.WorkbenchServersApi_protocolEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_protocolEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_protocolEvents.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_protocolEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_protocolEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_protocolEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_reconnect.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchServerActionAccepted"},"Operations.WorkbenchServersApi_reconnect.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_reconnect.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_reconnect.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_reconnect.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_reconnect.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_reconnect.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_reconnect.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchDiscoverySnapshot"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.502":{"$ref":"#/$defs/Common.Errors.BadGatewayError"},"Operations.WorkbenchServersApi_refreshDiscovery.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_streamProtocolEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchServersApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchServerUpdateRequest"},"Operations.WorkbenchServersApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchServer"},"Operations.WorkbenchServersApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchServersApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchServersApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchServersApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchServersApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchServersApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchServersApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSessionApi_bootstrap.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchSessionBootstrapResponse"},"Operations.WorkbenchSessionApi_bootstrap.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSessionApi_bootstrap.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSessionApi_bootstrap.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSessionApi_bootstrap.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSessionApi_bootstrap.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSessionApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchSession"},"Operations.WorkbenchSessionApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSessionApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSessionApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSessionApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestSuiteCreateRequest"},"Operations.WorkbenchSuitesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuitePage"},"Operations.WorkbenchSuitesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_run.Request":{"$ref":"#/$defs/Workbench.WorkbenchSuiteRunRequest"},"Operations.WorkbenchSuitesApi_run.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunAccepted"},"Operations.WorkbenchSuitesApi_run.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_run.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_run.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_run.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_run.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_run.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_run.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchSuitesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestSuiteUpdateRequest"},"Operations.WorkbenchSuitesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestSuite"},"Operations.WorkbenchSuitesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchSuitesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchSuitesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchSuitesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchSuitesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchSuitesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchSuitesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseCreateRequest"},"Operations.WorkbenchTestCasesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_create.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCasePage"},"Operations.WorkbenchTestCasesApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_list.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_run.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseRunRequest"},"Operations.WorkbenchTestCasesApi_run.Response.202":{"$ref":"#/$defs/Workbench.WorkbenchEvaluationRunAccepted"},"Operations.WorkbenchTestCasesApi_run.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_run.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_run.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_run.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_run.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_run.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_run.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchTestCasesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchTestCaseUpdateRequest"},"Operations.WorkbenchTestCasesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchTestCase"},"Operations.WorkbenchTestCasesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchTestCasesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchTestCasesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchTestCasesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchTestCasesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchTestCasesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchTestCasesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_create.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceCreateRequest"},"Operations.WorkbenchWorkspacesApi_create.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_create.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_delete.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_delete.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_delete.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_delete.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_delete.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_delete.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_get.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_get.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferences"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_getPreferences.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_list.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceListResponse"},"Operations.WorkbenchWorkspacesApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_list.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_update.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspaceUpdateRequest"},"Operations.WorkbenchWorkspacesApi_update.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspace"},"Operations.WorkbenchWorkspacesApi_update.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_update.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_update.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_update.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_update.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkbenchWorkspacesApi_update.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_update.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Request":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferencesUpdateRequest"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.200":{"$ref":"#/$defs/Workbench.WorkbenchWorkspacePreferences"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.403":{"$ref":"#/$defs/Common.Errors.ForbiddenError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkbenchWorkspacesApi_updatePreferences.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_appendEvents.Request":{"$ref":"#/$defs/Workflow.WorkflowEventBatchAppendRequest"},"Operations.WorkflowRunsApi_appendEvents.Response.200":{"$ref":"#/$defs/Workflow.WorkflowEventBatchAppendResponse"},"Operations.WorkflowRunsApi_appendEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_appendEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_appendEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_appendEvents.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_appendEvents.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_appendEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_appendEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_create.Request":{"$ref":"#/$defs/Workflow.WorkflowRunCreateRequest"},"Operations.WorkflowRunsApi_create.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRun"},"Operations.WorkflowRunsApi_create.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_create.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_create.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_create.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_create.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_create.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_get.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRun"},"Operations.WorkflowRunsApi_get.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_get.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_get.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_get.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_get.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_getContent.Response.200":{"$ref":"#/$defs/Workflow.WorkflowContent"},"Operations.WorkflowRunsApi_getContent.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_getContent.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_getContent.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_getContent.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_getContent.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_getGraph.Response.200":{"$ref":"#/$defs/Workflow.WorkflowGraphSnapshot"},"Operations.WorkflowRunsApi_getGraph.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_getGraph.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_getGraph.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_getGraph.Response.409":{"$ref":"#/$defs/Workflow.WorkflowCursorError"},"Operations.WorkflowRunsApi_getGraph.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_getGraph.Response.500":{"$ref":"#/$defs/Workflow.WorkflowProjectionCorruptError"},"Operations.WorkflowRunsApi_getGraph.Response.503":{"$ref":"#/$defs/Workflow.WorkflowProjectionUnavailableError"},"Operations.WorkflowRunsApi_list.Response.200":{"$ref":"#/$defs/Workflow.WorkflowRunPage"},"Operations.WorkflowRunsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_list.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_pollControls.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommandPage"},"Operations.WorkflowRunsApi_pollControls.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_pollControls.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_pollControls.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_pollControls.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_pollControls.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_pollControls.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_readEvents.Response.200":{"$ref":"#/$defs/Workflow.WorkflowEventPage"},"Operations.WorkflowRunsApi_readEvents.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_readEvents.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_readEvents.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_readEvents.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_readEvents.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_readEvents.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_stream.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_stream.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_stream.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_stream.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_stream.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_stream.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_submitControl.Request":{"$ref":"#/$defs/Workflow.WorkflowControlRequest"},"Operations.WorkflowRunsApi_submitControl.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"},"Operations.WorkflowRunsApi_submitControl.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_submitControl.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_submitControl.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_submitControl.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_submitControl.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_submitControl.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_submitControl.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.WorkflowRunsApi_updateControl.Request":{"$ref":"#/$defs/Workflow.WorkflowControlStatusUpdateRequest"},"Operations.WorkflowRunsApi_updateControl.Response.200":{"$ref":"#/$defs/Workflow.WorkflowControlCommand"},"Operations.WorkflowRunsApi_updateControl.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.WorkflowRunsApi_updateControl.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.WorkflowRunsApi_updateControl.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.WorkflowRunsApi_updateControl.Response.409":{"$ref":"#/$defs/Common.Errors.ConflictError"},"Operations.WorkflowRunsApi_updateControl.Response.410":{"$ref":"#/$defs/Workflow.WorkflowRunDeletedError"},"Operations.WorkflowRunsApi_updateControl.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.WorkflowRunsApi_updateControl.Response.503":{"$ref":"#/$defs/Common.Errors.ServiceUnavailableError"},"Operations.health_alive.Response.200":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_alive.Response.503":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_ready.Response.200":{"$ref":"#/$defs/Health.HealthReport"},"Operations.health_ready.Response.503":{"$ref":"#/$defs/Health.HealthReport"}}`)},Av=(()=>{let e=Vd({offset:!0}).def.pattern;if(!(e instanceof RegExp))throw Error(`Zod offset-aware date-time validator did not expose a pattern`);return e.source})();function jv(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema root must be an object`);let t=e,n=Pv(t.$defs,`$defs`),r=new Map,i=new Set,a=e=>{let t=r.get(e);if(t)return t;if(i.has(e))throw Error(`Published Qyl JSON Schema has an inheritance cycle at '${e}'`);let a=n[e];if(a===void 0)throw Error(`Published Qyl JSON Schema is missing definition '${e}'`);i.add(e);let s=o(a);return i.delete(e),r.set(e,s),s},o=e=>{if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Expected a JSON Schema object node`);let t=e,n=Mv(t,a),r={};if(n.length>0){let e;for(let t of n){let n=Fv(r.properties),i=Fv(t.properties),a=Iv(r.required),o=Iv(t.required);Object.assign(r,t),r.properties={...n,...i},r.required=[...new Set([...a,...o])],e=t.additionalProperties}delete r.description,delete r.additionalProperties;for(let[e,n]of Object.entries(t))e!==`allOf`&&e!==`properties`&&e!==`required`&&e!==`unevaluatedProperties`&&(r[e]=s(n));r.properties={...Fv(r.properties),...c(t.properties)};let i=[...new Set([...Iv(r.required),...Iv(t.required)])];i.length>0?r.required=i:delete r.required,`unevaluatedProperties`in t?r.additionalProperties=l(t.unevaluatedProperties):e!==void 0&&(r.additionalProperties=e)}else{for(let[e,n]of Object.entries(t))e!==`unevaluatedProperties`&&(r[e]=s(n));`unevaluatedProperties`in t&&(r.additionalProperties=l(t.unevaluatedProperties))}return t.type===`integer`&&(t.format===`int64`||t.format===`uint64`)&&(r.type=`number`,r.multipleOf=1,delete r.format),t.type===`string`&&t.format===`date-time`&&(r.pattern=Av,delete r.format),r},s=e=>Array.isArray(e)?e.map(s):typeof e==`object`&&e?o(e):e,c=e=>{let t=Fv(e);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,s(t)]))},l=e=>!Lv(e)&&s(e),u={...t};delete u.$defs;let d=o(u);return d.$defs=Object.fromEntries(Object.keys(n).map(e=>[e,a(e)])),d}function Mv(e,t){if(e.type!==`object`||!Array.isArray(e.allOf))return[];let n=e.allOf.map(e=>Nv(e));if(n.some(e=>e===void 0))return[];let r=n.map(e=>t(e));return r.every(e=>e.type===`object`)?r:[]}function Nv(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e;if(Object.keys(t).length===1&&typeof t.$ref==`string`)return t.$ref.startsWith(`#/$defs/`)?t.$ref.slice(8):void 0}function Pv(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema ${t} must be an object`);return e}function Fv(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function Iv(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:[]}function Lv(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e,n=t.not;return Object.keys(t).length===1&&typeof n==`object`&&!!n&&!Array.isArray(n)&&Object.keys(n).length===0}var Rv=jv(kv),zv=new Map;function X(e){let t=zv.get(e);if(t)return t;if(!(e in Rv.$defs))throw Error(`Published Qyl JSON Schema has no '${e}' definition`);let n=tf({$schema:Rv.$schema,$defs:Rv.$defs,$ref:`#/$defs/${e}`});return zv.set(e,n),n}function Z(e){return X(`Workbench.${e}`)}X(`OTel.Traces.Span`),X(`OTel.Traces.TraceSummary`),X(`OTel.Traces.Trace`),X(`OTel.Logs.LogRecord`),X(`Domains.Observe.Session.SessionEntity`),X(`Operations.TracesApi_list.Response.200`),X(`Operations.TracesApi_getSpans.Response.200`),X(`Operations.SessionsApi_getTraces.Response.200`),X(`Operations.LogsApi_list.Response.200`),X(`Operations.SessionsApi_list.Response.200`),X(`Common.Errors.ProblemDetails`),X(`Mcp.Tools.McpDataMode`),X(`Mcp.Tools.McpDashboardStats`),X(`Mcp.Tools.DisplayTracesInput`),X(`Mcp.Tools.DisplayTracesOutput`),X(`Mcp.Tools.DisplayMcpDashboardInput`),X(`Mcp.Tools.DisplayMcpDashboardOutput`),X(`Mcp.Tools.ListTracesInput`),X(`Mcp.Tools.ListTracesOutput`),X(`Mcp.Tools.GetTraceInput`),X(`Mcp.Tools.GetTraceOutput`),X(`Mcp.Tools.ListSessionsInput`),X(`Mcp.Tools.ListSessionsOutput`),X(`Mcp.Tools.SearchLogsInput`),X(`Mcp.Tools.SearchLogsOutput`),X(`Mcp.Tools.FetchTelemetryInput`),X(`Mcp.Tools.FetchTelemetryOutput`),X(`Mcp.Tools.CiLogInput`),X(`Mcp.Tools.CiRunSummary`),X(`Mcp.Tools.CiPhase`),X(`Mcp.Tools.CiLogOutput`),X(`Workflow.WorkflowRun`),X(`Operations.WorkflowRunsApi_list.Response.200`),X(`Operations.WorkflowRunsApi_readEvents.Response.200`),X(`Operations.WorkflowRunsApi_getGraph.Response.200`),X(`Operations.WorkflowRunsApi_getContent.Response.200`),X(`Operations.WorkflowRunsApi_submitControl.Response.200`),X(`Mcp.Tools.ListWorkflowRunsInput`),X(`Mcp.Tools.ListWorkflowRunsOutput`),X(`Mcp.Tools.GetWorkflowGraphInput`),X(`Mcp.Tools.GetWorkflowGraphOutput`),X(`Mcp.Tools.DisplayWorkflowGraphInput`);var Bv=X(`Mcp.Tools.DisplayWorkflowGraphOutput`);X(`Mcp.Tools.FetchWorkflowGraphUpdatesInput`);var Vv=X(`Mcp.Tools.FetchWorkflowGraphUpdatesOutput`);X(`Mcp.Tools.InspectWorkflowEventsInput`),X(`Mcp.Tools.InspectWorkflowEventsOutput`),X(`Mcp.Tools.ControlWorkflowRunInput`);var Hv=X(`Mcp.Tools.ControlWorkflowRunOutput`);X(`Runner.RunnerResourceState`),X(`Runner.RunnerLogLine`),Z(`WorkbenchSessionId`),Z(`WorkbenchWorkspaceId`),Z(`WorkbenchServerId`),Z(`WorkbenchExecutionId`),Z(`WorkbenchEvaluationRunId`),Z(`WorkbenchTestCaseId`),Z(`WorkbenchSuiteId`),Z(`WorkbenchEvaluationExportId`),Z(`WorkbenchPrincipalIdentity`),Z(`WorkbenchSession`),Z(`WorkbenchSessionBootstrapResponse`),Z(`WorkbenchWorkspace`),Z(`WorkbenchWorkspaceCreateRequest`),Z(`WorkbenchWorkspaceUpdateRequest`),Z(`WorkbenchWorkspaceListResponse`),Z(`WorkbenchToolInputMode`),Z(`WorkbenchWorkspacePreferences`),Z(`WorkbenchWorkspacePreferencesUpdateRequest`),Z(`WorkbenchTransportKind`),Z(`WorkbenchHeaderSecretScheme`),Z(`WorkbenchSecretReference`),Z(`WorkbenchEnvironmentSecretReference`),Z(`WorkbenchHeaderSecretReference`),Z(`WorkbenchStdioServerConfiguration`),Z(`WorkbenchStreamableHttpServerConfiguration`),Z(`WorkbenchBuiltinServerConfiguration`),Z(`WorkbenchServerConfiguration`),Z(`WorkbenchErrorCategory`),Z(`WorkbenchError`),Z(`WorkbenchInitializationSnapshot`),Z(`WorkbenchConnectionStatus`),Z(`WorkbenchConnectionSnapshot`),Z(`WorkbenchServer`),Z(`WorkbenchServerCreateRequest`),Z(`WorkbenchServerUpdateRequest`),Z(`WorkbenchServerListResponse`),Z(`WorkbenchServerActionAccepted`),Z(`WorkbenchDiscoveryCollection`),Z(`WorkbenchDiscoverySnapshot`),Z(`WorkbenchProtocolDirection`),Z(`WorkbenchProtocolEventKind`),Z(`WorkbenchProtocolEvent`),Z(`WorkbenchProtocolEventPage`),Z(`WorkbenchProtocolEvents`),Z(`WorkbenchExecutionEffect`),Z(`WorkbenchExecutionStatus`),Z(`WorkbenchExecutionConfirmationRequest`),Z(`WorkbenchExecutionConfirmationEvidence`),Z(`WorkbenchExecutionRequest`),Z(`WorkbenchExecutionTokenUsage`),Z(`WorkbenchExecutionCost`),Z(`WorkbenchTelemetryCorrelation`),Z(`WorkbenchExecutionUpdateEvents`),Z(`WorkbenchExecutionRecord`),Z(`WorkbenchExecutionAccepted`),Z(`WorkbenchExecutionCancelRequest`),Z(`WorkbenchExecutionPage`),Z(`WorkbenchTelemetryAvailability`),Z(`WorkbenchTelemetrySignalAvailability`),Z(`WorkbenchTelemetrySignalSummary`),Z(`WorkbenchExecutionTelemetryResponse`),Z(`WorkbenchAssertionStatus`),Z(`WorkbenchStatusAssertion`),Z(`WorkbenchExactAssertion`),Z(`WorkbenchPartialAssertion`),Z(`WorkbenchSchemaAssertion`),Z(`WorkbenchPatternAssertion`),Z(`WorkbenchLatencyAssertion`),Z(`WorkbenchTestAssertion`),Z(`WorkbenchTestCase`),Z(`WorkbenchTestCaseCreateRequest`),Z(`WorkbenchTestCaseUpdateRequest`),Z(`WorkbenchTestCasePage`),Z(`WorkbenchTestSuite`),Z(`WorkbenchTestSuiteCreateRequest`),Z(`WorkbenchTestSuiteUpdateRequest`),Z(`WorkbenchTestSuitePage`),Z(`WorkbenchEvaluationResultStatus`),Z(`WorkbenchEvaluationRunStatus`),Z(`WorkbenchRegressionStatus`),Z(`WorkbenchEvaluationRunRequest`),Z(`WorkbenchTestCaseRunRequest`),Z(`WorkbenchSuiteRunRequest`),Z(`WorkbenchAssertionResult`),Z(`WorkbenchEvaluationTestCaseSnapshot`),Z(`WorkbenchEvaluationSuiteSnapshot`),Z(`WorkbenchEvaluationTestResult`),Z(`WorkbenchEvaluationSummary`),Z(`WorkbenchEvaluationRun`),Z(`WorkbenchEvaluationRunAccepted`),Z(`WorkbenchEvaluationRunPage`),Z(`WorkbenchEvaluationComparisonRequest`),Z(`WorkbenchEvaluationTestComparison`),Z(`WorkbenchEvaluationRunComparison`),Z(`WorkbenchEvaluationExportFormat`),Z(`WorkbenchEvaluationExportStatus`),Z(`WorkbenchEvaluationExportRequest`),Z(`WorkbenchEvaluationExport`),Z(`WorkbenchEvaluationJsonExportPayload`),Z(`WorkbenchEvaluationReportExportPayload`),Z(`WorkbenchEvaluationExportPayload`),Z(`WorkbenchEvaluationExportArtifact`),Z(`WorkbenchEvaluationExportAccepted`),X(`Common.Errors.UnauthorizedError`),X(`Common.Errors.ForbiddenError`),X(`Common.Errors.NotFoundError`),X(`Common.Errors.ValidationError`),X(`Common.Errors.ConflictError`),X(`Common.Errors.BadGatewayError`),X(`Common.Errors.ServiceUnavailableError`),X(`Common.Errors.InternalServerError`);function Uv(){return{graph:void 0,events:[],journalCursor:`0`,selectedNodeId:void 0,selectedEdgeId:void 0,content:{},liveControlsAvailable:!1,connection:`connecting`,reconnectAttempt:0,cursorGapCount:0}}function Wv(e,t){if(t.type===`bootstrap`)return{...Uv(),graph:t.payload.graph,journalCursor:`0`,liveControlsAvailable:t.payload.live_controls_available,connection:`live`};if(t.type===`connection`)return{...e,connection:t.connection,reconnectAttempt:t.reconnectAttempt??e.reconnectAttempt};if(t.type===`select-node`)return{...e,selectedNodeId:t.nodeId,selectedEdgeId:void 0};if(t.type===`select-edge`)return{...e,selectedNodeId:void 0,selectedEdgeId:t.edgeId};let n=t.payload.graph,r=n!==void 0&&e.graph!==void 0&&n.run.run_id!==e.graph.run.run_id,i=n===void 0?e.graph:r||e.graph===void 0?n:Gv(e.graph,n),a=t.payload.page,o=a.cursor_gap||r?qv(a.events).slice(-1e3):qv([...e.events,...a.events]).slice(-1e3),s=t.payload.content===void 0?e.content:{...e.content,[t.payload.content.content_ref]:t.payload.content};return{...e,graph:i,events:o,journalCursor:a.next_sequence,content:s,liveControlsAvailable:i?.run.status===`active`&&e.liveControlsAvailable,connection:`live`,reconnectAttempt:0,cursorGapCount:e.cursorGapCount+ +!!a.cursor_gap,...r?{selectedNodeId:void 0,selectedEdgeId:void 0}:{}}}function Gv(e,t){return{...t,nodes:Kv(e.nodes,t.nodes,e=>e.node_id),edges:Kv(e.edges,t.edges,e=>e.edge_id)}}function Kv(e,t,n){let r=new Map(e.map(e=>[n(e),e]));for(let e of t)r.set(n(e),e);return[...r.values()].sort((e,t)=>n(e).localeCompare(n(t)))}function qv(e){return[...new Map(e.map(e=>[e.event_id,e])).values()].sort((e,t)=>(BigInt(e.journal_sequence)<BigInt(t.journal_sequence)?-1:+(BigInt(e.journal_sequence)>BigInt(t.journal_sequence)))||e.event_id.localeCompare(t.event_id))}function Jv(e){return e.graph?.nodes.find(t=>t.node_id===e.selectedNodeId)}function Yv(e){return e.graph?.edges.find(t=>t.edge_id===e.selectedEdgeId)}function Xv(e){return Math.min(15e3,500*2**Math.max(0,e))}var Zv=184,Qv=62;function $v(e,t){return(t===`radial`&&ey(e)?`radial`:`layered`)==`radial`?ry(e.nodes):ny(e.nodes,e.edges)}function ey(e){if(e.nodes.length<4||e.nodes.length>24)return!1;let t=iy(e.nodes),n=iy(e.nodes);for(let r of e.edges)t.set(r.target_node_id,(t.get(r.target_node_id)??0)+1),n.set(r.source_node_id,(n.get(r.source_node_id)??0)+1);let r=e.nodes.filter(e=>(t.get(e.node_id)??0)===0),i=e.nodes.filter(e=>(n.get(e.node_id)??0)===0);return r.length===1&&i.length===1&&e.nodes.some(e=>(n.get(e.node_id)??0)>=2)&&e.nodes.some(e=>(t.get(e.node_id)??0)>=2)}function ty(e,t,n,r,i=160){let a=new Set;for(let[o,s]of e.positions){let e=s.x*t.scale+t.x,c=s.y*t.scale+t.y,l=e+s.width*t.scale,u=c+s.height*t.scale;l>=-i&&u>=-i&&e<=n+i&&c<=r+i&&a.add(o)}return a}function ny(e,t){let n=new Map(e.map(e=>[e.node_id,e])),r=iy(e),i=new Map;for(let e of t){if(!n.has(e.source_node_id)||!n.has(e.target_node_id))continue;r.set(e.target_node_id,(r.get(e.target_node_id)??0)+1);let t=i.get(e.source_node_id)??[];t.push(e.target_node_id),i.set(e.source_node_id,t)}let a=new Map,o=e.filter(e=>(r.get(e.node_id)??0)===0).sort(ay).map(e=>e.node_id),s=new Set;for(;o.length>0;){let e=o.shift();if(s.has(e))continue;s.add(e);let t=a.get(e)??0;for(let n of[...i.get(e)??[]].sort()){a.set(n,Math.max(a.get(n)??0,t+1));let e=(r.get(n)??1)-1;r.set(n,e),e===0&&o.push(n)}o.sort()}let c=Math.max(0,...a.values());for(let t of[...e].sort(ay))s.has(t.node_id)||a.set(t.node_id,c++);let l=new Map;for(let t of e){let e=a.get(t.node_id)??0,n=l.get(e)??[];n.push(t),l.set(e,n)}for(let e of l.values())e.sort(ay);let u=new Map,d=1;for(let[e,t]of[...l].sort(([e],[t])=>e-t))d=Math.max(d,t.length),t.forEach((t,n)=>{u.set(t.node_id,{node:t,x:54+e*288,y:54+n*90,width:Zv,height:Qv,rank:e})});let f=Math.max(0,...a.values());return{mode:`layered`,width:108+(f+1)*Zv+f*104,height:108+d*Qv+(d-1)*28,positions:u}}function ry(e){let t=[...e].sort(ay),n=460-Zv/2,r=340-Qv/2,i=new Map,a=t[0],o=t.at(-1);a&&i.set(a.node_id,{node:a,x:n,y:44,width:Zv,height:Qv,rank:0});let s=t.slice(1,-1);return s.forEach((e,t)=>{let a=t/Math.max(1,s.length)*Math.PI*2-Math.PI/2;i.set(e.node_id,{node:e,x:n+Math.cos(a)*300,y:r+Math.sin(a)*220,width:Zv,height:Qv,rank:1})}),o&&o!==a&&i.set(o.node_id,{node:o,x:n,y:574,width:Zv,height:Qv,rank:2}),{mode:`radial`,width:920,height:680,positions:i}}function iy(e){return new Map(e.map(e=>[e.node_id,0]))}function ay(e,t){return(e.started_at??``).localeCompare(t.started_at??``)||e.node_id.localeCompare(t.node_id)}var oy=`sha256:${`c`.repeat(64)}`,sy={display:{graph:{run:{run_id:`run_fanout_resume_01`,thread_id:`thread_9f31`,title:`collector release gate`,status:`active`,started_at:`2026-07-28T12:00:00Z`,latest_journal_sequence:`14`,active_attempt_id:`attempt-2`},nodes:[{node_id:`run`,kind:`run`,label:`collector release gate`,status:`active`,started_at:`2026-07-28T12:00:00Z`,duration_ms:18420},{node_id:`attempt:1`,kind:`attempt`,label:`attempt 1`,status:`failed`,attempt_id:`attempt-1`,started_at:`2026-07-28T12:00:00Z`,ended_at:`2026-07-28T12:00:11Z`,duration_ms:11e3},{node_id:`agent:contracts:1`,kind:`agent`,label:`contracts`,status:`succeeded`,attempt_id:`attempt-1`,agent_id:`agent-contracts`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:06Z`,duration_ms:5100},{node_id:`agent:collector:1`,kind:`agent`,label:`collector journal`,status:`failed`,attempt_id:`attempt-1`,agent_id:`agent-collector`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:09Z`,duration_ms:7900,content_refs:[oy]},{node_id:`agent:mcp:1`,kind:`agent`,label:`mcp projection`,status:`succeeded`,attempt_id:`attempt-1`,agent_id:`agent-mcp`,started_at:`2026-07-28T12:00:01Z`,ended_at:`2026-07-28T12:00:07Z`,duration_ms:6200},{node_id:`gate:join:1`,kind:`gate`,label:`join / spec review`,status:`failed`,attempt_id:`attempt-1`,started_at:`2026-07-28T12:00:09Z`,ended_at:`2026-07-28T12:00:11Z`,duration_ms:1800},{node_id:`attempt:2`,kind:`attempt`,label:`attempt 2 · resume`,status:`running`,attempt_id:`attempt-2`,started_at:`2026-07-28T12:00:12Z`,duration_ms:6420},{node_id:`agent:collector:2`,kind:`agent`,label:`collector journal`,status:`succeeded`,attempt_id:`attempt-2`,agent_id:`agent-collector`,started_at:`2026-07-28T12:00:12Z`,ended_at:`2026-07-28T12:00:17Z`,duration_ms:4980},{node_id:`tool:test`,kind:`tool_call`,label:`dotnet test · workflow`,status:`succeeded`,attempt_id:`attempt-2`,agent_id:`agent-collector`,started_at:`2026-07-28T12:00:17Z`,ended_at:`2026-07-28T12:00:18Z`,duration_ms:1120},{node_id:`gate:release`,kind:`gate`,label:`release evidence`,status:`running`,attempt_id:`attempt-2`,started_at:`2026-07-28T12:00:18Z`,duration_ms:320}],edges:[{edge_id:`run-attempt-1`,source_node_id:`run`,target_node_id:`attempt:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-01`]}},{edge_id:`attempt-contracts`,source_node_id:`attempt:1`,target_node_id:`agent:contracts:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-02`]}},{edge_id:`attempt-collector`,source_node_id:`attempt:1`,target_node_id:`agent:collector:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-03`]}},{edge_id:`attempt-mcp`,source_node_id:`attempt:1`,target_node_id:`agent:mcp:1`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-04`]}},{edge_id:`contracts-join`,source_node_id:`agent:contracts:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-06`]}},{edge_id:`collector-join`,source_node_id:`agent:collector:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-08`]}},{edge_id:`mcp-join`,source_node_id:`agent:mcp:1`,target_node_id:`gate:join:1`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-07`]}},{edge_id:`write-conflict`,source_node_id:`agent:collector:1`,target_node_id:`agent:mcp:1`,kind:`conflict`,provenance:{type:`derived`,event_ids:[`evt-write-a`,`evt-write-b`],evidence:`overlapping writes to server/src/contract-validation.ts`,confidence:.94}},{edge_id:`interrupt-resume`,source_node_id:`gate:join:1`,target_node_id:`attempt:2`,kind:`temporal`,provenance:{type:`recorded`,event_ids:[`evt-10`,`evt-11`]}},{edge_id:`resume-collector`,source_node_id:`attempt:2`,target_node_id:`agent:collector:2`,kind:`control`,provenance:{type:`recorded`,event_ids:[`evt-12`]}},{edge_id:`collector-test`,source_node_id:`agent:collector:2`,target_node_id:`tool:test`,kind:`resource`,provenance:{type:`recorded`,event_ids:[`evt-13`]}},{edge_id:`test-release`,source_node_id:`tool:test`,target_node_id:`gate:release`,kind:`gate`,provenance:{type:`recorded`,event_ids:[`evt-14`]}}],statistics:{t1_ms:34840,t_infinity_ms:18420,wall_time_ms:18420,peak_concurrency:3,worker_count:3,parallel_lower_bound_ms:18420,critical_path_node_ids:[`run`,`attempt:1`,`agent:collector:1`,`gate:join:1`,`attempt:2`,`agent:collector:2`,`tool:test`,`gate:release`]},journal_sequence:`14`,has_more_nodes:!1,has_more_edges:!1,total_node_count:10,total_edge_count:12},live_controls_available:!0,mode:`live`},updates:{page:{events:[cy(`evt-01`,`1`,`attempt_started`,{attempt_id:`attempt-1`}),cy(`evt-02`,`2`,`agent_spawned`,{agent_id:`agent-contracts`}),cy(`evt-03`,`3`,`agent_spawned`,{agent_id:`agent-collector`}),cy(`evt-04`,`4`,`agent_spawned`,{agent_id:`agent-mcp`}),cy(`evt-06`,`6`,`agent_completed`,{agent_id:`agent-contracts`}),cy(`evt-07`,`7`,`agent_completed`,{agent_id:`agent-mcp`}),cy(`evt-08`,`8`,`agent_completed`,{agent_id:`agent-collector`}),cy(`evt-09`,`9`,`attempt_completed`,{attempt_id:`attempt-1`}),cy(`evt-10`,`10`,`control_applied`,{}),cy(`evt-11`,`11`,`thread_resumed`,{attempt_id:`attempt-2`}),cy(`evt-12`,`12`,`agent_started`,{agent_id:`agent-collector`,attempt_id:`attempt-2`}),cy(`evt-13`,`13`,`tool_completed`,{agent_id:`agent-collector`,attempt_id:`attempt-2`,tool_call_id:`tool-test`}),cy(`evt-14`,`14`,`wait_started`,{attempt_id:`attempt-2`})],next_sequence:`14`,high_water_mark:`14`,cursor_gap:!1},content:{content_ref:oy,content_type:`text/plain`,encoding:`utf8`,content:`Investigate the projection mismatch. Preserve attempt one as failed, resume the same thread, and prove the rebuilt graph converges.`,size_bytes:128},mode:`live`}};function cy(e,t,n,r){return{event_id:e,source_sequence:t,timestamp:`2026-07-28T12:00:${t.padStart(2,`0`)}Z`,kind:n,run_id:`run_fanout_resume_01`,client_id:`qyl-codex`,journal_sequence:t,...r}}var ly=`http://www.w3.org/2000/svg`,uy=43,dy=12,fy=new URLSearchParams(window.location.search).get(`fixture`)===`fanout`;function Q(e){let t=document.getElementById(e);if(!t)throw Error(`observe graph is missing #${e}`);return t}var py=Q(`workflow-app`),my=Q(`loading-state`),hy=Q(`error-state`),gy=Q(`error-message`),_y=Q(`debugger`),vy=Q(`run-status-mark`),yy=Q(`run-title`),by=Q(`run-id`),xy=Q(`connection-state`),Sy=Q(`fullscreen-button`),Cy=Q(`fit-graph`),wy=Q(`metric-t1`),Ty=Q(`metric-tinf`),Ey=Q(`metric-wall`),Dy=Q(`metric-peak`),Oy=Q(`metric-workers`),ky=Q(`metric-bound`),Ay=Q(`run-card`),jy=Q(`agent-count`),My=Q(`agent-list`),Ny=Q(`load-more-graph`),Py=Q(`layout-layered`),Fy=Q(`layout-radial`),Iy=Q(`viewport-count`),Ly=Q(`graph-viewport`),Ry=Q(`graph-world`),zy=Q(`edge-layer`),By=Q(`node-layer`),Vy=Q(`heatmap`),Hy=Q(`heatmap-range`),Uy=Q(`journal-cursor`),Wy=Q(`event-list`),Gy=Q(`event-list-inner`),Ky=Q(`event-window-label`),qy=Q(`follow-events`),Jy=Q(`detail-drawer`),Yy=Q(`detail-title`),Xy=Q(`detail-subtitle`),Zy=Q(`detail-close`),Qy=Q(`detail-facts`),$y=Q(`attempt-history`),eb=Q(`content-list`),tb=Q(`content-viewer`),nb=Q(`historical-control-note`),rb=Q(`control-form`),ib=Q(`control-action`),ab=Q(`control-input-label`),ob=Q(`control-input`),sb=Q(`control-submit`),cb=Q(`control-result`),lb=Q(`live-announcer`),$=Uv(),ub=`layered`,db,fb={x:24,y:24,scale:1},pb=``,mb=!0,hb=0,gb=0,_b=!1,vb=!1,yb=!1,bb,xb={clientX:0,clientY:0,x:0,y:0},Sb=new wv({name:`qyl Observe Graph`,version:Ov.version});function Cb(e){$=Wv($,e),Eb()}function wb(e){if($.graph){lb.textContent=e,xy.textContent=`degraded`,xy.dataset.state=`retrying`;return}my.hidden=!0,_y.hidden=!0,gy.textContent=e,hy.hidden=!1}function Tb(e){return e.content?.map(e=>`text`in e?e.text:``).filter(Boolean).join(` `)||void 0}function Eb(){let e=$.graph;my.hidden=e!==void 0,hy.hidden=!0,_y.hidden=e===void 0,Db(),e&&(yy.textContent=e.run.title??`untitled workflow`,by.textContent=e.run.run_id,vy.dataset.status=e.run.status,Ob(),kb(),Mb(),zb(),Bb(),Ub())}function Db(){xy.textContent=$.connection===`retrying`?`retry ${$.reconnectAttempt}`:$.connection===`stopped`?`replay complete`:$.connection,xy.dataset.state=$.connection}function Ob(){let e=$.graph?.statistics;wy.textContent=e?dx(e.t1_ms):`—`,Ty.textContent=e?dx(e.t_infinity_ms):`—`,Ey.textContent=e?dx(e.wall_time_ms):`—`,Dy.textContent=e?`${e.peak_concurrency}×`:`—`,Oy.textContent=e?String(e.worker_count):`—`,ky.textContent=e?dx(e.parallel_lower_bound_ms):`—`}function kb(){let e=$.graph;if(!e)return;let t=new Set(e.nodes.flatMap(e=>e.attempt_id?[e.attempt_id]:[])),n=e.nodes.filter(e=>e.kind===`agent`).sort(mx);jy.textContent=`${n.length} agent${n.length===1?``:`s`}`;let r=document.createElement(`div`);r.className=`run-card-title`;let i=document.createElement(`i`);i.className=`status-mark`,i.dataset.status=e.run.status,r.appendChild(i);let a=document.createElement(`strong`);a.textContent=e.run.title??e.run.run_id,r.appendChild(a);let o=document.createElement(`div`);o.className=`run-card-facts`,o.appendChild(Ab(`status`,e.run.status)),o.appendChild(Ab(`attempts`,String(t.size))),o.appendChild(Ab(`journal`,e.journal_sequence)),o.appendChild(Ab(`window`,`${e.nodes.length}/${e.total_node_count}`)),Ay.replaceChildren(r,o);let s=document.createDocumentFragment();for(let e of n.slice(0,250)){let t=document.createElement(`button`);t.type=`button`,t.className=`agent-row`,t.setAttribute(`role`,`option`),t.setAttribute(`aria-selected`,String($.selectedNodeId===e.node_id)),t.addEventListener(`click`,()=>Zb(e.node_id));let n=document.createElement(`span`);n.className=`status-dot`,n.dataset.status=e.status,n.setAttribute(`aria-label`,e.status),t.appendChild(n);let r=document.createElement(`span`);r.className=`agent-copy`;let i=document.createElement(`strong`);i.textContent=e.label,r.appendChild(i);let a=document.createElement(`small`);a.textContent=`${e.attempt_id??`no attempt`} · ${e.status}`,r.appendChild(a),t.appendChild(r);let o=document.createElement(`span`);o.className=`agent-duration`,o.textContent=dx(e.duration_ms),t.appendChild(o),t.appendChild(jb(e)),s.appendChild(t)}My.replaceChildren(s),Ny.hidden=!(e.has_more_nodes||e.has_more_edges),Ny.textContent=`Load next graph window · ${e.nodes.length}/${e.total_node_count} nodes`}function Ab(e,t){let n=document.createElement(`span`);n.textContent=e;let r=document.createElement(`b`);return r.textContent=t,n.appendChild(r),n}function jb(e){let t=document.createElement(`span`);t.className=`activity-strip`;let n=$.graph;if(!n)return t;let r=n.nodes.filter(t=>t.agent_id!==void 0&&t.agent_id===e.agent_id),i=r.filter(e=>e.status===`succeeded`||e.status===`completed`).length,a=r.some(e=>e.status===`failed`||e.status===`interrupted`),o=Math.max(1,Math.round(i/Math.max(1,r.length)*10));for(let e=0;e<10;e+=1){let n=document.createElement(`i`);e<o&&(n.className=a&&e===o-1?`error`:`on`),t.appendChild(n)}return t}function Mb(){let e=$.graph;if(!e)return;db=$v(e,ub),ub=db.mode,Py.setAttribute(`aria-pressed`,String(ub===`layered`)),Fy.setAttribute(`aria-pressed`,String(ub===`radial`));let t=ey(e);Fy.disabled=!t,Fy.title=t?`Show the small fan-out/fan-in run as a radial fleet`:`Radial view is available only for small fan-out/fan-in runs`;let n=`${e.run.run_id}:${ub}`;if(pb!==n){pb=n,Rb();return}Ry.setAttribute(`transform`,`translate(${fb.x} ${fb.y}) scale(${fb.scale})`);let r=ty(db,fb,Ly.clientWidth,Ly.clientHeight);Iy.textContent=`${r.size}/${e.nodes.length} rendered · ${e.total_node_count} total`,Nb(e.edges,r),Fb(r)}function Nb(e,t){let n=$.graph,r=db;if(!n||!r)return;let i=new Set(n.statistics.critical_path_node_ids),a=document.createDocumentFragment();for(let n of e){if(!t.has(n.source_node_id)&&!t.has(n.target_node_id))continue;let e=r.positions.get(n.source_node_id),o=r.positions.get(n.target_node_id);if(!e||!o)continue;let s=document.createElementNS(ly,`path`);s.setAttribute(`d`,Pb(e,o,r.mode)),s.setAttribute(`class`,[`workflow-edge`,i.has(n.source_node_id)&&i.has(n.target_node_id)?`is-critical`:``,$.selectedEdgeId===n.edge_id?`is-selected`:``].filter(Boolean).join(` `)),s.dataset.provenance=n.provenance.type,s.dataset.kind=n.kind,s.setAttribute(`tabindex`,`0`),s.setAttribute(`role`,`button`),s.setAttribute(`aria-label`,`${n.kind} edge from ${e.node.label} to ${o.node.label}, ${n.provenance.type}`),s.addEventListener(`click`,e=>{e.stopPropagation(),Qb(n.edge_id)}),s.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Qb(n.edge_id))}),a.appendChild(s)}zy.replaceChildren(a)}function Pb(e,t,n){if(n===`radial`)return`M${e.x+e.width/2},${e.y+e.height/2} L${t.x+t.width/2},${t.y+t.height/2}`;let r=e.x+e.width,i=e.y+e.height/2,a=t.x,o=t.y+t.height/2,s=Math.max(30,Math.abs(a-r)*.45);return`M${r},${i} C${r+s},${i} ${a-s},${o} ${a},${o}`}function Fb(e){let t=$.graph,n=db;if(!t||!n)return;let r=new Set(t.statistics.critical_path_node_ids),i=document.createDocumentFragment();for(let a of t.nodes){if(!e.has(a.node_id))continue;let t=n.positions.get(a.node_id);if(!t)continue;let o=document.createElementNS(ly,`g`);o.setAttribute(`transform`,`translate(${t.x} ${t.y})`),o.setAttribute(`class`,[`workflow-node`,$.selectedNodeId===a.node_id?`is-selected`:``,r.has(a.node_id)?`is-critical`:``].filter(Boolean).join(` `)),o.dataset.status=a.status,o.setAttribute(`tabindex`,`0`),o.setAttribute(`role`,`treeitem`),o.setAttribute(`aria-label`,`${a.kind} ${a.label}, ${a.status}, ${dx(a.duration_ms)}`),o.addEventListener(`click`,e=>{e.stopPropagation(),Zb(a.node_id)}),o.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Zb(a.node_id))});let s=document.createElementNS(ly,`rect`);s.setAttribute(`class`,`node-shell`),s.setAttribute(`width`,String(t.width)),s.setAttribute(`height`,String(t.height)),o.appendChild(s);let c=document.createElementNS(ly,`rect`);c.setAttribute(`class`,`node-status-band`),c.setAttribute(`width`,`3`),c.setAttribute(`height`,String(t.height)),o.appendChild(c),o.appendChild(Ib(`node-kind`,12,14,a.kind.replace(`_`,` `))),o.appendChild(Ib(`node-label`,12,33,px(a.label,25))),o.appendChild(Ib(`node-meta`,12,50,`${a.status} · ${dx(a.duration_ms)} · ${a.attempt_id??`run`}`)),i.appendChild(o)}By.replaceChildren(i)}function Ib(e,t,n,r){let i=document.createElementNS(ly,`text`);return i.setAttribute(`class`,e),i.setAttribute(`x`,String(t)),i.setAttribute(`y`,String(n)),i.textContent=r,i}function Lb(e=!0){let t=db;if(!t)return;let n=Math.max(1,Ly.clientWidth-48),r=Math.max(1,Ly.clientHeight-48),i=Math.min(1.15,Math.max(e?.15:.82,Math.min(n/t.width,r/t.height))),a=t.width*i;fb={x:a<=Ly.clientWidth?(Ly.clientWidth-a)/2:22,y:(Ly.clientHeight-t.height*i)/2,scale:i},Mb()}function Rb(){Lb(!1)}function zb(){let e=$.graph;if(!e)return;let t=e.nodes.filter(e=>e.kind===`agent`&&e.agent_id).slice(0,8),n=new Date(e.run.started_at).getTime(),r=e.run.ended_at?new Date(e.run.ended_at).getTime():n+Math.max(1,e.statistics.wall_time_ms),i=Math.max(1,r-n);Hy.textContent=`${dx(i)} window`;let a=document.createDocumentFragment();for(let r of t){let t=document.createElement(`span`);t.className=`heatmap-label`,t.textContent=px(r.label,13),t.title=r.label,a.appendChild(t);let o=e.nodes.filter(e=>e.agent_id===r.agent_id);for(let e=0;e<dy;e+=1){let t=n+i*e/dy,s=n+i*(e+1)/dy,c=o.filter(e=>{let r=e.started_at?new Date(e.started_at).getTime():n,i=e.ended_at?new Date(e.ended_at).getTime():r+(e.duration_ms??0);return r<s&&i>=t}).length,l=document.createElement(`span`);l.className=`heatmap-cell`,l.dataset.level=String(Math.min(3,c)),l.setAttribute(`aria-label`,`${r.label}, phase ${e+1}: ${c} active record${c===1?``:`s`}`),l.title=l.getAttribute(`aria-label`)??``,a.appendChild(l)}}Vy.replaceChildren(a)}function Bb(){let e=$.events;Uy.textContent=`seq ${$.journalCursor}`,Ky.textContent=`${e.length} buffered${$.cursorGapCount?` · ${$.cursorGapCount} gap recoveries`:``}`,Gy.style.height=`${e.length*uy}px`;let t=Math.ceil(Wy.clientHeight/uy),n=Math.max(0,Math.floor(Wy.scrollTop/uy)-5),r=Math.min(e.length,n+t+10),i=document.createDocumentFragment();for(let t=n;t<r;t+=1){let n=e[t],r=document.createElement(`div`);r.className=`event-row`,r.style.top=`${t*uy}px`,r.dataset.tone=Vb(n),r.tabIndex=0,r.addEventListener(`click`,()=>Hb(n)),r.addEventListener(`keydown`,e=>{e.key===`Enter`&&Hb(n)});let a=document.createElement(`code`);a.className=`event-seq`,a.textContent=n.journal_sequence,r.appendChild(a);let o=document.createElement(`span`);o.className=`event-copy`;let s=document.createElement(`strong`);s.textContent=n.kind.replaceAll(`_`,` `),o.appendChild(s);let c=document.createElement(`small`);c.textContent=n.agent_id??n.tool_call_id??n.turn_id??n.attempt_id??n.event_id,o.appendChild(c),r.appendChild(o);let l=document.createElement(`time`);l.className=`event-time`,l.dateTime=n.timestamp,l.textContent=fx(n.timestamp),r.appendChild(l),i.appendChild(r)}Gy.replaceChildren(i),mb&&e.length>0&&requestAnimationFrame(()=>{Wy.scrollTop=Wy.scrollHeight})}function Vb(e){return e.kind.includes(`failed`)||e.kind.includes(`interrupted`)||e.kind===`approval_resolved`?`failure`:e.kind.startsWith(`control_`)?`control`:e.kind.startsWith(`agent_`)||e.kind.startsWith(`message_`)||e.kind.startsWith(`wait_`)||e.kind===`joined`?`collaboration`:`neutral`}function Hb(e){let t=$.graph;if(!t)return;let n=t.nodes.find(t=>e.tool_call_id!==void 0&&t.attributes?.tool_call_id===e.tool_call_id||e.agent_id!==void 0&&t.agent_id===e.agent_id||e.attempt_id!==void 0&&t.attempt_id===e.attempt_id);n&&Zb(n.node_id)}function Ub(){let e=Jv($),t=Yv($);if(Jy.hidden=e===void 0&&t===void 0,!e&&!t)return;e?Wb(e):t&&Gb(t);let n=$.graph,r=$.liveControlsAvailable&&n?.run.status===`active`;rb.hidden=!r,nb.hidden=r}function Wb(e){Yy.textContent=e.label,Xy.textContent=`${e.kind} · ${e.status} · ${e.node_id}`;let t=[[`node`,e.node_id],[`kind`,e.kind],[`status`,e.status],[`attempt`,e.attempt_id??`—`],[`agent`,e.agent_id??`—`],[`started`,e.started_at??`—`],[`ended`,e.ended_at??`—`],[`duration`,dx(e.duration_ms)]];e.attributes&&t.push([`attributes`,JSON.stringify(e.attributes)]),Kb(t);let n=$.graph?.nodes.filter(t=>t.node_id===e.node_id||e.agent_id!==void 0&&t.agent_id===e.agent_id&&t.attempt_id!==e.attempt_id).sort(mx)??[];$y.replaceChildren(...n.map(e=>{let t=document.createElement(`div`);t.className=`attempt-record`;let n=document.createElement(`strong`);n.textContent=e.attempt_id??`run`,t.appendChild(n);let r=document.createElement(`span`);r.textContent=e.status,t.appendChild(r);let i=document.createElement(`span`);i.textContent=e.kind,t.appendChild(i);let a=document.createElement(`span`);return a.textContent=dx(e.duration_ms),t.appendChild(a),t})),qb(e.content_refs??[])}function Gb(e){Yy.textContent=`${e.kind} edge`,Xy.textContent=`${e.source_node_id} → ${e.target_node_id}`;let t=[[`edge`,e.edge_id],[`kind`,e.kind],[`source`,e.source_node_id],[`target`,e.target_node_id],[`provenance`,e.provenance.type],[`events`,e.provenance.event_ids.join(`, `)]];e.provenance.type===`derived`&&(t.push([`evidence`,e.provenance.evidence]),t.push([`confidence`,`${Math.round(e.provenance.confidence*100)}%`])),Kb(t),$y.replaceChildren(Jb(`Edges do not own attempt history.`)),qb([])}function Kb(e){let t=document.createDocumentFragment();for(let[n,r]of e){let e=document.createElement(`dt`);e.textContent=n,t.appendChild(e);let i=document.createElement(`dd`);i.textContent=r,t.appendChild(i)}Qy.replaceChildren(t)}function qb(e){if(e.length===0){eb.replaceChildren(Jb(`No captured content is attached to this record.`)),tb.textContent=`Captured payloads are fetched only when opened.`;return}eb.replaceChildren(...e.map(e=>{let t=document.createElement(`button`);t.type=`button`,t.className=`content-ref`;let n=document.createElement(`strong`);n.textContent=e.slice(0,20),t.appendChild(n);let r=document.createElement(`span`);return r.textContent=$.content[e]?`cached`:`fetch`,t.appendChild(r),t.addEventListener(`click`,()=>void Yb(e)),t}))}function Jb(e){let t=document.createElement(`span`);return t.className=`historical-note`,t.textContent=e,t}async function Yb(e){let t=$.content[e];if(t){tb.textContent=Xb(t.encoding,t.content);return}let n=$.graph?.run.run_id;if(n){tb.textContent=`Decrypting captured content…`;try{let t=await Sb.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:n,after_sequence:$.journalCursor,wait_ms:0,content_ref:e}});if(t.isError)throw Error(Tb(t)??`content retrieval failed`);let r=nx(t);if(!r?.content)throw Error(`content response was missing`);Cb({type:`updates`,payload:r}),tb.textContent=Xb(r.content.encoding,r.content.content)}catch(e){tb.textContent=`Content unavailable: ${e instanceof Error?e.message:String(e)}`}}}function Xb(e,t){if(e===`utf8`)return t;try{let e=Uint8Array.from(atob(t),e=>e.charCodeAt(0));return new TextDecoder().decode(e)}catch{return`[invalid base64 content]`}}function Zb(e){let t=$b();gb=Math.max(0,t.findIndex(t=>t.node_id===e)),Cb({type:`select-node`,nodeId:e})}function Qb(e){Cb({type:`select-edge`,edgeId:e})}function $b(){let e=db;return e?[...e.positions.values()].sort((e,t)=>e.x-t.x||e.y-t.y).map(e=>e.node):[]}function ex(e){let t=$b();t.length!==0&&(gb=(gb+e+t.length)%t.length,Zb(t[gb].node_id))}function tx(e){let t=Bv.safeParse(e.structuredContent);return t.success?t.data:void 0}function nx(e){let t=Vv.safeParse(e.structuredContent);return t.success?t.data:void 0}function rx(e){let t=Hv.safeParse(e.structuredContent);return t.success?t.data:void 0}function ix(){ax(++hb)}async function ax(e){let t=0;for(;e===hb&&$.graph;){let n=$.graph.run.run_id;try{let r=await Sb.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:n,after_sequence:$.journalCursor,limit:250,wait_ms:$.graph.run.status===`active`?2e4:0}});if(e!==hb)return;if(r.isError)throw Error(Tb(r)??`journal update failed`);let i=nx(r);if(!i)throw Error(`journal update did not match the published contract`);if(Cb({type:`updates`,payload:i}),t=0,$.graph?.run.status!==`active`&&i.page.next_sequence===i.page.high_water_mark){Cb({type:`connection`,connection:`stopped`});return}}catch{if(e!==hb)return;t+=1,Cb({type:`connection`,connection:`retrying`,reconnectAttempt:t}),lb.textContent=`Workflow journal disconnected. Retry ${t}.`,await hx(Xv(t-1))}}}async function ox(){let e=$.graph;if(!(!e||vb)){vb=!0,Ny.disabled=!0;try{let t=await Sb.callServerTool({name:`fetch_workflow_graph_updates`,arguments:{run_id:e.run.run_id,after_sequence:$.journalCursor,wait_ms:0,...e.has_more_nodes&&e.next_node_cursor?{node_cursor:e.next_node_cursor}:{},...e.has_more_edges&&e.next_edge_cursor?{edge_cursor:e.next_edge_cursor}:{}}});if(t.isError)throw Error(Tb(t)??`graph page failed`);let n=nx(t);if(!n?.graph)throw Error(`graph page was missing`);Cb({type:`updates`,payload:n})}catch(e){lb.textContent=`Graph page failed: ${e instanceof Error?e.message:String(e)}`}finally{vb=!1,Ny.disabled=!1}}}function sx(e){e.theme&&Tv(e.theme),e.styles?.variables&&Ev(e.styles.variables),e.styles?.css?.fonts&&Dv(e.styles.css.fonts),Sy.hidden=e.availableDisplayModes?.includes(`fullscreen`)!==!0||e.displayMode===`fullscreen`,e.safeAreaInsets&&(py.style.paddingTop=`${e.safeAreaInsets.top}px`,py.style.paddingRight=`${e.safeAreaInsets.right}px`,py.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,py.style.paddingLeft=`${e.safeAreaInsets.left}px`)}Sb.ontoolinput=()=>{my.hidden=!1,hy.hidden=!0},Sb.ontoolresult=e=>{let t=tx(e);if(!t){wb(Tb(e)??`Display result failed contract validation.`);return}Cb({type:`bootstrap`,payload:t}),ix()},Sb.ontoolcancelled=()=>{$.graph||wb(`Workflow display was cancelled.`)},Sb.onhostcontextchanged=sx,Sb.onerror=e=>{console.error(e)},Sb.onteardown=async()=>(hb+=1,Cb({type:`connection`,connection:`stopped`}),{}),Cy.addEventListener(`click`,()=>Lb(!0)),Py.addEventListener(`click`,()=>{ub=`layered`,pb=``,Mb()}),Fy.addEventListener(`click`,()=>{!$.graph||!ey($.graph)||(ub=`radial`,pb=``,Mb())}),Ny.addEventListener(`click`,()=>void ox()),Zy.addEventListener(`click`,()=>{Cb({type:`select-node`,nodeId:void 0})}),qy.addEventListener(`click`,()=>{mb=!mb,qy.setAttribute(`aria-pressed`,String(mb)),mb&&(Wy.scrollTop=Wy.scrollHeight,Bb())}),Wy.addEventListener(`scroll`,()=>{Wy.scrollHeight-Wy.clientHeight-Wy.scrollTop>86&&mb&&(mb=!1,qy.setAttribute(`aria-pressed`,`false`)),Bb()}),ib.addEventListener(`change`,()=>{let e=ib.value!==`interrupt`;ab.hidden=!e,ob.required=e}),rb.addEventListener(`submit`,e=>{e.preventDefault(),cx()});async function cx(){let e=$.graph;if(!e||_b)return;let t=ib.value,n=ob.value.trim();if(t!==`interrupt`&&!n){cb.textContent=`${t} requires input.`;return}_b=!0,sb.disabled=!0,cb.textContent=`Waiting for host approval…`;try{let r=await Sb.callServerTool({name:`control_workflow_run`,arguments:{run_id:e.run.run_id,action:t,idempotency_key:crypto.randomUUID(),...t===`interrupt`?{}:{input:n}}});if(r.isError)throw Error(Tb(r)??`control failed`);let i=rx(r);if(!i)throw Error(`control result failed contract validation`);cb.textContent=`${i.command.action} ${i.command.status} · ${i.command.command_id}`,t!==`interrupt`&&(ob.value=``)}catch(e){cb.textContent=`Control rejected: ${e instanceof Error?e.message:String(e)}`}finally{_b=!1,sb.disabled=!1}}Sy.addEventListener(`click`,()=>{Sb.requestDisplayMode({mode:`fullscreen`}).catch(e=>{lb.textContent=`Fullscreen unavailable: ${e instanceof Error?e.message:String(e)}`})}),Ly.addEventListener(`pointerdown`,e=>{e.button===0&&(yb=!0,bb=e.pointerId,xb={clientX:e.clientX,clientY:e.clientY,x:fb.x,y:fb.y},Ly.setPointerCapture(e.pointerId),Ly.classList.add(`is-panning`))}),Ly.addEventListener(`pointermove`,e=>{!yb||e.pointerId!==bb||(fb={...fb,x:xb.x+e.clientX-xb.clientX,y:xb.y+e.clientY-xb.clientY},Mb())}),Ly.addEventListener(`pointerup`,lx),Ly.addEventListener(`pointercancel`,lx),Ly.addEventListener(`wheel`,e=>{e.preventDefault();let t=Ly.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=Math.min(2.2,Math.max(.15,fb.scale*Math.exp(-e.deltaY*.0015))),a=(n-fb.x)/fb.scale,o=(r-fb.y)/fb.scale;fb={scale:i,x:n-a*i,y:r-o*i},Mb()},{passive:!1});function lx(e){e.pointerId===bb&&(yb=!1,bb=void 0,Ly.classList.remove(`is-panning`))}window.addEventListener(`keydown`,e=>{let t=e.target;if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)){if(e.key===`Escape`){Cb({type:`select-node`,nodeId:void 0});return}e.key===`ArrowRight`||e.key===`ArrowDown`?(e.preventDefault(),ex(1)):(e.key===`ArrowLeft`||e.key===`ArrowUp`)&&(e.preventDefault(),ex(-1))}});var ux=new ResizeObserver(()=>{Mb(),Bb()});if(ux.observe(Ly),ux.observe(Wy),fy){let e=Bv.parse(sy.display),t=Vv.parse(sy.updates);Cb({type:`bootstrap`,payload:e}),Cb({type:`updates`,payload:t}),Sy.hidden=!0}else Sb.connect().then(async()=>{let e=Sb.getHostContext();if(e&&(sx(e),e.displayMode!==`fullscreen`&&e.availableDisplayModes?.includes(`fullscreen`)))try{await Sb.requestDisplayMode({mode:`fullscreen`})}catch(e){lb.textContent=`Fullscreen unavailable: ${e instanceof Error?e.message:String(e)}`}}).catch(e=>{wb(e instanceof Error?e.message:String(e))});function dx(e){return e===void 0||!Number.isFinite(e)||e<0?`—`:e<1?`${e.toFixed(2)} ms`:e<1e3?`${e.toFixed(+(e<10))} ms`:e<6e4?`${(e/1e3).toFixed(e<1e4?2:1)} s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function fx(e){let t=new Date(e);return Number.isNaN(t.getTime())?`—`:`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`}function px(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}function mx(e,t){return(e.started_at??``).localeCompare(t.started_at??``)||e.node_id.localeCompare(t.node_id)}function hx(e){return new Promise(t=>setTimeout(t,e))}</script>
73
59
  <style rel="stylesheet" crossorigin>:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--obs-bg:#070a0d;--obs-panel:#0b1014;--obs-panel-2:#0f151a;--obs-line:#243039;--obs-line-soft:#172027;--obs-text:#d8e2e8;--obs-muted:#82919a;--obs-faint:#4f5e66;--obs-cyan:#55d8d0;--obs-lime:#a8db62;--obs-amber:#e1b866;--obs-red:#ed7380;--obs-blue:#77a9db;--obs-recorded:#62cad2;--obs-derived:#c4d772;--obs-mono:"SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;--event-row-height:43px;font-family:var(--obs-mono);font-synthesis:none;text-rendering:geometricprecision}*{box-sizing:border-box}html,body{background:var(--obs-bg);width:100%;min-width:720px;height:100%;color:var(--obs-text);margin:0;overflow:hidden}button,select,textarea{font:inherit}button{border:1px solid var(--obs-line);background:var(--obs-panel-2);color:var(--obs-muted);cursor:pointer;border-radius:1px}button:hover:not(:disabled),button:focus-visible{border-color:var(--obs-cyan);color:var(--obs-text)}button:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:1px solid var(--obs-cyan);outline-offset:-1px}button:disabled{cursor:not-allowed;opacity:.38}code{color:var(--obs-muted);font-family:inherit}.workflow-app{background:linear-gradient(var(--obs-line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--obs-line-soft) 1px, transparent 1px), var(--obs-bg);background-size:80px 80px;grid-template-rows:44px 58px minmax(0,1fr);width:100%;min-width:900px;height:100dvh;display:grid;position:relative;overflow:hidden}.observe-header{z-index:5;border-bottom:1px solid var(--obs-line);background:var(--obs-panel);grid-template-columns:260px minmax(0,1fr) auto;align-items:center;display:grid}.observe-brand,.run-identity,.header-operations{align-items:center;min-width:0;display:flex}.observe-brand{border-right:1px solid var(--obs-line);gap:13px;height:100%;padding:0 14px}.wordmark{color:var(--obs-text);letter-spacing:-.08em;font-size:15px;font-weight:800}.wordmark span{color:var(--obs-cyan)}.screen-label,.panel-index{color:var(--obs-faint);letter-spacing:.14em;text-transform:uppercase;font-size:9px;font-weight:700}.run-identity{gap:8px;padding:0 14px;font-size:11px;overflow:hidden}.run-identity>span:not(.status-mark),.run-identity code{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.run-identity code{color:var(--obs-faint);font-size:9px}.status-mark{border:1px solid var(--obs-faint);background:0 0;flex:none;width:7px;height:7px}.status-mark[data-status=active],.status-dot[data-status=running]{border-color:var(--obs-lime);background:var(--obs-lime)}.status-mark[data-status=completed],.status-dot[data-status=succeeded]{border-color:var(--obs-cyan);background:var(--obs-cyan)}.status-mark[data-status=failed],.status-mark[data-status=interrupted],.status-dot[data-status=failed],.status-dot[data-status=interrupted]{border-color:var(--obs-red);background:var(--obs-red)}.header-operations{border-left:1px solid var(--obs-line);gap:6px;height:100%;padding:0 10px}.connection-state{min-width:72px;color:var(--obs-faint);letter-spacing:.08em;text-align:right;text-transform:uppercase;font-size:9px}.connection-state[data-state=live]{color:var(--obs-lime)}.connection-state[data-state=retrying]{color:var(--obs-amber)}.tool-button{text-transform:uppercase;height:25px;padding:0 8px;font-size:9px}.metric-strip{z-index:4;border-bottom:1px solid var(--obs-line);background:#080d10;grid-template-columns:repeat(5,minmax(90px,.75fr)) minmax(190px,1.35fr);display:grid}.metric-strip>div{border-right:1px solid var(--obs-line-soft);align-content:center;gap:2px;padding:0 14px;display:grid}.metric-strip span{color:var(--obs-faint);letter-spacing:.1em;text-transform:uppercase;font-size:8px}.metric-strip strong{color:var(--obs-text);letter-spacing:-.04em;font-size:15px;font-weight:500}.metric-strip .bound-metric{background:#0d1415;border-right:0}.bound-metric strong{color:var(--obs-lime)}.center-state{color:var(--obs-muted);background:#070a0df0;grid-row:3;place-content:center;justify-items:center;gap:8px;font-size:11px;display:grid}.center-state strong{color:var(--obs-text);text-transform:uppercase;font-size:13px;font-weight:600}.scan-line{background:var(--obs-line);width:180px;height:2px;overflow:hidden}.scan-line:after{background:var(--obs-cyan);content:"";width:30%;height:100%;animation:1.1s linear infinite scan;display:block}.error-state strong,.error-state span{color:var(--obs-red)}.debugger{background:var(--obs-bg);grid-row:3;grid-template-columns:224px minmax(480px,1fr) 318px;min-height:0;display:grid;overflow:hidden}.agent-rail,.event-console,.graph-console{background:var(--obs-panel);min-width:0;min-height:0}.agent-rail{border-right:1px solid var(--obs-line);grid-template-rows:36px auto minmax(0,1fr) auto;display:grid}.event-console{border-left:1px solid var(--obs-line);grid-template-rows:36px minmax(0,1fr) 31px;display:grid}.panel-heading,.heatmap-panel>header{border-bottom:1px solid var(--obs-line);justify-content:space-between;align-items:center;gap:8px;min-width:0;padding:0 10px;display:flex}.panel-heading>div,.heatmap-panel>header>div{align-items:baseline;gap:8px;display:flex}.panel-heading strong,.heatmap-panel strong{letter-spacing:.04em;text-transform:uppercase;font-size:10px;font-weight:600}.panel-heading>span,.panel-heading code,.heatmap-panel header>span{color:var(--obs-faint);font-size:8px}.run-card{border-bottom:1px solid var(--obs-line);background:#0d1418;gap:8px;padding:12px 10px;display:grid}.run-card-title{align-items:center;gap:7px;min-width:0;display:flex}.run-card-title strong{text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:500;overflow:hidden}.run-card-facts{grid-template-columns:repeat(2,1fr);gap:6px;display:grid}.run-card-facts span{color:var(--obs-faint);text-transform:uppercase;gap:2px;font-size:8px;display:grid}.run-card-facts b{color:var(--obs-muted);text-transform:none;font-size:10px;font-weight:500}.agent-list{min-height:0;overflow:auto}.agent-row{border:0;border-bottom:1px solid var(--obs-line-soft);text-align:left;background:0 0;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-height:52px;padding:7px 10px;display:grid;position:relative}.agent-row:hover{background:#10181d}.agent-row[aria-selected=true]{color:var(--obs-text);box-shadow:inset 2px 0 var(--obs-cyan);background:#111b20}.status-dot{border:1px solid var(--obs-faint);width:6px;height:6px}.agent-copy{gap:3px;min-width:0;display:grid}.agent-copy strong,.agent-copy small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-copy strong{color:var(--obs-text);font-size:9px;font-weight:500}.agent-copy small,.agent-duration{color:var(--obs-faint);font-size:8px}.activity-strip{grid-column:2/-1;gap:1px;height:3px;display:flex}.activity-strip i{background:var(--obs-line);flex:1}.activity-strip i.on{background:var(--obs-cyan)}.activity-strip i.error{background:var(--obs-red)}.load-more{color:var(--obs-cyan);text-transform:uppercase;margin:8px;padding:7px;font-size:8px}.graph-console{background:var(--obs-bg);grid-template-rows:36px minmax(0,1fr) 126px;display:grid}.graph-toolbar{border-bottom:1px solid var(--obs-line);background:var(--obs-panel);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:0 9px;display:grid}.view-switch{gap:2px;display:flex}.view-switch button{text-transform:uppercase;background:0 0;border-color:#0000;height:23px;padding:0 7px;font-size:8px}.view-switch button[aria-pressed=true]{border-color:var(--obs-line);color:var(--obs-cyan);background:#10191d}.viewport-count{color:var(--obs-faint);font-size:8px}.provenance-key{color:var(--obs-faint);gap:10px;font-size:8px;display:flex}.provenance-key span{align-items:center;gap:4px;display:flex}.provenance-key i{border-top:1px solid var(--obs-recorded);width:16px;height:0}.provenance-key .derived-line{border-top-color:var(--obs-derived);border-top-style:dashed}.graph-viewport{cursor:grab;touch-action:none;background:#070b0e;min-height:0;position:relative;overflow:hidden}.graph-viewport.is-panning{cursor:grabbing}#graph-svg{width:100%;height:100%;display:block}.grid-path{fill:none;stroke:#111a20;stroke-width:.6px}.graph-help{color:#39474f;letter-spacing:.05em;pointer-events:none;text-transform:uppercase;font-size:7px;position:absolute;bottom:6px;right:8px}.workflow-edge{fill:none;stroke:var(--obs-recorded);stroke-width:1px;marker-end:url(#edge-arrow);opacity:.66;pointer-events:stroke}.workflow-edge[data-provenance=derived]{stroke:var(--obs-derived);stroke-dasharray:5 4}.workflow-edge[data-kind=conflict]{stroke:var(--obs-red)}.workflow-edge.is-critical{stroke-width:2px;opacity:1}.workflow-edge.is-selected{stroke-width:3px;opacity:1}.edge-arrow{fill:var(--obs-recorded)}.workflow-node{cursor:pointer}.node-shell{fill:#0d1418;stroke:#2a3841;stroke-width:1px}.workflow-node:hover .node-shell,.workflow-node:focus .node-shell{stroke:var(--obs-cyan)}.workflow-node.is-selected .node-shell{stroke:var(--obs-cyan);stroke-width:2px}.workflow-node.is-critical .node-shell{stroke:#688b77}.node-status-band{fill:var(--obs-faint)}.workflow-node[data-status=running] .node-status-band{fill:var(--obs-lime)}.workflow-node[data-status=succeeded] .node-status-band,.workflow-node[data-status=completed] .node-status-band{fill:var(--obs-cyan)}.workflow-node[data-status=failed] .node-status-band,.workflow-node[data-status=interrupted] .node-status-band{fill:var(--obs-red)}.node-label{fill:var(--obs-text);font-size:10px;font-weight:500}.node-meta{fill:var(--obs-faint);font-size:8px}.node-kind{fill:var(--obs-cyan);letter-spacing:.08em;text-transform:uppercase;font-size:7px}.heatmap-panel{border-top:1px solid var(--obs-line);background:var(--obs-panel);grid-template-rows:31px minmax(0,1fr);min-height:0;display:grid}.heatmap{grid-template-columns:76px repeat(12,minmax(8px,1fr));gap:2px;min-height:0;padding:7px 9px;display:grid;overflow:hidden auto}.heatmap-label{color:var(--obs-muted);text-overflow:ellipsis;white-space:nowrap;align-self:center;font-size:7px;overflow:hidden}.heatmap-cell{background:#10171b;border:1px solid #182127;min-height:8px}.heatmap-cell[data-level="1"]{background:#173037;border-color:#234047}.heatmap-cell[data-level="2"]{background:#235155;border-color:#2f686b}.heatmap-cell[data-level="3"]{background:#397b77;border-color:#55a59e}.event-list{background:#080c0f;min-height:0;position:relative;overflow:auto}.event-list-inner{width:100%;position:relative}.event-row{width:100%;height:var(--event-row-height);border-bottom:1px solid var(--obs-line-soft);grid-template-columns:43px minmax(0,1fr) auto;align-items:center;padding:0 8px;display:grid;position:absolute;left:0}.event-row:hover{background:#0d1418}.event-seq{color:var(--obs-faint);font-size:8px}.event-copy{gap:2px;min-width:0;display:grid}.event-copy strong,.event-copy small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.event-copy strong{color:var(--obs-muted);font-size:8px;font-weight:500}.event-copy small,.event-time{color:var(--obs-faint);font-size:7px}.event-row[data-tone=failure]{box-shadow:inset 2px 0 var(--obs-red)}.event-row[data-tone=control]{box-shadow:inset 2px 0 var(--obs-amber)}.event-row[data-tone=collaboration]{box-shadow:inset 2px 0 var(--obs-cyan)}.event-footer{border-top:1px solid var(--obs-line);color:var(--obs-faint);justify-content:space-between;align-items:center;padding:0 8px;font-size:8px;display:flex}.event-footer button{background:0 0;border-color:#0000;height:21px;font-size:8px}.event-footer button[aria-pressed=true]{color:var(--obs-lime)}.detail-drawer{z-index:20;border-top:1px solid var(--obs-cyan);background:#090e12;height:min(390px,46vh);position:absolute;bottom:0;left:0;right:0;box-shadow:0 -14px 30px #00000061}.drawer-header{border-bottom:1px solid var(--obs-line);justify-content:space-between;align-items:center;height:37px;padding:0 11px;display:flex}.drawer-header>div{align-items:baseline;gap:10px;min-width:0;display:flex}.drawer-header strong{text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;font-size:10px;font-weight:600;overflow:hidden}.drawer-header span:last-child{color:var(--obs-faint);text-overflow:ellipsis;white-space:nowrap;font-size:8px;overflow:hidden}.drawer-header button{background:0 0;border:0;width:25px;height:25px;font-size:18px}.drawer-grid{grid-template-columns:minmax(190px,.8fr) minmax(180px,.7fr) minmax(300px,1.35fr) minmax(240px,.9fr);height:calc(100% - 37px);display:grid;overflow:auto}.drawer-grid>section{border-right:1px solid var(--obs-line);min-width:0;padding:11px;overflow:auto}.drawer-grid>section:last-child{border-right:0}.drawer-grid h2{color:var(--obs-faint);letter-spacing:.1em;text-transform:uppercase;margin:0 0 9px;font-size:8px;font-weight:600}.detail-facts{grid-template-columns:minmax(70px,.6fr) minmax(0,1fr);gap:5px 8px;margin:0;font-size:8px;display:grid}.detail-facts dt{color:var(--obs-faint);text-transform:uppercase}.detail-facts dd{overflow-wrap:anywhere;min-width:0;color:var(--obs-muted);margin:0}.attempt-history,.content-list{gap:4px;display:grid}.attempt-record,.content-ref{border:1px solid var(--obs-line-soft);background:var(--obs-panel);color:var(--obs-muted);grid-template-columns:minmax(0,1fr) auto;gap:5px;padding:6px;font-size:8px;display:grid}button.content-ref{text-align:left;width:100%}.attempt-record strong,.content-ref strong{color:var(--obs-text);text-overflow:ellipsis;white-space:nowrap;font-weight:500;overflow:hidden}.content-viewer{border:1px solid var(--obs-line);color:#b7c6ce;min-height:96px;max-height:185px;font:8px/1.55 var(--obs-mono);white-space:pre-wrap;word-break:break-word;background:#05080a;margin:8px 0 0;padding:8px;overflow:auto}.control-section form,.control-section label{gap:5px;display:grid}.control-section form{gap:8px}.control-section label{color:var(--obs-faint);text-transform:uppercase;font-size:8px}.control-section select,.control-section textarea{border:1px solid var(--obs-line);width:100%;color:var(--obs-text);text-transform:none;background:#060a0d;border-radius:0;outline:0;padding:6px;font-size:9px}.control-section textarea{resize:vertical}.control-section button[type=submit]{color:var(--obs-lime);text-transform:uppercase;background:#182315;border-color:#506d39;padding:7px;font-size:8px}.historical-note,.control-result{color:var(--obs-faint);font-size:8px;line-height:1.5}.control-result{color:var(--obs-muted);margin-top:7px}.sr-only{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}[hidden]{display:none!important}@keyframes scan{0%{transform:translate(-100%)}to{transform:translate(430%)}}@media (width<=1080px){.debugger{grid-template-columns:190px minmax(450px,1fr) 270px}.drawer-grid{grid-template-columns:1fr 1fr 1.35fr}.control-section{grid-column:1/-1}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}
74
60
  /*$vite$:1*/</style>
75
61
  </head>